daughterSizeDistributionModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation
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::diameterModels::daughterSizeDistributionModel
26 
27 Description
28  Base class for daughter size distribution models. Currently only supports
29  field-independent formulations.
30 
31 See also
32  Foam::diameterModels::breakupModel
33  Foam::diameterModels::populationBalanceModel
34 
35 SourceFiles
36  daughterSizeDistributionModel.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef daughterSizeDistributionModel_H
41 #define daughterSizeDistributionModel_H
42 
43 #include "dictionary.H"
44 #include "dimensionedScalar.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace diameterModels
51 {
52 
53 class breakupModel;
54 
55 /*---------------------------------------------------------------------------*\
56  Class daughterSizeDistributionModel Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 {
61 protected:
62 
63  // Protected Data
64 
65  //- Reference to the breakupModel
66  const breakupModel& breakup_;
67 
68  //- Contribution to sizeGroup i due to breakup in sizeGroup k
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("daughterSizeDistributionModel");
76 
77 
78  // Declare runtime construction
79 
81  (
82  autoPtr,
84  dictionary,
85  (
86  const breakupModel& breakup,
87  const dictionary& dict
88  ),
89  (breakup, dict)
90  );
91 
92 
93  // Constructor
94 
96  (
97  const breakupModel& breakup,
98  const dictionary& dict
99  );
100 
101 
102  //- Destructor
104 
105 
106  // Selectors
107 
109  (
110  const breakupModel& breakup,
111  const dictionary& dict
112  );
113 
114 
115  // Member Functions
116 
117  //- Return contribution to sizeGroup i due to breakup in sizeGroup k
118  const dimensionedScalar& nik(const label i, const label k) const;
119 
120  //- Precompute field independent expressions
121  void precompute();
122 
123  //- Calculate contribution to sizeGroup i due to breakup in sizeGroup k
124  virtual dimensionedScalar calcNik
125  (
126  const label i,
127  const label k
128  ) const = 0;
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace diameterModels
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
label k
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base class for breakup models which provide a total breakup rate and a separate daughter size distrib...
Definition: breakupModel.H:56
Base class for daughter size distribution models. Currently only supports field-independent formulati...
void precompute()
Precompute field independent expressions.
const breakupModel & breakup_
Reference to the breakupModel.
const dimensionedScalar & nik(const label i, const label k) const
Return contribution to sizeGroup i due to breakup in sizeGroup k.
virtual dimensionedScalar calcNik(const label i, const label k) const =0
Calculate contribution to sizeGroup i due to breakup in sizeGroup k.
static autoPtr< daughterSizeDistributionModel > New(const breakupModel &breakup, const dictionary &dict)
declareRunTimeSelectionTable(autoPtr, daughterSizeDistributionModel, dictionary,(const breakupModel &breakup, const dictionary &dict),(breakup, dict))
PtrList< PtrList< dimensionedScalar > > nik_
Contribution to sizeGroup i due to breakup in sizeGroup k.
daughterSizeDistributionModel(const breakupModel &breakup, const dictionary &dict)
TypeName("daughterSizeDistributionModel")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict