using DpDt and adding run-time modifiable timestep support

This commit is contained in:
andy
2009-01-29 13:41:08 +00:00
parent 0f3c91ce0a
commit f7040f7cc1
4 changed files with 11 additions and 7 deletions

View File

@ -48,6 +48,9 @@ int main(int argc, char *argv[])
# include "readEnvironmentalProperties.H"
# include "createFields.H"
# include "initContinuityErrs.H"
# include "readTimeControls.H"
# include "compressibleCourantNo.H"
# include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -55,11 +58,13 @@ int main(int argc, char *argv[])
while (runTime.run())
{
# include "readTimeControls.H"
# include "readPISOControls.H"
# include "compressibleCourantNo.H"
//# include "setDeltaT.H"
# include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "rhoEqn.H"

View File

@ -52,8 +52,9 @@
)
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt = fvc::ddt(p);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());

View File

@ -5,9 +5,7 @@
+ fvm::div(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
dpdt
+ fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
- p*fvc::div(phi/fvc::interpolate(rho))
DpDt
);
hEqn.relax();

View File

@ -40,7 +40,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
}
p == pd + rho*gh + pRef;
dpdt = fvc::ddt(p);
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"