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   July 9, 2010, 09:52
Default
  #41
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
Take a look here:

http://foam.sourceforge.net/doc/Doxy...agorinsky.html
__________________
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.

Last edited by alberto; July 9, 2010 at 09:53. Reason: Corrected link
alberto is offline   Reply With Quote

Old   July 9, 2010, 20:44
Default
  #42
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by alberto View Post
HI alberto

I am doing the incompressible LES, the reference link you gave above is the choric Smagorinsky Model for compressible flows. However, I found this http://foam.sourceforge.net/doc/Doxy...agorinsky.html

Can you explain a little bit more about the effect of ce?

or can I just use the following without define "ce 1.05;"?

dynSmagorinskyCoeffs
{
filter simple;
}

because I found that ce is defined insrc » turbulenceModels » compressible » LES » GenEddyVisc

00048 LESModel
00049 (
00050 word("GenEddyVisc"), rho, U, phi, thermoPhysicalModel
00051 ),
00052
00053 ce_
00054 (
00055 dimensioned<scalar>::lookupOrAddToDict
00056 (
00057 "ce",
00058 coeffDict_,
00059 1.048
00060 )
00061 ),

Thanks

Jie

Last edited by jiejie; July 9, 2010 at 22:48.
jiejie is offline   Reply With Quote

Old   July 19, 2010, 09:03
Default
  #43
Member
 
Join Date: May 2010
Posts: 42
Rep Power: 15
Zymon is on a distinguished road
Very interesting topic. When I use the oneEqEddy Model I get rather high nuSGS (O(10e-6)) and so too much dissipation. When using the dynamic Smagorinsky Model I get much higher nuSGS (O(10e-8)). The results look better, but sometimes the coefficient become negative (when there is no much turbulence). This results in some instabilities and oscillations. So should I clip the negative nuSGS or is the effect of backscattering useful? Or should I change the parameters a priori and not use a dynamic model to get higher nuSGS with the oneEqEddy Model but no negative values?

Thanks a lot!

edit: I have a low-Re case (about 2000-10000). What LES turbulence model should I use? I read that the dynamic Smag. can handle low-Re cases quite well, but as you mentioned OpenFOAM does not use the original implementation. With the RANS approach I get quite poor results.

Last edited by Zymon; July 19, 2010 at 09:33.
Zymon is offline   Reply With Quote

Old   July 19, 2010, 11:04
Default
  #44
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 Zymon View Post
Very interesting topic. When I use the oneEqEddy Model I get rather high nuSGS (O(10e-6)) and so too much dissipation. When using the dynamic Smagorinsky Model I get much higher nuSGS (O(10e-8)). The results look better, but sometimes the coefficient become negative (when there is no much turbulence). This results in some instabilities and oscillations. So should I clip the negative nuSGS or is the effect of backscattering useful?
You should not clip the nuSGS, but the total viscosity. One of the features of the dynamic model is exactly that it allows backscatter, which means the nuSGS should be allowed to become negative. Additionally it is proven (check the literature for the results) that clipping to the coefficient to zero leads to excessive dissipation.

With a student I implemented the dynamic Smagorinsky with local averages to compute the coefficient, checking that the total viscosity stays positive and finite. We did not notice particular numerical problems with this implementation.

Best,
__________________
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   July 20, 2010, 04:15
Default
  #45
Member
 
Join Date: May 2010
Posts: 42
Rep Power: 15
Zymon is on a distinguished road
Thanks Alberto. I did the clipping as you said.

I am now facing some convergence problems with the dynsmag modell. I know my boundary conditions aren't optimal. I just have the amount of pressure at the inlet and outlet from experiments. So I have a fixed Value for the pressure both at the inlet and outlet. For the velocity I chose pressureInletOutletVelocity. For the convective term I have the linear upwind differencing with cell limitation. The CDS produces too much oscillation. The problem occurs at the inlet, where the grid is rather coarse. I don't use boundary layers, because the Mesher (NETGEN) then generates meshs with very high aspect ratios and non-orthogonality and OpenFOAM can't handle these, of course. Is this the problem? I think dynsmag is very sensitive to the mesh quality.

With the oneEqEddy I am not facing any troubles, it can handle the unsteadiness much better, but there is a lot of dissipation. At the critical parts the nuSgs is quite high, what "smears out the divergence". My prof said I shouldn't change my settings but stick to a stable method.

Btw. I have a flow through an orifice problem. The pictures attached are just a very simple test model, the real model is much more complex. The first picture shows the result of the oneEqEddy, the second picture the result of the dynsmag. I can send you some more pictures and my settings, if you want to help me. But I don't want to publish them here.
Attached Images
File Type: jpg run.0010.jpg (39.2 KB, 165 views)
File Type: jpg dynsmag.jpg (21.5 KB, 177 views)
Zymon is offline   Reply With Quote

Old   July 20, 2010, 08:04
Default
  #46
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
Could you post a picture of the mesh? Is it a tet mesh or a hex mesh?

The system you are showing can be meshed with blockMesh fairly easily, obtaining a fully hex mesh. I'm not sure about the more complicated case you are talking about.

On a side note, for LES, linearUpwind is way too dissipative. There is not much to do if not using a central scheme if you want accurate results.

Best,
__________________
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   July 20, 2010, 10:49
Default
  #47
Member
 
Join Date: May 2010
Posts: 42
Rep Power: 15
Zymon is on a distinguished road
The geometry, which is shown in the above pictures, was meshed with blockMesh. So I have a fully hex mesh here. With this geometry I don't have any convergence problems at all. The complex geometry is a segmentation from images of the heart. So I don't have this block structure any more and therefore a tet mesh. The second picture below shows the result when using a central scheme with the oneEqEddy model. The convergence zone in the right chamber should be a perfect hemisphere, what is not true in this case by contrast to the linearupwind scheme.

Is it better to use a mesh with a prismatic boundary layer and high aspect ratios and non-orthogonality cells (at the boundary) or a nice fully tet mesh?

I now understand that because of the globally averaged coefficients dynSmag is only formally applicable to homogeneous turbulence e.g. in a box with cyclic boundaries (as henry mentioned somewhere here in the forum). So it is not very useful for my case. What about the locDynOneEqEddy (with cuberoot)? It makes use of local coefficients and is thus more applicable to not fully developed turbulent flows. First results are quite promising. As far as I can see, it does not produce negative nuSgs, but values of 0 in laminar regions. I think the problem why the dynSmag diverges when using my complex model, is because I have just a small amount of turbulent flow and hence the coefficient is not caculated usefully. What do you think? I would like to change the dynsmag to a local approach, but I guess I don't have enough time till the end of my thesis.
Is the description in the locDynOneEqEddy.H file correct? It reads: nuSgs = cD*delta^2*||D||, but in the locDynOneEqEddy.C file it is nuSgs_ = ck(D,KK)*sqrt(k_)*delta();. Does anybody know if there is any paper this SGS is based on?

The third picture shows the result of the locdynone. model with cds. Very poor outcome as with the oneeqeddy model. The fourth picture shows the result of the locdynone. model using the linear upwind scheme. I think this result is quite good, the method seems to be stable and in my opinion not too dissipative. I'll run my complex model with this setting tonight.

Sorry for asking so many questions, but I don't have anybody else to ask for. Thanks a lot!
Attached Images
File Type: jpg mesh.jpg (84.7 KB, 136 views)
File Type: jpg run.0010.jpg (43.6 KB, 86 views)
File Type: jpg les.locdynlinear.jpg (21.8 KB, 96 views)
File Type: jpg les.locdynlinupwind.jpg (22.8 KB, 99 views)
Zymon is offline   Reply With Quote

Old   July 20, 2010, 10:58
Default
  #48
New Member
 
Jiang Lijun
Join Date: Mar 2009
Posts: 14
Rep Power: 17
L.J.Jiang is on a distinguished road
Hi, Zymon

It seems that upwind scheme is not proper in LES if you want to get accuracy result, maybe filteredLinear scheme is better :-)

