FreeFOAM The Cross-Platform CFD Toolkit
RosinRammler.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::RosinRammler
26 
27 Description
28  Rosin-Rammler pdf
29 
30  @f[
31  cumulative pdf = (1.0 - exp( -((x - d0)/d)^n ) / (1.0 - exp( -((d1 - d0)/d)^n )
32  @f]
33 
34 
35 SourceFiles
36  RosinRammler.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef RosinRammler_H
41 #define RosinRammler_H
42 
43 #include <pdf/pdf.H>
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace pdfs
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class RosinRammler Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public pdf
59 {
60  // Private data
61 
62  //- Distribution minimum
63  scalar minValue_;
64 
65  //- Distribution maximum
66  scalar maxValue_;
67 
68  // Model coefficients
69 
70  scalar d_;
71  scalar n_;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("RosinRammler");
78 
79 
80  // Constructors
81 
82  //- Construct from components
84  (
85  const dictionary& dict,
86  Random& rndGen
87  );
88 
89 
90  //- Destructor
91  virtual ~RosinRammler();
92 
93 
94  // Member Functions
95 
96  //- Sample the pdf
97  virtual scalar sample() const;
98 
99  //- Return the minimum value
100  virtual scalar minValue() const;
101 
102  //- Return the maximum value
103  virtual scalar maxValue() const;
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace pdfs
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************ vim: set sw=4 sts=4 et: ************************ //