CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Smagorinsky model details

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree15Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 12, 2011, 12:31
Default How about dynamic Smagorinsky?
  #21
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Hi all,

I have some questions about this same issue with respect to the dynamic Smagorinsky model. I think I am making a mistake somewhere, but please correct me if I am wrong. I've tried to look at other locations for the same issue, but couldn't find it.

I compare the dynamic model in OpenFOAM (not caring about the domain averages coefficient) with the dynamic model (described in Lilly and Pope).

I think we agree on the following (D defined in OpenFOAM, S common definition)
\begin{array}{rcl}
\overline{S}_{ij} &=& \frac{1}{2}\left(\frac{\partial u_i}{\partial x_j}+\frac{\partial u_j}{\partial x_i}\right) \\
\overline{D}_{ij} &=& \overline{S}_{ij} - \frac{1}{3} \delta_{ij}\overline{S}_{kk} = \overline{S}_{ij} (incompressible) \\
|\overline{D}| &=& |\overline{S}|/\sqrt{2}
\end{array}

Now, looking at the code (dynSmagorinsky 1.7, homogeneousDynSmagorinsky 2.0), in the .C file at line 57, 62 respectively:
M_{ij} = \Delta^2 \left[ \widehat{|\overline{D}|\overline{D}_{ij}} - 4 |\widehat{\overline{D}}_{ij}\widehat{\overline{D}}_{ij}|\right]
as compared to the original of Lilly (in Pope this expression
M_{ij} = \widehat{\Delta}^2\widehat{|\overline{S}|}\widehat{\overline{S}}_{ij}-\Delta^2\widehat{|\overline{S}|\overline{S}_{ij}}

If D_ij=S_ij, but |S|=sqrt(2) |D|, then the second term in the OF implementation is off by a factor sqrt(2). (Where the factor 4 is from the double width of the test filter, and the minus sine is also present in L)

Somewhere I must have skipped a step, I hope one of you can point it out for me. Thanks in advance!
bmikuz likes this.
Bernhard is offline   Reply With Quote

Old   July 15, 2011, 03:35
Default
  #22
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Anybody that can give a comment on this?
Bernhard is offline   Reply With Quote

Old   July 18, 2011, 04:47
Default
  #23
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Mistake is this:
Quote:
Originally Posted by Bernhard View Post
M_{ij} = \Delta^2 \left[ \widehat{|\overline{D}|\overline{D}_{ij}} - 4 |\widehat{\overline{D}}_{ij}\widehat{\overline{D}}_{ij}|\right]
M_{ij} = \Delta^2 \left[ \widehat{|\overline{D}|\overline{D}_{ij}} - 4  |\widehat{\overline{D}}|\widehat{\overline{D}}_{ij}\right]
Bernhard is offline   Reply With Quote

Old   August 26, 2011, 07:39
Default
  #24
Member
 
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17
gregor is on a distinguished road
Quote:
Originally Posted by lakeat View Post
Question 1: Why using magSqr(dev(symm(gradU))) instead of symm(gradU) && symm(gradU) to get {{\bf{\bar S}}{\rm{:}}{\bf{\bar S}}} ????
Thank you
I think the reason is to have a consistent formulation for incompressible an compressible LES models :

let symm(gradU) be S, then dev(S) = S - 1/3 trace(S)I

however in a incompressible case
1/3 trace(S)I = 0, since trace(S) is the continuity eq. . Therefore in an incrompessible case it doesnt matter whether you take dev(S) or not , but consider a compressible case then 1/3 trace(S) doesn't vanish.

In a compressible or variable density case the solver calls divDevRhoBeff to compute the source term due to SGS stress B = 2/3k I - 2 nu_t S_D. (See Fureby http://pof.aip.org/resource/1/phfle6/v9/i5/p1416_s1 Eq. 3) There you have the deviatoric part of D. But i guess openFoam uses nu_t = c Delta^2 ||S_D|| and B = 2/3k I - 2 nu_t S. So it takes S_D for the turbulent viscosity and S for the SGS stress tensor B.
gregor is offline   Reply With Quote

Old   January 24, 2013, 11:40
Default
  #25
Senior Member
 
Join Date: Nov 2012
Posts: 171
Rep Power: 14
hz283 is on a distinguished road
Quote:
Originally Posted by MaximeIST View Post
Hello

I may keep on confusing people, but the way it is coded, if I am not doing mistake is
Cs=sqrt(ck*sqrt(2*ck/ce))
in the incompressible Smagorinsky.H line 114.
There is a factor 2 added in the root-mean squared.

And in the case where Ce=1.048 and Ck=0.094, and with this factor 2, we obtain Cs=0.1995.

May be I miss something?

Maxime
Hi All,

For the compressible Smagorinsky model, the parameters for ck=0.02, ce=1.048

Following the following line:
Cs=sqrt(ck*sqrt(ck/ce))
=> Cs=0.0525...

Does anybody know the references for these specification of the ck and ce for compressible Smagorinsky model?
hz283 is offline   Reply With Quote

Old   March 11, 2013, 22:25
Default
  #26
Member
 
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 14
Sunxing is on a distinguished road
Hi Yingkun,

As you mentioned, in the incompressible solvers Cs=sqrt(Ck*sqrt(Ck/Ce)). So if I want to set Cs=1, Do I just need to modify Ck and Ce in the LESProperties?Or are there other rules I must obey?
Code:
SmagorinskyCoeffs
{
ce 1.05;
ck 0.0472;
}
regards
Sunxing is offline   Reply With Quote

Old   February 28, 2014, 04:03
Default
  #27
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi Bernhard and everybody,

I compare the dynamic model in OpenFOAM (homoDynSmag OF 2.2.2) with the dynamic model (described in Lilly and Pope) and I have the same Problem. To reanimate the discussion:

In Pope (F(.) means filtered):
[1] nu_SGS = cS * delta^2 * sqrt(2 * S_ij S_ij)
[2] cs = (M_ij L_ij)/(M_kl M_kl)
where
[3] S_ij = 0.5 (ui,j + uj,i)

[4] M_ij = 2 * delta^2 * (F(sqrt(2 * S_ij S_ij) S_ij) - F(sqrt(2 * S_ij S_ij)) F(S_ij))
[5] L_ij = F(ui uj) - F(ui) F(uj)

In OF 2.2.2 (homogeneousDySmagorinsky, <.> means averaged):
[6] nu_SGS = cD * delta^2 *
sqrt(S_ij S_ij)
[7] cD = 0.5 (<L_ij M_ij>)/(<M_kl M_kl>)
[8] S_ij = D_ij = S_ij Pope
[9] M_ij = delta^2 * (F(sqrt(S_kl S_kl) Sij) - 4 * sqrt(<S_kl> <S_kl>) <S_ij>)
[10]
L_ij = F(ui uj) - F(ui) F(uj)


I marked the differences of these models.

- First difference is the factor 0.5 in Eq[7] in comparison to Eq[2]. This comes from the factor 2 in Eq[4]. If we put this in Eq[2] we get 0.5 (ok)


- Second difference is the different filtering in M_ij. What effect does this have???? (x)

- Third difference is the factor 4 in Eq[9] in comparison to Eq[4]. Bernhard:

here the factor 4 is from the double width of the test filter
can you please explain that?? Why we don`t get a fector in the other filtered terms??? (x)

- Fourth difference is the factor 2 in mag(S_ij). (x)

In my opinion these models are different or I`m not able to bring the OF-model in the form of pope-model.
If it is possible, anyone can please give some advice?


kind regards
Florian
bmikuz likes this.
itchy is offline   Reply With Quote

Old   October 28, 2014, 02:39
Default
  #28
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Quote:
Originally Posted by lakeat View Post
Sorry, I do not understand, I saw in "Smagorinsky.H",
Code:
tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
{
    return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
}
As I remember:

\begin{array}{l}
 {\nu _{SGS}} = {\left( {{C_S}\Delta } \right)^2}\left| {{\bf{\bar S}}} \right| \\ 
 K = {\left( {{C_I}\Delta } \right)^2}{\left| {{\bf{\bar S}}} \right|^2} \\ 
 \left| {{\bf{\bar S}}} \right| = {\left( {{\bf{\bar S}}{\rm{:}}{\bf{\bar S}}} \right)^{{1 \mathord{\left/
 {\vphantom {1 2}} \right.
 \kern-\nulldelimiterspace} 2}}} \\ 
 \end{array}





Question 1: Why using magSqr(dev(symm(gradU))) instead of symm(gradU) && symm(gradU) to get {{\bf{\bar S}}{\rm{:}}{\bf{\bar S}}} ????

Question 2: If magSqr(dev(symm(gradU))) = symm(gradU) && symm(gradU) = {{\bf{\bar S}}{\rm{:}}{\bf{\bar S}}}, then

K = \frac{{2{C_K}}}{{{C_\varepsilon }}}{\Delta ^2}{\left| {{\bf{\bar S}}} \right|^2}

But I saw in "Smagorinsky.C"
Code:
nuSgs_ = ck_*delta()*sqrt(k(gradU));
Which means

{\nu _{SGS}} = {C_K}\Delta \sqrt K

Then, replace K with K = \frac{{2{C_K}}}{{{C_\varepsilon }}}{\Delta ^2}{\left| {{\bf{\bar S}}} \right|^2}

{\nu _{SGS}} = {C_K}\Delta \sqrt K  = {C_K}\Delta \sqrt {\frac{{2{C_K}}}{{{C_\varepsilon }}}{\Delta ^2}{{\left| {{\bf{\bar S}}} \right|}^2}}  = {C_K}\sqrt {\frac{{2{C_K}}}{{{C_\varepsilon }}}} {\Delta ^2}\left| {{\bf{\bar S}}} \right|


Compare with {\nu _{SGS}} = {\left( {{C_S}\Delta } \right)^2}\left| {{\bf{\bar S}}} \right|

We'll get

{\left( {{C_S}} \right)^2} = {C_K}\sqrt {\frac{{2{C_K}}}{{{C_\varepsilon }}}}

But I heard somone said {\left( {{C_S}} \right)^2} = {C_K}\sqrt {\frac{{{C_K}}}{{{C_\varepsilon }}}}

So, I'm puzzled, I wonder if it was a mistake, that k should be written as
Code:
tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
{
    return (ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
}
Thank you


\begin{array}{l}
 {\nu _{SGS}} = {\left( {{C_S}\Delta } \right)^2}\left| {{\bf{\bar S}}} \right| \\ 
 K = {\left( {{C_I}\Delta } \right)^2}{\left| {{\bf{\bar S}}} \right|^2} \\ 
 \left| {{\bf{\bar S}}} \right| = {\left( {{\bf{\bar S}}{\rm{:}}{\bf{\bar S}}} \right)^{{1 \mathord{\left/
 {\vphantom {1 2}} \right.
 \kern-\nulldelimiterspace} 2}}} \\ 
 \end{array}

the third one shoub be sqrt(2*Sij*Sij)
wenxu is offline   Reply With Quote

Old   December 11, 2014, 06:40
Default How to change ck and ce in Smagorinsky approach
  #29
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Greetings All

I have performed a Smagorinsky-based compressible LES simulation with the Coefficients as follows:

HTML Code:
{
  ce = 1.048;
  ck= 0.02;
}
According to the relation:

{\left( {{C_S}} \right)^2} = {C_K}\sqrt {\frac{{{C_K}}}{{{C_\varepsilon}}}}

I will get C_S= 0.053.
My case is a reacting non-premixed combustion with a bluff-body separating fuel and oxidizer streams.

I want to change the C_S value into 0.13. which value between C_K and C_\varepsilon should be modified to retain the nature of the problem?

Best,
Bobi




Last edited by babakflame; December 11, 2014 at 07:45.
babakflame is offline   Reply With Quote

Old   March 21, 2015, 19:27
Default
  #30
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Actually in this paper, we cannot find the information about how the model constants c_k=0.094 and c_{\epsilon}=1.048 come out. So which one is correct reference when I use these two constants? Thanks.

Quote:
Originally Posted by alberto View Post
openfoammaofnepo is offline   Reply With Quote

Old   September 21, 2015, 11:11
Default Openfoam
  #31
New Member
 
Liuyue
Join Date: Sep 2015
Posts: 1
Rep Power: 0
lyne00 is on a distinguished road
Hi Lakeat,now I want to write the Scalar SikSkj,but how to write that in openFoam, Thanks.
lyne00 is offline   Reply With Quote

Old   January 15, 2016, 13:56
Default Change the smagorinsky coeff
  #32
New Member
 
Elyas_Kermani
Join Date: Dec 2015
Location: Iran
Posts: 12
Rep Power: 10
Elyas_Mosibat is on a distinguished road
hi friends
How can I change the smagorinsky Coeff (Cs) in OF?I want to use Cs=0.1...
Regard
Elyas_Mosibat is offline   Reply With Quote

Old   December 26, 2017, 22:16
Default
  #33
Member
 
Jingxue Wang
Join Date: Sep 2017
Posts: 58
Rep Power: 9
Jingxue Wang is on a distinguished road
I read that all the previous posts and reply.

May I understand that Cs=sqrt(Ck*sqrt(2Ck/Ce)) is correct in OpenFoam?


Thanks a lot
Jingxue Wang is offline   Reply With Quote

Old   March 26, 2019, 06:15
Default
  #34
New Member
 
Manaf Muhammed
Join Date: Oct 2018
Posts: 21
Rep Power: 8
manafaero is on a distinguished road
dear madam
As you know the smagorinsky constant Cs in OpenFOAM is defined as a function of Ce and Ck. But when i do the simulation for various combinations of Ck and Ce, that gives the same Cs, I am getting different results. So could you please tell Me where else Ck and Ce is used other than in smagorinsky model. My problem is incompressible LES with standard smagorinsky model and vandriest delta.

please help


my mailId is manafaero@gmail.com
manafaero is offline   Reply With Quote

Old   March 31, 2019, 16:24
Default
  #35
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by manafaero View Post
But when i do the simulation for various combinations of Ck and Ce, that gives the same Cs, I am getting different results. So could you please tell Me where else Ck and Ce is used other than in smagorinsky model.
The nut, k and epsilon fields are created by these classes, but I 'm not familiar with LES modelling. Either way, if you look for "Ce_" and "Ck_" in those files, you will see how they are used.
__________________
wyldckat is offline   Reply With Quote

Old   April 3, 2019, 09:54
Default OpenFoam
  #36
New Member
 
Manaf Muhammed
Join Date: Oct 2018
Posts: 21
Rep Power: 8
manafaero is on a distinguished road
I would like to share some experience of mine regarding the discussion. I also verified the equations given in the discussion. But when i run the simulation for various ck and ce combinations I am getting different results. the nu sgs is not the same in all cases. so eventhough the formula is correct the openFoam is not calculating as per the discussion. Note that I had removed the dependence of k in calculating shear stress B. but still the results differ. So be careful before using this. Also I am a beginner to OpenFOAM and C++. If any body is interested and any comments please post. my mail ID is manafaero@gmail.com.
manafaero is offline   Reply With Quote

Old   September 16, 2020, 12:30
Default
  #37
Member
 
George Pichurov
Join Date: Jul 2010
Posts: 52
Rep Power: 16
jorkolino is on a distinguished road
did you check this page with OF implementation https://caefn.com/openfoam/smagorinsky-sgs-model
jorkolino is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiphase flow. Dispersed and free surface model Luis CFX 8 May 29, 2007 19:13
Kato-Launder model sam Main CFD Forum 13 September 21, 2006 11:15
Kinetic air props model - conductivity HALF? Chris Bailey FLUENT 1 March 7, 2006 11:38
Reply to Tim Re Dynamic Smagorinsky model Ajay S. Parihar Main CFD Forum 9 June 2, 2002 17:24
Biharmonic Viscosity with Smagorinsky model Wen Long Main CFD Forum 4 May 15, 2002 06:54


All times are GMT -4. The time now is 16:47.