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

Help with k epsilon values of turbulence

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

Like Tree5Likes
  • 1 Post By vw.cfd
  • 2 Post By l_r_mcglashan
  • 1 Post By vishal
  • 1 Post By vishal

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 25, 2009, 04:33
Exclamation Help with k epsilon values of turbulence
  #1
New Member
 
varun
Join Date: Jul 2009
Location: Braunschweig, Germany
Posts: 28
Rep Power: 17
vw.cfd is on a distinguished road
Hi,

I am simulating a two phase flow with one phase as 'oil' and the other as 'air' with RAScavitatingFOAM. I would like to use the realizable k epsilon model. For starters i have obtained the parameters of a similar model simulated with FLUENT.

Now, for defining the boundary conditions for the turbulence parameters. I have the following specification from FLUENT test run.
At inlet(FLUENT)
Intensity and Hydraulic diameter:
Turbulence intensity:15%
Hydraulic diameter:0.0017m

How can i calculate the value of k and epsilon required to be supplied for the OpenFOAM BC defintion. I went through the FLUENT userguide and could did not find satisfactory explanations.

In the meanwhile i tried simulating with k omega+SST model in OpenFOAM and my simulation crashes due to unbounded omega value.

Please HELP!!!

ThnX!!
Paulli likes this.
vw.cfd is offline   Reply With Quote

Old   August 25, 2009, 04:41
Default
  #2
Member
 
Julien Schaguene
Join Date: Apr 2009
Location: France
Posts: 55
Rep Power: 17
Schag is on a distinguished road
For k and epsilon, have a look in User Guide, U-41, in cavity turbFoam tutorial.

Then, for k-omega, maybe you can try to initialise omega in a different way (maybe bigger than expected).

Regards,

Julien
Schag is offline   Reply With Quote

Old   August 25, 2009, 04:55
Default
  #3
New Member
 
varun
Join Date: Jul 2009
Location: Braunschweig, Germany
Posts: 28
Rep Power: 17
vw.cfd is on a distinguished road
hi,

Thank you Julien, i have already gone through the the pages you have specified. I was just wondering if it was possible to use the values i know from the Fluent test case and calculete k and epsilon using these values.

ThnX!!!
vw.cfd is offline   Reply With Quote

Old   August 25, 2009, 05:14
Default
  #4
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
There is a boundary condition allowing you to specify the turbulent intensity:

turbulentIntensityKineticEnergyInlet


You can find it in OpenFOAM-1.6/src/finiteVolume/fields/fvPatchFields/derived/
Or you can just use the following relations:

k = \frac{3}{2} \left(\bar{U} I \right)^2
\varepsilon = C_{\mu}^{3/4} \frac{k^{3/2}}{l}

Where I = turbulent intensity and l = mixing length.
fede32 and SRKR like this.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   August 25, 2009, 07:22
Default
  #5
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 17
chiven is on a distinguished road
Hello, Laurence and other friends,

I believe all of you are the experts of multi-phase flow simulation. Would you please give some comments to me about the problem shown in:
http://www.cfd-online.com/Forums/ope...lculation.html

Thank you very much.

Best regards,
Chiven
chiven is offline   Reply With Quote

Old   August 26, 2009, 05:27
Default
  #6
New Member
 
varun
Join Date: Jul 2009
Location: Braunschweig, Germany
Posts: 28
Rep Power: 17
vw.cfd is on a distinguished road
Hi Laurence and Julien,

Thank you both for your help.One other small question when we change the turbulence model in RASproperties from K-omega+SST to Realizable k-epsilon what are equations which have to be used in the fvSchemedict.

ThnX!

Varun
vw.cfd is offline   Reply With Quote

Old   January 13, 2011, 10:12
Default
  #7
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Hi All,

I am trying to simulate flow Simulation over a city model. but here I dont know the charectarastic length. But rhater I have a ratio of (nut/nu). If i am trying to use following formula for calculation of epsilon as inlet boundary condition.

Note : i am using parabolic profile at inlet.



I am getting time step continuity error.

what can I do to stabilize solution. Is there any other way so that I can introduce terbulance viscosity ratio in play.
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   January 13, 2011, 17:18
Default
  #8
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
Vishal,

I find you simulation model quite interesting. Can you by any chance write a little bit more what you are solving for and how large is your model?

Particularly, I would like to learn about the size of your city model and your computational gird size which you plan to employ.

Thanks, wish you all great day,
Krystian
paka is offline   Reply With Quote

Old   January 14, 2011, 06:57
Default
  #9
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Hi paka,

Actually my domain is about 2 km in length and 0.5 km in hight and I have used unstructured mesh. And the city is located at some distance from inlet. The total mesh size is approximately 4 -5 million cells.

I have used the same mesh with uniform and parabolic velocity prof at inlet.
However I calculate Epsilon using char length = length of longest building

