|
|
|
ReactingLookupTableInjection.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::ReactingLookupTableInjection 00027 00028 Description 00029 Particle injection sources read from look-up table. Each row corresponds to 00030 an injection site. 00031 00032 ( 00033 (x y z u v w d rho mDot T cp Y0..YN) 00034 ); 00035 00036 where: 00037 x, y, z = global cartesian co-ordinates [m] 00038 u, v, w = global cartesian velocity components [m/s] 00039 d = diameter [m] 00040 rho = density [kg/m3] 00041 mDot = mass flow rate [kg/m3] 00042 T = temperature [K] 00043 cp = specific heat capacity [J/kg/K] 00044 00045 SourceFiles 00046 ReactingLookupTableInjection.C 00047 00048 \*---------------------------------------------------------------------------*/ 00049 00050 #ifndef ReactingLookupTableInjection_H 00051 #define ReactingLookupTableInjection_H 00052 00053 #include "InjectionModel.H" 00054 #include "pdf.H" 00055 00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00057 00058 namespace Foam 00059 { 00060 00061 /*---------------------------------------------------------------------------*\ 00062 Class ReactingLookupTableInjection Declaration 00063 \*---------------------------------------------------------------------------*/ 00064 00065 template<class CloudType> 00066 class ReactingLookupTableInjection 00067 : 00068 public InjectionModel<CloudType> 00069 { 00070 // Private data 00071 00072 //- Name of file containing injector/parcel data 00073 const word inputFileName_; 00074 00075 //- Injection duration - common to all injection sources 00076 const scalar duration_; 00077 00078 //- Number of parcels per injector - common to all injection sources 00079 const label nParcelsPerSecond_; 00080 00081 //- List of parcel position per injector / [m] 00082 List<point> x_; 00083 00084 //- List of parcel velocity per injector / [m] 00085 List<vector> U_; 00086 00087 //- List of parcel diameter per injector / [m] 00088 List<scalar> d_; 00089 00090 //- List of parcel fluid density pre injector / [kg/m3] 00091 List<scalar> rho_; 00092 00093 //- List of parcel injection mass flow per injector / [kg/s] 00094 List<scalar> mDot_; 00095 00096 //- List of parcel temperature flow per injector / [K] 00097 List<scalar> T_; 00098 00099 //- List of parcel specific heat capacity per injector / [J/kg/K] 00100 List<scalar> cp_; 00101 00102 //- List of parcel specie mass fractions per injector / [] 00103 List<scalarList> Y_; 00104 00105 //- List of injector cells per injector 00106 List<label> injectorCells_; 00107 00108 //- Number of columns expected in input file 00109 static label INPUT_FILE_COLS; 00110 00111 00112 protected: 00113 00114 // Protected member functions 00115 00116 //- Number of parcels to introduce over the time step relative to SOI 00117 label parcelsToInject 00118 ( 00119 const scalar time0, 00120 const scalar time1 00121 ) const; 00122 00123 //- Volume of parcels to introduce over the time step relative to SOI 00124 scalar volumeToInject 00125 ( 00126 const scalar time0, 00127 const scalar time1 00128 ) const; 00129 00130 00131 public: 00132 00133 //- Runtime type information 00134 TypeName("ReactingLookupTableInjection"); 00135 00136 00137 // Constructors 00138 00139 //- Construct from dictionary 00140 ReactingLookupTableInjection 00141 ( 00142 const dictionary& dict, 00143 CloudType& owner 00144 ); 00145 00146 00147 //- Destructor 00148 virtual ~ReactingLookupTableInjection(); 00149 00150 00151 // Member Functions 00152 00153 //- Flag to indicate whether model activates injection model 00154 bool active() const; 00155 00156 //- Return the end-of-injection time 00157 scalar timeEnd() const; 00158 00159 00160 // Injection geometry 00161 00162 //- Set the injection position and owner cell 00163 virtual void setPositionAndCell 00164 ( 00165 const label parcelI, 00166 const label nParcels, 00167 const scalar time, 00168 vector& position, 00169 label& cellOwner 00170 ); 00171 00172 //- Set the parcel properties 00173 virtual void setProperties 00174 ( 00175 const label parcelI, 00176 const label nParcels, 00177 const scalar time, 00178 typename CloudType::parcelType& parcel 00179 ); 00180 00181 //- Flag to identify whether model fully describes the parcel 00182 virtual bool fullyDescribed() const; 00183 00184 //- Return flag to identify whether or not injection of parcelI is 00185 // permitted 00186 virtual bool validInjection(const label parcelI); 00187 }; 00188 00189 00190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00191 00192 } // End namespace Foam 00193 00194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00195 00196 #ifdef NoRepository 00197 # include "ReactingLookupTableInjection.C" 00198 #endif 00199 00200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00201 00202 #endif 00203 00204 // ************************************************************************* // |