createFieldsSimple.H
Go to the documentation of this file.
1 Info << "Reading field p\n"
2  << endl;
3 pPtr_.reset(
4  new volScalarField(
5  IOobject(
6  "p",
7  runTime.timeName(),
8  mesh,
9  IOobject::MUST_READ,
10  IOobject::AUTO_WRITE),
11  mesh));
12 volScalarField& p = pPtr_();
13 
14 Info << "Reading field U\n"
15  << endl;
16 UPtr_.reset(
17  new volVectorField(
18  IOobject(
19  "U",
20  runTime.timeName(),
21  mesh,
22  IOobject::MUST_READ,
23  IOobject::AUTO_WRITE),
24  mesh));
25 volVectorField& U = UPtr_();
26 
27 #include "createPhiPython.H"
28 
29 // create alpha porosity term
30 alphaPorosityPtr_.reset(
31  new volScalarField(
32  IOobject(
33  "alphaPorosity",
34  runTime.timeName(),
35  mesh,
36  IOobject::READ_IF_PRESENT,
37  IOobject::AUTO_WRITE),
38  mesh,
39  dimensionedScalar("alphaPorosity", dimensionSet(0, 0, -1, 0, 0, 0, 0), pTraits<scalar>::zero),
40  zeroGradientFvPatchField<scalar>::typeName));
41 
42 // actuator related stuff
43 Info << "Creating source term. " << endl;
44 fvSourcePtr_.reset(
45  new volVectorField(
46  IOobject(
47  "fvSource",
48  runTime.timeName(),
49  mesh,
50  IOobject::NO_READ,
51  IOobject::AUTO_WRITE),
52  mesh,
53  dimensionedVector("fvSource", dimensionSet(0, 1, -2, 0, 0, 0, 0), vector::zero),
54  zeroGradientFvPatchField<vector>::typeName));
55 
56 setRefCell(p, simple.dict(), pRefCell_, pRefValue_);
57 mesh.setFluxRequired(p.name());
58 
59 laminarTransportPtr_.reset(
60  new singlePhaseTransportModel(U, phi));
61 singlePhaseTransportModel& laminarTransport = laminarTransportPtr_();
62 
63 turbulencePtr_.reset(
64  incompressible::turbulenceModel::New(U, phi, laminarTransport));
65 
66 // create MRF
67 MRFPtr_.reset(new IOMRFZoneListDF(mesh));
68 
U
U
Definition: pEqnPimpleDyM.H:60
simple
simpleControl & simple
Definition: createRefsRhoSimpleC.H:5
laminarTransport
singlePhaseTransportModel & laminarTransport
Definition: createRefsPimple.H:9
p
volScalarField & p
Definition: createRefsPimple.H:6
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
phi
surfaceScalarField & phi
Definition: createRefsPimple.H:8
createPhiPython.H
runTime
Time & runTime
Definition: createRefsHeatTransfer.H:1