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 | Copyright (C) 2011-2013 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  A2stract base-class for dispersed-phase particle diameter models.
29 
30 SourceFiles
31  diameterModel.C
32  newDiameterModel.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 
55 protected:
56 
57  // Protected data
58 
59  dictionary diameterProperties_;
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  (
77  const dictionary& diameterProperties,
78  const phaseModel& phase
79  ),
80  (diameterProperties, phase)
81  );
82 
83 
84  // Constructors
85 
87  (
88  const dictionary& diameterProperties,
89  const phaseModel& phase
90  );
91 
92 
93  //- Destructor
94  virtual ~diameterModel();
95 
96 
97  // Selectors
98 
99  static autoPtr<diameterModel> New
100  (
101  const dictionary& diameterProperties,
102  const phaseModel& phase
103  );
104 
105 
106  // Member Functions
107 
108  //- Return the phase diameter properties dictionary
109  const dictionary& diameterProperties() const
110  {
111  return diameterProperties_;
112  }
113 
114  //- Return the phase
115  const phaseModel& phase() const
116  {
117  return phase_;
118  }
119 
120  //- Return the phase mean diameter field
121  virtual tmp<volScalarField> d() const = 0;
122 
123  //- Correct the diameter field
124  virtual void correct();
125 
126  //- Read phaseProperties dictionary
127  virtual bool read(const dictionary& phaseProperties) = 0;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual ~diameterModel()
Destructor.
Helper class to manage multi-specie phase properties.
virtual bool read(const dictionary &phaseProperties)=0
Read phaseProperties dictionary.
static autoPtr< diameterModel > New(const dictionary &dict, const phaseModel &phase)
diameterModel(const dictionary &dict, const phaseModel &phase)
TypeName("diameterModel")
Runtime type information.
const dictionary & diameterProperties() const
Return the phase diameter properties dictionary.
virtual tmp< volScalarField > d() const =0
Return the phase mean diameter field.
dictionary diameterProperties_
Definition: diameterModel.H:58
const phaseModel & phase() const
Return the phase.
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:54
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
virtual void correct()
Correct the diameter field.
Namespace for OpenFOAM.
const phaseModel & phase_
Definition: diameterModel.H:58
declareRunTimeSelectionTable(autoPtr, diameterModel, dictionary,(const dictionary &dict, const phaseModel &phase),(dict, phase))