Small fixes and modifications to backports
This commit is contained in:
parent
6b89e06489
commit
b7c23999fc
44 changed files with 65 additions and 149 deletions
|
@ -47,5 +47,5 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
|
@ -49,5 +49,5 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
|
@ -39,10 +39,7 @@
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
# include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
dimensionedScalar pMin
|
dimensionedScalar pMin(pimple.dict().lookup("pMin"));
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
|
|
|
@ -39,10 +39,7 @@
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
dimensionedScalar pMin
|
dimensionedScalar pMin(pimple.dict().lookup("pMin"));
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
|
|
|
@ -43,13 +43,10 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
dimensionedScalar pMin
|
dimensionedScalar pMin(simple.dict().lookup("pMin"));
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("SIMPLE").lookup("pMin")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
autoPtr<compressible::RASModel> turbulence
|
autoPtr<compressible::RASModel> turbulence
|
||||||
|
@ -72,12 +69,9 @@
|
||||||
if (pZones.size())
|
if (pZones.size())
|
||||||
{
|
{
|
||||||
// nUCorrectors for pressureImplicitPorosity
|
// nUCorrectors for pressureImplicitPorosity
|
||||||
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
if (simple.dict().found("nUCorrectors"))
|
||||||
{
|
{
|
||||||
nUCorr = readInt
|
nUCorr = readInt(simple.dict().lookup("nUCorrectors"));
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nUCorr > 0)
|
if (nUCorr > 0)
|
||||||
|
|
|
@ -42,18 +42,11 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
dimensionedScalar rhoMax
|
dimensionedScalar rhoMax(simple.dict().lookup("rhoMax"));
|
||||||
(
|
dimensionedScalar rhoMin(simple.dict().lookup("rhoMin"));
|
||||||
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhoMin
|
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
autoPtr<compressible::RASModel> turbulence
|
autoPtr<compressible::RASModel> turbulence
|
||||||
|
|
|
@ -61,11 +61,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.value() << nl << endl;
|
Info<< "Time = " << runTime.value() << nl << endl;
|
||||||
|
|
||||||
scalar HbyAblend =
|
scalar HbyAblend = readScalar(pimple.dict().lookup("HbyAblend"));
|
||||||
readScalar
|
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("PIMPLE").lookup("HbyAblend")
|
|
||||||
);
|
|
||||||
|
|
||||||
# include "readTimeControls.H"
|
# include "readTimeControls.H"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
scalar sumLocalContErr =
|
sumLocalContErr =
|
||||||
(sum(mag(rho - rho0 - psi*(p - p0)))/sum(rho)).value();
|
(sum(mag(rho - rho0 - psi*(p - p0)))/sum(rho)).value();
|
||||||
|
|
||||||
scalar globalContErr = (sum(rho - rho0 - psi*(p - p0))/sum(rho)).value();
|
globalContErr = (sum(rho - rho0 - psi*(p - p0))/sum(rho)).value();
|
||||||
|
|
||||||
cumulativeContErr += globalContErr;
|
cumulativeContErr += globalContErr;
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ Description
|
||||||
#include "singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "pisoControl.H"
|
#include "pisoControl.H"
|
||||||
|
#include "simpleControl.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
|
@ -64,13 +64,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell
|
setRefCell(p_rgh, piso.dict(), pRefCell, pRefValue);
|
||||||
(
|
|
||||||
p_rgh,
|
|
||||||
mesh.solutionDict().subDict("PISO"),
|
|
||||||
pRefCell,
|
|
||||||
pRefValue
|
|
||||||
);
|
|
||||||
mesh.schemesDict().setFluxRequired(p_rgh.name());
|
mesh.schemesDict().setFluxRequired(p_rgh.name());
|
||||||
|
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
autoPtr<incompressible::RASModel> turbulence
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
// initialize values for convergence checks
|
|
||||||
|
|
||||||
scalar eqnResidual = 1, maxResidual = 0;
|
|
||||||
scalar convergenceCriterion = 0;
|
|
||||||
|
|
||||||
simple.readIfPresent("convergence", convergenceCriterion);
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
const dictionary& simple = solidMesh.solutionDict().subDict("SIMPLE");
|
|
||||||
|
|
||||||
int nNonOrthCorr = 0;
|
|
||||||
if (simple.found("nNonOrthogonalCorrectors"))
|
|
||||||
{
|
|
||||||
nNonOrthCorr = readInt(simple.lookup("nNonOrthogonalCorrectors"));
|
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
// Solid side
|
// Solid side
|
||||||
# include "readSolidControls.H"
|
simpleControl simpleSolid(solidMesh);
|
||||||
|
|
||||||
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
while (simpleSolid.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
coupledFvScalarMatrix TEqns(2);
|
coupledFvScalarMatrix TEqns(2);
|
||||||
|
|
||||||
|
|
|
@ -64,13 +64,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell
|
setRefCell(p_rgh, simple.dict(), pRefCell, pRefValue);
|
||||||
(
|
|
||||||
p_rgh,
|
|
||||||
mesh.solutionDict().subDict("SIMPLE"),
|
|
||||||
pRefCell,
|
|
||||||
pRefValue
|
|
||||||
);
|
|
||||||
mesh.schemesDict().setFluxRequired(p_rgh.name());
|
mesh.schemesDict().setFluxRequired(p_rgh.name());
|
||||||
|
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
autoPtr<incompressible::RASModel> turbulence
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
const dictionary& simple = solidMesh.solutionDict().subDict("SIMPLE");
|
|
||||||
|
|
||||||
int nNonOrthCorr = 0;
|
|
||||||
if (simple.found("nNonOrthogonalCorrectors"))
|
|
||||||
{
|
|
||||||
nNonOrthCorr = readInt(simple.lookup("nNonOrthogonalCorrectors"));
|
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
// Solid side
|
// Solid side
|
||||||
# include "readSolidControls.H"
|
simpleControl simpleSolid(solidMesh);
|
||||||
|
|
||||||
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
while (simpleSolid.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
coupledFvScalarMatrix TEqns(2);
|
coupledFvScalarMatrix TEqns(2);
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
scalar totalVolume = sum(mesh.V()).value();
|
scalar totalVolume = sum(mesh.V()).value();
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
Info<< "Reading/calculating field rho\n" << endl;
|
Info<< "Reading/calculating field rho\n" << endl;
|
||||||
|
|
|
@ -54,13 +54,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
(
|
|
||||||
p,
|
|
||||||
mesh.solutionDict().subDict("PISO"),
|
|
||||||
pRefCell,
|
|
||||||
pRefValue
|
|
||||||
);
|
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,13 +57,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
(
|
|
||||||
p,
|
|
||||||
mesh.solutionDict().subDict("SIMPLE"),
|
|
||||||
pRefCell,
|
|
||||||
pRefValue
|
|
||||||
);
|
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
// Kinematic density for buoyancy force
|
// Kinematic density for buoyancy force
|
||||||
|
|
|
@ -57,13 +57,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
(
|
|
||||||
p,
|
|
||||||
mesh.solutionDict().subDict("SIMPLE"),
|
|
||||||
pRefCell,
|
|
||||||
pRefValue
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||||
|
|
|
@ -52,5 +52,5 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
|
@ -52,5 +52,5 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
|
@ -103,22 +103,13 @@
|
||||||
|
|
||||||
label pdRefCell = 0;
|
label pdRefCell = 0;
|
||||||
scalar pdRefValue = 0.0;
|
scalar pdRefValue = 0.0;
|
||||||
setRefCell
|
setRefCell(pd, pimple.dict(), pdRefCell, pdRefValue);
|
||||||
(
|
|
||||||
pd,
|
|
||||||
mesh.solutionDict().subDict("PIMPLE"),
|
|
||||||
pdRefCell,
|
|
||||||
pdRefValue
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
|
|
||||||
if (pd.needReference())
|
if (pd.needReference())
|
||||||
{
|
{
|
||||||
pRefValue = readScalar
|
pRefValue = readScalar(pimple.dict().lookup("pRefValue"));
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("PIMPLE").lookup("pRefValue")
|
|
||||||
);
|
|
||||||
|
|
||||||
p += dimensionedScalar
|
p += dimensionedScalar
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
scalar limitMagU =
|
scalar limitMagU = readScalar(pimple.dict().lookup("limitMagU"));
|
||||||
readScalar(mesh.solutionDict().subDict("PIMPLE").lookup("limitMagU"));
|
|
||||||
|
|
||||||
volScalarField magU(mag(U));
|
volScalarField magU(mag(U));
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
|
@ -46,5 +46,5 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
mesh.schemesDict().setFluxRequired(pcorr.name());
|
mesh.schemesDict().setFluxRequired(pcorr.name());
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (piso.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pcorrEqn
|
fvScalarMatrix pcorrEqn
|
||||||
(
|
(
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
pcorrEqn.setReference(pRefCell, pRefValue);
|
pcorrEqn.setReference(pRefCell, pRefValue);
|
||||||
pcorrEqn.solve();
|
pcorrEqn.solve();
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
if (piso.finalNonOrthogonalIter())
|
||||||
{
|
{
|
||||||
phi -= pcorrEqn.flux();
|
phi -= pcorrEqn.flux();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
bool correctPhi
|
bool correctPhi
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault("correctPhi", false)
|
piso.dict().lookupOrDefault("correctPhi", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool checkMeshCourantNo
|
bool checkMeshCourantNo
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
piso.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||||
);
|
);
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
bool momentumPredictor = pimple.momentumPredictor();
|
bool momentumPredictor = piso.momentumPredictor();
|
||||||
|
|
||||||
{
|
{
|
||||||
bool momentumPredictorSave = momentumPredictor;
|
bool momentumPredictorSave = momentumPredictor;
|
||||||
|
|
|
@ -36,7 +36,7 @@ Author
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
#include "pimpleControl.H"
|
#include "pisoControl.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ int main(int argc, char *argv[])
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createDynamicFvMesh.H"
|
# include "createDynamicFvMesh.H"
|
||||||
|
|
||||||
pimpleControl pimple(mesh);
|
pisoControl piso(mesh);
|
||||||
|
|
||||||
# include "initContinuityErrs.H"
|
# include "initContinuityErrs.H"
|
||||||
# include "initTotalVolume.H"
|
# include "initTotalVolume.H"
|
||||||
|
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
// --- SIMPLE loop
|
// --- SIMPLE loop
|
||||||
|
|
||||||
while (pimple.correct())
|
while (piso.correct())
|
||||||
{
|
{
|
||||||
# include "CourantNo.H"
|
# include "CourantNo.H"
|
||||||
|
|
||||||
|
@ -108,8 +108,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
adjustPhi(phi, U, p);
|
adjustPhi(phi, U, p);
|
||||||
|
|
||||||
|
p.storePrevIter();
|
||||||
|
|
||||||
// Non-orthogonal pressure corrector loop
|
// Non-orthogonal pressure corrector loop
|
||||||
while (pimple.correctNonOrthogonal())
|
while (piso.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
@ -119,10 +121,10 @@ int main(int argc, char *argv[])
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
pEqn.solve
|
pEqn.solve
|
||||||
(
|
(
|
||||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
mesh.solutionDict().solver(p.select(piso.finalInnerIter()))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
if (piso.finalNonOrthogonalIter())
|
||||||
{
|
{
|
||||||
phi -= pEqn.flux();
|
phi -= pEqn.flux();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
correctPhi = piso.dict().lookupOrDefault("correctPhi", false);
|
||||||
|
|
||||||
checkMeshCourantNo = pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
checkMeshCourantNo = piso.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||||
|
|
|
@ -52,5 +52,5 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
|
@ -36,5 +36,5 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
|
@ -31,7 +31,7 @@ volVectorField U
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
@ -49,12 +49,9 @@
|
||||||
if (pZones.size())
|
if (pZones.size())
|
||||||
{
|
{
|
||||||
// nUCorrectors for pressureImplicitPorosity
|
// nUCorrectors for pressureImplicitPorosity
|
||||||
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
if (simple.dict().found("nUCorrectors"))
|
||||||
{
|
{
|
||||||
nUCorr = readInt
|
nUCorr = readInt(simple.dict().lookup("nUCorrectors"));
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nUCorr > 0)
|
if (nUCorr > 0)
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(Urel, phi);
|
singlePhaseTransportModel laminarTransport(Urel, phi);
|
||||||
|
|
Reference in a new issue