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
29 Cone injection multi-point
32 - time of start of injection
34 - directions (along injection axes)
37 - inner and outer cone angles
38 - Parcel diameters obtained by PDF model
43 \*---------------------------------------------------------------------------*/
45 #ifndef ConeInjectionMP_H
46 #define ConeInjectionMP_H
48 #include "InjectionModel.H"
50 #include "vectorList.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 // Forward declaration of classes
62 /*---------------------------------------------------------------------------*\
63 Class ConeInjectionMP Declaration
64 \*---------------------------------------------------------------------------*/
66 template<class CloudType>
69 public InjectionModel<CloudType>
73 //- Name of file containing positions data
74 const word positionsFile_;
76 //- Field of injector positions
77 vectorIOField positions_;
79 //- Field of cell labels corresoponding to injector positions
80 labelList injectorCells_;
82 //- Name of file containing axes data
85 //- Field of injector positions
88 //- Injection duration [s]
89 const scalar duration_;
91 //- Number of parcels to introduce per injector
92 const label parcelsPerInjector_;
94 //- Volume flow rate of parcels to introduce relative to SOI [m^3]
95 const autoPtr<DataEntry<scalar> > volumeFlowRate_;
97 //- Parcel velocity magnitude relative to SOI [m/s]
98 const autoPtr<DataEntry<scalar> > Umag_;
100 //- Inner cone angle relative to SOI [deg]
101 const autoPtr<DataEntry<scalar> > thetaInner_;
103 //- Outer cone angle relative to SOI [deg]
104 const autoPtr<DataEntry<scalar> > thetaOuter_;
106 //- Parcel size PDF model
107 const autoPtr<pdf> parcelPDF_;
109 //- Number of parcels per injector already injected
110 mutable label nInjected_;
113 // Tangential vectors to the direction vector
115 //- First tangential vector
118 //- Second tangential vector
124 // Protected member functions
126 //- Number of parcels to introduce over the time step
127 label parcelsToInject
133 //- Number of parcels to introduce over the time step
134 scalar volumeToInject
143 //- Runtime type information
144 TypeName("ConeInjectionMP");
149 //- Construct from dictionary
152 const dictionary& dict,
158 virtual ~ConeInjectionMP();
163 //- Flag to indicate whether model activates injection model
166 //- Return the end-of-injection time
167 scalar timeEnd() const;
170 // Injection geometry
172 //- Set the injection position and owner cell
173 virtual void setPositionAndCell
176 const label nParcels,
182 //- Set the parcel properties
183 virtual void setProperties
186 const label nParcels,
188 typename CloudType::parcelType& parcel
191 //- Flag to identify whether model fully describes the parcel
192 virtual bool fullyDescribed() const;
194 //- Return flag to identify whether or not injection of parcelI is
196 virtual bool validInjection(const label parcelI);
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 } // End namespace Foam
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 # include "ConeInjectionMP.C"
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 // ************************************************************************* //