CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   rho in basicPsiThermo (http://www.cfd-online.com/Forums/openfoam/96714-rho-basicpsithermo.html)

megacrout January 30, 2012 11:47

rho in basicPsiThermo
 
Hi,

1) Why does basicRhoThermo possess a "non-const access to the local density field", i.e.

Quote:

virtual volScalarField& rho();
but not basicPsiThermo?

2) I need to access rho as a non-tmp object using basicPsiThermo (need Janaf and Sutherland). How do I have modify this utility in order to make it work?

Thx.

Tibo

Chris Lucas January 31, 2012 03:22

Hi,

About question no. 1)

Because basicRhoThermo has an internal rho volScalarField and basicPsiThermo doesn't. In basicPsiThermo rho is calculated by psi*p.

About question no. 2).

I'm not sure about janaf, but I can use sutherland in combination with basicPsiThermo. The way janaf works (not 100% sure), it should work as well in combination with basicPsiThermo. None of the two models need the density field.

Best Regards,
Christian

megacrout February 2, 2012 03:25

Hey Chris,

Thanks for your help.

1) I obviously noticed that rho is not computed the same, but I was confused noticing that this influences the way it is defined and the way it can be used. (And still am a bit).

2) I guess my question was not detailed enough. I know that Janaf AND Sutherland models work in combination with basicPsiThermo (s. e.g. reactingFoam) and that is precisely why I want to use this thermo package.
But I need to use and modify the value of thermo.rho() in the pEqn.H file and thought I needed to change the way it is defined to do so. I found an alternative solution though, as explained in the original thread about that topic: http://www.cfd-online.com/Forums/ope...-operator.html (see post #15).

Regards.


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