sizeGroup.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) 2017-2018 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::diameterModels::sizeGroup
28
29Description
30 This class represents a single sizeGroup belonging to a velocityGroup.
31 The main property of a sizeGroup is its representative diameter. The
32 corresponding volScalarField f<number>.<phaseName>.<populationBalanceName>
33 gives the volume fraction of the sizeGroup such that all sizeGroup fractions
34 over a velocityGroup must sum to unity. The field is either read from the
35 startTime directory if present or constructed from a reference field called
36 f.<phaseName>.<populationBalanceName> where the boundary condition types
37 must be specified. All field and boundary condition values are reset to
38 match the "value" given in the sizeGroup subdictionary.
39
40Usage
41 \table
42 Property | Description | Required | Default value
43 d | Representative diameter | yes |
44 value | Field and BC value | yes |
45 \endtable
46
47 Example
48 \verbatim
49 f1
50 {
51 d 3e-3;
52 value 1.0;
53 }
54 \endverbatim
55
56See also
57 Foam::diameterModels::velocityGroup
58 Foam::diameterModels::populationBalanceModel
59
60SourceFiles
61 sizeGroup.C
62
63\*---------------------------------------------------------------------------*/
64
65#ifndef sizeGroup_H
66#define sizeGroup_H
67
68#include "dictionaryEntry.H"
69#include "velocityGroup.H"
70
71// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72
73namespace Foam
74{
75namespace diameterModels
76{
77
78/*---------------------------------------------------------------------------*\
79 Class sizeGroup Declaration
80\*---------------------------------------------------------------------------*/
81
82class sizeGroup
83:
84 public volScalarField
85{
86 // Private data
87
88 //- Phase this sizeGroup belongs to
89 const phaseModel& phase_;
90
91 //- VelocityGroup this sizeGroup belongs to
92 const velocityGroup& velocityGroup_;
93
94 //- Representative diameter of the sizeGroup
95 const dimensionedScalar d_;
97 //- Representative volume of the sizeGroup
98 const dimensionedScalar x_;
99
100 //- Initial value and value at boundaries
101 const scalar value_;
102
103
104public:
105
106 // Constructors
107
109 (
110 const word& name,
111 const dictionary& dict,
112 const phaseModel& phase,
114 const fvMesh& mesh
115 );
116
117 //- Return clone
119
120 //- Return a pointer to a new sizeGroup created on freestore
121 // from Istream
122 class iNew
123 {
124 const phaseModel& phase_;
125 const velocityGroup& velocityGroup_;
126
127 public:
128
129 iNew
130 (
131 const phaseModel& phase,
133 )
134 :
135 phase_(phase),
136 velocityGroup_(velocityGroup)
137 {}
138
140 {
142 return autoPtr<sizeGroup>
144 new sizeGroup
145 (
146 ent.keyword(),
147 ent,
148 phase_,
149 velocityGroup_,
150 phase_.mesh()
151 )
152 );
154 };
155
156
157 //- Destructor
158 virtual ~sizeGroup();
159
160
161 // Member Functions
162
163 inline const word& keyword() const;
164
165 //- Return const-reference to the phase
166 inline const phaseModel& phase() const;
167
168 //- Return const-reference to the velocityGroup
169 inline const velocityGroup& VelocityGroup() const;
170
171 //- Return representative diameter of the sizeGroup
172 inline const dimensionedScalar& d() const;
173
174 //- Return representative volume of the sizeGroup
175 inline const dimensionedScalar& x() const;
176};
177
178
179// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180
181} // End namespace diameterModels
182} // End namespace Foam
183
184// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186#include "sizeGroupI.H"
187
188// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189
190#endif
191
192// ************************************************************************* //
const Mesh & mesh() const
Return mesh.
const Internal & operator()() const
Return a const-reference to the dimensioned internal field.
const word & name() const noexcept
Return the object name.
Definition: IOobjectI.H:65
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Return a pointer to a new sizeGroup created on freestore.
Definition: sizeGroup.H:137
autoPtr< sizeGroup > operator()(Istream &is) const
Definition: sizeGroup.H:153
iNew(const phaseModel &phase, const velocityGroup &velocityGroup)
Definition: sizeGroup.H:144
This class represents a single sizeGroup belonging to a velocityGroup. The main property of a sizeGro...
Definition: sizeGroup.H:99
const dimensionedScalar & d() const
Return representative diameter of the sizeGroup.
Definition: sizeGroupI.H:52
const dimensionedScalar & x() const
Return representative volume of the sizeGroup.
Definition: sizeGroupI.H:59
const velocityGroup & VelocityGroup() const
Return const-reference to the velocityGroup.
Definition: sizeGroupI.H:45
virtual ~sizeGroup()
Destructor.
Definition: sizeGroup.C:96
const phaseModel & phase() const
Return const-reference to the phase.
Definition: sizeGroupI.H:38
const word & keyword() const
Definition: sizeGroupI.H:31
autoPtr< sizeGroup > clone() const
Return clone.
Definition: sizeGroup.C:103
This diameterModel is intended for use with a populationBalanceModel in order to simulate polydispers...
A keyword and a list of tokens is a 'dictionaryEntry'.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const keyType & keyword() const noexcept
Return keyword.
Definition: entry.H:195
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
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 handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
dictionary dict