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

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