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

How to change turbulence model in InterFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By GerhardHolzinger
  • 1 Post By Gildeh

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2012, 00:36
Exclamation How to change turbulence model in InterFoam
  #1
New Member
 
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 14
Gildeh is on a distinguished road
Dear Foamers,

I am pretty new in using the OF. However, I could change the boundary conditions in the dam break in order to simulate my problem by using the InterFoam.
Now, I want to change the turbulence model and see the effect of different turbulence models. There are two directories within the Constant folder that are related to turbulence mode:
1. turbulenceProperties: that includes this line:
"simulationType RASModel;"
I think, here we choose the model that RASModel is in this case.
2. RASProperties: that includes these 3 lines:
RASModel kEpsilon;
turbulence on;
printCoeffs on;
And I think here, it introduces the RAS type that KEpsilon is here.

Now I have these 2 questions:
1. If I want to see the other RAS types, such as "LamBremhorstKE" (see all the list here http://www.openfoam.com/features/RAS.php), is it enough just change the first line of the RASProperties directory and change it from kEpsilon to LamBremhorstKE???? Or I need to do more??

2. What should I do exactly if I want to use another model except the RASModel??? For instance if I want to use fro LES models??? Should I just simply go to simulationType directory and change RASModel to LESModel and then change the 2nd directory name from RASProperties to LESProperties and in the first line change the RASModel kEpsilon; to e.g. LESModel Smagorinsky; ????? Is that all I need to change??

Thank you all if you can help me.

Cheers,
Gildeh
Gildeh is offline   Reply With Quote

Old   March 26, 2012, 04:05
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Hello,

I am also pretty new to openFoam, but I think I can answer some questions of yours.

With the File turbulenceProperties you can change the simulation type from laminar to one that considers turbulence.

Check out the tutorials and compare cases that are laminar, using a RAS model or a LES model.

In the file RASproperties you can also switch between a laminar and a turbulent simulation. You can try it if you write in the RASproperties file "turbulence off".

Somehow OF gives you several ways to make a simulation laminar.


As you can see from the tutorials or from the error messages OF gives you, OF needs the files 0/k and 0/epsilon when using a k-epsilon model.
In general you need such files for all quantities for which a transport equation is solved. For a k-epsilon model these are k and epsilon. For a k-omega model these are k and omega.
Gildeh likes this.
GerhardHolzinger is offline   Reply With Quote

Old   March 28, 2012, 11:16
Exclamation Hi Gerhard
  #3
New Member
 
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 14
Gildeh is on a distinguished road
Thank you for your consideration. Let me to explain it a little bit more. I am interesting to apply two RAS turbulence models for incompressible fluids:
LRR
Launder-Reece-Rodi RSTM
LaunderGibsonRSTM
Launder-Gibson RSTM with wall-reflection terms
Now, I want to know what should I change?
I guess that I have to change 2 directories out of 3 below:
1. turbulunceProperties
2. RASProperties
3. 0

1. turbulenceProperties: that includes this line:
"simulationType RASModel;"
I think, I should not change any thing here since the two above-mentioned models are within the RAS model.
2. RASProperties: that includes these 3 lines:
RASModel kEpsilon;
turbulence on;
printCoeffs on;
And for this directory, I believe that I should change the KEpsilon to LRR.

But that should not be the only things to change. As you mentioned I have to create 2 (or more?!) folders for initial and boundary conditions in 0 directory (instead of k and epsilon for KEpsilon case).
Now, I want to know:
1. Are the first and second steps (within turbulenceProperties and RASProperties) true as I mentioned above??!!
2. If yes, what files should I create in 0 directory for the two above-mentioned RAS models which I want to implement instead of KEpsilon model? (Now that I am using KEpsilon, there are 2 files k and epsilon).

Thanks
Gildeh
sinatahmooresi likes this.
Gildeh is offline   Reply With Quote

Old   March 28, 2012, 11:40
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Quote:
Originally Posted by Gildeh View Post
Now, I want to know:
1. Are the first and second steps (within turbulenceProperties and RASProperties) true as I mentioned above??!!
Yes I think so too.

Quote:
Originally Posted by Gildeh View Post
2. If yes, what files should I create in 0 directory for the two above-mentioned RAS models which I want to implement instead of KEpsilon model? (Now that I am using KEpsilon, there are 2 files k and epsilon).
You could try to run the simulation without creating any files and let the error messages tell you - but maybe thats not the easiest way.

If you look into the file LRR.H then you can find the following lines

Code:
        // Fields
            volSymmTensorField R_;
            volScalarField k_;
            volScalarField epsilon_;
            volScalarField nut_;
So, my guess would be to create files with the corresponding names (R, k, epsilon, nut). Since you already have some of them from the k-epsilon model, this will not be difficult.
Unfortunately this is only my personal guess because I don't know the models you want to use.
GerhardHolzinger is offline   Reply With Quote

Old   March 28, 2012, 12:04
Default
  #5
New Member
 
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 14
Gildeh is on a distinguished road
Thank you Gerhard. I will check it and let you know about the result.
I already know what is included in the e.g. k or epsilon file, but I have no idea how should be the R file and what it should include.

Thanks
Gildeh
Gildeh is offline   Reply With Quote

Reply


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
Modified k-e turbulence model UDF Travis Fluent UDF and Scheme Programming 7 November 11, 2018 20:21
Turbulence postprocessing Mohsin FLUENT 2 October 3, 2016 14:18
Parallel running of 3D multiphase turbulence model (unknown problem!!) MOHAMMAD67 OpenFOAM Running, Solving & CFD 7 November 23, 2015 10:53
build your own turbulence model with buoyancy Thomas Baumann OpenFOAM 11 November 23, 2009 08:53
How to change to turbulence model constants? hyw Phoenics 3 July 22, 2002 09:29


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