createFields.H
Go to the documentation of this file.
1#include "createRDeltaT.H"
2
3Info<< "Reading field p_rgh\n" << endl;
5(
6 IOobject
7 (
8 "p_rgh",
9 runTime.timeName(),
10 mesh,
11 IOobject::MUST_READ,
12 IOobject::AUTO_WRITE
13 ),
14 mesh
15);
16
17Info<< "Reading field U\n" << endl;
19(
20 IOobject
21 (
22 "U",
23 runTime.timeName(),
24 mesh,
25 IOobject::MUST_READ,
26 IOobject::AUTO_WRITE
27 ),
28 mesh
29);
30
31#include "createPhi.H"
32
33
34Info<< "Reading transportProperties\n" << endl;
35immiscibleIncompressibleTwoPhaseMixture mixture(U, phi);
36
39
40const dimensionedScalar& rho1 = mixture.rho1();
41const dimensionedScalar& rho2 = mixture.rho2();
42
43
44// Need to store rho for ddt(rho, U)
46(
47 IOobject
48 (
49 "rho",
50 runTime.timeName(),
51 mesh,
52 IOobject::READ_IF_PRESENT
53 ),
55);
56rho.oldTime();
57
58
59// Mass flux
61(
62 IOobject
63 (
64 "rhoPhi",
65 runTime.timeName(),
66 mesh,
67 IOobject::NO_READ,
68 IOobject::NO_WRITE
69 ),
70 fvc::interpolate(rho)*phi
71);
72
73typedef incompressibleInterPhaseTransportModel
74 <
75 immiscibleIncompressibleTwoPhaseMixture
77
78autoPtr<transportModelType> turbulence
79(
81 (
83 )
84);
85
86#include "readGravitationalAcceleration.H"
87#include "readhRef.H"
88#include "gh.H"
89
90
91volScalarField p
92(
93 IOobject
94 (
95 "p",
96 runTime.timeName(),
97 mesh,
98 IOobject::NO_READ,
99 IOobject::AUTO_WRITE
100 ),
101 p_rgh + rho*gh
102);
103
104label pRefCell = 0;
105scalar pRefValue = 0.0;
107(
108 p,
109 p_rgh,
110 pimple.dict(),
111 pRefCell,
113);
114
115if (p_rgh.needReference())
116{
117 p += dimensionedScalar
118 (
119 "p",
120 p.dimensions(),
121 pRefValue - getRefCellValue(p, pRefCell)
122 );
123 p_rgh = p - rho*gh;
124}
125
126mesh.setFluxRequired(p_rgh.name());
127mesh.setFluxRequired(alpha1.name());
128
129#include "createMRF.H"
130#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
volScalarField & rho2
const volScalarField & alpha2
volScalarField & rho1
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
setRefCell(p, pimple.dict(), pRefCell, pRefValue)
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
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 transportProperties\n"<< endl;immiscibleIncompressibleTwoPhaseMixture mixture(U, phi);volScalarField &alpha1(mixture.alpha1());volScalarField &alpha2(mixture.alpha2());const dimensionedScalar &rho1=mixture.rho1();const dimensionedScalar &rho2=mixture.rho2();volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT), alpha1 *rho1+alpha2 *rho2);rho.oldTime();surfaceScalarField rhoPhi(IOobject("rhoPhi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), fvc::interpolate(rho) *phi);typedef incompressibleInterPhaseTransportModel< immiscibleIncompressibleTwoPhaseMixture > transportModelType
Definition: createFields.H:76