diff options
Diffstat (limited to 'Docs/source/running_cpp/parameters.rst')
-rw-r--r-- | Docs/source/running_cpp/parameters.rst | 97 |
1 files changed, 74 insertions, 23 deletions
diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst index fb8931c60..076e39ce6 100644 --- a/Docs/source/running_cpp/parameters.rst +++ b/Docs/source/running_cpp/parameters.rst @@ -28,6 +28,9 @@ Overall simulation parameters The direction of the Lorentz-transform for boosted-frame simulations (The direction ``y`` cannot be used in 2D simulations.) +* ``warpx.verbose`` (`0` or `1`) + Controls how much information is printed to the terminal, when running WarpX. + Setting up the field mesh ------------------------- @@ -58,6 +61,22 @@ Setting up the field mesh This patch is rectangular, and thus its extent is given here by the coordinates of the lower corner (``warpx.fine_tag_lo``) and upper corner (``warpx.fine_tag_hi``). +* ``n_field_gather_buffer`` (`integer`; 0 by default) + When using mesh refinement: the particles that are located inside + a refinement patch, but within ``n_field_gather_buffer`` cells of + the edge of this patch, will gather the fields from the lower refinement + level, instead of gathering the fields from the refinement patch itself. + This avoids some of the spurious effects that can occur inside the + refinement patch, close to its edge. See the section + :doc:`../../theory/amr` for more details. + +* ``n_current_deposition_buffer`` (`integer`) + When using mesh refinement: the particles that are located inside + a refinement patch, but within ``n_field_gather_buffer`` cells of + the edge of this patch, will deposit their charge and current to the + lower refinement level, instead of depositing to the refinement patch + itself. See the section :doc:`../../theory/amr` for more details. + Distribution across MPI ranks and parallelization ------------------------------------------------- @@ -91,7 +110,8 @@ Distribution across MPI ranks and parallelization (see ``max_grid_size``). * ``warpx.load_balance_with_sfc`` (`0` or `1`) optional (default `0`) - If this is `1`: use a Space-Filling Curve (SFC) algorithm in order to perform load-balancing of the simulation. + If this is `1`: use a Space-Filling Curve (SFC) algorithm in order to + perform load-balancing of the simulation. If this is `0`: the Knapsack algorithm is used instead. * ``warpx.do_dynamic_scheduling`` (`0` or `1`) optional (default `1`) @@ -133,10 +153,14 @@ Particle initialization Whether to activate the FDTD Numerical Cherenkov Instability corrector. * ``particles.rigid_injected_species`` (`strings`, separated by spaces) - List of species injected using the rigid injection method. For species injected - using this method, particles are translated along the `+z` axis with constant velocity - as long as their ``z`` coordinate verifies ``z<zinject_plane``. When ``z>zinject_plane``, + List of species injected using the rigid injection method. The rigid injection + method is useful when injecting a relativistic particle beam, in boosted-frame + simulation ; see the section :doc:`../../theory/input_output` for more details. + For species injected using this method, particles are translated along the `+z` + axis with constant velocity as long as their ``z`` coordinate verifies + ``z<zinject_plane``. When ``z>zinject_plane``, particles are pushed in a standard way, using the specified pusher. + (see the parameter ``<species_name>.zinject_plane`` below) * ``<species_name>.charge`` (`float`) The charge of one `physical` particle of this species. @@ -177,7 +201,7 @@ Particle initialization The only valid value is true. * ``predefined``: use one of WarpX predefined plasma profiles. It requires additional - arguments ``<species_name>.predefined_profile_name`` and + arguments ``<species_name>.predefined_profile_name`` and ``<species_name>.predefined_profile_params`` (see below). * ``<species_name>.momentum_distribution_type`` (`string`) @@ -206,7 +230,7 @@ Particle initialization Injection plane when using the rigid injection method. See ``particles.rigid_injected_species`` above. -* ``<species_name>.rigid_avance`` (`bool`) +* ``<species_name>.rigid_advance`` (`bool`) Only read if ``<species_name>`` is in ``particles.rigid_injected_species``. * If ``false``, each particle is advanced with its @@ -231,19 +255,19 @@ Particle initialization n(x,y) = 1 + 4\frac{x^2+y^2}{k_p^2 R_c^4} - where :math:`k_p` is the plasma wavenumber associated with density :math:`n_0`. - Here, :math:`n(z)` is a linear up-ramp from :math:`0` to :math:`L_{ramp,up}`, + where :math:`k_p` is the plasma wavenumber associated with density :math:`n_0`. + Here, :math:`n(z)` is a linear up-ramp from :math:`0` to :math:`L_{ramp,up}`, constant to :math:`1` from :math:`L_{ramp,up}` to :math:`L_{ramp,up} + L_{plateau}` - and a linear down-ramp from :math:`L_{ramp,up} + L_{plateau}` to + and a linear down-ramp from :math:`L_{ramp,up} + L_{plateau}` to :math:`L_{ramp,up} + L_{plateau}+L_{ramp,down}`. All parameters are given in ``predefined_profile_params``. * ``<species_name>.predefined_profile_params`` (list of `float`) Parameters for the predefined profiles. - * If ``species_name.predefined_profile_name`` is ``parabolic_channel``, - ``predefined_profile_params`` contains a space-separated list of the - following parameters, in this order: :math:`L_{ramp,up}` :math:`L_{plateau}` + * If ``species_name.predefined_profile_name`` is ``parabolic_channel``, + ``predefined_profile_params`` contains a space-separated list of the + following parameters, in this order: :math:`L_{ramp,up}` :math:`L_{plateau}` :math:`L_{ramp,down}` :math:`R_c` :math:`n_0` * ``<species_name>.do_backward_injection`` (`bool`) @@ -270,12 +294,12 @@ Laser initialization * ``lasers.names`` (list of `string`. Must contain ``lasers.nlasers`` elements) Name of each laser. This is then used in the rest of the input deck ; - in this documentation we use `<laser_name>` as a placeholder. The parameters below + in this documentation we use `<laser_name>` as a placeholder. The parameters below must be provided for each laser pulse. * ```<laser_name>`.position`` (`3 floats in 3D and 2D` ; in meters) The coordinates of one of the point of the antenna that will emit the laser. - The plane of the antenna is entirely defined by ``<laser_name>.position`` + The plane of the antenna is entirely defined by ``<laser_name>.position`` and ``<laser_name>.direction``. ```<laser_name>`.position`` also corresponds to the origin of the coordinates system @@ -285,7 +309,7 @@ Laser initialization transversally. .. note:: - In 2D, ```<laser_name>`.position`` is still given by 3 numbers, + In 2D, ```<laser_name>`.position`` is still given by 3 numbers, but the second number is ignored. When running a **boosted-frame simulation**, provide the value of @@ -426,8 +450,8 @@ Laser initialization * ``warpx.num_mirrors`` (`int`) optional (default `0`) Users can input perfect mirror condition inside the simulation domain. - The number of mirrors is given by ``warpx.num_mirrors``. The mirrors are - orthogonal to the `z` direction. The following parameters are required + The number of mirrors is given by ``warpx.num_mirrors``. The mirrors are + orthogonal to the `z` direction. The following parameters are required when ``warpx.num_mirrors`` is >0. * ``warpx.mirror_z`` (list of `float`) required if ``warpx.num_mirrors>0`` @@ -437,10 +461,10 @@ Laser initialization ``z`` width of the mirrors. * ``warpx.mirror_z_npoints`` (list of `int`) required if ``warpx.num_mirrors>0`` - In the boosted frame, depending on `gamma_boost`, ``warpx.mirror_z_width`` - can be smaller than the cell size, so that the mirror would not work. This - parameter is the minimum number of points for the mirror. If - ``mirror_z_width < dz/cell_size``, the upper bound of the mirror is increased + In the boosted frame, depending on `gamma_boost`, ``warpx.mirror_z_width`` + can be smaller than the cell size, so that the mirror would not work. This + parameter is the minimum number of points for the mirror. If + ``mirror_z_width < dz/cell_size``, the upper bound of the mirror is increased so that it contains at least ``mirror_z_npoints``. Numerics and algorithms @@ -448,8 +472,8 @@ Numerics and algorithms * ``warpx.cfl`` (`float`) The ratio between the actual timestep that is used in the simulation - and the CFL limit. (e.g. for `warpx.cfl=1`, the timestep will be - exactly equal to the CFL limit.) + and the Courant-Friedrichs-Lewy (CFL) limit. (e.g. for `warpx.cfl=1`, + the timestep will be exactly equal to the CFL limit.) * ``warpx.use_filter`` (`0 or 1`) Whether to smooth the charge and currents on the mesh, after depositing @@ -510,6 +534,19 @@ Numerics and algorithms Note that the implementation in WarpX is more efficient when these 3 numbers are equal, and when they are between 1 and 3. +* ``warpx.do_dive_cleaning`` (`0` or `1` ; default: 0) + Whether to use modified Maxwell equations that progressively eliminate + the error in :math:`div(E)-\rho`. This can be useful when using a current + deposition algorithm which is not strictly charge-conserving, or when + using mesh refinement. These modified Maxwell equation will cause the error + to propagate (at the speed of light) to the boundaries of the simulation + domain, where it can be absorbed. + +* ``warpx.do_nodal`` (`0` or `1` ; default: 0) + Whether to use a nodal grid (i.e. all fields are defined at the + same points in space) or a staggered grid (i.e. Yee grid ; different + fields are defined at different points in space) + * ``psatd.nox``, ``psatd.noy``, ``pstad.noz`` (`integer`) optional (default `16` for all) The order of accuracy of the spatial derivatives, when using the code compiled with a PSATD solver. @@ -533,6 +570,20 @@ Numerics and algorithms See `this section of the FFTW documentation <http://www.fftw.org/fftw3_doc/Planner-Flags.html>`__ for more information. +Boundary conditions +------------------- + +* ``warpx.do_pml`` (`0` or `1`; default: 1) + Whether to add Perfectly Matched Layers (PML) around the simulation box, + and around the refinement patches. See the section :doc:`../../theory/PML` + for more details. + +* ``warpx.pml_ncells`` (`int`; default: 10) + The depth of the PML, in number of cells. + +* ``warpx.pml_delta`` (`int`; default: 10) + The characteristic depth, in number of cells, over which + the absorption coefficients of the PML increases. Diagnostics and output ---------------------- |