applications/solvers: Added -postProcess option

See also commit cc455173ff
This commit is contained in:
Henry Weller
2016-05-09 14:08:15 +01:00
parent 6c275f2aa6
commit 7dca6b6a21
40 changed files with 104 additions and 82 deletions

View File

@ -0,0 +1,2 @@
pisoControl piso(mesh);
pisoControl bpiso(mesh, "BPISO");

View File

@ -1,47 +1,49 @@
IOobject phiBHeader
IOobject phiBHeader
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
surfaceScalarField* phiBPtr = NULL;
if (phiBHeader.headerOk())
{
Info<< "Reading face flux ";
phiBPtr = new surfaceScalarField
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ
IOobject
(
"phiB",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
}
else
{
Info<< "Calculating face flux ";
surfaceScalarField* phiBPtr;
if (phiBHeader.headerOk())
{
Info<< "Reading field phiB\n" << endl;
phiBPtr = new surfaceScalarField
phiBPtr = new surfaceScalarField
(
IOobject
(
IOobject
(
"phiB",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
}
else
{
Info<< "Calculating face flux\n" << endl;
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::flux(B)
);
}
phiBPtr = new surfaceScalarField
(
IOobject
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::flux(B)
);
}
surfaceScalarField& phiB = *phiBPtr;
surfaceScalarField& phiB = *phiBPtr;
Info<< phiB.name() << nl << endl;

View File

@ -55,14 +55,12 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
pisoControl piso(mesh);
pisoControl bpiso(mesh, "BPISO");
#include "createControl.H"
#include "createFields.H"
#include "initContinuityErrs.H"