OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

multiHoleInjector.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::multiHoleInjector
00027 
00028 Description
00029     The unit injector
00030 
00031 SourceFiles
00032     multiHoleInjectorI.H
00033     multiHoleInjector.C
00034     multiHoleInjectorIO.C
00035 
00036 \*---------------------------------------------------------------------------*/
00037 
00038 #ifndef multiHoleInjector_H
00039 #define multiHoleInjector_H
00040 
00041 #include "injectorType.H"
00042 #include "vector.H"
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                            Class multiHoleInjector Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class multiHoleInjector
00054 :
00055     public injectorType
00056 {
00057 
00058 private:
00059 
00060     typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
00061 
00062     // Private data
00063 
00064         dictionary propsDict_;
00065 
00066         vector centerPosition_;
00067         scalar xyAngle_;
00068         scalar zAngle_;
00069         label nHoles_;
00070         scalar umbrellaAngle_;
00071         scalar nozzleTipDiameter_;
00072         List<scalar> angleSpacing_;
00073         scalar d_;
00074         scalar Cd_;
00075         scalar mass_;
00076         label nParcels_;
00077         scalarField X_;
00078         List<pair> massFlowRateProfile_;
00079         List<pair> velocityProfile_;
00080         List<pair> injectionPressureProfile_;
00081         List<pair> CdProfile_;
00082         List<pair> TProfile_;
00083         scalar averageParcelMass_;
00084         List<vector> direction_;
00085         List<vector> position_;
00086 
00087         bool pressureIndependentVelocity_;
00088 
00089         //- two orthogonal vectors that are also orthogonal
00090         //  to the injection direction
00091         List<vector> tangentialInjectionVector1_, tangentialInjectionVector2_;
00092 
00093 
00094     // Private Member Functions
00095 
00096         //- Disallow default bitwise copy construct
00097         multiHoleInjector(const multiHoleInjector&);
00098 
00099         //- Disallow default bitwise assignment
00100         void operator=(const multiHoleInjector&);
00101 
00102         //- Create two vectors orthonoal to each other
00103         //  and the injection vector
00104         void setTangentialVectors();
00105 
00106         //- Return the fraction of the total injected liquid
00107         scalar fractionOfInjection(const scalar time) const;
00108 
00109 
00110 public:
00111 
00112     //- Runtime type information
00113     TypeName("multiHoleInjector");
00114 
00115 
00116     // Constructors
00117 
00118         //- Construct from components
00119         multiHoleInjector
00120         (
00121             const Time& t,
00122             const dictionary& dict
00123         );
00124 
00125 
00126     // Destructor
00127 
00128         ~multiHoleInjector();
00129 
00130 
00131     // Member Functions
00132 
00133         //- Return number of particles to inject
00134         label nParcelsToInject
00135         (
00136             const scalar t0,
00137             const scalar t1
00138         ) const;
00139 
00140         //- Return the injection position
00141         const vector position(const label n) const;
00142 
00143         //- Return the injection position
00144         vector position
00145         (
00146             const label n,
00147             const scalar time,
00148             const bool twoD,
00149             const scalar angleOfWedge,
00150             const vector& axisOfSymmetry,
00151             const vector& axisOfWedge,
00152             const vector& axisOfWedgeNormal,
00153             Random& rndGen
00154         ) const;
00155     
00156         //- Return the number of holes
00157         label nHoles() const;
00158 
00159         //- Return the injector diameter
00160         scalar d() const;
00161 
00162         //- Return the injection direction
00163         const vector& direction
00164         (
00165             const label i,
00166             const scalar time
00167         ) const;
00168 
00169         //- Return the mass of the injected particle
00170         scalar mass
00171         (
00172             const scalar t0,
00173             const scalar t1,
00174             const bool twoD,
00175             const scalar angleOfWedge
00176         ) const;
00177 
00178         //- Return the mass injected by the injector
00179         scalar mass() const;
00180 
00181         //- Return the fuel mass fractions of the injected particle
00182         const scalarField& X() const;
00183 
00184         //- Return the temperature profile of the injected particle
00185         List<pair> T() const;
00186 
00187         //- Return the temperature of the injected particle
00188         scalar T(const scalar time) const;
00189 
00190         //- Return the start-of-injection time
00191         scalar tsoi() const;
00192 
00193         //- Return the end-of-injection time
00194         scalar teoi() const;
00195 
00196         //- Return the injected liquid mass
00197         scalar injectedMass(const scalar t) const;
00198 
00199         List<pair> massFlowRateProfile() const
00200         {
00201             return massFlowRateProfile_;
00202         }
00203 
00204         scalar massFlowRate(const scalar time) const;
00205 
00206         List<pair> injectionPressureProfile() const
00207         {
00208             return injectionPressureProfile_;
00209         }
00210     
00211         scalar injectionPressure(const scalar time) const;
00212 
00213         List<pair> velocityProfile() const
00214         {
00215             return velocityProfile_;
00216         }
00217         
00218         scalar velocity(const scalar time) const;
00219 
00220         List<pair> CdProfile() const;
00221         scalar Cd(const scalar time) const;
00222 
00223         vector tan1(const label n) const;
00224         vector tan2(const label n) const;
00225 
00226         void correctProfiles
00227         (
00228             const liquidMixture& fuel,
00229             const scalar referencePressure
00230         );
00231 
00232         bool pressureIndependentVelocity() const
00233         {
00234             return pressureIndependentVelocity_;
00235         }
00236 
00237 };
00238 
00239 
00240 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00241 
00242 } // End namespace Foam
00243 
00244 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00245 
00246 #endif
00247 
00248 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd