
[Sponsors] 
Which Stress Tensor is Obtained from LES in OpenFOAM? 

LinkBack  Thread Tools  Search this Thread  Display Modes 
August 18, 2021, 13:16 
Which Stress Tensor is Obtained from LES in OpenFOAM?

#1 
New Member
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 5 
Hello,
Not sure if this is a stupid question or not, but could someone clarify what the 'R' turbulence quantity represents when postProcessing an LES simulation in OpenFOAM? Is it the Reynolds stress tensor, composed of the means of the products of the fluctuating velocity components? Or is it the subgrid (residual) stress tensor, composed of the means of the products of the subgrid velocity components? I think this might be sometimes represented by B? Thank you! 

August 25, 2021, 07:28 

#2 
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 673
Rep Power: 14 
I am assuming that you are running postProcess to strip out R? If so, this is calling turbulenceFields to calculate R, and the documentation (https://cpp.openfoam.org/v8/classFoa...s.html#details) states that R is the Reynolds stress tensor. Since this is used universally across all of the turbulence models, it is safe to assume that this is the resolved stresses. The SGS stresses are in the B field, which is saved by the LES solver and should be present in each of your time folders.
EDIT: this is cobblers! The assumption is not "safe" ... is wrong in fact! See below. Last edited by Tobermory; August 25, 2021 at 13:14. Reason: Clarifying a mistake 

August 25, 2021, 09:24 

#3 
New Member
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 5 
Thank you for your input. Actually I'm using a set of FOAMbased solvers called SOWFA. They grab R from OpenFOAM using
Code:
turbulence>R() I think I've made some progress in my understanding since I asked the question. In RANS, the averaging of the NS equations results in an additional term which we call the Reynold's stress, , dependent on the fluctuating components of the velocity. (Here overbar refers to timeaveraged values. I have neglected density in my definition) In my initial question, I was asking if we somehow calculate this same Reynold's stress when doing LES. But I'm now presuming that this would be impossible to recover. (We could calculate an approximate fluctuating velocity component from the mean and instantaneous values of the filtered velocity, and use this to calculate a Reynold's stress if we wanted to for some reason, but this is would not be the "true" fluctuating component of velocity.) In LES, the filtering produces an analogous but different stress tensor, . (Here, tilde represents the filtered velocity) It does not seem that there is a conventional name for this. Pope, 2002 calls it "Residual Stress" (Despite the fact that it is also dependent on resolved velocities) while Versteeg, 2007 calls it "Subgrid scale stress". My guess is that this is what R represents when doing LES in OpenFOAM, but I wanted confirmation of this. Confusion arises because in both Pope and Versteeg, the symbol R is reserved for only one of the three terms which the "SGS stress" can be decomposed into, alongside "Leonard's stresses", L, and "Crossstresses", C. Also confusingly, Versteeg calls this the "LES Reynold's Stress". Maybe this is what B refers to? (I haven't actually seen B in literature. Only on this forum and was confused what it represented) My understanding is that we usually don't calculate these terms separately, but calculate we only the "SGS stress" I would appreciate clarification if I have understood the above correctly Sorry for the long post! Thank you, Last edited by NotDrJeff; August 25, 2021 at 09:27. Reason: grammar 

August 25, 2021, 11:01 

#4 
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 673
Rep Power: 14 
No problem  it's usually "simple" questions like yours that provide the most learning when you dig into them!
Let's clear up first what B is. If you look in one of the LES models (take Smagorinsky, as an example, https://cpp.openfoam.org/v8/classFoa...y.html#details) then B is defined as: Code:
B = 2/3*k*I  2*nuSgs*dev(symm(grad(U))) This SGS stress tensor can be decomposed, like Leonard did, into terms that have some basic "physical" meaning, by expanding out the terms in into filtered and perturbation terms, eg: and this is probably where your confusion comes  the R in this decomposition is the sgs Re stress ... and that is NOT what postProcess returns as "R". Indeed, for many LES models that sgs Re stress term is not available / not modelled. For example, in the simple Smagorinsky LES model, the whole SGS stress term term is modelled by a basic eddy viscosity analog. So what is postProcess returning? Very good question! If you dig into turbulenceFields.C (https://cpp.openfoam.org/v8/turbulen...8C_source.html) you can see that R returns model.sigma(). For a Smagorinsky closure, the class is derived from class LESeddyViscosity, which itself is derived from class eddyViscosity, and in the header this class sigma() is defined as: Code:
// Return the Reynolds stress tensor [m^2/s^2] virtual tmp<volSymmTensorField> sigma() const; Code:
Foam::eddyViscosity<BasicMomentumTransportModel>::sigma() const { ... return volSymmTensorField::New ( IOobject::groupName("R", this>alphaRhoPhi_.group()), ((2.0/3.0)*I)*tk()  (nut_)*dev(twoSymm(fvc::grad(this>U_))), patchFieldTypes ); } 

August 25, 2021, 11:25 

#5 
New Member
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 5 
Thank you taking the time to do this. This clarifies things.
I'm not used to looking through and understanding the source code yet, so I don't think I'd have found that. I'll have a look at my results again when I get the chance. I find it strange that their are two fields with the same definitions. Regards, 

August 25, 2021, 11:29 

#6 
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 673
Rep Power: 14 
Haha  no problem. The Doxygen pages are a little difficult to get your head around, to start with, but can be REALLY useful once you get the knack of it. And like everything with OF, you will get better the more you practice / use it.
As for the duplication  yes, it is a little odd. But there is always the possibility that I am wrong ! 

August 25, 2021, 13:12 

#7 
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 673
Rep Power: 14 
Thinking more on this, the duplication does make a sort of sense. B is the working field for the LES solver, whilst R from postProcess is a postprocessing quantity, whose meaning varies subtley depending on the choice of closure model employed. R is equivalent to sigma() from the selected momentumTransportModel), which is:
And this makes sense  to get the DNS or LES Reynolds stress, you need to do some time averaging, and collect the first and second order statistics (mean and variance fields); you cannot just extract it from the instantaneous fields. It would be nice if the documentation stated this, though! 

Tags 
les, stress tensor 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
OpenFOAM Training JanApr 2017, Virtual, London, Houston, Berlin  cfd.direct  OpenFOAM Announcements from Other Sources  0  September 21, 2016 11:50 
OpenFOAM Training, London, Chicago, Munich, Houston 20162017  cfd.direct  OpenFOAM Announcements from Other Sources  0  September 14, 2016 03:19 
New OpenFOAM Forum Structure  jola  OpenFOAM  2  October 19, 2011 06:55 
Crosscompiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingww64  wyldckat  OpenFOAM Announcements from Other Sources  3  September 8, 2010 06:25 
LES: mean wall shear stress  Francois  FLUENT  0  July 7, 2005 11:15 