1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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/>.
25 Foam::GradientDispersionRAS
28 The velocity is perturbed in the direction of -grad(k), with a
29 Gaussian random number distribution with variance sigma.
30 where sigma is defined below
32 \*---------------------------------------------------------------------------*/
34 #ifndef GradientDispersionRAS_H
35 #define GradientDispersionRAS_H
37 #include "DispersionRASModel.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 /*---------------------------------------------------------------------------*\
45 Class GradientDispersionRAS Declaration
46 \*---------------------------------------------------------------------------*/
48 template<class CloudType>
49 class GradientDispersionRAS
51 public DispersionRASModel<CloudType>
57 // Locally cached turbulence fields
60 const volVectorField* gradkPtr_;
62 //- Take ownership of the grad(k)
68 //- Runtime type information
69 TypeName("gradientDispersionRAS");
74 //- Construct from components
75 GradientDispersionRAS(const dictionary& dict, CloudType& owner);
78 GradientDispersionRAS(GradientDispersionRAS<CloudType>& dm);
80 //- Construct and return a clone
81 virtual autoPtr<DispersionModel<CloudType> > clone()
83 return autoPtr<DispersionModel<CloudType> >
85 new GradientDispersionRAS<CloudType>(*this)
91 virtual ~GradientDispersionRAS();
96 //- Cache carrier fields
97 virtual void cacheFields(const bool store);
99 //- Update (disperse particles)
100 virtual vector update
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 } // End namespace Foam
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 # include "GradientDispersionRAS.C"
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 // ************************************************************************* //