CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   k-epsilon model and simpleFoam (

vaina74 April 9, 2010 08:32

k-epsilon model and simpleFoam
I have a few questions about \kappa-\epsilon model, I applied it to an airfoil (blade section of a marine propeller). I based myself on pitzDailyExptInlet tutorial.

1. why is turbulenceProperties file not included?

2. tutorial nut and nuTilda are set on zero. I used this configuration, is it correct? Here I read that nuTilda is superfluous, is it the same with nut? I'm confused, in tutorials fvschemes and fvSolution files I find nuTilda (and not nut).

3. in tutorial R file I read

        type            kqRWallFunction;
        type            kqRWallFunction;

why kqRWallFunction? Moreover, i had to add a value:

value          uniform (0 0 0 0 0 0);
is it correct?

matejfor April 10, 2010 03:27

Hi, I got few answers for you:
ad 2> nut is turbulent viscosity for incompressible flows, mut is dynamic turb. viscosity used for compressible or heat transfer flows. nuTilda is only for Spalart-Allmaras model. Therefore for k-eps model you need only nut or mut. try to remove all of them and the code will tell you which one is missing. in fvSchemes and fvsolution you need the variables accordingly
The wall functions are defined here in sedction RAS wall functions

ad 3> R is reynolds stress tensor and you do not need to set anything, look at $FOAM/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C lines 140 to 160 and what you see is, that the R field is calculated internaly and is not read at all, so there is no point to set this file at all in your 0/ directory.

good luck

vaina74 April 12, 2010 17:37

1 Attachment(s)
Thank you, Matej. I already deleted nuTilda and all code lines in fvschemes and fvsolution. But I deleted

div((nuEff*dev(grad(U).T()))) Gauss linear;
too, so I had an error - I thought my case had no heat flow. Now it's ok. You're right about R (why was it in the 0 tutorial folder?), I deleted the relevant file and anyhow the code seems to work.

But i have still some questions, can anyone help me?

1. Why is turbulenceProperties file not included in pitzDailyExptInlet tutorial? I believed it was compulsory. Please, can you send me an example of an incompressible \kappa-\epsilon case?

2. I'm going to test different turbulent models on my 'hydrofoil'. I generated different meshes, such as to have 30 < y+ < 300 (I use near-wall functions). If yPlusRAS gives a bad output, I modify the mesh (generally too fine). With the \kappa-\epsilon model I have a problem: y+ is always too low (about equal to 2-6). I'm afraid it depends on my setting files, maybe I adapted the pitzDailyExptInlet tutorial in a wrong way. Can you take a look at that (see attached file)?

vaina74 April 17, 2010 14:18

1 Attachment(s)
Please, help me. I'm in trouble with \kappa-\epsilon and simpleFoam. Lift and drag coefficients are enormous and y+ too. I can't understand the problem, I refined and refined (and refined again) the mesh, but nothing really changed (and I use wall functions). I evaluated initial values for \kappa and \epsilon as in ESI guidelines:

\kappa=\frac{3}{2}(\overline UI)^2 = 0.01
\epsilon=\frac{0.09\cdot\kappa^2}{\beta\cdot\mu} = 0.005


\overline U = 7.3 m/s
I = 1%
\beta=\frac{\mu_t}{\mu} = 1
and dynamic viscosity \mu = 1.22e-3

I hadn't this terrible result with \kappa-\omega or Spalart-Allmaras turbulent models (obviously with different meshes), I can't understand that. Maybe it' a problem about my BC or fvSchemes and fvSolution files. Can anyone help me? See the attached files, please. I can't manage alone.

masterfgee February 20, 2011 13:36

i didnt want to open a new topic so i state my question here.

i am simulating a turbulent incompressible flow with simpleFoam and the kEpsilon model. i want to take a look at the Reynolds Stress Tensor. how can i make simplefoam to display it? i know that the tensor must be calculated and i would like to see the result :)


i found the function R wich calculations the reynolds stress tensor at a given time step. now i have an R file with the numbers, alot of numbers *g*

thx anyway ;)

All times are GMT -4. The time now is 09:08.