1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. 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;
109 //- Return the average injection velocity
110 scalar averageInjectionVelocityTime(const scalar liquidDensity) const;
112 //- Return the instantaneous injection velocity
113 scalar injectionVelocity(const scalar, const scalar liquidDensity) const;
119 //- Runtime type information
120 TypeName("swirlInjector");
125 //- Construct from components
129 const dictionary& dict
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 liquidMixture& fuel,
236 const scalar referencePressure
239 bool pressureIndependentVelocity() const
241 return pressureIndependentVelocity_;
246 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
248 } // End namespace Foam
250 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
254 // ************************************************************************* //