Commit b785ae59 authored by andy's avatar andy
Browse files

ENH: Updated sources for incompressible solvers

parent 08767723
......@@ -12,3 +12,5 @@
sources.constrain(UrelEqn());
solve(UrelEqn() == -fvc::grad(p) + sources(Urel));
sources.correct(Urel);
......@@ -16,4 +16,6 @@ rAU = 1.0/UEqn().A();
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p) + sources(U));
sources.correct(U);
}
......@@ -13,4 +13,6 @@ sources.constrain(UEqn());
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p_gh) + sources(U));
sources.correct(U);
}
......@@ -14,3 +14,5 @@
sources.constrain(UrelEqn());
solve(UrelEqn() == -fvc::grad(p));
sources.correct(Urel);
......@@ -13,3 +13,5 @@
sources.constrain(UEqn());
solve(UEqn() == -fvc::grad(p));
sources.correct(U);
......@@ -12,8 +12,6 @@
UEqn().relax();
sources.constrain(UEqn());
// Include the porous media resistance and solve the momentum equation
// either implicit in the tensorial resistance or transport using by
// including the spherical part of the resistance in the momentum diagonal
......@@ -28,6 +26,8 @@
trTU = inv(tTU());
trTU().rename("rAU");
sources.constrain(UEqn());
volVectorField gradp(fvc::grad(p));
for (int UCorr=0; UCorr<nUCorr; UCorr++)
......@@ -35,13 +35,19 @@
U = trTU() & (UEqn().H() - gradp);
}
U.correctBoundaryConditions();
sources.correct(U);
}
else
{
pZones.addResistance(UEqn());
sources.constrain(UEqn());
solve(UEqn() == -fvc::grad(p));
sources.correct(U);
trAU = 1.0/UEqn().A();
trAU().rename("rAU");
}
Supports Markdown
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