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 Info<< "Reading field p_rgh\n" << endl;
19 (
20  IOobject
21  (
22  "p_rgh",
23  runTime.timeName(),
24  mesh,
25  IOobject::MUST_READ,
26  IOobject::AUTO_WRITE
27  ),
28  mesh
29 );
30 
31 Info<< "Reading field U\n" << endl;
33 (
34  IOobject
35  (
36  "U",
37  runTime.timeName(),
38  mesh,
39  IOobject::MUST_READ,
40  IOobject::AUTO_WRITE
41  ),
42  mesh
43 );
44 
45 #include "createPhi.H"
46 
47 #include "readTransportProperties.H"
48 
49 Info<< "Creating turbulence model\n" << endl;
50 autoPtr<incompressible::RASModel> turbulence
51 (
52  incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
53 );
54 
55 // Kinematic density for buoyancy force
57 (
58  IOobject
59  (
60  "rhok",
61  runTime.timeName(),
62  mesh
63  ),
64  1.0 - beta*(T - TRef)
65 );
66 
67 // kinematic turbulent thermal thermal conductivity m2/s
68 Info<< "Reading field alphat\n" << endl;
70 (
71  IOobject
72  (
73  "alphat",
74  runTime.timeName(),
75  mesh,
76  IOobject::MUST_READ,
77  IOobject::AUTO_WRITE
78  ),
79  mesh
80 );
81 
82 
83 #include "readGravitationalAcceleration.H"
84 #include "readhRef.H"
85 #include "gh.H"
86 
87 
89 (
90  IOobject
91  (
92  "p",
93  runTime.timeName(),
94  mesh,
95  IOobject::NO_READ,
96  IOobject::AUTO_WRITE
97  ),
98  p_rgh + rhok*gh
99 );
100 
101 label pRefCell = 0;
102 scalar pRefValue = 0.0;
104 (
105  p,
106  p_rgh,
107  pimple.dict(),
108  pRefCell,
109  pRefValue
110 );
111 
112 if (p_rgh.needReference())
113 {
115  (
116  "p",
117  p.dimensions(),
119  );
120 }
121 
122 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
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
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
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
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