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::ThermoLookupTableInjection
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 // injector 1
34 (x y z) (u v w) d rho mDot T cp // injector 2
36 (x y z) (u v w) d rho mDot T cp // 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]
49 ThermoLookupTableInjection.C
51 \*---------------------------------------------------------------------------*/
53 #ifndef ThermoLookupTableInjection_H
54 #define ThermoLookupTableInjection_H
56 #include "InjectionModel.H"
57 #include "kinematicParcelInjectionDataIOList.H"
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 /*---------------------------------------------------------------------------*\
65 Class ThermoLookupTableInjection Declaration
66 \*---------------------------------------------------------------------------*/
68 template<class CloudType>
69 class ThermoLookupTableInjection
71 public InjectionModel<CloudType>
75 //- Name of file containing injector/parcel data
76 const word inputFileName_;
78 //- Injection duration - common to all injection sources
79 const scalar duration_;
81 //- Number of parcels per injector - common to all injection sources
82 const label nParcelsPerSecond_;
85 kinematicParcelInjectionDataIOList injectors_;
87 //- List of injector cells per injector
88 List<label> injectorCells_;
93 // Protected member functions
95 //- Number of parcels to introduce over the time step relative to SOI
102 //- Volume of parcels to introduce over the time step relative to SOI
103 scalar volumeToInject
112 //- Runtime type information
113 TypeName("ThermoLookupTableInjection");
118 //- Construct from dictionary
119 ThermoLookupTableInjection
121 const dictionary& dict,
127 virtual ~ThermoLookupTableInjection();
132 //- Flag to indicate whether model activates injection model
135 //- Return the end-of-injection time
136 scalar timeEnd() const;
139 // Injection geometry
141 //- Set the injection position and owner cell
142 virtual void setPositionAndCell
145 const label nParcels,
151 //- Set the parcel properties
152 virtual void setProperties
155 const label nParcels,
157 typename CloudType::parcelType& parcel
160 //- Flag to identify whether model fully describes the parcel
161 virtual bool fullyDescribed() const
166 //- Return flag to identify whether or not injection of parcelI is
168 virtual bool validInjection(const label parcelI);
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 } // End namespace Foam
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 # include "ThermoLookupTableInjection.C"
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 // ************************************************************************* //