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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::solidThermo
29 
30 Description
31  Fundamental solid thermodynamic properties
32 
33 SourceFiles
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 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class solidThermo Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class solidThermo
54 :
55  public rhoThermo
56 {
57 
58 
59 public:
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,
79  dictionary,
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::solidThermo::New
static autoPtr< solidThermo > New(const fvMesh &, const word &phaseName=word::null)
Return a pointer to a new solidThermo created from.
Definition: solidThermo.C:82
Foam::solidThermo::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, solidThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::solidThermo::read
virtual bool read()
Read thermophysicalProperties dictionary.
Definition: solidThermo.C:139
Foam::solidThermo::rho
virtual tmp< volScalarField > rho() const
Density [kg/m^3].
Definition: solidThermo.C:121
rhoThermo.H
Foam::solidThermo::Kappa
virtual tmp< volVectorField > Kappa() const =0
Thermal conductivity [W/m/K].
Foam::solidThermo
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:52
Foam::rhoThermo
Basic thermodynamic properties based on density.
Definition: rhoThermo.H:55
Foam::solidThermo::~solidThermo
virtual ~solidThermo()
Destructor.
Definition: solidThermo.C:115
Foam::solidThermo::TypeName
TypeName("solidThermo")
Runtime type information.
Foam::solidThermo::isotropic
virtual bool isotropic() const =0
Return true if thermal conductivity is isotropic.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::word::null
static const word null
An empty word.
Definition: word.H:80
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::solidThermo::solidThermo
solidThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: solidThermo.C:47
autoPtr.H
Foam::dictionary::dictName
word dictName() const
The local dictionary name (final part of scoped name)
Definition: dictionaryI.H:60