Backported surfaceTracking solvers and tutorials (vanilla OF 3.0.1)

This commit is contained in:
Vanja Skuric 2016-05-28 12:12:37 +02:00
parent 7888cf1617
commit f3b7d067b7
15 changed files with 24 additions and 46 deletions

View file

@ -37,7 +37,7 @@ Description
#include "inletOutletFvPatchFields.H"
#include "fixedGradientFvPatchFields.H"
#include "boundBox.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -46,6 +46,9 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
# include "createDynamicFvMesh.H"
pimpleControl pimple(mesh);
# include "createFields.H"
# include "initContinuityErrs.H"
# include "createBubble.H"
@ -59,8 +62,6 @@ int main(int argc, char *argv[])
{
Info << "Time = " << runTime.value() << endl << endl;
# include "readPISOControls.H"
interface.moveMeshPointsForOldFreeSurfDisplacement();
interface.updateDisplacementDirections();
@ -70,7 +71,7 @@ int main(int argc, char *argv[])
Info<< "\nMax surface Courant Number = "
<< interface.maxCourantNumber() << endl << endl;
for (int corr=0; corr<nOuterCorr; corr++)
while (pimple.loop())
{
// Update interface bc
interface.updateBoundaryConditions();
@ -91,7 +92,7 @@ int main(int argc, char *argv[])
solve(UEqn == -fvc::grad(p));
// --- PISO loop
for (int i=0; i<nCorr; i++)
while (pimple.correct())
{
volScalarField AU = UEqn.A();
@ -104,7 +105,7 @@ int main(int argc, char *argv[])
# include "scaleSpacePhi.H"
// Non-orthogonal pressure corrector loop
for (label nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
@ -116,7 +117,7 @@ int main(int argc, char *argv[])
pEqn.solve();
if (nonOrth == nNonOrthCorr)
if (pimple.finalNonOrthogonalIter())
{
phi -= pEqn.flux();
}

View file

@ -122,3 +122,4 @@ if (interface.twoFluids())
# include "setRefCell.H"
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -28,7 +28,7 @@ pNeedRef = returnReduce<bool>(pNeedRef, andOp<bool>());
// Find reference cell
if (pNeedRef)
{
point refPointi(mesh.solutionDict().subDict("PISO").lookup("pRefPoint"));
point refPointi(mesh.solutionDict().subDict("PIMPLE").lookup("pRefPoint"));
label refCelli = mesh.findCell(refPointi);
label hasRef = (refCelli >= 0 ? 1 : 0);
label sumHasRef = returnReduce<label>(hasRef, sumOp<label>());
@ -50,6 +50,6 @@ if (pNeedRef)
}
pRefValue =
readScalar(mesh.solutionDict().subDict("PISO").lookup("pRefValue"));
readScalar(mesh.solutionDict().subDict("PIMPLE").lookup("pRefValue"));
}

View file

@ -121,3 +121,4 @@ if (interface.twoFluids())
# include "setRefCell.H"
mesh.schemesDict().setFluxRequired(p.name());

View file

@ -34,7 +34,7 @@ Description
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "freeSurface.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -46,6 +46,8 @@ int main(int argc, char *argv[])
# include "createDynamicFvMesh.H"
pimpleControl pimple(mesh);
# include "createFields.H"
# include "initContinuityErrs.H"
@ -58,8 +60,6 @@ int main(int argc, char *argv[])
{
Info << "Time = " << runTime.value() << endl << endl;
# include "readPISOControls.H"
interface.moveMeshPointsForOldFreeSurfDisplacement();
interface.updateDisplacementDirections();
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
Info<< "\nMax surface Courant Number = "
<< interface.maxCourantNumber() << endl << endl;
for (int corr=0; corr<nOuterCorr; corr++)
while (pimple.loop())
{
// Update interface bc
interface.updateBoundaryConditions();
@ -89,7 +89,7 @@ int main(int argc, char *argv[])
solve(UEqn == -fvc::grad(p));
// --- PISO loop
for (int i=0; i<nCorr; i++)
while (pimple.correct())
{
volScalarField AU = UEqn.A();
@ -100,7 +100,7 @@ int main(int argc, char *argv[])
# include "scalePhi.H"
// Non-orthogonal pressure corrector loop
for (label nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
@ -112,7 +112,7 @@ int main(int argc, char *argv[])
pEqn.solve();
if (nonOrth == nNonOrthCorr)
if (pimple.finalNonOrthogonalIter())
{
phi -= pEqn.flux();
}

View file

@ -50,9 +50,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
p;
}
// ************************************************************************* //

View file

@ -34,7 +34,7 @@ solvers
}
}
PISO
PIMPLE
{
nOuterCorrectors 6;
nCorrectors 2;

View file

@ -49,9 +49,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
p;
}
// ************************************************************************* //

View file

@ -34,7 +34,7 @@ solvers
}
}
PISO
PIMPLE
{
nOuterCorrectors 5;
nCorrectors 2;

View file

@ -51,9 +51,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
p 0;
}
// ************************************************************************* //

View file

@ -34,7 +34,7 @@ solvers
}
}
PISO
PIMPLE
{
nOuterCorrectors 10;
nCorrectors 2;

View file

@ -49,9 +49,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
p;
}
// ************************************************************************* //

View file

@ -34,7 +34,7 @@ solvers
}
}
PISO
PIMPLE
{
nOuterCorrectors 10;
nCorrectors 2;

View file

@ -48,9 +48,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
p;
}
// ************************************************************************* //

View file

@ -34,7 +34,7 @@ solvers
}
}
PISO
PIMPLE
{
nOuterCorrectors 10;
nCorrectors 2;