createFields.H
Go to the documentation of this file.
1Info<< "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,
26 dimensionedVector(dimVelocity, Zero)
27);
28
30(
31 IOobject
32 (
33 "phi",
34 runTime.timeName(),
35 mesh,
36 IOobject::NO_READ,
37 IOobject::AUTO_WRITE
38 ),
39 mesh,
40 dimensionedScalar(dimArea*dimVelocity, Zero)
41);
42
43multiphaseSystem fluid(U, phi);
44
45for (const phaseModel& phase : fluid.phases())
46{
47 const volScalarField& alpha = phase;
48
49 U += alpha*phase.U();
50 phi += fvc::interpolate(alpha)*phase.phi();
51}
52
53
55(
56 IOobject
57 (
58 "rho",
59 runTime.timeName(),
60 mesh,
61 IOobject::NO_READ,
62 IOobject::AUTO_WRITE
63 ),
64 fluid.rho()
65);
66
67
68// Construct incompressible turbulence model
69autoPtr<incompressible::turbulenceModel> turbulence
70(
71 incompressible::turbulenceModel::New(U, phi, fluid)
72);
73
74
75#include "readGravitationalAcceleration.H"
76#include "readhRef.H"
77#include "gh.H"
78
79
80volScalarField p
81(
82 IOobject
83 (
84 "p",
85 runTime.timeName(),
86 mesh,
87 IOobject::NO_READ,
88 IOobject::AUTO_WRITE
89 ),
90 p_rgh + rho*gh
91);
92
93label pRefCell = 0;
94scalar pRefValue = 0.0;
96(
97 p,
98 p_rgh,
99 pimple.dict(),
100 pRefCell,
102);
103mesh.setFluxRequired(p_rgh.name());
104
105
106#include "createMRFZones.H"
volScalarField & p_rgh
surfaceScalarField & phi
const scalar pRefValue
const label pRefCell
const volScalarField & gh
pimpleControl & pimple
twoPhaseSystem & fluid
U
Definition: pEqn.H:72
volScalarField & p
dynamicFvMesh & mesh
engineTime & runTime
compressible::turbulenceModel & turbulence
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:83
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
messageStream Info
Information stream (stdout output on master, null elsewhere)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
volScalarField & alpha
setRefCell(p, pimple.dict(), pRefCell, pRefValue)