populationBalanceModelI.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  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 \*---------------------------------------------------------------------------*/
28 
29 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
30 
31 inline Foam::label Foam::diameterModels::populationBalanceModel::nCorr() const
32 {
33  return mesh_.solverDict(name_).get<label>("nCorr");
34 }
35 
36 
37 inline Foam::label
38 Foam::diameterModels::populationBalanceModel::sourceUpdateInterval() const
39 {
40  return
41  mesh_.solverDict(name_)
42  .getOrDefault<label>("sourceUpdateInterval", 1);
43 }
44 
45 
46 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
47 
48 inline const Foam::phaseSystem&
50 {
51  return fluid_;
52 }
53 
54 
55 inline const Foam::fvMesh&
57 {
58  return mesh_;
59 }
60 
61 
62 inline const Foam::dictionary&
64 {
65  return dict_;
66 }
67 
68 
69 inline const Foam::phaseModel&
71 {
72  return continuousPhase_;
73 }
74 
75 
78 {
79  return velocityGroups_;
80 }
81 
82 
85 {
86  return sizeGroups_;
87 }
88 
89 
92 {
93  return phasePairs_;
94 }
95 
96 
99 {
100  return v_;
101 }
102 
103 
104 inline const Foam::volScalarField&
106 {
107  if (velocityGroups_.size() > 1)
108  {
109  return alphas_();
110  }
111  else
112  {
113  return velocityGroups_.first().phase();
114  }
115 }
116 
117 
118 inline const Foam::volVectorField&
120 {
121  if (velocityGroups_.size() > 1)
122  {
123  return U_();
124  }
125  else
126  {
127  return velocityGroups_.first().phase().U();
128  }
129 }
130 
131 
132 // ************************************************************************* //
Foam::diameterModels::populationBalanceModel::fluid
const phaseSystem & fluid() const
Return reference to the phaseSystem.
Definition: populationBalanceModelI.H:49
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::solution::solverDict
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
Definition: solution.C:353
Foam::diameterModels::populationBalanceModel::alphas
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
Definition: populationBalanceModelI.H:105
Foam::dictionary::get
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:107
Foam::diameterModels::populationBalanceModel::velocityGroups
const UPtrList< velocityGroup > & velocityGroups() const
Return the velocityGroups belonging to this populationBalance.
Definition: populationBalanceModelI.H:77
Foam::diameterModels::populationBalanceModel::mesh
const fvMesh & mesh() const
Return reference to the mesh.
Definition: populationBalanceModelI.H:56
Foam::UPtrList< Foam::diameterModels::velocityGroup >
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::diameterModels::populationBalanceModel::v
const PtrList< dimensionedScalar > & v() const
Return the sizeGroup boundaries.
Definition: populationBalanceModelI.H:98
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam::diameterModels::populationBalanceModel::continuousPhase
const phaseModel & continuousPhase() const
Return continuous phase.
Definition: populationBalanceModelI.H:70
Foam::HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash >
Foam::diameterModels::populationBalanceModel::U
const volVectorField & U() const
Return average velocity.
Definition: populationBalanceModelI.H:119
Foam::diameterModels::populationBalanceModel::phasePairs
const phasePairTable & phasePairs() const
Return list of unordered phasePairs in this populationBalance.
Definition: populationBalanceModelI.H:91
Foam::phaseSystem
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:66
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::diameterModels::populationBalanceModel::dict
const dictionary & dict() const
Return populationBalanceCoeffs dictionary.
Definition: populationBalanceModelI.H:63
Foam::diameterModels::populationBalanceModel::sizeGroups
const UPtrList< sizeGroup > & sizeGroups() const
Return the sizeGroups belonging to this populationBalance.
Definition: populationBalanceModelI.H:84