|
[Sponsors] |
June 3, 2012, 23:45 |
About the reactingFoam solver
|
#1 |
New Member
Qingang Xiong
Join Date: May 2012
Location: Ames, IA, USA
Posts: 20
Rep Power: 14 |
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! |
|
June 4, 2012, 03:16 |
|
#2 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17 |
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 |
|
June 4, 2012, 12:51 |
|
#3 | |
New Member
Qingang Xiong
Join Date: May 2012
Location: Ames, IA, USA
Posts: 20
Rep Power: 14 |
Quote:
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. |
||
June 4, 2012, 12:58 |
|
#4 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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.
|
|
June 5, 2012, 09:58 |
|
#5 | |
New Member
Qingang Xiong
Join Date: May 2012
Location: Ames, IA, USA
Posts: 20
Rep Power: 14 |
Quote:
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! |
||
June 5, 2012, 12:28 |
|
#6 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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. |
|
June 5, 2012, 12:35 |
|
#7 | |
New Member
Qingang Xiong
Join Date: May 2012
Location: Ames, IA, USA
Posts: 20
Rep Power: 14 |
Quote:
I understand now. Thank you very much! Can I have your email? May be we can discuss about OpenFOAM directly. |
||
|
|
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 19: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 |