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

About the reactingFoam solver

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

Like Tree1Likes
  • 1 Post By mturcios777

Reply
 
LinkBack Thread Tools Display Modes
Old   June 3, 2012, 23:45
Question About the reactingFoam solver
  #1
New Member
 
Qingang Xiong
Join Date: May 2012
Location: Ames, IA, USA
Posts: 20
Rep Power: 5
Qingang Xiong is on a distinguished road
Dear OF members,
I am learning the code of reactingFoam. I found that in the reactingFoam.C there is "#include rhoEqn.H". I just want to know where is this header file? In addition, at where the compressivity "psi" get its value? I found that psi = thermo.psi(), but how the psi_ get its value? These two issues made me confused. Thank you for reply!
Qingang Xiong is offline   Reply With Quote

Old   June 4, 2012, 03:16
Default
  #2
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 237
Rep Power: 9
olivierG is on a distinguished road
hello,

You will find rhoEqn.H in src/finiteVolume/cfdTools/compressible/, as rhoEqn is shared by other solver. (i guess you and me would have liked a link instead).

Psi come from your thermoType, that why you get "psi = thermo.psi()". (C++ stuff to save memories ...)

regards,
olivier
olivierG is offline   Reply With Quote

Old   June 4, 2012, 12:51
Default
  #3
New Member
 
Qingang Xiong
Join Date: May 2012
Location: Ames, IA, USA
Posts: 20
Rep Power: 5
Qingang Xiong is on a distinguished road
Quote:
Originally Posted by olivierG View Post
hello,

You will find rhoEqn.H in src/finiteVolume/cfdTools/compressible/, as rhoEqn is shared by other solver. (i guess you and me would have liked a link instead).

Psi come from your thermoType, that why you get "psi = thermo.psi()". (C++ stuff to save memories ...)

regards,
olivier
Dear olivier,
Thank you very much for your reply! I have found the "rhoEqn.H". But for the psi(), I know it is positioned in the class "basicThermo" and it is used to access the variable "psi_". But in "basicThermo.C" I found that "psi_" needs not to read data, so where for the program gives value to "psi_"? Thanks.
Qingang Xiong is offline   Reply With Quote

Old   June 4, 2012, 12:58
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
psi() is an access function to get a reference to the private member psi_ of the thermo class. As an example, look at the top level thermo classes of psiThermo and rhoThermo to see the differences.
mturcios777 is offline   Reply With Quote

Old   June 5, 2012, 09:58
Default
  #5
New Member
 
Qingang Xiong
Join Date: May 2012
Location: Ames, IA, USA
Posts: 20
Rep Power: 5
Qingang Xiong is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
psi() is an access function to get a reference to the private member psi_ of the thermo class. As an example, look at the top level thermo classes of psiThermo and rhoThermo to see the differences.
Dear mturcios,
Thank you for your help. I understand that psi() is an access function to psi_ and rho = p*psi() in psiThermo. Whether it means that psi_ will get value automatically with 1/(RT)? I found the combustionModels is really complex and related to thermoPhysics models which is also very complex. I think you are good at these so kindly thanks!
Qingang Xiong is offline   Reply With Quote

Old   June 5, 2012, 12:28
Default
  #6
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
Have a look in $FOAM_SRC/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C. There you will see all the allowed types for hsPsiThermo. psi is calculated from the equation of state, so the calculation of psi depends on which equation of state you have selected. The code for the different equations is found in $FOAM_SRC/thermophysicalModels/specie/equationOfState.

For example, for perfectGas (in equationOfState/perfectGas/perfectGasI.H), psi = 1/(R()*T). Have a look at the section on thermophysical models to see how the specification of thermo works.
wenxu likes this.
mturcios777 is offline   Reply With Quote

Old   June 5, 2012, 12:35
Default
  #7
New Member
 
Qingang Xiong
Join Date: May 2012
Location: Ames, IA, USA
Posts: 20
Rep Power: 5
Qingang Xiong is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
Have a look in $FOAM_SRC/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C. There you will see all the allowed types for hsPsiThermo. psi is calculated from the equation of state, so the calculation of psi depends on which equation of state you have selected. The code for the different equations is found in $FOAM_SRC/thermophysicalModels/specie/equationOfState.

For example, for perfectGas (in equationOfState/perfectGas/perfectGasI.H), psi = 1/(R()*T). Have a look at the section on thermophysical models to see how the specification of thermo works.
Dear mturcios,
I understand now. Thank you very much! Can I have your email? May be we can discuss about OpenFOAM directly.
Qingang Xiong is offline   Reply With Quote

Reply

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
Is it possible to accelerate the ode solver of reactingFoam? pajofego OpenFOAM Running, Solving & CFD 2 August 10, 2014 05:38
HELP!!! (ReactingFoam) vianne OpenFOAM 3 March 14, 2010 20:17
ReactingFoam solver muthukaalai OpenFOAM Running, Solving & CFD 1 June 16, 2008 13:36
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
ReactingFoam solver restart gcollecutt OpenFOAM Running, Solving & CFD 0 August 9, 2007 05:30


All times are GMT -4. The time now is 05:37.