Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions Docs/source/usage/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ Domain Boundary Conditions
and their velocities are thermalized. The tangential velocity components are sampled from ``gaussian`` distribution
and the component normal to the boundary is sampled from ``gaussian flux`` distribution.
The standard deviation for these distributions should be provided for each species using
``boundary.<species>.u_th``. The same standard deviation is used to sample all components.
``boundary.<species_name>.u_th``. The same standard deviation is used to sample all components.

* ``None``: No boundary conditions are applied to the particles.
When using RZ, RCYLINDER, and RSPHERE, this option must be used for the lower radial boundary, the first value of ``boundary.particle_lo``.
Expand Down Expand Up @@ -899,7 +899,7 @@ Particle initialization
* ``<species_name>.charge`` (`float`) optional (default `NaN`)
The charge of one `physical` particle of this species.
If ``species_type`` is specified, the charge will be set to the physical value and ``charge`` is optional.
When ``<species>.do_field_ionization = 1``, the physical particle charge is equal to ``ionization_initial_level * charge``, so latter parameter should be equal to q_e (which is defined in WarpX as the elementary charge in coulombs).
When ``<species_name>.do_field_ionization = 1``, the physical particle charge is equal to ``ionization_initial_level * charge``, so latter parameter should be equal to q_e (which is defined in WarpX as the elementary charge in coulombs).

* ``<species_name>.mass`` (`float`) optional (default `NaN`)
The mass of one `physical` particle of this species.
Expand Down Expand Up @@ -1376,7 +1376,7 @@ Particle initialization
:math:`\gamma` is the Lorentz factor,
:math:`v/c` is the particle velocity normalized by the speed of light.

* ``<species>.save_particles_at_xlo/ylo/zlo``, ``<species>.save_particles_at_xhi/yhi/zhi`` and ``<species>.save_particles_at_eb`` (`0` or `1` optional, default `0`)
* ``<species_name>.save_particles_at_xlo/ylo/zlo``, ``<species_name>.save_particles_at_xhi/yhi/zhi`` and ``<species_name>.save_particles_at_eb`` (`0` or `1` optional, default `0`)
If `1` particles of this species will be copied to the scraped particle
buffer for the specified boundary if they leave the simulation domain in
the specified direction. **If USE_EB=TRUE** the ``save_particles_at_eb``
Expand All @@ -1402,112 +1402,112 @@ Particle initialization
lead to memory issues if not periodically cleared. To clear the buffer
call ``clear_buffer()``.

* ``<species>.do_field_ionization`` (`0` or `1`) optional (default `0`)
* ``<species_name>.do_field_ionization`` (`0` or `1`) optional (default `0`)
Do field ionization for this species (using the ADK theory).

* ``<species>.do_adk_correction`` (`0` or `1`) optional (default `0`)
* ``<species_name>.do_adk_correction`` (`0` or `1`) optional (default `0`)
Whether to apply the correction to the ADK theory proposed by Zhang, Lan and Lu in `Q. Zhang et al. (Phys. Rev. A 90, 043410, 2014) <https://doi.org/10.1103/PhysRevA.90.043410>`__.
If so, the probability of ionization is modified using an empirical model that should be more accurate in the regime of high electric fields.
Currently, this is only implemented for Hydrogen, although Argon is also available in the same reference.

* ``<species>.physical_element`` (`string`)
* ``<species_name>.physical_element`` (`string`)
Only read if `do_field_ionization = 1`. Symbol of chemical element for
this species. Example: for Helium, use ``physical_element = He``.
All the elements up to atomic number Z=100 (Fermium) are supported.

* ``<species>.ionization_product_species`` (`string`)
* ``<species_name>.ionization_product_species`` (`string`)
Only read if `do_field_ionization = 1`. Name of species in which ionized
electrons are stored. This species must be created as a regular species
in the input file (in particular, it must be in `particles.species_names`).

* ``<species>.ionization_initial_level`` (`int`) optional (default `0`)
* ``<species_name>.ionization_initial_level`` (`int`) optional (default `0`)
Only read if `do_field_ionization = 1`. Initial ionization level of the
species (must be smaller than the atomic number of chemical element given
in `physical_element`).

* ``<species>.do_classical_radiation_reaction`` (`int`) optional (default `0`)
* ``<species_name>.do_classical_radiation_reaction`` (`int`) optional (default `0`)
Enables Radiation Reaction (or Radiation Friction) for the species. Species
must be either electrons or positrons. Boris pusher must be used for the
simulation. If both ``<species>.do_classical_radiation_reaction`` and
``<species>.do_qed_quantum_sync`` are enabled, then the classical module
simulation. If both ``<species_name>.do_classical_radiation_reaction`` and
``<species_name>.do_qed_quantum_sync`` are enabled, then the classical module
will be used when the particle's chi parameter is below ``qed_qs.chi_min``,
the discrete quantum module otherwise.

