Skip to content
Snippets Groups Projects
Commit 450ec095 authored by Henry's avatar Henry
Browse files

interDyMFoam: Corrected handling of relative and absolute fluxes in correctPhi

parent 588926a7
Branches
Tags
No related merge requests found
{
#include "continuityErrs.H"
wordList pcorrTypes
(
p_rgh.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
forAll (p_rgh.boundaryField(), i)
{
if (p_rgh.boundaryField()[i].fixesValue())
{
pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
}
}
volScalarField pcorr
(
IOobject
(
"pcorr",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("pcorr", p_rgh.dimensions(), 0.0),
pcorrTypes
);
dimensionedScalar rAUf("(1|A(U))", dimTime/rho.dimensions(), 1.0);
adjustPhi(phi, U, pcorr);
fvc::makeAbsolute(phi, U);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pcorrEqn
(
fvm::laplacian(rAUf, pcorr) == fvc::div(phi)
);
pcorrEqn.setReference(pRefCell, pRefValue);
pcorrEqn.solve();
if (pimple.finalNonOrthogonalIter())
{
phi -= pcorrEqn.flux();
phiAbs = phi;
fvc::makeRelative(phi, U);
}
}
#include "continuityErrs.H"
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment