1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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/>.
35 \*---------------------------------------------------------------------------*/
37 #ifndef swirlInjector_H
38 #define swirlInjector_H
40 #include "injectorType.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class swirlInjector Declaration
50 \*---------------------------------------------------------------------------*/
61 typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
63 dictionary propsDict_;
69 scalar injectionPressure_;
73 List<pair> massFlowRateProfile_;
74 List<pair> injectionPressureProfile_;
75 List<pair> velocityProfile_;
76 List<pair> CdProfile_;
78 scalar averageParcelMass_;
80 bool pressureIndependentVelocity_;
82 //- two orthogonal vectors that are also orthogonal
83 // to the injection direction
84 vector tangentialInjectionVector1_, tangentialInjectionVector2_;
87 // Private Member Functions
89 //- Disallow default bitwise copy construct
90 swirlInjector(const swirlInjector&);
92 //- Disallow default bitwise assignment
93 void operator=(const swirlInjector&);
95 //- Integrate the mass-flow profile and set
97 void setIntegralProfileValue();
99 //- Create two vectors orthonoal to each other
100 // and the injection vector
101 void setTangentialVectors();
103 //- Return the fraction of the total injected liquid
104 scalar fractionOfInjection(const scalar time) const;
107 // //- Return the average injection velocity
108 // scalar averageInjectionVelocityTime
110 // const scalar liquidDensity
113 // //- Return the instantaneous injection velocity
114 // scalar injectionVelocity
117 // const scalar liquidDensity
124 //- Runtime type information
125 TypeName("swirlInjector");
130 //- Construct from components
131 swirlInjector(const Time& t, const dictionary& dict);
135 virtual ~swirlInjector();
140 //- Return number of particles to inject
141 label nParcelsToInject
147 //- Return the injection position
148 const vector position(const label n) const;
150 //- Return the injection position
156 const scalar angleOfWedge,
157 const vector& axisOfSymmetry,
158 const vector& axisOfWedge,
159 const vector& axisOfWedgeNormal,
163 //- Return the number of holes
164 label nHoles() const;
166 //- Return the injector diameter
169 //- Return the injection direction
170 const vector& direction
176 //- Return the mass of the injected particle
182 const scalar angleOfWedge
185 //- Return the mass injected by the injector
188 //- Return the mass flow rate profile
189 List<pair> massFlowRateProfile() const;
191 //- Return the instantaneous mass flow rate profile
192 scalar massFlowRate(const scalar time) const;
194 //- Return the pressure injection profile
195 List<pair> injectionPressureProfile() const;
197 //- Return the instantaneous injection pressure
198 scalar injectionPressure(const scalar time) const;
200 //- Return the velocity injection profile
201 List<pair> velocityProfile() const;
203 //- Return the instantaneous velocity
204 scalar velocity(const scalar time) const;
206 //- Return the discharge coefficient
207 List<pair> CdProfile() const;
209 //- Return the instantaneous discharge coefficient
210 scalar Cd(const scalar time) const;
212 //- Return the fuel mass fractions of the injected particle
213 const scalarField& X() const;
215 //- Return the temperatue profile of the injected parcel
216 List<pair> T() const;
218 //- Return the temperatue of the injected parcel
219 scalar T(const scalar time) const;
221 //- Return the start-of-injection time
224 //- Return the end-of-injection time
227 //- Return the injected liquid mass
228 scalar injectedMass(const scalar t) const;
230 vector tan1(const label n) const;
231 vector tan2(const label n) const;
235 const liquidMixtureProperties& fuel,
236 const scalar referencePressure
239 bool pressureIndependentVelocity() const
241 return pressureIndependentVelocity_;
246 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
248 } // End namespace Foam
250 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
254 // ************************************************************************* //