|
[Sponsors] |
October 22, 2018, 06:11 |
Energy equation in RhoPimple solvers
|
#1 |
Member
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 7 |
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. |
|
October 22, 2018, 09:50 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,668
Rep Power: 65 |
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(); } } 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. |
|
October 22, 2018, 10:34 |
|
#3 |
Member
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 7 |
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! |
|
October 22, 2018, 10:47 |
|
#4 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,668
Rep Power: 65 |
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.
|
|
October 22, 2018, 11:31 |
|
#5 |
Member
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 7 |
Ok. Thank you! Your help is very much appreciated.
|
|
|
|
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 |