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& p = mixture.p();
40 volScalarField& T = mixture.T();
41 volScalarField& rho1 = mixture.thermo1().rho();
42 const volScalarField& psi1 = mixture.thermo1().psi();
43 volScalarField& rho2 = mixture.thermo2().rho();
44 const volScalarField& psi2 = mixture.thermo2().psi();
45 
47 (
48  IOobject
49  (
50  "rho",
51  runTime.timeName(),
52  mesh,
53  IOobject::READ_IF_PRESENT,
54  IOobject::AUTO_WRITE
55  ),
56  alpha1*rho1 + alpha2*rho2
57 );
58 
59 
61 (
62  "pMin",
64  mixture
65 );
66 
67 mesh.setFluxRequired(p_rgh.name());
68 
69 
70 #include "readGravitationalAcceleration.H"
71 #include "readhRef.H"
72 #include "gh.H"
73 
74 
75 // Mass flux
76 // Initialisation does not matter because rhoPhi is reset after the
77 // alpha1 solution before it is used in the U equation.
79 (
80  IOobject
81  (
82  "rhoPhi",
83  runTime.timeName(),
84  mesh,
85  IOobject::NO_READ,
86  IOobject::NO_WRITE
87  ),
89 );
90 
91 volScalarField dgdt
92 (
93  pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
94 );
95 
96 // Construct interface from alpha1 distribution
97 interfaceProperties interface(alpha1, U, mixture);
98 
99 // Construct compressible turbulence model
100 autoPtr<compressible::turbulenceModel> turbulence
101 (
103 );
104 
105 Info<< "Creating field kinetic energy K\n" << endl;
106 volScalarField K("K", 0.5*magSqr(U));
const dimensionSet dimPressure
volVectorField U(IOobject( "U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
surfaceScalarField & phi
Definition: createFields.H:13
CGAL::Exact_predicates_exact_constructions_kernel K
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
volScalarField & p_rgh
messageStream Info
tmp< surfaceScalarField > interpolate(const RhoType &rho)
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
rhoPhi
Definition: rhoEqn.H:10
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
volScalarField & alpha2
Definition: createFields.H:16
rho
Definition: createFields.H:79
volScalarField & alpha1
Definition: createFields.H:15
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
dimensionedScalar pos(const dimensionedScalar &ds)
interfaceProperties interface(alpha1, U, mixture())
dimensionedScalar pMin("pMin", dimPressure, fluid)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.