1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::ReactingLookupTableInjection
29 Particle injection sources read from look-up table. Each row corresponds to
33 (x y z u v w d rho mDot T cp Y0..YN)
37 x, y, z = global cartesian co-ordinates [m]
38 u, v, w = global cartesian velocity components [m/s]
41 mDot = mass flow rate [kg/m3]
43 cp = specific heat capacity [J/kg/K]
46 ReactingLookupTableInjection.C
48 \*---------------------------------------------------------------------------*/
50 #ifndef ReactingLookupTableInjection_H
51 #define ReactingLookupTableInjection_H
53 #include "InjectionModel.H"
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 /*---------------------------------------------------------------------------*\
62 Class ReactingLookupTableInjection Declaration
63 \*---------------------------------------------------------------------------*/
65 template<class CloudType>
66 class ReactingLookupTableInjection
68 public InjectionModel<CloudType>
72 //- Name of file containing injector/parcel data
73 const word inputFileName_;
75 //- Injection duration - common to all injection sources
76 const scalar duration_;
78 //- Number of parcels per injector - common to all injection sources
79 const label nParcelsPerSecond_;
81 //- List of parcel position per injector / [m]
84 //- List of parcel velocity per injector / [m]
87 //- List of parcel diameter per injector / [m]
90 //- List of parcel fluid density pre injector / [kg/m3]
93 //- List of parcel injection mass flow per injector / [kg/s]
96 //- List of parcel temperature flow per injector / [K]
99 //- List of parcel specific heat capacity per injector / [J/kg/K]
102 //- List of parcel specie mass fractions per injector / []
105 //- List of injector cells per injector
106 List<label> injectorCells_;
108 //- Number of columns expected in input file
109 static label INPUT_FILE_COLS;
114 // Protected member functions
116 //- Number of parcels to introduce over the time step relative to SOI
117 label parcelsToInject
123 //- Volume of parcels to introduce over the time step relative to SOI
124 scalar volumeToInject
133 //- Runtime type information
134 TypeName("ReactingLookupTableInjection");
139 //- Construct from dictionary
140 ReactingLookupTableInjection
142 const dictionary& dict,
148 virtual ~ReactingLookupTableInjection();
153 //- Flag to indicate whether model activates injection model
156 //- Return the end-of-injection time
157 scalar timeEnd() const;
160 // Injection geometry
162 //- Set the injection position and owner cell
163 virtual void setPositionAndCell
166 const label nParcels,
172 //- Set the parcel properties
173 virtual void setProperties
176 const label nParcels,
178 typename CloudType::parcelType& parcel
181 //- Flag to identify whether model fully describes the parcel
182 virtual bool fullyDescribed() const;
184 //- Return flag to identify whether or not injection of parcelI is
186 virtual bool validInjection(const label parcelI);
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 } // End namespace Foam
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 # include "ReactingLookupTableInjection.C"
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 // ************************************************************************* //