createPhiB.H
Go to the documentation of this file.
1IOobject phiBHeader
2(
3 "phiB",
4 runTime.timeName(),
5 mesh,
6 IOobject::NO_READ
7);
8
9
10surfaceScalarField* phiBPtr = nullptr;
11
12if (phiBHeader.typeHeaderOk<surfaceScalarField>(true))
13{
14 Info<< "Reading face flux ";
15
16 phiBPtr = new surfaceScalarField
17 (
18 IOobject
19 (
20 "phiB",
21 runTime.timeName(),
22 mesh,
23 IOobject::MUST_READ,
24 IOobject::AUTO_WRITE
25 ),
26 mesh
27 );
28}
29else
30{
31 Info<< "Calculating face flux ";
32
33 phiBPtr = new surfaceScalarField
34 (
35 IOobject
36 (
37 "phiB",
38 runTime.timeName(),
39 mesh,
40 IOobject::NO_READ,
41 IOobject::AUTO_WRITE
42 ),
43 fvc::flux(B)
44 );
45}
46
47surfaceScalarField& phiB = *phiBPtr;
48
49Info<< phiB.name() << nl << endl;
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
dynamicFvMesh & mesh
engineTime & runTime
surfaceScalarField * phiBPtr
Definition: createPhiB.H:10
IOobject phiBHeader("phiB", runTime.timeName(), mesh, IOobject::NO_READ)
surfaceScalarField & phiB
Definition: createPhiB.H:47