1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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
29 User specified MFR vs time and velocity vs time
35 \*---------------------------------------------------------------------------*/
37 #ifndef definedInjector_H
38 #define definedInjector_H
40 #include "injectorType.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class definedInjector Declaration
50 \*---------------------------------------------------------------------------*/
61 typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
63 dictionary propsDict_;
72 List<pair> massFlowRateProfile_; // aj
73 List<pair> velocityProfile_; // aj
74 List<pair> injectionPressureProfile_;
75 List<pair> CdProfile_;
77 scalar averageParcelMass_;
79 bool pressureIndependentVelocity_;
81 //- two orthogonal vectors that are also orthogonal
82 // to the injection direction
83 vector tangentialInjectionVector1_, tangentialInjectionVector2_;
86 // Private Member Functions
88 //- Disallow default bitwise copy construct
89 definedInjector(const definedInjector&);
91 //- Disallow default bitwise assignment
92 void operator=(const definedInjector&);
94 //- Create two vectors orthonoal to each other
95 // and the injection vector
96 void setTangentialVectors();
98 //- Return the fraction of the total injected liquid
99 scalar fractionOfInjection(const scalar time) const;
101 //- Return the instantaneous injection velocity
102 scalar injectionVelocity(const scalar) const;
106 //- Runtime type information
107 TypeName("definedInjector");
112 //- Construct from components
116 const dictionary& dict
127 //- Return number of particles to inject
128 label nParcelsToInject
134 //- Return the injection position
135 const vector position() const;
137 //- Return the injection position
142 const scalar angleOfWedge,
143 const vector& axisOfSymmetry,
144 const vector& axisOfWedge,
145 const vector& axisOfWedgeNormal,
149 //- Return the injector diameter
152 //- Return the injection direction
153 const vector& direction() const;
155 //- Return the mass of the injected particle
161 const scalar angleOfWedge
164 //- Return the mass injected by the injector
167 //- Return the fuel mass fractions of the injected particle
168 const scalarField& X() const;
170 //- Return the temperature profile of the injected particle
171 List<pair> T() const;
173 //- Return the temperature of the injected particle
174 scalar T(const scalar time) const;
176 //- Return the start-of-injection time
179 //- Return the end-of-injection time
182 //- Return the injected liquid mass
183 scalar injectedMass(const scalar t) const;
185 List<pair> massFlowRateProfile() const
187 return massFlowRateProfile_;
190 scalar massFlowRate(const scalar time) const;
192 List<pair> injectionPressureProfile() const
194 return injectionPressureProfile_;
197 scalar injectionPressure(const scalar time) const;
199 List<pair> velocityProfile() const
201 return velocityProfile_;
204 scalar velocity(const scalar time) const;
206 List<pair> CdProfile() const
211 scalar Cd(const scalar time) const;
215 const liquidMixture& fuel,
216 const scalar referencePressure
219 bool pressureIndependentVelocity() const
221 return pressureIndependentVelocity_;
227 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229 } // End namespace Foam
231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
235 // ************************************************************************* //