CFD Online Discussion Forums

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

Peter_600 March 2, 2011 14:38

thermo->correct
 
Hi at all

What do those functions do?

thermo->correct();

rho = thermo->rho();

Thanks
Peter

mturcios777 March 2, 2011 18:16

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

Peter_600 March 3, 2011 07: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 13: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.

manafaero April 1, 2019 07:58

Dear sir

Could youplease tell me where can i find the definition of correct and update in openfoam. I am using Smagorinsky mode in incompressible LES . For eg in that files i have lines like

GenEddyVisc::correct(gradU);
updateSubGridScaleFields(gradU());

how or where can i find the definition of correct and update?


All times are GMT -4. The time now is 11:21.