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.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:40
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
alphal
Definition: alphavPsi.H:3
const volScalarField & psi
Definition: createFields.H:11
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
volScalarField & p
Definition: createFields.H:23
Info<< "Reading field p\"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", 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);mesh.setFluxRequired(p.name());surfaceScalarField rhoPhi(IOobject("rhoPhi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), fvc::interpolate(rho) *phi);Info<< "Reading transportProperties\"<< endl;incompressibleTwoPhaseMixture mixture(U, phi);volScalarField &alphav(mixture.alpha1());alphav.oldTime();volScalarField &alphal(mixture.alpha2());Info<< "Creating compressibilityModel\"<< endl;autoPtr< barotropicCompressibilityModel > psiModel
Definition: createFields.H:72
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict())
messageStream Info
Information stream (stdout output on master, null elsewhere)
surfaceScalarField & rhoPhi
Definition: createFields.H:119
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField