icoTabulatedTransport.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) 2020-2021 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::icoTabulatedTransport
26 
27 Description
28  Transport properties package using non-uniformly-spaced tabulated data for
29  viscosity and thermal conductivity vs temperature.
30 
31 Usage
32  \table
33  Property | Description
34  mu | Dynamic viscosity vs temperature table
35  kappa | Thermal conductivity vs temperature table
36  \endtable
37 
38  Example of the specification of the transport properties:
39  \verbatim
40  transport
41  {
42  mu
43  {
44  values
45  (
46  (200 1.82e-05)
47  (350 2.61e-05)
48  (400 3.93e-05)
49  );
50  }
51 
52  kappa
53  {
54  values
55  (
56  (200 2.56e-5)
57  (350 3.33e-5)
58  (400 4.72e-5)
59  );
60  }
61  }
62  \endverbatim
63 
64 SourceFiles
65  icoTabulatedTransportI.H
66  icoTabulatedTransport.C
67 
68 See also
69  Foam::Function1s::NonUniformTable
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef icoTabulatedTransport_H
74 #define icoTabulatedTransport_H
75 
76 #include "NonUniformTable1.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 
83 // Forward declaration of friend functions and operators
84 
85 template<class Thermo> class icoTabulatedTransport;
86 
87 template<class Thermo>
88 Ostream& operator<<(Ostream&, const icoTabulatedTransport<Thermo>&);
89 
90 
91 /*---------------------------------------------------------------------------*\
92  Class icoTabulatedTransport Declaration
93 \*---------------------------------------------------------------------------*/
94 
95 template<class Thermo>
97 :
98  public Thermo
99 {
101 
102 
103  // Private Data
104 
105  //- Dynamic viscosity table [Pa.s]
106  nonUniformTable mu_;
107 
108  //- Thermal conductivity table [W/m/K]
109  nonUniformTable kappa_;
110 
111 
112  // Private Member Functions
113 
114  //- Construct from components
115  inline icoTabulatedTransport
116  (
117  const Thermo& t,
118  const nonUniformTable& mu,
119  const nonUniformTable& kappa
120  );
121 
122 
123 public:
124 
125  // Constructors
126 
127  //- Construct as named copy
128  inline icoTabulatedTransport(const word&, const icoTabulatedTransport&);
129 
130  //- Construct from dictionary
132 
133  //- Construct and return a clone
134  inline autoPtr<icoTabulatedTransport> clone() const;
135 
136  // Selector from dictionary
137  inline static autoPtr<icoTabulatedTransport> New
138  (
139  const dictionary& dict
140  );
141 
142 
143  // Member Functions
144 
145  //- Return the instantiated type name
146  static word typeName()
147  {
148  return "tabulated<" + Thermo::typeName() + '>';
149  }
150 
151  //- Dynamic viscosity [kg/m/s]
152  inline scalar mu(const scalar p, const scalar T) const;
153 
154  //- Thermal conductivity [W/m/K]
155  inline scalar kappa(const scalar p, const scalar T) const;
156 
157  //- Write to Ostream
158  void write(Ostream& os) const;
159 
160 
161  // Ostream Operator
162 
163  friend Ostream& operator<< <Thermo>
164  (
165  Ostream&,
166  const icoTabulatedTransport&
167  );
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #include "icoTabulatedTransportI.H"
178 
179 #ifdef NoRepository
180  #include "icoTabulatedTransport.C"
181 #endif
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #endif
186 
187 // ************************************************************************* //
dictionary dict
static autoPtr< icoTabulatedTransport > New(const dictionary &dict)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Transport properties package using non-uniformly-spaced tabulated data for viscosity and thermal cond...
autoPtr< icoTabulatedTransport > clone() const
Construct and return a clone.
A class for handling words, derived from string.
Definition: word.H:59
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:54
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/m/s].
void write(Ostream &os) const
Write to Ostream.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField & p
Namespace for OpenFOAM.
static word typeName()
Return the instantiated type name.