Files
OpenFOAM-12/applications/solvers/multiphase/interFoam/correctPhi.H
Henry Weller e8ff92cd67 CorrectPhi: Added pressureReference argument to set the reference cell
so that the same reference cell is used for pcorr and p or p_rgh to improve
consistency between flux and flux correction.
2021-04-30 21:07:15 +01:00

38 lines
638 B
C++

// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & Uf();
correctUphiBCs(U, phi, true);
if (divU.valid())
{
CorrectPhi
(
phi,
U,
p_rgh,
surfaceScalarField("rAUf", fvc::interpolate(rAU())),
divU(),
pressureReference,
pimple
);
}
else
{
CorrectPhi
(
phi,
U,
p_rgh,
surfaceScalarField("rAUf", fvc::interpolate(rAU())),
geometricZeroField(),
pressureReference,
pimple
);
}
#include "continuityErrs.H"
// Make the flux relative to the mesh motion
fvc::makeRelative(phi, U);