2. Supported Equation Set

This section provides an overview of the currently supported equation sets. Equations will be described in integral form with assumed Favre averaging. However, the laminar counterparts are supported in the code base and are obtain in the user file by omitting a turbulence model specification.

2.1. Conservation of Mass

The continuity equation is always solved in the variable density form.

ρ¯tdV+ρ¯u~inidS=0

Since Nalu-Wind uses equal-order interpolation (variables are collocated) stabilization is required. The stabilization choice will be developed in the pressure stabilization section.

Note that the use of a low speed compressible formulation requires that the fluid density be computed by an equation of state that uses the thermodynamic pressure. This thermodynamic pressure can either be computed based on a global energy/mass balance or allowed to be spatially varying. By modification of the continuity density time derivative to include the ρp sensitivity, an equation that admits acoustic pressure waves is realized.

2.2. Conservation of Momentum

The integral form of the Favre-filtered momentum equations used for turbulent transport are

(2.1)ρ¯u~itdV+ρ¯u~iu~jnjdS=σ~ijnjdSτijsgsnjdS+(ρ¯ρ)gidV+fidV,

where the subgrid scale turbulent stress τijsgs is defined as

(2.2)τijsgsρ¯(uiuj~u~iu~j).

The term fi is a body force used to represent additional momentum sources such as wind turbine blades, Coriolis effect, driving forces, etc. The Cauchy stress is provided by,

σij=2μS~ijP¯δij

and the traceless rate-of-strain tensor defined as follows:

S~ij=S~ij13δijS~kk=S~ij13u~kxkδij.

In a low Mach flow, as described in the low Mach theory section, the above pressure, P¯ is the perturbation about the thermodynamic pressure, Pth. In a low speed compressible flow, i.e., flows confined to a closed domain with energy or mass addition in which the continuity equation has been modified to accommodate acoustics, this pressure is interpreted at the thermodynamic pressure itself.

For LES, τijsgs that appears in Equation (2.1) and defined in Equation (2.2) represents the subgrid stress tensor that must be closed. The deviatoric part of the subgrid stress tensor is defined as

(2.3)τijsgs=τijsgs13δijτkksgs

where the subgrid turbulent kinetic energy is defined as τkksgs=2ρ¯k. Note that here, k represents the modeled turbulent kinetic energy as is formally defined as,

ρ¯k=12ρ¯(ukuk~u~ku~k).

Model closures can use, Yoshizawa’s approach when k is not transported:

τkksgs=2CIρ¯Δ2|S~|2.

Above, |S~|=2S~ijS~ij.

For low Mach-number flows, a vast majority of the turbulent kinetic energy is contained at resolved scales. For this reason, the subgrid turbulent kinetic energy is not directly treated and, rather, is included in the pressure as an additional normal stress. The Favre-filtered momentum equations then become

(2.4)ρ¯u~itdV+ρ¯u~iu~jnjdS+(P¯+23ρ¯k)nidS=2(μ+μt)(S~ij13S~kkδij)njdS+(ρ¯ρ)gidV,

where LES closure models for the subgrid turbulent eddy viscosity μt are either the constant coefficient Smagorinsky, WALE or the constant coefficient ksgs model (see the turbulence section).

2.2.1. Earth Coriolis Force

For simulation of large-scale atmospheric flows, the following Coriolis force term can be added to the right-hand-side of the momentum equation ((2.1)):

(2.5)fi=2ρ¯ϵijkΩjuk.

Here, Ω is the Earth’s angular velocity vector, and ϵijk is the Levi-Civita symbol denoting the cross product of the Earth’s angular velocity with the local fluid velocity vector. Consider an “East-North-Up” coordinate system on the Earth’s surface, with the domain centered on a latitude angle ϕ (changes in latitude within the computational domain are neglected). In this coordinate system, the integrand of (cor-term), or the Coriolis acceleration vector, is

(2.6)2ρ¯ω[unsinϕuucosϕuesinϕuecosϕ],

where ω||Ω||. Often, in geophysical flows it is assumed that the vertical component of velocity is small and that the vertical component of the acceleration is small relative to gravity, such that the terms containing cosϕ are neglected. However, there is evidence that this so-called traditional approximation is not valid for some mesoscale atmospheric phenomena cite{Gerkema_etal:08}, and so the full Coriolis term is retained in Nalu-Wind. The implementation proceeds by first finding the velocity vector in the East-North-Up coordinate system, then calculating the Coriolis acceleration vector ((2.6)), then transforming this vector back to the model xyz coordinate system. The coordinate transformations are made using user-supplied North and East unit vectors given in the model coordinate system.

2.2.2. Boussinesq Buoyancy Model

In atmospheric and other flows, the density differences in the domain can be small enough as to not significantly affect inertia, but nonetheless the buoyancy term,

