createFieldsSimpleT.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 T\n"
15  << endl;
16 TPtr_.reset(
17  new volScalarField(
18  IOobject(
19  "T",
20  runTime.timeName(),
21  mesh,
22  IOobject::MUST_READ,
23  IOobject::AUTO_WRITE),
24  mesh));
25 
26 Info << "Reading field U\n"
27  << endl;
28 UPtr_.reset(
29  new volVectorField(
30  IOobject(
31  "U",
32  runTime.timeName(),
33  mesh,
34  IOobject::MUST_READ,
35  IOobject::AUTO_WRITE),
36  mesh));
37 volVectorField& U = UPtr_();
38 
39 #include "createPhiPython.H"
40 
41 // create alpha porosity term
42 alphaPorosityPtr_.reset(
43  new volScalarField(
44  IOobject(
45  "alphaPorosity",
46  runTime.timeName(),
47  mesh,
48  IOobject::READ_IF_PRESENT,
49  IOobject::AUTO_WRITE),
50  mesh,
51  dimensionedScalar("alphaPorosity", dimensionSet(0, 0, -1, 0, 0, 0, 0), pTraits<scalar>::zero),
52  zeroGradientFvPatchField<scalar>::typeName));
53 
54 // actuator related stuff
55 Info << "Creating source term. " << endl;
56 fvSourcePtr_.reset(
57  new volVectorField(
58  IOobject(
59  "fvSource",
60  runTime.timeName(),
61  mesh,
62  IOobject::NO_READ,
63  IOobject::AUTO_WRITE),
64  mesh,
65  dimensionedVector("fvSource", dimensionSet(0, 1, -2, 0, 0, 0, 0), vector::zero),
66  zeroGradientFvPatchField<vector>::typeName));
67 
68 setRefCell(p, simple.dict(), pRefCell_, pRefValue_);
69 mesh.setFluxRequired(p.name());
70 
71 laminarTransportPtr_.reset(
72  new singlePhaseTransportModel(U, phi));
73 singlePhaseTransportModel& laminarTransport = laminarTransportPtr_();
74 
75 // Laminar Prandtl number
76 PrPtr_.reset(
77  new dimensionedScalar("Pr", dimless, laminarTransport));
78 
79 // Turbulent Prandtl number
80 PrtPtr_.reset(
81  new dimensionedScalar("Prt", dimless, laminarTransport));
82 
83 // kinematic turbulent thermal thermal conductivity m2/s
84 Info << "Reading field alphat\n"
85  << endl;
86 alphatPtr_.reset(
87  new volScalarField(
88  IOobject(
89  "alphat",
90  runTime.timeName(),
91  mesh,
92  IOobject::MUST_READ,
93  IOobject::AUTO_WRITE),
94  mesh));
95 
96 turbulencePtr_.reset(
97  incompressible::turbulenceModel::New(U, phi, laminarTransport));
98 
99 // create MRF
100 MRFPtr_.reset(new IOMRFZoneListDF(mesh));
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