CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   thermo->correct (http://www.cfd-online.com/Forums/openfoam/85624-thermo-correct.html)

Peter_600 March 2, 2011 15:38

thermo->correct
 
Hi at all

What do those functions do?

thermo->correct();

rho = thermo->rho();

Thanks
Peter

mturcios777 March 2, 2011 19:16

Thermo->correct updates thermodynamic properties, thermo->rho calculates density based on the thermodynamic model.

Peter_600 March 3, 2011 08:07

Thank you very much!

When is it actually necessary to update thermodynamic properties? After mesh motion ? Topological changes?

Does the thermo-> rho step replace my rhoeqn.H file?

Thanks in advance
Peter

mturcios777 March 4, 2011 14:46

I guess it depends on what type of model you are running, but if you are solving energy/enthalpy/etc transport equations, then you need to update to thermodynamic properties. Temperature, density and transport properties (like alpha an mu) come from the thermodynamics. I looked at the definition of the correct() member function for hPsiThermo, and all it does is call calculate() which is defined in the following file:

http://foam.sourceforge.net/doc/Doxy...8C_source.html
(for OF 1.6)

thermo.rho() returns the density based on pressure. As such it appears to overwrite the values of the field, but we still needed to solve a transport equation for rho, since most of the equations are coupled through rho.


All times are GMT -4. The time now is 09:57.