CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   A few questions about Spalart Allmaras model and y (

seb62 January 22, 2009 06:45

Hi everyone, I am running t
Hi everyone,

I am running turbulent flat plate computations
mainly with Spalart Allmaras model on version 1.5.

My first doubt is about the y+(first node) value. Trying to run yPlusRAS with the Spalart
model on, I get an error "cmu is not defined".
Thus, to check the y+ value, I use the definition :

y+ = y(first node)*(sigmaxy)^0.5 / nu

I'm wondering if this definition is consistent with the openFOAM definition of y+
(trying the k-w SST, I get very different y+ between this definition and yPlusRAS).

My second question is about nutWallFunctions.
I read a few threads where people are using this boundary condition. Does someone know where it should be specified? (in constant/polyMesh/boundary or 0/nut ; 0/nuTilda)?

If someone has successfully run Spalart-Allmaras computations on a flat plate with velocity profiles consistent with the theoretical/experimental log law, eventually for different y+ (1 to 30 say), I would be happy to learn the conditions used!

Thanks a lot


johnb January 22, 2009 15:06

The nutWallFunction will be sp
The nutWallFunction will be specified in 0/nut as type nutWallFunction with a fixedValue of 1e-10 at the wall boundaries.


seb62 January 23, 2009 04:13

Thanks for your help John S
Thanks for your help John


ivan_cozza January 23, 2009 08:23

Hi Foamers, in your opinion,
Hi Foamers,
in your opinion, what should be a good y+ value for a Spalart Almaras RANS on a flat plate, Mach 0.06 and Re 1.3e5?
And, how can I compute y+ in Spalart Almaras model?

eugene January 23, 2009 10:48

The Spalart-Allmaras model in
The Spalart-Allmaras model in OPENFOAM is essentially a hybrid formulation. Any y+ between 1 and 300 should in theory work fine, especially on a flat plate. In practice, it probably will be less accurate at large y+ values since the turbulence production terms in near-wall cells have not been modified in a manner consistent with the wall-function formulation.

The application yPlusRAS should provide you with the y+ field.

ivan_cozza January 23, 2009 11:06

Eugene, it seems that yPlusRA
it seems that yPlusRAS does not work with SA, as it complains that there isn't Cmu in this model. Is possible to modify this app to make it work with Spalart Allmaras?
And, you mean with hybrid that I can use SA in all the range of 1<y+<300 with nutWallFunction as bc for nut?

egp April 24, 2009 08:23


Did you add Cmu to your SpalartAllmarasCoeffs subdictionary in RASProperties?

This works for me when running yPlusRAS and the SA model,


elorriaux July 13, 2009 10:54


I'm getting the same problem although the Cmu coefficient is defined in the SpalartAllmaras dictionary.

Looking in the code, yPlusRAS uses RASModel->yPlus(patchID) function to get yPlus at patches. The yPlus volScalarField is computed in RASModel.C :

Yp = pow(Cmu, 0.25)*y_[patchNo] *sqrt(k(().boundaryField([patchNo].patchInternalField())

Obviously the turbulent kinetic energy is set to 0, so i'm getting y+=0 for each wall. (I've checked that they are correctly defined as walls in the boundary file).

Am I doing wrong or am I missing something ?

Regards Etienne.

jms January 15, 2011 14:09

Do any of you know the physical meaning of this "nutWallFunction value uniform=0(or 1e-10 basedon an answer above)"?

All times are GMT -4. The time now is 07:58.