(2.7)(ρ¯ρ)gi dV,

may still be important. The Boussinesq model ignores the effect of density on inertia while retaining the buoyancy term in Equation (2.1). For the purpose of evaluating the buoyant force, the density is approximated as

(2.8)ρρ1β(TT),

This leads to a buoyancy body force term that depends on temperature (T), a reference density (ρ), a reference temperature (T), and a thermal expansion coefficient (β) as

(2.9)ρβ(TT)gi dV.

The flow is otherwise kept as constant density.

2.3. Filtered Mixture Fraction

The optional quantity used to identify the chemical state is the mixture fraction, Z. While there are many different definitions of the mixture fraction that have subtle variations that attempt to capture effects like differential diffusion, they can all be interpreted as a local mass fraction of the chemical elements that originated in the fuel stream. The mixture fraction is a conserved scalar that varies between zero in the secondary stream and unity in the primary stream and is transported in laminar flow by the equation,

(2.10)ρZt+ρujZxj=xj(ρDZxj),

where D is an effective molecular mass diffusivity.

Applying either temporal Favre filtering for RANS-based treatments or spatial Favre filtering for LES-based treatments yields

(2.11)ρ¯Z~tdV+ρ¯u~jZ~njdS=τZ,jsgsnjdS+ρ¯DZ~xjnjdS,

where sub-filter correlations have been neglected in the molecular diffusive flux vector and the turbulent diffusive flux vector is defined as

τZ,jsgsρ¯(Zuj~Z~u~j).

This subgrid scale closure is modeled using the gradient diffusion hypothesis,

τZ,jsgs=ρ¯DtZxj,

where Dt is the turbulent mass diffusivity, modeled as ρ¯Dt=μt/Sct where μt is the modeled turbulent viscosity from momentum transport and Sct is the turbulent Schmidt number. The molecular mass diffusivity is then expressed similarly as ρ¯D=μ/Sc so that the final modeled form of the filtered mixture fraction transport equation is

ρ¯Z~t+ρ¯u~jZ~xj=xj[(μSc+μtSct)Z~xj].

In integral form the mixture fraction transport equation is

ρ¯Z~tdV+ρ¯u~jZ~njdS=(μSc+μtSct)Z~xjnjdS.

2.4. Conservation of Energy

The integral form of the Favre-filtered static enthalpy energy equation used for turbulent transport is

(2.12)ρ¯h~tdV+ρ¯h~u~jnjdS=q¯jnjdSτh,jsgsnjdSq¯irxidV+(P¯t+u~jP¯xj)dV+τijuixjdV+SθdV.

The above equation is derived by starting with the total internal energy equation, subtracting the mechanical energy equation and enforcing the variable density continuity equation. Note that the above equation includes possible source terms due to thermal radiatitive transport, viscous dissipation, pressure work, and external driving sources (Sθ).

The simple Fickian diffusion velocity approximation, Equation (2.22), is assumed, so that the mean diffusive heat flux vector q¯j is

q¯j=[κCphxjμPrk=1KhkYkxj]μSck=1KhkYkxj.

If Sc=Pr, i.e., unity Lewis number (Le=1), then the diffusive heat flux vector simplifies to q¯j=μPrh~xj. In the code base, the user has the ability to either specify a laminar Prandtl number, which is a constant, or provide a property evaluator for thermal conductivity. Inclusion of a Prandtl number prevails and ensures that the thermal conductivity is computed base on κ=CpμPr. The viscous dissipation term is closed by

τijuixj=((μ+μt)(u~ixj+u~jxi)23(ρ¯k~+μtu~kxk)δij)u~ixj=[2μS~ij+2μt(S~ij13S~kkδij)23ρ¯k~δij]u~ixj.

The subgrid scale turbulent flux vector τhsgs in Equation (2.12) is defined as

τhujρ¯(huj~h~u~j).

As with species transport, the gradient diffusion hypothesis is used to close this subgrid scale model,

τh,jsgs=μtPrth~xj,

where Prt is the turbulent Prandtl number and μt is the modeled turbulent eddy viscosity from momentum closure. The resulting filtered and modeled turbulent energy equation is given by,

(2.13)ρ¯h~tdV+ρ¯h~u~jnjdS=(μPr+μtPrt)h~xjnjdSq¯irxidV+(P¯t+u~jP¯xj)dV+τijujxjdV.

The turbulent Prandtl number must have the same value as the turbulent Schmidt number for species transport to maintain unity Lewis number.

2.5. Review of Prandtl, Schmidt and Unity Lewis Number

For situations where a single diffusion coefficient is applicable (e.g., a binary gas system) the Lewis number is defined as:

(2.14)Le=ScPr=αD.

If the diffusion rates of energy and mass are equal,

