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::KinematicLookupTableInjection
29 Particle injection sources read from look-up table. Each row corresponds to
33 (x y z) (u v w) d rho mDot // injector 1
34 (x y z) (u v w) d rho mDot // injector 2
36 (x y z) (u v w) d rho mDot // 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]
47 KinematicLookupTableInjection.C
49 \*---------------------------------------------------------------------------*/
51 #ifndef KinematicLookupTableInjection_H
52 #define KinematicLookupTableInjection_H
54 #include "InjectionModel.H"
55 #include "kinematicParcelInjectionDataIOList.H"
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 /*---------------------------------------------------------------------------*\
63 Class KinematicLookupTableInjection Declaration
64 \*---------------------------------------------------------------------------*/
66 template<class CloudType>
67 class KinematicLookupTableInjection
69 public InjectionModel<CloudType>
73 //- Name of file containing injector/parcel data
74 const word inputFileName_;
76 //- Injection duration - common to all injection sources
77 const scalar duration_;
79 //- Number of parcels per injector - common to all injection sources
80 const label nParcelsPerSecond_;
83 kinematicParcelInjectionDataIOList injectors_;
85 //- List of injector cells per injector
86 List<label> injectorCells_;
91 // Protected member functions
93 //- Number of parcels to introduce over the time step relative to SOI
100 //- Volume of parcels to introduce over the time step relative to SOI
101 scalar volumeToInject
110 //- Runtime type information
111 TypeName("KinematicLookupTableInjection");
116 //- Construct from dictionary
117 KinematicLookupTableInjection
119 const dictionary& dict,
125 virtual ~KinematicLookupTableInjection();
130 //- Flag to indicate whether model activates injection model
133 //- Return the end-of-injection time
134 scalar timeEnd() const;
137 // Injection geometry
139 //- Set the injection position and owner cell
140 virtual void setPositionAndCell
143 const label nParcels,
149 //- Set the parcel properties
150 virtual void setProperties
153 const label nParcels,
155 typename CloudType::parcelType& parcel
158 //- Flag to identify whether model fully describes the parcel
159 virtual bool fullyDescribed() const;
161 //- Return flag to identify whether or not injection of parcelI is
163 virtual bool validInjection(const label parcelI);
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 } // End namespace Foam
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 # include "KinematicLookupTableInjection.C"
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 // ************************************************************************* //