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::motionDiffusivity 00026 00027 Description 00028 Abstract base class for cell-centre mesh motion diffusivity. 00029 00030 SourceFiles 00031 motionDiffusivity.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef motionDiffusivity_H 00036 #define motionDiffusivity_H 00037 00038 #include <fvMotionSolvers/fvMotionSolver.H> 00039 #include <finiteVolume/surfaceFieldsFwd.H> 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class motionDiffusivity Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 class motionDiffusivity 00051 { 00052 // Private data 00053 00054 //- Motion solver reference 00055 const fvMotionSolver& mSolver_; 00056 00057 public: 00058 00059 //- Runtime type information 00060 TypeName("motionDiffusivity"); 00061 00062 00063 // Declare run-time constructor selection tables 00064 00065 declareRunTimeSelectionTable 00066 ( 00067 autoPtr, 00068 motionDiffusivity, 00069 Istream, 00070 ( 00071 const fvMotionSolver& mSolver, 00072 Istream& mdData 00073 ), 00074 (mSolver, mdData) 00075 ); 00076 00077 00078 // Selectors 00079 00080 //- Select null constructed 00081 static autoPtr<motionDiffusivity> New 00082 ( 00083 const fvMotionSolver& mSolver, 00084 Istream& mdData 00085 ); 00086 00087 00088 // Constructors 00089 00090 //- Construct for the given fvMotionSolver 00091 motionDiffusivity(const fvMotionSolver& mSolver); 00092 00093 00094 // Destructor 00095 00096 virtual ~motionDiffusivity(); 00097 00098 00099 // Member Functions 00100 00101 //- Return reference to the motion solver 00102 const fvMotionSolver& mSolver() const 00103 { 00104 return mSolver_; 00105 } 00106 00107 //- Return diffusivity field 00108 virtual tmp<surfaceScalarField> operator()() const = 0; 00109 00110 //- Correct the motion diffusivity 00111 virtual void correct() = 0; 00112 }; 00113 00114 00115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00116 00117 } // End namespace Foam 00118 00119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00120 00121 #endif 00122 00123 // ************************ vim: set sw=4 sts=4 et: ************************ //