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

How is the turbulence model called in openfoam?

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 1 Post By hz283
  • 6 Post By jona

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2012, 19:10
Post How is the turbulence model called in openfoam?
  #1
Senior Member
 
Join Date: Nov 2012
Posts: 171
Rep Power: 14
hz283 is on a distinguished road
Hi,

I am looking into how the RAS models are called (for example how k and epsilon equations are called to be solved in pisofoam). I had some questions about this.

Take PISOFOAM as an example, I know that turbulence->correct(); is used to solve the k and epsilon equations and correct the turbulent viscosity. And then turbulence is defined in creatFields. H as follows:

00039 autoPtr<incompressible::turbulenceModel> turbulence
00040 (
00041 incompressible::turbulenceModel::New(U, phi, laminarTransport)
00042 );

in the class turbulenceModel, the function correct appears as follows:

00127 void turbulenceModel::correct()
00128 {
00129 transportModel_.correct();
00130 }

In fact, in transportModel, there is no function defination for correction(). Thus I do not know how the main solver, PISOFOAM, continue to call the k and epsilon equations. I really appreciate it if anyone can give me some help with this problem.

hz283
xywworld likes this.
hz283 is offline   Reply With Quote

Old   November 18, 2012, 01:11
Default
  #2
New Member
 
Jörn Nathan
Join Date: Aug 2011
Location: Montréal
Posts: 11
Rep Power: 15
jona is on a distinguished road
Hi hz283,

Foam::incompressible::turbulenceModel is an abstract class where the function correct() is virtual, so the child class, e.g. RASmodel, has to redefine it.

RASmodel declares it also as a virtual method, so the next child, e.g. kEpsilon, has to redefine it as well.

In the definition of correct() in kEpsilon finally the additional two equations for k and epsilon are solved.

References:
http://foam.sourceforge.net/docs/cpp/a02160.html
http://foam.sourceforge.net/docs/cpp/a01654.html
http://foam.sourceforge.net/docs/cpp/a00971.html

explanation of virtual functions:
http://www.cplusplus.com/doc/tutorial/polymorphism/
(see Virtual Members)

Have fun,

Jörn
kiddmax, fumiya, dawnrain and 3 others like this.
jona is offline   Reply With Quote

Old   November 18, 2012, 06:08
Default
  #3
Senior Member
 
Join Date: Nov 2012
Posts: 171
Rep Power: 14
hz283 is on a distinguished road
Hi Jorn,

Thank you so much for your help.

hz283
hz283 is offline   Reply With Quote

Old   May 4, 2017, 22:20
Default
  #4
New Member
 
Zengrong Hao
Join Date: Sep 2015
Posts: 2
Rep Power: 0
TsinghuaBoiler is on a distinguished road
Hi jona,

I am confused about the class 'incompressible'. I think it should be a parent class of 'turbulenceModel', but in the declaration of the child class 'turbulenceModel' there is no statement saying that it is a child of 'incompressible'. Additionally, I cannot find any class with the name 'incompressible'. Could you explain the meaning of this 'incompressible' for me?

Thank you!
Zengrong
TsinghuaBoiler is offline   Reply With Quote

Reply

Tags
turbulence models


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
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
zeta - F turbulence model e_boesso OpenFOAM Programming & Development 15 August 18, 2011 16:31
KOmega Turbulence model from wwwopenFOAMWikinet philippose OpenFOAM Running, Solving & CFD 30 August 4, 2010 11:26
turbulence model equation Andy Chen FLOW-3D 4 January 1, 2010 22:45
Recompile turbulence model in OpenFoam qtian OpenFOAM Running, Solving & CFD 7 November 26, 2007 16:51


All times are GMT -4. The time now is 22:53.