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