Turbulence models¶
Turbulence is configured with model-specific Python objects. Each object exposes only controls meaningful to that model, so invalid combinations are rejected before a job is submitted.
Enumerations¶
- class gradientdynamics.fluxcore.TurbulenceModel¶
Supported turbulence-model families.
- LAMINAR = laminar¶
- K_OMEGA_SST = k_omega_sst¶
- SPALART_ALLMARAS = spalart_allmaras¶
- class gradientdynamics.fluxcore.WallTreatment¶
Near-wall modelling policy.
- LOW_RE = low_re¶
Resolve the viscous sublayer. Use a mesh with appropriate first-cell height.
- WALL_FUNCTION = wall_function¶
Apply a wall-modelled treatment for meshes designed around wall functions.
- AUTOMATIC = automatic¶
Select a compatible treatment from mesh resolution and boundary metadata.
RANS models¶
- class gradientdynamics.fluxcore.KOmegaSST(*, wall_treatment: WallTreatment | str = 'low_re', inlet_intensity: float = 0.01, inlet_viscosity_ratio: float = 10.0, production_limiter: float | None = None, turbulent_prandtl: float = 0.85, minimum_tke: float | None = None, minimum_specific_dissipation: float | None = None, scale_resolving: DES | DDES | None = None)¶
Two-equation shear-stress-transport turbulence model.
- inlet_intensity: float¶
Freestream turbulence intensity as a fraction.
- inlet_viscosity_ratio: float¶
Freestream turbulent-to-molecular viscosity ratio.
- production_limiter: float | None¶
Optional upper limiter for turbulent production. Omit for the validated model default.
- class gradientdynamics.fluxcore.SpalartAllmaras(*, wall_treatment: WallTreatment | str = 'low_re', inlet_modified_viscosity_ratio: float = 3.0, formulation: str = 'standard', minimum_working_variable: float | None = None, production_limiter: float | None = None, scale_resolving: DES | DDES | None = None)¶
One-equation turbulence model with optional detached-eddy behaviour.
- inlet_modified_viscosity_ratio: float¶
Freestream modified turbulent-viscosity ratio.
- formulation: Literal['standard', 'negative']¶
Working-variable formulation. The negative variant permits controlled negative values during difficult startup transients.
Scale-resolving modes¶
- class gradientdynamics.fluxcore.DES(*, constant: float | None = None, length_scale: str = 'cell_volume', low_dissipation: bool = True, limiter_relaxation: float = 1.0)¶
Detached Eddy Simulation configuration for supported turbulence models.
- constant: float | None¶
Optional model constant override. Omit to use the validated constant for the selected turbulence family.
- length_scale: Literal['cell_volume', 'maximum_edge']¶
Grid length used by the scale-resolving model.
- low_dissipation: bool¶
Use the time-resolved spatial policy intended to preserve resolved turbulent structures.
- class gradientdynamics.fluxcore.DDES(*, constants: Mapping[str, float] | None = None, length_scale: str = 'cell_volume', shielding: str = 'automatic', shielding_strength: float = 1.0, low_dissipation: bool = True, limiter_relaxation: float = 1.0)¶
Delayed Detached Eddy Simulation configuration with near-wall shielding.
- constants: Mapping[str, float] | None¶
Optional model-family constants. Unspecified entries use validated defaults.
- shielding: Literal['automatic', 'standard', 'strong']¶
Near-wall shielding policy used to protect attached boundary layers from premature grid-induced mode switching.
- shielding_strength: float¶
Multiplier applied to the selected shielding policy.
Important
DES and DDES require PhysicalTimeControls. FluxCore rejects these
modes for a steady RANS configuration because the resolved turbulent content
must evolve in physical time.
DDES example¶
from gradientdynamics.fluxcore import DDES, KOmegaSST, WallTreatment
turbulence = KOmegaSST(
wall_treatment=WallTreatment.LOW_RE,
inlet_intensity=0.005,
inlet_viscosity_ratio=5.0,
scale_resolving=DDES(
length_scale="cell_volume",
shielding="automatic",
low_dissipation=True,
),
)