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

How to use dynSmagorinsky model correctly ?

Register Blogs Community New Posts Updated Threads Search

Like Tree52Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2011, 08:52
Default
  #81
Member
 
Join Date: Oct 2010
Location: Stuttgart
Posts: 35
Rep Power: 16
grandgo is on a distinguished road
Hello FOAMers,

I need to use the current nuSGS values in a modified pisoFoam solver (heat transfer energy equation implemented) but OF tells me, that "nuSGS" entry is missing in the turbulenceModel.H file.

Do I just have to include this:

//- Return the subgrid viscosity
virtual tmp<volScalarField> nuSGS() const = 0;

in the turbulenceModel.H file and compile it with "wmake"?

Or is there anything else that I have to do?


Best regards
grandgo
grandgo is offline   Reply With Quote

Old   August 21, 2011, 08:55
Question What should be done for Pe>2
  #82
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Quote:
Originally Posted by alberto View Post
QUICK is not a suitable scheme for LES, and the upwind scheme is even worse. They are too dissipative.

You should use linear, or higher order central schemes. Generally, avoid limited schemes, they're not a good choice if you want accurate LES.

If the solution "blows up" using the linear scheme, it is probably because your grid is not fine enough to have the local Pé < 2, as required by the scheme.

Best,
Hi,
As you told UD is not suitable for LES and CD is suggested.
If the simulation acts on a flow which not possible to reach Pe<2 by fining grids, what is your suggestion for fvScheme? I mean how is possible to use a central differencing scheme for Pe>2?
Regards,
maysmech is offline   Reply With Quote

Old   August 21, 2011, 15:11
Default
  #83
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
Quote:
Originally Posted by maysmech View Post
Hi,
As you told UD is not suitable for LES and CD is suggested.
If the simulation acts on a flow which not possible to reach Pe<2 by fining grids, what is your suggestion for fvScheme? I mean how is possible to use a central differencing scheme for Pe>2?
Regards,
It is not possible to use a purely CD scheme with Pe > 2. In some case the problem is localised in some part of the domain, and you can try local grid refinement. If this is not the case, you can use a hybrid scheme (or a bounded one, accepting the error you will introduce).
__________________
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   August 22, 2011, 15:45
Default
  #84
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Quote:
Originally Posted by alberto View Post
It is not possible to use a purely CD scheme with Pe > 2. In some case the problem is localised in some part of the domain, and you can try local grid refinement. If this is not the case, you can use a hybrid scheme (or a bounded one, accepting the error you will introduce).
What about Fourth scheme which i think is a 4th order central differencing?
If no, when Peclet number is more than 2 in most of domain so hybrid scheme would be same as Upwind and it has diffuse results problem yet.
maysmech is offline   Reply With Quote

Old   August 22, 2011, 20:36
Default
  #85
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
Assuming you are actually doing LES, and not under-resolved LES, your grid size should satisfy the condition on Pe' in most of the domain. This is clearly very challenging for high Reynolds numbers, and the strategy to workaround this problem would be to use very high-order schemes. In general, in the literature it is clearly shown that upwind schemes, even of high-order, are very dissipative and not suitable for LES. In practical applications, you are often not interested in the resolving all the details exactly, so some error might be acceptable (as long as you know you have it).

The 4th-order scheme has to satisfy a similar stability condition to the second-order one, so you are at square one :-)

There are a variety of "filtered" schemes, like SFCD and others which are considered "better" for LES by some user. I do not have direct experience: all the LES I did was with central schemes, because I wanted the best possible accuracy with the code in use.

Best,
hua1015 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   August 4, 2013, 09:26
Default
  #86
Member
 
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 14
Sunxing is on a distinguished road
Hi foamers I find that there is no dynSmagorinsky model in my OF version(OF 2.1.1), but there is a homogeneousDynSmagorinsky model. So is the latter one a similar model with the dynSmagorinsky model? If it's not, in which OF version can I find the dynSmagorinsky model? I have calculated the case about the interaction of plane wall jets with external stream with the standard Smagorinsky + VanDrist damping function, however the result turned out no so good as I expected. Especially, the velocity is much lower than the exp in the near wall region. Is it suitable to use the dynSmagorinsky model or homogeneousDynSmagorinsky model to simulate this case? Best regards
Sunxing is offline   Reply With Quote

