1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::polynomialTransport
29 Transport package using polynomial functions for mu and kappa
32 polynomialTransportI.H
35 \*---------------------------------------------------------------------------*/
37 #ifndef polynomialTransport_H
38 #define polynomialTransport_H
40 #include <OpenFOAM/Polynomial.H>
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward declaration of friend functions and operators
49 template<class Thermo, int PolySize> class polynomialTransport;
51 template<class Thermo, int PolySize>
52 inline polynomialTransport<Thermo, PolySize> operator+
54 const polynomialTransport<Thermo, PolySize>&,
55 const polynomialTransport<Thermo, PolySize>&
58 template<class Thermo, int PolySize>
59 inline polynomialTransport<Thermo, PolySize> operator-
61 const polynomialTransport<Thermo, PolySize>&,
62 const polynomialTransport<Thermo, PolySize>&
65 template<class Thermo, int PolySize>
66 inline polynomialTransport<Thermo, PolySize> operator*
69 const polynomialTransport<Thermo, PolySize>&
72 template<class Thermo, int PolySize>
73 inline polynomialTransport<Thermo, PolySize> operator==
75 const polynomialTransport<Thermo, PolySize>&,
76 const polynomialTransport<Thermo, PolySize>&
79 template<class Thermo, int PolySize>
83 const polynomialTransport<Thermo, PolySize>&
87 /*---------------------------------------------------------------------------*\
88 Class polynomialTransport Declaration
89 \*---------------------------------------------------------------------------*/
91 template<class Thermo, int PolySize>
92 class polynomialTransport
99 Polynomial<PolySize> muPolynomial_;
101 //- Thermal conductivity
102 Polynomial<PolySize> kappaPolynomial_;
105 // Private member functions
107 //- Construct from components
108 inline polynomialTransport
111 const Polynomial<PolySize>& muPoly,
112 const Polynomial<PolySize>& kappaPoly
120 //- Construct as named copy
121 inline polynomialTransport(const word&, const polynomialTransport&);
123 //- Construct from Istream
124 polynomialTransport(Istream& is);
126 //- Construct and return a clone
127 inline autoPtr<polynomialTransport> clone() const;
129 // Selector from Istream
130 inline static autoPtr<polynomialTransport> New(Istream& is);
135 //- Dynamic viscosity [kg/ms]
136 inline scalar mu(const scalar T) const;
138 //- Thermal conductivity [W/mK]
139 inline scalar kappa(const scalar T) const;
141 //- Thermal diffusivity for enthalpy [kg/ms]
142 inline scalar alpha(const scalar T) const;
144 // Species diffusivity
145 //inline scalar D(const scalar T) const;
150 inline polynomialTransport& operator=(const polynomialTransport&);
155 friend polynomialTransport operator+ <Thermo, PolySize>
157 const polynomialTransport&,
158 const polynomialTransport&
161 friend polynomialTransport operator- <Thermo, PolySize>
163 const polynomialTransport&,
164 const polynomialTransport&
167 friend polynomialTransport operator* <Thermo, PolySize>
170 const polynomialTransport&
173 friend polynomialTransport operator== <Thermo, PolySize>
175 const polynomialTransport&,
176 const polynomialTransport&
182 friend Ostream& operator<< <Thermo, PolySize>
185 const polynomialTransport&
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 } // End namespace Foam
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 #include "polynomialTransportI.H"
199 # include "polynomialTransport.C"
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 // ************************ vim: set sw=4 sts=4 et: ************************ //