aboutsummaryrefslogtreecommitdiff
path: root/Docs/source/running_cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2020-01-09 18:28:27 -0800
committerGravatar GitHub <noreply@github.com> 2020-01-09 18:28:27 -0800
commitd26142958e65fbaaebda3daba67c6cd9d2d0e74a (patch)
tree2590fadf700a32362be2d24e65890df638d56fc3 /Docs/source/running_cpp
parent0b25b1b68f1b70e965295505d1503a3e57b6c2cc (diff)
parent6ad8dc30d397dbcf5a7a96596901fb7fea0256ac (diff)
downloadWarpX-d26142958e65fbaaebda3daba67c6cd9d2d0e74a.tar.gz
WarpX-d26142958e65fbaaebda3daba67c6cd9d2d0e74a.tar.zst
WarpX-d26142958e65fbaaebda3daba67c6cd9d2d0e74a.zip
Merge pull request #536 from RevathiJambunathan/ParserForEB
Parser for E/B-field initialization on the grid.
Diffstat (limited to 'Docs/source/running_cpp')
-rw-r--r--Docs/source/running_cpp/parameters.rst51
1 files changed, 50 insertions, 1 deletions
diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst
index 08804bb9b..c5d1600d3 100644
--- a/Docs/source/running_cpp/parameters.rst
+++ b/Docs/source/running_cpp/parameters.rst
@@ -637,7 +637,56 @@ Laser initialization
``mirror_z_width < dz/cell_size``, the upper bound of the mirror is increased
so that it contains at least ``mirror_z_npoints``.
-* ``warpx.E_external_grid`` & ``warpx.B_external_grid`` (list of `int`) optional (default `0. 0. 0.`)
+* ``warpx.B_ext_grid_init_style`` (string) optional (default is "default")
+ This parameter determines the type of initialization for the external
+ magnetic field. The "default" style initializes the
+ external magnetic field (Bx,By,Bz) to (0.0, 0.0, 0.0).
+ The string can be set to "constant" if a constant magnetic field is
+ required to be set at initialization. If set to "constant", then an
+ additional parameter, namely, ``warpx.B_external_grid`` must be specified.
+ If set to ``parse_B_ext_grid_function``, then a mathematical expression can
+ be used to initialize the external magnetic field on the grid. It
+ requires additional parameters in the input file, namely,
+ ``warpx.Bx_external_grid_function(x,y,z)``,
+ ``warpx.By_external_grid_function(x,y,z)``,
+ ``warpx.Bz_external_grid_function(x,y,z)`` to initialize the external
+ magnetic field for each of the three components on the grid.
+ Constants required in the expression can be set using ``my_constants``.
+ For example, if ``warpx.Bx_external_grid_function(x,y,z)=Bo*x + delta*(y + z)``
+ then the constants `Bo` and `delta` required in the above equation
+ can be set using ``my_constants.Bo=`` and ``my_constants.delta=`` in the
+ input file. For a two-dimensional simulation, it is assumed that the first dimension is `x` and the second dimension in `z`, and the value of `y` is set to zero.
+ Note that the current implementation of the parser for external B-field
+ does not work with RZ and the code will abort with an error message.
+
+* ``warpx.E_ext_grid_init_style`` (string) optional (default is "default")
+ This parameter determines the type of initialization for the external
+ electric field. The "default" style initializes the
+ external electric field (Ex,Ey,Ez) to (0.0, 0.0, 0.0).
+ The string can be set to "constant" if a constant electric field is
+ required to be set at initialization. If set to "constant", then an
+ additional parameter, namely, ``warpx.E_external_grid`` must be specified
+ in the input file.
+ If set to ``parse_E_ext_grid_function``, then a mathematical expression can
+ be used to initialize the external magnetic field on the grid. It
+ required additional parameters in the input file, namely,
+ ``warpx.Ex_external_grid_function(x,y,z)``,
+ ``warpx.Ey_external_grid_function(x,y,z)``,
+ ``warpx.Ez_externail_grid_function(x,y,z)`` to initialize the external
+ electric field for each of the three components on the grid.
+ Constants required in the expression can be set using ``my_constants``.
+ For example, if ``warpx.Ex_external_grid_function(x,y,z)=Eo*x + delta*(y + z)``
+ then the constants `Bo` and `delta` required in the above equation
+ can be set using ``my_constants.Eo=`` and ``my_constants.delta=`` in the
+ input file. For a two-dimensional simulation, it is assumed that the first
+ dimension is `x` and the second dimension in `z`,
+ and the value of `y` is set to zero.
+ Note that the current implementation of the parser for external E-field
+ does not work with RZ and the code will abort with an error message.
+
+* ``warpx.E_external_grid`` & ``warpx.B_external_grid`` (list of `int`)
+ required when ``warpx.B_ext_grid_init_style="parse_B_ext_grid_function"``
+ and when ``warpx.E_ext_grid_init_style="parse_E_ext_grid_function"``, respectively.
External uniform and constant electrostatic and magnetostatic field added
to the grid at initialization. Use with caution as these fields are used for
the field solver. In particular, do not use any other boundary condition