CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   thermo->correct (

Peter_600 March 2, 2011 15:38

Hi at all

What do those functions do?


rho = thermo->rho();


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

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:
(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 16:58.