OpenFOAM logo
Open Source CFD Toolkit

injectorType.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-2005 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     injectorType
00027 
00028 Description
00029 
00030 SourceFiles
00031     injectorTypeI.H
00032     injectorType.C
00033     injectorTypeIO.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef injectorType_H
00038 #define injectorType_H
00039 
00040 #include "IOdictionary.H"
00041 #include "Time.H"
00042 #include "autoPtr.H"
00043 #include "runTimeSelectionTables.H"
00044 #include "vector.H"
00045 #include "scalarField.H"
00046 #include "Random.H"
00047 #include "liquidMixture.H"
00048 
00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00050 
00051 namespace Foam
00052 {
00053 
00054 /*---------------------------------------------------------------------------*\
00055                            Class injectorType Declaration
00056 \*---------------------------------------------------------------------------*/
00057 
00058 class injectorType
00059 {
00060         typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
00061 
00062 public:
00063 
00064     //- Runtime type information
00065     TypeName("injectorType");
00066 
00067     // Declare runtime constructor selection table
00068 
00069         declareRunTimeSelectionTable
00070         (
00071             autoPtr,
00072             injectorType,
00073             dictionary,
00074             (
00075                 const Time& t,
00076                 const dictionary& dict
00077             ),
00078             (t, dict)
00079         );
00080 
00081     
00082     // Constructors
00083 
00084         //- Construct from components
00085         injectorType
00086         (
00087             const Time& t,
00088             const dictionary& dict
00089         );
00090 
00091 
00092     // Selectors
00093 
00094         static autoPtr<injectorType> New
00095         (
00096             const Time& t,
00097             const dictionary& dict
00098         );
00099 
00100 
00101     // Destructor
00102 
00103         virtual ~injectorType();
00104 
00105 
00106     // Member Functions
00107     
00108         //- Return number of particles to inject
00109         virtual label nParcelsToInject
00110         (
00111             const scalar time0,
00112             const scalar time1
00113         ) const = 0;
00114 
00115         //- Return the injection position
00116         virtual const vector position() const = 0;
00117 
00118         //- Return the injection position
00119         virtual vector position
00120         (
00121             const scalar time,
00122             const bool twoD,
00123             const scalar angleOfWedge,
00124             const vector& axisOfSymmetry,
00125             const vector& axisOfWedge,
00126             const vector& axisOfWedgeNormal,
00127             Random& rndGen
00128         ) const = 0;
00129     
00130         //- Return the injector diameter
00131         virtual scalar d() const = 0;
00132 
00133         //- Return the injection direction
00134         virtual const vector& direction() const = 0;
00135 
00136         //- Return the mass of the injected liquid between times
00137         virtual scalar mass
00138         (
00139             const scalar time0,
00140             const scalar time1,
00141             const bool twoD,
00142             const scalar angleOfWedge
00143         ) const = 0;
00144 
00145         //- Return the mass injected by the injector
00146         virtual scalar mass() const = 0;
00147 
00148         //- Return the mass flow rate profile
00149         virtual List<pair> massFlowRateProfile() const = 0;
00150 
00151         //- Return the instantaneous mass flow rate profile
00152         virtual scalar massFlowRate(const scalar time) const = 0;
00153 
00154         //- Return the pressure injection profile
00155         virtual List<pair> injectionPressureProfile() const = 0;
00156 
00157         //- Return the instantaneous injection pressure
00158         virtual scalar injectionPressure(const scalar time) const = 0;
00159 
00160         //- Return the velocity injection profile
00161         virtual List<pair> velocityProfile() const = 0;
00162 
00163         //- Return the instantaneous velocity
00164         virtual scalar velocity(const scalar time) const = 0;
00165 
00166         //- Return the discharge coefficient        
00167         virtual List<pair> CdProfile() const = 0;
00168 
00169         //- Return the instantaneous discharge coefficient
00170         virtual scalar Cd(const scalar time) const = 0;
00171 
00172         //- Return the fuel mass fractions of the injected particle
00173         virtual const scalarField& X() const = 0;
00174 
00175         //- Return the temperatue profile of the injected parcel
00176         virtual List<pair> T() const = 0;
00177 
00178         //- Return the temperatue of the injected parcel
00179         virtual scalar T(const scalar time) const = 0;
00180 
00181         //- Return the start-of-injection time
00182         virtual scalar tsoi() const = 0;
00183 
00184         //- Return the end-of-injection time
00185         virtual scalar teoi() const = 0;
00186 
00187         virtual scalar injectedMass(const scalar t) const = 0;
00188 
00189         virtual bool pressureIndependentVelocity() const = 0;
00190 
00191         scalar getTableValue
00192         (
00193             const List<pair>& table,
00194             const scalar value
00195         ) const;
00196 
00197         scalar integrateTable
00198         (
00199             const List<pair>& table,
00200             const scalar value
00201         ) const;
00202 
00203         scalar integrateTable
00204         (
00205             const List<pair>& table
00206         ) const;
00207 
00208         virtual void correctProfiles
00209         (
00210             const liquidMixture& fuel,
00211             const scalar referencePressure
00212         ) = 0;
00213 
00214 };
00215 
00216 
00217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00218 
00219 } // End namespace Foam
00220 
00221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00222 
00223 #endif
00224 
00225 // ************************************************************************* //
For further information go to www.openfoam.org