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 volScalarField& alpha2(mixture.alpha2());
37 
38 const dimensionedScalar& rho1 = mixture.rhod();
39 const dimensionedScalar& rho2 = mixture.rhoc();
40 
41 // Mixture density
43 (
44  IOobject
45  (
46  "rho",
47  runTime.timeName(),
48  mesh,
49  IOobject::NO_READ,
50  IOobject::NO_WRITE
51  ),
52  mixture.rho()
53 );
54 
55 // Mass flux
57 (
58  IOobject
59  (
60  "rhoPhi",
61  runTime.timeName(),
62  mesh,
63  IOobject::NO_READ,
64  IOobject::NO_WRITE
65  ),
67 );
68 
69 
70 // Relative Velocity
71 autoPtr<relativeVelocityModel> UdmModelPtr
72 (
74  (
75  mixture,
76  mixture
77  )
78 );
79 
80 relativeVelocityModel& UdmModel(UdmModelPtr());
81 
82 
83 // Construct compressible turbulence model
84 autoPtr
85 <
86  CompressibleTurbulenceModel<incompressibleTwoPhaseInteractingMixture>
87 > turbulence
88 (
89  CompressibleTurbulenceModel<incompressibleTwoPhaseInteractingMixture>
90  ::New(rho, U, rhoPhi, mixture)
91 );
92 
93 
94 #include "readGravitationalAcceleration.H"
95 #include "readhRef.H"
96 #include "gh.H"
97 
98 
100 (
101  IOobject
102  (
103  "p",
104  runTime.timeName(),
105  mesh,
106  IOobject::NO_READ,
107  IOobject::AUTO_WRITE
108  ),
109  p_rgh + rho*gh
110 );
111 
113 scalar pRefValue = 0.0;
115 (
116  p,
117  p_rgh,
118  pimple.dict(),
119  pRefCell,
120  pRefValue
121 );
122 
123 if (p_rgh.needReference())
124 {
126  (
127  "p",
128  p.dimensions(),
130  );
131  p_rgh = p - rho*gh;
132 }
133 
134 mesh.setFluxRequired(p_rgh.name());
135 mesh.setFluxRequired(alpha1.name());
136 
137 // MULES Correction
138 tmp<surfaceScalarField> talphaPhiCorr0;
pRefCell
label pRefCell
Definition: createFields.H:112
rhoPhi
rhoPhi
Definition: rhoEqn.H:10
gh.H
rho1
const dimensionedScalar & rho1
Definition: createFields.H:39
pRefValue
scalar pRefValue
Definition: createFields.H:113
rho2
const dimensionedScalar & rho2
Definition: createFields.H:40
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
talphaPhiCorr0
tmp< surfaceScalarField > talphaPhiCorr0
Definition: createFields.H:138
setRefCell
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
phi
surfaceScalarField & phi
Definition: createFields.H:13
Foam::MULES::interpolate
tmp< surfaceScalarField > interpolate(const RhoType &rho)
Definition: IMULESTemplates.C:40
rho
rho
Definition: createFields.H:79
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
mixture
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
Foam::label
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
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::Info
messageStream Info
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
p
volScalarField & p
Definition: createFields.H:51
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:34
alpha1
volScalarField & alpha1
Definition: createFields.H:15
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
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 &alpha2(mixture.alpha2());const dimensionedScalar &rho1=mixture.rhod();const dimensionedScalar &rho2=mixture.rhoc();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))
Foam::getRefCellValue
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:130
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
readhRef.H
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
p_rgh
volScalarField & p_rgh
Definition: setRegionFluidFields.H:31
UdmModel
relativeVelocityModel & UdmModel(UdmModelPtr())
alpha2
volScalarField & alpha2
Definition: createFields.H:16