createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 
3 Info<< "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 
17 Info<< "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 Info<< "Constructing twoPhaseMixtureThermo\n" << endl;
34 twoPhaseMixtureThermo mixture(U, phi);
35 
36 volScalarField& alpha1(mixture.alpha1());
37 volScalarField& alpha2(mixture.alpha2());
38 
39 Info<< "Reading thermophysical properties\n" << endl;
40 
41 const volScalarField& rho1 = mixture.thermo1().rho();
42 const volScalarField& rho2 = mixture.thermo2().rho();
43 
45 (
46  IOobject
47  (
48  "rho",
49  runTime.timeName(),
50  mesh,
51  IOobject::READ_IF_PRESENT,
52  IOobject::AUTO_WRITE
53  ),
54  alpha1*rho1 + alpha2*rho2
55 );
56 
57 
59 (
60  "pMin",
62  mixture
63 );
64 
65 mesh.setFluxRequired(p_rgh.name());
66 mesh.setFluxRequired(alpha1.name());
67 
68 
69 #include "readGravitationalAcceleration.H"
70 #include "readhRef.H"
71 #include "gh.H"
72 
73 
74 // Mass flux
75 // Initialisation does not matter because rhoPhi is reset after the
76 // alpha1 solution before it is used in the U equation.
78 (
79  IOobject
80  (
81  "rhoPhi",
82  runTime.timeName(),
83  mesh,
84  IOobject::NO_READ,
85  IOobject::NO_WRITE
86  ),
88 );
89 
91 
92 #include "createAlphaFluxes.H"
93 
94 // Construct compressible turbulence model
95 compressibleInterPhaseTransportModel turbulence
96 (
97  rho,
98  U,
99  phi,
100  rhoPhi,
101  alphaPhi10,
102  mixture
103 );
104 
105 Info<< "Creating field kinetic energy K\n" << endl;
106 volScalarField K("K", 0.5*magSqr(U));
107 
108 #include "createMRF.H"
109 #include "createFvOptions.H"
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
surfaceScalarField alphaPhi10(alphaPhi10Header, phi *fvc::interpolate(alpha1))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
CGAL::Exact_predicates_exact_constructions_kernel K
phi
Definition: pEqn.H:104
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
volScalarField & alpha1(mixture.alpha1())
const dimensionSet dimPressure
dimensionedScalar pMin("pMin", dimPressure, fluid)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
volScalarField & alpha2(mixture.alpha2())
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.
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
rhoPhi
Definition: rhoEqn.H:10
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
phaseChangeTwoPhaseMixture & mixture
Definition: createFields.H:38