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 
16 (
17  IOobject
18  (
19  "U",
20  runTime.timeName(),
21  mesh,
22  IOobject::NO_READ,
23  IOobject::AUTO_WRITE
24  ),
25  mesh,
27 );
28 
30 (
31  IOobject
32  (
33  "phi",
34  runTime.timeName(),
35  mesh,
36  IOobject::NO_READ,
37  IOobject::AUTO_WRITE
38  ),
39  mesh,
41 );
42 
43 multiphaseSystem fluid(U, phi);
44 
45 forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
46 {
47  phaseModel& phase = iter();
48  const volScalarField& alpha = phase;
49 
50  U += alpha*phase.U();
51  phi += fvc::interpolate(alpha)*phase.phi();
52 }
53 
54 
56 (
57  IOobject
58  (
59  "rho",
60  runTime.timeName(),
61  mesh,
62  IOobject::NO_READ,
63  IOobject::AUTO_WRITE
64  ),
65  fluid.rho()
66 );
67 
68 
69 // Construct incompressible turbulence model
70 autoPtr<incompressible::turbulenceModel> turbulence
71 (
73 );
74 
75 
76 #include "readGravitationalAcceleration.H"
77 #include "readhRef.H"
78 #include "gh.H"
79 
80 
82 (
83  IOobject
84  (
85  "p",
86  runTime.timeName(),
87  mesh,
88  IOobject::NO_READ,
89  IOobject::AUTO_WRITE
90  ),
91  p_rgh + rho*gh
92 );
93 
94 label pRefCell = 0;
95 scalar pRefValue = 0.0;
97 (
98  p,
99  p_rgh,
100  pimple.dict(),
101  pRefCell,
102  pRefValue
103 );
104 mesh.setFluxRequired(p_rgh.name());
105 
106 
107 #include "createMRFZones.H"
surfaceScalarField & phi
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
multiphaseSystem & fluid
Definition: createFields.H:11
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Definition: UList.H:453
const dictionary & pimple
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
static const zero Zero
Definition: zero.H:91
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("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
volScalarField & p
Definition: createFields.H:23
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label pRefCell
Definition: createFields.H:106
const volScalarField & gh
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:57
scalar pRefValue
Definition: createFields.H:107
const dimensionSet dimVelocity