CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

pisoFoam cavity case - k & epsilon values

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2013, 09:26
Default pisoFoam cavity case - k & epsilon values
  #1
New Member
 
RD
Join Date: Oct 2013
Location: UK
Posts: 18
Rep Power: 12
Red Devil is on a distinguished road
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 is offline   Reply With Quote

Old   November 1, 2013, 12:22
Default No help yet!
  #2
New Member
 
RD
Join Date: Oct 2013
Location: UK
Posts: 18
Rep Power: 12
Red Devil is on a distinguished road
No help yet!
Red Devil is offline   Reply With Quote

Old   November 1, 2013, 19:21
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   November 2, 2013, 12:21
Default Thanks for your help Bruno
  #4
New Member
 
RD
Join Date: Oct 2013
Location: UK
Posts: 18
Rep Power: 12
Red Devil is on a distinguished road
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?

or ??? Please help me on this also.

Thanking you again for your help.
Red Devil is offline   Reply With Quote

Old   November 2, 2013, 13:04
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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.
__________________
wyldckat is offline   Reply With Quote

Old   November 2, 2013, 14:35
Default Thanks
  #6
New Member
 
RD
Join Date: Oct 2013
Location: UK
Posts: 18
Rep Power: 12
Red Devil is on a distinguished road
Thanks for the quick reply Bruno.
So all values are randomly chosen!

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 is offline   Reply With Quote

Old   November 4, 2013, 05:50
Default Help pls...
  #7
New Member
 
RD
Join Date: Oct 2013
Location: UK
Posts: 18
Rep Power: 12
Red Devil is on a distinguished road
Somebody please help me on this.
Red Devil is offline   Reply With Quote

Old   November 4, 2013, 17:22
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Red Devil,

Quote:
Originally Posted by Red Devil View Post
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 View Post
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 View Post
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/
__________________

Last edited by wyldckat; November 4, 2013 at 17:24. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   November 5, 2013, 11:34
Default Some more queries...
  #9
New Member
 
RD
Join Date: Oct 2013
Location: UK
Posts: 18
Rep Power: 12
Red Devil is on a distinguished road
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:
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:
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, , can be computed using the following formulas:
From the turbulence intensity and length scale

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 , but some solvers can have problem with that so can be used. This is if the trip term is used to "start up" the model. A convenient option is to set 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.
Red Devil is offline   Reply With Quote

Old   November 9, 2013, 16:58
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Red Devil View Post
1). What about epsilon calculation? Which one of the below equations to use in case of OpenFOAM?
From wiki:
Quote:
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:
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 View Post
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 View Post
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 View Post
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
Red Devil and aow like this.
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
cavity, epsilon, pisofoam, turbulence intensity, turbulence length scale


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
k and epsilon values near the wall hadishamsnia Main CFD Forum 0 August 17, 2013 03:18
Calculation of k and epsilon freezes Nigirim OpenFOAM Running, Solving & CFD 1 November 14, 2012 07:52
k epsilon boundary conditions for pisofoam ras solver chamoun OpenFOAM 4 May 10, 2011 05:30
k din't converge for Lid Driven Cavity case Adrian FLUENT 1 October 24, 2008 05:11
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


All times are GMT -4. The time now is 14:59.