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
26 Foam::commonRailInjector
34 commonRailInjectorIO.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef commonRailInjector_H
39 #define commonRailInjector_H
41 #include "injectorType.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class commonRailInjector Declaration
51 \*---------------------------------------------------------------------------*/
53 class commonRailInjector
60 typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
64 dictionary propsDict_;
70 scalar injectionPressure_;
74 List<pair> massFlowRateProfile_;
75 List<pair> velocityProfile_;
76 List<pair> injectionPressureProfile_;
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 commonRailInjector(const commonRailInjector&);
93 //- Disallow default bitwise assignment
94 void operator=(const commonRailInjector&);
96 //- Create two vectors orthonoal to each other
97 // and the injection vector
98 void setTangentialVectors();
100 //- Return the fraction of the total injected liquid
101 scalar fractionOfInjection(const scalar time) const;
106 //- Runtime type information
107 TypeName("commonRailInjector");
112 //- Construct from components
116 const dictionary& dict
122 ~commonRailInjector();
127 //- Return number of particles to inject
128 label nParcelsToInject
134 //- Return the injection position
135 const vector position(const label n) const;
137 //- Return the injection position
143 const scalar angleOfWedge,
144 const vector& axisOfSymmetry,
145 const vector& axisOfWedge,
146 const vector& axisOfWedgeNormal,
150 //- Return the number of holes
151 label nHoles() const;
153 //- Return the injector diameter
156 //- Return the injection direction
157 const vector& direction
163 //- Return the mass of the injected particle
169 const scalar angleOfWedge
172 //- Return the mass injected by the injector
175 //- Return the fuel mass fractions of the injected particle
176 const scalarField& X() const;
178 //- Return the temperature profile of the injected particle
179 List<pair> T() const;
181 //- Return the temperature of the injected particle
182 scalar T(const scalar time) const;
184 //- Return the start-of-injection time
187 //- Return the end-of-injection time
190 //- Return the injected liquid mass
191 scalar injectedMass(const scalar t) const;
193 List<pair> massFlowRateProfile() const
195 return massFlowRateProfile_;
198 scalar massFlowRate(const scalar time) const;
200 List<pair> injectionPressureProfile() const
202 return injectionPressureProfile_;
205 scalar injectionPressure(const scalar time) const;
207 List<pair> velocityProfile() const
209 return velocityProfile_;
212 scalar velocity(const scalar time) const;
214 List<pair> CdProfile() const;
215 scalar Cd(const scalar time) const;
217 vector tan1(const label n) const;
218 vector tan2(const label n) const;
222 const liquidMixture& fuel,
223 const scalar referencePressure
226 bool pressureIndependentVelocity() const
228 return pressureIndependentVelocity_;
234 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236 } // End namespace Foam
238 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
242 // ************************************************************************* //