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