mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -59,9 +59,10 @@ int main(int argc, char *argv[])
|
|||||||
// function objects so do it ourselves
|
// function objects so do it ourselves
|
||||||
runTime.functionObjects().start();
|
runTime.functionObjects().start();
|
||||||
|
|
||||||
|
fvOptions.relativeFlux(phi);
|
||||||
|
|
||||||
adjustPhi(phi, U, p);
|
adjustPhi(phi, U, p);
|
||||||
|
|
||||||
fvOptions.relativeFlux(phi);
|
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
|
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);
|
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);
|
||||||
|
|
||||||
phiHbyA += phig;
|
phiHbyA += phig;
|
||||||
|
|
||||||
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
|
||||||
|
|
||||||
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
|
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
|
||||||
bool compressible = (compressibility.value() > SMALL);
|
bool compressible = (compressibility.value() > SMALL);
|
||||||
|
|
||||||
|
|||||||
@ -13,10 +13,10 @@ surfaceScalarField phiHbyA
|
|||||||
+ fvc::ddtPhiCorr(rAU, U, phi)
|
+ fvc::ddtPhiCorr(rAU, U, phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
adjustPhi(phiHbyA, U, p);
|
|
||||||
|
|
||||||
fvOptions.relativeFlux(phiHbyA);
|
fvOptions.relativeFlux(phiHbyA);
|
||||||
|
|
||||||
|
adjustPhi(phiHbyA, U, p);
|
||||||
|
|
||||||
// Non-orthogonal pressure corrector loop
|
// Non-orthogonal pressure corrector loop
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -5,10 +5,11 @@
|
|||||||
UEqn.clear();
|
UEqn.clear();
|
||||||
|
|
||||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
||||||
adjustPhi(phiHbyA, U, p);
|
|
||||||
|
|
||||||
fvOptions.relativeFlux(phiHbyA);
|
fvOptions.relativeFlux(phiHbyA);
|
||||||
|
|
||||||
|
adjustPhi(phiHbyA, U, p);
|
||||||
|
|
||||||
// Non-orthogonal pressure corrector loop
|
// Non-orthogonal pressure corrector loop
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,10 +10,11 @@ else
|
|||||||
|
|
||||||
UEqn.clear();
|
UEqn.clear();
|
||||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
||||||
adjustPhi(phiHbyA, U, p);
|
|
||||||
|
|
||||||
mrfZones.relativeFlux(phiHbyA);
|
mrfZones.relativeFlux(phiHbyA);
|
||||||
|
|
||||||
|
adjustPhi(phiHbyA, U, p);
|
||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
tmp<fvScalarMatrix> tpEqn;
|
tmp<fvScalarMatrix> tpEqn;
|
||||||
|
|||||||
Reference in New Issue
Block a user