
[Sponsors] 
Temperature calculation from sensible internal energy 

LinkBack  Thread Tools  Search this Thread  Display Modes 
April 12, 2019, 05:42 
Temperature calculation from sensible internal energy

#1 
New Member
Matteo
Join Date: Jan 2019
Posts: 4
Rep Power: 7 
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)); Inside the thermophysicalProperties these are the selected parameters: Code:
thermoType { type hePsiThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } 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); } 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(); } 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. 

April 12, 2019, 14:48 

#2 
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 14 

April 15, 2019, 09:44 

#3 
New Member
Matteo
Join Date: Jan 2019
Posts: 4
Rep Power: 7 
Thank you for the answer. Unfortunately I've already seen that post and there are two points making it unuseful to me:
1 in that case enthalpy is considered instead of sensible internal energy; 2 the Newton method part is not explained, they just say a Newton method is applied and nothing more. Is there anybody having an answer to my doubats? 

April 15, 2019, 14:11 

#4 
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 14 
The code for the newton method is provided, so I don't see the problem. Or a quick google search for the newton method will provide answers. Following the nice explanation in the link provided, we can find equivalent functions to back out temperature from internal energy  it actually uses the same newton method, just with different inputs :
Code:
template<class Thermo, template<class> class Type> inline Foam::scalar Foam::species::thermo<Thermo, Type>::TEs ( const scalar es, const scalar p, const scalar T0 ) const { return T ( es, p, T0, &thermo<Thermo, Type>::Es, &thermo<Thermo, Type>::Cv, &thermo<Thermo, Type>::limit ); } Caelan 

April 16, 2019, 03:46 

#5 
New Member
Matteo
Join Date: Jan 2019
Posts: 4
Rep Power: 7 
Probably I did not exlain well what I'm looking for. I've already written what you posted in the last reply in the first part of my thread. I know what a Newton method is, I know I have to put F=Es and f=es. The point is that I cannot understand the physical meaning of es or, if you prefer, which is the physical functional I have to put equal zero for the Newton method: x1 = x0  G(x0)/G'(x0). What is G(x) in my case?


April 16, 2019, 09:37 

#6  
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12 
Quote:
Code:
T_new = T_old  [ Hs(p_old,T_old)  hs_fromTransportEqn]/ Cp(p_old,T_old)
__________________
https://openfoam.top 

Thread Tools  Search this Thread 
Display Modes  


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 highRe flows?  Zhong Lei  Main CFD Forum  23  May 14, 1999 13:22 