solidThermo.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "solidThermo.H"
27 #include "fvMesh.H"
28 
29 
30 /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
31 
32 namespace Foam
33 {
34  defineTypeNameAndDebug(solidThermo, 0);
35  defineRunTimeSelectionTable(solidThermo, fvMesh);
36  defineRunTimeSelectionTable(solidThermo, dictionary);
37 }
38 
39 
40 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
41 
43 (
44  const fvMesh& mesh,
45  const word& phaseName
46 )
47 :
48  basicThermo(mesh, phaseName),
49  rho_
50  (
51  IOobject
52  (
53  phasePropertyName("rho"),
54  mesh.time().timeName(),
55  mesh,
58  ),
59  mesh,
61  )
62 {}
63 
64 
66 (
67  const fvMesh& mesh,
68  const dictionary& dict,
69  const word& phaseName
70 )
71 :
72  basicThermo(mesh, dict, phaseName),
73  rho_
74  (
75  IOobject
76  (
77  phasePropertyName("rho"),
78  mesh.time().timeName(),
79  mesh,
82  ),
83  mesh,
85  )
86 {}
87 
88 
89 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
90 
92 (
93  const fvMesh& mesh,
94  const word& phaseName
95 )
96 {
97  return basicThermo::New<solidThermo>(mesh, phaseName);
98 }
99 
100 
102 (
103  const fvMesh& mesh,
104  const dictionary& dict,
105  const word& phaseName
106 )
107 {
108  return basicThermo::New<solidThermo>(mesh, dict, phaseName);
109 }
110 
111 
112 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
113 
115 {}
116 
117 
118 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
119 
121 {
122  return rho_;
123 }
124 
125 
127 {
128  return rho_.boundaryField()[patchi];
129 }
130 
131 
133 {
134  return rho_;
135 }
136 
137 
139 {
140  return regIOobject::read();
141 }
142 
143 
144 // ************************************************************************* //
dictionary dict
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
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:52
virtual bool read()
Read object.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual tmp< volScalarField > rho() const
Density [kg/m^3].
Definition: solidThermo.C:120
static autoPtr< solidThermo > New(const fvMesh &, const word &phaseName=word::null)
Return a pointer to a new solidThermo created from.
Definition: solidThermo.C:92
virtual bool read()
Read thermophysicalProperties dictionary.
Definition: solidThermo.C:138
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Definition: Time.C:622
virtual ~solidThermo()
Destructor.
Definition: solidThermo.C:114
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:239
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
solidThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: solidThermo.C:43
defineTypeNameAndDebug(combustionModel, 0)
const dimensionSet dimDensity
label patchi
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.