initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / lagrangian / dieselSpray / spraySubModels / injectorModel / definedPressureSwirl / definedPressureSwirl.H
blob14415d789b343fbd88fbd71f6bc6611d5a5d4e85
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::definedPressureSwirlInjector
28 Description
29     Pressure swirl injector model with user-defined 
30     cone-angle/interval vs. time
32 \*---------------------------------------------------------------------------*/
34 #ifndef definedPressureSwirlInjector_H
35 #define definedPressureSwirlInjector_H
37 #include "injectorModel.H"
38 #include "scalarList.H"
39 #include "vector.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                            Class definedPressureSwirlInjector Declaration
48 \*---------------------------------------------------------------------------*/
50 class definedPressureSwirlInjector
52     public injectorModel
55 private:
57     // Private data
59         typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
61         dictionary definedPressureSwirlInjectorDict_;
63         List<pair> coneAngle_;
64         List<pair> coneInterval_;
66         List<pair>  maxKv_;
68     // The initial spray angle for the parcels
69         mutable scalar angle_;
71     // The initial velocity for the parcels
72         mutable scalar u_;
74     // two perpendicular vectors, perpendicular to injection direction
75         List<vector> tan1_;
76         List<vector> tan2_;
78     // private member functions
80         scalar kv
81         (
82             const label inj,
83             const scalar massFlow,
84             const scalar dPressure,
85             const scalar t
86         ) const;
88         scalar deltaPressureInj(const scalar time, const label inj) const;
89         scalar averagePressure(const label inj) const;
91 public:
93     //- Runtime type information
94         TypeName("definedPressureSwirlInjector");
97     // Constructors
99         //- Construct from components
100         definedPressureSwirlInjector
101         (
102             const dictionary& dict,
103             spray& sm
104         );
107     // Destructor
109         ~definedPressureSwirlInjector();
112     // Member Functions
114         //- Return the injected droplet diameter
115         scalar d0(const label injector, const scalar time) const;
117         //- Return the spray angle of the injector
118         vector direction
119         (
120             const label injector,
121             const scalar time,
122             const scalar d
123         ) const;
125         scalar velocity
126         (
127             const label i,
128             const scalar time
129         ) const;
131         scalar averageVelocity
132         (
133             const label i
134         ) const;
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #endif
148 // ************************************************************************* //