SumRhoJ¶
- SumRhoJ (singleton)
Block that contains the charges and currents generated by the charged particles and fluids in the simulation. You can add to the charge and/or current density using an Initial and Boundary Conditions as previously described. Recall that a BoundaryCondition can be applied throughout a region, which can be useful for adding an external driving current to a simulation.
You do not need to use a SumRhoJ block unless you need to add a boundary condition or source.
SumRhoJ blocks include a Source block. In fact, a SumRhoJ block is most commonly used for adding a Source block whose purpose is to add a current source to a simulation.
Example SumRhoJ Block¶
#
# Drive cavity with current source
#
<SumRhoJ sumRhoJ>
<Source currentSource>
# Apply everywhere
lowerBounds = [0 0 0]
upperBounds = [NX NY NZ]
kind = varadd # Value added to current field
components = [3] # J_z, rho is 0
<STFunc component3>
kind = expression
expression = AMP*sin(CAVOMEGA*t)*exp(-0.5*(t-T_0)^2/T_SIG^2)*H(STOPTIME-t)*H(RADINIT^2 - x^2 - y^2)*J0(KAPPA*sqrt(x^2+y^2))
</STFunc>
</Source>
</SumRhoJ>