createFields.H
Go to the documentation of this file.
1 Info<< "Reading field p_rgh\n" << endl;
3 (
4  IOobject
5  (
6  "p_rgh",
7  runTime.timeName(),
8  mesh,
9  IOobject::MUST_READ,
10  IOobject::AUTO_WRITE
11  ),
12  mesh
13 );
14 
15 Info<< "Reading field U\n" << endl;
17 (
18  IOobject
19  (
20  "U",
21  runTime.timeName(),
22  mesh,
23  IOobject::MUST_READ,
24  IOobject::AUTO_WRITE
25  ),
26  mesh
27 );
28 
29 #include "createPhi.H"
30 
31 multiphaseMixture mixture(U, phi);
32 
33 // Need to store rho for ddt(rho, U)
35 (
36  IOobject
37  (
38  "rho",
39  runTime.timeName(),
40  mesh,
41  IOobject::READ_IF_PRESENT
42  ),
43  mixture.rho()
44 );
45 rho.oldTime();
46 
47 const surfaceScalarField& rhoPhi(mixture.rhoPhi());
48 
49 // Construct incompressible turbulence model
50 autoPtr<incompressible::turbulenceModel> turbulence
51 (
53 );
54 
55 
56 #include "readGravitationalAcceleration.H"
57 #include "readhRef.H"
58 #include "gh.H"
59 
60 
62 (
63  IOobject
64  (
65  "p",
66  runTime.timeName(),
67  mesh,
68  IOobject::NO_READ,
69  IOobject::AUTO_WRITE
70  ),
71  p_rgh + rho*gh
72 );
73 
74 label pRefCell = 0;
75 scalar pRefValue = 0.0;
77 (
78  p,
79  p_rgh,
80  pimple.dict(),
81  pRefCell,
82  pRefValue
83 );
84 
85 if (p_rgh.needReference())
86 {
88  (
89  "p",
90  p.dimensions(),
91  pRefValue - getRefCellValue(p, pRefCell)
92  );
93 }
94 
95 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
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
Info<< "Reading field p_rgh\n"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Creating phaseChangeTwoPhaseMixture\n"<< endl;autoPtr< phaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:33
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
volScalarField & p_rgh
messageStream Info
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
rhoPhi
Definition: rhoEqn.H:10
const dictionary & pimple
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< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
rho
Definition: createFields.H:79
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
label pRefCell
Definition: createFields.H:112
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & gh