simulation box size and boundary conditions #5057
Replies: 2 comments 2 replies
-
Hi @Alfven17, thank you for your questions!
If you initialize a plasma or gas and place the macro-particles on top of each other (by using the same number of particles per cell) using a quiet start (not random in-cell), and carefully check that electrons and ions are compensated in charge then this is not needed. If you start with a fully neutral species (that is to-be-ionized), then an initial Poisson solve is also not needed, because also then initial fields are zero.
That depends a bit on your science case and we have a variety of field and particle boundary conditions to handle this. In your case, you could start with a large enough plasma in the center, leave a bit of vacuum to the simulation boundary and apply open/absorbing (e.g., PML or silver-mueller) field boundaries and absorbing particle boundaries. You could also make the gas/plasma up to thee boundary. As always, when you see effects from the boundary that are non-physical "creeping" into the simulation over time then make the domain bigger to avoid that they influence the real physic at play.
The simulation box size should not effect the physics, otherwise there is an issue in the simulation input file. I assume the problem is likely that your initial gas is not neutral (question 1.) and thus a larger box gives you a different initial potential when solving the Poisson equation a t=0 with I checked your linked inputs file and it looks like the two
See above. Yes, you could even use periodic if there is a little chance that particles actually leave the domain.
This means that we will continuously feed particles into the simulation at every time step, instead of only during t=0. Yes, this is mostly used with moving window sims, where the box first has to reach a certain area, e.g., if we send a beam through a background plasma.
Not really. Rigid injection is a technique to inject complex particle beams and build up their fields before starting a self-consistent interaction. If you do ES simulations or one of our initial Poisson solvers for our EM solver is sufficient to init your beams, then use those. |
Beta Was this translation helpful? Give feedback.
-
@ax3l Thanks so much for your answers! I reran the simulation with A few follow-up questions:
|
Beta Was this translation helpful? Give feedback.
-
Hi, I’m new to WarpX and trying to use it to model the field evolution of a plasma after ionization, and the impact on a low charge electron beam traveling through the plasma (focusing effect). The plasma electron is assumed to gain some excess kinetic energy and begin to diffuse after ionization. I started with the plasma-only simulation and have a few questions on the setup,
What is the implication of setting initialize_self_fields=1 or 0. I see it set to 1 only in the space charge examples but not in PWFA or plasma physics examples.
How do I set the size of simulation box? In my case, the plasma is not uniform. Should I have the plasma fully contained by the box, or use a smaller box to model the region of interest that affects the electron beam.
Again on size of simulation box. I've two input files with the same initial beam distribution but different simulation box size (see file attached for the one with bigger box). At the same t (different iteration), the transverse E field looks quite different. Is this an artifact of the incorrect simulation setting?
inputs_gasonly_gaussian_ux_2e-3.txt
Correspondingly, what is the right boundary condition to use? Physically it has open boundary so I’d assume ‘pml pml pml’ should be fine. Under what condition ‘periodic’ is okay? Also I’m a bit confused by the ‘pec’ boundary used in space charge examples. Is it simulating the space charge field of a beam in metallic beam pipes?
And eventually I’d like to inject the main electron beam, with its RMS transverse size slightly smaller than the plasma electrons. In that case (moving window simulation),
To provide context, the length of plasma is around 2mm, with transverse size around 200um.
Beta Was this translation helpful? Give feedback.
All reactions