CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Temperature calculation from sensible internal energy

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By zhangyan

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 12, 2019, 05:42
Default Temperature calculation from sensible internal energy
  #1
New Member
 
Matteo
Join Date: Jan 2019
Posts: 4
Rep Power: 7
Zanco is on a distinguished road
Hi guys. I'm writing a code using the NACA0012 airfoil tutorial for rhoSimpleFoam compressible solver as a guide.

Actually I'm not able to figure out how the temperature is calculated. I mean, If I'm right everything should be done inside the hePsiThermo.C and thermoI.H files where thermo.correct() and calculate() functions are defined.

Temperature calculation is coded this way:
Code:
Test = Tnew;
        Tnew =
            (this->*limit)
            (Test - ((this->*F)(p, Test) - f)/(this->*dFdT)(p, Test));
I cannot understand what the f stands for. To me this procedure looks like a Newton algorithm.

Inside the thermophysicalProperties these are the selected parameters:
Code:
thermoType
{
    type              hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst; 
    equationOfState perfectGas; 
    specie            specie;
    energy           sensibleInternalEnergy; 
}
hConst means Cp = const. sensibleInternalEnergy means I have to use the TEs. Thus f = es and F = Es where
Code:
template<class Thermo, template<class> class Type>
inline Foam::scalar
Foam::species::thermo<Thermo, Type>::Es(const scalar p, const scalar T) const
{
    return this->Hs(p, T) - p/this->rho(p, T);
}
and
Code:
template<class Thermo, template<class> class Type>
inline Foam::scalar
Foam::species::thermo<Thermo, Type>::es(const scalar p, const scalar T) const
{
    return this->Es(p, T)*this->W();
}
So Es should be the internal energy that is defined as enthalpy minus pressure over density while es (read f) is defined as Es times molecular weight.

Does anyone of you know what it stands for and why it should be there? I cannot understand exactly which is the whole functional I have to use inside the Newton iterations.

Thanks a lot to anyone who can help me.
Zanco is offline   Reply With Quote

 


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Total vs Internal Energy acalado FLUENT 2 May 3, 2018 17:08
Adding pressure and temperature sources instead of energy rae CFX 3 October 24, 2016 02:31
warning - extrapolating on temperature calculation cedame CONVERGE 2 September 5, 2016 11:55
Temperature to energy loss Vcent FLUENT 0 November 28, 2012 10:13
Why FVM for high-Re flows? Zhong Lei Main CFD Forum 23 May 14, 1999 13:22


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