tabulatedSolidTransport.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) 2022 OpenCFD Ltd
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::tabulatedSolidTransport
28 
29 Description
30  Transport properties package using non-uniform tabulated data for
31  thermal conductivity vs temperature.
32 
33 Usage
34 
35  \table
36  Property | Description
37  kappa | Thermal conductivity vs temperature table
38  \endtable
39 
40  Example of the specification of the transport properties:
41  \verbatim
42  transport
43  {
44  kappa
45  (
46  (200 2.56e-5)
47  (350 3.33e-5)
48  (400 4.72e-5)
49  );
50  }
51  \endverbatim
52 
53 SourceFiles
54  tabulatedSolidTransportI.H
55  tabulatedSolidTransport.C
56 
57 See also
58  Foam::thermophysicalFunctions::nonUniformTable
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef tabulatedSolidTransport_H
63 #define tabulatedSolidTransport_H
64 
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 
72 // Forward Declarations
73 template<class Thermo> class tabulatedSolidTransport;
74 
75 template<class Thermo>
76 Ostream& operator<<(Ostream&, const tabulatedSolidTransport<Thermo>&);
77 
78 
79 /*---------------------------------------------------------------------------*\
80  Class tabulatedSolidTransport Declaration
81 \*---------------------------------------------------------------------------*/
82 
83 template<class Thermo>
85 :
86  public Thermo
87 {
88  // Private Data
89 
90  //- Thermal conductivity table [W/m/K]
91  nonUniformTable kappa_;
92 
93 
94  // Private Member Functions
95 
96  //- Construct from components
98  (
99  const Thermo& t,
100  const nonUniformTable& kappaPoly
101  );
102 
103 
104 public:
105 
106  // Constructors
107 
108  //- Construct as named copy
110 
111  //- Construct from dictionary
112  explicit tabulatedSolidTransport(const dictionary& dict);
113 
114  //- Return a clone
116 
117  // Selector from dictionary
119  (
120  const dictionary& dict
121  );
122 
123 
124  // Member Functions
125 
126  //- The instantiated type name
127  static word typeName()
128  {
129  return "tabulated<" + Thermo::typeName() + '>';
130  }
131 
132  //- Is the thermal conductivity isotropic
133  static const bool isotropic = true;
134 
135  //- Dynamic viscosity [kg/m/s]
136  inline scalar mu(const scalar p, const scalar T) const;
137 
138  //- Thermal conductivity [W/m/K]
139  inline scalar kappa(const scalar p, const scalar T) const;
141  //- Thermal conductivity [W/m/K]
142  inline vector Kappa(const scalar p, const scalar T) const;
143 
144  //- Thermal diffusivity of enthalpy [kg/m/s]
145  inline scalar alphah(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 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
An isotropic regularisationRadius (same in all spatial directions)
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/m/s].
vector Kappa(const scalar p, const scalar T) const
Thermal conductivity [W/m/K].
autoPtr< tabulatedSolidTransport > clone() const
Return a clone.
A class for handling words, derived from Foam::string.
Definition: word.H:63
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/m/s].
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/m/K].
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Transport properties package using non-uniform tabulated data for thermal conductivity vs temperature...
static autoPtr< tabulatedSolidTransport > New(const dictionary &dict)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
static word typeName()
The instantiated type name.
volScalarField & p
void write(Ostream &os) const
Write to Ostream.
Namespace for OpenFOAM.