This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/compressible/rhopSonicFoam/compressibleCreatePhi.H

55 lines
1.1 KiB
C
Raw Normal View History

IOobject phiHeader
(
"phi",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
surfaceScalarField* phiPtr;
if (phiHeader.headerOk())
{
Info<< "Reading face flux field phi\n" << endl;
phiPtr = new surfaceScalarField
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
}
else
{
Info<< "Calculating face flux field phi\n" << endl;
wordList phiTypes
(
rhoU.boundaryField().size(),
calculatedFvPatchScalarField::typeName
);
phiPtr = new surfaceScalarField
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
linearInterpolate(rhoU) & mesh.Sf(),
phiTypes
);
}
surfaceScalarField& phi = *phiPtr;