Best,
Lijun
L.J.Jiang is offline   Reply With Quote

Old   July 20, 2010, 14:47
Default
  #49
Member
 
Join Date: May 2010
Posts: 42
Rep Power: 15
Zymon is on a distinguished road
Ok, I understand why upwind schemes are not a good idea for LES. What about usind a TVD Scheme like limitedlinear which is less dissipative but more stable then cds? I have found several papers that show good results using LES with limited linear differencing, for example:

http://bbaa6.mecc.polimi.it/uploads/...02_STAMPA1.pdf
solefire likes this.
Zymon is offline   Reply With Quote

Old   July 20, 2010, 17:52
Default
  #50
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
There are many studies in the literature on this topic, which has been discussed already. I suggest you do a little research to find out the details.

Best,
__________________
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   July 21, 2010, 00:05
Default
  #51
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Reference is found.
Attached Images
File Type: jpg Lilly.jpg (6.2 KB, 116 views)

Last edited by jiejie; July 22, 2010 at 08:22.
jiejie is offline   Reply With Quote

Old   July 21, 2010, 02:04
Default
  #52
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 309
Rep Power: 18
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
Quote:
Originally Posted by jiejie View Post
Hi alberto

I noticed that the dynSmagorinsky in OpenFOAM is not how the original dynamic Smagorinsky model is supposed to work. I am now trying to understand the way it is implemented in OpenFOAM. Do you know any reference in the literature about the method used in dynSmagorinsky in OpenFOAM as I could not really find any thing about averaging tje coefficient on the whole domain?

