FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::sutherlandTransport
00026 
00027 Description
00028     Transport package using Sutherland's formula.
00029 
00030     Templated into a given thermodynamics package (needed for thermal
00031     conductivity).
00032 
00033     Dynamic viscosity [kg/m.s]
00034     @f[
00035         \mu = A_s \frac{\sqrt{T}}{1 + T_s / T}
00036     @f]
00037 
00038 SourceFiles
00039     sutherlandTransportI.H
00040     sutherlandTransport.C
00041 
00042 \*---------------------------------------------------------------------------*/
00043 
00044 #ifndef sutherlandTransport_H
00045 #define sutherlandTransport_H
00046 
00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00048 
00049 namespace Foam
00050 {
00051 
00052 // Forward declaration of friend functions and operators
00053 
00054 template<class thermo> class sutherlandTransport;
00055 
00056 template<class thermo>
00057 inline sutherlandTransport<thermo> operator+
00058 (
00059     const sutherlandTransport<thermo>&,
00060     const sutherlandTransport<thermo>&
00061 );
00062 
00063 template<class thermo>
00064 inline sutherlandTransport<thermo> operator-
00065 (
00066     const sutherlandTransport<thermo>&,
00067     const sutherlandTransport<thermo>&
00068 );
00069 
00070 template<class thermo>
00071 inline sutherlandTransport<thermo> operator*
00072 (
00073     const scalar,
00074     const sutherlandTransport<thermo>&
00075 );
00076 
00077 template<class thermo>
00078 inline sutherlandTransport<thermo> operator==
00079 (
00080     const sutherlandTransport<thermo>&,
00081     const sutherlandTransport<thermo>&
00082 );
00083 
00084 template<class thermo>
00085 Ostream& operator<<
00086 (
00087     Ostream&,
00088     const sutherlandTransport<thermo>&
00089 );
00090 
00091 
00092 /*---------------------------------------------------------------------------*\
00093                            Class sutherlandTransport Declaration
00094 \*---------------------------------------------------------------------------*/
00095 
00096 template<class thermo>
00097 class sutherlandTransport
00098 :
00099     public thermo
00100 {
00101     // Private data
00102 
00103         // Sutherland's coefficients
00104         scalar As, Ts;
00105 
00106 
00107     // Private member functions
00108 
00109         //- Calculate the Sutherland coefficients
00110         //  given two viscosities and temperatures
00111         inline void calcCoeffs
00112         (
00113             const scalar mu1, const scalar T1,
00114             const scalar mu2, const scalar T2
00115         );
00116 
00117 
00118 public:
00119 
00120     // Constructors
00121 
00122         //- Construct from components
00123         inline sutherlandTransport
00124         (
00125             const thermo& t,
00126             const scalar as,
00127             const scalar ts
00128         );
00129 
00130         //- Construct from two viscosities
00131         inline sutherlandTransport
00132         (
00133             const thermo& t,
00134             const scalar mu1, const scalar T1,
00135             const scalar mu2, const scalar T2
00136         );
00137 
00138         //- Construct as named copy
00139         inline sutherlandTransport(const word&, const sutherlandTransport&);
00140 
00141         //- Construct from Istream
00142         sutherlandTransport(Istream&);
00143 
00144         //- Construct and return a clone
00145         inline autoPtr<sutherlandTransport> clone() const;
00146 
00147         // Selector from Istream
00148         inline static autoPtr<sutherlandTransport> New(Istream& is);
00149 
00150 
00151     // Member functions
00152 
00153         //- Dynamic viscosity [kg/ms]
00154         inline scalar mu(const scalar T) const;
00155 
00156         //- Thermal conductivity [W/mK]
00157         inline scalar kappa(const scalar T) const;
00158 
00159         //- Thermal diffusivity for enthalpy [kg/ms]
00160         inline scalar alpha(const scalar T) const;
00161 
00162         // Species diffusivity
00163         //inline scalar D(const scalar T) const;
00164 
00165 
00166     // Member operators
00167 
00168         inline sutherlandTransport& operator=
00169         (
00170             const sutherlandTransport&
00171         );
00172 
00173 
00174     // Friend operators
00175 
00176         friend sutherlandTransport operator+ <thermo>
00177         (
00178             const sutherlandTransport&,
00179             const sutherlandTransport&
00180         );
00181 
00182         friend sutherlandTransport operator- <thermo>
00183         (
00184             const sutherlandTransport&,
00185             const sutherlandTransport&
00186         );
00187 
00188         friend sutherlandTransport operator* <thermo>
00189         (
00190             const scalar,
00191             const sutherlandTransport&
00192         );
00193 
00194         friend sutherlandTransport operator== <thermo>
00195         (
00196             const sutherlandTransport&,
00197             const sutherlandTransport&
00198         );
00199 
00200 
00201     // Ostream Operator
00202 
00203         friend Ostream& operator<< <thermo>
00204         (
00205             Ostream&,
00206             const sutherlandTransport&
00207         );
00208 };
00209 
00210 
00211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00212 
00213 } // End namespace Foam
00214 
00215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00216 
00217 #include <specie/sutherlandTransportI.H>
00218 
00219 #ifdef NoRepository
00220 #   include <specie/sutherlandTransport.C>
00221 #endif
00222 
00223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00224 
00225 #endif
00226 
00227 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines