Removed storePrevIter (not needed with simple/pimple/piso.loop()); changed runTime.loop() to simple.loop() in SIMPLE solvers

This commit is contained in:
Vanja Skuric 2016-05-26 23:06:01 +02:00
parent 23765c920f
commit c4c31e738e
17 changed files with 17 additions and 48 deletions

View file

@ -50,7 +50,7 @@ int main(int argc, char *argv[])
Info<< "\nCalculating temperature distribution\n" << endl;
while (runTime.loop())
while (simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;

View file

@ -80,8 +80,6 @@ int main(int argc, char *argv[])
while (piso.correctNonOrthogonal())
{
p.storePrevIter();
fvScalarMatrix pEqn
(
fvm::laplacian

View file

@ -52,7 +52,7 @@ int main(int argc, char *argv[])
# include "CourantNo.H"
while (runTime.loop())
while (simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;

View file

@ -1,9 +1,4 @@
{
if (!pimple.firstIter())
{
pd.storePrevIter();
}
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rUAf = fvc::interpolate(rUA);

View file

@ -64,8 +64,6 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
# include "UEqn.H"

View file

@ -63,8 +63,6 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
# include "UEqn.H"

View file

@ -55,12 +55,10 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
for (runTime++; !runTime.end(); runTime++)
while (simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
// Momentum predictor

View file

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

View file

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

View file

@ -72,7 +72,7 @@
zeroGradientFvPatchScalarField::typeName
);
bool momentumPredictor = piso.momentumPredictor();
bool momentumPredictor = pimple.momentumPredictor();
{
bool momentumPredictorSave = momentumPredictor;

View file

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

View file

@ -1,5 +1,5 @@
#include "readTimeControls.H"
correctPhi = piso.dict().lookupOrDefault("correctPhi", false);
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
checkMeshCourantNo = piso.dict().lookupOrDefault("checkMeshCourantNo", false);
checkMeshCourantNo = pimple.dict().lookupOrDefault("checkMeshCourantNo", false);

View file

@ -98,11 +98,6 @@ int main(int argc, char *argv[])
// --- PIMPLE loop
while (pimple.loop())
{
if (!pimple.firstIter())
{
p.storePrevIter();
}
# include "UEqn.H"
// --- PISO loop

View file

@ -66,11 +66,6 @@ int main(int argc, char *argv[])
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
if (!pimple.firstIter())
{
p.storePrevIter();
}
# include "UEqn.H"
// --- PISO loop

View file

@ -57,8 +57,6 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
#include "UEqn.H"

View file

@ -55,8 +55,6 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
# include "UEqn.H"

View file

@ -57,12 +57,10 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
for (runTime++; !runTime.end(); runTime++)
while(simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
// Momentum predictor