Skip to main content

Initial Condition

The InitialCondition block specifies the solver’s starting flow field.

You must provide one expression per primitive variable for the selected physics model.
For example, for the ideal_gas model the required primitives are P, U, V, W, and T.
For other models, refer to the Physics Models page for the complete list of required primitives.

Structure

InitialCondition
{
P = "<expression>"
T = "<expression>"
U = "<expression>"
V = "<expression>"
W = "<expression>"
}

All primitive-variable expressions are mandatory. The solver will fail to start if any are missing or cannot be evaluated.


Expressions

  • Coordinates: x, y, z give the global Cartesian position of each cell center.
  • Distance field: dist provides a geometric distance field (currently unsigned; its exact definition may change in future versions).
  • Dictionary parameters: Any value defined in the dictionary can be referenced, e.g. Qinf::pinf or M0.
  • Math functions: The full math expression parser is available (basic arithmetic, powers, trigonometric and hyperbolic functions, sqrt, log, exp, etc.).
  • Units: All quantities are in the solver’s global unit system.

Expressions are evaluated at each cell center in the global frame.
If you assign a global velocity such as U=100.0, V=0.0, W=0.0, subdomains that are rotated will see this velocity rotated into their local orientation.


Examples

1. Boundary-layer–type initial condition

InitialCondition
{
P = "Qinf::pinf"
T = "Qinf::Tinf"
U = "Qinf::uinf * tanh(dist/0.02)"
V = "Qinf::vinf * tanh(dist/0.02)"
W = "Qinf::winf * tanh(dist/0.02)"
}

This configuration initializes a flow that is nearly quiescent close to immersed surfaces and smoothly transitions to freestream values over a thin region (here 0.02 solver units).
It is useful when the initial field should approximately satisfy a no-slip or low-speed condition near walls, such as in external aerodynamics with boundary-layer formation. This approach can be a useful robustness measure in high-speed simulations.


2. Uniform freestream

InitialCondition
{
P = "Qinf::pinf"
T = "Qinf::Tinf"
U = "Qinf::uinf"
V = "Qinf::vinf"
W = "Qinf::winf"
}

This initializes a perfectly uniform freestream everywhere, suitable for flows without immersed surfaces or when no near-wall damping is desired.