createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 Info<< "Reading field T\n" << endl;
5 (
6  IOobject
7  (
8  "T",
9  runTime.timeName(),
10  mesh,
11  IOobject::MUST_READ,
12  IOobject::AUTO_WRITE
13  ),
14  mesh
15 );
16 
17 //volScalarField TCityRef
18 // (
19 // IOobject
20 // (
21 // "TCityRef",
22 // runTime.timeName(),
23 // mesh,
24 // IOobject::NO_READ,
25 // IOobject::NO_WRITE
26 // ),
27 // //dimensionedScalar("TRef",dimensionSet(0,0,0,1,0,0, 0),transportProperties.lookup("TRef"))
28 // mesh,
29 // dimensionedScalar("TCityRef",dimensionSet(0,0,0,1,0,0, 0),300)
30 // );
31 
32 
34  (
35  IOobject
36  (
37  "Tcoeff",
38  runTime.timeName(),
39  mesh,
40  IOobject::NO_READ,
41  IOobject::AUTO_WRITE
42  ),
43  mesh,
44  dimensionedScalar("Tcoeff",dimensionSet(0,0,0,1,0,0, 0),300)
45  );
46 
47 
48 Info<< "Reading field p_rgh\n" << endl;
50 (
51  IOobject
52  (
53  "p_rgh",
54  runTime.timeName(),
55  mesh,
56  IOobject::MUST_READ,
57  IOobject::AUTO_WRITE
58  ),
59  mesh
60 );
61 
62 Info<< "Reading field U\n" << endl;
64 (
65  IOobject
66  (
67  "U",
68  runTime.timeName(),
69  mesh,
70  IOobject::MUST_READ,
71  IOobject::AUTO_WRITE
72  ),
73  mesh
74 );
75 
76 #include "createPhi.H"
77 
79 
80 Info<< "Creating turbulence model\n" << endl;
81 autoPtr<incompressible::RASModel> turbulence
82 (
83  incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
84 );
85 
86 // Kinematic density for buoyancy force
88 (
89  IOobject
90  (
91  "rhok",
92  runTime.timeName(),
93  mesh
94  ),
95  1.0 - beta*(T - TRef)
96 );
97 
98 // kinematic turbulent thermal thermal conductivity m2/s
99 Info<< "Reading field alphat\n" << endl;
101 (
102  IOobject
103  (
104  "alphat",
105  runTime.timeName(),
106  mesh,
107  IOobject::MUST_READ,
108  IOobject::AUTO_WRITE
109  ),
110  mesh
111 );
112 
113 
114 #include "readGravitationalAcceleration.H"
115 #include "readhRef.H"
116 #include "gh.H"
117 
118 
120 (
121  IOobject
122  (
123  "p",
124  runTime.timeName(),
125  mesh,
126  IOobject::NO_READ,
127  IOobject::AUTO_WRITE
128  ),
129  p_rgh + rhok*gh
130 );
131 
132 label pRefCell = 0;
133 scalar pRefValue = 0.0;
135 (
136  p,
137  p_rgh,
138  simple.dict(),
139  pRefCell,
140  pRefValue
141 );
142 
143 if (p_rgh.needReference())
144 {
146  (
147  "p",
148  p.dimensions(),
150  );
151 }
152 
153 mesh.setFluxRequired(p_rgh.name());
pRefCell
label pRefCell
Definition: createFields.H:112
beta
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
gh.H
pRefValue
scalar pRefValue
Definition: createFields.H:113
readTransportProperties.H
alphat
alphat
Definition: TEqn.H:2
rhok
volScalarField rhok(IOobject("rhok", runTime.timeName(), mesh), 1.0 - beta *(T - TRef))
setRefCell
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
phi
surfaceScalarField & phi
Definition: createFields.H:13
TRef
dimensionedScalar TRef("TRef", dimTemperature, laminarTransport)
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Tcoeff
Tcoeff
Definition: TcoeffEqn.H:49
simple
Simple relative velocity model.
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::Info
messageStream Info
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
p
volScalarField & p
Definition: createFields.H:51
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:34
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
laminarTransport
singlePhaseTransportModel laminarTransport(U, phi)
T
const volScalarField & T
Definition: createFields.H:25
Foam::getRefCellValue
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:130
readhRef.H
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
p_rgh
volScalarField & p_rgh
Definition: setRegionFluidFields.H:31