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

Which Stress Tensor is Obtained from LES in OpenFOAM?

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By Tobermory
  • 2 Post By Tobermory
  • 1 Post By Tobermory
  • 1 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 18, 2021, 14:16
Question 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: 6
NotDrJeff is on a distinguished road
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 sub-grid (residual) stress tensor, composed of the means of the products of the sub-grid velocity components? I think this might be sometimes represented by B?

Thank you!
NotDrJeff is offline   Reply With Quote

Old   August 25, 2021, 08:28
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14
Tobermory will become famous soon enough
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.
NotDrJeff likes this.

Last edited by Tobermory; August 25, 2021 at 14:14. Reason: Clarifying a mistake
Tobermory is offline   Reply With Quote

Old   August 25, 2021, 10:24
Default
  #3
New Member
 
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 6
NotDrJeff is on a distinguished road
Thank you for your input. Actually I'm using a set of FOAM-based solvers called SOWFA. They grab R from OpenFOAM using
Code:
turbulence->R()
I already looked at the page you shared and saw R given as "Reynold's stress tensor" but was confused as to what this referred to in LES. The literature I've been using is a bit unclear when it comes to naming conventions.

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, \tau_{ij}=\overline{u'_{i}u'_{j}}, dependent on the fluctuating components of the velocity. (Here overbar refers to time-averaged 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, \tau_{ij}=\widetilde{U_{i}U_{j}}-\widetilde{U}_i\widetilde{U}_j. (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 "Sub-grid 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 "Cross-stresses", 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 10:27. Reason: grammar
NotDrJeff is offline   Reply With Quote

Old   August 25, 2021, 12:01
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14
Tobermory will become famous soon enough
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)))
and this is the residual stress or SGS stress tensor (agreed that terminology varies), \tau_{ij}=\widetilde{U_{i}U_{j}}-\widetilde{U}_i\widetilde{U}_j, that you refer to in your post (the filtered non-linear term minus the advection term).

This SGS stress tensor can be decomposed, like Leonard did, into terms that have some basic "physical" meaning, by expanding out the terms in \widetilde{U_{i}U_{j}} into filtered and perturbation terms,
eg:

\tau_{ij}= L_{ij} + C_{ij} + R_{ij}

L_{ij} = \widetilde{\tilde{U_{i}}\tilde{U_{j}}} - \tilde{U_{i}} \tilde{U_{j}}

R_{ij} = \widetilde{u_{i}' u_{j}'}

C_{ij} = \widetilde{\tilde{U_{i}} u_{j}'} + \widetilde{\tilde{u_{i}' U_{j}}}

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 \tau_{ij} 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;
while the implementation .C file has:
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
     );
}
so if I read this right, it should be the same as the B field (ie the SGS stress term, \tau_{ij} )... does that bear out from your simulations? The confusion comes from OpenFOAM's (mostly laudable) habit of reusing code for multiple different purposes - here, using the RAS eddy viscosity code for LES closure models.
eternityboy and NotDrJeff like this.
Tobermory is offline   Reply With Quote

Old   August 25, 2021, 12:25
Default
  #5
New Member
 
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 6
NotDrJeff is on a distinguished road
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,
NotDrJeff is offline   Reply With Quote

Old   August 25, 2021, 12:29
Default
  #6
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14
Tobermory will become famous soon enough
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 !
NotDrJeff likes this.
Tobermory is offline   Reply With Quote

Old   August 25, 2021, 14:12
Default
  #7
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14
Tobermory will become famous soon enough
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 post-processing 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!
NotDrJeff likes this.
Tobermory is offline   Reply With Quote

Reply

Tags
les, stress tensor


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
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin cfd.direct OpenFOAM Announcements from Other Sources 0 September 21, 2016 12:50
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 04:19
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
LES: mean wall shear stress Francois FLUENT 0 July 7, 2005 12:15


All times are GMT -4. The time now is 01:46.