db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
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;
|