QED
Quantum synchrotron
Note
Section empty!
Breit-Wheeler
Note
Section empty!
Schwinger process
If the code is compiled with QED and the user activates the Schwinger process in the input file,
electron-positron pairs can be created in vacuum in the function
MultiParticleContainer::doQEDSchwinger
:
-
void MultiParticleContainer::doQEDSchwinger()
If Schwinger process is activated, this function is called at every timestep in Evolve and is used to create Schwinger electron-positron pairs. Within this function we loop over all cells to calculate the number of created physical pairs. If this number is higher than 0, we create a single particle per species in this cell, with a weight corresponding to the number of physical particles.
MultiParticleContainer::doQEDSchwinger
in turn calls the function filterCreateTransformFromFAB
:
-
template<int N, typename DstTile, typename FABs, typename Index, typename FilterFunc, typename CreateFunc1, typename CreateFunc2, typename TransFunc>
Index filterCreateTransformFromFAB(DstTile &dst1, DstTile &dst2, const amrex::Box box, const FABs &src_FABs, const Index dst1_index, const Index dst2_index, FilterFunc &&filter, CreateFunc1 &&create1, CreateFunc2 &&create2, TransFunc &&transform) noexcept Apply a filter on a list of FABs, then create and apply a transform operation to the particles depending on the output of the filter.
This version of the function takes as input a filter functor (and an array of FABs that can be used in the filter functor), uses it to obtain a mask and a FAB and then calls another version of filterCreateTransformFromFAB that takes the mask and the FAB as inputs.
- Template Parameters:
N – number of particles created in the dst(s) in each cell
DstTile – the dst particle tile type
FABs – the src array of Array4 type
Index – the index type, e.g. unsigned int
FilterFunc – the filter function type
CreateFunc1 – the create function type for dst1
CreateFunc2 – the create function type for dst2
TransFunc – the transform function type
- Parameters:
dst1 – [inout] the first destination tile
dst2 – [inout] the second destination tile
box – [in] the box where the particles are created
src_FABs – [in] A collection of source data, e.g. a class with Array4 to the EM fields, defined on box on which the filter operation is applied
dst1_index – [in] the location at which to starting writing the result to dst1
dst2_index – [in] the location at which to starting writing the result to dst2
filter – [in] a callable returning a value > 0 if particles are to be created in the considered cell.
create1 – [in] callable that defines what will be done for the create step for dst1.
create2 – [in] callable that defines what will be done for the create step for dst2.
transform – [in] callable that defines the transformation to apply on dst1 and dst2.
- Returns:
num_added the number of particles that were written to dst1 and dst2.
filterCreateTransformFromFAB
proceeds in three steps.
In the filter phase, we loop on every cell and calculate the number of physical pairs created within
the time step dt as a function of the electromagnetic field at the given cell position.
This probabilistic calculation is done via a wrapper that calls the PICSAR
library.
In the create phase, the particles are created at the desired positions, currently at the cell nodes.
In the transform phase, we assign a weight to the particles depending on the number of physical
pairs created.
At most one macroparticle is created per cell per timestep per species, with a weight corresponding to
the total number of physical pairs created.
So far the Schwinger module requires using warpx.grid_type = collocated
or
algo.field_gathering = momentum-conserving
(so that the auxiliary fields are calculated on the nodes)
and is not compatible with either mesh refinement, RZ coordinates or single precision.