aboutsummaryrefslogtreecommitdiff
path: root/Docs/source/running_cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Docs/source/running_cpp')
-rw-r--r--Docs/source/running_cpp/parameters.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst
index 904741ebf..287f534b0 100644
--- a/Docs/source/running_cpp/parameters.rst
+++ b/Docs/source/running_cpp/parameters.rst
@@ -296,7 +296,7 @@ Particle initialization
* ``gaussian_beam``: Inject particle beam with gaussian distribution in
space in all directions. This requires additional parameters:
- ``<species_name>.q_tot`` (beam charge),
+ ``<species_name>.q_tot`` (beam charge) optional (default is ``q_tot=0``),
``<species_name>.npart`` (number of particles in the beam),
``<species_name>.x/y/z_m`` (average position in `x/y/z`),
``<species_name>.x/y/z_rms`` (standard deviation in `x/y/z`),
@@ -305,9 +305,13 @@ Particle initialization
and optional argument ``<species_name>.do_symmetrize`` (whether to
symmetrize the beam in the x and y directions).
- * ``external_file``: inject macroparticles with properties (charge, mass, position, and momentum) according to data in external file.
- It requires the additional arguments ``<species_name>.injection_file`` and ``<species_name>.q_tot``, which are the string corresponding to the openPMD file name and the beam charge.
- When using this style, it is not necessary to add other ``<species_name>.(...)`` paramters, because they will be read directly from the file.
+ * ``external_file``: Inject macroparticles with properties (mass, charge, position, and momentum - :math:`\gamma \beta m c`) read from an external openPMD file.
+ It requires the additional arguments:
+ ``<species_name>.injection_file`` (`string`) openPMD file name and
+ ``<species_name>.q_tot`` (`double`) optional (default is ``q_tot=0`` and no re-scaling is done, ``weight=q_p``) when specified it is used to re-scale the weight of externally loaded ``N`` physical particles, each of charge ``q_p``, to inject macroparticles of ``weight=<species_name>.q_tot/q_p/N``.
+ The external file should include the species ``openPMD::Record`` s labeled ``mass`` and ``charge`` (`double` scalars) and also the ``position`` and ``momentum`` (`double` arrays), with dimensionality and units set via ``openPMD::setUnitDimension`` and ``setUnitSI``.
+ The ``external_file`` option is currently implemented for 2D and 3D geometries, with record components ``x``, ``z`` and ``y`` for 3D.
+ For more information on the `openPMD format <https://github.com/openPMD>`__ and how to build WarpX with it, please visit :doc:`../building/openpmd`.
* ``<species_name>.num_particles_per_cell_each_dim`` (`3 integers in 3D and RZ, 2 integers in 2D`)
With the NUniformPerCell injection style, this specifies the number of particles along each axis