diameterModel.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::diameterModel
26 
27 Description
28  Abstract base-class for dispersed-phase particle diameter models.
29 
30 SourceFiles
31  diameterModel.C
32  diameterModelNew.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef diameterModel_H
37 #define diameterModel_H
38 
39 #include "dictionary.H"
40 #include "phaseModel.H"
41 #include "runTimeSelectionTables.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class diameterModel Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class diameterModel
53 {
54  // Private Data
55 
56  //- The phase diameter properties dictionary
57  dictionary diameterProperties_;
58 
59  //- The phase that this model applies
60  const phaseModel& phase_;
61 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("diameterModel");
67 
68 
69  // Declare runtime construction
70 
72  (
73  autoPtr,
75  dictionary,
76  (
78  const phaseModel& phase
79  ),
80  (diameterProperties, phase)
81  );
82 
83 
84  // Constructors
85 
86  //- Construct from dictionary and phase
88  (
89  const dictionary& diameterProperties,
90  const phaseModel& phase
91  );
92 
93 
94  //- Destructor
95  virtual ~diameterModel();
96 
97 
98  // Selectors
99 
100  //- Select from dictionary and phase
102  (
103  const dictionary& diameterProperties,
104  const phaseModel& phase
105  );
106 
107 
108  // Member Functions
109 
110  //- Return the phase diameter properties dictionary
111  const dictionary& diameterProperties() const
112  {
113  return diameterProperties_;
114  }
115 
116  //- Return the phase
117  const phaseModel& phase() const
118  {
119  return phase_;
120  }
121 
122  //- Return the diameter
123  virtual tmp<volScalarField> d() const = 0;
124 
125  //- Return the surface area per unit volume
126  virtual tmp<volScalarField> a() const = 0;
127 
128  //- Correct the model
129  virtual void correct();
130 
131  //- Read phaseProperties dictionary
132  virtual bool read(const dictionary& phaseProperties);
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
diameterModel(const dictionary &diameterProperties, const phaseModel &phase)
Construct from dictionary and phase.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual ~diameterModel()
Destructor.
Helper class to manage multi-specie phase properties.
static autoPtr< diameterModel > New(const dictionary &diameterProperties, const phaseModel &phase)
Select from dictionary and phase.
TypeName("diameterModel")
Runtime type information.
const phaseModel & phase() const
Return the phase.
virtual bool read(const dictionary &phaseProperties)
Read phaseProperties dictionary.
Abstract base-class for dispersed-phase particle diameter models.
Definition: diameterModel.H:51
virtual tmp< volScalarField > d() const =0
Return the diameter.
virtual tmp< volScalarField > a() const =0
Return the surface area per unit volume.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phase.H:52
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.
A class for managing temporary objects.
Definition: PtrList.H:53
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
const dictionary & diameterProperties() const
Return the phase diameter properties dictionary.
declareRunTimeSelectionTable(autoPtr, diameterModel, dictionary,(const dictionary &diameterProperties, const phaseModel &phase),(diameterProperties, phase))
virtual void correct()
Correct the model.
Namespace for OpenFOAM.