Small fixes and modifications to backports

This commit is contained in:
Vanja Skuric 2016-05-28 23:56:11 +02:00
parent 6b89e06489
commit b7c23999fc
44 changed files with 65 additions and 149 deletions

View file

@ -47,5 +47,5 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -49,5 +49,5 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -39,10 +39,7 @@
# include "compressibleCreatePhi.H"
dimensionedScalar pMin
(
mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
);
dimensionedScalar pMin(pimple.dict().lookup("pMin"));
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View file

@ -39,10 +39,7 @@
#include "compressibleCreatePhi.H"
dimensionedScalar pMin
(
mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
);
dimensionedScalar pMin(pimple.dict().lookup("pMin"));
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View file

@ -43,13 +43,10 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
dimensionedScalar pMin
(
mesh.solutionDict().subDict("SIMPLE").lookup("pMin")
);
dimensionedScalar pMin(simple.dict().lookup("pMin"));
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
@ -72,12 +69,9 @@
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
if (simple.dict().found("nUCorrectors"))
{
nUCorr = readInt
(
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
);
nUCorr = readInt(simple.dict().lookup("nUCorrectors"));
}
if (nUCorr > 0)

View file

@ -42,18 +42,11 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
dimensionedScalar rhoMax
(
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax")
);
dimensionedScalar rhoMin
(
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin")
);
dimensionedScalar rhoMax(simple.dict().lookup("rhoMax"));
dimensionedScalar rhoMin(simple.dict().lookup("rhoMin"));
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence

View file

@ -61,11 +61,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.value() << nl << endl;
scalar HbyAblend =
readScalar
(
mesh.solutionDict().subDict("PIMPLE").lookup("HbyAblend")
);
scalar HbyAblend = readScalar(pimple.dict().lookup("HbyAblend"));
# include "readTimeControls.H"

View file

