kEpsilonTKESourceSink

kEpsilonTKESourceSink is a finite volume elemental kernel that computes the turbulent source and sink term for the turbulent kinetic energy equation in the k– family of models.

commentnote

The explanations in this kernel documentation are a summary. The reader is referred to the theory for more details if needed.

The turbulent kinetic energy (TKE) equation is written in conservative form as

where:

  • is the turbulent kinetic energy,

  • is the mean velocity,

  • is the shear production,

  • is the buoyancy production,

  • is the production due to nonlinear Reynolds stresses,

  • is a compressibility correction, and

  • is the dissipation rate supplied by the -equation.

kEpsilonTKESourceSink forms the right-hand side source term for the k-equation by computing the combination

with expressions that depend on the chosen k– variant and options.

The kernel is designed to be used together with:

  • kEpsilonTKEDSourceSink for the -equation, and

  • kEpsilonViscosity for the turbulent viscosity .

Model variants

The kernel supports several members of the k– family via the "k_epsilon_variant" parameter:

  • Standard — classical high-Reynolds-number k– model.

  • StandardLowRe — low-Reynolds-number k– model with damping functions.

  • StandardTwoLayer — two-layer k– formulation using a blending between outer k– and near-wall length scales.

  • Realizable — realizable k– model with variable depending on strain/rotation invariants.

  • RealizableTwoLayer — realizable model with a two-layer near-wall treatment.

The choice of variant affects:

  • how the shear production is formed,

  • whether a curvature correction factor is applied,

  • how near-wall behavior is modeled (two-layer vs. high-Re),

  • whether low-Re damping functions and extra terms are used (via -equation).

Bulk formulation

In bulk cells (not explicitly treated as near-wall by this kernel), the source term is computed as

The individual contributions are detailed below.

Strain-rate tensor and invariants

The mean velocity gradient is used to form the symmetric strain-rate tensor and the antisymmetric rotation tensor :

The invariants are defined as:

  • ,

  • ,

  • .

These invariants are shared by the turbulence viscosity, nonlinear models, and curvature correction.

Shear production

The base formulation of the shear production is

where

  • is the turbulent viscosity provided as a functor, and

  • .

For compressible flows, the implementation allows inclusion of the extra trace terms

consistent with the constitutive relation for the Reynolds stress tensor in compressible flow.

The shear production is then modified depending on the k– variant and curvature correction model (see below).

Curvature / rotation correction

For realizable variants, an optional curvature correction factor may be applied via "curvature_model". The current implementation supports:

  • curvature_model = none — no curvature correction, ;

  • curvature_model = standard — Spalart–Shur–type rotation/curvature correction based on and .

The curvature correction builds a correction that enhances production in stabilizing curvature and reduces it in destabilizing regions. The corrected shear production is

  • Standard, StandardLowRe, StandardTwoLayer:

  • Realizable, RealizableTwoLayer:

Buoyancy production

If "use_buoyancy" is true, buoyancy production is added via

where

  • is the thermal expansion coefficient,

  • is the turbulent Prandtl number,

  • is the temperature,

  • is the gravitational acceleration.

The gradient and gravity vector are supplied as functors / parameters. Buoyancy can either augment or reduce total production depending on the sign of the dot product .

nonlinear production

kEpsilonTKESourceSink supports optional nonlinear constitutive relations for the Reynolds stress tensor. The choice is controlled by "nonlinear_model":

  • nonlinear_model = none — no nonlinear production, ;

  • nonlinear_model = quadratic — quadratic constitutive relation;

  • nonlinear_model = cubic — quadratic + cubic terms.

The nonlinear Reynolds stress contribution is computed in TurbulenceMethods as

where depends on:

  • the velocity gradient (through and ),

  • the invariants , ,

  • , , ,

  • fixed model coefficients and a variable .

In all k– variants, kEpsilonTKESourceSink adds to the k-equation’s production:

Compressibility correction

If "use_compressibility" is true, a compressibility correction is added to the sink term:

where is a model coefficient and is the speed of sound. This term is computed by NS::computeGammaM and is subtracted from total production, representing the transfer of TKE into acoustic modes in compressible flow.