Thank you
Hi JieJie:
Actually, you are right , the dynSmagorinsky model in OF is not the original one, the model in OF use time average instead of ensamble average. But I think it is not applicatable to use ensamble average or time average both, as the later is only meanful for steady turbulence. the use of the ensamble average is only to make the model stable (you can find in Lillys`paper of Zhang Z S`s book.

I have applied a modified model ,you can find it in Cfluid ( http://www.cfluid.com/bbs/viewthread...extra=page%3D1) , the model equation could be found in help document of ANSYS CFX


wayne
palmerlee likes this.
waynezw0618 is offline   Reply With Quote

Old   July 21, 2010, 02:23
Default
  #53
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by waynezw0618 View Post
Hi JieJie:
The use of the ensamble average is only to make the model stable (you can find in Lillys`paper of Zhang Z S`s book.

wayne

Hi wayne, can you be more specific about the Lilly's paper or the name of Zhang Z S`s book? or do you have the reference for the model used in OpenFOAM?
jiejie is offline   Reply With Quote

Old   July 21, 2010, 07:45
Default
  #54
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 309
Rep Power: 18
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
Quote:
Originally Posted by jiejie View Post
Hi wayne, can you be more specific about the Lilly's paper or the name of Zhang Z S`s book? or do you have the reference for the model used in OpenFOAM?
张兆顺: 湍流大涡数值模拟的理论和应用
Lilly D K.1992,A propossed modifcation of the Germano subgrid scale closure method.Physics FLuids,A 4: 633


By the I don`t have the reference of the model in OpenFOAM, and I don`t believed there is some about that, becasuse,It is useless
waynezw0618 is offline   Reply With Quote

Old   July 21, 2010, 08:00
Default
  #55
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by waynezw0618 View Post
张兆顺: 湍流大涡数值模拟的理论和应用
Lilly D K.1992,A propossed modifcation of the Germano subgrid scale closure method.Physics FLuids,A 4: 633


By the I don`t have the reference of the model in OpenFOAM, and I don`t believed there is some about that, becasuse,It is useless
Hi waynezw0618

I have read Lilly's paper, I probably found the reference of OpenFOAM dynSamgorinsky from "A comparative study of subgrid scale models in homogeneous isotropic turbulence" by Fureby C. 1996.

Last edited by jiejie; July 22, 2010 at 08:22.
jiejie is offline   Reply With Quote

Old   July 23, 2010, 03:09
Default
  #56
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by xiao View Post
The best way to prove (or disprove) is to take a channel chase, and do a few tests. An implementation of the "correct" dynamic model (with Cs varying both spatially and temporally, as opposed to only temporally in OpenFOAM, pointed out by Alberto) should not be challenging, however, a comprehensive testing is. As I said in a previous post, the developers must have had some reason to implement the dynamic models this way. If it were easy, they should have implemented according to the original formulation.

I will have a student to investigate this issue at a later time as his "semester project" (after the Easter break). Certainly we will share the findings here. If anyone has any input, we would be happy to know.

Best,
Heng
Hi Xiao

Have you found anything regarding to the spatial averaging of the cD and cI?

Thanks

Last edited by jiejie; July 23, 2010 at 03:50.
jiejie is offline   Reply With Quote

Old   July 23, 2010, 10:03
Default
  #57
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
The original Germano model was averaged along the homogeneous direction in a channel, since such a direction exists.

The model implemented in OpenFOAM obtains a single value of coefficients using spatial averaging, which makes the dynamic procedure quite useless.
\The dynamic procedure is supposed to allow backscatter to be accounted for, and to make the wall damping functions not necessary, since the model can have zero coefficient. If you use a single-valued coefficient, these features are completely lost.

What you can do to avoid numerical instabilities is to keep the coefficients local, but averaging on neighbors, and then clip the effective viscosity so that it is not negative.

Best,
solefire and palmerlee like 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   July 23, 2010, 10:17
Default
  #58
Member
 
Join Date: May 2010
Posts: 42
Rep Power: 15
Zymon is on a distinguished road
What about the locDynOneEqEddy? It makes use of a local coefficient. In my model it works quite well, better than the dynamic Smagorinsky. Do you know wether it is implemented properly?
Zymon is offline   Reply With Quote

Old   July 25, 2010, 22:40
Default
  #59
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by alberto View Post

What you can do to avoid numerical instabilities is to keep the coefficients local, but averaging on neighbors, and then clip the effective viscosity so that it is not negative.

Best,
Hi alberto

Thanks for your reply.

Again, does this forbid the back scattering and does not allow the energy transfer from the small scale to the large scale?

or is it possible just to remove the averaging part of the code in the dynSmagorinsky model and how bad is it in terms of stability?
jiejie is offline   Reply With Quote

Old   July 28, 2010, 18:15
Default
  #60
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Hi to all,
this topic is full of interesting issues for LES practioneers and researchers.

I am working on the quality and realibility of LES implemented in OF along with some collegues.
We decided to test the compressible version of the code in low-Mach conditions, performing the classic plane channel turbulent flow at Re_tau=590.
The dynamic procedure for the SGS modelling is supplied.

Testing the code in such condition was not so easy because of the requirement of adding the proper forcing term in momentum and energy equations.

At present, results obtained on a 64x100x64 cartesian grid are not satisfactory both in the zero-order statistics (the streamwise averaged profile) and in the energy spectra. This latter shows for the three velocity components along the streamwise wavenumber a very strange peak in the inertial range, transfer of energy is therefore not monotone. This is not a numerical pile-up since the peak is about 10 wavenumbers before the Nyquist wavenumber, the energy is well dissipated at the cut-off wavenumber.
The SGS model does not change the presence of the peak (no-model solution showed the same behaviour)
No other peaks appear in the energy spectra along the spanwise wavenumber.

I am quite sure that the reason is due to some acoustic interference caused by the low-Mach condition. The PISO solver should be able to manage such critical case...

Does anyone had similar experience?

Thanks
Filippo
FMDenaro 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 15:25
LES and combustion model Margherita Cadorin CFX 0 October 29, 2008 05:24
regarding eddy break up model dj CFX 0 September 30, 2003 02:05
Why Turbulence models are not universal. Senthil Main CFD Forum 4 July 5, 2000 04:34
Advanced Turbulence Modeling in Fluent, Realizable k-epsilon Model Jonas Larsson FLUENT 5 March 13, 2000 03:27


All times are GMT -4. The time now is 21:29.