createFields.H
Go to the documentation of this file.
1#include "createRDeltaT.H"
2
3Info<< "Reading thermophysical properties\n" << endl;
4
5autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
6rhoThermo& thermo = pThermo();
7thermo.validate(args.executable(), "h", "e");
8
9volScalarField rho
10(
11 IOobject
12 (
13 "rho",
14 runTime.timeName(),
15 mesh,
16 IOobject::NO_READ,
17 IOobject::NO_WRITE
18 ),
19 thermo.rho()
20);
21
22volScalarField& p = thermo.p();
23
24Info<< "Reading field U\n" << endl;
25volVectorField U
26(
27 IOobject
28 (
29 "U",
30 runTime.timeName(),
31 mesh,
32 IOobject::MUST_READ,
33 IOobject::AUTO_WRITE
34 ),
35 mesh
36);
37
39
41
42Info<< "Creating turbulence model\n" << endl;
43autoPtr<compressible::turbulenceModel> turbulence
44(
45 compressible::turbulenceModel::New
46 (
47 rho,
48 U,
49 phi,
50 thermo
51 )
52);
53
54
55#include "readGravitationalAcceleration.H"
56#include "readhRef.H"
57#include "gh.H"
58
59
60Info<< "Reading field p_rgh\n" << endl;
61volScalarField p_rgh
62(
63 IOobject
64 (
65 "p_rgh",
66 runTime.timeName(),
67 mesh,
68 IOobject::MUST_READ,
69 IOobject::AUTO_WRITE
70 ),
71 mesh
72);
73
74// Force p_rgh to be consistent with p
75p_rgh = p - rho*gh;
76
77mesh.setFluxRequired(p_rgh.name());
78
79label pRefCell = 0;
80scalar pRefValue = 0.0;
81
82if (p_rgh.needReference())
83{
85 (
86 p,
87 p_rgh,
88 pimple.dict(),
91 );
92
93 p += dimensionedScalar
94 (
95 "p",
96 p.dimensions(),
97 pRefValue - getRefCellValue(p, pRefCell)
98 );
99}
100
101dimensionedScalar initialMass("initialMass", fvc::domainIntegrate(rho));
102
103#include "createDpdt.H"
104
105#include "createK.H"
106
107#include "createMRF.H"
108#include "createRadiationModel.H"
109#include "createFvOptions.H"
110
111
112const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
113const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict());
volScalarField & p_rgh
surfaceScalarField & phi
const scalar pRefValue
const label pRefCell
const volScalarField & gh
pimpleControl & pimple
const word & executable() const noexcept
Name of executable without the path.
Definition: argListI.H:51
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
U
Definition: pEqn.H:72
volScalarField & p
Creates and initialises the face-flux field phi.
dynamicFvMesh & mesh
engineTime & runTime
const dimensionedScalar rhoMin
const dimensionedScalar rhoMax
const pressureControl & pressureControl
compressible::turbulenceModel & turbulence
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
Foam::argList args(argc, argv)
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiReactionThermo > pThermo(psiReactionThermo::New(mesh))
dimensionedScalar initialMass
Definition: createFields.H:57
setRefCell(p, pimple.dict(), pRefCell, pRefValue)