![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 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 gaussConvectionScheme 00027 00028 Description 00029 Basic second-order convection using face-gradients and Gauss' theorem. 00030 00031 SourceFiles 00032 gaussFaConvectionScheme.C 00033 gaussFaConvectionSchemes.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef gaussFaConvectionScheme_H 00038 #define gaussFaConvectionScheme_H 00039 00040 #include "faConvectionScheme.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00048 00049 namespace fa 00050 { 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class gaussConvectionScheme Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 template<class Type> 00057 class gaussConvectionScheme 00058 : 00059 public fa::convectionScheme<Type> 00060 { 00061 // Private data 00062 00063 tmp<edgeInterpolationScheme<Type> > tinterpScheme_; 00064 00065 00066 // Private Member Functions 00067 00068 //- Disallow default bitwise copy construct 00069 gaussConvectionScheme(const gaussConvectionScheme&); 00070 00071 //- Disallow default bitwise assignment 00072 void operator=(const gaussConvectionScheme&); 00073 00074 00075 public: 00076 00077 //- Runtime type information 00078 TypeName("Gauss"); 00079 00080 00081 // Constructors 00082 00083 //- Construct from flux and interpolation scheme 00084 gaussConvectionScheme 00085 ( 00086 const faMesh& mesh, 00087 const edgeScalarField& faceFlux, 00088 const tmp<edgeInterpolationScheme<Type> >& scheme 00089 ) 00090 : 00091 convectionScheme<Type>(mesh, faceFlux), 00092 tinterpScheme_(scheme) 00093 {} 00094 00095 //- Construct from flux and Istream 00096 gaussConvectionScheme 00097 ( 00098 const faMesh& mesh, 00099 const edgeScalarField& faceFlux, 00100 Istream& is 00101 ) 00102 : 00103 convectionScheme<Type>(mesh, faceFlux), 00104 tinterpScheme_ 00105 ( 00106 edgeInterpolationScheme<Type>::New(mesh, faceFlux, is) 00107 ) 00108 {} 00109 00110 00111 // Member Functions 00112 00113 tmp<GeometricField<Type, faPatchField, edgeMesh> > flux 00114 ( 00115 const edgeScalarField&, 00116 const GeometricField<Type, faPatchField, areaMesh>& 00117 ) const; 00118 00119 tmp<faMatrix<Type> > famDiv 00120 ( 00121 const edgeScalarField&, 00122 GeometricField<Type, faPatchField, areaMesh>& 00123 ) const; 00124 00125 tmp<GeometricField<Type, faPatchField, areaMesh> > facDiv 00126 ( 00127 const edgeScalarField&, 00128 const GeometricField<Type, faPatchField, areaMesh>& 00129 ) const; 00130 }; 00131 00132 00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00134 00135 } // End namespace fa 00136 00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00138 00139 } // End namespace Foam 00140 00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00142 00143 #ifdef NoRepository 00144 # include "gaussFaConvectionScheme.C" 00145 #endif 00146 00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00148 00149 #endif 00150 00151 // ************************************************************************* //