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

constTransport.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::constTransport
00026 
00027 Description
00028     Constant properties Transport package.
00029     Templated into a given thermodynamics package (needed for thermal
00030     conductivity).
00031 
00032 SourceFiles
00033     constTransportI.H
00034     constTransport.C
00035 
00036 \*---------------------------------------------------------------------------*/
00037 
00038 #ifndef constTransport_H
00039 #define constTransport_H
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // Forward declaration of friend functions and operators
00047 
00048 template<class thermo> class constTransport;
00049 
00050 template<class thermo>
00051 inline constTransport<thermo> operator+
00052 (
00053     const constTransport<thermo>&,
00054     const constTransport<thermo>&
00055 );
00056 
00057 template<class thermo>
00058 inline constTransport<thermo> operator-
00059 (
00060     const constTransport<thermo>&,
00061     const constTransport<thermo>&
00062 );
00063 
00064 template<class thermo>
00065 inline constTransport<thermo> operator*
00066 (
00067     const scalar,
00068     const constTransport<thermo>&
00069 );
00070 
00071 template<class thermo>
00072 inline constTransport<thermo> operator==
00073 (
00074     const constTransport<thermo>&,
00075     const constTransport<thermo>&
00076 );
00077 
00078 template<class thermo>
00079 Ostream& operator<<
00080 (
00081     Ostream&,
00082     const constTransport<thermo>&
00083 );
00084 
00085 
00086 /*---------------------------------------------------------------------------*\
00087                            Class constTransport Declaration
00088 \*---------------------------------------------------------------------------*/
00089 
00090 template<class thermo>
00091 class constTransport
00092 :
00093     public thermo
00094 {
00095     // Private data
00096 
00097         //- Constant viscosity and reciprocal Prandtl Number.
00098         scalar Mu, rPr;
00099 
00100 
00101     // Private member functions
00102 
00103         //- Construct from components
00104         inline constTransport
00105         (
00106             const thermo& t,
00107             const scalar nu,
00108             const scalar Pr
00109         );
00110 
00111 
00112 public:
00113 
00114     // Constructors
00115 
00116         //- Construct as named copy
00117         inline constTransport(const word&, const constTransport&);
00118 
00119         //- Construct from Istream
00120         constTransport(Istream&);
00121 
00122 
00123     // Member functions
00124 
00125         //- Dynamic viscosity [kg/ms]
00126         inline scalar mu(const scalar T) const;
00127 
00128         //- Thermal conductivity [W/mK]
00129         inline scalar kappa(const scalar T) const;
00130 
00131         //- Thermal diffusivity for enthalpy [kg/ms]
00132         inline scalar alpha(const scalar T) const;
00133 
00134         // Species diffusivity
00135         //inline scalar D(const scalar T) const;
00136 
00137 
00138     // Member operators
00139 
00140         inline constTransport& operator=
00141         (
00142             const constTransport&
00143         );
00144 
00145 
00146     // Friend operators
00147 
00148         friend constTransport operator+ <thermo>
00149         (
00150             const constTransport&,
00151             const constTransport&
00152         );
00153 
00154         friend constTransport operator- <thermo>
00155         (
00156             const constTransport&,
00157             const constTransport&
00158         );
00159 
00160         friend constTransport operator* <thermo>
00161         (
00162             const scalar,
00163             const constTransport&
00164         );
00165 
00166         friend constTransport operator== <thermo>
00167         (
00168             const constTransport&,
00169             const constTransport&
00170         );
00171 
00172 
00173     // Ostream Operator
00174 
00175         friend Ostream& operator<< <thermo>
00176         (
00177             Ostream&,
00178             const constTransport&
00179         );
00180 };
00181 
00182 
00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00184 
00185 } // End namespace Foam
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 #include <specie/constTransportI.H>
00190 
00191 #ifdef NoRepository
00192 #   include <specie/constTransport.C>
00193 #endif
00194 
00195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00196 
00197 #endif
00198 
00199 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines