Info<< "Reading field pd\n" << endl;
volScalarField pd
(
IOobject
"pd",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
"U",
# include "createPhi.H"
multiphaseMixture mixture(U, phi);
// Need to store rho for ddt(rho, U)
volScalarField rho
"rho",
IOobject::READ_IF_PRESENT
mixture.rho()
rho.oldTime();
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("gh", g & mesh.Cf());
volScalarField p
"p",
IOobject::NO_READ,
pd + rho*gh
label pdRefCell = 0;
scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
scalar pRefValue = 0.0;
if (pd.needReference())
{
pRefValue = readScalar
mesh.solutionDict().subDict("PISO").lookup("pRefValue")
p += dimensionedScalar
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
}
// Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence
incompressible::turbulenceModel::New(U, phi, mixture)