createFields.H
Go to the documentation of this file.
2
3Info<< "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
30Info<< "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
46mesh.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 ),
59 fvc::interpolate(rho)*phi
60);
61
62Info<< "Reading transportProperties\n" << endl;
63
64incompressibleTwoPhaseMixture mixture(U, phi);
65
66volScalarField& alphav(mixture.alpha1());
67alphav.oldTime();
68
70
71Info<< "Creating compressibilityModel\n" << endl;
72autoPtr<barotropicCompressibilityModel> psiModel =
73 barotropicCompressibilityModel::New
74 (
75 thermodynamicProperties,
76 alphav
77 );
78
79const volScalarField& psi = psiModel->psi();
80
82(
83 psi*p
84 + alphal*rhol0
85 + ((alphav*psiv + alphal*psil) - psi)*pSat,
86 rhoMin
87);
88
89mesh.setFluxRequired(p.name());
90mesh.setFluxRequired(rho.name());
91
92// Create incompressible turbulence model
93autoPtr<incompressible::turbulenceModel> turbulence
94(
95 incompressible::turbulenceModel::New(U, phi, mixture)
96);
Y[inertIndex] max(0.0)
alphal
Definition: alphavPsi.H:12
rhoPhi
Definition: rhoEqn.H:10
surfaceScalarField & phi
U
Definition: pEqn.H:72
volScalarField & p
const volScalarField & psi
dynamicFvMesh & mesh
engineTime & runTime
const dimensionedScalar rhoMin
compressible::turbulenceModel & turbulence
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:83
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
messageStream Info
Information stream (stdout output on master, null elsewhere)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
Info<< "Reading field p\n"<< 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\n"<< 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\n"<< endl;incompressibleTwoPhaseMixture mixture(U, phi);volScalarField &alphav(mixture.alpha1());alphav.oldTime();volScalarField &alphal(mixture.alpha2());Info<< "Creating compressibilityModel\n"<< endl;autoPtr< barotropicCompressibilityModel > psiModel
Definition: createFields.H:72
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39