ECP-WarpX / WarpX

WarpX is an advanced electromagnetic & electrostatic Particle-In-Cell code.
https://ecp-warpx.github.io
Other
310 stars 196 forks source link

simple code example that demonstrates dielectric wakefield accelerator #4644

Open chipopt opened 10 months ago

chipopt commented 10 months ago

Dear developers,

Hello, I am a college student who is currently interested in using materials to modulate the incident electric field and generate near fields for accelerating charged particles. This requires setting the dielectric constant, conductivity, etc. of the material in the simulation space. An example similar to the model described in the WarpX documentation article WarpX>Science Highlights>Particle Accelerator & Beam Physics>Simulation studies of drive-beam instability in a dielectric wakefield accelerator. would be very helpful to me. However, I am not familiar with using WarpX. Could you please provide a simple code example that demonstrates how to simulate a plane wave incident on a glass material? Even this simple example would help me understand how to use it. Thank you very much.

Best regards,

ppiot commented 10 months ago

@chipopt, attached is a simple example of dielectric implementation in warpX. A 40-MeV electron beam passes through two dielectric slab. The slabs are implemented via the macroscopic.epsilon_function(x,y,z) the same can be done for the conductivity. I hope this helps. dwfa_slab_internalDist_example.txt