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 
21 const volScalarField& psi = thermo.psi();
22 
23 
24 Info<< "Reading field U\n" << endl;
26 (
27  IOobject
28  (
29  "U",
30  runTime.timeName(),
31  mesh,
32  IOobject::MUST_READ,
33  IOobject::AUTO_WRITE
34  ),
35  mesh
36 );
37 
38 #include "compressibleCreatePhi.H"
39 
40 
41 Info<< "Creating turbulence model\n" << endl;
42 autoPtr<compressible::turbulenceModel> turbulence
43 (
45  (
46  rho,
47  U,
48  phi,
49  thermo
50  )
51 );
52 
53 
54 #include "readGravitationalAcceleration.H"
55 #include "readhRef.H"
56 #include "gh.H"
57 
58 
59 Info<< "Reading field p_rgh\n" << endl;
61 (
62  IOobject
63  (
64  "p_rgh",
65  runTime.timeName(),
66  mesh,
67  IOobject::MUST_READ,
68  IOobject::AUTO_WRITE
69  ),
70  mesh
71 );
72 
73 // Force p_rgh to be consistent with p
74 p_rgh = p - rho*gh;
75 
76 mesh.setFluxRequired(p_rgh.name());
77 
78 Info<< "Creating field dpdt\n" << endl;
80 (
81  IOobject
82  (
83  "dpdt",
84  runTime.timeName(),
85  mesh
86  ),
87  mesh,
88  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
89 );
90 
91 Info<< "Creating field kinetic energy K\n" << endl;
92 volScalarField K("K", 0.5*magSqr(U));
93 
94 label pRefCell = 0;
95 scalar pRefValue = 0.0;
96 
97 if (p_rgh.needReference())
98 {
100  (
101  p,
102  p_rgh,
103  pimple.dict(),
104  pRefCell,
105  pRefValue
106  );
107 
109  (
110  "p",
111  p.dimensions(),
113  );
114 }
115 
pRefCell
label pRefCell
Definition: createFields.H:112
gh.H
pRefValue
scalar pRefValue
Definition: createFields.H:113
pThermo
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< psiThermo > pThermo(psiThermo::New(mesh))
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
Foam::fvc::domainIntegrate
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcVolumeIntegrate.C:86
setRefCell
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
phi
surfaceScalarField & phi
Definition: createFields.H:13
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
rho
rho
Definition: createFields.H:79
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
dpdt
volScalarField & dpdt
Definition: setRegionFluidFields.H:12
K
CGAL::Exact_predicates_exact_constructions_kernel K
Definition: CGALTriangulation3DKernel.H:56
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::argList::executable
const word & executable() const
Name of executable without the path.
Definition: argListI.H:30
Foam::label
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
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::Info
messageStream Info
psi
const volScalarField & psi
Definition: createFields.H:24
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
p
volScalarField & p
Definition: createFields.H:51
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
gh
const volScalarField & gh
Definition: setRegionFluidFields.H:34
compressibleCreatePhi.H
Creates and initialises the face-flux field phi.
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
Foam::getRefCellValue
scalar getRefCellValue(const volScalarField &field, const label refCelli)
Return the current value of field in the reference cell.
Definition: findRefCell.C:130
readhRef.H
initialMass
dimensionedScalar initialMass
Definition: createFields.H:83
pimple
const dictionary & pimple
Definition: readFluidMultiRegionPIMPLEControls.H:1
args
Foam::argList args(argc, argv)
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())
p_rgh
volScalarField & p_rgh
Definition: setRegionFluidFields.H:31
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)