tabulatedSolidTransport.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) 2021-2023 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::tabulatedSolidTransport
26 
27 Description
28  Transport properties package using non-uniformly-spaced tabulated data for
29  thermal conductivity vs temperature.
30 
31 Usage
32  \table
33  Property | Description
34  kappa | Thermal conductivity vs temperature table
35  \endtable
36 
37  Example of the specification of the transport properties:
38  \verbatim
39  transport
40  {
41  kappa
42  {
43  values
44  (
45  (200 380)
46  (350 400)
47  (400 450)
48  );
49  }
50  }
51  \endverbatim
52 
53 SourceFiles
54  tabulatedSolidTransportI.H
55  tabulatedSolidTransport.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef tabulatedSolidTransport_H
60 #define tabulatedSolidTransport_H
61 
62 #include "NonUniformTable1.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 template<class Thermo> class tabulatedSolidTransport;
70 
71 template<class Thermo>
72 inline tabulatedSolidTransport<Thermo> operator*
73 (
74  const scalar,
75  const tabulatedSolidTransport<Thermo>&
76 );
77 
78 template<class Thermo>
79 Ostream& operator<<
80 (
81  Ostream&,
83 );
84 
85 
86 /*---------------------------------------------------------------------------*\
87  Class tabulatedSolidTransport Declaration
88 \*---------------------------------------------------------------------------*/
89 
90 template<class Thermo>
92 :
93  public Thermo
94 {
95  typedef Function1s::NonUniformTable<scalar> nonUniformTable;
96 
97 
98  // Private Data
99 
100  //- Thermal conductivity table [W/m/K]
101  nonUniformTable kappa_;
102 
103 
104 public:
105 
106  // Constructors
107 
108  //- Construct from components
110  (
111  const Thermo& t,
112  const nonUniformTable& kappa
113  );
114 
115  //- Construct as named copy
117  (
118  const word&,
120  );
121 
122  //- Construct from name and dictionary
124 
125  //- Construct and return a clone
127 
128 
129  // Member Functions
130 
131  //- Return the instantiated type name
132  static word typeName()
133  {
134  return "tabulatedSolid<" + Thermo::typeName() + '>';
135  }
136 
137  //- Is the thermal conductivity isotropic
138  static const bool isotropic = true;
139 
140  //- Isotropic thermal conductivity [W/m/K]
141  inline scalar kappa(const scalar p, const scalar T) const;
142 
143  //- Anisotropic thermal conductivity [W/m/K]
144  // Not implemented
145  inline vector Kappa(const scalar p, const scalar T) const;
146 
147  //- Write to Ostream
148  void write(Ostream& os) const;
149 
150 
151  // Ostream Operator
152 
153  friend Ostream& operator<< <Thermo>
154  (
155  Ostream&,
157  );
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
168 
169 #ifdef NoRepository
170  #include "tabulatedSolidTransport.C"
171 #endif
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Transport properties package using non-uniformly-spaced tabulated data for thermal conductivity vs te...
vector Kappa(const scalar p, const scalar T) const
Anisotropic thermal conductivity [W/m/K].
scalar kappa(const scalar p, const scalar T) const
Isotropic thermal conductivity [W/m/K].
static word typeName()
Return the instantiated type name.
static const bool isotropic
Is the thermal conductivity isotropic.
void write(Ostream &os) const
Write to Ostream.
autoPtr< tabulatedSolidTransport > clone() const
Construct and return a clone.
tabulatedSolidTransport(const Thermo &t, const nonUniformTable &kappa)
Construct from components.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict
volScalarField & p