FreeFOAM The Cross-Platform CFD Toolkit
constTransport.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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::constTransport
26 
27 Description
28  Constant properties Transport package.
29  Templated into a given thermodynamics package (needed for thermal
30  conductivity).
31 
32 SourceFiles
33  constTransportI.H
34  constTransport.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef constTransport_H
39 #define constTransport_H
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward declaration of friend functions and operators
47 
48 template<class thermo> class constTransport;
49 
50 template<class thermo>
51 inline constTransport<thermo> operator+
52 (
53  const constTransport<thermo>&,
54  const constTransport<thermo>&
55 );
56 
57 template<class thermo>
58 inline constTransport<thermo> operator-
59 (
60  const constTransport<thermo>&,
61  const constTransport<thermo>&
62 );
63 
64 template<class thermo>
65 inline constTransport<thermo> operator*
66 (
67  const scalar,
68  const constTransport<thermo>&
69 );
70 
71 template<class thermo>
72 inline constTransport<thermo> operator==
73 (
74  const constTransport<thermo>&,
75  const constTransport<thermo>&
76 );
77 
78 template<class thermo>
79 Ostream& operator<<
80 (
81  Ostream&,
82  const constTransport<thermo>&
83 );
84 
85 
86 /*---------------------------------------------------------------------------*\
87  Class constTransport Declaration
88 \*---------------------------------------------------------------------------*/
89 
90 template<class thermo>
92 :
93  public thermo
94 {
95  // Private data
96 
97  //- Constant viscosity and reciprocal Prandtl Number.
98  scalar Mu, rPr;
99 
100 
101  // Private member functions
102 
103  //- Construct from components
104  inline constTransport
105  (
106  const thermo& t,
107  const scalar nu,
108  const scalar Pr
109  );
110 
111 
112 public:
113 
114  // Constructors
115 
116  //- Construct as named copy
117  inline constTransport(const word&, const constTransport&);
118 
119  //- Construct from Istream
121 
122 
123  // Member functions
124 
125  //- Dynamic viscosity [kg/ms]
126  inline scalar mu(const scalar T) const;
127 
128  //- Thermal conductivity [W/mK]
129  inline scalar kappa(const scalar T) const;
130 
131  //- Thermal diffusivity for enthalpy [kg/ms]
132  inline scalar alpha(const scalar T) const;
133 
134  // Species diffusivity
135  //inline scalar D(const scalar T) const;
136 
137 
138  // Member operators
139 
140  inline constTransport& operator=
141  (
142  const constTransport&
143  );
144 
145 
146  // Friend operators
147 
148  friend constTransport operator+ <thermo>
149  (
150  const constTransport&,
151  const constTransport&
152  );
153 
154  friend constTransport operator- <thermo>
155  (
156  const constTransport&,
157  const constTransport&
158  );
159 
160  friend constTransport operator* <thermo>
161  (
162  const scalar,
163  const constTransport&
164  );
165 
166  friend constTransport operator== <thermo>
167  (
168  const constTransport&,
169  const constTransport&
170  );
171 
172 
173  // Ostream Operator
174 
175  friend Ostream& operator<< <thermo>
176  (
177  Ostream&,
178  const constTransport&
179  );
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace Foam
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #include <specie/constTransportI.H>
190 
191 #ifdef NoRepository
192 # include <specie/constTransport.C>
193 #endif
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 #endif
198 
199 // ************************ vim: set sw=4 sts=4 et: ************************ //