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-2022 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 /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
30 
31 namespace Foam
32 {
35 }
36 
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 (
42  const fvMesh& mesh,
43  const word& phaseName
44 )
45 :
46  p_
47  (
48  IOobject
49  (
50  phasePropertyName("p", phaseName),
51  mesh.time().name(),
52  mesh,
53  IOobject::NO_READ,
54  IOobject::NO_WRITE
55  ),
56  dimensionedScalar(phasePropertyName("p", phaseName), dimPressure, NaN)
57  ),
58  rho_
59  (
60  IOobject
61  (
62  phasePropertyName("rho", phaseName),
63  mesh.time().name(),
64  mesh,
65  IOobject::NO_READ,
66  IOobject::NO_WRITE
67  ),
68  mesh,
70  )
71 {}
72 
73 
75 (
76  const fvMesh& mesh,
77  const dictionary& dict,
78  const word& phaseName
79 )
80 :
82 {}
83 
84 
85 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
86 
88 (
89  const fvMesh& mesh,
90  const word& phaseName
91 )
92 {
93  return basicThermo::New<solidThermo>(mesh, phaseName);
94 }
95 
96 
97 // Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
98 // (
99 // const fvMesh& mesh,
100 // const dictionary& dict,
101 // const word& phaseName
102 // )
103 // {
104 // return basicThermo::New<solidThermo>(mesh, dict, phaseName);
105 // }
106 
107 
108 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
109 
111 {}
112 
113 
115 {}
116 
117 
118 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
119 
121 {
122  return rho_;
123 }
124 
125 
127 (
128  const label patchi
129 ) const
130 {
131  return rho_.boundaryField()[patchi];
132 }
133 
134 
136 {
137  return rho_;
138 }
139 
140 
141 // ************************************************************************* //
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
virtual const fvMesh & mesh() const =0
Return const access to the mesh.
virtual const word & phaseName() const =0
Phase name.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
implementation(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: solidThermo.C:41
virtual ~implementation()
Destructor.
Definition: solidThermo.C:114
virtual tmp< volScalarField > rho() const
Density [kg/m^3].
Definition: solidThermo.C:120
Base-class for solid thermodynamic properties.
Definition: solidThermo.H:56
virtual ~solidThermo()
Destructor.
Definition: solidThermo.C:110
static autoPtr< solidThermo > New(const fvMesh &, const word &phaseName=word::null)
Standard selection based on fvMesh.
Definition: solidThermo.C:88
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
label patchi
static Type NaN()
Return a primitive with all components set to NaN.
Namespace for OpenFOAM.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
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
const dimensionSet dimPressure
const dimensionSet dimDensity
defineTypeNameAndDebug(combustionModel, 0)
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
dictionary dict