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 
32 Info<< "Reading transportProperties\n" << endl;
33 immiscibleIncompressibleTwoPhaseMixture mixture(U, phi);
34 
35 volScalarField& alpha1(mixture.alpha1());
36 volScalarField& alpha2(mixture.alpha2());
37 
38 const dimensionedScalar& rho1 = mixture.rho1();
39 const dimensionedScalar& rho2 = mixture.rho2();
40 
41 
42 // Need to store rho for ddt(rho, U)
44 (
45  IOobject
46  (
47  "rho",
48  runTime.timeName(),
49  mesh,
50  IOobject::READ_IF_PRESENT
51  ),
52  alpha1*rho1 + alpha2*rho2
53 );
54 rho.oldTime();
55 
56 
57 // Mass flux
59 (
60  IOobject
61  (
62  "rhoPhi",
63  runTime.timeName(),
64  mesh,
65  IOobject::NO_READ,
66  IOobject::NO_WRITE
67  ),
69 );
70 
71 
72 // Construct incompressible turbulence model
73 autoPtr<incompressible::turbulenceModel> turbulence
74 (
76 );
77 
78 
79 #include "readGravitationalAcceleration.H"
80 #include "readhRef.H"
81 #include "gh.H"
82 
83 
85 (
86  IOobject
87  (
88  "p",
89  runTime.timeName(),
90  mesh,
91  IOobject::NO_READ,
92  IOobject::AUTO_WRITE
93  ),
94  p_rgh + rho*gh
95 );
96 
97 label pRefCell = 0;
98 scalar pRefValue = 0.0;
100 (
101  p,
102  p_rgh,
103  pimple.dict(),
104  pRefCell,
105  pRefValue
106 );
107 
108 if (p_rgh.needReference())
109 {
111  (
112  "p",
113  p.dimensions(),
114  pRefValue - getRefCellValue(p, pRefCell)
115  );
116  p_rgh = p - rho*gh;
117 }
118 
119 mesh.setFluxRequired(p_rgh.name());
120 mesh.setFluxRequired(alpha1.name());
121 
122 // MULES flux from previous time-step
124 (
125  IOobject
126  (
127  "alphaPhi",
128  runTime.timeName(),
129  mesh,
130  IOobject::READ_IF_PRESENT,
131  IOobject::AUTO_WRITE
132  ),
134 );
135 
136 // MULES Correction
137 tmp<surfaceScalarField> talphaPhiCorr0;
138 
139 #include "createMRF.H"
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
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
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
tmp< surfaceScalarField > talphaPhiCorr0
Definition: createFields.H:132
const dictionary & pimple
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
volScalarField & alpha2(mixture->alpha2())
tmp< surfaceScalarField > interpolate(const RhoType &rho)
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:130
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
surfaceScalarField alphaPhi(IOobject("alphaPhi", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), phi *fvc::interpolate(alpha1))
dynamicFvMesh & mesh
volVectorField U(IOobject("U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
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
volScalarField & p
Definition: createFields.H:23
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label pRefCell
Definition: createFields.H:106
rhoPhi
Definition: rhoEqn.H:10
const volScalarField & gh
volScalarField & alpha1(mixture->alpha1())
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
scalar pRefValue
Definition: createFields.H:107