Simple dynamic mesh solver

This commit is contained in:
Hrvoje Jasak 2010-10-13 12:39:00 +01:00
parent 93effde8e9
commit 713c27c5c0
3 changed files with 24 additions and 9 deletions

View file

@ -24,12 +24,6 @@
pcorrTypes
);
# include "continuityErrs.H"
// Flux predictor
phi = (fvc::interpolate(U) & mesh.Sf());
rAU == runTime.deltaT();
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pcorrEqn
@ -50,4 +44,4 @@
}
}
#include "continuityErrs.H"

View file

@ -54,17 +54,37 @@
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
scalar totalVolume = sum(mesh.V()).value();
Info<< "Reading field rAU if present\n" << endl;
volScalarField rAU
(
IOobject
(
"rAU",
runTime.timeName(),
mesh
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
runTime.deltaT(),
zeroGradientFvPatchScalarField::typeName
);
{
const dictionary& piso = mesh.solutionDict().subDict("PISO");
bool momentumPredictor = true;
if (piso.found("momentumPredictor"))
{
momentumPredictor = Switch(piso.lookup("momentumPredictor"));
}
bool momentumPredictorSave = momentumPredictor;
momentumPredictor = false;
# include "UEqn.H"
momentumPredictor = momentumPredictorSave;
rAU = 1.0/UEqn.A();
}

View file

@ -46,6 +46,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
# include "createDynamicFvMesh.H"
# include "initContinuityErrs.H"
# include "initTotalVolume.H"
# include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //