@@ -103,20 +103,17 @@ distribution or the laser field (see below `Particle initialization` and
103103
104104The parser reads python-style expressions between double quotes, for instance
105105``"a0*x**2 * (1-y*1.e2) * (x>0)" `` is a valid expression where ``a0 `` is a
106- user-defined constant and ``x `` and ``y `` are variables. The factor
106+ user-defined constant and ``x `` and ``y `` are variables. The names are case sensitive. The factor
107107``(x>0) `` is `1 ` where `x>0 ` and `0 ` where `x<=0 `. It allows the user to
108108define functions by intervals. User-defined constants can be used in parsed
109- functions only (i.e., ``density_function(x,y,z) `` and ``field_function(x,y,t) ``,
110- see below). They are specified with:
109+ functions only (i.e., ``density_function(x,y,z) `` and ``field_function(X,Y,t) ``,
110+ see below). User-defined constants can contain only letter, numbers and character _.
111+ The name of each constant has to begin with a letter. The following names are used
112+ by WarpX, and cannot be used as user-defined constants: `x `, `y `, `z `, `X `, `Y `, `t `.
113+ For example, parameters ``a0 `` and ``z_plateau `` can be specified with:
111114
112- * ``constants.use_my_constants `` (`bool `)
113- Whether to use user-defined constants.
114-
115- * ``constants.constant_names `` (`strings, separated by spaces `)
116- A list of variables the user wants to define, e.g., ``constants.constant_names = a0 n0 ``.
117-
118- * ``constants.constant_values `` (`floats, sepatated by spaces `)
119- Values for the user-defined constants., e.g., ``constants.constant_values = 3. 1.e24 ``.
115+ * ``my_constants.a0 = 3.0 ``
116+ * ``my_constants.z_plateau = 150.e-6 ``
120117
121118Particle initialization
122119-----------------------
@@ -164,8 +161,7 @@ Particle initialization
164161 It requires additional argument ``<species_name>.density_function(x,y,z) ``, which is a
165162 mathematical expression for the density of the species, e.g.
166163 ``electrons.density_function(x,y,z) = "n0+n0*x**2*1.e12" `` where ``n0 `` is a
167- user-defined constant, see above. Note that using this density profile will turn
168- ``warpx.serialize_ics `` to ``1 ``, which may slow down the simulation.
164+ user-defined constant, see above.
169165
170166* ``<species_name>.momentum_distribution_type `` (`string `)
171167 Distribution of the normalized momentum (`u=p/mc `) for this species. The options are:
@@ -187,8 +183,6 @@ Particle initialization
187183 file. It requires additional arguments ``<species_name>.momentum_function_ux(x,y,z) ``,
188184 ``<species_name>.momentum_function_uy(x,y,z) `` and ``<species_name>.momentum_function_uz(x,y,z) ``,
189185 which gives the distribution of each component of the momentum as a function of space.
190- Note that using this momentum distribution type will turn
191- ``warpx.serialize_ics `` to ``1 ``, which may slow down the simulation.
192186
193187* ``<species_name>.zinject_plane `` (`float `)
194188 Only read if ``<species_name> `` is in ``particles.rigid_injected_species ``.
0 commit comments