Commit 9c8e2fa7 authored by andy's avatar andy
Browse files

ENH: Updated use of field sources in simple/pimple solvers

parent f2e65c6a
......@@ -9,4 +9,6 @@
UrelEqn().relax();
solve(UrelEqn() == -fvc::grad(p));
sources.constrain(UrelEqn());
solve(UrelEqn() == -fvc::grad(p) + sources(Urel));
volScalarField rAUrel(1.0/UrelEqn().A());
Urel = rAUrel*UrelEqn().H();
Urel = rAUrel*(UrelEqn() == sources(Urel))().H();
if (pimple.nCorrPISO() <= 1)
{
......@@ -37,3 +37,4 @@ p.relax();
// Momentum corrector
Urel -= rAUrel*fvc::grad(p);
Urel.correctBoundaryConditions();
sources.correct(Urel);
......@@ -5,8 +5,6 @@ tmp<fvVectorMatrix> UEqn
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
==
sources(U)
);
UEqn().relax();
......@@ -17,5 +15,5 @@ volScalarField rAU(1.0/UEqn().A());
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p));
solve(UEqn() == -fvc::grad(p) + sources(U));
}
U = rAU*UEqn().H();
U = rAU*(UEqn() == sources(U))().H();
if (pimple.nCorrPISO() <= 1)
{
......@@ -36,3 +36,4 @@ p.relax();
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
sources.correct(U);
......@@ -9,9 +9,11 @@ tmp<fvVectorMatrix> UEqn
UEqn().relax();
sources.constrain(UEqn());
rAU = 1.0/UEqn().A();
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p));
solve(UEqn() == -fvc::grad(p) + sources(U));
}
U = rAU*UEqn().H();
U = rAU*(UEqn() == sources(U))().H();
if (pimple.nCorrPISO() <= 1)
{
......@@ -46,3 +46,4 @@ fvc::makeRelative(phi, U);
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
sources.correct(U);
......@@ -3,8 +3,6 @@ tmp<fvVectorMatrix> UEqn
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
==
sources(U)
);
......@@ -14,5 +12,5 @@ sources.constrain(UEqn());
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p_gh));
solve(UEqn() == -fvc::grad(p_gh) + sources(U));
}
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rAUf(rAU.name() + 'f', fvc::interpolate(rAU));
U = rAU*UEqn().H();
U = rAU*(UEqn() == sources(U))().H();
if (pimple.nCorrPISO() <= 1)
{
......@@ -41,3 +41,4 @@ p = p_gh + (g & (mesh.C() + zeta - refLevel));
U -= rAU*fvc::grad(p_gh);
U.correctBoundaryConditions();
sources.correct(U);
......@@ -34,4 +34,5 @@
// Momentum corrector
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
sources.correct(U);
}
......@@ -34,4 +34,5 @@
// Momentum corrector
Urel -= rAUrel*fvc::grad(p);
Urel.correctBoundaryConditions();
sources.correct(Urel);
}
......@@ -34,4 +34,5 @@
// Momentum corrector
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
sources.correct(U);
}
......@@ -7,7 +7,6 @@
==
rho.dimensionedInternalField()*g
+ parcels.SU(U)
+ sources(rho, U)
);
sources.constrain(UEqn);
......@@ -16,5 +15,5 @@
if (pimple.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
solve(UEqn == -fvc::grad(p) + sources(rho, U));
}
......@@ -6,7 +6,7 @@
thermo.rho() -= psi*p;
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
U = rAU*(UEqn == sources(rho, U))().H();
if (pZones.size() > 0)
{
......@@ -60,6 +60,7 @@
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
sources.correct(U);
rho = thermo.rho();
rho = max(rho, rhoMin);
......
......@@ -7,7 +7,6 @@
rho.dimensionedInternalField()*g
+ coalParcels.SU(U)
+ limestoneParcels.SU(U)
+ sources(rho, U)
);
UEqn.relax();
......@@ -16,6 +15,6 @@
if (pimple.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
solve(UEqn == -fvc::grad(p) + sources(rho, U));
K = 0.5*magSqr(U);
}
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
U = rAU*(UEqn == sources(rho, U))().H();
if (pimple.transonic())
{
......@@ -74,6 +74,8 @@ else
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
sources.correct(U);
K = 0.5*magSqr(U);
dpdt = fvc::ddt(p);
......@@ -7,7 +7,6 @@
==
rho.dimensionedInternalField()*g
+ parcels.SU(U)
+ sources(rho, U)
);
UEqn.relax();
......@@ -18,7 +17,7 @@
if (pimple.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
solve(UEqn == -fvc::grad(p) + sources(rho, U));
K = 0.5*magSqr(U);
}
......@@ -6,7 +6,7 @@
thermo.rho() -= psi*p;
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
U = rAU*(UEqn == sources(rho, U))().H();
if (pZones.size() > 0)
{
......@@ -59,6 +59,8 @@
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
sources.correct(U);
K = 0.5*magSqr(U);
dpdt = fvc::ddt(p);
......
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