Old   August 4, 2013, 09:57
Default
  #87
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 16
foamWang is on a distinguished road
Hi,

Maybe you can try this link: http://albertopassalacqua.com/?page_id=1145

foamWang

Quote:
Originally Posted by Sunxing View Post
Hi foamers I find that there is no dynSmagorinsky model in my OF version(OF 2.1.1), but there is a homogeneousDynSmagorinsky model. So is the latter one a similar model with the dynSmagorinsky model? If it's not, in which OF version can I find the dynSmagorinsky model? I have calculated the case about the interaction of plane wall jets with external stream with the standard Smagorinsky + VanDrist damping function, however the result turned out no so good as I expected. Especially, the velocity is much lower than the exp in the near wall region. Is it suitable to use the dynSmagorinsky model or homogeneousDynSmagorinsky model to simulate this case? Best regards
foamWang is offline   Reply With Quote

Old   August 4, 2013, 22:13
Default
  #88
Member
 
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 14
Sunxing is on a distinguished road
Quote:
Originally Posted by foamWang View Post
Hi,

Maybe you can try this link: http://albertopassalacqua.com/?page_id=1145

foamWang
Hi foamWang, Thank you very much for your prompt reply, and I will have try with the link. regards Sunxing
Sunxing is offline   Reply With Quote

Old   August 15, 2013, 03:58
Default
  #89
Member
 
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 14
Sunxing is on a distinguished road
Hi Heng Xiao
I have used the dynamic model that alberto offered in a plane wall jet case. However it didn't give a good result as I expected. I have compared the result with the exp data and RANS result. It turns out the velocity near wall is much lower than the exp data. It has a opposite result with yours. I have simulate it with good mesh and the yplus is about 0.2 at first grid. I don't know what factors may lead to this result, can anyone help me?

Thanks!
Regard
Sunxing




Quote:
Originally Posted by panda60 View Post
Dear Heng Xiao,
I am very interenting your dynamic model result in channel flow. You said"it just give low shear stress", That means if shear stress is low, the velocity will be larger.The following is my Smagorinsky+VanDriest result.
Attached Images
File Type: jpg sketch of geometry and the boundary conditions.jpg (21.0 KB, 50 views)
File Type: jpg u.jpg (23.8 KB, 62 views)
Sunxing is offline   Reply With Quote

Old   March 2, 2014, 08:47
Default
  #90
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi,

