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