All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
solidThermo.H
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 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 "basicThermo.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class solidThermo Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class solidThermo
50 :
51  public basicThermo
52 {
53 
54 protected:
55 
56  // Protected data
57 
58  //- Density field [kg/m^3]
60 
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("solidThermo");
66 
67  // Declare run-time constructor selection tables
69  (
70  autoPtr,
72  fvMesh,
73  (const fvMesh& mesh, const word& phaseName),
74  (mesh, phaseName)
75  );
76 
77  // Declare run-time constructor selection tables
79  (
80  autoPtr,
82  dictionary,
83  (const fvMesh& mesh, const dictionary& dict, const word& phaseName),
84  (mesh, dict, phaseName)
85  );
86 
87 
88  // Constructors
89 
90  //- Construct from mesh and phase name
92  (
93  const fvMesh&,
94  const word& phaseName
95  );
96 
97  //- Construct from mesh, dictionary and phase name
99  (
100  const fvMesh&,
101  const dictionary& dict,
102  const word& phaseName
103  );
104 
105  //- Return a pointer to a new solidThermo created from
106  // the solidThermophysicalProperties dictionary
108  (
109  const fvMesh&,
110  const word& phaseName = word::null
111  );
112 
113  //- Return a pointer to a new solidThermo created from
114  // local dictionary
116  (
117  const fvMesh&,
118  const dictionary&,
119  const word& phaseName = word::null
120  );
121 
122 
123  //- Destructor
124  virtual ~solidThermo();
125 
126 
127  // Member Functions
128 
129  // Fields derived from thermodynamic state variables
130 
131  //- Density [kg/m^3]
132  virtual tmp<volScalarField> rho() const;
133 
134  //- Density for patch [kg/m^3]
135  virtual tmp<scalarField> rho(const label patchi) const;
136 
137  //- Return non-const access to the local density field [kg/m^3]
138  virtual volScalarField& rho();
139 
140  //- Thermal conductivity [W/m/K]
141  virtual tmp<volVectorField> Kappa() const = 0;
142 
143  //- Return true if thermal conductivity is isotropic
144  virtual bool isotropic() const = 0;
145 
146 
147  // Per patch calculation
148 
149  //- Anisotropic thermal conductivity [W/m/K]
150  virtual tmp<vectorField> Kappa
151  (
152  const label patchi
153  ) const = 0;
154 
155 
156  // I-O
157 
158  //- Read thermophysicalProperties dictionary
159  virtual bool read();
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
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
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
virtual tmp< volVectorField > Kappa() const =0
Thermal conductivity [W/m/K].
virtual ~solidThermo()
Destructor.
Definition: solidThermo.C:114
TypeName("solidThermo")
Runtime type information.
virtual bool isotropic() const =0
Return true if thermal conductivity is isotropic.
volScalarField rho_
Density field [kg/m^3].
Definition: solidThermo.H:58
A class for handling words, derived from string.
Definition: word.H:59
static const word null
An empty word.
Definition: word.H:77
solidThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: solidThermo.C:43
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:48
label patchi
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.
declareRunTimeSelectionTable(autoPtr, solidThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))