(2.15)Sc=Pr and Le=1.

For completeness, the thermal diffusivity, Prandtl and Schmidt number are defined by,

(2.16)α=κρcp,
(2.17)Pr=cpμκ=μρα,

and

(2.18)Sc=μρD,

where cp is the specific heat, κ, is the thermal conductivity and α is the thermal diffusivity.

2.6. Thermal Heat Conduction

For non-isothermal object response that may occur in conjugate heat transfer applications, a simple single material heat conduction equation is supported.

(2.19)ρCpTtdV+qjnjdS=SdV.

where qj is again the energy flux vector, however, now in the following temperature form:

qj=κTxj.

2.7. ABL Forcing Source Terms

In LES of wind plant atmospheric flows, it is often necessary to drive the flow to a predetermined vertical velocity and/or temperature profile. In Nalu-Wind, this is achieved by adding appropriate source terms fi to the momentum equation (2.1) and Sθ to the enthalpy equation (2.12).

First, the momentum source term is discussed. The main objective of this implementation is to force the volume averaged velocity at a certain location to a specified value (<ui>=Ui). The brackets used here, <>, mean volume averaging over a certain region. In order to achieve this, a source term must be applied to the momentum equation. This source term can be better understood as a proportional controller within the momentum equation.

The velocity and density fields can be decomposed into a volume averaged component and fluctuations about that volume average as ui=ui+ui and ρ¯=ρ¯+ρ¯. A decomposition of the plane averaged momentum at a given instance in time is then

ρ¯ui=ρ¯ui+ρ¯ui.

We now wish to apply a momentum source based on a desired spatial averaged velocity Ui. This can be expressed as:

ρ¯ui=ρ¯ui+ρ¯ui,

where ui is an unknown reference velocity field whose volume average is the desired velocity ui=Ui. Since the correlation ρ¯ui is unknown, we assume that

ρ¯ui=ρ¯ui

such that the momentum source can now be defined as:

(2.20)fi=αu(ρ¯Uiρ¯uiΔt)

where denotes volume averaging at a certain time t, Ui is the desired spatial averaged velocity, and Δt is the time-scale between when the source term is computed (time t) and when it is applied (time t+Δt). This is typically chosen to be the simulation time-step. In the case of an ABL simulation with flat terrain, the volume averaging is done over an infinitesimally thin slice in the x and y directions, such that the body force is only a function of height z and time t. The implementation allows the user to prescribe relaxation factors αu for the source terms that are applied. Nalu-Wind uses a default value of 1.0 for the relaxation factors if no values are defined in the input file during initialization.

The enthalpy source term works similarly to the momentum source term. A temperature difference is computed at every time-step and a forcing term is added to the enthalpy equation:

Sθ=αθCp(θrefθΔt)

where θref is the desired spatial averaged temperature, θ is the spatial averaged temperature, Cp is the heat capacity, αθ is the relaxation factor, and Δt is the time-scale.

The present implementation can vary the source terms as a function of time and space using either a user-defined table of previously computed source terms (e.g., from a precursor simulation or another model such as WRF), or compute the source term as a function of the transient flow solution.

2.8. Conservation of Species

The integral form of the Favre-filtered species equation used for turbulent transport is

(2.21)ρ¯Y~ktdV+ρ¯Y~ku~jnjdS=τYk,jsgsnjdSρYku^j,knjdS+ω˙kdV,

where the form of diffusion velocities (see Equation (2.22)) assumes the Fickian approximation with a constant value of diffusion velocity for consistency with the turbulent form of the energy equation, Equation (2.12). The simplest form is Fickian diffusion with the same value of mass diffusivity for all species,

(2.22)u^j,k=D1YkYkxj.

The subgrid scale turbulent diffusive flux vector τYkjsgs is defined as

τYk,jsgsρ¯(Ykuj~Yk~u~j).

The closure for this model takes on its usual gradient diffusion hypothesis, i.e.,

τYk,jsgs=μtSctY~kxj,

where Sct is the turbulent Schmidt number for all species and μt is the modeled turbulent eddy viscosity from momentum closure.

The Favre-filtered and modeled turbulent species transport equation is,

(2.23)ρ¯Y~ktdV+ρ¯Y~ku~jnjdS=(μSc+μtSct)Y~kxjnjdS+ω˙kdV.

If transporting both energy and species equations, the laminar Prandtl number must be equal to the laminar Schmidt number and the turbulent Prandtl number must be equal to the turbulent Schmidt number to maintain unity Lewis number. Although there is a species conservation equation for each species in a mixture of n species, only n1 species equations need to be solved since the mass fractions sum to unity and

Y~n=1jnnY~j.

