solidThermo.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2017 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::solidThermo
29
30Description
31 Fundamental solid thermodynamic properties
32
33SourceFiles
34 solidThermo.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef solidThermo_H
39#define solidThermo_H
40
41#include "rhoThermo.H"
42#include "autoPtr.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class solidThermo Declaration
51\*---------------------------------------------------------------------------*/
53class solidThermo
54:
55 public rhoThermo
56{
57
58
59public:
60
61 //- Runtime type information
62 TypeName("solidThermo");
63
64 // Declare run-time constructor selection tables
66 (
67 autoPtr,
69 fvMesh,
70 (const fvMesh& mesh, const word& phaseName),
71 (mesh, phaseName)
72 );
73
74 // Declare run-time constructor selection tables
76 (
77 autoPtr,
80 (const fvMesh& mesh, const dictionary& dict, const word& phaseName),
81 (mesh, dict, phaseName)
82 );
83
84 //- Declare run-time constructor selection table for dictionary based
86 (
87 autoPtr,
89 fvMeshDictPhase,
90 (const fvMesh& mesh, const word& phaseName, const word& dictName),
91 (mesh, phaseName, dictName)
92 );
93
94
95 // Constructors
96
97 //- Construct from mesh and phase name
99 (
100 const fvMesh&,
101 const word& phaseName
102 );
103
104 //- Construct from mesh, dictionary and phase name
106 (
107 const fvMesh&,
108 const dictionary& dict,
109 const word& phaseName
110 );
111
112 //- Construct from mesh with dictionary name and without
113 // constructing T phaseName
115 (
116 const fvMesh&,
117 const word& phaseName,
118 const word& dictionaryName
119 );
120
121 //- Return a pointer to a new solidThermo created from
122 // the solidThermophysicalProperties dictionary
124 (
125 const fvMesh&,
126 const word& phaseName=word::null
127 );
128
129 //- Return a pointer to a new solidThermo created from
130 // local dictionary
132 (
133 const fvMesh&,
134 const dictionary&,
135 const word& phaseName=word::null
136 );
137
138
139 //- Return a pointer to a new solidThermo created from
140 // local dictionary and phase name
142 (
143 const fvMesh&,
144 const word& phaseName,
145 const word& dictName
146 );
147
148
149 //- Destructor
150 virtual ~solidThermo();
151
152
153 // Member functions
154
155 // Fields derived from thermodynamic state variables
156
157 //- Density [kg/m^3]
158 virtual tmp<volScalarField> rho() const;
159
160 //- Density for patch [kg/m^3]
161 virtual tmp<scalarField> rho(const label patchi) const;
162
163 //- Return non-const access to the local density field [kg/m^3]
164 virtual volScalarField& rho();
165
166 //- Thermal conductivity [W/m/K]
167 virtual tmp<volVectorField> Kappa() const = 0;
168
169 //- Return true if thermal conductivity is isotropic
170 virtual bool isotropic() const = 0;
171
172
173 // Per patch calculation
174
175 //- Anisotropic thermal conductivity [W/m/K]
176 virtual tmp<vectorField> Kappa
177 (
178 const label patchi
179 ) const = 0;
180
181
182 // I-O
183
184 //- Read thermophysicalProperties dictionary
185 virtual bool read();
186};
187
188
189// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190
191} // End namespace Foam
192
193// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194
195#endif
196
197// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
static const word dictName
Definition: basicThermo.H:256
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Basic thermodynamic properties based on density.
Definition: rhoThermo.H:58
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:55
virtual bool isotropic() const =0
Return true if thermal conductivity is isotropic.
declareRunTimeSelectionTable(autoPtr, solidThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
TypeName("solidThermo")
Runtime type information.
virtual ~solidThermo()
Destructor.
Definition: solidThermo.C:115
declareRunTimeSelectionTable(autoPtr, solidThermo, dictionary,(const fvMesh &mesh, const dictionary &dict, const word &phaseName),(mesh, dict, phaseName))
static autoPtr< solidThermo > New(const fvMesh &, const word &phaseName=word::null)
Return a pointer to a new solidThermo created from.
Definition: solidThermo.C:82
virtual tmp< volScalarField > rho() const
Density [kg/m^3].
Definition: solidThermo.C:121
declareRunTimeSelectionTable(autoPtr, solidThermo, fvMeshDictPhase,(const fvMesh &mesh, const word &phaseName, const word &dictName),(mesh, phaseName, dictName))
Declare run-time constructor selection table for dictionary based.
virtual tmp< volVectorField > Kappa() const =0
Thermal conductivity [W/m/K].
virtual tmp< vectorField > Kappa(const label patchi) const =0
Anisotropic thermal conductivity [W/m/K].
virtual bool read()
Read thermophysicalProperties dictionary.
Definition: solidThermo.C:139
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
Namespace for OpenFOAM.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73