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

Updating thermophysical properties with temperature

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2019, 04:09
Default Updating thermophysical properties with temperature
  #1
New Member
 
Mohammad
Join Date: Mar 2019
Posts: 2
Rep Power: 0
mohmmad994 is on a distinguished road
how is it possible to write a combustion solver which uses Teqn to solve energy and then for upgrading thermo library what should i do ? i mean the line thermo.correct(); looks to work with changing sensible enthalpy and if enthalpy is not changing thermo lib wouldnt get updated therefore rho=thermo.rho() wouldnt solve the prfect gas formula with the new temperature and rho wouldnt solve correctly.
so my question is in what way i can update thermo lib, only with temperature so i could be able to use it in my solver to find new amount of viscousity and rho according to the temperature?


Thanks ;
mohmmad994 is offline   Reply With Quote

Old   May 20, 2019, 05:30
Default
  #2
Member
 
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7
raumpolizei is on a distinguished road
Hey mohmmad994,

to my knowledge, there is no thermo class relying on a temperature variable being solved. A possible workaround ("hack") would be to calculate the energy variable based on the temperature after solving your temperature equation, but before calling thermo.correct() in your solver. The internal energy or enthalpy is used in the thermo.correct() function to first compute a temperature prior to updating all internal and boundary fields (take for example a look at the hePsiThermo class, more specifically at the correct() and calculate() functions). The more complicated way would be to write an own class that handles your specific issue. Hope this helps.

Cheers
RP

PS: The energy variable can be for example computed if the mixture, pressure and temperature are known in a certain cell via the cellmixture(label celli) and HE(scalar p,scalar T) function (as used in the hePsiThermo<...>::calculate() function).
raumpolizei is offline   Reply With Quote

Reply


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
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 09:21
Setting the height of the stream in the free channel kevinmccartin CFX 12 October 13, 2022 21:43
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
FIDAP and temperature dependent mat properties semetay FLUENT 0 July 11, 2006 13:45


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