Finally, the reaction rate source term is expected to be added based on an operator split approach whereby the set of ODEs are integrated over the full time step. The chemical kinetic source terms can be sub-integrated within a time step using a stiff ODE integrator package.

The following system of ODEs are numerically integrated over a time step Δt for a fixed temperature and pressure starting from the initial values of gas phase mass fraction and density,

Y˙k=ω˙k(Yk)ρ .

The sources for the sub-integration are computed with the composition and density at the new time level which are used to approximate a mean production rate for the time step

ω˙kρYkρYkΔt .

2.9. Subgrid-Scale Kinetic Energy One-Equation LES Model

The subgrid scale kinetic energy one-equation turbulence model, or ksgs model, [Dav97], represents a simple LES closure model. The transport equation for subgrid turbulent kinetic energy is given by

(2.24)ρ¯ksgstdV+ρ¯ksgsu~jnjdS=μtσkksgsxjnjdS+(PksgsDksgs)dV.

The production of subgrid turbulent kinetic energy, Pksgs, is modeled by,

(2.25)Pkρuiuju~ixj,

while the dissipation of turbulent kinetic energy, Dksgs, is given by

Dksgs=ρCϵksgs32Δ,

where the grid filter length, Δ, is given in terms of the grid cell volume by

Δ=V13.

The subgrid turbulent eddy viscosity is then provided by

μt=CμϵΔksgs12,

where the values of Cϵ and Cμϵ are 0.845 and 0.0856, respectively.

For simulations in which a buoyancy source term is desired, the code supports the Rodi form,

Pb=βμTPrgiTxi.

2.10. RANS Model Suite

Although Nalu-Wind is primarily expected to be a LES simulation tool, RANS modeling is supported through the activation of different two-equation RANS models: the Chien kϵ model [Chi82], the Wilcox 1998 kω model [W+98], and the SST model. For the first two models, the reader is referred to the reference papers and the NASA Turbulence Modeling Resource for the Chien and Wilcox models. The SST model is explained in more details below.

2.10.1. Shear Stress Transport (SST) Formulation

It has been observed that standard 1998 kω models display a strong sensitivity to the free stream value of ω (see Menter, [MKL03]). To remedy, this, an alternative set of transport equations have been used that are based on smoothly blending the kω model near a wall with kϵ away from the wall. Because of the relationship between ω and ϵ, the transport equations for turbulent kinetic energy and dissipation can be transformed into equations involving k and ω. Aside from constants, the transport equation for k is unchanged. However, an additional cross-diffusion term is present in the ω equation. Blending is introduced by using smoothing which is a function of the distance from the wall, F(y). The transport equations for the Menter 2003 model are then

ρ¯ktdV+ρ¯ku~jnjdS=(μ+σ^kμt)kxjnj+(Pkωβρ¯kω)dV,
ρ¯ωtdV+ρ¯ωu~jnjdS=(μ+σ^ωμt)ωxjnj+2(1F)ρ¯σω2ωkxjωxjdV+(γ^νtPkωβ^ρ¯ω2)dV.

where the value of β is 0.09.

The model coefficients, σ^k, σ^ω, γ^ and β^ must also be blended, which is represented by

ϕ^=Fϕ1+(1F)ϕ2.

where σk1=0.85, σk2=1.0, σω1=0.5, σω2=0.856, γ1=59, γ2=0.44, β1=0.075 and β2=0.0828. The blending function is given by

F=tanh(arg14),

where

arg1=min(max(kβωy,500μρ¯y2ω),4ρ¯σω2kCDkωy2).

The final parameter is

CDkω=max(2ρ¯σω21ωkxjωxj,1010).

An important component of the SST model is the different expression used for the turbulent viscosity,

μt=a1ρ¯kmax(a1ω,SF2),

where F2 is another blending function given by

F2=tanh(arg22).

The final parameter is

arg2=max(2kβωy,500μρ¯ωy2).

The Menter SST Two-Equation Model with Controlled Decay (SST-SUST) is also supported, [SR07]. Two new constants are added that are incorporated into additional source terms for the transport equations:

+(βρ¯kambωamb)dV,
+(β^ρ¯ωamb2)dV.

where the constants are kamb and ωamb. Typically these are set to kamb=106U2 and ωamb=5UL, where L is a defining length scale for the particular problem, and U is the freestream velocity. The value chosen for these constants should match the values for ω and k at the inflow BC.

2.10.2. SST Mixing Length Limiter

When using SST to model the Atmospheric Boundary Layer with the Coriolis effect, a mixing length limiter should be included. The limiter included here is based on the limiter for the k-epsilon model in [Kob13]. An analogous limiter was derived for the SST model. The SST limiter was presented in [AdFM+21] and will be written up in a future publication.

The mixing length limiter replaces the SST model parameter, γ, in the ω equation with γ. γ is a blend of γ1 and γ2 using the SST blending function, F

