BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / lagrangian / dieselSpray / spraySubModels / injectorModel / definedPressureSwirl / definedPressureSwirl.H
blobcb481f996c38d74f2c2950aacf1117cb6768dd46
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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
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
19     for more details.
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/>.
24 Class
25     Foam::definedPressureSwirlInjector
27 Description
28     Pressure swirl injector model with user-defined
29     cone-angle/interval vs. time
31 \*---------------------------------------------------------------------------*/
33 #ifndef definedPressureSwirlInjector_H
34 #define definedPressureSwirlInjector_H
36 #include "injectorModel.H"
37 #include "scalarList.H"
38 #include "vector.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
45 /*---------------------------------------------------------------------------*\
46                   Class definedPressureSwirlInjector Declaration
47 \*---------------------------------------------------------------------------*/
49 class definedPressureSwirlInjector
51     public injectorModel
54 private:
56     // Private data
58         typedef VectorSpace<Vector<scalar>, scalar, 2> pair;
60         dictionary definedPressureSwirlInjectorDict_;
62         List<pair> coneAngle_;
63         List<pair> coneInterval_;
65         List<pair>  maxKv_;
67         //- Initial spray angle for the parcels
68         mutable scalar angle_;
70         //- Initial velocity for the parcels
71         mutable scalar u_;
74     // Private Member Functions
76         scalar kv
77         (
78             const label inj,
79             const scalar massFlow,
80             const scalar dPressure,
81             const scalar t
82         ) const;
84         scalar deltaPressureInj(const scalar time, const label inj) const;
85         scalar averagePressure(const label inj) const;
88 public:
90     //- Runtime type information
91     TypeName("definedPressureSwirlInjector");
94     // Constructors
96         //- Construct from components
97         definedPressureSwirlInjector(const dictionary& dict, spray& sm);
100     //- Destructor
101     virtual ~definedPressureSwirlInjector();
104     // Member Functions
106         //- Return the injected droplet diameter
107         scalar d0(const label injector, const scalar time) const;
109         //- Return the spray angle of the injector
110         vector direction
111         (
112             const label injector,
113             const label hole,
114             const scalar time,
115             const scalar d
116         ) const;
118         scalar velocity(const label i, const scalar time) const;
120         scalar averageVelocity(const label i) const;
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 } // End namespace Foam
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 #endif
132 // ************************************************************************* //