1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 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 unitInjector_H
39 #define unitInjector_H
41 #include "injectorType.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class unitInjector Declaration
51 \*---------------------------------------------------------------------------*/
60 typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
64 dictionary propsDict_;
73 List<pair> massFlowRateProfile_;
74 List<pair> velocityProfile_;
75 List<pair> injectionPressureProfile_;
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 unitInjector(const unitInjector&);
92 //- Disallow default bitwise assignment
93 void operator=(const unitInjector&);
95 //- Create two vectors orthonoal to each other
96 // and the injection vector
97 void setTangentialVectors();
99 //- Return the fraction of the total injected liquid
100 scalar fractionOfInjection(const scalar time) const;
105 //- Runtime type information
106 TypeName("unitInjector");
111 //- Construct from components
115 const dictionary& dict
126 //- Return number of particles to inject
127 label nParcelsToInject
133 //- Return the injection position
134 const vector position(const label n) const;
136 //- Return the injection position
142 const scalar angleOfWedge,
143 const vector& axisOfSymmetry,
144 const vector& axisOfWedge,
145 const vector& axisOfWedgeNormal,
149 //- Return the number of holes
150 label nHoles() const;
152 //- Return the injector diameter
155 //- Return the injection direction
156 const vector& direction
162 //- Return the mass of the injected particle
168 const scalar angleOfWedge
171 //- Return the mass injected by the injector
174 //- Return the fuel mass fractions of the injected particle
175 const scalarField& X() const;
177 //- Return the temperature profile of the injected particle
178 List<pair> T() const;
180 //- Return the temperature of the injected particle
181 scalar T(const scalar time) const;
183 //- Return the start-of-injection time
186 //- Return the end-of-injection time
189 //- Return the injected liquid mass
190 scalar injectedMass(const scalar t) const;
192 List<pair> massFlowRateProfile() const
194 return massFlowRateProfile_;
197 scalar massFlowRate(const scalar time) const;
199 List<pair> injectionPressureProfile() const
201 return injectionPressureProfile_;
204 scalar injectionPressure(const scalar time) const;
206 List<pair> velocityProfile() const
208 return velocityProfile_;
211 scalar velocity(const scalar time) const;
213 List<pair> CdProfile() const;
214 scalar Cd(const scalar time) const;
216 vector tan1(const label n) const;
217 vector tan2(const label n) const;
221 const liquidMixture& fuel,
222 const scalar referencePressure
225 bool pressureIndependentVelocity() const
227 return pressureIndependentVelocity_;
233 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
235 } // End namespace Foam
237 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
241 // ************************************************************************* //