createFields.H
Go to the documentation of this file.
1 Info<< "Reading thermophysical properties\n" << endl;
2 
3 autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
4 rhoThermo& thermo = pThermo();
5 thermo.validate(args.executable(), "h", "e");
6 
8 (
9  IOobject
10  (
11  "rho",
12  runTime.timeName(),
13  mesh,
14  IOobject::NO_READ,
15  IOobject::NO_WRITE
16  ),
17  thermo.rho()
18 );
19 
20 volScalarField& p = thermo.p();
21 const volScalarField& psi = thermo.psi();
22 
23 Info<< "Reading field U\n" << endl;
25 (
26  IOobject
27  (
28  "U",
29  runTime.timeName(),
30  mesh,
31  IOobject::MUST_READ,
32  IOobject::AUTO_WRITE
33  ),
34  mesh
35 );
36 
37 #include "compressibleCreatePhi.H"
38 
39 Info<< "Creating turbulence model\n" << endl;
40 autoPtr<compressible::turbulenceModel> turbulence
41 (
43  (
44  rho,
45  U,
46  phi,
47  thermo
48  )
49 );
50 
51 
52 #include "readGravitationalAcceleration.H"
53 #include "readhRef.H"
54 #include "gh.H"
55 
56 
57 Info<< "Reading field p_rgh\n" << endl;
59 (
60  IOobject
61  (
62  "p_rgh",
63  runTime.timeName(),
64  mesh,
65  IOobject::MUST_READ,
66  IOobject::AUTO_WRITE
67  ),
68  mesh
69 );
70 
71 // Force p_rgh to be consistent with p
72 p_rgh = p - rho*gh;
73 
74 label pRefCell = 0;
75 scalar pRefValue = 0.0;
77 (
78  p,
79  p_rgh,
80  simple.dict(),
81  pRefCell,
82  pRefValue
83 );
84 
85 mesh.setFluxRequired(p_rgh.name());
86 
88 dimensionedScalar totalVolume = sum(mesh.V());
scalar pRefValue
Definition: createFields.H:113
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
Creates and initialises the face-flux field phi.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
volScalarField & p_rgh
messageStream Info
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
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
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
rho
Definition: createFields.H:79
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::argList args(argc, argv)
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
const dictionary & simple
label pRefCell
Definition: createFields.H:112
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & gh