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