initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / specie / transport / const / constTransport.H
blob78eefd0a6d11c62822cb89f8fd85ce120d7ba4c3
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::constTransport
28 Description
29     Constant properties Transport package.
30     Templated into a given thermodynamics package (needed for thermal
31     conductivity).
33 SourceFiles
34     constTransportI.H
35     constTransport.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef constTransport_H
40 #define constTransport_H
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Forward declaration of friend functions and operators
49 template<class thermo> class constTransport;
51 template<class thermo>
52 inline constTransport<thermo> operator+
54     const constTransport<thermo>&,
55     const constTransport<thermo>&
58 template<class thermo>
59 inline constTransport<thermo> operator-
61     const constTransport<thermo>&,
62     const constTransport<thermo>&
65 template<class thermo>
66 inline constTransport<thermo> operator*
68     const scalar,
69     const constTransport<thermo>&
72 template<class thermo>
73 inline constTransport<thermo> operator==
75     const constTransport<thermo>&,
76     const constTransport<thermo>&
79 template<class thermo>
80 Ostream& operator<<
82     Ostream&,
83     const constTransport<thermo>&
87 /*---------------------------------------------------------------------------*\
88                            Class constTransport Declaration
89 \*---------------------------------------------------------------------------*/
91 template<class thermo>
92 class constTransport
94     public thermo
96     // Private data
98         //- Constant viscosity and reciprocal Prandtl Number.
99         scalar Mu, rPr;
102     // Private member functions
104         //- Construct from components
105         inline constTransport
106         (
107             const thermo& t,
108             const scalar nu,
109             const scalar Pr
110         );
113 public:
115     // Constructors
117         //- Construct as named copy
118         inline constTransport(const word&, const constTransport&);
120         //- Construct from Istream
121         constTransport(Istream&);
124     // Member functions
126         //- Dynamic viscosity [kg/ms]
127         inline scalar mu(const scalar T) const;
129         //- Thermal conductivity [W/mK]
130         inline scalar kappa(const scalar T) const;
132         //- Thermal diffusivity for enthalpy [kg/ms]
133         inline scalar alpha(const scalar T) const;
135         // Species diffusivity
136         //inline scalar D(const scalar T) const;
139     // Member operators
141         inline constTransport& operator=
142         (
143             const constTransport&
144         );
147     // Friend operators
149         friend constTransport operator+ <thermo>
150         (
151             const constTransport&,
152             const constTransport&
153         );
155         friend constTransport operator- <thermo>
156         (
157             const constTransport&,
158             const constTransport&
159         );
161         friend constTransport operator* <thermo>
162         (
163             const scalar,
164             const constTransport&
165         );
167         friend constTransport operator== <thermo>
168         (
169             const constTransport&,
170             const constTransport&
171         );
174     // Ostream Operator
176         friend Ostream& operator<< <thermo>
177         (
178             Ostream&,
179             const constTransport&
180         );
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 } // End namespace Foam
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 #include "constTransportI.H"
192 #ifdef NoRepository
193 #   include "constTransport.C"
194 #endif
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 #endif
200 // ************************************************************************* //