|
[Sponsors] |
How does the function"he=thermo.he()"work in EEqn.H with OpenFOAM2.2.1 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 24, 2013, 05:34 |
How does the function"he=thermo.he()"work in EEqn.H with OpenFOAM2.2.1
|
#1 |
Member
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12 |
Hi Foamers:
I am confused with how does the function " thermo.he()"work?in other word,how to abtain Enthalpy in EEqn.H with OF2.2.1 ? In EEqn.H,Enthalpy can be availabled with the code: Code:
volScalarField& he = thermo.he(); I think it is in the file "thermoI.H".I found the codes in "thermoI.H". Code:
template<class Thermo, template<class> class Type> inline Foam::scalar Foam::species::thermo<Thermo, Type>::he(const scalar p, const scalar T) const { return Type<thermo<Thermo, Type> >::he(*this, p, T); I understand "Type<thermo<Thermo, Type> >::he(*this, p, T);" as following: If I use janafThermo,the function "he(*this, p, T)" is in the "janafThermoI.H".We can see the following codes in "janafThermoI.H": Code:
template<class EquationOfState> inline Foam::scalar Foam::janafThermo<EquationOfState>::ha ( const scalar p, const scalar T ) const { const coeffArray& a = coeffs(T); return this->RR* ( ((((a[4]/5.0*T + a[3]/4.0)*T + a[2]/3.0)*T + a[1]/2.0)*T + a[0])*T + a[5] ); } template<class EquationOfState> inline Foam::scalar Foam::janafThermo<EquationOfState>::hs ( const scalar p, const scalar T ) const { return ha(p, T) - hc(); } template<class EquationOfState> inline Foam::scalar Foam::janafThermo<EquationOfState>::hc() const { const coeffArray& a = lowCpCoeffs_; const scalar Tstd = specie::Tstd; return this->RR* ( ( (((a[4]/5.0*Tstd + a[3]/4.0)*Tstd + a[2]/3.0)*Tstd + a[1]/2.0)*Tstd + a[0] )*Tstd + a[5] ); } template<class EquationOfState> inline Foam::scalar Foam::janafThermo<EquationOfState>::s ( const scalar p, const scalar T ) const { const coeffArray& a = coeffs(T); return this->RR* ( (((a[4]/4.0*T + a[3]/3.0)*T + a[2]/2.0)*T + a[1])*T + a[0]*::log(T) + a[6] ); } Code:
template<class EquationOfState> inline Foam::scalar Foam::janafThermo<EquationOfState>::ha ( const scalar p, const scalar T ) const { const coeffArray& a = coeffs(T); return this->RR* ( ((((a[4]/5.0*T + a[3]/4.0)*T + a[2]/3.0)*T + a[1]/2.0)*T + a[0])*T + a[5] ); } Code:
template<class EquationOfState> inline Foam::scalar Foam::janafThermo<EquationOfState>::hs ( const scalar p, const scalar T ) const { return ha(p, T) - hc(); } Code:
volScalarField& he = thermo.he(); Thanks in advance!Any reply will be appreciated! |
|
September 11, 2015, 18:58 |
|
#2 |
Member
Lisandro Maders
Join Date: Feb 2013
Posts: 98
Rep Power: 13 |
Hello,
were you correct in your analysis? I have similar doubts regarding to this.. Thanks! Lisandro |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Study of the EEqn.H in rhoPimpleDyMFoam. | Horacio Aguerre | OpenFOAM Programming & Development | 11 | August 19, 2022 02:47 |
errors about div(phi,h) when move 2.0.1solver to openfoam2.2.1 | zqlhzx | OpenFOAM Running, Solving & CFD | 1 | September 11, 2013 00:35 |