CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

turbulenceModel - class definition

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

LinkBack Thread Tools Display Modes
Old   June 20, 2013, 16:09
Default turbulenceModel - class definition
Senior Member
Join Date: Mar 2012
Location: Atlanta
Posts: 140
Rep Power: 8
Joachim is on a distinguished road
Hi everyone!

I am relatively new at OpenFOAM (v2.2.0 on Ubuntu 12.04), and I have some problems understanding parts of the code. If you could help me a bit, I would really appreciate! I am mainly interested in the implementation of turbulence models.

1. If I go in "pimpleFoam.C", the file "createFields.C" is included. This file calls a function "incompressible::turbulenceModel::New(U, phi, laminarTransport)".
First surprise, this function is actually defined in the file "turbulenceModel.C", but with four arguments instead of three (it also requires "const word& turbulenceModelName"). I initially thought that the function might be overloaded, but I could not find any other "New" function, that would only contain three arguments...Where is it defined??

2. In the file "turbulenceModel.C", you can also read

turbulenceModelConstructorTable::iterator cstrIter =

where "modelType" is either "LES" or "RAS". However, I couldn't find anywhere in OpenFOAM the definitions of the other parameters! (using find/grep, etc). I thought "turbulenceModelConstructorTablePtr_" was a pointer pointing at an object of the class "turbulenceModelConstructorTable". This class should contain an iterator function called "find". Where are these classes being defined in the code?? (it has to be somewhere!).

Thank you very much for your help!

Joachim is offline   Reply With Quote

Old   June 21, 2013, 03:26
Senior Member
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 14
Bernhard is on a distinguished road
I can't give you a clear answer on the questions, but I can advise you to read this page:
Bernhard is offline   Reply With Quote

Old   June 21, 2013, 10:10
Senior Member
Join Date: Mar 2012
Location: Atlanta
Posts: 140
Rep Power: 8
Joachim is on a distinguished road
Thanks Bernhard! That solves my second question.

I also found the answer to my first question. I actually forgot to check the turbulenceModel.H file. The fourth argument is given a default value if not specified by the user.
Joachim is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Definition of a variable in a class u396852 OpenFOAM 3 September 26, 2012 04:50
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
About UList and List class leosding OpenFOAM Running, Solving & CFD 1 December 2, 2005 00:52
Expanding a class fabianpk OpenFOAM 0 October 3, 2005 04:26

All times are GMT -4. The time now is 12:46.