CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Utilities: post average turbulence fields and create turbulence fields for LES (

Hanzo February 7, 2013 09:39

Utilities: post average turbulence fields and create turbulence fields for LES
4 Attachment(s)
Hi everybody,

I found the following issues in OpenFOAM concerning some turbulence analysis:

- the utility createTurbulenceFields only works for RAS computations
- there is no standard utility to average fields after computation has been done (to get U-mean, U-rms, R-Mean, Reff-Mean ...)

So I worked on these utilities and after mentioning it in some posts I got replies and private messages asking me if I could publish them. So here they are:


Is a tools which writes out the fields k,epsilon, R, Reff after a RAS or LES simulation has been performed.


Inspired by eelcovv, who wrote the tool postAverage, I extended his tools to be also able to post average the fields R and Reff. Again RAS and LES are supported.
The post can be found here

How to use these utilities

Please find attached the modified tutorials

- pitz_daily_les
- cavity_ras

Including Allrun scripts which show how to use these tools.

How to install

- copy the contents from the archives "" and "" into the folder username-2.1.1/application/utilities

- go into each of the folders postAverageTurbulenceFields and createTurbulenceFieldsLES and type wmake

It also worked under OpenFOAM 1.6.

Known issues

- for some reason, which I did not figure out, averaging the Reynolds stress tensor for RAS computations does not work (but works for Reff)

- if the output setting for the averaging is set to certain values, nothing is written. However, it works for output intervals 1 and 2 (just delete the unnecessary files after averaging)

I am happy about any comments how to improve these tools or if there is a better way to post own code.


atmcfd February 9, 2013 16:37


Great work and thanks for all the efforts you have put in. I will give these tools a try and let you know.



ghindi November 6, 2013 04:36

Energy spectrum - LES simulation
Hi there!

I'm relatively new to LES simulation and I'm struggling now to post-process energy spectrum to verify the -5/3 law for my model.

Does anyone know how to extract/create that field in OF?

Best regards,

rakendd November 26, 2014 17:14

Want to calculate UPrime2Mean
Hi all
Sorry for opening up this old thread.
I want to calculate UPrime2Mean in LES post-processing.
createTurbulenceFieldsLES is calculating R and Reff but these values are different from UPrime2Mean
postAverageTurbulenceFields giving

Create time

Create mesh for time = 0

Adding fields for time 0
Reading field p

Reading field k

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model oneEqEddy
--> FOAM Warning :
From function cubeRootVolDelta::calcDelta()
in file cubeRootVolDelta/cubeRootVolDelta.C at line 52
Case is 2D, LES is not strictly applicable

ce 1.048;
ck 0.094;

Reading/calculating field UMean

Reading/calculating field pMean

Reading/calculating field UPrime2Mean

Reading/calculating field pPrime2Mean

fieldAverage: starting averaging at time 0

Calculating averages

but nothing is being calculated.
Can someone help me in this...
Thank you.

All times are GMT -4. The time now is 13:49.