CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   pisoFoam cavity case - k & epsilon values (https://www.cfd-online.com/Forums/openfoam-solving/125801-pisofoam-cavity-case-k-epsilon-values.html)

Red Devil October 31, 2013 09:26

pisoFoam cavity case - k & epsilon values
 
Hi All,

Im a beginner in openFoam. So my question may be very silly to many people here. Please excuse me.

In openFOAM tutorials, the 'k' value for pisoFoam cavity case is given as 0.00325 and epsilon=0.000765. Somebody please explain me how they got these values.

I have already gone through this.
HTML Code:

http://www.cfd-online.com/Wiki/Turbulence_free-stream_boundary_conditions
So, they have taken turbulence intensity, I=0.0465. How?
What about turbulence length scale? How it is selected here?
And which equation to use for finding epsilon? one with cmu or cmu^0.75 ??

Thanks.

Red Devil November 1, 2013 12:22

No help yet!
 
No help yet! :(

wyldckat November 1, 2013 19:21

Greetings Red Devil and welcome to the forum!

Near the beginning of that wiki page: http://www.cfd-online.com/Wiki/Turbu...ary_conditions - is this sentence:
Quote:

Instead it is easier to think in terms of variables like the incoming turbulence intensity and turbulent length scale or eddy viscosity ratio.
The first link in that sentence is this one: http://www.cfd-online.com/Wiki/Turbulence_intensity - there you'll find a few ways how the value "I" is calculated.

So the question back to you is this: what Reynolds number and hydraulic diameter did you calculate?

Best regards,
Bruno

Red Devil November 2, 2013 12:21

Thanks for your help Bruno
 
Thanks a lot for your reply Bruno.

I have already gone through the links you mentioned, but I couldnt understand it completely.

I'm just trying to understand the pisoFoam cavity case - /tutorials/incompressible/pisoFoam/ras/cavity. I haven't made any changes to that. Values given are : U = 1 m/s, the dimensions are 1*1*0.1 and nu=1e-05. That makes Dh=1 and Re=10^5. Hope I'm right here.

Here, k has been given the value 0.00325 and epsilon = 0.000765.
k=0.00325 and U =1 m/s ==> I = 0.047. How did they fix this I value? This is what I'm not able to understand. I=0.047, i.e between 1% and 5% implies Medium-turbulence case. Why?
Also, when I varies from 1% to 5%, k varies from 0.00015 to 0.00375 for U=1 m/s. Which value to choose here? or how they fixed it as 0.00325? Can we randomly choose any value in the above range? Please explain this to me.

Similarly, how to select the turbulent length scale? And after fixing that, which equation to use for calculating epsilon?
http://www.cfd-online.com/W/images/m...47e984c1a7.png
or http://www.cfd-online.com/W/images/m...32c0a99d21.png??? Please help me on this also.

Thanking you again for your help.

wyldckat November 2, 2013 13:04

Well, turbulence modelling is strange that way.

So what happens is this:
  1. The instructions on the wiki are for pipe-like flow. But this tutorial is a cavity and the flow is parallel to the inlet itself, not perpendicular to the inlet.
  2. As the wiki page indicates, the initial turbulence values are only rough estimates.
  3. The initial values can influence the speed at which the flow stabilizes, if at all.
  4. But the turbulence values are usually always calculated by the solver, so the initial value is only an initialization.
If you run the case, the resulting k values are considerably higher than the initial value.

Red Devil November 2, 2013 14:35

Thanks
 
Thanks for the quick reply Bruno.
So all values are randomly chosen! :confused:

Ok then. Let me consider another example. Flow through a duct, U= 1m/s. dim - 0.1*0.1*6 and nu=1e-05 ==> Re=10000.
Please tell me how to calculate k and epsilon for this case (for better solution/fast covergence). or what is intensity and length here? and which eq. for epsilon?
Thanks.

Red Devil November 4, 2013 05:50

Help pls...
 
Somebody please help me on this.

wyldckat November 4, 2013 17:22

Hi Red Devil,

Quote:

Originally Posted by Red Devil (Post 460269)
So all values are randomly chosen!

Not randomly chosen, but instead you use an initial reference value and work with it from there...

Quote:

Originally Posted by Red Devil (Post 460269)
Please tell me how to calculate k and epsilon for this case (for better solution/fast covergence).

... because AFAIK, the only way to find the optimum value, is to do some trial-and-error.
Quoting from the wiki: http://www.cfd-online.com/Wiki/Turbu...ary_conditions
Quote:

This is often difficult and a source of uncertainty since the incoming turbulence is rarely known exactly. Most often you are forced to make a more or less educated guess of the incoming turbulence. Estimating the turbulence model variables, like turbulent energy, dissipation or Reynolds stresses, directly is often difficult.
Quote:

Originally Posted by Red Devil (Post 460269)
or what is intensity and length here? and which eq. for epsilon?

As for the length, quoting from the wiki: http://www.cfd-online.com/Wiki/Turbulent_length_scale
Quote:

The turbulent length scale is often used to estimate the turbulent properties on the inlets of a CFD simulation. Since the turbulent length scale is a quantity which is intuitively easy to relate to the physical size of the problem it is easy to guess a reasonable value of the turbulent length scale. The turbulent length scale should normally not be larger than the dimension of the problem, since that would mean that the turbulent eddies are larger than the problem size.
So, in case of a pipe (the simplest of ducts), the very extremely maximum length would be the diameter of the pipe... although it would have to be one crazy inlet flow in order to achieve this, probably a very small jet of fluid being injected into the pipe, aligned with the pipe wall.

For this "pipe", check the sections "Fully developed pipe flow" on these pages:
Beyond this, your calculations seemed correct to me.

Best regards,
Bruno


edit: Since this is a more basic CFD question, perhaps you can try asking this in the main forum, where the general CFD questions are asked: http://www.cfd-online.com/Forums/main/

Red Devil November 5, 2013 11:34

Some more queries...
 
Thanks again for your inputs Bruno.

I have some more queries which are more related to OpenFOAM. So I'm posting it here itself. Please find them below.

1). What about epsilon calculation? Which one of the below equations to use in case of OpenFOAM?
From wiki:
Quote:

http://www.cfd-online.com/W/images/m...47e984c1a7.png k is the turbulent energy and l is the turbulent length scale.
Please note that some CFD codes, Fluent, Phoenics and CFD-ACE for example, uses a different length-scale definition based on the mixing-length, and therefore the following formula should be used:
http://www.cfd-online.com/W/images/m...32c0a99d21.png Where Cmu is a turbulence model constant which usually has a value of 0.09
2). In the cavity case, nut values are given as zero everywhere. Can I do the same for this duct case also? or should I calculate it using the below equations from wiki:

