CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Energy equation in RhoPimple solvers

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By LuckyTran
  • 1 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2018, 06:11
Default Energy equation in RhoPimple solvers
  #1
Member
 
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 7
TommyM is on a distinguished road
Hi,
Does anyone know where the Energy equation is solved in rhoPimple algorithm?
From what I understood, the algorithm "chronological order" is the following:
1- Pressure is guessed
2- Momentum equations provide Velocity
3- Velocity is inserted into Mass equation to provide Pressure
4- Pressure is used to correct Velocity
Then, the cycle restarts.
In some books, I read that Energy equation (to provide Density) is solved between steps 2-3, while in other books I found that it is the last step (after step 4).
Most likely, something is missing in my reasoning.
Could someone help me, please?
Thank you in advance,


Tommy M.
TommyM is offline   Reply With Quote

Old   October 22, 2018, 09:50
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,668
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Well you don't ever solve the energy equation for density. You solve the energy equation for the energy, i.e. internal energy or enthalpy. Getting density is another problem. Actually you get the density from the continuity equation.

From rhoPimpleFoam.c

Code:
        while (pimple.loop())
        {
            #include "UEqn.H"
            #include "EEqn.H"

            // --- Pressure corrector loop
            while (pimple.correct())
            {
                #include "pEqn.H"
            }

            if (pimple.turbCorr())
            {
                turbulence->correct();
            }
          }
The energy equation is solved (solved in EEqn.h) after the momentum predictor step (UEqn.h, which is your step #2) and before the corrector step in pEqn.h (your step 3-4). The density is updated at the beginning of pEqn.h (between steps 2 and 3) and at end of pEqn.h, so after your step #4. However, there is yet a third place in pEqn.h where you solve for the density using the continuity equation after applying the corrector (in steady solvers this step doesn't exist). The final step at the end of pEqn.h is due to application of under-relaxation which means you don't take the full update of pressure available.

So both are correct. You just confused solving for energy with solving for density. The energy equation does not provide density. Density is updated twice (often more) because you just solved for the new energy, so the density needs to be updated for the latest energy. Then after you do the corrector step you have a new pressure, so here again you should update the density for the latest pressure.

It is a lot of things to keep track of because there are several algorithms embedded in one another all running at the same time. The first one is you are solving a basic set of equations (continuity, momentum, energy). The second is you are using SIMPLE/PISO/PIMPLE to solve the pressure-velocity coupling problem. The third is you are constantly updating density (using your equation of state) always using the latest available pressure & energy. The fourth is you are applying under-relaxation! It's much easier to analyze when you are dealing with only 1 or 2 aspects, but having all 4 at the same time gets confusing fast if you don't even recognize that you have 4 different reasons for doing things.
TommyM likes this.
LuckyTran is offline   Reply With Quote

Old   October 22, 2018, 10:34
Default
  #3
Member
 
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 7
TommyM is on a distinguished road
Ok. Hence Energy equation is solved to obtain internal energy (or enthalpy) which is linked to temperature through a thermodynamic relation (e.g. dh=cpdT), then density is corrected through a State equation (e.g. rho = p/RT) to take into account for the change in energy, right?
Thank you for your help!
TommyM is offline   Reply With Quote

Old   October 22, 2018, 10:47
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,668
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Right... Notice that you only solve for energy only once in this entire mess (because solving the energy equation is not part of SIMPLE, because SIMPLE solves only the continuity & momentum problem). Hence why you usually have to repeat this whole cycle several times. Most of this mess is caused by SIMPLE and trying to applying under-relaxation on top of it.
TommyM likes this.
LuckyTran is offline   Reply With Quote

Old   October 22, 2018, 11:31
Default
  #5
Member
 
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 7
TommyM is on a distinguished road
Ok. Thank you! Your help is very much appreciated.
TommyM 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
Comparing residuals of momentum and energy equation skarma FLUENT 4 November 25, 2017 22:03
Error in computing Energy equation faab OpenFOAM Running, Solving & CFD 0 February 3, 2017 13:04
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Pyrolisis energy equation yaqb OpenFOAM Programming & Development 0 May 22, 2014 17:25
problem on energy and flow equation solving separately preetam69 FLUENT 2 July 30, 2013 21:08


All times are GMT -4. The time now is 00:17.