14.2. Keyword variables

The following keyword variables are defined and should not be used for any other field, i.e. not defined in an Equations class via e.g. define_scalar_field(). You can use these keyword variables as usually with var() or nondim() for the dimensional or nondimensionalized quantity, respectively.

Note that the time-derivative of the mesh variable only gives the mesh velocity if you use it with ALE=False, i.e. partial_t(var("mesh"),ALE=False). Therefore, better use mesh_velocity() instead and e.g. mesh_velocity()[0] for the velocity in x-direction.

Table 14.2 Defined keyword variables to be used with either var() or nondim(). All mentioned time derivatives must be understood with the ALE=False setting.

"time"

Current time

"coordinate"

indepedent coordinate vector. Time derivatives of this variable are zero

"coordinate_x"

indepedent x-coordinate. Time derivatives of this variable are zero

"coordinate_y"

indepedent y-coordinate. Time derivatives of this variable are zero

"coordinate_z"

indepedent z-coordinate. Time derivatives of this variable are zero

"mesh"

mesh coordinate vector, similar to "coordinate", but the time derivative gives the mesh velocity

"mesh_x"

mesh x-coordinate, similar to "coordinate_x", but the time derivative gives the mesh x-velocity

"mesh_y"

mesh y-coordinate, similar to "coordinate_y", but the time derivative gives the mesh y-velocity

"mesh_z"

mesh z-coordinate, similar to "coordinate_z", but the time derivative gives the mesh z-velocity

"lagrangian"

Lagrangian coordinate vector. By default, initialized with the initial Eulerian "coordinate"

"lagrangian_x"

Lagrangian x-coordinate

"lagrangian_y"

Lagrangian y-coordinate

"lagrangian_z"

Lagrangian z-coordinate

"normal"

Normal vector. To be used at elements with co-dimension, i.e. interface elements

"normal_x"

x-component of the normal

"normal_y"

y-component of the normal

"normal_z"

z-component of the normal

"dx"

Can be used like in FEniCS to express weak(a,b) as a*b*var("dx"). It does not respect the functional determinant of the coordinate system, though.

"dX"

Same as "dx", but for Lagrangian integrals

"element_size_Eulerian"

Eulerian integration of the volume/area/length of the current element. Uses the coordinate system of the element, i.e. considers e.g. \(2\pi r\) in axisymmetry

"cartesian_element_size_Eulerian"

Same as above, but does not consider the coordinate system

"element_size_Lagrangian"

Same as "element_size_Eulerian", but by Lagrangian integration

"cartesian_element_size_Lagrangian"

Same as "cartesian_element_size_Eulerian", but by Lagrangian integration

"element_length_h"

Typical length scale of the element, calculated by taking "element_size_Eulerian" to the power of one over the element dimension

"cartesian_element_length_h"

Typical length scale of the element, but calculated in a cartesian coordinate system