FluidInitialCondition#
- class FluidInitialCondition[source]#
Bases:
ExpressionInitialConditionBaseFluidInitialConditionclass for specifying theFluid.initial_condition: the initial state of every equation solved on the fluid.Note
The result of the expressions will be treated as non-dimensional values. Please refer to the Units Introduction for more details.
Example
>>> fl.FluidInitialCondition( ... rho = "(x <= 0) ? (1.0) : (0.125)", ... u = "0", ... v = "0", ... w = "0", ... p = "(x <= 0) ? (1 / 1.4) : (0.1 / 1.4)" ... )
Attributes
- constants: dict[str, str], optional#
Named constants or reusable sub-expressions that the initial condition expressions may reference. Like the expressions themselves, these carry no units and are nondimensional.
- Default:
None
- species_mass_fractions: dict[str, str], optional#
Optional initial mass-fraction expressions of (x, y, z), keyed by species name; an expression is required for every declared species and zero values are legal. Values are projected onto the simplex (clamped non-negative and normalized to sum to one) at each node. When omitted, the initial composition is the uniform reference mixture. Requires a SpeciesTransportSolver and a Gas with two or more species.
- Default:
None