Commit d9eb18ad authored by Henry's avatar Henry
Browse files

pEqn: DO NOT constrain the pressure equation as this will lead to continuity errors

parent 332c3cc3
......@@ -31,8 +31,6 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -65,8 +63,6 @@ else
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -34,8 +34,6 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -69,8 +67,6 @@ else
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -45,8 +45,6 @@ while (pimple.correctNonOrthogonal())
+ fvOptions(psi, p_rgh, rho.name())
);
fvOptions.constrain(p_rghEqn);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -31,8 +31,6 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -65,8 +63,6 @@ else
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -52,8 +52,6 @@
- fvm::laplacian(rhorAUf, p_rgh)
);
fvOptions.constrain(p_rghEqn);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -44,8 +44,6 @@
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -83,8 +81,6 @@
- fvm::laplacian(rhorAUf, p)
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -39,8 +39,6 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -74,8 +72,6 @@ else
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -50,8 +50,6 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -89,8 +87,6 @@ else
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -31,8 +31,6 @@
// Relax the pressure equation to ensure diagonal-dominance
pEqn.relax();
fvOptions.constrain(pEqn);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
......@@ -67,8 +65,6 @@
pEqn.setReference(pRefCell, pRefValue);
fvOptions.constrain(pEqn);
pEqn.solve();
if (simple.finalNonOrthogonalIter())
......
......@@ -43,8 +43,6 @@ if (simple.transonic())
// Relax the pressure equation to maintain diagonal dominance
pEqn.relax();
fvOptions.constrain(pEqn);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
......@@ -82,8 +80,6 @@ else
fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
......
......@@ -52,8 +52,6 @@
- fvm::laplacian(rAUf, p_rgh)
);
fvOptions.constrain(p_rghEqn);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -32,8 +32,6 @@ if (pimple.transonic())
+ fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -67,8 +65,6 @@ else
+ fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -45,8 +45,6 @@ while (pimple.correctNonOrthogonal())
+ fvOptions(psi, p_rgh, rho.name())
);
fvOptions.constrain(p_rghEqn);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -39,8 +39,6 @@
- fvm::laplacian(rhorAUf, p)
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -28,8 +28,6 @@
+ fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve();
if (simple.finalNonOrthogonalIter())
......
......@@ -32,8 +32,6 @@ if (pimple.transonic())
+ fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -67,8 +65,6 @@ else
+ fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -35,8 +35,6 @@ if (pimple.transonic())
+ fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -71,8 +69,6 @@ else
+ fvOptions(psi, p, rho.name())
);
fvOptions.constrain(pEqn);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......
......@@ -129,8 +129,7 @@
pEqnComp1 =
(
fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1)
- (fvOptions(alpha1, rho1)&rho1)
contErr1
- fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
)/rho1
+ (alpha1/rho1)*correction
......@@ -143,10 +142,8 @@
pEqnComp2 =
(
fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2)
- (fvOptions(alpha2, rho2)&rho2)
contErr2
- fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
)/rho2
+ (alpha2/rho2)*correction
(
......@@ -160,16 +157,14 @@
{
pEqnComp1 =
(
fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1)
- (fvOptions(alpha1, rho1)&rho1)
contErr1
- fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
)/rho1
+ (alpha1*psi1/rho1)*correction(fvm::ddt(p));
pEqnComp2 =
(
fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2)
- (fvOptions(alpha2, rho2)&rho2)
contErr2
- fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
)/rho2
+ (alpha2*psi2/rho2)*correction(fvm::ddt(p));
......
......@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
(
"contErr2",
fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2)
- (fvOptions(alpha2, rho2)&rho2)
- (fvOptions(alpha2, rho2)&rho2)
);
......
Markdown is supported
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