|
|
|
NoInjection.HGo 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::NoInjection 00027 00028 Description 00029 Place holder for 'none' option 00030 00031 SourceFiles 00032 NoInjection.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef NoInjection_H 00037 #define NoInjection_H 00038 00039 #include "InjectionModel.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class NoInjection Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 template<class CloudType> 00051 class NoInjection 00052 : 00053 public InjectionModel<CloudType> 00054 { 00055 protected: 00056 00057 // Protected member functions 00058 00059 //- Number of parcels to introduce over the time step relative to SOI 00060 label parcelsToInject 00061 ( 00062 const scalar, 00063 const scalar 00064 ) const; 00065 00066 //- Volume of parcels to introduce over the time step relative to SOI 00067 scalar volumeToInject 00068 ( 00069 const scalar, 00070 const scalar 00071 ) const; 00072 00073 00074 public: 00075 00076 //- Runtime type information 00077 TypeName("none"); 00078 00079 00080 // Constructors 00081 00082 //- Construct from components 00083 NoInjection 00084 ( 00085 const dictionary&, 00086 CloudType& 00087 ); 00088 00089 00090 //- Destructor 00091 virtual ~NoInjection(); 00092 00093 00094 // Member Functions 00095 00096 //- Flag to indicate whether model activates injection model 00097 bool active() const; 00098 00099 //- Return the end-of-injection time 00100 scalar timeEnd() const; 00101 00102 00103 // Injection geometry 00104 00105 //- Set the injection position and owner cell 00106 virtual void setPositionAndCell 00107 ( 00108 const label parcelI, 00109 const label nParcels, 00110 const scalar time, 00111 vector& position, 00112 label& cellOwner 00113 ); 00114 00115 virtual void setProperties 00116 ( 00117 const label parcelI, 00118 const label nParcels, 00119 const scalar time, 00120 typename CloudType::parcelType& parcel 00121 ); 00122 00123 //- Flag to identify whether model fully describes the parcel 00124 virtual bool fullyDescribed() const; 00125 00126 //- Return flag to identify whether or not injection of parcelI is 00127 // permitted 00128 virtual bool validInjection(const label parcelI); 00129 }; 00130 00131 00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00133 00134 } // End namespace Foam 00135 00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00137 00138 #ifdef NoRepository 00139 # include "NoInjection.C" 00140 #endif 00141 00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00143 00144 #endif 00145 00146 // ************************************************************************* // |