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

Temperature calculation in compressibleInterFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By MamboJambo

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 30, 2021, 06:29
Default Temperature calculation in compressibleInterFoam
  #1
New Member
 
Join Date: Dec 2021
Posts: 23
Rep Power: 4
MamboJambo is on a distinguished road
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)
    );
Afterwards two functions are called:
Code:
    mixture.correctThermo();
     mixture.correct();
The first function will create a he field from the values of pressure and temperature for each phase and call the correct() function.
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?
mikulo and JuRe09 like this.
MamboJambo 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
Porous domain energy calculation and specific heat capacity temperature dependent Vishnu_bharathi CFX 9 November 29, 2017 13:24
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
why doesn't temperature limited disappear during the calculation? Olga FLUENT 0 May 12, 2011 03:48
external radiation temperature calculation apostolos FLUENT 0 January 19, 2008 12:02
calculation of bulk temperature in channel flow moshe FLUENT 0 May 13, 2007 09:57


All times are GMT -4. The time now is 09:39.