γ=Fγ1+(1F)γ2.

γi for i=1,2 is calculated from Cε1,i as

γi=Cε1,i1.

Cε1,i is calculated by applying the mixing length limiter to Cε1,i as

Cε1,i=Cε1,i+(Cε2,iCε1,i)ltle.

Cε1,i is calculated from the SST model constant gamma1 as

Cε1,i=γi+1.

Cε2,i is calculated from the SST model constants βi and β as

Cε1,i=βiβ+1.

The maximum mixing length, le is calculated as

le=.00027G/fc,

where G is the geostrophic (freestream) velocity and fc is the Coriolis force. The Coriolis force is calculated as

fc=2Ωsinλ,

where Ω is the earth’s angular velocity and λ is the latitude.

2.11. Laminar-Turbulent Transition Model Formulation

To account for the effects of the laminar-turbulent boundary layer transition, Menter’s one-equation γ transition model [MSLA15] is coupled with the SST model. The model consists of single transport equation for intermittency

D(ργ)Dt=PγDγ+xj[(μ+μtσγ)γxj]

The production term, Pγ, and destruction term, Dγ, are as:

Pγ=FlengthρSγ(1γ)Fonset,Dγ=Ca2ρΩγFturb(Ce2γ1)

The model constants are:

Flength=100,ce2=50,ca2=0.06,σγ=1.0

The transition onset criteria of the model are defined as:

Fonset1=Rev2.2Reθc,Fonset2=(Fonset1,2.0)
Fonset3=max(1(RT3.5)3,0),Fonset=max(Fonset2Fonset3,0)
Fturb=e(RT2)4,RT=ρkμω,Rev=ρdw2Sμ

The transition onset occurs once the scaled vorticity Reynolds number, Rev/2.2, exceeds the critical momentum thickness Reynolds number, Reθc, from the empirical correlations.

The output intermittency from the transition model is applied to both the production and destruction terms of the turbulent kinetic energy transport equation.

2.12. Detached Eddy Simulation (DES) Formulation

The DES technique is also supported in the code base when the SST model is activated. This model seeks to formally relax the RANS-based approach and allows for a theoretical basis to allow for transient flows. The method follows the method of Temporally Filtered NS formulation as described by Tieszen, [TDB05].

The SST DES model simply changes the turbulent kinetic energy equation to include a new minimum scale that manipulates the dissipation term.

Dk=ρk3/2lDES,

where lDES is the min(lSST,cDESlDES). The constants are given by, lSST=k1/2βω and cDES represents a blended set of DES constants: cDES1=0.78 and cDES2=0.61. The length scale, lDES is the maximum edge length scale touching a given node.

2.13. Active Model Split (AMS) Formulation

The AMS approach is a recently developed hybrid RANS/LES framework by Haering, Oliver and Moser [HOM20]. In this approach a triple decomposition is used, breaking the instantaneous velocity field into an average component <ui>, a resolved fluctuation ui> and an unresolved fluctuation ui<. The subgrid stress is split into two terms, τij=τijSGRS+τijSGET, with τijSGRS modeling the mean subgrid stress, taking on the form of a standard RANS subgrid stress model and τijSGET representing the energy transfer from the resolved to the modeled scales. In addition, a forcing stress Fi is added to the momentum equations to induce the transfer of energy from the modeled to the resolved scales. Thus the AMS approach solves the following momentum equation

(2.26)ρ¯u~itdV+ρ¯u~iu~jnjdS+(P¯+23ρ¯k)nidS=2μ(S~ij13S~kkδij)njdS+(ρ¯ρ)gidV+2μt(<Sij>13<Skk>δij)njdS+(μiktu~j+μjktu~i)nkdS+fidV.

2.13.1. Split subgrid model stress

In a typical Hybrid RANS/LES approach, the observation that the LES and RANS equations take on the same mathematical form is leveraged, relying simply on a modified turbulent viscosity coefficient that takes into account the ability to resolve some turbulent content. Due to deficiencies in this approach as discussed in Haering et al. [HOM20], an alternative approach where the modeled term is split into two contributions, one representing the impact on the mean flow and one the impact on the resolved fluctuations, from the unresolved content, is used in the Active Model Split (AMS) formulation.

Starting by substitution of a triple decomposition of the flow variables, ϕ=ϕ+ϕ>+ϕ<, with representing a mean quantity, ϕ> a resolved fluctuation and ϕ< an unresolved fluctuation and dropping all terms that have an unresolved fluctuation in them (since by definition, these terms cannot be resolved and thus must be modeled) we get the following momentum equation:

uit+ui ujxj=1ρ(Pxi)+ν2uixjxj+τijMxj+Fi

