CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   PIMPLE algorithm -- Energy equation (

gdeneyer April 26, 2012 08:05

PIMPLE algorithm -- Energy equation

I had an attentive look at the rhoPimpleFoam algorithm and something is still unclear to me.

Why is the equation for h not solved in the PISO loop. I actually don't see a corrector for h however it's solved with the predicted velocity and not with the corrected one.

Is it the goal of the oCorr(0-->nOuterCorr) loop ? If yes, why are we always using nOuterCorr = 1 in the example cases ? Do you agree that this leads to a non corrected energy field ?

Thank you in advance,


linch April 26, 2012 10:57

Hi Gilles,

as far as I understand, the hEqn isn't being solved using the predicted velocity, but using fluxes phi base on the final velocity from the last outer correction or from the last time step in the first pimple loop. If nOuterCorr = 1, velocity from the last time step is being used, always.

However, it is also not clear for me, why different scalar transport equations, like the h-equation in rhoPimpleFoam, are always being solved before the pressure correction, and not after it. It is not only the case in rhoPimpleFoam, but in all PIMPLE-based OF solvers I took a look at. For me it also looks like the results would be "wrong" for dynamic time stepping, but as I am not experienced in numerics, I'm almost sure, that my point of view is wrong, and not the OF implementation. But still I would like to know why.

Best regards,

gjauwerda May 2, 2012 08:32

I have been wondering the exact same thing.
It also works this way in other solvers (e.g. SIMPLE), not just the PIMPLE solvers. It means rho will be update for the new Temperature field in between the momentum equation and the pressure correction equation, but not any other coefficients.

If I write the equations in functions of old values (previous timestep), new values, and in-between values (*), I get this:

U* = T_old, rho_old, p_old, phi_old, Q_old
T_new = rho_old, phi_old, p_old, Q_old
rho* = T_new, p_old
p_corr, U_corr, phi_corr = rho*, U*, Q_old

It is not completely clear to me, why in the pEqn.H file, rho = thermo.rho() is called both before and after the pressure correction equation is solved. The call to thermo.rho() does not update your rho-field based on newest p or T (or h) values as far as I understand it, only a call to thermo.correct() will do this. And the value of rho() is not changed in pEqn.H (for SIMPLE routine).

All times are GMT -4. The time now is 21:48.