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 // Construct incompressible turbulence model
48 autoPtr<incompressible::momentumTransportModel> turbulence
49 (
51 );
52 
53 
54 #include "readGravitationalAcceleration.H"
55 #include "readhRef.H"
56 #include "gh.H"
57 
58 
60 (
61  IOobject
62  (
63  "p",
64  runTime.timeName(),
65  mesh,
66  IOobject::NO_READ,
67  IOobject::AUTO_WRITE
68  ),
69  p_rgh + rho*gh
70 );
71 
72 label pRefCell = 0;
73 scalar pRefValue = 0.0;
75 (
76  p,
77  p_rgh,
78  pimple.dict(),
79  pRefCell,
80  pRefValue
81 );
82 
83 if (p_rgh.needReference())
84 {
86  (
87  "p",
88  p.dimensions(),
89  pRefValue - getRefCellValue(p, pRefCell)
90  );
91 }
92 
93 mesh.setFluxRequired(p_rgh.name());
94 
95 #include "createMRF.H"
96 #include "createFvOptions.H"
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
pimpleNoLoopControl & pimple
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:136
phi
Definition: pEqn.H:104
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
volScalarField & p
Definition: createFields.H:23
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label pRefCell
Definition: createFields.H:106
const volScalarField & gh
messageStream Info
phaseChangeTwoPhaseMixture & mixture
Definition: createFields.H:38
scalar pRefValue
Definition: createFields.H:107