
[Sponsors] 
March 4, 2007, 15:08 
Hello,
Yet another blue Sun

#1 
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 543
Rep Power: 17 
Hello,
Yet another blue Sunday to everyone! I had been thinking about integrating the komega turbulence models available in the OpenFOAM Wiki into my version of openFOAM for a long time, and today I decided to take the jump..... Well...the fact that I am writing this would make it clear that I hit bottom faster than I expected :)! Anyway... I downloaded the files, and extracted them into the turbulence models directory of the OpenFOAM source, and modified "files" in "Make" to include the kOmega models. I replaced the "turbulenceModel.C" and .H with "turbulenceModelOmega.C" and .H, and also the file "laminar.C" and .H with "laminarOmega.C" and .H The compilation went through very smoothly.... ending up with a successful library of turbulence models (I "added" on the kOmega models along with the existing turbulence models, rather than replacing the entire set with only the kOmega models) However, it seems that the files available at the wiki are not really geared towards coexisting with the other turbulence models.... When I tried running turbFoam with the kEpsilon model after recompiling the turbulence model with kOmega included, it gave me an error and quit. On looking into the file "turbulenceModelOmega.C", I found that occurances of "epsilon" had been replaced with "omega".... which means the kEpsilon model wouldnt work (I think). Has anyone successfully integrated the kOmega turbulence models into an existing openFOAM installation such that all the other models work too? And if so, could I get some pointers? Have a nice day! Philippose 

March 5, 2007, 04:56 
Hi Philippose,
(Philippose

#2 
Senior Member
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 9 
Hi Philippose,
(Philippose is your name or surname? =) ) just follow the tread http://www.cfdonline.com/cgibin/Op...cus/discus.cgi I followed as well the good suggestions of Bernhard Gschaider and I have now two libraries for komega and komega compressible turbulence models that work perfectly together with the old kepsilon models, I will upload them in the wiki as soon as I find some time.. Daniele 

March 5, 2007, 07:08 
Hi Daniele,
Thanks for the

#3 
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 543
Rep Power: 17 
Hi Daniele,
Thanks for the response, and a good day to you :)! Last night after posting the message, I tried making a second library... following the suggestions of Bernhard Gschaider... and it works fine now :)! (Though, I havent tried the komega models yet) Now that I have the system up and running... here come the questions regarding the turbulence model itself... Could you give me a brief overview of the situations in which one would use the BSL, SST and SSTsas variants of the kOmega turbulence model? If I am not mistaken, the SST and SSTsas models do not use wall functions right? Is there anything special I need to specify...? Or can I still use the "wall" boundary condition for a wall? And as for starting values of omega... is there a manner in which I could calculate a realistic starting value like in the case of the kepsilon models (using the equations for k and epsilon with expected maximum velocities i.e.)? Hmmm... well.. thats all I can think of at the moment :)! Have a nice day! (Philippose is my first name.. so your usage was right :)!) Philippose 

March 5, 2007, 14:51 
Hello,
Just a status update

#4 
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 543
Rep Power: 17 
Hello,
Just a status update.... As I mentioned before, I had compiled the kOmega turbulence models into a separate library as suggested by Bernhard Gschaider. Some time back I recompiled one of the solvers (a variant of simpleFoam) after including the kOmega library into the "options" file. Things are working fine, and I was able to select the kOmega turbulence model... the simulation is currently running, but intermediate results are looking good :)! So far.. converging very comfortably... shall get back regarding accuracy (compared to experiments). The kEpsilon model gave me around 7% error on the flow compared to measurements... hoping to get something better with the kOmega! I would still like you to give me an insight into the other kOmega model types (BSL, SST and SSTsas) :)! Have a nice day! Philippose 

March 6, 2007, 06:01 
Hi Philippose,
I suggest y

