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 
34 Info<< "Reading phaseProperties\n" << endl;
35 immiscibleIncompressibleTwoPhaseMixture mixture(U, phi);
36 
37 autoPtr<twoPhaseChangeModel> phaseChangePtr
38 (
40 );
41 
42 
43 // Need to store rho for ddt(rho, U)
45 (
46  IOobject
47  (
48  "rho",
49  runTime.timeName(),
50  mesh,
51  IOobject::READ_IF_PRESENT
52  ),
53  mixture.rho()
54 );
55 rho.oldTime();
56 
57 
58 #include "readGravitationalAcceleration.H"
59 #include "readhRef.H"
60 #include "gh.H"
61 
62 
64 (
65  IOobject
66  (
67  "p",
68  runTime.timeName(),
69  mesh,
70  IOobject::NO_READ,
71  IOobject::AUTO_WRITE
72  ),
73  p_rgh + rho*gh
74 );
75 
77 
78 if (p_rgh.needReference())
79 {
81  (
82  "p",
83  p.dimensions(),
84  pressureReference.refValue()
85  - getRefCellValue(p, pressureReference.refCell())
86  );
87  p_rgh = p - rho*gh;
88 }
89 
90 mesh.schemes().setFluxRequired(p_rgh.name());
91 
92 volScalarField& alpha1(mixture.alpha1());
93 mesh.schemes().setFluxRequired(alpha1.name());
94 
95 
96 #include "createAlphaFluxes.H"
97 
98 // Construct incompressible turbulence model
99 incompressibleInterPhaseTransportModel turbulence
100 (
101  U,
102  phi,
103  alphaPhi1,
104  mixture
105 );
106 
107 
108 #include "createMRF.H"
109 #include "createFvModels.H"
110 #include "createFvConstraints.H"
surfaceScalarField alphaPhi1(alphaPhi1Header, phi *fvc::interpolate(alpha1))
volScalarField & p_rgh
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
pimpleNoLoopControl & pimple
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
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.
const volScalarField & gh
messageStream Info
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<< "Constructing compressibleTwoPhaseMixture\"<< endl;compressibleTwoPhaseMixture mixture(U, phi);autoPtr< twoPhaseChangeModel > phaseChangePtr(twoPhaseChangeModel::New(mixture))