External magnetic field in HybridPIC #4899
-
What is the best way to get an external magnetic and/or electric field in the HybridPIC code? If I choose the regular external fields for the particle push then I rightly get an error message. Is this a general problem with HybridPIC codes or is it just not implemented yet? Would this be difficult to implement in the code? I'm guessing the easiest way would be to include a static external field B_0 in ohms law so that the total field is B=B_ind+B_0 and curl(B_0)=0. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @kli-jfp. The equations governing the Ohm's law based hybrid-PIC model are unfortunately not amenable to an external field the way that Maxwell's equations are. However, the model does allow for an external current, which is already included in WarpX. If you want to mimic an external B-field, you can achieve that by specifying an appropriate external current which would result in the desired B-field.
|
Beta Was this translation helpful? Give feedback.
-
I also wanted to just make sure you are aware that the initial fields can be set to anything you like via the options described in this section of the documentation. |
Beta Was this translation helpful? Give feedback.
For a classical mirror I would just set the initial B-field (using the
B_ext_grid_init_style
functionality) to the total B-field (from the coils and any equilibrium plasma currents) and not explicitly specify the coil currents. The coil currents approach is only needed if you want to simulate time varying currents in the coils.