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/>.
28 User specified MFR vs time and velocity vs time
34 \*---------------------------------------------------------------------------*/
36 #ifndef definedInjector_H
37 #define definedInjector_H
39 #include "injectorType.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class definedInjector Declaration
49 \*---------------------------------------------------------------------------*/
60 typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
62 dictionary propsDict_;
71 List<pair> massFlowRateProfile_;
72 List<pair> velocityProfile_;
73 List<pair> injectionPressureProfile_;
74 List<pair> CdProfile_;
76 scalar averageParcelMass_;
78 bool pressureIndependentVelocity_;
80 //- two orthogonal vectors that are also orthogonal
81 // to the injection direction
82 vector tangentialInjectionVector1_, tangentialInjectionVector2_;
85 // Private Member Functions
87 //- Disallow default bitwise copy construct
88 definedInjector(const definedInjector&);
90 //- Disallow default bitwise assignment
91 void operator=(const definedInjector&);
93 //- Create two vectors orthonoal to each other
94 // and the injection vector
95 void setTangentialVectors();
97 //- Return the fraction of the total injected liquid
98 scalar fractionOfInjection(const scalar time) const;
100 //- Return the instantaneous injection velocity
101 scalar injectionVelocity(const scalar) const;
106 //- Runtime type information
107 TypeName("definedInjector");
112 //- Construct from components
113 definedInjector(const Time& t, const dictionary& dict);
117 virtual ~definedInjector();
122 //- Return number of particles to inject
123 label nParcelsToInject
129 //- Return the injection position
130 const vector position(const label n) const;
132 //- Return the injection position
138 const scalar angleOfWedge,
139 const vector& axisOfSymmetry,
140 const vector& axisOfWedge,
141 const vector& axisOfWedgeNormal,
145 //- Return the number of holes
146 label nHoles() const;
148 //- Return the injector diameter
151 //- Return the injection direction
152 const vector& direction
158 //- Return the mass of the injected particle
164 const scalar angleOfWedge
167 //- Return the mass injected by the injector
170 //- Return the fuel mass fractions of the injected particle
171 const scalarField& X() const;
173 //- Return the temperature profile of the injected particle
174 List<pair> T() const;
176 //- Return the temperature of the injected particle
177 scalar T(const scalar time) const;
179 //- Return the start-of-injection time
182 //- Return the end-of-injection time
185 //- Return the injected liquid mass
186 scalar injectedMass(const scalar t) const;
188 List<pair> massFlowRateProfile() const
190 return massFlowRateProfile_;
193 scalar massFlowRate(const scalar time) const;
195 List<pair> injectionPressureProfile() const
197 return injectionPressureProfile_;
200 scalar injectionPressure(const scalar time) const;
202 List<pair> velocityProfile() const
204 return velocityProfile_;
207 scalar velocity(const scalar time) const;
209 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 liquidMixtureProperties& fuel,
222 const scalar referencePressure
225 bool pressureIndependentVelocity() const
227 return pressureIndependentVelocity_;
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 } // End namespace Foam
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
240 // ************************************************************************* //