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

turbulenceModel - class definition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2013, 16:09
Default turbulenceModel - class definition
  #1
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
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 =
turbulenceModelConstructorTablePtr_->find(modelType)

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
Joachim is offline   Reply With Quote

Old   June 21, 2013, 03:26
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
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: http://openfoamwiki.net/index.php/Op...tion_mechanism
Bernhard is offline   Reply With Quote

Old   June 21, 2013, 10:10
Default
  #3
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
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

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
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 20:30
About UList and List class leosding OpenFOAM Running, Solving & CFD 1 December 1, 2005 23:52
Expanding a class fabianpk OpenFOAM 0 October 3, 2005 04:26


All times are GMT -4. The time now is 23:38.