Production limiter

To avoid excessive TKE generation in stagnation regions, a production limiter is applied:

The limiter coefficient is available as "C_pl". This limiter follows the standard approach from Menter (1994) and is applied in the bulk region.

Summary of bulk source

In non-wall-bounded cells, the kernel assembles the following source term for the residual:

Wall formulation

Cells adjacent to boundaries listed in "walls" are treated as next-to-wall cells with a different expression for production and destruction, similar in spirit to LinearFVTKESourceSink. Wall distances are typically computed using WallDistanceAux, which returns the distance from each cell centroid to the nearest wall.

The near-wall treatment is implemented in the matrix contribution for this kernel, where a distinction is made between the viscous sublayer and the logarithmic region based on the non-dimensional wall distance

with

  • the distance from the cell center to the wall,

  • the friction velocity obtained from a wall-function model,

  • the molecular viscosity.

The same wall-function options as used for the turbulent viscosity are available via "wall_treatment" (e.g. eq_newton, eq_incremental, eq_linearized, neq).

Viscous sublayer ()

For cells in the viscous sublayer (sub-laminar region), turbulent production is negligible and the model sets

Destruction is modeled using a near-wall expression of the form

which enforces rapid dissipation very close to the wall.

Logarithmic region ()

For cells in the log layer, production and destruction take the classical wall-function forms:

  • Production:

    where

    • is the wall shear stress,

    • is the effective wall viscosity (including turbulent contributions),

    • is the wall-normal velocity gradient norm,

    • is the k– closure coefficient,

    • is the von Kármán constant.

  • Destruction:

In the logarithmic region, production and destruction are balanced in such a way that the near-wall TKE profile is consistent with the log-law of the wall.

commentnote

When the near-wall treatment is handled by this kernel, the wall boundary condition for is effectively provided by the model and explicit Dirichlet boundary conditions for on those walls are typically unnecessary.

Interaction with -equation and viscosity

kEpsilonTKESourceSink only forms the k-equation source terms. For a complete k– model, this kernel must be used together with:

  • kEpsilonTKEDSourceSink, which provides the -equation sources,

including:

  1. realizable production terms,

  2. nonlinear contributions,

  3. ow-Re extra production ,

  4. Yap correction,

  5. buoyancy source for ;

  • kEpsilonViscosity, which computes the turbulent viscosity from the current and , including:

  1. low-Re damping for SKE-LRe,

  2. two-layer viscosity blending,

  3. realizable variable ,

  4. bulk wall treatment for (if requested).

The three objects together implement the full k– turbulence model family.

Input Parameters

  • epsilonCoupled turbulent kinetic energy dissipation rate. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Coupled turbulent kinetic energy dissipation rate. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • muDynamic viscosity. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Dynamic viscosity. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • mu_tTurbulent viscosity. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Turbulent viscosity. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • rhoFluid density. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Fluid density. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • uThe velocity in the x direction. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:The velocity in the x direction. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • variableThe name of the variable whose linear system this object contributes to

    C++ Type:LinearVariableName

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of the variable whose linear system this object contributes to

Required Parameters

  • C_M1Coefficient used in the compressibility correction gamma_M.

    Default:1

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Coefficient used in the compressibility correction gamma_M.

  • C_mu0.09Turbulent kinetic energy closure constant C_mu.

    Default:0.09

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Turbulent kinetic energy closure constant C_mu.

  • C_pl10Production limiter multiplier C_pl.

    Default:10

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Production limiter multiplier C_pl.

  • Pr_t0.9Turbulent Prandtl number used in the buoyancy production term.

    Default:0.9

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Turbulent Prandtl number used in the buoyancy production term.

  • betaThermal expansion coefficient functor used for buoyancy production (beta(T)). A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Thermal expansion coefficient functor used for buoyancy production (beta(T)). A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • blockThe list of blocks (ids or names) that this object will be applied

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:The list of blocks (ids or names) that this object will be applied

  • curvature_modelnoneCurvature / rotation correction model: 'none' (default) or 'standard' (Spalart–Shur style).

    Default:none

    C++ Type:MooseEnum

    Options:none, standard

    Controllable:No

    Description:Curvature / rotation correction model: 'none' (default) or 'standard' (Spalart–Shur style).

  • gravity0 0 0Gravity vector used for buoyancy production.

    Default:0 0 0

    C++ Type:libMesh::VectorValue<double>

    Unit:(no unit assumed)

    Controllable:No

    Description:Gravity vector used for buoyancy production.

  • k_epsilon_variantStandardk-epsilon model variant used for the bulk production term.

    Default:Standard

    C++ Type:MooseEnum

    Options:Standard, StandardLowRe, StandardTwoLayer, Realizable, RealizableTwoLayer

    Controllable:No

    Description:k-epsilon model variant used for the bulk production term.

  • nonlinear_modelnoneNon-linear constitutive relation for standard k-epsilon.

    Default:none

    C++ Type:MooseEnum

    Options:none, quadratic, cubic

    Controllable:No

    Description:Non-linear constitutive relation for standard k-epsilon.

  • speed_of_soundSpeed of sound functor used for compressibility correction gamma_M. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Speed of sound functor used for compressibility correction gamma_M. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • temperatureTemperature functor used for buoyancy production. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:Temperature functor used for buoyancy production. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • use_buoyancyFalseInclude buoyancy production Gb in the bulk k-equation.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Include buoyancy production Gb in the bulk k-equation.

  • use_compressibilityFalseInclude compressibility correction gamma_M in the bulk k-equation.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Include compressibility correction gamma_M in the bulk k-equation.

  • use_curvature_correctionFalseApply a curvature correction factor f_c to the shear production.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Apply a curvature correction factor f_c to the shear production.

  • vThe velocity in the y direction. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:The velocity in the y direction. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • wThe velocity in the z direction. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

    C++ Type:MooseFunctorName

    Unit:(no unit assumed)

    Controllable:No

    Description:The velocity in the z direction. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.

  • wall_treatmentneqMethod used for wall functions.

    Default:neq

    C++ Type:MooseEnum

    Options:eq_newton, eq_incremental, eq_linearized, neq

    Controllable:No

    Description:Method used for wall functions.

  • wallsBoundaries that correspond to solid walls.

    C++ Type:std::vector<BoundaryName>

    Controllable:No

    Description:Boundaries that correspond to solid walls.

Optional Parameters

  • absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution

  • extra_matrix_tagsThe extra tags for the matrices this Kernel should fill

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The extra tags for the matrices this Kernel should fill

  • extra_vector_tagsThe extra tags for the vectors this Kernel should fill

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The extra tags for the vectors this Kernel should fill

  • matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether this object is only doing assembly to matrices (no vectors)

  • matrix_tagssystemThe tag for the matrices this Kernel should fill

    Default:system

    C++ Type:MultiMooseEnum

    Options:nontime, system

    Controllable:No

    Description:The tag for the matrices this Kernel should fill

  • vector_tagsrhsThe tag for the vectors this Kernel should fill

    Default:rhs

    C++ Type:MultiMooseEnum

    Options:rhs, time

    Controllable:No

    Description:The tag for the vectors this Kernel should fill

Contribution To Tagged Field Data Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • implicitTrueDetermines whether this object is calculated using an implicit or explicit form

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Determines whether this object is calculated using an implicit or explicit form

  • seed0The seed for the master random number generator

    Default:0

    C++ Type:unsigned int

    Controllable:No

    Description:The seed for the master random number generator

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

  • ghost_layers1The number of layers of elements to ghost.

    Default:1

    C++ Type:unsigned short

    Controllable:No

    Description:The number of layers of elements to ghost.

  • use_point_neighborsFalseWhether to use point neighbors, which introduces additional ghosting to that used for simple face neighbors.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether to use point neighbors, which introduces additional ghosting to that used for simple face neighbors.

Parallel Ghosting Parameters

Input Files

References

  1. Florian R Menter. Two-equation eddy-viscosity turbulence models for engineering applications. AIAA journal, 32(8):1598–1605, 1994.[BibTeX]