#5 
Senior Member
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 9 
Hi Philippose,
I suggest you to read the articles I used as reference for the model implementation (see the Wiki) in short, the komega BSL is a mix of komega near the wall and kepsilon outside the near wall region. This is done because it is easier to give freestream condition in terms of epsilon rather than omega. at the wall you have to specify omega using the relation omega=10*(6*nu)/(0.075*Dy1^2) where Dy1 is the distance from the wall at the first grid point. Dy1 should be in the laminar sublayer. In the freestream remember that omega is equal to epsilon/k. The kOmega SST is the same as the BSL but it satisfy also the Bradshaw assumption that the shear stress in a boundary layer is proportional to the turbulent kinetic energy. (see the article for details) The kOmega SST sas is very different. In stable flow it behaves exactly as the kOmega SST but in 3D flows with instabilities it behaves like an LES computation. When instabilities appear the model tends to decrease the turbulent viscosity up to the LES like value. The result is analogous to a LES computation. (see articles for details) Hope that this helps you, have fun, Daniele 

March 6, 2007, 14:04 
Hi again,
Thanks for the cl

#6 
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 543
Rep Power: 17 
Hi again,
Thanks for the clean and precise descriptions of the kOmega Variants. I have been running some simulations using the kOmega and kOmega SST on models I have already run using the kEpsilon model, and also have measurements for.... the results have not been looking too good. Basically, the simulations are all steady state, run using simpleFoam. I first started with the kOmega Turbulence Model, and then tried the kOmega SST... Here is the process I followed: I renamed the original "epsilon" file present in the "0" time folder to "omega", changed the name of the volScalarField to "omega" and the units to [0 0 1 0 0 0 0] as I had seen in the test case you had provided. The rest of the data (including the initial value of the internal field and the inlet, and all the boundary conditions) were left as it was. I assume that the solver takes these values as initial values only, and in case the values are bad, it takes longer to converge. Here is the "omega" file: dimensions [0 0 1 0 0 0 0]; internalField uniform 5000; boundaryField { fixedWalls { type zeroGradient; } inlet { type fixedValue; value uniform 5000; } outlet { type zeroGradient; } outletLS { type zeroGradient; } } For completion, here is my "boundary" file of the mesh (the mesh was also exactly the same as the one in the kEpsilon run): 4 ( fixedWalls { type wall; physicalType wallFunctions; nFaces 37358; startFace 278856; } inlet { type patch; physicalType pressureInlet; nFaces 212; startFace 316214; } outlet { type patch; physicalType pressureOutlet; nFaces 48; startFace 316426; } outletLS { type patch; physicalType pressureOutlet; nFaces 94; startFace 316474; } ) I left the "k" file exactly as it was in the kEpsilon case. Further, I changed the files "fvSolution" and "fvSchemes"... replacing occurances of "epsilon" with "omega" so that the solvers and the schemes work with kOmega. The convergence values, relaxation factors (for simpleFoam) and the kinematic viscosity (nu) were left as it was in the kepsilon case. The Kinematic viscosity is 1.76e05 m^2/s Using this configuration, I ran the simulation, and ended up with a total flow through the inlet and outlet patches to be around 10 times smaller than the expected values (kEpsilon and measurements). The pressure field looks good, but the velocities are much lower than they are supposed to be. The kOmega SST case also came up with a similar difference in the flow. Could it be that I am doing something wrong? Do I need to change any boundary conditions when I switch to the kOmega Turbulence Model? Or is the turbulence model very sensitive to the initial conditions that are given? I was looking through the source code of the kOmega Turbulence Model and comparing it with the kEpsilon model, and noticed that though there are the following header files in the directory: wallFunctionsOmega.H wallDissipationOmega.H These files are never called within the kOmega source code. Does this mean that the kOmega does not use wall functions? The mesh I use is a 100% tetrahedral mesh generated by NetGen (a free tetrahedral mesh generator). These meshes have worked very well so far with the kEpsilon turbulence model. Could there be some bug in the source code of the Turbulence Models? I am hoping its only some simple error... because I have heard and read a lot about the kOmega Turbulence Models, and have been wanting to try them out in an attempt to increase the accuracy of my simulations. Have a nice day! Philippose 

April 27, 2007, 05:17 
Hello Daniele,
you´re trying

