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 Community New Posts Updated Threads Search

Like Tree15Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2009, 09:55
Default Smagorinsky model details
  #1
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
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
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   August 19, 2009, 13:42
Default
  #2
New Member
 
Gabriela Bracho
Join Date: Mar 2009
Location: Valencia, Valencia, Spain
Posts: 14
Rep Power: 17
gaby is on a distinguished road
Hi Daniel,
Did you find any answer to this question?. in the paper:
"A SUBGRID-SCALE MODEL FOR LARGE-EDDY SIMULATION OF
PLANETARY BOUNDARY-LAYER FLOWS
PETER E SULLIVAN, JAMES C. McWILLIAMS, and CHIN-HOH MOENG" 1994, they defined Cs as:

Cs=(Ck*(Ck/Ce)^0.5)^0.5

So, I think you are right...

Now, I'm confused, why it is defined in Smagorinsky.H like 2*Ck/Ce ??

Is it because of the symm(grad(U)) definition???

It would be great if you could share your opinion...

Gaby
makaveli_lcf likes this.
gaby is offline   Reply With Quote

Old   August 20, 2009, 09:35
Default
  #3
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Sorry, you see, no one come and help.

And you have noticed, I have done a detailed deduction in my top post, I still don't know why they use
  1. 2.0*ck_/ce_
  2. magSqr(dev(symm(gradU))) instead of symm(gradU) && symm(gradU)
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   August 20, 2009, 20:59
Default
  #4
Senior Member
 
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18
sandy is on a distinguished road
Quote:
Originally Posted by gaby View Post
Hi Daniel,
Did you find any answer to this question?. in the paper:
"A SUBGRID-SCALE MODEL FOR LARGE-EDDY SIMULATION OF
PLANETARY BOUNDARY-LAYER FLOWS
PETER E SULLIVAN, JAMES C. McWILLIAMS, and CHIN-HOH MOENG" 1994, they defined Cs as:
Gaby
Hi Gaby, can you send a copy of the paper to me? I am finding the expression to estimate the k inlet boundary condition in oneEqEddy model. Thanks.

Sandy
sandy.lee37@gmail.com
sandy is offline   Reply With Quote

Old   October 6, 2010, 06:00
Default tensor norm definition
  #5
Member
 
Andrea Petronio
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 43
Rep Power: 17
andrea is on a distinguished road
Hallo,
I was also trying to understand the implementation of Smagorinsky model.
As it is said here
http://www.cfd-online.com/Forums/ope...rain-rate.html
the definition of the norm of a tensor differs from what is computed in OF, so in my opinion the 2 before ck_/ce_ is exaclty the missing sqr(2) in the definition.
so, if
|S| = sqrt(2 S:S)
then
2 magSqr(S) = 2 sqrt(S:S)^2 = sqrt(2*S:S)^2 = |S|^2

Am I right?