@ -1,8 +1,8 @@
{
scalar sumLocalContErr =
sumLocalContErr =
(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;

View file

@ -39,6 +39,7 @@ Description
#include "singlePhaseTransportModel.H"
#include "RASModel.H"
#include "pisoControl.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -64,13 +64,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p_rgh,
mesh.solutionDict().subDict("PISO"),
pRefCell,
pRefValue
);
setRefCell(p_rgh, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p_rgh.name());
autoPtr<incompressible::RASModel> turbulence

View file

@ -1,7 +0,0 @@
// initialize values for convergence checks
scalar eqnResidual = 1, maxResidual = 0;
scalar convergenceCriterion = 0;
simple.readIfPresent("convergence", convergenceCriterion);

View file

@ -1,7 +0,0 @@
const dictionary& simple = solidMesh.solutionDict().subDict("SIMPLE");
int nNonOrthCorr = 0;
if (simple.found("nNonOrthogonalCorrectors"))
{
nNonOrthCorr = readInt(simple.lookup("nNonOrthogonalCorrectors"));
}

View file

@ -1,8 +1,8 @@
{
// Solid side
# include "readSolidControls.H"
simpleControl simpleSolid(solidMesh);
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
while (simpleSolid.correctNonOrthogonal())
{
coupledFvScalarMatrix TEqns(2);

View file

@ -64,13 +64,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p_rgh,
mesh.solutionDict().subDict("SIMPLE"),
pRefCell,
pRefValue
);
setRefCell(p_rgh, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p_rgh.name());
autoPtr<incompressible::RASModel> turbulence

View file

@ -1,7 +0,0 @@
const dictionary& simple = solidMesh.solutionDict().subDict("SIMPLE");
int nNonOrthCorr = 0;
if (simple.found("nNonOrthogonalCorrectors"))
{
nNonOrthCorr = readInt(simple.lookup("nNonOrthogonalCorrectors"));
}

View file

@ -1,8 +1,8 @@
{
// Solid side
# include "readSolidControls.H"
simpleControl simpleSolid(solidMesh);
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
while (simpleSolid.correctNonOrthogonal())
{
coupledFvScalarMatrix TEqns(2);

View file

@ -52,7 +52,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
scalar totalVolume = sum(mesh.V()).value();

View file

@ -48,7 +48,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
Info<< "Reading/calculating field rho\n" << endl;

View file

@ -54,13 +54,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
mesh.solutionDict().subDict("PISO"),
pRefCell,
pRefValue
);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -57,13 +57,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
mesh.solutionDict().subDict("SIMPLE"),
pRefCell,
pRefValue
);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
// Kinematic density for buoyancy force

View file

@ -57,13 +57,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
mesh.solutionDict().subDict("SIMPLE"),
pRefCell,
pRefValue
);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
dimensionedScalar initialMass = fvc::domainIntegrate(rho);

View file

@ -52,5 +52,5 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -52,5 +52,5 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -103,22 +103,13 @@
label pdRefCell = 0;
scalar pdRefValue = 0.0;
setRefCell
(
pd,
mesh.solutionDict().subDict("PIMPLE"),
pdRefCell,
pdRefValue
);
setRefCell(pd, pimple.dict(), pdRefCell, pdRefValue);
scalar pRefValue = 0.0;
if (pd.needReference())
{
pRefValue = readScalar
(
mesh.solutionDict().subDict("PIMPLE").lookup("pRefValue")
);
pRefValue = readScalar(pimple.dict().lookup("pRefValue"));
p += dimensionedScalar
(

View file

@ -1,6 +1,5 @@
{
scalar limitMagU =
readScalar(mesh.solutionDict().subDict("PIMPLE").lookup("limitMagU"));
scalar limitMagU = readScalar(pimple.dict().lookup("limitMagU"));
volScalarField magU(mag(U));

View file

@ -31,7 +31,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View file

@ -46,5 +46,5 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -31,7 +31,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View file

@ -31,7 +31,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View file

@ -32,7 +32,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View file

@ -52,7 +52,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -26,7 +26,7 @@
mesh.schemesDict().setFluxRequired(pcorr.name());
while (pimple.correctNonOrthogonal())
while (piso.correctNonOrthogonal())
{
fvScalarMatrix pcorrEqn
(
@ -36,7 +36,7 @@
pcorrEqn.setReference(pRefCell, pRefValue);
pcorrEqn.solve();
if (pimple.finalNonOrthogonalIter())
if (piso.finalNonOrthogonalIter())
{
phi -= pcorrEqn.flux();
}

View file

@ -2,10 +2,10 @@
bool correctPhi
(
pimple.dict().lookupOrDefault("correctPhi", false)
piso.dict().lookupOrDefault("correctPhi", false)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
piso.dict().lookupOrDefault("checkMeshCourantNo", false)
);

View file

@ -52,7 +52,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
@ -72,7 +72,7 @@
zeroGradientFvPatchScalarField::typeName
);
bool momentumPredictor = pimple.momentumPredictor();
bool momentumPredictor = piso.momentumPredictor();
{
bool momentumPredictorSave = momentumPredictor;

View file

@ -36,7 +36,7 @@ Author
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "pimpleControl.H"
#include "pisoControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -46,7 +46,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
# include "createDynamicFvMesh.H"
pimpleControl pimple(mesh);
pisoControl piso(mesh);
# include "initContinuityErrs.H"
# include "initTotalVolume.H"
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
// --- SIMPLE loop
while (pimple.correct())
while (piso.correct())
{
# include "CourantNo.H"
@ -108,8 +108,10 @@ int main(int argc, char *argv[])
adjustPhi(phi, U, p);
p.storePrevIter();
// Non-orthogonal pressure corrector loop
while (pimple.correctNonOrthogonal())
while (piso.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
@ -119,10 +121,10 @@ int main(int argc, char *argv[])
pEqn.setReference(pRefCell, pRefValue);
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();
}

View file

@ -1,5 +1,5 @@
#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);

View file

@ -52,5 +52,5 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -36,5 +36,5 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -32,7 +32,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View file

@ -31,7 +31,7 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View file

@ -31,7 +31,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -31,7 +31,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);
@ -49,12 +49,9 @@
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
if (simple.dict().found("nUCorrectors"))
{
nUCorr = readInt
(
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
);
nUCorr = readInt(simple.dict().lookup("nUCorrectors"));
}
if (nUCorr > 0)

View file

@ -31,7 +31,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View file

@ -42,7 +42,7 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(Urel, phi);