mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Made ddtPhiCorr optional in moving-mesh solvers.
Controlled via the "ddtPhiCorr" switch in the PISO sub-dict, defaults to false.
This commit is contained in:
@ -75,6 +75,9 @@ int main(int argc, char *argv[])
|
|||||||
# include "correctPhi.H"
|
# include "correctPhi.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Keep the absolute fluxes for use in ddtPhiCorr
|
||||||
|
surfaceScalarField phiAbs("phiAbs", phi);
|
||||||
|
|
||||||
// Make the fluxes relative to the mesh motion
|
// Make the fluxes relative to the mesh motion
|
||||||
fvc::makeRelative(phi, U);
|
fvc::makeRelative(phi, U);
|
||||||
|
|
||||||
@ -95,7 +98,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
U = rAU*UEqn.H();
|
U = rAU*UEqn.H();
|
||||||
phi = (fvc::interpolate(U) & mesh.Sf());
|
phi = (fvc::interpolate(U) & mesh.Sf());
|
||||||
//+ fvc::ddtPhiCorr(rAU, U, phi);
|
|
||||||
|
if (ddtPhiCorr)
|
||||||
|
{
|
||||||
|
phi += fvc::ddtPhiCorr(rAU, U, phiAbs);
|
||||||
|
}
|
||||||
|
|
||||||
adjustPhi(phi, U, p);
|
adjustPhi(phi, U, p);
|
||||||
|
|
||||||
@ -116,7 +123,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
pEqn.solve(mesh.solver(p.name()));
|
pEqn.solve(mesh.solver(p.name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
phi -= pEqn.flux();
|
phi -= pEqn.flux();
|
||||||
|
|||||||
@ -5,12 +5,12 @@
|
|||||||
volVectorField HU = UEqn.H();
|
volVectorField HU = UEqn.H();
|
||||||
U = rAU*HU;
|
U = rAU*HU;
|
||||||
|
|
||||||
surfaceScalarField phiU
|
surfaceScalarField phiU("phiU", (fvc::interpolate(U) & mesh.Sf()));
|
||||||
(
|
|
||||||
"phiU",
|
if (ddtPhiCorr)
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
{
|
||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phiAbs)
|
phiU += fvc::ddtPhiCorr(rAU, rho, U, phiAbs);
|
||||||
);
|
}
|
||||||
|
|
||||||
phi = phiU +
|
phi = phiU +
|
||||||
(
|
(
|
||||||
|
|||||||
@ -25,3 +25,9 @@
|
|||||||
{
|
{
|
||||||
nOuterCorr = readInt(piso.lookup("nOuterCorrectors"));
|
nOuterCorr = readInt(piso.lookup("nOuterCorrectors"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ddtPhiCorr = false;
|
||||||
|
if (piso.found("ddtPhiCorr"))
|
||||||
|
{
|
||||||
|
ddtPhiCorr = Switch(piso.lookup("ddtPhiCorr"));
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user