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::sutherlandTransport
28 Transport package using Sutherland's formula.
30 Templated into a given thermodynamics package (needed for thermal
33 Dynamic viscosity [kg/m.s]
35 \mu = A_s \frac{\sqrt{T}}{1 + T_s / T}
39 sutherlandTransportI.H
42 \*---------------------------------------------------------------------------*/
44 #ifndef sutherlandTransport_H
45 #define sutherlandTransport_H
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 // Forward declaration of friend functions and operators
54 template<class thermo> class sutherlandTransport;
56 template<class thermo>
57 inline sutherlandTransport<thermo> operator+
59 const sutherlandTransport<thermo>&,
60 const sutherlandTransport<thermo>&
63 template<class thermo>
64 inline sutherlandTransport<thermo> operator-
66 const sutherlandTransport<thermo>&,
67 const sutherlandTransport<thermo>&
70 template<class thermo>
71 inline sutherlandTransport<thermo> operator*
74 const sutherlandTransport<thermo>&
77 template<class thermo>
78 inline sutherlandTransport<thermo> operator==
80 const sutherlandTransport<thermo>&,
81 const sutherlandTransport<thermo>&
84 template<class thermo>
88 const sutherlandTransport<thermo>&
92 /*---------------------------------------------------------------------------*\
93 Class sutherlandTransport Declaration
94 \*---------------------------------------------------------------------------*/
96 template<class thermo>
97 class sutherlandTransport
103 // Sutherland's coefficients
107 // Private member functions
109 //- Calculate the Sutherland coefficients
110 // given two viscosities and temperatures
111 inline void calcCoeffs
113 const scalar mu1, const scalar T1,
114 const scalar mu2, const scalar T2
122 //- Construct from components
123 inline sutherlandTransport
130 //- Construct from two viscosities
131 inline sutherlandTransport
134 const scalar mu1, const scalar T1,
135 const scalar mu2, const scalar T2
138 //- Construct as named copy
139 inline sutherlandTransport(const word&, const sutherlandTransport&);
141 //- Construct from Istream
142 sutherlandTransport(Istream&);
144 //- Construct and return a clone
145 inline autoPtr<sutherlandTransport> clone() const;
147 // Selector from Istream
148 inline static autoPtr<sutherlandTransport> New(Istream& is);
153 //- Dynamic viscosity [kg/ms]
154 inline scalar mu(const scalar T) const;
156 //- Thermal conductivity [W/mK]
157 inline scalar kappa(const scalar T) const;
159 //- Thermal diffusivity for enthalpy [kg/ms]
160 inline scalar alpha(const scalar T) const;
162 // Species diffusivity
163 //inline scalar D(const scalar T) const;
168 inline sutherlandTransport& operator=(const sutherlandTransport&);
170 inline void operator+=(const sutherlandTransport&);
172 inline void operator-=(const sutherlandTransport&);
174 inline void operator*=(const scalar);
179 friend sutherlandTransport operator+ <thermo>
181 const sutherlandTransport&,
182 const sutherlandTransport&
185 friend sutherlandTransport operator- <thermo>
187 const sutherlandTransport&,
188 const sutherlandTransport&
191 friend sutherlandTransport operator* <thermo>
194 const sutherlandTransport&
197 friend sutherlandTransport operator== <thermo>
199 const sutherlandTransport&,
200 const sutherlandTransport&
206 friend Ostream& operator<< <thermo>
209 const sutherlandTransport&
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 } // End namespace Foam
218 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220 #include "sutherlandTransportI.H"
223 # include "sutherlandTransport.C"
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 // ************************************************************************* //