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::KinematicLookupTableInjection
29 Particle injection sources read from look-up table. Each row corresponds to
33 (x y z u v w d rho mDot)
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]
44 KinematicLookupTableInjection.C
46 \*---------------------------------------------------------------------------*/
48 #ifndef KinematicLookupTableInjection_H
49 #define KinematicLookupTableInjection_H
51 #include "InjectionModel.H"
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 /*---------------------------------------------------------------------------*\
60 Class KinematicLookupTableInjection Declaration
61 \*---------------------------------------------------------------------------*/
63 template<class CloudType>
64 class KinematicLookupTableInjection
66 public InjectionModel<CloudType>
70 //- Name of file containing injector/parcel data
71 const word inputFileName_;
73 //- Injection duration - common to all injection sources
74 const scalar duration_;
76 //- Number of parcels per injector - common to all injection sources
77 const label nParcelsPerSecond_;
79 //- List of parcel position per injector / [m]
82 //- List of parcel velocity per injector / [m]
85 //- List of parcel diameter per injector / [m]
88 //- List of parcel fluid density pre injector / [kg/m3]
91 //- List of parcel injection mass flow per injector / [kg/s]
94 //- List of injector cells per injector
95 List<label> injectorCells_;
97 //- Number of columns expected in input file
98 static label INPUT_FILE_COLS;
103 // Protected member functions
105 //- Number of parcels to introduce over the time step relative to SOI
106 label parcelsToInject
112 //- Volume of parcels to introduce over the time step relative to SOI
113 scalar volumeToInject
122 //- Runtime type information
123 TypeName("KinematicLookupTableInjection");
128 //- Construct from dictionary
129 KinematicLookupTableInjection
131 const dictionary& dict,
137 virtual ~KinematicLookupTableInjection();
142 //- Flag to indicate whether model activates injection model
145 //- Return the end-of-injection time
146 scalar timeEnd() const;
149 // Injection geometry
151 //- Set the injection position and owner cell
152 virtual void setPositionAndCell
155 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 "KinematicLookupTableInjection.C"
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 // ************************************************************************* //