Skip to content

Commit 1ef438f

Browse files
committed
rft: split horizontal and vertical smagorinsky
- add diffusivity diagnostics - implicit vertical smagorinsky - les ci_plots edits - use vertical strain for lilly correction - full strain rate method
1 parent 096387a commit 1ef438f

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

config/default_configs/default_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ c_amd:
170170
help: "Model coefficient for AMD-LES closure (TODO: Move to parameters.toml)"
171171
value: 0.29
172172
smagorinsky_lilly:
173-
help: "Smagorinsky-Lilly diffusive closure [`nothing` (default), `UVW`]"
173+
help: "Smagorinsky-Lilly diffusive closure [`nothing` (default), `UVW`, `UV`, `W`, `UV_W_decoupled`]"
174174
value: ~
175175
bubble:
176176
help: "Enable bubble correction for more accurate surface areas"

src/parameterized_tendencies/les_sgs_models/smagorinsky_lilly.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ function set_smagorinsky_lilly_precomputed_quantities!(Y, p, model)
7575
ᶜfb = lilly_stratification_correction(p, ᶜS)
7676
if is_smagorinsky_UVW_coupled(model)
7777
ᶜL_h = ᶜL_v = @. lazy(c_smag * cbrt(ᶜΔ_z * Δ_h^2) * ᶜfb)
78+
else
79+
ᶜL_h = @. lazy(c_smag * Δ_h)
80+
ᶜL_v = @. lazy(c_smag * ᶜΔ_z * ᶜfb)
7881
end
7982

8083
ᶜS_norm_h .= strain_rate_norm(ᶜS, ax_h)

src/solver/model_getters.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,15 @@ Get the Smagorinsky-Lilly turbulence model based on `parsed_args["smagorinsky_li
176176
177177
The possible model configurations flags are:
178178
- `UVW`: Applies the model to all spatial directions.
179+
- `UV`: Applies the model to the horizontal direction only.
180+
- `W`: Applies the model to the vertical direction only.
181+
- `UV_W`: Applies the model to the horizontal and vertical directions separately.
179182
"""
180183
function get_smagorinsky_lilly_model(parsed_args)
181184
smag = parsed_args["smagorinsky_lilly"]
182185
isnothing(smag) && return nothing
183186
smag_symbol = Symbol(smag)
184-
@assert smag_symbol in (:UVW,)
187+
@assert smag_symbol in (:UVW, :UV, :W, :UV_W)
185188
return SmagorinskyLilly{smag_symbol}()
186189
end
187190

src/solver/types.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ Smagorinsky-Lilly eddy viscosity model.
246246
247247
`DIR` is a symbol indicating in which direction(s) the model is applied. It can be
248248
- `:UVW` (all directions)
249+
- `:UV` (horizontal only)
250+
- `:W` (vertical only), or
251+
- `:UV_W` (horizontal and vertical treated separately).
249252
"""
250253
struct SmagorinskyLilly{DIR} <: AbstractEddyViscosityModel end
251254

@@ -265,7 +268,7 @@ Check if the Smagorinsky model is applied in the vertical direction.
265268
See also [`is_smagorinsky_horizontal`](@ref).
266269
"""
267270
is_smagorinsky_vertical(::SmagorinskyLilly{DIR}) where {DIR} =
268-
DIR == :UVW
271+
DIR == :UVW || DIR == :W || DIR == :UV_W
269272
is_smagorinsky_vertical(::Nothing) = false
270273

271274
"""
@@ -276,7 +279,7 @@ Check if the Smagorinsky model is applied in the horizontal directions.
276279
See also [`is_smagorinsky_vertical`](@ref).
277280
"""
278281
is_smagorinsky_horizontal(::SmagorinskyLilly{DIR}) where {DIR} =
279-
DIR == :UVW
282+
DIR == :UVW || DIR == :UV || DIR == :UV_W
280283
is_smagorinsky_horizontal(::Nothing) = false
281284

282285
struct AnisotropicMinimumDissipation{FT} <: AbstractEddyViscosityModel

0 commit comments

Comments
 (0)