1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::commonRailInjector
33 commonRailInjectorIO.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef commonRailInjector_H
38 #define commonRailInjector_H
40 #include "injectorType.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class commonRailInjector Declaration
50 \*---------------------------------------------------------------------------*/
52 class commonRailInjector
59 typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
63 dictionary propsDict_;
69 scalar injectionPressure_;
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 commonRailInjector(const commonRailInjector&);
92 //- Disallow default bitwise assignment
93 void operator=(const commonRailInjector&);
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("commonRailInjector");
111 //- Construct from components
112 commonRailInjector(const Time& t, const dictionary& dict);
116 virtual ~commonRailInjector();
121 //- Return number of particles to inject
122 label nParcelsToInject
128 //- Return the injection position
129 const vector position(const label n) const;
131 //- Return the injection position
137 const scalar angleOfWedge,
138 const vector& axisOfSymmetry,
139 const vector& axisOfWedge,
140 const vector& axisOfWedgeNormal,
144 //- Return the number of holes
145 label nHoles() const;
147 //- Return the injector diameter
150 //- Return the injection direction
151 const vector& direction
157 //- Return the mass of the injected particle
163 const scalar angleOfWedge
166 //- Return the mass injected by the injector
169 //- Return the fuel mass fractions of the injected particle
170 const scalarField& X() const;
172 //- Return the temperature profile of the injected particle
173 List<pair> T() const;
175 //- Return the temperature of the injected particle
176 scalar T(const scalar time) const;
178 //- Return the start-of-injection time
181 //- Return the end-of-injection time
184 //- Return the injected liquid mass
185 scalar injectedMass(const scalar t) const;
187 List<pair> massFlowRateProfile() const
189 return massFlowRateProfile_;
192 scalar massFlowRate(const scalar time) const;
194 List<pair> injectionPressureProfile() const
196 return injectionPressureProfile_;
199 scalar injectionPressure(const scalar time) const;
201 List<pair> velocityProfile() const
203 return velocityProfile_;
206 scalar velocity(const scalar time) const;
208 List<pair> CdProfile() const;
209 scalar Cd(const scalar time) const;
211 vector tan1(const label n) const;
212 vector tan2(const label n) const;
216 const liquidMixtureProperties& fuel,
217 const scalar referencePressure
220 bool pressureIndependentVelocity() const
222 return pressureIndependentVelocity_;
227 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229 } // End namespace Foam
231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
235 // ************************************************************************* //