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 #include "readGravitationalAcceleration.H"
33 #include "readhRef.H"
34 #include "gh.H"
35 
36 
37 Info<< "Reading incompressibleTwoPhaseInteractingMixture\n" << endl;
38 incompressibleTwoPhaseInteractingMixture mixture(U, phi, g);
39 
40 volScalarField& alpha1(mixture.alpha1());
41 
42 // Mixture density
44 (
45  IOobject
46  (
47  "rho",
48  runTime.timeName(),
49  mesh,
50  IOobject::NO_READ,
51  IOobject::NO_WRITE
52  ),
53  mixture.rho()
54 );
55 
56 // Mass flux
58 (
59  IOobject
60  (
61  "rhoPhi",
62  runTime.timeName(),
63  mesh,
64  IOobject::NO_READ,
65  IOobject::NO_WRITE
66  ),
68 );
69 
70 
71 // Construct compressible turbulence model
72 autoPtr<compressible::momentumTransportModel> turbulence
73 (
75 );
76 
77 
79 (
80  IOobject
81  (
82  "p",
83  runTime.timeName(),
84  mesh,
85  IOobject::NO_READ,
86  IOobject::AUTO_WRITE
87  ),
88  p_rgh + rho*gh
89 );
90 
92 
93 if (p_rgh.needReference())
94 {
96  (
97  "p",
98  p.dimensions(),
99  pressureReference.refValue()
100  - getRefCellValue(p, pressureReference.refCell())
101  );
102  p_rgh = p - rho*gh;
103 }
104 
105 mesh.schemes().setFluxRequired(p_rgh.name());
106 mesh.schemes().setFluxRequired(alpha1.name());
107 
108 // MULES Correction
109 tmp<surfaceScalarField> talphaPhiCorr0;
110 
111 #include "createFvModels.H"
112 #include "createFvConstraints.H"
volScalarField & p_rgh
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
pimpleNoLoopControl & pimple
tmp< surfaceScalarField > talphaPhiCorr0
Definition: createFields.H:109
pressureReference pressureReference(mixture.p(), p_rgh, pimple.dict(), false)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
volScalarField & alpha1(mixture.alpha1())
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
fvMesh & mesh
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:136
volScalarField & p
Definition: createFields.H:25
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
rho
Definition: createFields.H:81
phi
Definition: correctPhi.H:3
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)
const volScalarField & gh
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedVector & g