ComputationalRadiationPhysics / picongpu

Performance-Portable Particle-in-Cell Simulations for the Exascale Era :sparkles:
https://picongpu.readthedocs.io
Other
710 stars 218 forks source link

Initialization externally injected electron bunch #1919

Closed BifengLei closed 1 year ago

BifengLei commented 7 years ago

A expected situation is seen in the picture: an externally injected electron bunch (green square) following a laser pulse after some distance, d1. image

One of usual ways to do this is as following:

  1. define the initial electron bunch profile (position, momentum, charge distribution )
  2. specify the initialization time for electron bunch, when it has d1 distance after the laser pulse, then it propagates together with the laser pulse.

Is there a solution to do this in PIConGPU?

PrometheusPi commented 7 years ago

In order to initialize an electron bunch you could use the bunch initialization routine written in python: #1914 A detailed workflow is documented in the ipython notebook.

PrometheusPi commented 7 years ago

In order to set up the laser in front of the bunch you either start simulating the laser (which is initialized usually on the y=0 plane) and add the bunch after the laser has propagated into the simulation box or you use a different y-plane to initialize the laser (see #1796 for details). However the second approach might cause some problems if part of the laser propagate towards the electron bunch. ( @psychocoderHPC what do you think of this setup? )

ax3l commented 7 years ago

Be aware that a non-zero plane laser needs more thoroughly testing still and is rather new #1893 It also won't help much yet since it needs to be started on the 1st GPU right now #1891

So init a laser, propagate, checkpoint and add the beam to the checkpoint is probably the quickest way to proceed and already works in the last stable release 0.2.4 currently in master.

PrometheusPi commented 7 years ago

@BifengLei I would propose the following approach:

Please post here if this workflow was successful for you.

ax3l commented 7 years ago

cherry-pick the commits in #1914

if he is working on master, which I would recommend, he can just download the bunchInit.py from your PR.

PrometheusPi commented 7 years ago

@ax3l That is true. :+1:

PrometheusPi commented 1 year ago

@BifengLei The current release and the dev branch support, bunch initialization for openPMD with both ADIOS and HDF5 backends. Furthermore, lasers can be initialized from arbitrary planes and directions with our new incident field method. The only issue remaining is the relativistic Poisson solver. But we circumvent this by generating the bunch field-free, pushing the bunch with the composite pusher, switching from Free to e.g. Boris usher after 10k steps thus generating the E and B fields via the field solver.

I will thus close this issue as solved.