OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

sutherlandTransport.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::sutherlandTransport
00027 
00028 Description
00029     Transport package using Sutherland's formula.
00030 
00031     Templated into a given thermodynamics package (needed for thermal
00032     conductivity).
00033 
00034     Dynamic viscosity [kg/m.s]
00035     @f[
00036         \mu = A_s \frac{\sqrt{T}}{1 + T_s / T}
00037     @f]
00038 
00039 SourceFiles
00040     sutherlandTransportI.H
00041     sutherlandTransport.C
00042 
00043 \*---------------------------------------------------------------------------*/
00044 
00045 #ifndef sutherlandTransport_H
00046 #define sutherlandTransport_H
00047 
00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00049 
00050 namespace Foam
00051 {
00052 
00053 // Forward declaration of friend functions and operators
00054 
00055 template<class thermo> class sutherlandTransport;
00056 
00057 template<class thermo>
00058 inline sutherlandTransport<thermo> operator+
00059 (
00060     const sutherlandTransport<thermo>&,
00061     const sutherlandTransport<thermo>&
00062 );
00063 
00064 template<class thermo>
00065 inline sutherlandTransport<thermo> operator-
00066 (
00067     const sutherlandTransport<thermo>&,
00068     const sutherlandTransport<thermo>&
00069 );
00070 
00071 template<class thermo>
00072 inline sutherlandTransport<thermo> operator*
00073 (
00074     const scalar,
00075     const sutherlandTransport<thermo>&
00076 );
00077 
00078 template<class thermo>
00079 inline sutherlandTransport<thermo> operator==
00080 (
00081     const sutherlandTransport<thermo>&,
00082     const sutherlandTransport<thermo>&
00083 );
00084 
00085 template<class thermo>
00086 Ostream& operator<<
00087 (
00088     Ostream&,
00089     const sutherlandTransport<thermo>&
00090 );
00091 
00092 
00093 /*---------------------------------------------------------------------------*\
00094                            Class sutherlandTransport Declaration
00095 \*---------------------------------------------------------------------------*/
00096 
00097 template<class thermo>
00098 class sutherlandTransport
00099 :
00100     public thermo
00101 {
00102     // Private data
00103 
00104         // Sutherland's coefficients
00105         scalar As, Ts;
00106 
00107 
00108     // Private member functions
00109 
00110         //- Calculate the Sutherland coefficients
00111         //  given two viscosities and temperatures
00112         inline void calcCoeffs
00113         (
00114             const scalar mu1, const scalar T1,
00115             const scalar mu2, const scalar T2
00116         );
00117 
00118 
00119 public:
00120 
00121     // Constructors
00122 
00123         //- Construct from components
00124         inline sutherlandTransport
00125         (
00126             const thermo& t,
00127             const scalar as,
00128             const scalar ts
00129         );
00130 
00131         //- Construct from two viscosities
00132         inline sutherlandTransport
00133         (
00134             const thermo& t,
00135             const scalar mu1, const scalar T1,
00136             const scalar mu2, const scalar T2
00137         );
00138 
00139         //- Construct as named copy
00140         inline sutherlandTransport(const word&, const sutherlandTransport&);
00141 
00142         //- Construct from Istream
00143         sutherlandTransport(Istream&);
00144 
00145         //- Construct and return a clone
00146         inline autoPtr<sutherlandTransport> clone() const;
00147 
00148         // Selector from Istream
00149         inline static autoPtr<sutherlandTransport> New(Istream& is);
00150 
00151 
00152     // Member functions
00153 
00154         //- Dynamic viscosity [kg/ms]
00155         inline scalar mu(const scalar T) const;
00156 
00157         //- Thermal conductivity [W/mK]
00158         inline scalar kappa(const scalar T) const;
00159 
00160         //- Thermal diffusivity for enthalpy [kg/ms]
00161         inline scalar alpha(const scalar T) const;
00162 
00163         // Species diffusivity
00164         //inline scalar D(const scalar T) const;
00165 
00166 
00167     // Member operators
00168 
00169         inline sutherlandTransport& operator=
00170         (
00171             const sutherlandTransport&
00172         );
00173 
00174 
00175     // Friend operators
00176 
00177         friend sutherlandTransport operator+ <thermo>
00178         (
00179             const sutherlandTransport&,
00180             const sutherlandTransport&
00181         );
00182 
00183         friend sutherlandTransport operator- <thermo>
00184         (
00185             const sutherlandTransport&,
00186             const sutherlandTransport&
00187         );
00188 
00189         friend sutherlandTransport operator* <thermo>
00190         (
00191             const scalar,
00192             const sutherlandTransport&
00193         );
00194 
00195         friend sutherlandTransport operator== <thermo>
00196         (
00197             const sutherlandTransport&,
00198             const sutherlandTransport&
00199         );
00200 
00201 
00202     // Ostream Operator
00203 
00204         friend Ostream& operator<< <thermo>
00205         (
00206             Ostream&,
00207             const sutherlandTransport&
00208         );
00209 };
00210 
00211 
00212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00213 
00214 } // End namespace Foam
00215 
00216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00217 
00218 #include "sutherlandTransportI.H"
00219 
00220 #ifdef NoRepository
00221 #   include "sutherlandTransport.C"
00222 #endif
00223 
00224 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00225 
00226 #endif
00227 
00228 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd