-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Choice of constant for the Smagorinsky model #1907
Comments
I'm not sure what part of the formula you're pointing out is specifically different from the image you've pasted, but it does look like something is fishy. Here's what I found: From Pressel et al. 2015 --- which we should cite in our code since I believe it was used as a reference --- The formula in Oceananigans is Oceananigans.jl/src/TurbulenceClosures/turbulence_closure_implementations/smagorinsky_lilly.jl Line 94 in 32c5c5a
which is called here: Oceananigans.jl/src/TurbulenceClosures/turbulence_closure_implementations/smagorinsky_lilly.jl Line 102 in 32c5c5a
It looks like Oceananigans.jl/src/TurbulenceClosures/turbulence_closure_utils.jl Lines 23 to 24 in 9248437
and, apparently, Oceananigans.jl/src/TurbulenceClosures/turbulence_closure_implementations/smagorinsky_lilly.jl Line 97 in 32c5c5a
This means that our formula is identical to Pressel et al (2015), but the constant is wrong: Pressel proposes Oceananigans.jl/src/TurbulenceClosures/turbulence_closure_implementations/smagorinsky_lilly.jl Lines 63 to 64 in 32c5c5a
Amusingly, julia> 0.165 * sqrt(2)
0.23334523779156072 which is probably not a coincidence. However, I'm not sure how an extra factor of As for clarification, I don't have much to offer. Perhaps the constant was taken from some reference that used a different formulation than either us or Pressel et al. 2015. Nobody has submitted a validation test for this closure so I don't think we know how it performs. As a historical note, the paper cited by both Pressel et al (2015) and us is Lilly (1962), which does indeed use the same formulation: where @tomchor I can't tell if the formula you've pasted is actually different from ours (or what the definition of It'd be fine to change the constant because there's no validation test. So the best we can do is theorize, and theorization on this issue suggests changing the default to I believe for shear flows it has also been found that the constant needs to be as small as Hope that helps! |
That was my bad, forgot to cite the source. It comes from Chamecki et al. 2019. But you're right that the definition is identical. I misinterpreted the code.
I indeed think we should change constant default to match the most common value used in the literature. I'd also like to change the notation used in the code from I'll open a PR. |
Sounds good to update the code! Perhaps we should also add a warning or note of some kind about the lack of validation (we've taken to doing this recently and I think it's a good thing). @navidcy would be happy not to use
julia> Υ = 1
1 maybe there's a better choice? We could also change the docs. |
Yeah, and I ended up realizing the same thing. I changed the docs instead. |
I have a feeling that I've asked this before but I looked and couldn't find anything. So forgive me if this is double-posting.
Usually the Smagorisnky eddy viscosity is defined as:
and with
C_s=0.165
.Looking at the code I can see that the formulation is a bit different:
Oceananigans.jl/src/TurbulenceClosures/turbulence_closure_implementations/smagorinsky_lilly.jl
Line 94 in 32c5c5a
Unless I'm missing something, this means that the coefficient
C
of the closure is different from the coefficientC_s
as it is usually defined (and also as it is defined in the docs). I'm curious as to why this choice was made.Also, assuming
ς=1
, the default value ofC=0.23
doesn't seem to match the default value in the literature forC_s=0.165
.Am I missing something here? Could someone please clarify?
The text was updated successfully, but these errors were encountered: