CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to change turbulence model in InterFoam (http://www.cfd-online.com/Forums/openfoam-solving/98923-how-change-turbulence-model-interfoam.html)

Gildeh March 22, 2012 01:36

How to change turbulence model in InterFoam
 
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

GerhardHolzinger March 26, 2012 04:05

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 March 28, 2012 11:16

Hi Gerhard
 
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

GerhardHolzinger March 28, 2012 11:40

Quote:

Originally Posted by Gildeh (Post 351959)
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 (Post 351959)
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.

Gildeh March 28, 2012 12:04

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


All times are GMT -4. The time now is 01:42.