Quote:

Modified turbulent viscosity

The modified turbulent viscosity, http://www.cfd-online.com/W/images/m...287a677d41.png, can be computed using the following formulas:
From the turbulence intensity and length scale

http://www.cfd-online.com/W/images/m...8e8f489b29.png Where U is the mean flow velocity, I is the turbulence intensity and l is the turbulence length scale.
Ideally with the Spalart-Allmaras model http://www.cfd-online.com/W/images/m...5d6060075c.png, but some solvers can have problem with that so http://www.cfd-online.com/W/images/m...46362739e4.png can be used. This is if the trip term is used to "start up" the model. A convenient option is to set http://www.cfd-online.com/W/images/m...d22a44e94c.png in the freestream. The model then provides fully turbulent results and any regions like boundary layers that contain shear become fully turbulent.
3). Now, how to give this values as boundary/initial conditions in the respective files inside 0 folder?
Below is my k file

Quote:

internalField uniform .00375;

boundaryField
{
outlet
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform .00375;
}
wall
{
type kqRWallFunction;
value uniform .00375;
}
}
Is it ok? Should the value be zero for wall and internal field?

4). What is the use of nuTilda file?

Please help me on the above.
Thanks.

wyldckat November 9, 2013 16:58

Quote:

Originally Posted by Red Devil (Post 460682)
1). What about epsilon calculation? Which one of the below equations to use in case of OpenFOAM?
From wiki:
Quote:

http://www.cfd-online.com/W/images/m...47e984c1a7.png k is the turbulent energy and l is the turbulent length scale.
Please note that some CFD codes, Fluent, Phoenics and CFD-ACE for example, uses a different length-scale definition based on the mixing-length, and therefore the following formula should be used:
http://www.cfd-online.com/W/images/m...32c0a99d21.png Where Cmu is a turbulence model constant which usually has a value of 0.09

Since the value 0.09 is mentioned, I'm guessing it's the second one, because it's the same value that OpenFOAM uses: https://github.com/OpenFOAM/OpenFOAM...rbulence.H#L25


Quote:

Originally Posted by Red Devil (Post 460682)
2). In the cavity case, nut values are given as zero everywhere. Can I do the same for this duct case also? or should I calculate it using the below equations from wiki:

The "nut" field is calculated by the solver, so it can start at 0.


Quote:

Originally Posted by Red Devil (Post 460682)
3). Now, how to give this values as boundary/initial conditions in the respective files inside 0 folder?
Below is my k file

Code:

internalField  uniform .00375;

boundaryField
{
    outlet
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value        uniform .00375;
    }
    wall
    {
        type            kqRWallFunction;
        value          uniform .00375;
    }
}

Is it ok? Should the value be zero for wall and internal field?

I did a quick search and I found this post: http://www.cfd-online.com/Forums/ope...tml#post216508 - post #2
Continue reading the thread for more information.

Quote:

Originally Posted by Red Devil (Post 460682)
4). What is the use of nuTilda file?

Also calculated by the solver. This has been asked on the forum several times. Here's a thread that should explain it all about it: http://www.cfd-online.com/Forums/ope...t-nutilda.html

Best regards,
Bruno


All times are GMT -4. The time now is 21:40.