#7 
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 9 
Hello Daniele,
you´re trying two different things above. In your first attempt you try to set values at the boundary faces. In your second attempt you try to set the values in the wall nearest cells. (For that you are using yvalues at the wall, which have to be zero => division by zero). What do you precisely want to do? Setting values at the wall faces or in the wall cells? Can you term a reference for the wall omega? Rolando 

April 27, 2007, 05:30 
Hi Rolando,
I want to set t

#8 
Senior Member
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 9 
Hi Rolando,
I want to set the value at the face that is the same of setting a fixedValue boundary condition with a constant value of omega=omega_wall omega_wall = 60/beta*nu/sqr(dy) where dy is the wall nearest cell center. as it is described in Menter, TwoEquation EddyViscosity Turbulence Models for Engineering Applications, AIAA Journal Vol.32, No8,August 1994. Thanks for your feedback,do you have any ideas? Daniele 

April 27, 2007, 05:36 
Try something like the followi

#9 
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 9 
Try something like the following, it should only set the values at the boundaries and use the wall nearest cell values for the calculation:
const fvPatchList& patches = mesh_.boundary(); forAll(patches, patchI) { const fvPatch& curPatch = patches[patchI]; if (isType<wallfvpatch>(curPatch)) { omega_.boundaryField()[patchI] = 60.0 * nuw.boundaryField()[patchI].patchInternalField() / sqr(y.boundaryField()[patchI].patchInternalField()) / 0.075; } } Rolando 

April 27, 2007, 09:33 
Thanks Rolando,
it seems to

#10 
Senior Member
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 9 
Thanks Rolando,
it seems to work very well =) Thank you, Daniele 

August 6, 2007, 08:30 
Dear all,
I am starting to

#11 
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 9 
Dear all,
I am starting to use KOmega model for my simulation and have a few questions regarding the boundary setting and wall function. As Daniele Panara suggested, we need to specify a fix value of omega at the wall. The problem I had is if I tried to used a fixed value at the wall, I got a error message like this: > FOAM FATAL ERROR : fixedValue is the wrong omega patchField type for wallfunctions on patch bottomWall should be zeroGradient From function wallfunction evaluation in file kOmegaSST/checkkOmegaPatchFieldTypes.H at line 13. Then I went to check the file kOmegaSST/checkkOmegaPatchFieldTypes.H, and found something like this in the file: if (!isType<zerogradientfvpatchscalarfield>(k_.bounda ryField()[patchi])) { FatalErrorIn("wallfunction evaluation") << k_.boundaryField()[patchi].type() << " is the wrong k patchField type for wallfunctions on patch " << curPatch.name() << nl << " should be zeroGradient" << exit(FatalError); } if (!isType<zerogradientfvpatchscalarfield>(omega_.bo undaryField()[patchi])) { FatalErrorIn("wallfunction evaluation") << omega_.boundaryField()[patchi].type() << " is the wrong omega patchField type for wallfunctions on patch " << curPatch.name() << nl << " should be zeroGradient" << exit(FatalError); } I got quite confused. Does this mean I have to set "zero gradient" NOT "fixed value" at the wall for omega? Does the SST model in 1.4 version use wall function or not? BTW, I defined my "bottomWALL" patch as "wall" not "wall function" in the polyMesh/boundary file. Thanks for your help. Best regards Quinn 

August 6, 2007, 09:39 
Hi Quinn,
I'm also using kO

#12 
Member
Matthias Kern
Join Date: Mar 2009
Location: Karlsruhe, Germany
Posts: 36
Rep Power: 9 
Hi Quinn,
I'm also using kOmegaSST. The kOmegaSST model delivered together with OpenFOAM 1.4 uses wall functions. Have a look in kOmegaSST.C: # include "kOmegaWallFunctionsI.H" # include "kOmegaWallViscosityI.H" So you have to defin omega and k as zeroGradient at the wall patches. I haven't experienced any difficulties so far using this BCs. Hope I'm not mistaken. Seems that there exists another version of kOmega without wall function. 

August 6, 2007, 09:57 
Matthias,
Thank you so much

