# How does the function"he=thermo.he()"work in EEqn.H with OpenFOAM2.2.1

 Register Blogs Members List Search Today's Posts Mark Forums Read

 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: 6 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();` where is the function "thermo.he()"? I think it is in the file "thermoI.H".I found the codes in "thermoI.H". Code: ```template class Type> inline Foam::scalar Foam::species::thermo::he(const scalar p, const scalar T) const { return Type >::he(*this, p, T);``` But where is the function "Type >::he(*this, p, T);"? I understand "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 inline Foam::scalar Foam::janafThermo::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 inline Foam::scalar Foam::janafThermo::hs ( const scalar p, const scalar T ) const { return ha(p, T) - hc(); } template inline Foam::scalar Foam::janafThermo::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 inline Foam::scalar Foam::janafThermo::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] ); }``` If I use absoluteEnthalpy,then the function "he(*this, p, T)" is corresponding to Code: ```template inline Foam::scalar Foam::janafThermo::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] ); }``` And if I use sensible Enthalpy ,then the function "he(*this, p, T)" is corresponding to Code: ```template inline Foam::scalar Foam::janafThermo::hs ( const scalar p, const scalar T ) const { return ha(p, T) - hc(); }``` Does my understanding right?If it is wrong,how should understander Code: `volScalarField& he = thermo.he();` and How does it work? Thanks in advance!Any reply will be appreciated!

 September 11, 2015, 18:58 #2 Member   Lisandro Maders Join Date: Feb 2013 Posts: 71 Rep Power: 6 Hello, were you correct in your analysis? I have similar doubts regarding to this.. Thanks! Lisandro

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Horacio Aguerre OpenFOAM Programming & Development 10 October 11, 2013 13:43 zqlhzx OpenFOAM Running, Solving & CFD 1 September 11, 2013 00:35

All times are GMT -4. The time now is 06:54.