TurbulenceClosures
ClimateMachine.TurbulenceClosures
— ModuleTurbulenceClosures
Functions for turbulence, sub-grid scale modelling. These include viscosity terms, diffusivity and stress tensors.
Turbulence Closure Model Constructors
ClimateMachine.TurbulenceClosures.TurbulenceClosureModel
— TypeAbstract type with default do-nothing behaviour for
arbitrary turbulence closure models.
ClimateMachine.TurbulenceClosures.WithDivergence
— TypeWithDivergence
A divergence type which includes the divergence term in the momentum flux tensor
ClimateMachine.TurbulenceClosures.WithoutDivergence
— TypeWithoutDivergence
A divergence type which does not include the divergence term in the momentum flux tensor
ClimateMachine.TurbulenceClosures.ConstantViscosity
— TypeConstantViscosity <: TurbulenceClosureModel
Abstract type for constant viscosity models
ClimateMachine.TurbulenceClosures.ConstantDynamicViscosity
— TypeConstantDynamicViscosity <: ConstantViscosity
Turbulence with constant dynamic viscosity (ρν
). Divergence terms are included in the momentum flux tensor if divergence_type is WithDivergence.
Fields
ρν
Dynamic Viscosity [kg/m/s]
divergence_type
ClimateMachine.TurbulenceClosures.ConstantKinematicViscosity
— TypeConstantKinematicViscosity <: ConstantViscosity
Turbulence with constant kinematic viscosity (ν
). Divergence terms are included in the momentum flux tensor if divergence_type is WithDivergence.
Fields
ν
Kinematic Viscosity [m2/s]
divergence_type
ClimateMachine.TurbulenceClosures.SmagorinskyLilly
— TypeSmagorinskyLilly <: TurbulenceClosureModel
Fields
C_smag
Smagorinsky Coefficient [dimensionless]
Smagorinsky Model Reference
article{doi:10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2,
author = {Smagorinksy, J.},
title = {General circulation experiments with the primitive equations},
journal = {Monthly Weather Review},
volume = {91},
number = {3},
pages = {99-164},
year = {1963},
doi = {10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2},
URL = {https://doi.org/10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2},
eprint = {https://doi.org/10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2}
}
Lilly Model Reference
article{doi:10.1111/j.2153-3490.1962.tb00128.x,
author = {LILLY, D. K.},
title = {On the numerical simulation of buoyant convection},
journal = {Tellus},
volume = {14},
number = {2},
pages = {148-172},
doi = {10.1111/j.2153-3490.1962.tb00128.x},
url = {https://onlinelibrary.wiley.com/doi/abs/10.1111/j.2153-3490.1962.tb00128.x},
eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1111/j.2153-3490.1962.tb00128.x},
year = {1962}
}
Brunt-Väisälä Frequency Reference
Brunt-Vaisala frequency N² defined as in equation (1b) in
Durran, D.R. and J.B. Klemp, 1982:
On the Effects of Moisture on the Brunt-Väisälä Frequency.
J. Atmos. Sci., 39, 2152–2158,
https://doi.org/10.1175/1520-0469(1982)039<2152:OTEOMO>2.0.CO;2
ClimateMachine.TurbulenceClosures.Vreman
— TypeVreman{FT} <: TurbulenceClosureModel
Filter width Δ is the local grid resolution calculated from the mesh metric tensor. A Smagorinsky coefficient is specified and used to compute the equivalent Vreman coefficient.
- ν_e = √(Bᵦ/(αᵢⱼαᵢⱼ)) where αᵢⱼ = ∂uⱼ∂uᵢ with uᵢ the resolved scale velocity component.
- βij = Δ²αₘᵢαₘⱼ
- Bᵦ = β₁₁β₂₂ + β₂₂β₃₃ + β₁₁β₃₃ - β₁₂² - β₁₃² - β₂₃²
βᵢⱼ is symmetric, positive-definite. If Δᵢ = Δ, then β = Δ²αᵀα
Fields
C_smag
Smagorinsky Coefficient [dimensionless]
Reference
@article{Vreman2004,
title={An eddy-viscosity subgrid-scale model for turbulent shear flow: Algebraic theory and applications},
author={Vreman, AW},
journal={Physics of fluids},
volume={16},
number={10},
pages={3670--3681},
year={2004},
publisher={AIP}
}
ClimateMachine.TurbulenceClosures.AnisoMinDiss
— TypeAnisoMinDiss{FT} <: TurbulenceClosureModel
Filter width Δ is the local grid resolution calculated from the mesh metric tensor. A Poincare coefficient is specified and used to compute the equivalent AnisoMinDiss coefficient (computed as the solution to the eigenvalue problem for the Laplacian operator).
Fields
C_poincare
Reference
@article{
doi:10.1063/1.5037039,
author = {Vreugdenhil,Catherine A. and Taylor,John R. },
title = {Large-eddy simulations of stratified plane Couette flow using the anisotropic minimum-dissipation model},
journal = {Physics of Fluids},
volume = {30},
number = {8},
pages = {085104},
year = {2018},
doi = {10.1063/1.5037039},
URL = {https://doi.org/10.1063/1.5037039}
}
ClimateMachine.TurbulenceClosures.HyperDiffusion
— TypeAbstract type for Hyperdiffusion models
ClimateMachine.TurbulenceClosures.NoHyperDiffusion
— TypeNoHyperDiffusion <: HyperDiffusion Defines a default hyperdiffusion model with zero hyperdiffusive fluxes.
ClimateMachine.TurbulenceClosures.DryBiharmonic
— TypeDryBiharmonic{FT} <: HyperDiffusion
Assumes dry compressible flow. Horizontal hyperdiffusion methods for application in GCM and LES settings Timescales are prescribed by the user while the diffusion coefficient is computed as a function of the grid lengthscale.
Fields
τ_timescale
ClimateMachine.TurbulenceClosures.EquilMoistBiharmonic
— TypeEquilMoistBiharmonic{FT} <: HyperDiffusion
Assumes equilibrium thermodynamics in compressible flow. Horizontal hyperdiffusion methods for application in GCM and LES settings Timescales are prescribed by the user while the diffusion coefficient is computed as a function of the grid lengthscale.
Fields
τ_timescale
τ_timescale_q_tot
ClimateMachine.TurbulenceClosures.ViscousSponge
— TypeAbstract type for viscous sponge layers.
Modifier for viscosity computed from existing turbulence closures.
ClimateMachine.TurbulenceClosures.NoViscousSponge
— TypeNoViscousSponge
No modifiers applied to viscosity/diffusivity in sponge layer
Fields
ClimateMachine.TurbulenceClosures.UpperAtmosSponge
— TypeUpper domain viscous relaxation
Applies modifier to viscosity and diffusivity terms in a user-specified upper domain sponge region
Fields
z_max
Maximum domain altitude (m)
z_sponge
Altitude at with sponge starts (m)
α_max
Sponge Strength 0 ⩽ α_max ⩽ 1
γ
Sponge exponent
Supporting Methods
ClimateMachine.TurbulenceClosures.turbulence_tensors
— Functionν, D_t, τ = turbulence_tensors(
::TurbulenceClosureModel,
orientation::Orientation,
param_set::AbstractParameterSet,
state::Vars,
diffusive::Vars,
aux::Vars,
t::Real
)
Compute the kinematic viscosity (ν
), the diffusivity (D_t
) and SGS momentum flux tensor (τ
) for a given turbulence closure. Each closure overloads this method with the appropriate calculations for the returned quantities.
Arguments
::TurbulenceClosureModel
= Struct identifier for turbulence closure modelorientation
=BalanceLaw.orientation
param_set
parameter setstate
= Array of prognostic (state) variables. Seevars_state
inBalanceLaw
diffusive
= Array of diffusive variablesaux
= Array of auxiliary variablest
= time
ClimateMachine.TurbulenceClosures.init_aux_turbulence!
— Functioninit_aux_turbulence!
Initialise auxiliary variables for turbulence models. Overload for specific turbulence closure type.
ClimateMachine.TurbulenceClosures.turbulence_nodal_update_auxiliary_state!
— Functionturbulence_nodal_update_auxiliary_state!
Update auxiliary variables for turbulence models. Overload for specific turbulence closure type.
ClimateMachine.TurbulenceClosures.principal_invariants
— Functionprincipal_invariants(X)
Calculates principal invariants of a tensor X
. Returns 3 element tuple containing the invariants.
ClimateMachine.TurbulenceClosures.symmetrize
— Functionsymmetrize(X)
Given a (3,3) second rank tensor X, compute (X + X')/2
, returning a symmetric SHermitianCompact
object.
ClimateMachine.TurbulenceClosures.norm2
— Functionnorm2(X)
Given a tensor X
, computes X:X.
ClimateMachine.TurbulenceClosures.strain_rate_magnitude
— Functionstrain_rate_magnitude(S)
Given the rate-of-strain tensor S
, computes its magnitude.