CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   New implemented algebraic Reynolds stress model (

volker May 5, 2010 05:07

New implemented algebraic Reynolds stress model
1 Attachment(s)
Hi all,

I have implemented a new algebraic Reynolds stress model for two and three dimensional incompressible flows. The model is written in Low-Re formulation in order to get accurate Reynolds stress in the near-wall region and to get the right gradients for heat and mass transfer purposes. The model is based on the Wallin paper “An explicit algebraic Reynolds stress model for incompressible and compressible turbulent flows”, J. Fluid. Mech., 200, vol. 403, pp. 89-132.
In addition, there are two production limiters implemented according to Jones and Launder and one according to Menter. Thanks to Wayne Zhang from the forum here, there is also a curvature correction included based on the Richardson number , to be found in the A. Hellsten paper “Some Improvements in Menter's K-Omega SST Turbulence Model” AIAA A98-32817.
I made some simulations for a turbulent pipe flow and compared the results with data obtained from DNS and experiments. The results are in very good agreement.
But there is still some room for improvements. At this stage, the crucial point is to loop back the Reynolds stress tensor obtained from the algebraic stress model into the momentum equation. This is to get rid of Boussinesq's analogy in standard eddy viscosity models.
If anybody is interested in a well performing algebraic Reynolds stress model, I would appreciate any help and ideas for improvements.
It might be also interesting to have it ready for the next release of OpenFOAM, since to my knowledge there is no Reynolds stress model in Low-Re formulation which gives satisfying results.

If anybody is interested in the papers, I can send it to him, no problem.

Greets, volker

The turbulence model needs dynamic compilation with:
"wmake libso"
libs ("");
has to be added in ControlDict

idrama May 6, 2010 05:14

Hello volker,

i wanted to try it. Unfotunately, I got this error message:

make: *** No rule to make target `/home/idrama/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude/cellDistFuncsTemplates.C', needed by `kOmegaSST_Wallin_CC.dep'. Stop.

What do I do to get it running?



volker May 6, 2010 06:30

hi claus,

did you put "wclean" before "wmake libso"?
It's hard say where the problem might be. I've never had this error message, but on the other side I've never tried to get to code running on another computer.

would be interesting to know if others had the same kind of problem.


idrama May 6, 2010 08:23

hi volker,

i did what you said and it is implemented now. I started an interFoam case with the new model. As usual, I chose linear schemes for U, k and epsilon. Up to the epsilon equation, all equations are solved fine. By the solving step of e, the simulations abords with an error msg:

#0 Foam::error::printStack(Foam::Ostream&) in "/home/idrama/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/idrama/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/"
#2 ?? in "/lib64/"
#3 Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC::correct() in "/home/idrama/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/"
#4 main in "/home/idrama/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/interFoam"
#5 __libc_start_main in "/lib64/"
#6 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Segmentation fault

I guess, there is something to fix it.

Stick around, I will test it for you in interFoam cases.



volker May 6, 2010 08:40

hi claus,

I think the problem is that you will need an omega file instead of an epsilon one. since it is the SST model which blends the omega transport equation in the boundary layer to an epsilon transport equation in the free stream (but still omega based).


volker May 6, 2010 10:08

in the actual implementation of Wallin's turbulence model two things need still to be added to have it properly implemented

1) the Reynolds stress tensor needs to be looped back into the momentum equation. Which is actually already included, but with unsatisfying results yet

2) the Reynolds stresses have to be used somehow in the production term of the k and omega transport equation. in the standard SST model here only Boussinesq's approximation for isotropic turbulence comes in.

The normal Reynolds stresses are fairly well predicted already without point 1) and 2), but in order to get for instance secondary flows etc and the right prediction of shear stress, it is crucial to get the model fully implemented.

Hope someone has some ideas!?


cfdmarkus May 7, 2010 08:03


I suggest you have a look at the non-linear RAS models available in OF.
You can follow the same procedure to include your non-linear terms.


volker May 7, 2010 10:30

hi markus,

many thanks! that sounds like a good idea. I will have a look at it.

cheers, volker

xiao November 15, 2010 13:12

Wall boundary condition for Omega
Hi Volker,

I am very interested in this model. Did you use the following BC for omega,

omega = 10*6*nu/(0.075*y^2)

or did you use the wall function?

As y = 0 at the wall, the expression should predict Omega to be Infinity ... then, what is the proper boundary conditionf for Omega?


xiao November 15, 2010 13:23

Wall boundary condition for Omega (cont)
Hi Volker,

From the following code in the function "correct",

omegaEqn().boundaryManipulate(omega_.boundaryField ());

which also appeared in the high Re kOmega model (this model should be used with y+ > 30 and wall functions), it seems that the model you implemented is also intended to use wall-functions (and together with a grid with y+ = 1?)

I don't quite understand. Could you explain a bit? Thanks very much.