Note that here, ϕ=ϕ+ϕ> represents an instantaneous resolved quantity and Fi is a forcing term discussed in Sec. AMS forcing.

The model term in AMS, τijM is split into two pieces, the first representing the impact of the unresolved scales on the mean flow, referred to as τijSGRS, since this mimics the purpose of RANS models and seeks to model the subgrid Reynolds Stress (SGRS). The second term represents the impact of the unresolved scales on the resolved fluctuations which acts to capture energy transfer from the resolved fluctuations to the unresolved fluctuations, which as Haering et al. points out, is really the primary function of typical LES SGS models. As this term models subgrid energy transfer (SGET), it is referred to as τijSGET.

τijSGRS is modeled using a typical RANS model, but since in the hybrid context, some turbulence is resolved, the magnitude of the stress tensor is reduced through a derived scaling with α=β1.7, β=1kres/ktot, where ktot is the total kinetic energy, taken from the RANS model and kres=0.5ui>ui>, a measure of the average resolved turbulent kinetic energy.

τijSGET is modeled using the M43 SGS model discussed in Haering et al. [HOM19]. This uses an anisotropic representation, τij=νjkkui+νikkuj, of the stress tensor and a tensorial eddy viscosity, νij=C(M)ϵ1/3Mij4/3, with C, a coefficient determined as a function of the eigenvalues of M, a metric tensor measure of the grid and ϵ inferred from the RANS model.

So this produces the final form for the AMS model term,

τijM=τijSGRS+τijSGET=2α(2α)νtRANSSij23βktotδij+C(M)ϵ1/3(Mjk4/3ui>xk+Mik4/3uj>xk).

The AMS model terms are implemented for the edge based scheme in MomentumSSTAMSDiffEdgeKernel. The isotropic component, 2βktotδij/3 is brought into the pressure term.

2.13.2. Averaging functions

The averaging algorithms are invoked as part of the AMSAlgDriver and are called from the pre_iter_work function so that they are executed at the beginning of each Picard iteration. The AMSAlgDriver is invoked last, so to ensure that this is also done initially, so that the initial step has correct average quantities, the averaging functions are also called in the initial_work function.

The main averaging algorithm is SSTAMSAveragesAlg. The averaging function is solving a simple causal average equation for the intermediate (or final) quantity:

ϕt=1TRANS(ϕϕn)

Here refers to a mean (time-averaged) quantity and TRANS is the timescale of the turbulence determined by the underlying RANS scalars (1/(βω) in SST). ()n refers to a previous timestep quantity and () refers to an intermediate quantity. Note that currently the time scale is stored in a nodal field.

We can discretize the causal average equation explicitly to produce the implemented form:

ϕ=ϕn+ΔtTRANS(ϕϕn)ϕ=ΔtTRANSϕ+(1ΔtTRANS)ϕn

The averaging is carried out for velocities (ui), velocity gradients (ui/xj), pressure (P), density (ρ), resolved turbulent kinetic energy (kres=0.5ui>ui>) and the kinetic energy production (Pk=Sij(τijSGRSui>uj>)). Note that > is used to denote a resolved fluctuation, i.e. ϕ>=ϕϕ.

2.13.3. Dynamic Hybrid Diagnostics

Typically in a hybrid model, it is necessary to have diagnostics that assess the ability of the grid to resolve turbulent content and to aid in its introduction. In AMS, there are two main diagnostic quantities, α=β1.7=(1kres/ktot)1.7 and a resolution adequacy parameter, rk, which is used to evaluate where in the flow the grid and the amount of resolved turbulent content is inconsistent.

β is a straight-forward calculation. Limiters are applied to β to realize the RANS and DNS limits. In the RANS limit, kres=0 and thus β=1, so β is limited from evaluation above 1. In the DNS limit, ideally, the ratio of the approximate Kolmogorov velocity scale to total TKE would be used as a lower bound,

β=max(1kresktot,(νϵ)1/2ktot),

but that has shown some performance issues near the wall when using SST with AMS. Currently an adhoc lower bound of β=0.01 is used instead. The resolution adequacy parameter is based on the ratio between the anisotropic grid metric tensor, M=JTJ, where J is the mapping from a unit cube to the cell, and the length scale associated with the model production. It takes the form,

rk=(32v2)3/2maxλ(PikSGSMkj).

For the RANS models used in Nalu-Wind, v25νRANS/TRANS. PijSGS=12(τikuk/xj+τjkuk/xi) is the full subgrid production tensor, with τij=τijSGRS+τijSGET+23αktotδij.

2.13.4. Forcing Term

When the grid is capable of resolving some turbulent content, the model will want to reduce the modeled stress and allow for resolved turbulence to contribute the remaining piece of the total stress. As discussed in Haering et al. [HOM20] and the observation of “modeled-stress depletion” in other hybrid approaches, such as DES, a mechanism for inducing resolved turbulent fluctuations at proper energy levels and timescales to match your reduction of the modeled stress is needed. AMS resolves this issue through the use of an active forcing term, designed to introduce turbulent fluctuations into regions of the grid where turbulent content can be supported. The implications of the specific form and method of introduction for this forcing term is still an area of ongoing research, but for now, empirical testing has shown great success with a simple turbulent structure based off of Taylor-Green vortices.

The forcing term Fi is determined by first specifying an auxiliary field based off of a Taylor-Green vortex:

h1=13cos(axx1)sin(ayx2)sin(azx3),h2=sin(axx1)cos(ayx2)sin(azx3),h3=23sin(axx1)sin(ayx2)cos(azx3),

with x=x+ut and ai=π/Pi. P is determined as follows,

l=4(1max(β,0.8))0.4(βk)3/2ϵl=min(max(l,70ν3/4ϵ1/4),d)li=min(l,Lpi)fi=nint(Lpili)Pi=Lpifi,

where Lpi is related to the periodic domain size and is user specified. With the initial TG vortex field, hi, determined, we now determine a scaling factor (η) for the forcing.

Tβ=max(βk/ϵ,6ν/ϵ)Ftar=8αv2/TβPr=ΔtFtar(hiui>)βK=min(νϵ/k,1)β^={1β1βKβK<110000elseCf=1tanh(11min(rk,1))Cf=Cf(1.0min(tanh(10(β^1))+1,1))η={FtarCfrk<1, Pr00else

Now the final forcing field, Fi=ηhi. Since this is being added as a source term to the momentum solve, we are not projecting onto a divergence free field and are instead allowing that to pass into the continuity solve, where the intermediate velocity field with the forcing will then be projected onto a divergence free field. This is implemented in the node kernels as MomentumSSTAMSForcingNodeKernel.

2.13.5. AMS with SST Mixing Length Limiter

When using AMS with SST as the mean (RANS) contribution to model the Atmospheric Boundary Layer with the Coriolis effect, SST should include a mixing length limiter. The mixing length limiter is described in SST Mixing Length Limiter. For consistency, when using the limiter the RANS time scale, TRANS, should depend on the mixing length rather than ω to account for the effect of the limiter. The time scale becomes

TRANS=ltk.

2.14. Solid Stress

A fully implicit CVFEM (only) linear elastic equation is supported in the code base. This equation is either used for true solid stress prediction or for smoothing the mesh due to boundary mesh motion (either through fluid structure interaction (FSI) or prescribed mesh motion).

Consider the displacement for component i, ui equation set,

(2.27)ρ2uit2σijxj=Fi,

where the Cauchy stress tensor, σij assuming Hooke’s law is given by,

(2.28)σij=μ(uixj+ujxi)+λukxkδij.

Above, the so-called Lame coefficients, Lame’s first parameter, λ (also known as the Lame modulus) and Lame’s second parameter, μ (also known as the shear modulus) are provided as functions of the Young’s modulus, E, and Poisson’s ratio, ν; here shown in the context of a isotropic elastic material,

(2.29)μ=E2(1+ν),

and

(2.30)λ=Eν(1+ν)(12ν).

Note that the above notation of ui to represent displacement is with respect to the classic definition of current and model coordinates,

(2.31)xi=Xi+ui

where xi is the position, relative to the fixed, or previous position, Xi.

The above equations are solved for mesh displacements, ui. The supplemental relationship for solid velocity, vi is given by,

(2.32)vi=uit.

Numerically, the velocity might be obtained by a backward Euler or BDF2 scheme,

(2.33)vi=γ1uin+1+γ2uin+γ3uin1Δt

2.15. Moving Mesh

The code base supports three notions of moving mesh: 1) linear elastic equation system that computes the stress of a solid 2) solid body rotation mesh motion and 3) mesh deformation via an external source.

The linear elastic equation system is activated via the standard equation system approach. Properties for the solid are specified in the material block. Mesh motion is prescribed by the input file via the mesh_motion block. Here, it is assumed that the mesh motion is solid rotation. For fluid/structure interaction (FSI) a mesh smoothing scheme is used to propagate the surface mesh displacement obtained by the solids solve. Simple mesh smoothing is obtained via a linear elastic solve in which the so-called Lame constants are proportional to the inverse of the dual volume. This allows for boundary layer mesh locations to be stiff while free stream mesh elements to be soft.

Additional mesh motion terms are required for the Eulerian fluid mechanics solve. Using the geometric conservative law the time and advection source term for a general scalar ϕ can be written as:

(2.34)ρϕtdV+ρϕ(ujvj)njdS+ρϕvkxjdV,

