mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
using DpDt and adding run-time modifiable timestep support
This commit is contained in:
@ -48,6 +48,9 @@ int main(int argc, char *argv[])
|
|||||||
# include "readEnvironmentalProperties.H"
|
# include "readEnvironmentalProperties.H"
|
||||||
# include "createFields.H"
|
# include "createFields.H"
|
||||||
# include "initContinuityErrs.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())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
|
# include "readTimeControls.H"
|
||||||
# include "readPISOControls.H"
|
# include "readPISOControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
# include "compressibleCourantNo.H"
|
||||||
//# include "setDeltaT.H"
|
# include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "rhoEqn.H"
|
# include "rhoEqn.H"
|
||||||
|
|||||||
@ -52,8 +52,9 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Creating field dpdt\n" << endl;
|
Info<< "Creating field DpDt\n" << endl;
|
||||||
volScalarField dpdt = fvc::ddt(p);
|
volScalarField DpDt =
|
||||||
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
Info<< "Calculating field g.h\n" << endl;
|
Info<< "Calculating field g.h\n" << endl;
|
||||||
volScalarField gh("gh", g & mesh.C());
|
volScalarField gh("gh", g & mesh.C());
|
||||||
|
|||||||
@ -5,9 +5,7 @@
|
|||||||
+ fvm::div(phi, h)
|
+ fvm::div(phi, h)
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||||
==
|
==
|
||||||
dpdt
|
DpDt
|
||||||
+ fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
|
|
||||||
- p*fvc::div(phi/fvc::interpolate(rho))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
hEqn.relax();
|
hEqn.relax();
|
||||||
|
|||||||
@ -40,7 +40,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|||||||
}
|
}
|
||||||
|
|
||||||
p == pd + rho*gh + pRef;
|
p == pd + rho*gh + pRef;
|
||||||
dpdt = fvc::ddt(p);
|
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "compressibleContinuityErrs.H"
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|||||||
Reference in New Issue
Block a user