View Issue Details

IDProjectCategoryView StatusLast Update
0000099OpenFOAMBugpublic2021-07-13 15:27
Reporteralbertop Assigned Tohenry  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
PlatformLinuxOSOpenSuseOS Version11.3
Summary0000099: Dynamic Smagorinsky model with local coefficient values
DescriptionThe current implementation of the dynamic Smagorinsky model in OpenFOAM uses a domain-averaged coefficient to compute the SGS stress tensor. This is not appropriate, since it removes the major advantage of the Smagorinsky model, which should tend to the correct limit near walls, and should be able to describe backscattering (negative SGS viscosities). I replaced the domain average with a local face average to compute the coefficients: cI=<K*m>_face/<m*m>_face, and cD=<L.M>_face/<M.M>_face, where <...>_face is fvc::average(...). Additionally, to stabilize the numerical procedure, the SGS viscosity is limited so that it cannot become negative and smaller than -nu (laminar viscosity).

Steps To ReproduceN/A
Additional Information- I called the model dynLocalAverageSmagorinsky to distinguish it from the currently implemented dynSmagorinsky, but it is actually the same model, with the differences explained above.

- The header contains my copyright statement, since the code is in my GitHub repository ( git://github.com/AlbertoPa/dynLocalAverageSmagorinsky.git ). If you include the code in OpenFOAM, consider the copyright transferred to OpenCFD, and replace the header.
TagsNo tags attached.

Activities

albertop

2010-12-05 21:24

reporter  

henry

2010-12-05 21:42

manager   ~0000156

The dynamic Smagorinsky model dynSmagorinsky does what it is designed to do which is model the sub-grid turbulence in homogeneous turbulence. If you want to use a dynamic model with local averaging you can use locDynOneEqEddy but the averaging region is small and rather arbitrary and causes problem for complex flows. An alternative would be to use a form of Lagrangian averaging for the coefficients....

albertop

2010-12-05 22:36

reporter   ~0000158

I disagree. The dynamic Smagorinsky model, as implemented in OpenFOAM, does not reflect the original implementation. The current implementation uses a constant value of the coefficients in the whole computational domain, which is not what is done in the dynamic model, where Cs should properly tend to small values when approaching, for example, a wall, or where the flow laminarizes.

The current implementation in OpenFOAM is simply a traditional Smagorinsky model with Cs determined from the flow, but it loses one of the fundamental advantages of the dynamic procedure, which is being able to describe what happens near walls, or where the flow laminarizes, without any need of damping functions.

The original model of Germano relied on averaging along the homogeneous direction, since one existed in his channel flow, but Cs could change normally to walls. However the averaging was a justified workaround to avoid numerical difficulties.

Averaging on cell faces does not really introduce any major error, given the grid resolution required to perform LES, and it mitigates the chances of having a very small number in the division to compute Cs.

The implementation I attached has been widely tested on channel flows, and in much more complicated cases in chemical reactors for mixing applications, without observing numerical difficulties and with results in excellent agreement with PIV experiments.

henry

2010-12-05 22:40

manager   ~0000159

Different averaging is appropriate for different purposes and the averaging in dynSmagorinsky is the most appropriate for the purpose for which it was written. Perhaps you would prefer that dynSmagorinsky were renamed but given that it is a name we created and not the name Germano or others used I am not sure what the problem is with it.

albertop

2010-12-05 23:05

reporter   ~0000160

In the literature, "dynamic Smagorinsky" identifies a model where the coefficient is computed locally and based on the flow conditions. Your implementation follows the dynamic procedure suggested by Germano, but then it throws away its advantages by averaging on the whole computational domain. I understand why this was done, however it confused quite some users, who believed to deal with the dynamic Smagorinsky model they find described in the literature and implemented in other codes.

henry

2010-12-05 23:08

manager   ~0000161

There are many many forms of dynamic SGS models which use various form of averaging. The one under the name dynSmagorinsky uses the recommended and appropriate averaging for simulating homogeneous turbulence which is what we implemented it for. If you are not simulating homogeneous don't use it.

albertop

2010-12-06 03:30

reporter   ~0000162

Yes, I am aware there are various approaches to define the dynamic coefficient. However, I do not see the assumption of homogeneous turbulence clarified anywhere (you have to check the implementation to see it), and it is surely less general and more arbitrary than a local average, if implemented in a general code as OpenFOAM is.

To conclude, I based my implementation on what is usually done for LES on unstructured grids (S.E. Kim, Large Eddy Simulation Using an Unstructured Mesh Based Finite-Volume Solver, American Institute of Aeronautics and Astronautics, 34th Fluid Dynamics Conference and Exhibit, AIAA-2004-2548, June 2004), but allowing back-scattering. Their approach has been implemented in commercial codes, which additionally limit the coefficient to zero, and they also fix an upper limit for it. Both these assumptions are however arbitrary, and I did not include them. Clipping the effective viscosity might be rough, but it has a physical foundation, and successfully stabilizes the code.

henry

2010-12-06 08:38

manager   ~0000164

I agree that the description in dynSmagorinsky is not sufficient and we will elaborate in the next version.

henry

2021-07-13 15:27

manager   ~0012083

The dynSmagorinsky model has been removed as it is not generally useful or worth maintaining.

Issue History

Date Modified Username Field Change
2010-12-05 21:24 albertop New Issue
2010-12-05 21:24 albertop File Added: dynLocalAverageSmagorinsky.tar.gz
2010-12-05 21:42 henry Note Added: 0000156
2010-12-05 21:42 henry Status new => closed
2010-12-05 21:42 henry Assigned To => henry
2010-12-05 21:42 henry Resolution open => fixed
2010-12-05 22:36 albertop Note Added: 0000158
2010-12-05 22:36 albertop Status closed => feedback
2010-12-05 22:36 albertop Resolution fixed => reopened
2010-12-05 22:40 henry Note Added: 0000159
2010-12-05 22:41 henry Status feedback => closed
2010-12-05 22:41 henry Resolution reopened => fixed
2010-12-05 23:05 albertop Note Added: 0000160
2010-12-05 23:05 albertop Status closed => feedback
2010-12-05 23:05 albertop Resolution fixed => reopened
2010-12-05 23:08 henry Note Added: 0000161
2010-12-05 23:08 henry Status feedback => closed
2010-12-05 23:08 henry Resolution reopened => fixed
2010-12-06 03:30 albertop Note Added: 0000162
2010-12-06 03:30 albertop Status closed => feedback
2010-12-06 03:30 albertop Resolution fixed => reopened
2010-12-06 08:38 henry Note Added: 0000164
2010-12-06 08:52 henry Status feedback => acknowledged
2010-12-06 08:53 henry Status acknowledged => resolved
2010-12-06 08:53 henry Resolution reopened => suspended
2021-07-13 15:27 henry Note Added: 0012083
2021-07-13 15:27 henry Resolution suspended => fixed