mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated sources for incompressible solvers
This commit is contained in:
@ -12,3 +12,5 @@
|
|||||||
sources.constrain(UrelEqn());
|
sources.constrain(UrelEqn());
|
||||||
|
|
||||||
solve(UrelEqn() == -fvc::grad(p) + sources(Urel));
|
solve(UrelEqn() == -fvc::grad(p) + sources(Urel));
|
||||||
|
|
||||||
|
sources.correct(Urel);
|
||||||
|
|||||||
@ -16,4 +16,6 @@ rAU = 1.0/UEqn().A();
|
|||||||
if (pimple.momentumPredictor())
|
if (pimple.momentumPredictor())
|
||||||
{
|
{
|
||||||
solve(UEqn() == -fvc::grad(p) + sources(U));
|
solve(UEqn() == -fvc::grad(p) + sources(U));
|
||||||
|
|
||||||
|
sources.correct(U);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,4 +13,6 @@ sources.constrain(UEqn());
|
|||||||
if (pimple.momentumPredictor())
|
if (pimple.momentumPredictor())
|
||||||
{
|
{
|
||||||
solve(UEqn() == -fvc::grad(p_gh) + sources(U));
|
solve(UEqn() == -fvc::grad(p_gh) + sources(U));
|
||||||
|
|
||||||
|
sources.correct(U);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,3 +14,5 @@
|
|||||||
sources.constrain(UrelEqn());
|
sources.constrain(UrelEqn());
|
||||||
|
|
||||||
solve(UrelEqn() == -fvc::grad(p));
|
solve(UrelEqn() == -fvc::grad(p));
|
||||||
|
|
||||||
|
sources.correct(Urel);
|
||||||
|
|||||||
@ -13,3 +13,5 @@
|
|||||||
sources.constrain(UEqn());
|
sources.constrain(UEqn());
|
||||||
|
|
||||||
solve(UEqn() == -fvc::grad(p));
|
solve(UEqn() == -fvc::grad(p));
|
||||||
|
|
||||||
|
sources.correct(U);
|
||||||
|
|||||||
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
UEqn().relax();
|
UEqn().relax();
|
||||||
|
|
||||||
sources.constrain(UEqn());
|
|
||||||
|
|
||||||
// Include the porous media resistance and solve the momentum equation
|
// Include the porous media resistance and solve the momentum equation
|
||||||
// either implicit in the tensorial resistance or transport using by
|
// either implicit in the tensorial resistance or transport using by
|
||||||
// including the spherical part of the resistance in the momentum diagonal
|
// including the spherical part of the resistance in the momentum diagonal
|
||||||
@ -28,6 +26,8 @@
|
|||||||
trTU = inv(tTU());
|
trTU = inv(tTU());
|
||||||
trTU().rename("rAU");
|
trTU().rename("rAU");
|
||||||
|
|
||||||
|
sources.constrain(UEqn());
|
||||||
|
|
||||||
volVectorField gradp(fvc::grad(p));
|
volVectorField gradp(fvc::grad(p));
|
||||||
|
|
||||||
for (int UCorr=0; UCorr<nUCorr; UCorr++)
|
for (int UCorr=0; UCorr<nUCorr; UCorr++)
|
||||||
@ -35,13 +35,19 @@
|
|||||||
U = trTU() & (UEqn().H() - gradp);
|
U = trTU() & (UEqn().H() - gradp);
|
||||||
}
|
}
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
sources.correct(U);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pZones.addResistance(UEqn());
|
pZones.addResistance(UEqn());
|
||||||
|
|
||||||
|
sources.constrain(UEqn());
|
||||||
|
|
||||||
solve(UEqn() == -fvc::grad(p));
|
solve(UEqn() == -fvc::grad(p));
|
||||||
|
|
||||||
|
sources.correct(U);
|
||||||
|
|
||||||
trAU = 1.0/UEqn().A();
|
trAU = 1.0/UEqn().A();
|
||||||
trAU().rename("rAU");
|
trAU().rename("rAU");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user