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
32 - time of start of injection
34 - direction (along injection axis)
37 - inner and outer cone angles
38 - Parcel diameters obtained by PDF model
43 \*---------------------------------------------------------------------------*/
45 #ifndef ConeInjection_H
46 #define ConeInjection_H
48 #include "InjectionModel.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 // Forward declaration of classes
61 /*---------------------------------------------------------------------------*\
62 Class ConeInjection Declaration
63 \*---------------------------------------------------------------------------*/
65 template<class CloudType>
68 public InjectionModel<CloudType>
72 //- Injection duration [s]
73 const scalar duration_;
75 //- Injector position [m]
78 //- Cell containing injector position []
81 //- Injector direction []
84 //- Number of parcels to introduce per second []
85 const label parcelsPerSecond_;
87 //- Volume flow rate of parcels to introduce relative to SOI [m^3]
88 const autoPtr<DataEntry<scalar> > volumeFlowRate_;
90 //- Parcel velocity magnitude relative to SOI [m/s]
91 const autoPtr<DataEntry<scalar> > Umag_;
93 //- Inner cone angle relative to SOI [deg]
94 const autoPtr<DataEntry<scalar> > thetaInner_;
96 //- Outer cone angle relative to SOI [deg]
97 const autoPtr<DataEntry<scalar> > thetaOuter_;
99 //- Parcel size PDF model
100 const autoPtr<pdf> parcelPDF_;
103 // Tangential vectors to the direction vector
105 //- First tangential vector
108 //- Second tangential vector
114 // Protected member functions
116 //- Number of parcels to introduce over the time step relative to SOI
117 label parcelsToInject
123 //- Number of parcels to introduce over the time step relative to SOI
124 scalar volumeToInject
133 //- Runtime type information
134 TypeName("ConeInjection");
139 //- Construct from dictionary
142 const dictionary& dict,
148 virtual ~ConeInjection();
153 //- Flag to indicate whether model activates injection model
156 //- Return the end-of-injection time
157 scalar timeEnd() const;
160 // Injection geometry
162 //- Set the injection position and owner cell
163 virtual void setPositionAndCell
166 const label nParcels,
172 //- Set the parcel properties
173 virtual void setProperties
176 const label nParcels,
178 typename CloudType::parcelType& parcel
181 //- Flag to identify whether model fully describes the parcel
182 virtual bool fullyDescribed() const;
184 //- Return flag to identify whether or not injection of parcelI is
186 virtual bool validInjection(const label parcelI);
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 } // End namespace Foam
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 # include "ConeInjection.C"
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 // ************************************************************************* //