I compare the dynamic model in OpenFOAM (homoDynSmag OF 2.2.2) with the dynamic model (described in Pope respectively in C.Fureby "A comparative study of subgrid scale models in homogeneous isotropic turbulenc") and I have the some Problems in understanding.

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 Fureby:
similar to Pope but different filtering. It should be model A2 "Dynamic coefficient algebraic eddy-viscosity model (AVM)"

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].
(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/Fureby-model. The Problem lies in the formulation of M_ij.
If it is possible, anyone can please give some advice?


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

Old   March 15, 2014, 23:07
Default
  #91
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Quote:
Originally Posted by Sunxing View Post
Hi Heng Xiao
I have used the dynamic model that alberto offered in a plane wall jet case. However it didn't give a good result as I expected. I have compared the result with the exp data and RANS result. It turns out the velocity near wall is much lower than the exp data. It has a opposite result with yours. I have simulate it with good mesh and the yplus is about 0.2 at first grid. I don't know what factors may lead to this result, can anyone help me?

Thanks!
Regard
Sunxing
Have you solve the problem? I use the dynamic model in a plane wall jet case too. The local heat transfer coefficient at the wall is under predict. I've tried everything, but still couldn't solve the problem. The model code I use is from here: https://bitbucket.org/albertop/dynamicsmagorinsky
palmerlee is offline   Reply With Quote

Old   March 17, 2014, 02:42
Default
  #92
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi Sunxing and palmerlee,

pherhaps the velcoity is too small, because even in the dynamic model Cs isn't 0 at the wall. As e result of this, nusgs isn't 0 -> velocity is smaller. If you use a real dynamic model check Cs at the wall. If it is far away from 0 -> velocity to small.
Pherhaps you should use the WALE model.
see here:
http://aerojet.engr.ucdavis.edu/flue...ug/node508.htm

the model isn't imoplemented in OF (as far as I know).

kind regards
Florian
itchy is offline   Reply With Quote

Old   March 17, 2014, 02:52
Default
  #93
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi Foamers,

now I have understood the implementation of homoDynSma-model in OF. For people that are interested in it:

nuSGS = cD*Delta^2*(Sij Sij)^0.5

cD = <Lij Mij>/<Mkl Mkl> <.>: means averaging over the whole domain

Lij = filter(ui uj) - filter(ui) filter(uj)

Mij = Delta^2 * (filter((Skl Skl)^0.5 Sij) - 4*(filter(Skl) filter(Skl))^0.5 filter(Sij))

with the testfilter twice the gridfilter Delta_T = 2 * Delta

Mij = Delta^2 * filter((Skl Skl)^0.5 Sij) - Delta_T^2 * (filter(Skl) filter(Skl))^0.5 filter(Sij)

then it is the same model as in Pope (but oter filtering)

kind regards
Florian
itchy is offline   Reply With Quote

Old   March 17, 2014, 21:49
Default
  #94
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi Sunxing and palmerlee,

pherhaps the velcoity is too small, because even in the dynamic model Cs isn't 0 at the wall. As e result of this, nusgs isn't 0 -> velocity is smaller. If you use a real dynamic model check Cs at the wall. If it is far away from 0 -> velocity to small.
Pherhaps you should use the WALE model.
see here:
http://aerojet.engr.ucdavis.edu/flue...ug/node508.htm

the model isn't imoplemented in OF (as far as I know).

kind regards
Florian
Hi, Florian!

Thank you for your reply!

How about van Driest damping, then? Could it solve this problem.

kind regards
Peter
palmerlee is offline   Reply With Quote

Old   March 18, 2014, 03:41
Default
  #95
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi Palmerlee,

van Driest damping is not a good choice for dynamic models. For static Smagorinsky you can use it. In my opinion there are two easy possibilities. WALE-Model or Vreman Model. These two models are very "easy" to implement.

Do you have incompressible flow?? Attached you can find the WALE model I implemented in OpenFoam. It is a first version, so pherhaps there are some mistakes in it. If you will use it, please let me know about the results.

For version OF2.... you can put the files in a folder in your run folder and type wmake libso. For the simulation you have to change:
1) at the begining of the controlDict include this:
libs
(
"libOpenFOAM.so"
"libincompressibleTurbulenceModel.so"
"libincompressibleLESModels.so"
"libWALELESModel.so"
);
application pimpleFoam;

2) In LES Properties use this:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object LESProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

LESModel WALE;

turbulence on;

printCoeffs on;

delta cubeRootVol;

cubeRootVolCoeffs
{
deltaCoeff 1;
}
WALECoeffs
{
cw 0.325;
}

That should work and solve your problem.

kind regards
Florian
itchy is offline   Reply With Quote

Old   March 18, 2014, 03:44
Default
  #96
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
ok .tar is a invalid file in this forum?????

here a zipped tar:
I hope this will work
Attached Files
File Type: gz WALE.tar.gz (2.4 KB, 29 views)
prezza likes this.
itchy is offline   Reply With Quote

Old   March 18, 2014, 03:47
Default
  #97
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi,

the description in the headerfile is from Smagorinsky-Model. But the imoplemented model is WALE.

kind regards
Florian
itchy is offline   Reply With Quote

