1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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) // injector 1
34 (x y z) (u v w) d rho mDot T cp (Y0..YN) // injector 2
36 (x y z) (u v w) d rho mDot T cp (Y0..YN) // injector N
40 x, y, z = global cartesian co-ordinates [m]
41 u, v, w = global cartesian velocity components [m/s]
44 mDot = mass flow rate [kg/m3]
46 cp = specific heat capacity [J/kg/K]
47 Y = list of mass fractions
50 ReactingLookupTableInjection.C
52 \*---------------------------------------------------------------------------*/
54 #ifndef ReactingLookupTableInjection_H
55 #define ReactingLookupTableInjection_H
57 #include "InjectionModel.H"
58 #include "reactingParcelInjectionDataIOList.H"
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 /*---------------------------------------------------------------------------*\
66 Class ReactingLookupTableInjection Declaration
67 \*---------------------------------------------------------------------------*/
69 template<class CloudType>
70 class ReactingLookupTableInjection
72 public InjectionModel<CloudType>
76 //- Name of file containing injector/parcel data
77 const word inputFileName_;
79 //- Injection duration - common to all injection sources
80 const scalar duration_;
82 //- Number of parcels per injector - common to all injection sources
83 const label nParcelsPerSecond_;
86 reactingParcelInjectionDataIOList injectors_;
88 //- List of injector cells per injector
89 List<label> injectorCells_;
94 // Protected member functions
96 //- Number of parcels to introduce over the time step relative to SOI
103 //- Volume of parcels to introduce over the time step relative to SOI
104 scalar volumeToInject
113 //- Runtime type information
114 TypeName("ReactingLookupTableInjection");
119 //- Construct from dictionary
120 ReactingLookupTableInjection
122 const dictionary& dict,
128 virtual ~ReactingLookupTableInjection();
133 //- Flag to indicate whether model activates injection model
136 //- Return the end-of-injection time
137 scalar timeEnd() const;
140 // Injection geometry
142 //- Set the injection position and owner cell
143 virtual void setPositionAndCell
146 const label nParcels,
152 //- Set the parcel properties
153 virtual void setProperties
156 const label nParcels,
158 typename CloudType::parcelType& parcel
161 //- Flag to identify whether model fully describes the parcel
162 virtual bool fullyDescribed() const;
164 //- Return flag to identify whether or not injection of parcelI is
166 virtual bool validInjection(const label parcelI);
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 } // End namespace Foam
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 # include "ReactingLookupTableInjection.C"
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 // ************************************************************************* //