* ``<species>.do_qed_quantum_sync`` (`int`) optional (default `0`)
* ``<species_name>.do_qed_quantum_sync`` (`int`) optional (default `0`)
Enables Quantum synchrotron emission for this species.
Quantum synchrotron lookup table should be either generated or loaded from disk to enable
this process (see "Lookup tables for QED modules" section below).
`<species>` must be either an electron or a positron species.
`<species_name>` must be either an electron or a positron species.
**This feature requires to compile with QED=TRUE**

* ``<species>.do_qed_breit_wheeler`` (`int`) optional (default `0`)
* ``<species_name>.do_qed_breit_wheeler`` (`int`) optional (default `0`)
Enables non-linear Breit-Wheeler process for this species.
Breit-Wheeler lookup table should be either generated or loaded from disk to enable
this process (see "Lookup tables for QED modules" section below).
`<species>` must be a photon species (i.e., a species with ``<species_name>.species_type`` set to `photon`)
`<species_name>` must be a photon species (i.e., a species with ``<species_name>.species_type`` set to `photon`)
**This feature requires to compile with -DWarpX_QED=ON**

* ``<species>.qed_quantum_sync_phot_product_species`` (`string`)
* ``<species_name>.qed_quantum_sync_phot_product_species`` (`string`)
If an electron or a positron species has the Quantum synchrotron process, a photon product species must be specified
(the name of an existing photon species must be provided)
**This feature requires to compile with QED=TRUE**

* ``<species>.qed_breit_wheeler_ele_product_species`` (`string`)
* ``<species_name>.qed_breit_wheeler_ele_product_species`` (`string`)
If a photon species has the Breit-Wheeler process, an electron product species must be specified
(the name of an existing electron species must be provided)
**This feature requires to compile with QED=TRUE**

* ``<species>.qed_breit_wheeler_pos_product_species`` (`string`)
* ``<species_name>.qed_breit_wheeler_pos_product_species`` (`string`)
If a photon species has the Breit-Wheeler process, a positron product species must be specified
(the name of an existing positron species must be provided).
**This feature requires to compile with QED=TRUE**

* ``<species>.do_resampling`` (`0` or `1`) optional (default `0`)
* ``<species_name>.do_resampling`` (`0` or `1`) optional (default `0`)
If `1` resampling is performed for this species. This means that the number of macroparticles
will be reduced at specific timesteps while preserving the distribution function as much as
possible (details depend on the chosen resampling algorithm).
This can be useful in situations with continuous creation of particles (e.g. with ionization
or with QED effects). At least one resampling trigger (see below) must be specified to actually
perform resampling.

* ``<species>.resampling_algorithm`` (`string`) optional (default `leveling_thinning`)
* ``<species_name>.resampling_algorithm`` (`string`) optional (default `leveling_thinning`)
The algorithm used for resampling:

* ``leveling_thinning`` This algorithm is defined in :cite:t:`param-MuravievCPC2021`.
It has one parameter:

* ``<species>.resampling_algorithm_target_ratio`` (`float`) optional (default `1.5`)
* ``<species_name>.resampling_algorithm_target_ratio`` (`float`) optional (default `1.5`)
This **roughly** corresponds to the ratio between the number of particles before and
after resampling.