PS: default Smagorinsky constant should be Cs =0.1677 (in Pope's book is said to be around 0.17) given ck=0.094, ce= 1.048
makaveli_lcf and wenxu like this.
andrea is offline   Reply With Quote

Old   March 23, 2011, 16:31
Default
  #6
New Member
 
Join Date: Feb 2010
Posts: 8
Rep Power: 16
MaximeIST is on a distinguished road
Hello

I am also trying to understand how the Smagorinsky model is coded, for the incompressible version and also for the compressible version.

And It seems that for the incompressible Smagorinsky model, the default constant Cs is equal to
Cs=sqrt(ck*sqrt(2*ck/ce))

If I define Cs such that the eddy viscosity is equal to
nuSgs=( Cs *delta)^2 * ||D||

if ck=0.094 and ce=1.048 then Cs=0.1995.. ~ 0.2

Same question as Andrea : am I right?
MaximeIST is offline   Reply With Quote

Old   April 22, 2011, 09:13
Default
  #7
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Hi,

I have same questions too.
maysmech is offline   Reply With Quote

Old   April 23, 2011, 00:22
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Reference: http://pof.aip.org/resource/1/phfle6/v9/i5/p1416_s1
makaveli_lcf likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   May 1, 2011, 12:53
Default
  #9
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Thanks Alberto for the useful reference.
As MaximeIST and lakeat told if we compare what is stated in your reference and openFoam smagorinsky with Pope's book we reach to Cs=0.2.
As stated in Pope's book this constant can be 0.1~0.2 and using 0.2 can be cause of high diffusivity. Please tell me if this is true.
My cyclone simulation with Smagorinsky has high diffusivity and i want use 0.1 for Cs, How can i do that? Which one of Ck or Ce should be changed? I mean are they be used elsewhere or not?

Regards,

Last edited by maysmech; May 1, 2011 at 15:03.
maysmech is offline   Reply With Quote

Old   May 1, 2011, 19:27
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I'd just use the dynamic Smagorinsky model, so that you do not have to fiddle with the coefficient, and you do not need to play with dumping functions.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   May 2, 2011, 22:59
Default
  #11
Member
 
桂莹
Join Date: Apr 2011
Posts: 36
Rep Power: 15
yingkun is on a distinguished road
Hi,Andrea:
I think what you have said is right,the reason is just the different expression of Vsgs
yingkun is offline   Reply With Quote

Old   May 12, 2011, 06:48
Default
  #12
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
So, what is Cs value in OpenFOAM's Smagorinsky? 0.2 or 0.167?
maysmech is offline   Reply With Quote

Old   May 12, 2011, 07:50
Default
  #13
Member
 
桂莹
Join Date: Apr 2011
Posts: 36
Rep Power: 15
yingkun is on a distinguished road
hi,Maysam:
since Cs=sqrt(ck*sqrt(*ck/ce), in smagorinsky.c Ck=0.094 , in GenEddyVisc.c Ce=1.048, then Cs=0.167 as we all know ,am I right?
makaveli_lcf likes this.
yingkun is offline   Reply With Quote

Old   May 12, 2011, 09:30
Default
  #14
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
I am in doubt because of first post of this thread that it becomes 0.2.
I don't know. Any idea will be appreciated.
maysmech is offline   Reply With Quote

Old   May 12, 2011, 09:33
Default
  #15
Member
 
Andrea Petronio
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 43
Rep Power: 17
andrea is on a distinguished road
It's Cs \approx 0.17. You need just to follow the way it's computed. The question is why the simple Smagorinsky model is implemented in a such confusing way? We re-wrote our Smag. with just Cs required.
andrea is offline   Reply With Quote

Old   May 12, 2011, 10:12
Default
  #16
New Member
 
Join Date: Feb 2010
Posts: 8
Rep Power: 16
MaximeIST is on a distinguished road
Quote:
Originally Posted by yingkun View Post
hi,Maysam:
since Cs=sqrt(ck*sqrt(*ck/ce), in smagorinsky.c Ck=0.094 , in GenEddyVisc.c Ce=1.048, then Cs=0.167 as we all know ,am I right?
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
MaximeIST is offline   Reply With Quote

Old   May 13, 2011, 09:23
Default
  #17
Member
 
桂莹
Join Date: Apr 2011
Posts: 36
Rep Power: 15
yingkun 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,Maxime,
In the incompressible Smagorinsky.H line 114,it's the expression of K,not Ck,it means k=2Ck/Ce*(delta^2)*(Sof^2),may be my blog can help you: http://blog.sina.com.cn/s/blog_6d9c27ab0100u9ez.html
it's just what I think, I'm not sure.
yingkun is offline   Reply With Quote

Old   May 13, 2011, 12:10
Default
  #18
New Member
 
Join Date: Feb 2010
Posts: 8
Rep Power: 16
MaximeIST is on a distinguished road
Hello Yingkun

I agree with you that it is the expression of k which is in line 114 of the Smagorinsky.H.

But the factor 2 is still there and as lakeat shown in the first message of this thread, we still get
Cs=sqrt(ck*sqrt(2*ck/ce))

I have been in your blog, and I think you lost this factor 2 in the passage of equation (7) to the last equation of the page.

Maxime
MaximeIST is offline   Reply With Quote

Old   May 14, 2011, 02:01
Default
  #19
Member
 
桂莹
Join Date: Apr 2011
Posts: 36
Rep Power: 15
yingkun is on a distinguished road
Quote:
Originally Posted by MaximeIST View Post
Hello Yingkun

I agree with you that it is the expression of k which is in line 114 of the Smagorinsky.H.

But the factor 2 is still there and as lakeat shown in the first message of this thread, we still get
Cs=sqrt(ck*sqrt(2*ck/ce))

I have been in your blog, and I think you lost this factor 2 in the passage of equation (7) to the last equation of the page.

Maxime
hi,
I think you don't understand exactly what I mean,the difference is just caused by the different expressions of S between turbulent therory and Openfoam,there is a factor of sqrt(2) difference,lakeat just regards them the same
ancipdp likes this.
yingkun is offline   Reply With Quote

Old   May 16, 2011, 07:13
Default
  #20
New Member
 
Join Date: Feb 2010
Posts: 8
Rep Power: 16
MaximeIST is on a distinguished road
Quote:
Originally Posted by yingkun View Post
hi,
I think you don't understand exactly what I mean,the difference is just caused by the different expressions of S between turbulent therory and Openfoam,there is a factor of sqrt(2) difference,lakeat just regards them the same
OK! that's what I missed!
It's true I don't understand what is written in your blog, chinese is not easy for me !

So you said that the sqrt(2) is a consequence of the definition of S in OpenFoam.
In this case, the default constant in the incompressible Smagorinsky is 0.167.
good to know!
Alhasan and Da Lord's like this.
MaximeIST is offline   Reply With Quote

Reply


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:14.