I have used power law for calculation of velocity values at inlet.Using these velocity values and above mentioned formulas for K and epsilon I did the calculations and implemented as inlet boundary condition. I have zero pressure outlet.

but when I don't assume char length and use above formula (without length) for calculation of epsilon I am getting high values for epsilon for turbulence viscosity ration of 3. and the solution is no more stable.

Do I have some error in boundary value calculation method...??? can we introduce this turbulence viscosity ratio using some other way.....???

I am using this ratio as it was the same way in the FLUENT simulation did by my friend. and I think it calculates the boundary values at inlet in same manner as I did....????. pls help....
francisco.angel likes this.
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"

Last edited by vishal; January 14, 2011 at 15:30.
vishal is offline   Reply With Quote

Old   January 18, 2011, 04:45
Default
  #10
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by vishal View Post
Hi paka,

Actually my domain is about 2 km in length and 0.5 km in hight and I have used unstructured mesh. And the city is located at some distance from inlet. The total mesh size is approximately 4 -5 million cells.

I have used the same mesh with uniform and parabolic velocity prof at inlet.
However I calculate Epsilon using char length = length of longest building

I have used power law for calculation of velocity values at inlet.Using these velocity values and above mentioned formulas for K and epsilon I did the calculations and implemented as inlet boundary condition. I have zero pressure outlet.

but when I don't assume char length and use above formula (without length) for calculation of epsilon I am getting high values for epsilon for turbulence viscosity ration of 3. and the solution is no more stable.

Do I have some error in boundary value calculation method...??? can we introduce this turbulence viscosity ratio using some other way.....???

I am using this ratio as it was the same way in the FLUENT simulation did by my friend. and I think it calculates the boundary values at inlet in same manner as I did....????. pls help....
1) How do you set k at the inlet to derive epsilon from the formula you posted above? Is also the turbulence intensity a given datum?

2) I'm not sure that using the longest building size as the characteristic lenght is a proper assumption

3) To found the reasons of your simulation's instability it would be useful for us to know something more about your settings (solver, bc's, fvSchemes, fvSolution, etc.)

Regards
vkrastev is offline   Reply With Quote

Old   January 18, 2011, 05:47
Default
  #11
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
I don't really know for what you are solving, what's your principle question which you try to answer. Nonetheless, I think the longest building length scale might be a bit too large, unless you have some other work on which your work is based.

I do have some questions to your inlet boundary. I'm just guessing you are trying to simulate city flooding resulted from possible hurricane or tsunami inundation.

1. Why did you decide to use the parabolic velocity profile at inlet? Do you have any literature reference? I would gladly read more about it. It is more a consideration whether this function represent real life conditions?
PS. If you can share your inlet function that would be interesting.

2. You said you used "power law for calculation of velocity values at inlet". Does it mean the high velocity, as soon as it enters, immediately decreases in magnitude? Does it mean you try to simulate more kind of an incoming wave boundary condition? So the initial high spike in velocity decreases as soon as it enters the domain?

3. You said you "have zero pressure outlet". I assume this is your atmosphere BC surrounding the city, is it right?

Thanks,
K
paka is offline   Reply With Quote

Old   January 20, 2011, 06:24
Default
  #12
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
I am besically trying to solve for flow simulation around a city model. and I am performing validation against wind tunnel and FLUENT results.

As it is a case of flow over surface. I have to use parabolic profile for inlet velocity (POWER LAW).

K an Epsilon are calculate using following formulas.

U' = 0.1 U.

K = 0.5 (U').(U') and

However for epsilon ciscosity ration = 3 is used

I got stable results using same model but when I used large assumbed char. Length (141 meters).

However with this approach I am getting large values for epsilon and the solution is getting crashed. (I think its coz of unstabilities during solving for Pressure)

please find attached files for FvSchemes and FvSolutions
Attached Files
File Type: txt fvSchemes.txt (1.8 KB, 249 views)
File Type: txt fvSolution.txt (3.0 KB, 161 views)
File Type: txt log.txt (34.2 KB, 91 views)
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"

Last edited by vishal; January 20, 2011 at 09:15.
vishal is offline   Reply With Quote

Old   March 10, 2011, 04:25
Default
  #13
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Hi,

Hear is the check mesh logfile attached.

I have one more query. I never understand what do we exactly mean by time step continuity error. As it suddenly overshoots for my case resulting in simulation blow up.
Attached Files
File Type: txt checkmesh_log.txt (7.6 KB, 57 views)
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   March 10, 2011, 07:13
Default
  #14
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hello,
checkmesh says everything is ok from the mesh point of view...
However, looking at the log file, I see continuity error is too high from the very first time step. It should be something on the order of 10^-5 or less.
And within 2 time steps you have k and epsilon bounding...
I guess some of your BC are not ok. The problem may be on k and epsilon values, but (more probably) you had some bad idea on how to declare everything, i.e. you set U fixed value at the inlet AND at the outlet. Check how you declare everything.
Bye

