|
[Sponsors] |
March 22, 2022, 05:46 |
Energy Equ. based on temperature
|
#1 | |||||
Senior Member
|
Hello Foamers,
I was working with older version of OpenFOAM 2.1.1. Currently, I shifted to version v2106 for some reason. While working with pyrolysis in OFv2106, the energy equation looks like, Quote:
Quote:
In basicThermo.C, Quote:
Quote:
Info << "T_from Energy equ:" << T_ << endl; I can find the variation in temperature in the log file as, Quote:
Another question: What are differences in implementing T or h in Energy equation and their advantages and disadvantages in OpenFOAM ? Thank you |
||||||
March 23, 2022, 08:12 |
|
#2 | |
Senior Member
|
Quote:
Thank you |
||
March 28, 2022, 04:54 |
|
#3 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
What you are solving for in fluid dynamics is the energy equation. For this reason solving for h does make sense. If you want to solve for T you already make an assumption about your thermodynamic model:
This model is fairly ok if the temperature range is not too high or for ideal gases. If you want to apply other thermodynamic models (see https://cfd.direct/openfoam/user-gui...hermophysical/) or be as flexible as possible in selecting your desired thermodynamic model at run time, you have to solve for h. If you want then to retrieve the temperature from your equation of state, you have to solve a non-linear equation. See https://caefn.com/openfoam/temperature-calculation for an explanation. |
|
March 31, 2022, 01:08 |
|
#4 |
Senior Member
|
Hello Michael Alletto,
Thanks for your points. In my case, the boundary condition is given in the form of temperature not heat and that's the reason why my energy equation is in temperature form. Correct me if I'm wrong please. So the temperature variable calculates heat transferred into the domain. Hereby in my governing equation, the source terms are dependent on temperature changes too. Thank you |
|
May 18, 2022, 02:41 |
Solution for my query (Hope it may help someone)
|
#5 | |||
Senior Member
|
In higher versions of OpenFOAM, the temperature is calculated from enthalpy. In the file heSolidThermo.C, the function THE calculates temperature from enthalpy, where enthalpy is declared in the parent class heThermo.
In any case, if we require the energy equation in temperature form (as quoted below), that's not gonna work, as there will no change in temperature at the end result. Quote:
Quote:
Quote:
Thank you |
||||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to write a udf to define average temperature at one boundary based on the value o | er_ijaz | Fluent UDF and Scheme Programming | 1 | May 5, 2021 23:43 |
Static Temperature / Opening Temperature | JulianP | CFX | 12 | April 10, 2019 19:00 |
Cavity based BuoyantSimpleFoam problem where changing temperature causes crashing | emills | OpenFOAM | 0 | December 14, 2017 15:07 |
abnormal temperature near interface when adding energy equation to interFoam | houkensjtu | OpenFOAM | 4 | June 26, 2013 14:40 |
How to call the subroutine to compute two temperature energy conservation equations? | wangweizong | Phoenics | 1 | March 21, 2012 10:27 |