Forward compatibility: flex
[foam-extend-3.2.git] / src / thermophysicalModels / specie / transport / polynomial / polynomialTransport.H
blob4b9a722e4a4764fc8c9e125376ca9503e25bf414
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::polynomialTransport
27 Description
28     Transport package using polynomial functions for mu and kappa
30 SourceFiles
31     polynomialTransportI.H
32     polynomialTransport.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef polynomialTransport_H
37 #define polynomialTransport_H
39 #include "PolynomialTemplate.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 // Forward declaration of friend functions and operators
48 template<class Thermo, int PolySize> class polynomialTransport;
50 template<class Thermo, int PolySize>
51 inline polynomialTransport<Thermo, PolySize> operator+
53     const polynomialTransport<Thermo, PolySize>&,
54     const polynomialTransport<Thermo, PolySize>&
57 template<class Thermo, int PolySize>
58 inline polynomialTransport<Thermo, PolySize> operator-
60     const polynomialTransport<Thermo, PolySize>&,
61     const polynomialTransport<Thermo, PolySize>&
64 template<class Thermo, int PolySize>
65 inline polynomialTransport<Thermo, PolySize> operator*
67     const scalar,
68     const polynomialTransport<Thermo, PolySize>&
71 template<class Thermo, int PolySize>
72 inline polynomialTransport<Thermo, PolySize> operator==
74     const polynomialTransport<Thermo, PolySize>&,
75     const polynomialTransport<Thermo, PolySize>&
78 template<class Thermo, int PolySize>
79 Ostream& operator<<
81     Ostream&,
82     const polynomialTransport<Thermo, PolySize>&
86 /*---------------------------------------------------------------------------*\
87                      Class polynomialTransport Declaration
88 \*---------------------------------------------------------------------------*/
90 template<class Thermo, int PolySize>
91 class polynomialTransport
93     public Thermo
95     // Private data
97         //- Dynamic viscosity
98         //  Note: input in [Pa.s], but internally uses [Pa.s/kmol]
99         Polynomial<PolySize> muPolynomial_;
101         //- Thermal conductivity
102         //  Note: input in [W/m/K], but internally uses [W/m/K/kmol]
103         Polynomial<PolySize> kappaPolynomial_;
106     // Private member functions
108         //- Construct from components
109         inline polynomialTransport
110         (
111             const Thermo& t,
112             const Polynomial<PolySize>& muPoly,
113             const Polynomial<PolySize>& kappaPoly
114         );
117 public:
119     // Constructors
121         //- Construct copy
122         inline polynomialTransport(const polynomialTransport&);
124         //- Construct as named copy
125         inline polynomialTransport(const word&, const polynomialTransport&);
127         //- Construct from Istream
128         polynomialTransport(Istream& is);
130         //- Construct and return a clone
131         inline autoPtr<polynomialTransport> clone() const;
133         // Selector from Istream
134         inline static autoPtr<polynomialTransport> New(Istream& is);
137     // Member functions
139         //- Dynamic viscosity [kg/ms]
140         inline scalar mu(const scalar T) const;
142         //- Thermal conductivity [W/mK]
143         inline scalar kappa(const scalar T) const;
145         //- Thermal diffusivity for enthalpy [kg/ms]
146         inline scalar alpha(const scalar T) const;
148         // Species diffusivity
149         //inline scalar D(const scalar T) const;
152     // Member operators
154         inline polynomialTransport& operator=(const polynomialTransport&);
155         inline void operator+=(const polynomialTransport&);
156         inline void operator-=(const polynomialTransport&);
157         inline void operator*=(const scalar);
160     // Friend operators
162         friend polynomialTransport operator+ <Thermo, PolySize>
163         (
164             const polynomialTransport&,
165             const polynomialTransport&
166         );
168         friend polynomialTransport operator- <Thermo, PolySize>
169         (
170             const polynomialTransport&,
171             const polynomialTransport&
172         );
174         friend polynomialTransport operator* <Thermo, PolySize>
175         (
176             const scalar,
177             const polynomialTransport&
178         );
180         friend polynomialTransport operator== <Thermo, PolySize>
181         (
182             const polynomialTransport&,
183             const polynomialTransport&
184         );
187     // Ostream Operator
189         friend Ostream& operator<< <Thermo, PolySize>
190         (
191             Ostream&,
192             const polynomialTransport&
193         );
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace Foam
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 #include "polynomialTransportI.H"
205 #ifdef NoRepository
206 #   include "polynomialTransport.C"
207 #endif
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 #endif
213 // ************************************************************************* //