Old   March 18, 2014, 08:29
Default
  #98
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi Palmerlee,

van Driest damping is not a good choice for dynamic models. For static Smagorinsky you can use it. In my opinion there are two easy possibilities. WALE-Model or Vreman Model. These two models are very "easy" to implement.

Do you have incompressible flow??
...
Hi, Florian!

Thank you very much for the code and the description! I will dig deep in this WALE model.

Yes, my case have incompressible flow. It is a jet impingement flow, which has three different flow regimes: the free jet region, the stagnation
region and the wall jet region. Most LES simulations for this type of flow use the dynamic Smagorinsky model in literature. You said that van Driest damping is not a good choice for dynamic models, can you explain it to me a little, perhaps?

Best regards
Peter
palmerlee is offline   Reply With Quote

Old   March 18, 2014, 10:12
Default
  #99
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi Peter,

usually van Driest is used to model the behaviour of nuSgs ~ ył near the wall. The dynamic procedure of Germano do the same by changing the Smagorinsky-parameter. So I would not use van Driest for dynamic models, because both do the same. The advantage of the dynamic model is, that you don't have to "guess" the Smagorinsky-constant. The model will do that for you.

Important is, what model do you use?? Is it the homogeneousDynSmagorinsky-Model in OF?? If yes, the constant is averaged over the whole domain. That would be bad near the wall.

If you use a dynamicSmagorinsky model, how do you smooth the Smagorinsky-parameter. A local smoothing can be wrong near the wall (in my opinion). Pherhaps it is better to underrelax the Smagorinsky-parameter over time and than do the clipping. Or, if it is stable, do not smooth the Smagorinsky-parameter.

You can also do LES with wall functions log-law, Werner-Wengle-model and so on. This should be better than damping.

I'm not so familar with impinging jets. I will check this topic and let you know.

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

Old   March 19, 2014, 02:44
Default
  #100
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi Peter,

usually van Driest is used to model the behaviour of nuSgs ~ ył near the wall. The dynamic procedure of Germano do the same by changing the Smagorinsky-parameter. So I would not use van Driest for dynamic models, because both do the same. The advantage of the dynamic model is, that you don't have to "guess" the Smagorinsky-constant. The model will do that for you.

Important is, what model do you use?? Is it the homogeneousDynSmagorinsky-Model in OF?? If yes, the constant is averaged over the whole domain. That would be bad near the wall.

If you use a dynamicSmagorinsky model, how do you smooth the Smagorinsky-parameter. A local smoothing can be wrong near the wall (in my opinion). Pherhaps it is better to underrelax the Smagorinsky-parameter over time and than do the clipping. Or, if it is stable, do not smooth the Smagorinsky-parameter.

You can also do LES with wall functions log-law, Werner-Wengle-model and so on. This should be better than damping.

I'm not so familar with impinging jets. I will check this topic and let you know.

kind regards
Florian
Hi, Florian!

Thanks a lot for the reply! I use the dynamicSmagorinsky model from here: https://bitbucket.org/albertop/dynamicsmagorinsky

The Description is:
Quote:
"Implementation of the dynamic Smagorinsky model with coefficients cD and
cI computed as local average of their face values to avoid numerical
instabilities.
Negative values of the effective viscosity are removed by clipping it to
zero (nuSgs is clipped to -nu)"
By "smooth the Smagorinsky-parameter", do you mean "compute the coefficients as local average of their face values" in this case?

Best regards
Peter
palmerlee 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
help for different between les model (subgrid-scale model) liuyuxuan FLUENT 1 October 2, 2009 16:25
LES and combustion model Margherita Cadorin CFX 0 October 29, 2008 06:24
regarding eddy break up model dj CFX 0 September 30, 2003 03:05
Why Turbulence models are not universal. Senthil Main CFD Forum 4 July 5, 2000 05:34
Advanced Turbulence Modeling in Fluent, Realizable k-epsilon Model Jonas Larsson FLUENT 5 March 13, 2000 04:27


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