createFields.H
Go to the documentation of this file.
1Info<< "Reading thermophysical properties\n" << endl;
2
3autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
4rhoThermo& thermo = pThermo();
5thermo.validate(args.executable(), "h", "e");
6
7volScalarField rho
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
20volScalarField& p = thermo.p();
21
22Info<< "Reading field U\n" << endl;
23volVectorField U
24(
25 IOobject
26 (
27 "U",
28 runTime.timeName(),
29 mesh,
30 IOobject::MUST_READ,
31 IOobject::AUTO_WRITE
32 ),
33 mesh
34);
35
37
38Info<< "Creating turbulence model\n" << endl;
39autoPtr<compressible::turbulenceModel> turbulence
40(
41 compressible::turbulenceModel::New
42 (
43 rho,
44 U,
45 phi,
46 thermo
47 )
48);
49
50
51#include "readGravitationalAcceleration.H"
52#include "readhRef.H"
53#include "gh.H"
54
55
56Info<< "Reading field p_rgh\n" << endl;
57volScalarField p_rgh
58(
59 IOobject
60 (
61 "p_rgh",
62 runTime.timeName(),
63 mesh,
64 IOobject::MUST_READ,
65 IOobject::AUTO_WRITE
66 ),
67 mesh
68);
69
70// Force p_rgh to be consistent with p
71p_rgh = p - rho*gh;
72
73label pRefCell = 0;
74scalar pRefValue = 0.0;
76(
77 p,
78 p_rgh,
79 simple.dict(),
82);
83
84mesh.setFluxRequired(p_rgh.name());
85
86dimensionedScalar initialMass = fvc::domainIntegrate(rho);
87dimensionedScalar totalVolume = sum(mesh.V());
88
89#include "createMRF.H"
91
92const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, simple.dict());
93const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, simple.dict());
94
95#include "createFvOptions.H"
volScalarField & p_rgh
surfaceScalarField & phi
const scalar pRefValue
const label pRefCell
const volScalarField & gh
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
compressible::turbulenceModel & turbulence
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
const dictionary & simple
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)