pd => p
This commit is contained in:
parent
f20792493d
commit
c593fa63e5
@ -24,10 +24,10 @@
|
||||
==
|
||||
fvc::reconstruct
|
||||
(
|
||||
(
|
||||
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
+ (
|
||||
mixture.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
- fvc::snGrad(pd)
|
||||
- fvc::snGrad(p)
|
||||
) * mesh.magSf()
|
||||
)
|
||||
);
|
||||
|
@ -1,9 +1,9 @@
|
||||
Info<< "Reading field pd\n" << endl;
|
||||
volScalarField pd
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pd",
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
@ -45,45 +45,9 @@
|
||||
rho.oldTime();
|
||||
|
||||
|
||||
Info<< "Calculating field g.h\n" << endl;
|
||||
volScalarField gh("gh", g & mesh.C());
|
||||
surfaceScalarField ghf("ghf", g & mesh.Cf());
|
||||
|
||||
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
pd + rho*gh
|
||||
);
|
||||
|
||||
|
||||
label pdRefCell = 0;
|
||||
scalar pdRefValue = 0.0;
|
||||
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
|
||||
if (pd.needReference())
|
||||
{
|
||||
pRefValue = readScalar
|
||||
(
|
||||
mesh.solutionDict().subDict("PISO").lookup("pRefValue")
|
||||
);
|
||||
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pdRefCell)
|
||||
);
|
||||
}
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
// Construct incompressible turbulence model
|
||||
|
@ -81,18 +81,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
p = pd + rho*gh;
|
||||
|
||||
if (pd.needReference())
|
||||
{
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pdRefCell)
|
||||
);
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
@ -13,32 +13,32 @@
|
||||
phi = phiU +
|
||||
(
|
||||
mixture.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf*mesh.magSf();
|
||||
|
||||
adjustPhi(phi, U, pd);
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pdEqn
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rUAf, pd) == fvc::div(phi)
|
||||
fvm::laplacian(rUAf, p) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pdEqn.setReference(pdRefCell, pdRefValue);
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
if (corr == nCorr-1)
|
||||
{
|
||||
pdEqn.solve(mesh.solver(pd.name() + "Final"));
|
||||
pEqn.solve(mesh.solver(p.name() + "Final"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pdEqn.solve(mesh.solver(pd.name()));
|
||||
pEqn.solve(mesh.solver(p.name()));
|
||||
}
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi -= pdEqn.flux();
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user