1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::ReactingMultiphaseLookupTableInjection
28 Particle injection sources read from look-up table. Each row corresponds to
32 (x y z) (u v w) d rho mDot T cp (Y0..Y2) (Yg0..YgN) (Yl0..YlN) (Ys0..YsN)
33 (x y z) (u v w) d rho mDot T cp (Y0..Y2) (Yg0..YgN) (Yl0..YlN) (Ys0..YsN)
35 (x y z) (u v w) d rho mDot T cp (Y0..Y2) (Yg0..YgN) (Yl0..YlN) (Ys0..YsN)
39 x, y, z = global cartesian co-ordinates [m]
40 u, v, w = global cartesian velocity components [m/s]
43 mDot = mass flow rate [kg/m3]
45 cp = specific heat capacity [J/kg/K]
46 Y(3) = total mass fraction of gas (Y0), liquid (Y1), solid (Y3)
47 Yg(Ngas) = mass fractions of gaseous components
48 Yl(Nliq) = mass fractions of liquid components
49 Ys(Nsld) = mass fractions of solid components
52 ReactingMultiphaseLookupTableInjection.C
54 \*---------------------------------------------------------------------------*/
56 #ifndef ReactingMultiphaseLookupTableInjection_H
57 #define ReactingMultiphaseLookupTableInjection_H
59 #include "InjectionModel.H"
60 #include "reactingMultiphaseParcelInjectionDataIOList.H"
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 /*---------------------------------------------------------------------------*\
68 Class ReactingMultiphaseLookupTableInjection Declaration
69 \*---------------------------------------------------------------------------*/
71 template<class CloudType>
72 class ReactingMultiphaseLookupTableInjection
74 public InjectionModel<CloudType>
78 //- Name of file containing injector/parcel data
79 const word inputFileName_;
81 //- Injection duration - common to all injection sources
82 const scalar duration_;
84 //- Number of parcels per injector - common to all injection sources
85 const scalar parcelsPerSecond_;
88 reactingMultiphaseParcelInjectionDataIOList injectors_;
90 //- List of cell labels corresoponding to injector positions
91 labelList injectorCells_;
93 //- List of tetFace labels corresoponding to injector positions
94 labelList injectorTetFaces_;
96 //- List of tetPt labels corresoponding to injector positions
97 labelList injectorTetPts_;
102 //- Runtime type information
103 TypeName("reactingMultiphaseLookupTableInjection");
108 //- Construct from dictionary
109 ReactingMultiphaseLookupTableInjection
111 const dictionary& dict,
116 ReactingMultiphaseLookupTableInjection
118 const ReactingMultiphaseLookupTableInjection<CloudType>& im
121 //- Construct and return a clone
122 virtual autoPtr<InjectionModel<CloudType> > clone() const
124 return autoPtr<InjectionModel<CloudType> >
126 new ReactingMultiphaseLookupTableInjection<CloudType>(*this)
132 virtual ~ReactingMultiphaseLookupTableInjection();
137 //- Return the end-of-injection time
138 scalar timeEnd() const;
140 //- Number of parcels to introduce relative to SOI
141 virtual label parcelsToInject(const scalar time0, const scalar time1);
143 //- Volume of parcels to introduce relative to SOI
144 virtual scalar volumeToInject(const scalar time0, const scalar time1);
147 // Injection geometry
149 //- Set the injection position and owner cell, tetFace and tetPt
150 virtual void setPositionAndCell
153 const label nParcels,
161 //- Set the parcel properties
162 virtual void setProperties
165 const label nParcels,
167 typename CloudType::parcelType& parcel
170 //- Flag to identify whether model fully describes the parcel
171 virtual bool fullyDescribed() const;
173 //- Return flag to identify whether or not injection of parcelI is
175 virtual bool validInjection(const label parcelI);
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace Foam
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 # include "ReactingMultiphaseLookupTableInjection.C"
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 // ************************************************************************* //