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 autoPtr<twoPhaseChangeModel> phaseChangePtr
37 (
39 );
40 
41 volScalarField& alpha1(mixture.alpha1());
42 const volScalarField& rho = mixture.rho();
43 
45 (
46  "pMin",
48  mixture
49 );
50 
51 mesh.setFluxRequired(p_rgh.name());
52 mesh.setFluxRequired(alpha1.name());
53 
54 
55 #include "readGravitationalAcceleration.H"
56 #include "readhRef.H"
57 #include "gh.H"
58 
59 
60 pressureReference pressureReference(mixture.p(), p_rgh, pimple.dict(), false);
61 
62 
63 // Mass flux
64 // Initialisation does not matter because rhoPhi is reset after the
65 // alpha1 solution before it is used in the U equation.
67 (
68  IOobject
69  (
70  "rhoPhi",
71  runTime.timeName(),
72  mesh,
73  IOobject::NO_READ,
74  IOobject::NO_WRITE
75  ),
77 );
78 
80 
81 #include "createAlphaFluxes.H"
82 
83 // Construct compressible turbulence model
84 compressibleInterPhaseTransportModel turbulence
85 (
86  rho,
87  U,
88  phi,
89  rhoPhi,
90  alphaPhi10,
91  mixture
92 );
93 
94 Info<< "Creating field kinetic energy K\n" << endl;
95 volScalarField K("K", 0.5*magSqr(U));
96 
97 #include "createMRF.H"
98 #include "createFvModels.H"
99 #include "createFvConstraints.H"
volScalarField & p_rgh
pimpleNoLoopControl & pimple
volScalarField dgdt(alpha1 *fvc::div(phi))
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Constructing twoPhaseMixtureThermo\"<< endl;twoPhaseMixtureThermo mixture(U, phi);autoPtr< twoPhaseChangeModel > phaseChangePtr(twoPhaseChangeModel::New(mixture))
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
const dimensionSet dimPressure
dimensionedScalar pMin("pMin", dimPressure, mixture)
pressureReference pressureReference(mixture.p(), p_rgh, pimple.dict(), false)
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
volScalarField & alpha1(mixture.alpha1())
surfaceScalarField alphaPhi10(alphaPhi10Header, phi *fvc::interpolate(alpha1))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
CGAL::Exact_predicates_exact_constructions_kernel K
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
dynamicFvMesh & mesh
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
phi
Definition: correctPhi.H:3
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
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.
surfaceScalarField rhoPhi(IOobject("rhoPhi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), fvc::interpolate(rho) *phi)
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField