Transferred copyright to the OpenFOAM Foundation
[OpenFOAM-2.0.x.git] / src / lagrangian / spray / submodels / StochasticCollision / TrajectoryCollision / TrajectoryCollision.H
blob979d84b49004f08556385258c39a9b3a3b1cc07e
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::TrajectoryCollision
27 Description
28     Trajectory collision model by N. Nordin.
30 \*---------------------------------------------------------------------------*/
32 #ifndef TrajectoryCollision_H
33 #define TrajectoryCollision_H
35 #include "StochasticCollisionModel.H"
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 namespace Foam
41 /*---------------------------------------------------------------------------*\
42                        Class TrajectoryCollision Declaration
43 \*---------------------------------------------------------------------------*/
45 template<class CloudType>
46 class TrajectoryCollision
48     public StochasticCollisionModel<CloudType>
50 private:
52     // Private data
54         scalar cSpace_;
55         scalar cTime_;
56         Switch coalescence_;
59 public:
61     //- Runtime type information
62     TypeName("trajectory");
65     // Constructors
67         //- Construct from dictionary
68         TrajectoryCollision(const dictionary& dict, CloudType& cloud);
70         //- Construct copy
71         TrajectoryCollision(const TrajectoryCollision<CloudType>& cm);
73         //- Construct and return a clone
74         virtual autoPtr<StochasticCollisionModel<CloudType> > clone() const
75         {
76             return autoPtr<StochasticCollisionModel<CloudType> >
77             (
78                 new TrajectoryCollision<CloudType>(*this)
79             );
80         }
83     //- Destructor
84     virtual ~TrajectoryCollision();
87     // Member Functions
89         virtual bool update
90         (
91             const scalar dt,
92             cachedRandom& rndGen,
93             vector& pos1,
94             scalar& m1,
95             scalar& d1,
96             scalar& N1,
97             vector& U,
98             scalar& rho1,
99             scalar& T1,
100             scalarField& Y1,
101             const scalar sigma1,
102             const label celli,
103             const scalar voli,
104             vector& pos2,
105             scalar& m2,
106             scalar& d2,
107             scalar& N2,
108             vector& U2,
109             scalar& rho2,
110             scalar& T2,
111             scalarField& Y2,
112             const scalar sigma2,
113             const label cellj,
114             const scalar volj
115         ) const;
117         // 1 is the larger drop and 2 is the smaller
118         bool collideSorted
119         (
120             const scalar dt,
121             cachedRandom& rndGen,
122             vector& pos1,
123             scalar& m1,
124             scalar& d1,
125             scalar& N1,
126             vector& U,
127             scalar& rho1,
128             scalar& T1,
129             scalarField& Y1,
130             const scalar sigma1,
131             const label celli,
132             const scalar voli,
133             vector& pos2,
134             scalar& m2,
135             scalar& d2,
136             scalar& N2,
137             vector& U2,
138             scalar& rho2,
139             scalar& T2,
140             scalarField& Y2,
141             const scalar sigma2,
142             const label cellj,
143             const scalar volj
144         ) const;
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace Foam
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 #ifdef NoRepository
155 #   include "TrajectoryCollision.C"
156 #endif
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 #endif
162 // ************************************************************************* //