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]
59  // Named 'rhoThermo' to avoid (potential) conflict with solver density
61 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("solidThermo");
67 
68  // Declare run-time constructor selection tables
70  (
71  autoPtr,
73  fvMesh,
74  (const fvMesh& mesh, const word& phaseName),
75  (mesh, phaseName)
76  );
77 
78  // Declare run-time constructor selection tables
80  (
81  autoPtr,
83  dictionary,
84  (const fvMesh& mesh, const dictionary& dict, const word& phaseName),
85  (mesh, dict, phaseName)
86  );
87 
88 
89  // Constructors
90 
91  //- Construct from mesh and phase name
93  (
94  const fvMesh&,
95  const word& phaseName
96  );
97 
98  //- Construct from mesh, dictionary and phase name
100  (
101  const fvMesh&,
102  const dictionary& dict,
103  const word& phaseName
104  );
105 
106  //- Return a pointer to a new solidThermo created from
107  // the solidThermophysicalProperties dictionary
109  (
110  const fvMesh&,
111  const word& phaseName=word::null
112  );
113 
114  //- Return a pointer to a new solidThermo created from
115  // local dictionary
117  (
118  const fvMesh&,
119  const dictionary&,
120  const word& phaseName=word::null
121  );
122 
123 
124  //- Destructor
125  virtual ~solidThermo();
126 
127 
128  // Member Functions
129 
130  // Fields derived from thermodynamic state variables
131 
132  //- Density [kg/m^3]
133  virtual tmp<volScalarField> rho() const;
134 
135  //- Density for patch [kg/m^3]
136  virtual tmp<scalarField> rho(const label patchi) const;
137 
138  //- Return non-const access to the local density field [kg/m^3]
139  virtual volScalarField& rho();
140 
141  //- Thermal conductivity [W/m/K]
142  virtual tmp<volVectorField> Kappa() const = 0;
143 
144  //- Return true if thermal conductivity is isotropic
145  virtual bool isotropic() const = 0;
146 
147 
148  // Per patch calculation
149 
150  //- Anisotropic thermal conductivity [W/m/K]
151  virtual tmp<vectorField> Kappa
152  (
153  const label patchi
154  ) const = 0;
155 
156 
157  // I-O
158 
159  //- Read thermophysicalProperties dictionary
160  virtual bool read();
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
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.
dynamicFvMesh & mesh
virtual bool isotropic() const =0
Return true if thermal conductivity is isotropic.
volScalarField rho_
Density field [kg/m^3].
Definition: solidThermo.H:59
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))