ejectionModel.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) 2011-2021 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::regionModels::surfaceFilmModels::ejectionModel
26 
27 Description
28  Base class for film ejection models, handling mass transfer from the
29  film.
30 
31 SourceFiles
32  ejectionModel.C
33  ejectionModelNew.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef ejectionModel_H
38 #define ejectionModel_H
39 
40 #include "filmSubModelBase.H"
41 #include "runTimeSelectionTables.H"
42 #include "scalarField.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace regionModels
49 {
50 namespace surfaceFilmModels
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class ejectionModel Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class ejectionModel
58 :
59  public filmSubModelBase
60 {
61  // Private Data
62 
63  //- Ejected mass
64  scalar ejectedMass_;
65 
66 
67 protected:
68 
69  // Protected Member Functions
70 
71  //- Add to ejected mass
72  void addToEjectedMass(const scalar dMass);
73 
74  //- Correct
75  void correct();
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("ejectionModel");
82 
83 
84  // Declare runtime constructor selection table
85 
87  (
88  autoPtr,
90  dictionary,
91  (
93  const dictionary& dict
94  ),
95  (film, dict)
96  );
97 
98 
99  // Constructors
100 
101  //- Construct null
103 
104  //- Construct from type name, dictionary and surface film model
106  (
107  const word& modelType,
109  const dictionary& dict
110  );
111 
112  //- Disallow default bitwise copy construction
113  ejectionModel(const ejectionModel&) = delete;
114 
115 
116  // Selectors
117 
118  //- Return a reference to the selected ejection model
120  (
122  const dictionary& dict,
123  const word& mdoelType
124  );
125 
126 
127  //- Destructor
128  virtual ~ejectionModel();
129 
130 
131  // Member Functions
132 
133  //- Correct
134  virtual void correct
135  (
136  scalarField& availableMass,
137  scalarField& massToEject,
138  scalarField& diameterToEject
139  ) = 0;
140 
141  //- Return the total mass ejected
142  virtual scalar ejectedMassTotal() const;
143 
144  //- Accumulate the total mass ejected for the patches into the
145  // scalarField provided
146  virtual void patchEjectedMassTotals(scalarField& patchMasses) const
147  {}
148 
149 
150  // Member Operators
151 
152  //- Disallow default bitwise assignment
153  void operator=(const ejectionModel&) = delete;
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace surfaceFilmModels
160 } // End namespace regionModels
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
static autoPtr< ejectionModel > New(surfaceFilmRegionModel &film, const dictionary &dict, const word &mdoelType)
Return a reference to the selected ejection model.
void operator=(const ejectionModel &)=delete
Disallow default bitwise assignment.
Base class for surface film sub-models.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Base class for film ejection models, handling mass transfer from the film.
Definition: ejectionModel.H:56
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
A class for handling words, derived from string.
Definition: word.H:59
virtual scalar ejectedMassTotal() const
Return the total mass ejected.
Definition: ejectionModel.C:91
void addToEjectedMass(const scalar dMass)
Add to ejected mass.
Definition: ejectionModel.C:44
const word & modelType() const
Return const access to the sub-model type.
Definition: subModelBase.C:122
declareRunTimeSelectionTable(autoPtr, ejectionModel, dictionary,(surfaceFilmRegionModel &film, const dictionary &dict),(film, dict))
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
TypeName("ejectionModel")
Runtime type information.
virtual void patchEjectedMassTotals(scalarField &patchMasses) const
Accumulate the total mass ejected for the patches into the.
ejectionModel(surfaceFilmRegionModel &film)
Construct null.
Definition: ejectionModel.C:52
Namespace for OpenFOAM.