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::turbulenceModel> turbulence
51 (
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;
69 volScalarField alphat
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(),
118  pRefValue - getRefCellValue(p, pRefCell)
119  );
120 }
121 
122 mesh.setFluxRequired(p_rgh.name());
scalar pRefValue
Definition: createFields.H:113
volVectorField U(IOobject( "U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
surfaceScalarField & phi
Definition: createFields.H:13
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
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
singlePhaseTransportModel laminarTransport(U, phi)
volScalarField rhok(IOobject( "rhok", runTime.timeName(), mesh ), 1.0-beta *(T-TRef))
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
volScalarField & p_rgh
messageStream Info
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
const dictionary & pimple
const volScalarField & T
Definition: createFields.H:25
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
volScalarField & p
Definition: createFields.H:51
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:154
dimensionedScalar TRef("TRef", dimTemperature, laminarTransport)
label pRefCell
Definition: createFields.H:112
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & gh