|
[Sponsors] |
Temperature calculation in compressibleInterFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 30, 2021, 07:29 |
Temperature calculation in compressibleInterFoam
|
#1 |
New Member
Join Date: Dec 2021
Posts: 23
Rep Power: 5 |
Hello to all,
In compressibleInterFoam of OF2006, the temperature equation is defined as: Code:
fvScalarMatrix TEqn ( fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::Sp(contErr, T) - fvm::laplacian(turbulence.alphaEff(), T) + ( divUp()// - contErr/rho*p + (fvc::ddt(rho, K) + fvc::div(rhoPhi, K))() - contErr*K ) *( alpha1()/mixture.thermo1().Cv()() + alpha2()/mixture.thermo2().Cv()() ) == fvOptions(rho, T) ); Code:
mixture.correctThermo(); mixture.correct(); In the correct() function the temperature is being recalculated from the energy from line 80-88 in the heRhoThermo.C with a Newton-Raphson method [https://caefn.com/openfoam/temperature-calculation] My question is: If we are already solving for temperature, why do we need to recalculate the values from energy? Edit: The temperature used for the calculation is from obtained from the mixture object which will get the temperature field by inheriting from the basicThermo class. This object has two AutoPtr pointers for each phase. Each of which will create they own temperature field since they inherit from basicThermo. Are the lines 80-88 just updating the temperature values of these fields? By why from energy and not directly from the calculated temperature? Or am I getting the wrong idea? |
|
May 4, 2022, 05:14 |
Found the solution?
|
#2 |
New Member
Julian Re
Join Date: Jan 2022
Location: Germany
Posts: 11
Rep Power: 4 |
Hey MamboJambo,
basically I have the same question! I have to phases (polymer and air) and a modified TEqn. Now I want to enforce/overwrite the phase temperatures with the resulting T of TEqn! (no recalculation for each phase based on h equation). Do you have any idea how to do this? |
|
May 9, 2022, 05:54 |
|
#3 |
New Member
Join Date: Dec 2021
Posts: 23
Rep Power: 5 |
Try to see how to disconnect on line 80-88 in heRhoThermo.C
Code:
if (this->updateT()) { TCells[celli] = mixture_.THE ( hCells[celli], pCells[celli], TCells[celli] ); } Code:
updateT false; Last edited by MamboJambo; May 27, 2022 at 13:38. |
|
May 25, 2022, 06:30 |
Thank you!
|
#4 | |
New Member
Julian Re
Join Date: Jan 2022
Location: Germany
Posts: 11
Rep Power: 4 |
Quote:
Thank you for your advise. i just commented these lines out... then I had a problem with a wrong temperature field to the boundary patches (no influence on the temperature of the BC...). Seemed to be a bug of my version (openFOAM v 1812)... |
||
June 26, 2022, 22:46 |
|
#5 | |
Member
Join Date: Nov 2020
Posts: 53
Rep Power: 6 |
Quote:
I do have the same question as well. It bothers me because I need to add some source term which will manipulate only the energy equation for the first phase. However, compressibleInterFoam solves the unified T equation which I believe would lead me to wrong solutions. Any thoughts about this? Regards, Mike |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Porous domain energy calculation and specific heat capacity temperature dependent | Vishnu_bharathi | CFX | 9 | November 29, 2017 14:24 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
why doesn't temperature limited disappear during the calculation? | Olga | FLUENT | 0 | May 12, 2011 04:48 |
external radiation temperature calculation | apostolos | FLUENT | 0 | January 19, 2008 13:02 |
calculation of bulk temperature in channel flow | moshe | FLUENT | 0 | May 13, 2007 10:57 |