|
|
|
ConeInjectionMP.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) 2008-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::ConeInjectionMP 00027 00028 Description 00029 Cone injection multi-point 00030 00031 - User specifies 00032 - time of start of injection 00033 - injector positions 00034 - directions (along injection axes) 00035 - parcel flow rate 00036 - parcel velocities 00037 - inner and outer cone angles 00038 - Parcel diameters obtained by PDF model 00039 00040 SourceFiles 00041 ConeInjectionMP.C 00042 00043 \*---------------------------------------------------------------------------*/ 00044 00045 #ifndef ConeInjectionMP_H 00046 #define ConeInjectionMP_H 00047 00048 #include "InjectionModel.H" 00049 #include "pdf.H" 00050 #include "vectorList.H" 00051 00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00053 00054 namespace Foam 00055 { 00056 00057 // Forward declaration of classes 00058 00059 template<class Type> 00060 class DataEntry; 00061 00062 /*---------------------------------------------------------------------------*\ 00063 Class ConeInjectionMP Declaration 00064 \*---------------------------------------------------------------------------*/ 00065 00066 template<class CloudType> 00067 class ConeInjectionMP 00068 : 00069 public InjectionModel<CloudType> 00070 { 00071 // Private data 00072 00073 //- Name of file containing positions data 00074 const word positionsFile_; 00075 00076 //- Field of injector positions 00077 vectorIOField positions_; 00078 00079 //- Field of cell labels corresoponding to injector positions 00080 labelList injectorCells_; 00081 00082 //- Name of file containing axes data 00083 const word axesFile_; 00084 00085 //- Field of injector positions 00086 vectorIOField axes_; 00087 00088 //- Injection duration [s] 00089 const scalar duration_; 00090 00091 //- Number of parcels to introduce per injector 00092 const label parcelsPerInjector_; 00093 00094 //- Volume flow rate of parcels to introduce relative to SOI [m^3] 00095 const autoPtr<DataEntry<scalar> > volumeFlowRate_; 00096 00097 //- Parcel velocity magnitude relative to SOI [m/s] 00098 const autoPtr<DataEntry<scalar> > Umag_; 00099 00100 //- Inner cone angle relative to SOI [deg] 00101 const autoPtr<DataEntry<scalar> > thetaInner_; 00102 00103 //- Outer cone angle relative to SOI [deg] 00104 const autoPtr<DataEntry<scalar> > thetaOuter_; 00105 00106 //- Parcel size PDF model 00107 const autoPtr<pdf> parcelPDF_; 00108 00109 //- Number of parcels per injector already injected 00110 mutable label nInjected_; 00111 00112 00113 // Tangential vectors to the direction vector 00114 00115 //- First tangential vector 00116 vectorList tanVec1_; 00117 00118 //- Second tangential vector 00119 vectorList tanVec2_; 00120 00121 00122 protected: 00123 00124 // Protected member functions 00125 00126 //- Number of parcels to introduce over the time step 00127 label parcelsToInject 00128 ( 00129 const scalar time0, 00130 const scalar time1 00131 ) const; 00132 00133 //- Number of parcels to introduce over the time step 00134 scalar volumeToInject 00135 ( 00136 const scalar time0, 00137 const scalar time1 00138 ) const; 00139 00140 00141 public: 00142 00143 //- Runtime type information 00144 TypeName("ConeInjectionMP"); 00145 00146 00147 // Constructors 00148 00149 //- Construct from dictionary 00150 ConeInjectionMP 00151 ( 00152 const dictionary& dict, 00153 CloudType& owner 00154 ); 00155 00156 00157 //- Destructor 00158 virtual ~ConeInjectionMP(); 00159 00160 00161 // Member Functions 00162 00163 //- Flag to indicate whether model activates injection model 00164 bool active() const; 00165 00166 //- Return the end-of-injection time 00167 scalar timeEnd() const; 00168 00169 00170 // Injection geometry 00171 00172 //- Set the injection position and owner cell 00173 virtual void setPositionAndCell 00174 ( 00175 const label parcelI, 00176 const label nParcels, 00177 const scalar time, 00178 vector& position, 00179 label& cellOwner 00180 ); 00181 00182 //- Set the parcel properties 00183 virtual void setProperties 00184 ( 00185 const label parcelI, 00186 const label nParcels, 00187 const scalar time, 00188 typename CloudType::parcelType& parcel 00189 ); 00190 00191 //- Flag to identify whether model fully describes the parcel 00192 virtual bool fullyDescribed() const; 00193 00194 //- Return flag to identify whether or not injection of parcelI is 00195 // permitted 00196 virtual bool validInjection(const label parcelI); 00197 }; 00198 00199 00200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00201 00202 } // End namespace Foam 00203 00204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00205 00206 #ifdef NoRepository 00207 # include "ConeInjectionMP.C" 00208 #endif 00209 00210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00211 00212 #endif 00213 00214 // ************************************************************************* // |