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
36 \*---------------------------------------------------------------------------*/
38 #ifndef swirlInjector_H
39 #define swirlInjector_H
41 #include "injectorType.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class swirlInjector Declaration
51 \*---------------------------------------------------------------------------*/
62 typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
64 dictionary propsDict_;
70 scalar injectionPressure_;
74 List<pair> massFlowRateProfile_;
75 List<pair> injectionPressureProfile_;
76 List<pair> velocityProfile_;
77 List<pair> CdProfile_;
79 scalar averageParcelMass_;
81 bool pressureIndependentVelocity_;
83 //- two orthogonal vectors that are also orthogonal
84 // to the injection direction
85 vector tangentialInjectionVector1_, tangentialInjectionVector2_;
88 // Private Member Functions
90 //- Disallow default bitwise copy construct
91 swirlInjector(const swirlInjector&);
93 //- Disallow default bitwise assignment
94 void operator=(const swirlInjector&);
96 //- Integrate the mass-flow profile and set
98 void setIntegralProfileValue();
100 //- Create two vectors orthonoal to each other
101 // and the injection vector
102 void setTangentialVectors();
104 //- Return the fraction of the total injected liquid
105 scalar fractionOfInjection(const scalar time) const;
110 //- Return the average injection velocity
111 scalar averageInjectionVelocityTime(const scalar liquidDensity) const;
113 //- Return the instantaneous injection velocity
114 scalar injectionVelocity(const scalar, const scalar liquidDensity) const;
120 //- Runtime type information
121 TypeName("swirlInjector");
126 //- Construct from components
130 const dictionary& dict
141 //- Return number of particles to inject
142 label nParcelsToInject
148 //- Return the injection position
149 const vector position(const label n) const;
151 //- Return the injection position
157 const scalar angleOfWedge,
158 const vector& axisOfSymmetry,
159 const vector& axisOfWedge,
160 const vector& axisOfWedgeNormal,
164 //- Return the number of holes
165 label nHoles() const;
167 //- Return the injector diameter
170 //- Return the injection direction
171 const vector& direction
177 //- Return the mass of the injected particle
183 const scalar angleOfWedge
186 //- Return the mass injected by the injector
189 //- Return the mass flow rate profile
190 List<pair> massFlowRateProfile() const;
192 //- Return the instantaneous mass flow rate profile
193 scalar massFlowRate(const scalar time) const;
195 //- Return the pressure injection profile
196 List<pair> injectionPressureProfile() const;
198 //- Return the instantaneous injection pressure
199 scalar injectionPressure(const scalar time) const;
201 //- Return the velocity injection profile
202 List<pair> velocityProfile() const;
204 //- Return the instantaneous velocity
205 scalar velocity(const scalar time) const;
207 //- Return the discharge coefficient
208 List<pair> CdProfile() const;
210 //- Return the instantaneous discharge coefficient
211 scalar Cd(const scalar time) const;
213 //- Return the fuel mass fractions of the injected particle
214 const scalarField& X() const;
216 //- Return the temperatue profile of the injected parcel
217 List<pair> T() const;
219 //- Return the temperatue of the injected parcel
220 scalar T(const scalar time) const;
222 //- Return the start-of-injection time
225 //- Return the end-of-injection time
228 //- Return the injected liquid mass
229 scalar injectedMass(const scalar t) const;
231 vector tan1(const label n) const;
232 vector tan2(const label n) const;
236 const liquidMixture& fuel,
237 const scalar referencePressure
240 bool pressureIndependentVelocity() const
242 return pressureIndependentVelocity_;
247 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
249 } // End namespace Foam
251 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
255 // ************************************************************************* //