#13 
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 9 
Matthias,
Thank you so much for your reply. Can you please answer one more question for me, how can I define the boundary condition for omega at inlet? I read Menter's 1994 paper. At the wall omega_wall=60/0.075*nu/(dy)^2 and free stream omega = U/L or epsilon/k. I have a non uniform k and velocity profile at inlet. I had no experience to define non uniform omega. Can you please share some of your experience. Thanks Quinn 

August 6, 2007, 10:57 
Hi Quinn,
you don't have to

#14 
Member
Matthias Kern
Join Date: Mar 2009
Location: Karlsruhe, Germany
Posts: 36
Rep Power: 9 
Hi Quinn,
you don't have to set omega at the wall only at the inlet. There I use the relation omega = epsilon/k as you mentioned. I use uniform boundary conditions for omega, so I don't have experiences with nonuniform conditions for omega. How do you define your nonuniform inlet velocity? I guess you can do it with omega in the same way. Knowing your degree of turbulence and the integral length scale you can calculate k and epsilon and then omega by epsilon/k. So your omega is a function of these three values U, Degree of Turbulence and integral length scale. 

August 6, 2007, 11:38 
Matthias,
Thanks for the gr

#15 
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 9 
Matthias,
Thanks for the great answer. For the velocity and tke, I had LDV data and just did interpolation at inlet for the nonuniform boundary. I was mistaken that epsilon/k is only valid at the freestream. I realized this is a universal relationship, which we can find in Pope's turbulence book. Thanks for pointing out this. Thanks again for your help. 

January 25, 2009, 07:16 
Hi Foamers!
I'm wondering if

#16 
Senior Member

Hi Foamers!
I'm wondering if the kOmegaSST model without wallfunctions present on the wiki is available also for 1.5 version. If not, there's someone that could give me some guidelines to modify it? Thanks! 

March 23, 2009, 13:03 
freestream omega

#17 
Member
Michael Roth
Join Date: Mar 2009
Location: Guelph, Ontario, Canada
Posts: 46
Rep Power: 9 
I see a few posts suggesting that omega = epsilon / k is a good initialization for the freestream. However, when I examine the code (kOmegaSST.H), the calculation for epsilon is
epsilon = betaStar * k * omega where betaStar is typically Cmu i.e. 9/100. So shouldn't a better estimate of omega be omega = 100/9 * epsilon / k ? Michael 

May 6, 2009, 09:09 

#18 
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 13 
Also note on CFDOnline WIKI,
http://www.cfdonline.com/Wiki/Turbu...ary_conditions I dont see Am I missing sth??
__________________
~ Daniel WEI  Boeing Research & Technology  China Beijing, China 

May 6, 2009, 09:11 

#19 
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 13 
Hi Quinn,
Can you email me a copy of that paper (Menter 1994)? It's not available for my university. Much appreciated.
__________________
~ Daniel WEI  Boeing Research & Technology  China Beijing, China 

July 1, 2009, 07:18 

#20 
Member
Maruthamuthu Venkatraman
Join Date: Mar 2009
Location: Norway
Posts: 80
Rep Power: 9 
Could anyone give some step by step illustration of implimenting these low reynolds number K omega models in OpenFoam 1.5 as referred in link below:
http://openfoamwiki.net/index.php/Tu...e_models_files I tried to extract the contents and complied them by typing " wmake libso " in the terminal from incompresible directory. I got an error kOmega/kOmega.C:111: error: no matching function for call to ‘Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject, Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >, Foam::wordList)’ ................... Let me know the right way of implimenting the same.. Thanks, Muthu 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Komega equation  doug  OpenFOAM Running, Solving & CFD  6  July 18, 2007 03:09 
Komega turbulence model  jasonb  OpenFOAM Running, Solving & CFD  6  August 29, 2006 08:46 
KEpsilon and KOmega  larry  OpenFOAM Running, Solving & CFD  3  June 29, 2006 01:38 
Komega turbulent viscosity model  guggi  OpenFOAM Running, Solving & CFD  3  May 18, 2006 20:07 
HELP! TURBULENCE ke OR komega TURBULENCE MODEL?  Mirek Kabacinski  FLUENT  5  August 24, 2003 22:31 