1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011-2011 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::ConeNozzleInjection
31 - time of start of injection
33 - direction (along injection axis)
35 - inner and outer cone angles
37 - Parcel diameters obtained by size distribution model
39 - Parcel velocity is calculated as:
42 U = <specified by user>
43 - Pressure driven velocity
44 U = sqrt(2*(Pinj - Pamb)/rho)
45 - Flow rate and discharge
51 \*---------------------------------------------------------------------------*/
53 #ifndef ConeNozzleInjection_H
54 #define ConeNozzleInjection_H
56 #include "InjectionModel.H"
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 // Forward declaration of classes
68 class distributionModel;
70 /*---------------------------------------------------------------------------*\
71 Class ConeNozzleInjection Declaration
72 \*---------------------------------------------------------------------------*/
74 template<class CloudType>
75 class ConeNozzleInjection
77 public InjectionModel<CloudType>
81 //- Injection method enumeration
88 //- Flow type enumeration
92 ftPressureDrivenVelocity,
93 ftFlowRateAndDischarge
101 //- Point/disc injection method
102 injectionMethod injectionMethod_;
107 //- Outer nozzle diameter [m]
108 const scalar outerDiameter_;
110 //- Inner nozzle diameter [m]
111 const scalar innerDiameter_;
113 //- Injection duration [s]
114 const scalar duration_;
116 //- Injector position [m]
119 //- Cell containing injector position []
122 //- Index of tet face for injector cell
125 //- Index of tet point for injector cell
128 //- Injector direction []
131 //- Number of parcels to introduce per second []
132 const label parcelsPerSecond_;
134 //- Volume flow rate of parcels to introduce relative to SOI [m^3/s]
135 const autoPtr<DataEntry<scalar> > volumeFlowRate_;
137 //- Inner cone angle relative to SOI [deg]
138 const autoPtr<DataEntry<scalar> > thetaInner_;
140 //- Outer cone angle relative to SOI [deg]
141 const autoPtr<DataEntry<scalar> > thetaOuter_;
143 //- Parcel size PDF model
144 const autoPtr<distributionModels::distributionModel> sizeDistribution_;
147 // Tangential vectors to the direction vector
149 //- First tangential vector
152 //- Second tangential vector
155 //- injection vector orthogonal to direction
159 // Velocity model coefficients
161 //- Constant velocity [m/s]
164 //- Discharge coefficient, relative to SOI [m/s]
165 autoPtr<DataEntry<scalar> > Cd_;
167 //- Injection pressure [Pa]
168 autoPtr<DataEntry<scalar> > Pinj_;
171 // Private Member Functions
173 //- Set the injection type
174 void setInjectionMethod();
176 //- Set the injection flow type
182 //- Runtime type information
183 TypeName("coneNozzleInjection");
188 //- Construct from dictionary
189 ConeNozzleInjection(const dictionary& dict, CloudType& owner);
192 ConeNozzleInjection(const ConeNozzleInjection<CloudType>& im);
194 //- Construct and return a clone
195 virtual autoPtr<InjectionModel<CloudType> > clone() const
197 return autoPtr<InjectionModel<CloudType> >
199 new ConeNozzleInjection<CloudType>(*this)
205 virtual ~ConeNozzleInjection();
210 //- Return the end-of-injection time
211 scalar timeEnd() const;
213 //- Number of parcels to introduce relative to SOI
214 virtual label parcelsToInject(const scalar time0, const scalar time1);
216 //- Volume of parcels to introduce relative to SOI
217 virtual scalar volumeToInject(const scalar time0, const scalar time1);
220 // Injection geometry
222 //- Set the injection position and owner cell
223 virtual void setPositionAndCell
226 const label nParcels,
234 //- Set the parcel properties
235 virtual void setProperties
238 const label nParcels,
240 typename CloudType::parcelType& parcel
243 //- Flag to identify whether model fully describes the parcel
244 virtual bool fullyDescribed() const;
246 //- Return flag to identify whether or not injection of parcelI is
248 virtual bool validInjection(const label parcelI);
252 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
254 } // End namespace Foam
256 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
259 # include "ConeNozzleInjection.C"
262 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
266 // ************************************************************************* //