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
15Info<< "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
32Info<< "Reading incompressibleTwoPhaseInteractingMixture\n" << endl;
33incompressibleTwoPhaseInteractingMixture mixture(U, phi);
34
36
37// Mixture density
39(
40 IOobject
41 (
42 "rho",
43 runTime.timeName(),
44 mesh,
45 IOobject::NO_READ,
46 IOobject::NO_WRITE
47 ),
48 mixture.rho()
49);
50
51// Mass flux
53(
54 IOobject
55 (
56 "rhoPhi",
57 runTime.timeName(),
58 mesh,
59 IOobject::NO_READ,
60 IOobject::NO_WRITE
61 ),
62 fvc::interpolate(rho)*phi
63);
64
65
66// Relative Velocity
67autoPtr<relativeVelocityModel> UdmModelPtr
68(
69 relativeVelocityModel::New
70 (
71 mixture,
73 )
74);
75
76
77// Construct compressible turbulence model
78autoPtr
79<
80 CompressibleTurbulenceModel<incompressibleTwoPhaseInteractingMixture>
82(
83 CompressibleTurbulenceModel<incompressibleTwoPhaseInteractingMixture>
84 ::New(rho, U, rhoPhi, mixture)
85);
86
87
88#include "readGravitationalAcceleration.H"
89#include "readhRef.H"
90#include "gh.H"
91
92
93volScalarField p
94(
95 IOobject
96 (
97 "p",
98 runTime.timeName(),
99 mesh,
100 IOobject::NO_READ,
101 IOobject::AUTO_WRITE
102 ),
103 p_rgh + rho*gh
104);
105
106label pRefCell = 0;
107scalar pRefValue = 0.0;
109(
110 p,
111 p_rgh,
112 pimple.dict(),
113 pRefCell,
115);
116
117if (p_rgh.needReference())
118{
119 p += dimensionedScalar
120 (
121 "p",
122 p.dimensions(),
123 pRefValue - getRefCellValue(p, pRefCell)
124 );
125 p_rgh = p - rho*gh;
126}
127
128mesh.setFluxRequired(p_rgh.name());
129mesh.setFluxRequired(alpha1.name());
130
131// MULES Correction
132tmp<surfaceScalarField> talphaPhiCorr0;
133
134#include "createMRF.H"
135#include "createFvOptions.H"
rhoPhi
Definition: rhoEqn.H:10
volScalarField & p_rgh
surfaceScalarField & phi
const scalar pRefValue
const label pRefCell
const volScalarField & gh
pimpleControl & pimple
const volScalarField & alpha1
U
Definition: pEqn.H:72
volScalarField & p
dynamicFvMesh & mesh
engineTime & runTime
compressible::turbulenceModel & turbulence
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
setRefCell(p, pimple.dict(), pRefCell, pRefValue)
tmp< surfaceScalarField > talphaPhiCorr0
Definition: createFields.H:132
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<< "Reading incompressibleTwoPhaseInteractingMixture\n"<< endl;incompressibleTwoPhaseInteractingMixture mixture(U, phi);volScalarField &alpha1(mixture.alpha1());volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mixture.rho());surfaceScalarField rhoPhi(IOobject("rhoPhi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), fvc::interpolate(rho) *phi);autoPtr< relativeVelocityModel > UdmModelPtr(relativeVelocityModel::New(mixture, mixture))
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39