BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / lagrangian / spray / submodels / StochasticCollision / ORourkeCollision / ORourkeCollision.H
blob1a98c9e5f9b4650bc01c124f05a3d2bc069e1043
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::ORourkeCollision
27 Description
28     Collision model by P.J. O'Rourke.
31 \*---------------------------------------------------------------------------*/
33 #ifndef ORourkeCollision_H
34 #define ORourkeCollision_H
36 #include "StochasticCollisionModel.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace Foam
42 /*---------------------------------------------------------------------------*\
43                        Class ORourkeCollision Declaration
44 \*---------------------------------------------------------------------------*/
46 template<class CloudType>
47 class ORourkeCollision
49     public StochasticCollisionModel<CloudType>
51 private:
53     dictionary coeffsDict_;
54     Switch coalescence_;
56 public:
58     //- Runtime type information
59     TypeName("ORourke");
62     // Constructors
64         //- Construct from dictionary
65         ORourkeCollision(const dictionary& dict, CloudType& cloud);
67         //- Construct copy
68         ORourkeCollision(const ORourkeCollision<CloudType>& cm);
70         //- Construct and return a clone
71         virtual autoPtr<StochasticCollisionModel<CloudType> > clone() const
72         {
73             return autoPtr<StochasticCollisionModel<CloudType> >
74             (
75                 new ORourkeCollision<CloudType>(*this)
76             );
77         }
80     //- Destructor
81     virtual ~ORourkeCollision();
84     // Member Functions
86         virtual bool update
87         (
88             const scalar dt,
89             cachedRandom& rndGen,
90             vector& pos1,
91             scalar& m1,
92             scalar& d1,
93             scalar& N1,
94             vector& U,
95             scalar& rho1,
96             scalar& T1,
97             scalarField& Y1,
98             const scalar sigma1,
99             const label celli,
100             const scalar voli,
101             vector& pos2,
102             scalar& m2,
103             scalar& d2,
104             scalar& N2,
105             vector& U2,
106             scalar& rho2,
107             scalar& T2,
108             scalarField& Y2,
109             const scalar sigma2,
110             const label cellj,
111             const scalar volj
112         ) const;
115         // 1 is the larger drop and 2 is the smaller
116         bool collideSorted
117         (
118             const scalar dt,
119             cachedRandom& rndGen,
120             vector& pos1,
121             scalar& m1,
122             scalar& d1,
123             scalar& N1,
124             vector& U,
125             scalar& rho1,
126             scalar& T1,
127             scalarField& Y1,
128             const scalar sigma1,
129             const label celli,
130             const scalar voli,
131             vector& pos2,
132             scalar& m2,
133             scalar& d2,
134             scalar& N2,
135             vector& U2,
136             scalar& rho2,
137             scalar& T2,
138             scalarField& Y2,
139             const scalar sigma2,
140             const label cellj,
141             const scalar volj
142         ) const;
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #ifdef NoRepository
153 #   include "ORourkeCollision.C"
154 #endif
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 #endif
160 // ************************************************************************* //