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 
37 volScalarField& alpha1(mixture.alpha1());
38 volScalarField& alpha2(mixture.alpha2());
39 
40 Info<< "Reading thermophysical properties\n" << endl;
41 
42 const volScalarField& rho1 = mixture.thermo1().rho();
43 const volScalarField& rho2 = mixture.thermo2().rho();
44 
46 (
47  IOobject
48  (
49  "rho",
50  runTime.timeName(),
51  mesh,
52  IOobject::READ_IF_PRESENT,
53  IOobject::AUTO_WRITE
54  ),
56 );
57 
58 
60 (
61  "pMin",
63  mixture
64 );
65 
66 mesh.setFluxRequired(p_rgh.name());
67 mesh.setFluxRequired(alpha1.name());
68 
69 
70 #include "readGravitationalAcceleration.H"
71 #include "readhRef.H"
72 #include "gh.H"
73 
74 
75 // Mass flux
76 // Initialisation does not matter because rhoPhi is reset after the
77 // alpha1 solution before it is used in the U equation.
79 (
80  IOobject
81  (
82  "rhoPhi",
83  runTime.timeName(),
84  mesh,
85  IOobject::NO_READ,
86  IOobject::NO_WRITE
87  ),
89 );
90 
92 
93 #include "createAlphaFluxes.H"
94 
96 // Construct compressible turbulence model
97 compressibleInterPhaseTransportModel turbulence
98 (
99  rho,
100  U,
101  phi,
102  rhoPhi,
103  alphaPhi10,
104  mixture
105 );
106 
107 #include "createK.H"
108 
109 #include "createMRF.H"
110 #include "createFvOptions.H"
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::dimPressure
const dimensionSet dimPressure
gh.H
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
rho1
const dimensionedScalar & rho1
Definition: createFields.H:46
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
Foam::isoAdvection
An implementation of the isoAdvector geometric Volume-of-Fluid method advancing the provided volume f...
Definition: isoAdvection.H:87
createRDeltaT.H
advector
isoAdvection advector(alpha1, phi, U)
rho
rho
Definition: createFields.H:81
Foam::endl
Ostream & endl(Ostream &os)
Definition: Ostream.H:381
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
alpha1
volScalarField & alpha1(thermo->alpha1())
createFvOptions.H
rho2
const dimensionedScalar & rho2
Definition: createFields.H:47
Foam::Info
messageStream Info
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:36
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:53
createK.H
alphaPhi10
surfaceScalarField alphaPhi10(alphaPhi10Header, phi *fvc::interpolate(alpha1))
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:50
createAlphaFluxes.H
readhRef.H
pMin
dimensionedScalar pMin("pMin", dimPressure, fluid)
mixture
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
alpha2
volScalarField & alpha2(thermo->alpha2())
Foam::fac::interpolate
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)