# pisoFoam cavity case - k & epsilon values

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 31, 2013, 09:26 pisoFoam cavity case - k & epsilon values #1 New Member   RD Join Date: Oct 2013 Location: UK Posts: 18 Rep Power: 12 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.

 November 1, 2013, 12:22 No help yet! #2 New Member   RD Join Date: Oct 2013 Location: UK Posts: 18 Rep Power: 12 No help yet!

November 1, 2013, 19:21
#3
Retired Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
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
__________________

 November 2, 2013, 13:04 #5 Retired Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 10,975 Blog Entries: 45 Rep Power: 128 Well, turbulence modelling is strange that way. So what happens is this: 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. As the wiki page indicates, the initial turbulence values are only rough estimates. The initial values can influence the speed at which the flow stabilizes, if at all. 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. __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide Read this before sending me PM

 November 2, 2013, 14:35 Thanks #6 New Member   RD Join Date: Oct 2013 Location: UK Posts: 18 Rep Power: 12 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.

 November 4, 2013, 05:50 Help pls... #7 New Member   RD Join Date: Oct 2013 Location: UK Posts: 18 Rep Power: 12 Somebody please help me on this.

November 4, 2013, 17:22
#8
Retired Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
Hi Red Devil,

Quote:
 Originally Posted by Red Devil 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 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 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:"

November 5, 2013, 11:34
Some more queries...
#9
New Member

RD
Join Date: Oct 2013
Location: UK
Posts: 18
Rep Power: 12
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?

Thanks.

November 9, 2013, 16:58
#10
Retired Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
Quote:
Originally Posted by Red Devil
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 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 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

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

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post hadishamsnia Main CFD Forum 0 August 17, 2013 03:18 Nigirim OpenFOAM Running, Solving & CFD 1 November 14, 2012 07:52 chamoun OpenFOAM 4 May 10, 2011 05:30 Adrian FLUENT 1 October 24, 2008 05:11 Fan Main CFD Forum 10 September 9, 2006 12:24

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