* ``velocity_coincidence_thinning``` The particles are sorted into phase space
cells and merged, similar to the approach described in :cite:t:`param-Vranic2015`.
It has three parameters:

* ``<species>.resampling_algorithm_delta_ur`` (`float`)
* ``<species_name>.resampling_algorithm_delta_ur`` (`float`)
The width of momentum cells used in clustering particles, in m/s.

* ``<species>.resampling_algorithm_n_theta`` (`int`)
* ``<species_name>.resampling_algorithm_n_theta`` (`int`)
The number of cell divisions to use in the :math:`\theta` direction
when clustering the particle velocities.

* ``<species>.resampling_algorithm_n_phi`` (`int`)
* ``<species_name>.resampling_algorithm_n_phi`` (`int`)
The number of cell divisions to use in the :math:`\phi` direction
when clustering the particle velocities.

* ``<species>.resampling_min_ppc`` (`int`) optional (default `1`)
* ``<species_name>.resampling_min_ppc`` (`int`) optional (default `1`)
Resampling is not performed in cells with a number of macroparticles strictly smaller
than this parameter.

* ``<species>.resampling_trigger_intervals`` (`string`) optional (default `0`)
* ``<species_name>.resampling_trigger_intervals`` (`string`) optional (default `0`)
Using the `Intervals parser`_ syntax, this string defines timesteps at which resampling is
performed.

* ``<species>.resampling_trigger_max_avg_ppc`` (`float`) optional (default `infinity`)
* ``<species_name>.resampling_trigger_max_avg_ppc`` (`float`) optional (default `infinity`)
Resampling is performed everytime the number of macroparticles per cell of the species
averaged over the whole simulation domain exceeds this parameter.

* ``<species>.do_temperature_deposition`` (`boolean`) optional (default `false`)
* ``<species_name>.do_temperature_deposition`` (`boolean`) optional (default `false`)
When running with Ohm's Law Hybrid Solver, this will enable temperature deposition
in each dimension with a matched shape function and filtering used for current deposition.
This is required when using the electron energy solver with electron-ion temperature relaxation.
Expand Down Expand Up @@ -3043,9 +3043,9 @@ In-situ capabilities can be used by turning on Sensei or Ascent (provided they a

.. math::

\texttt{<field_name>_<species>} = \frac{\sum_{i=1}^N w_i \, f(x_i,y_i,z_i,u_{x,i},u_{y,i},u_{z,i})}{\sum_{i=1}^N w_i}
\texttt{<field_name>_<species_name>} = \frac{\sum_{i=1}^N w_i \, f(x_i,y_i,z_i,u_{x,i},u_{y,i},u_{z,i})}{\sum_{i=1}^N w_i}

where :math:`w_i` is the particle weight, :math:`f()` is the parser function, and :math:`(x_i,y_i,z_i)` are particle positions in units of a meter. The sums are over all particles of type ``<species>`` in a cell (ignoring the particle shape factor) that satisfy ``<diag_name>.particle_fields.<field_name>.filter(x,y,z,ux,uy,uz)``.
where :math:`w_i` is the particle weight, :math:`f()` is the parser function, and :math:`(x_i,y_i,z_i)` are particle positions in units of a meter. The sums are over all particles of type ``<species_name>`` in a cell (ignoring the particle shape factor) that satisfy ``<diag_name>.particle_fields.<field_name>.filter(x,y,z,ux,uy,uz)``.
When ``<diag_name>.particle_fields.<field_name>.do_average`` is `0`, the division by the sum over particle weights is not done.
In 1D or 2D, the particle coordinates will follow the WarpX convention. :math:`(u_{x,i},u_{y,i},u_{z,i})` are components of the particle four-momentum. :math:`u = \gamma v/c`, :math:`\gamma` is the Lorentz factor, :math:`v` is the particle velocity and :math:`c` is the speed of light.
For photons, we use the standardized momentum :math:`u = p/(m_{e}c)`, where :math:`p` is the momentum of the photon and :math:`m_{e}` the mass of an electron.
Expand Down Expand Up @@ -3261,7 +3261,7 @@ Boundary Scraping Diagnostics
This diagnostic type is specified by setting ``<diag_name>.diag_type`` = ``BoundaryScraping``.
Currently, the only supported output format is openPMD, so the user also needs to set ``<diag>.format=openpmd`` and WarpX must be compiled with openPMD turned on.
The data that is to be collected and recorded is controlled per species and per boundary by setting one or more of the flags to ``1``,
``<species>.save_particles_at_xlo/ylo/zlo``, ``<species>.save_particles_at_xhi/yhi/zhi``, and ``<species>.save_particles_at_eb``.
``<species_name>.save_particles_at_xlo/ylo/zlo``, ``<species_name>.save_particles_at_xhi/yhi/zhi``, and ``<species_name>.save_particles_at_eb``.
(Note that this diagnostics does not save any field ; it only saves particles.)

The data collected at each boundary is written out to a subdirectory of the diagnostics directory with the name of the boundary, for example, ``particles_at_xlo``, ``particles_at_zhi``, or ``particles_at_eb``.
Expand All @@ -3274,7 +3274,7 @@ In addition to their usual attributes, the saved particles have
and the exact time when each particle hits the boundary.
3 real attributes ``nx``, ``ny``, ``nz``, which represents the three components of the normal to the boundary on the point of contact of the particles (not saved if they reach non-EB boundaries)

``BoundaryScrapingDiagnostics`` can be used with ``<diag_name>.<species>.random_fraction``, ``<diag_name>.<species>.uniform_stride``, and ``<diag_name>.<species>.plot_filter_function``, which have the same behavior as for ``FullDiagnostics``. For ``BoundaryScrapingDiagnostics``, these filters are applied at the time the data is written to file. An implication of this is that more particles may initially be accumulated in memory than are ultimately written. ``t`` in ``plot_filter_function`` refers to the time the diagnostic is written rather than the time the particle crossed the boundary.
``BoundaryScrapingDiagnostics`` can be used with ``<diag_name>.<species_name>.random_fraction``, ``<diag_name>.<species_name>.uniform_stride``, and ``<diag_name>.<species_name>.plot_filter_function``, which have the same behavior as for ``FullDiagnostics``. For ``BoundaryScrapingDiagnostics``, these filters are applied at the time the data is written to file. An implication of this is that more particles may initially be accumulated in memory than are ultimately written. ``t`` in ``plot_filter_function`` refers to the time the diagnostic is written rather than the time the particle crossed the boundary.

.. _running-cpp-parameters-diagnostics-reduced:

Expand Down
Loading