All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.schemes().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 phaseProperties\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.schemes().setFluxRequired(p.name());
90 mesh.schemes().setFluxRequired(rho.name());
91 
92 // Create incompressible turbulence model
93 autoPtr<incompressible::momentumTransportModel> turbulence
94 (
96 );
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
fvMesh & mesh
volScalarField & p
Definition: createFields.H:25
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
rho
Definition: createFields.H:81
alphal
Definition: alphavPsi.H:12
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
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.
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
surfaceScalarField rhoPhi(IOobject("rhoPhi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), fvc::interpolate(rho) *phi)
messageStream Info
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField