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 Info<< "Constructing twoPhaseMixtureThermo\n" << endl;
32 twoPhaseMixtureThermo mixture(mesh);
33 
34 volScalarField& alpha1(mixture.alpha1());
35 volScalarField& alpha2(mixture.alpha2());
36 
37 Info<< "Reading thermophysical properties\n" << endl;
38 
39 volScalarField& rho1 = mixture.thermo1().rho();
40 volScalarField& rho2 = mixture.thermo2().rho();
41 
43 (
44  IOobject
45  (
46  "rho",
47  runTime.timeName(),
48  mesh,
49  IOobject::READ_IF_PRESENT,
50  IOobject::AUTO_WRITE
51  ),
52  alpha1*rho1 + alpha2*rho2
53 );
54 
55 
57 (
58  "pMin",
60  mixture
61 );
62 
63 mesh.setFluxRequired(p_rgh.name());
64 
65 
66 #include "readGravitationalAcceleration.H"
67 #include "readhRef.H"
68 #include "gh.H"
69 
70 
71 // Mass flux
72 // Initialisation does not matter because rhoPhi is reset after the
73 // alpha1 solution before it is used in the U equation.
75 (
76  IOobject
77  (
78  "rhoPhi",
79  runTime.timeName(),
80  mesh,
81  IOobject::NO_READ,
82  IOobject::NO_WRITE
83  ),
85 );
86 
87 volScalarField dgdt
88 (
89  pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
90 );
91 
92 // Construct interface from alpha1 distribution
93 interfaceProperties interface(alpha1, U, mixture);
94 
95 // Construct compressible turbulence model
96 autoPtr<compressible::turbulenceModel> turbulence
97 (
99 );
100 
101 Info<< "Creating field kinetic energy K\n" << endl;
102 volScalarField K("K", 0.5*magSqr(U));
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
surfaceScalarField & phi
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
interfaceProperties interface(alpha1, U, mixture())
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
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
CGAL::Exact_predicates_exact_constructions_kernel K
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
dimensionedScalar pos(const dimensionedScalar &ds)
dynamicFvMesh & mesh
volVectorField U(IOobject("U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
const dimensionSet dimPressure
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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
dimensionedScalar pMin("pMin", dimPressure, fluid)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
rhoPhi
Definition: rhoEqn.H:10
volScalarField & alpha1(mixture->alpha1())
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField