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 
32 Info<< "Reading incompressibleTwoPhaseInteractingMixture\n" << endl;
33 incompressibleTwoPhaseInteractingMixture mixture(U, phi);
34 
35 volScalarField& alpha1(mixture.alpha1());
36 
37 // Mixture density
39 (
40  IOobject
41  (
42  "rho",
43  runTime.timeName(),
44  mesh,
45  IOobject::NO_READ,
46  IOobject::NO_WRITE
47  ),
48  mixture.rho()
49 );
50 
51 // Mass flux
53 (
54  IOobject
55  (
56  "rhoPhi",
57  runTime.timeName(),
58  mesh,
59  IOobject::NO_READ,
60  IOobject::NO_WRITE
61  ),
63 );
64 
65 
66 // Relative Velocity
67 autoPtr<relativeVelocityModel> UdmModelPtr
68 (
70  (
71  mixture,
72  mixture
73  )
74 );
75 
76 
77 // Construct compressible turbulence model
78 autoPtr
79 <
80  CompressibleTurbulenceModel<incompressibleTwoPhaseInteractingMixture>
81 > turbulence
82 (
83  CompressibleTurbulenceModel<incompressibleTwoPhaseInteractingMixture>
84  ::New(rho, U, rhoPhi, mixture)
85 );
86 
87 
88 #include "readGravitationalAcceleration.H"
89 #include "readhRef.H"
90 #include "gh.H"
91 
92 
94 (
95  IOobject
96  (
97  "p",
98  runTime.timeName(),
99  mesh,
100  IOobject::NO_READ,
101  IOobject::AUTO_WRITE
102  ),
103  p_rgh + rho*gh
104 );
105 
106 label pRefCell = 0;
107 scalar pRefValue = 0.0;
109 (
110  p,
111  p_rgh,
112  pimple.dict(),
113  pRefCell,
114  pRefValue
115 );
116 
117 if (p_rgh.needReference())
118 {
120  (
121  "p",
122  p.dimensions(),
123  pRefValue - getRefCellValue(p, pRefCell)
124  );
125  p_rgh = p - rho*gh;
126 }
127 
128 mesh.setFluxRequired(p_rgh.name());
129 mesh.setFluxRequired(alpha1.name());
130 
131 // MULES Correction
132 tmp<surfaceScalarField> talphaPhiCorr0;
133 
134 #include "createMRF.H"
surfaceScalarField & phi
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
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<< "Reading incompressibleTwoPhaseInteractingMixture\"<< endl;incompressibleTwoPhaseInteractingMixture mixture(U, phi);volScalarField &alpha1(mixture.alpha1());volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mixture.rho());surfaceScalarField rhoPhi(IOobject("rhoPhi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), fvc::interpolate(rho) *phi);autoPtr< relativeVelocityModel > UdmModelPtr(relativeVelocityModel::New(mixture, mixture))
tmp< surfaceScalarField > talphaPhiCorr0
Definition: createFields.H:132
const dictionary & pimple
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:136
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
dynamicFvMesh & mesh
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("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
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<< "Creating phaseChangeTwoPhaseMixture\"<< endl;autoPtr< phaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:33
volScalarField & p
Definition: createFields.H:23
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.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label pRefCell
Definition: createFields.H:106
rhoPhi
Definition: rhoEqn.H:10
const volScalarField & gh
volScalarField & alpha1(mixture->alpha1())
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
scalar pRefValue
Definition: createFields.H:107