1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
25 Foam::polynomialTransport
28 Transport package using polynomial functions for mu and kappa
31 polynomialTransportI.H
34 \*---------------------------------------------------------------------------*/
36 #ifndef polynomialTransport_H
37 #define polynomialTransport_H
39 #include "PolynomialTemplate.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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*
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>
82 const polynomialTransport<Thermo, PolySize>&
86 /*---------------------------------------------------------------------------*\
87 Class polynomialTransport Declaration
88 \*---------------------------------------------------------------------------*/
90 template<class Thermo, int PolySize>
91 class polynomialTransport
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
112 const Polynomial<PolySize>& muPoly,
113 const Polynomial<PolySize>& kappaPoly
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);
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;
154 inline polynomialTransport& operator=(const polynomialTransport&);
155 inline void operator+=(const polynomialTransport&);
156 inline void operator-=(const polynomialTransport&);
157 inline void operator*=(const scalar);
162 friend polynomialTransport operator+ <Thermo, PolySize>
164 const polynomialTransport&,
165 const polynomialTransport&
168 friend polynomialTransport operator- <Thermo, PolySize>
170 const polynomialTransport&,
171 const polynomialTransport&
174 friend polynomialTransport operator* <Thermo, PolySize>
177 const polynomialTransport&
180 friend polynomialTransport operator== <Thermo, PolySize>
182 const polynomialTransport&,
183 const polynomialTransport&
189 friend Ostream& operator<< <Thermo, PolySize>
192 const polynomialTransport&
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace Foam
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 #include "polynomialTransportI.H"
206 # include "polynomialTransport.C"
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 // ************************************************************************* //