diff --git a/applications/solvers/heatTransfer/buoyantFoam/buoyantFoam.C b/applications/solvers/heatTransfer/buoyantFoam/buoyantFoam.C index cafb67790017eae9ce4d380dd5f687d18b4037d6..24ad89e4e349ff24c518b09a632e109566850fa3 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/buoyantFoam.C +++ b/applications/solvers/heatTransfer/buoyantFoam/buoyantFoam.C @@ -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" diff --git a/applications/solvers/heatTransfer/buoyantFoam/createFields.H b/applications/solvers/heatTransfer/buoyantFoam/createFields.H index 3d604d4daf00132fbaf1339ac0aa53e024a09797..9535718fbbabdcc8b1c4da2385520c0ce2632bac 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantFoam/createFields.H @@ -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()); diff --git a/applications/solvers/heatTransfer/buoyantFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantFoam/hEqn.H index 008e3b0f56c6024160801b343b3fdc9d8c194128..f1a87c6a798229100ff3493a194d73ccfdd601b9 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/hEqn.H +++ b/applications/solvers/heatTransfer/buoyantFoam/hEqn.H @@ -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(); diff --git a/applications/solvers/heatTransfer/buoyantFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantFoam/pEqn.H index 36378f7f6fe3d08ee3fbe0f60f01ccfda6d229af..1cdbd0b1996689b48fb35f8f0d2a6d4fcfe92cb2 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantFoam/pEqn.H @@ -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"