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 | Copyright (C) 2011-2013 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 Class
25  Foam::solidThermo
26 
27 Description
28  Fundamental solid thermodynamic properties
29 
30 SourceFiles
31  solidThermo.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef solidThermo_H
36 #define solidThermo_H
37 
38 #include "volFields.H"
39 #include "runTimeSelectionTables.H"
40 #include "fvMesh.H"
41 #include "IOdictionary.H"
42 #include "autoPtr.H"
43 #include "basicThermo.H"
44 #include "autoPtr.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class solidThermo Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class solidThermo
56 :
57  public basicThermo
58 {
59 
60 protected:
61 
62  // Protected data
63 
64  //- Density field [kg/m^3]
65  // Named 'rhoThermo' to avoid (potential) conflict with solver density
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("solidThermo");
73 
74  // Declare run-time constructor selection tables
76  (
77  autoPtr,
79  fvMesh,
80  (const fvMesh& mesh, const word& phaseName),
81  (mesh, phaseName)
82  );
83 
84  // Declare run-time constructor selection tables
86  (
87  autoPtr,
89  dictionary,
90  (const fvMesh& mesh, const dictionary& dict, const word& phaseName),
91  (mesh, dict, phaseName)
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  //- Return a pointer to a new solidThermo created from
113  // the solidThermophysicalProperties dictionary
115  (
116  const fvMesh&,
117  const word& phaseName=word::null
118  );
119 
120  //- Return a pointer to a new solidThermo created from
121  // local dictionary
123  (
124  const fvMesh&,
125  const dictionary&,
126  const word& phaseName=word::null
127  );
128 
129 
130  //- Destructor
131  virtual ~solidThermo();
132 
133 
134  // Member functions
135 
136  // Fields derived from thermodynamic state variables
137 
138  //- Density [kg/m^3]
139  virtual tmp<volScalarField> rho() const;
140 
141  //- Density for patch [kg/m^3]
142  virtual tmp<scalarField> rho(const label patchi) const;
143 
144  //- Return non-const access to the local density field [kg/m^3]
145  virtual volScalarField& rho();
146 
147  //- Thermal conductivity [W/m/K]
148  virtual tmp<volVectorField> Kappa() const = 0;
149 
150  //- Return true if thermal conductivity is isotropic
151  virtual bool isotropic() const = 0;
152 
153 
154  // Per patch calculation
155 
156  //- Anisotropic thermal conductivity [W/m/K]
157  virtual tmp<vectorField> Kappa
158  (
159  const label patchI
160  ) const = 0;
161 
162 
163  // I-O
164 
165  //- Read thermophysicalProperties dictionary
166  virtual bool read();
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
virtual tmp< volScalarField > rho() const
Density [kg/m^3].
Definition: solidThermo.C:120
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual bool isotropic() const =0
Return true if thermal conductivity is isotropic.
Macros to ease declaration of run-time selection tables.
solidThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: solidThermo.C:43
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:52
static autoPtr< solidThermo > New(const fvMesh &, const word &phaseName=word::null)
Return a pointer to a new solidThermo created from.
Definition: solidThermo.C:92
A class for handling words, derived from string.
Definition: word.H:59
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
TypeName("solidThermo")
Runtime type information.
dynamicFvMesh & mesh
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
virtual bool read()
Read thermophysicalProperties dictionary.
Definition: solidThermo.C:138
dictionary dict
virtual tmp< volVectorField > Kappa() const =0
Thermal conductivity [W/m/K].
label patchi
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:54
volScalarField rho_
Density field [kg/m^3].
Definition: solidThermo.H:65
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
A class for managing temporary objects.
Definition: PtrList.H:118
virtual ~solidThermo()
Destructor.
Definition: solidThermo.C:114
declareRunTimeSelectionTable(autoPtr, solidThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
static const word null
An empty word.
Definition: word.H:77