createFields.H
Go to the documentation of this file.
2 
3 Info<< "Reading field p\n" << endl;
5 (
6  IOobject
7  (
8  "p",
9  runTime.timeName(),
10  mesh,
11  IOobject::MUST_READ,
12  IOobject::AUTO_WRITE
13  ),
14  mesh
15 );
16 
18 (
19  IOobject
20  (
21  "rho",
22  runTime.timeName(),
23  mesh,
24  IOobject::MUST_READ,
25  IOobject::AUTO_WRITE
26  ),
27  mesh
28 );
29 
30 Info<< "Reading field U\n" << endl;
32 (
33  IOobject
34  (
35  "U",
36  runTime.timeName(),
37  mesh,
38  IOobject::MUST_READ,
39  IOobject::AUTO_WRITE
40  ),
41  mesh
42 );
43 
44 #include "createPhi.H"
45 
46 mesh.setFluxRequired(p.name());
47 
48 // Mass flux (corrected by rhoEqn.H)
50 (
51  IOobject
52  (
53  "rhoPhi",
54  runTime.timeName(),
55  mesh,
56  IOobject::NO_READ,
57  IOobject::NO_WRITE
58  ),
60 );
61 
62 Info<< "Reading transportProperties\n" << endl;
63 
64 incompressibleTwoPhaseMixture mixture(U, phi);
65 
66 volScalarField& alphav(mixture.alpha1());
67 alphav.oldTime();
68 
69 volScalarField& alphal(mixture.alpha2());
70 
71 Info<< "Creating compressibilityModel\n" << endl;
72 autoPtr<barotropicCompressibilityModel> psiModel =
74  (
75  thermodynamicProperties,
76  alphav
77  );
78 
79 const volScalarField& psi = psiModel->psi();
80 
81 rho == max
82 (
83  psi*p
84  + alphal*rhol0
85  + ((alphav*psiv + alphal*psil) - psi)*pSat,
86  rhoMin
87 );
88 
89 mesh.setFluxRequired(p.name());
90 mesh.setFluxRequired(rho.name());
91 
92 // Create incompressible turbulence model
93 autoPtr<incompressible::turbulenceModel> turbulence
94 (
96 );
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
surfaceScalarField & phi
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
alphal
Definition: alphavPsi.H:12
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("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\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
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<< "Creating phaseChangeTwoPhaseMixture\"<< endl;autoPtr< phaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:33
volScalarField & p
Definition: createFields.H:23
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.
rhoPhi
Definition: rhoEqn.H:10
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField