BUG: In these solvers adjustPhi in the pEqn was calculated "before"

fvOption.relativeFlux() statement. Therefore adjustPhi was using
the absolute phi instead if the relative when the MRF was active
This commit is contained in:
Sergio Ferraris
2013-08-07 17:18:08 +01:00
parent de55d6522e
commit 05022c2c02
5 changed files with 10 additions and 7 deletions

View File

@ -59,9 +59,10 @@ int main(int argc, char *argv[])
// function objects so do it ourselves
runTime.functionObjects().start();
fvOptions.relativeFlux(phi);
adjustPhi(phi, U, p);
fvOptions.relativeFlux(phi);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{

View File

@ -19,12 +19,12 @@
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);
phiHbyA += phig;
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL);

View File

@ -13,10 +13,10 @@ surfaceScalarField phiHbyA
+ fvc::ddtPhiCorr(rAU, U, phi)
);
adjustPhi(phiHbyA, U, p);
fvOptions.relativeFlux(phiHbyA);
adjustPhi(phiHbyA, U, p);
// Non-orthogonal pressure corrector loop
while (pimple.correctNonOrthogonal())
{

View File

@ -5,10 +5,11 @@
UEqn.clear();
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
adjustPhi(phiHbyA, U, p);
fvOptions.relativeFlux(phiHbyA);
adjustPhi(phiHbyA, U, p);
// Non-orthogonal pressure corrector loop
while (simple.correctNonOrthogonal())
{

View File

@ -10,10 +10,11 @@ else
UEqn.clear();
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
adjustPhi(phiHbyA, U, p);
mrfZones.relativeFlux(phiHbyA);
adjustPhi(phiHbyA, U, p);
while (simple.correctNonOrthogonal())
{
tmp<fvScalarMatrix> tpEqn;