CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Role of Phi in pimpleDyMFoam (

fisch April 2, 2012 05:10

Role of Phi in pimpleDyMFoam

i am working with the pimpleDyMFoam solver.
In pEqn.H the U and therefore the phi are derived out of

U = rAU*UEqn().H();
phi = (fvc::interpolate(U) & mesh.Sf());

As i get it the fluxes in the UEqn are relative (which should be correct).
Isn't therefore the flux term inside the mentioned phi relative, too?

If yes, i don't understand why phi will be made relative (again) after solving the pEqn!?

thanks in advance,

deepsterblue April 2, 2012 10:41

Not really...

phi = (fvc::interpolate(U) & mesh.Sf());

In this case, phi is not relative to mesh-fluxes. It's just the absolute volumetric flux. Mesh-fluxes are factored-in only during the momentum solve (where a makeRelative has been called). Inside the PISO / SIMPLE / PIMPLE loop, fluxes are always assumed to be absolute.

It's made relative (again) after the pEqn solve because the U.correctBoundaryConditions() call might require relative fluxes for certain types of momentum BCs, like a movingWallVelocity, for instance.

fisch April 2, 2012 11:50

Thanks for the answer.

The only one question is why the phi is made absolute at the begin of a time loop!?!

deepsterblue April 2, 2012 11:52

That's simple. When fluxes are written to disk at runTime.write(), they're relative. Since meshPhi is also written to disk, all the necessary info is available when a restart is done.

fisch April 2, 2012 14:14

thank you very much

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