diameterModel.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2019 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::diameterModel
29 
30 Description
31  Abstract base-class for dispersed-phase particle diameter models.
32 
33 SourceFiles
34  diameterModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef diameterModel_H
39 #define diameterModel_H
40 
41 #include "dictionary.H"
42 #include "phaseModel.H"
43 #include "runTimeSelectionTables.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class diameterModel Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class diameterModel
55 {
56 protected:
57 
58  // Protected Data
59 
61 
62  const phaseModel& phase_;
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("diameterModel");
69 
70 
71  // Declare runtime construction
72 
74  (
75  autoPtr,
77  dictionary,
78  (
79  const dictionary& dict,
80  const phaseModel& phase
81  ),
82  (dict, phase)
83  );
84 
85 
86  // Constructors
87 
89  (
90  const dictionary& dict,
91  const phaseModel& phase
92  );
93 
94 
95  //- Destructor
96  virtual ~diameterModel() = default;
97 
98 
99  // Selectors
100 
102  (
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 phase mean diameter field
123  virtual tmp<volScalarField> d() const = 0;
124 
125  //- Correct the diameter field
126  virtual void correct();
127 
128  //- Read phaseProperties dictionary
129  virtual bool read(const dictionary& phaseProperties) = 0;
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::diameterModel::TypeName
TypeName("diameterModel")
Runtime type information.
Foam::phase
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phase.H:54
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::diameterModel::New
static autoPtr< diameterModel > New(const dictionary &dict, const phaseModel &phase)
Definition: diameterModel.C:56
Foam::diameterModel::diameterProperties
const dictionary & diameterProperties() const
Return the phase diameter properties dictionary.
Definition: diameterModel.H:110
Foam::phaseProperties
Helper class to manage multi-specie phase properties.
Definition: phaseProperties.H:60
Foam::diameterModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, diameterModel, dictionary,(const dictionary &dict, const phaseModel &phase),(dict, phase))
Foam::diameterModel
Abstract base-class for dispersed-phase particle diameter models.
Definition: diameterModel.H:53
Foam::diameterModel::correct
virtual void correct()
Correct the diameter field.
Definition: diameterModel.C:92
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::diameterModel::phase_
const phaseModel & phase_
Definition: diameterModel.H:61
Foam::diameterModel::d
virtual tmp< volScalarField > d() const =0
Return the phase mean diameter field.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
dictionary.H
Foam::diameterModel::read
virtual bool read(const dictionary &phaseProperties)=0
Read phaseProperties dictionary.
Definition: diameterModel.C:96
Foam::diameterModel::diameterModel
diameterModel(const dictionary &dict, const phaseModel &phase)
Definition: diameterModel.C:43
Foam::diameterModel::phase
const phaseModel & phase() const
Return the phase.
Definition: diameterModel.H:116
Foam::diameterModel::diameterProperties_
dictionary diameterProperties_
Definition: diameterModel.H:59
Foam::diameterModel::~diameterModel
virtual ~diameterModel()=default
Destructor.