mad
maddalena is offline   Reply With Quote

Old   March 10, 2011, 09:15
Default
  #15
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Hi Maddalena,

First of all thanks a ton for your reply.

I dont think BC are problem.

Now for test sake, I have tried the same model for constant velocity inlet

with really small values for k and epsilon at inlet. I am not facing any continuity errors anymore and as of now it looks stable.

However, I actually wanted to simulate flow through a city model following boundary conditions.


exp velocity inlet zeroGradient outlet
zeroGradient Pressuer inlet const pressuer outlet (uniform 0)
k and epsilon has same BC as velocity....

bottom is ground wall.
lateral walls and top is set as symmetry plane.

I am using above mentioned formulas for calculation of k and epsilon.
assuming terbulence viscosity ratio =3 (Can't predict char length for problem)...

But this is giving high values of epsilon and the solution no more stable even in I used upwind for divergence and really small relaxation factors (P 0.2, k 0.5, epsilon 0.5).........

However the results obtained from fluent has almost the same exponential inlet values for (U,k, epsilon) but still having stable results using GAMG for solving P,U,K,Epsilon.........
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   March 17, 2011, 06:45
Default
  #16
New Member
 
amgode's Avatar
 
Amol
Join Date: Jul 2009
Location: Limerick, Ireland
Posts: 24
Blog Entries: 2
Rep Power: 17
amgode is on a distinguished road
I would suggest some changes in the fvSchemes and fvSolution files:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,nuTilda) Gauss upwind;

div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
laplacian(nuEff,U) Gauss linear limited 0.5;
laplacian((1|A(U)),p) Gauss linear corrected;;
laplacian(DnuTildaEff,nuTilda) Gauss linear limited 0.5;
laplacian(1,p) Gauss linear corrected;

}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default limited 0.5;// corrected;
}

fluxRequired
{
default no;
p ;
}


// ************************************************** ***********************





/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
// modifies as per fluent
p
{
solver GAMG;
tolerance 1e-08;
relTol 0.01;
smoother GaussSeidel;
nPreSweeps 1;
nPostSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 50;
agglomerator faceAreaPair;
mergeLevels 1;
}

U smoothSolver
{
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-7;
relTol 0.05;
};

k smoothSolver
{
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-7;
relTol 0.1;
};
epsilon smoothSolver
{
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-7;
relTol 0.1;
};

}

SIMPLE
{
nNonOrthogonalCorrectors 1;
pRefCell 0;
pRefValue 0;
}

relaxationFactors // modifies as per fluent
{
p 0.3;
U 0.5;
epsilon 0.8;
k 0.8;
}

// ************************************************** *********************** //





Moreover, try using leastSquares gradient schemes for pressure and velocity.

gradSchemes
{
default leastSquares;
grad(p) leastSquares;
grad(U) leastSquares;
}


Cheers !
__________________
Amol Gode
amgode is offline   Reply With Quote

Old   April 4, 2011, 05:18
Default
  #17
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Hi Amol and Maddalena,

Thanks a ton for your advices. actually the issue behind explosion in epsilon value was and bonding warnings was due to lack of knowledge for calculating epsilon.

For others who are working on the same type of problems....

Initially I have used above mentioned formula for calculation. Rather the correvt one is mentioned in

OpenFOAM1.7.1/scr/turbulanceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilon.H file.

It works absolutely fine. Rater you can also use atmBoundaryLayerInlet itself instead of list of values for exponential inlet velocity and epsilon boundary condition. or modify the formula as per need.

Mojtaba.a likes this.
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   December 12, 2013, 05:57
Post meaning of frac in atmBoundaryLayerInletEpsilon
  #18
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 13
sam.ho is on a distinguished road
Hi,

I am simulating a flow valve with incompressible fluid flow using simpleFOAM and facing a problem of bonding values of k and epsilon. Can i use atmBoundaryLayerInletEpsilon boundary condition at inlet ?

And what is the meaning of frac in the following formulae ?
\epsilon = \frac{(U^*)^3}{K(z - z_g + z_0)}
U^* = K \frac{U_{ref}}{ln\left(\frac{Z_{ref} + z_0}{z_0}\right)}
Can you please give formulae for these as i am not getting it ?

Thanks
sam.ho is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 16 March 4, 2017 08:30
Discussion: Reason of Turbulence!! Wen Long Main CFD Forum 3 May 15, 2009 09:52
Turbulence boundary values lego CFX 9 October 25, 2002 11:55
Turbulence boundary values lego Main CFD Forum 0 October 24, 2002 13:47


All times are GMT -4. The time now is 02:51.