
[Sponsors] 
August 25, 2009, 04:33 
Help with k epsilon values of turbulence

#1 
New Member
varun
Join Date: Jul 2009
Location: Braunschweig, Germany
Posts: 28
Rep Power: 9 
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!! 

August 25, 2009, 04:41 

#2 
Member
Julien Schaguene
Join Date: Apr 2009
Location: France
Posts: 55
Rep Power: 9 
For k and epsilon, have a look in User Guide, U41, in cavity turbFoam tutorial.
Then, for komega, maybe you can try to initialise omega in a different way (maybe bigger than expected). Regards, Julien 

August 25, 2009, 04:55 

#3 
New Member
varun
Join Date: Jul 2009
Location: Braunschweig, Germany
Posts: 28
Rep Power: 9 
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!!! 

August 25, 2009, 05:14 

#4 
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 15 
There is a boundary condition allowing you to specify the turbulent intensity:
turbulentIntensityKineticEnergyInlet You can find it in OpenFOAM1.6/src/finiteVolume/fields/fvPatchFields/derived/ Or you can just use the following relations: Where I = turbulent intensity and l = mixing length.
__________________
Laurence R. McGlashan :: Website 

August 25, 2009, 07:22 

#5 
Senior Member
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 9 
Hello, Laurence and other friends,
I believe all of you are the experts of multiphase flow simulation. Would you please give some comments to me about the problem shown in: Multiphase flow calculation Thank you very much. Best regards, Chiven 

August 26, 2009, 05:27 

#6 
New Member
varun
Join Date: Jul 2009
Location: Braunschweig, Germany
Posts: 28
Rep Power: 9 
Hi Laurence and Julien,
Thank you both for your help.One other small question when we change the turbulence model in RASproperties from Komega+SST to Realizable kepsilon what are equations which have to be used in the fvSchemedict. ThnX! Varun 

January 13, 2011, 11:12 

#7 
Member
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 9 
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......!!!" 

January 13, 2011, 18:18 

#8 
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 10 
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 

January 14, 2011, 07:57 

#9 
Member
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 9 
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....
__________________
Cheers, Vishal Jambhekar... "Simulate the way ahead......!!!" Last edited by vishal; January 14, 2011 at 16:30. 

January 18, 2011, 05:45 

#10  
Senior Member
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 364
Rep Power: 11 
Quote:
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 

January 18, 2011, 06:47 

#11 
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 10 
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 

January 20, 2011, 07:24 

#12 
Member
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 9 
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
__________________
Cheers, Vishal Jambhekar... "Simulate the way ahead......!!!" Last edited by vishal; January 20, 2011 at 10:15. 

March 10, 2011, 05:25 

#13 
Member
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 9 
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.
__________________
Cheers, Vishal Jambhekar... "Simulate the way ahead......!!!" 

March 10, 2011, 08:13 

#14 
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 14 
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 

March 10, 2011, 10:15 

#15 
Member
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 9 
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......!!!" 

March 17, 2011, 07:45 

#16 
New Member

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((1A(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 1e08; relTol 0.01; smoother GaussSeidel; nPreSweeps 1; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 50; agglomerator faceAreaPair; mergeLevels 1; } U smoothSolver { smoother GaussSeidel; nSweeps 2; tolerance 1e7; relTol 0.05; }; k smoothSolver { smoother GaussSeidel; nSweeps 2; tolerance 1e7; relTol 0.1; }; epsilon smoothSolver { smoother GaussSeidel; nSweeps 2; tolerance 1e7; 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 

April 4, 2011, 05:18 

#17 
Member
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 9 
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.
__________________
Cheers, Vishal Jambhekar... "Simulate the way ahead......!!!" 

December 12, 2013, 06:57 
meaning of frac in atmBoundaryLayerInletEpsilon

#18 
Senior Member
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 4 
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 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
SimpleFoam k and epsilon bounded  nedved  OpenFOAM Running, Solving & CFD  13  November 4, 2013 15:13 
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 