BTW, did you implement the features you proposed (looping R back to momentum equation and k equation? If not, I think we can work together on this, as I am also interested.


xiao November 15, 2010 14:01

Bounday treatment
Hi Volker,

I noticed that for the following expression in function "correct()", index "inletPatchID" appeared on the RHS. Logically I would expect it to be "outletPatchID" and "wallPatchID" respectively, just to be consistent with the LHS.

Or may be am I missing something?

Another question: is this treatment genral enough? What if my walls are called "topWall" and "bottom wall"?


forAll(P2.boundaryField()[outletPatchID], ox)
if (P2.boundaryField()[outletPatchID][ox] >= 0.0)
N_.boundaryField()[outletPatchID][ox] = (A_3.boundaryField()[inletPatchID][ox]/3.0) + pow(P1.boundaryField()[inletPatchID][ox] + sqrt(P2.boundaryField()[inletPatchID][ox]),(1.0/3.0)) + sign(P1.boundaryField()[inletPatchID][ox]-sqrt(P2.boundaryField()[inletPatchID][ox]))*pow(mag(P1.boundaryField()[inletPatchID][ox] - sqrt(P2.boundaryField()[inletPatchID][ox])),(1.0/3.0));

forAll(P2.boundaryField()[wallPatchID], wx)
if (P2.boundaryField()[wallPatchID][wx] >= 0.0)
N_.boundaryField()[wallPatchID][wx] = (A_3.boundaryField()[inletPatchID][wx]/3.0) + pow(P1.boundaryField()[inletPatchID][wx] + sqrt(P2.boundaryField()[inletPatchID][wx]),(1.0/3.0)) + sign(P1.boundaryField()[inletPatchID][wx]-sqrt(P2.boundaryField()[inletPatchID][wx]))*pow(mag(P1.boundaryField()[inletPatchID][wx] - sqrt(P2.boundaryField()[inletPatchID][wx])),(1.0/3.0));

wiedangel August 7, 2012 05:08

Hi Volker,

thank you for the implementation. I am also working on implementing an algebraic model in openfoam and I wanted to test your model. Unfortunately I get the following error when I try to compile it, any ideas?

wmake libso
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file kOmegaSST_Wallin_CC.C
SOURCE=kOmegaSST_Wallin_CC.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude -I/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -IlnInclude -I. -I/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/kOmegaSST_Wallin_CC.o
kOmegaSST_Wallin_CC.H: In constructor ‘Foam::incompressible::RASModels::kOmegaSST_Wallin _CC::kOmegaSST_Wallin_CC(const Foam::volVectorField&, const Foam::surfaceScalarField&, Foam::transportModel&)’:
kOmegaSST_Wallin_CC.H:137: warning: ‘Foam::incompressible::RASModels::kOmegaSST_Wallin _CC::epsilon_’ will be initialized after
kOmegaSST_Wallin_CC.H:136: warning: ‘Foam::volScalarField Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC::nut_’
kOmegaSST_Wallin_CC.C:95: warning: when initialized here
kOmegaSST_Wallin_CC.C: In member function ‘virtual void Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC::correct()’:
kOmegaSST_Wallin_CC.C:488: error: ‘k0_’ was not declared in this scope
kOmegaSST_Wallin_CC.C:612: error: conversion from ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<doubl e>, Foam::fvPatchField, Foam::volMesh> >’ to non-scalar type ‘Foam::volSymmTensorField’ requested
In file included from kOmegaSST_Wallin_CC.H:82,
from kOmegaSST_Wallin_CC.C:27:
/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H: In static member function ‘static Foam::autoPtr<Foam::incompressible::RASModel> Foam::incompressible::RASModel::adddictionaryConst ructorToTable<RASModelType>::New(const Foam::volVectorField&, const Foam::surfaceScalarField&, Foam::transportModel&, const Foam::word&) [with RASModelType = Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC]’:
/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:138: instantiated from ‘Foam::incompressible::RASModel::adddictionaryCons tructorToTable<RASModelType>::adddictionaryConstru ctorToTable(const Foam::word&) [with RASModelType = Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC]’
kOmegaSST_Wallin_CC.C:44: instantiated from here
/home/wided/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:126: error: no matching function for call to ‘Foam::incompressible::RASModels::kOmegaSST_Wallin _CC::kOmegaSST_Wallin_CC(const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::transportModel&, const Foam::word&)’
kOmegaSST_Wallin_CC.C:95: note: candidates are: Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC::kOmegaSST_Wallin_CC(const Foam::volVectorField&, const Foam::surfaceScalarField&, Foam::transportModel&)
kOmegaSST_Wallin_CC.H:101: note: Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC::kOmegaSST_Wallin_CC(const Foam::incompressible::RASModels::kOmegaSST_Wallin_ CC&)
make: *** [Make/linux64GccDPOpt/kOmegaSST_Wallin_CC.o] Error 1

beeo December 2, 2012 22:54

Hi all,

I am also working on implementing an algebraic reynolds stress model in OF (Gatski and Menter) and facing a lot of problems.

Has anybody done this before and can post his files (regardless of the considered model)? Would appreciate it.


MaLa October 21, 2013 00:01

Papers for perusal
Hi Volker Could you send me the paper titled 'Elements Of Industrial Heat Transfer Prediction', (16 Nov 2001) by FR Menter and T Esch, which you have referenced in kOmegaSST_Wallin_CC.H? Thanks. My email address is

All times are GMT -4. The time now is 18:19.