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(),
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"
135 #include "createFvOptions.H"
runTime
engineTime & runTime
Definition: createEngineTime.H:13
gh.H
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
p_rgh
p_rgh
Definition: createFields.H:95
rhoPhi
surfaceScalarField & rhoPhi
Definition: createFields.H:118
turbulence
Info<< "Reading field U\n"<< 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\n"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
talphaPhiCorr0
tmp< surfaceScalarField > talphaPhiCorr0
Definition: createFields.H:132
UdmModelPtr
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<< "Reading incompressibleTwoPhaseInteractingMixture\n"<< 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))
rho
rho
Definition: createFields.H:81
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
setRefCell
setRefCell(p, pimple.dict(), pRefCell, pRefValue)
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:17
alpha1
volScalarField & alpha1(thermo->alpha1())
createFvOptions.H
pimple
pimpleControl & pimple
Definition: setRegionFluidFields.H:56
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
p
volScalarField & p
Definition: createFields.H:23
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
Foam::getRefCellValue
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:134
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
readhRef.H
pRefCell
label pRefCell
Definition: createFields.H:75
pRefValue
scalar pRefValue
Definition: createFields.H:76
mixture
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
Foam::fac::interpolate
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.