where uj is the fluid velocity and vj is the mesh velocity. Mesh velocities and the mesh velocity spatial derivatives are provided by the mesh smoothing solve. Activating the external mesh deformation or mesh motion block will result in the velocity relative to mesh calculation in the advection terms. The line command for source term, “gcl” must be activated for each equation for the volume integral to be included in the set of PDE solves. Finally, transfers are expected between the physics. For example, the solids solve is to provide mesh displacements to the mesh smoothing realm. The mesh smoothing procedure provides the boundary velocity, mesh velocity and projected nodal gradients of the mesh velocity to the fluids realm. Finally, the fluids solve is to provide the surface force at the desired solids surface. Currently, the pressure is transferred from the fluids realm to the solids realm. The ideal view of FSI is to solve the solids pde at the half time step. As such, in time, the Pn+12 is expected. The fsi_interface input line command attribute is expected to be set at these unique surfaces. More advanced FSI coupling techniques are under development by a current academic partner.

2.16. Radiative Transport Equation

The spatial variation of the radiative intensity corresponding to a given direction and at a given wavelength within a radiatively participating material, I(s), is governed by the Boltzmann transport equation. In general, the Boltzmann equation represents a balance between absorption, emission, out-scattering, and in-scattering of radiation at a point. For combustion applications, however, the steady form of the Boltzmann equation is appropriate since the transient term only becomes important on nanosecond time scales which is orders of magnitude shorter than the fastest chemical.

Experimental data shows that the radiative properties for heavily sooting, fuel-rich hydrocarbon diffusion flames (104% to 106% soot by volume) are dominated by the soot phase and to a lesser extent by the gas phase. Since soot emits and absorbs radiation in a relatively constant spectrum, it is common to ignore wavelength effects when modeling radiative transport in these environments. Additionally, scattering from soot particles commonly generated by hydrocarbon flames is several orders of magnitude smaller that the absorption effect and may be neglected. Moreover, the phase function is rarely known. However, for situations in which the phase function can be approximated by the iso-tropic scattering assumption, i.e., an intensity for direction k has equal probability to be scattered in any direction l, the appropriate form of the Botzmann radiative transport is

(2.35)sixiI(s)+(μa+μs)I(s)=μaσT4π+μs4πG,

where μa is the absorption coeffiecient, μs is the scattering coefficient, I(s) is the intensity along the direction si, T is the temperature and the scalar flux is G. The black body radiation, Ib, is defined by σT4π. Note that for situations in which the scattering coefficient is zero, the RTE reduces to a set of linear, decoupled equations for each intensity to be solved.

The flux divergence may be written as a difference between the radiative emission and mean incident radiation at a point,

(2.36)qirxi=μa[4σT4G],

where G is again the scalar flux. The flux divergence term is the same regardless of whether or not scattering is active. The quantity, G/4π, is often referred to as the mean incident intensity. Note that when the scattering coefficient is non-zero, the RTE is coupled over all intensity directions by the scalar flux relationship.

The scalar flux and radiative flux vector represent angular moments of the directional radiative intensity at a point,

G=02π0πI(s)sinθzndθzndθaz,
qir=02π0πI(s)sisinθzndθzndθaz,

where θzn and θaz are the zenith and azimuthal angles respectively as shown in Figure 2.1.

Ordinate Direction Definition

2.1 Ordinate Direction Definition, s=sinθznsinθazi+cosθznj+sinθzncosθazk.

The radiation intensity must be defined at all portions of the boundary along which sini<0, where ni is the outward directed unit normal vector at the surface. The intensity is applied as a weak flux boundary condition which is determined from the surface properties and temperature. The diffuse surface assumption provides reasonable accuracy for many engineering combustion applications. The intensity leaving a diffuse surface in all directions is given by

(2.37)I(s)=1π[τσT4+ϵσTw4+(1ϵτ)K],

where ϵ is the total normal emissivity of the surface, τ is the transmissivity of the surface, Tw is the temperature of the boundary, T is the environmental temperature and H is the incident radiation, or irradiation (incoming radiative flux). Recall that the relationship given by Kirchoff’s Law that relates emissivity, transmissivity and reflectivity, ρ, is

ρ+τ+ϵ=1.

where it is implied that α=ϵ.

2.17. Wall Distance Computation

RANS and DES simulations using kω SST or SST-DES equations requires the specification of a wall distance for computing various turbulence parameters. For static mesh simulations this field can be generated using a pre-processing step and provided as an input in the mesh database. However, for moving mesh simulations, e.g., blade resolved wind turbine simulations, this field must be computed throughout the course of the simulation. Nalu-Wind implements a Poisson equation ([G03]) to determine the wall distance d using the gradients of a field ϕ.

2ϕ=1d=±j=1,3(ϕxj)2+j=1,3(ϕxj)2+2ϕ