FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::multiHoleInjector
00026 
00027 Description
00028     The unit injector
00029 
00030 SourceFiles
00031     multiHoleInjectorI.H
00032     multiHoleInjector.C
00033     multiHoleInjectorIO.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef multiHoleInjector_H
00038 #define multiHoleInjector_H
00039 
00040 #include <dieselSpray/injectorType.H>
00041 #include <OpenFOAM/vector.H>
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                            Class multiHoleInjector Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class multiHoleInjector
00053 :
00054     public injectorType
00055 {
00056 
00057 private:
00058 
00059     typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
00060 
00061     // Private data
00062 
00063         dictionary propsDict_;
00064 
00065         vector centerPosition_;
00066         scalar xyAngle_;
00067         scalar zAngle_;
00068         label nHoles_;
00069         scalar umbrellaAngle_;
00070         scalar nozzleTipDiameter_;
00071         List<scalar> angleSpacing_;
00072         scalar d_;
00073         scalar Cd_;
00074         scalar mass_;
00075         label nParcels_;
00076         scalarField X_;
00077         List<pair> massFlowRateProfile_;
00078         List<pair> velocityProfile_;
00079         List<pair> injectionPressureProfile_;
00080         List<pair> CdProfile_;
00081         List<pair> TProfile_;
00082         scalar averageParcelMass_;
00083         List<vector> direction_;
00084         List<vector> position_;
00085 
00086         bool pressureIndependentVelocity_;
00087 
00088         //- two orthogonal vectors that are also orthogonal
00089         //  to the injection direction
00090         List<vector> tangentialInjectionVector1_, tangentialInjectionVector2_;
00091 
00092 
00093     // Private Member Functions
00094 
00095         //- Disallow default bitwise copy construct
00096         multiHoleInjector(const multiHoleInjector&);
00097 
00098         //- Disallow default bitwise assignment
00099         void operator=(const multiHoleInjector&);
00100 
00101         //- Create two vectors orthonoal to each other
00102         //  and the injection vector
00103         void setTangentialVectors();
00104 
00105         //- Return the fraction of the total injected liquid
00106         scalar fractionOfInjection(const scalar time) const;
00107 
00108 
00109 public:
00110 
00111     //- Runtime type information
00112     TypeName("multiHoleInjector");
00113 
00114 
00115     // Constructors
00116 
00117         //- Construct from components
00118         multiHoleInjector
00119         (
00120             const Time& t,
00121             const dictionary& dict
00122         );
00123 
00124 
00125     // Destructor
00126 
00127         ~multiHoleInjector();
00128 
00129 
00130     // Member Functions
00131 
00132         //- Return number of particles to inject
00133         label nParcelsToInject
00134         (
00135             const scalar t0,
00136             const scalar t1
00137         ) const;
00138 
00139         //- Return the injection position
00140         const vector position(const label n) const;
00141 
00142         //- Return the injection position
00143         vector position
00144         (
00145             const label n,
00146             const scalar time,
00147             const bool twoD,
00148             const scalar angleOfWedge,
00149             const vector& axisOfSymmetry,
00150             const vector& axisOfWedge,
00151             const vector& axisOfWedgeNormal,
00152             Random& rndGen
00153         ) const;
00154     
00155         //- Return the number of holes
00156         label nHoles() const;
00157 
00158         //- Return the injector diameter
00159         scalar d() const;
00160 
00161         //- Return the injection direction
00162         const vector& direction
00163         (
00164             const label i,
00165             const scalar time
00166         ) const;
00167 
00168         //- Return the mass of the injected particle
00169         scalar mass
00170         (
00171             const scalar t0,
00172             const scalar t1,
00173             const bool twoD,
00174             const scalar angleOfWedge
00175         ) const;
00176 
00177         //- Return the mass injected by the injector
00178         scalar mass() const;
00179 
00180         //- Return the fuel mass fractions of the injected particle
00181         const scalarField& X() const;
00182 
00183         //- Return the temperature profile of the injected particle
00184         List<pair> T() const;
00185 
00186         //- Return the temperature of the injected particle
00187         scalar T(const scalar time) const;
00188 
00189         //- Return the start-of-injection time
00190         scalar tsoi() const;
00191 
00192         //- Return the end-of-injection time
00193         scalar teoi() const;
00194 
00195         //- Return the injected liquid mass
00196         scalar injectedMass(const scalar t) const;
00197 
00198         List<pair> massFlowRateProfile() const
00199         {
00200             return massFlowRateProfile_;
00201         }
00202 
00203         scalar massFlowRate(const scalar time) const;
00204 
00205         List<pair> injectionPressureProfile() const
00206         {
00207             return injectionPressureProfile_;
00208         }
00209     
00210         scalar injectionPressure(const scalar time) const;
00211 
00212         List<pair> velocityProfile() const
00213         {
00214             return velocityProfile_;
00215         }
00216         
00217         scalar velocity(const scalar time) const;
00218 
00219         List<pair> CdProfile() const;
00220         scalar Cd(const scalar time) const;
00221 
00222         vector tan1(const label n) const;
00223         vector tan2(const label n) const;
00224 
00225         void correctProfiles
00226         (
00227             const liquidMixture& fuel,
00228             const scalar referencePressure
00229         );
00230 
00231         bool pressureIndependentVelocity() const
00232         {
00233             return pressureIndependentVelocity_;
00234         }
00235 
00236 };
00237 
00238 
00239 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00240 
00241 } // End namespace Foam
00242 
00243 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00244 
00245 #endif
00246 
00247 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines