Skip to content
Snippets Groups Projects
Commit f92fbeb9 authored by henry's avatar henry
Browse files

Added p to interFoam

Changed formatting of interDyMFoam
parent 3e9f272d
Branches
Tags
No related merge requests found
......@@ -46,18 +46,17 @@ Description
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createDynamicFvMesh.H"
# include "readEnvironmentalProperties.H"
# include "readPISOControls.H"
# include "initContinuityErrs.H"
# include "createFields.H"
# include "readTimeControls.H"
# include "correctPhi.H"
# include "CourantNo.H"
# include "setInitialDeltaT.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "readEnvironmentalProperties.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "readTimeControls.H"
#include "correctPhi.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -65,10 +64,10 @@ int main(int argc, char *argv[])
while (runTime.run())
{
# include "readControls.H"
# include "CourantNo.H"
#include "readControls.H"
#include "CourantNo.H"
# include "setDeltaT.H"
#include "setDeltaT.H"
runTime++;
......@@ -97,7 +96,7 @@ int main(int argc, char *argv[])
if (mesh.changing() && correctPhi)
{
# include "correctPhi.H"
#include "correctPhi.H"
}
// Make the fluxes relative to the mesh motion
......@@ -108,22 +107,22 @@ int main(int argc, char *argv[])
if (mesh.changing() && checkMeshCourantNo)
{
# include "meshCourantNo.H"
#include "meshCourantNo.H"
}
twoPhaseProperties.correct();
# include "gammaEqnSubCycle.H"
#include "gammaEqnSubCycle.H"
# include "UEqn.H"
#include "UEqn.H"
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
# include "pEqn.H"
#include "pEqn.H"
}
# include "continuityErrs.H"
#include "continuityErrs.H"
p = pd + rho*gh;
......
......@@ -45,7 +45,7 @@
Info<< "Reading transportProperties\n" << endl;
twoPhaseMixture twoPhaseProperties(U, phi, "gamma");
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
......@@ -83,14 +83,29 @@
);
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("gh", g & mesh.Cf());
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
pd + rho*gh
);
label pdRefCell = 0;
scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
Info<< "Calculating field g.h\n" << endl;
surfaceScalarField ghf("gh", g & mesh.Cf());
// Construct interface from gamma distribution
interfaceProperties interface(gamma, U, twoPhaseProperties);
......@@ -45,18 +45,17 @@ Description
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "readEnvironmentalProperties.H"
# include "readPISOControls.H"
# include "initContinuityErrs.H"
# include "createFields.H"
# include "readTimeControls.H"
# include "correctPhi.H"
# include "CourantNo.H"
# include "setInitialDeltaT.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "readTimeControls.H"
#include "correctPhi.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -64,10 +63,10 @@ int main(int argc, char *argv[])
while (runTime.run())
{
# include "readPISOControls.H"
# include "readTimeControls.H"
# include "CourantNo.H"
# include "setDeltaT.H"
#include "readPISOControls.H"
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
......@@ -75,17 +74,19 @@ int main(int argc, char *argv[])
twoPhaseProperties.correct();
# include "gammaEqnSubCycle.H"
#include "gammaEqnSubCycle.H"
# include "UEqn.H"
#include "UEqn.H"
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
# include "pEqn.H"
#include "pEqn.H"
}
# include "continuityErrs.H"
#include "continuityErrs.H"
p = pd + rho*gh;
runTime.write();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment