populationBalanceModelI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2017-2018 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 \*---------------------------------------------------------------------------*/
25 
26 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
27 
28 inline Foam::label Foam::diameterModels::populationBalanceModel::nCorr() const
29 {
30  return mesh_.solverDict(name_).lookupType<label>("nCorr");
31 }
32 
33 
34 inline Foam::label
35 Foam::diameterModels::populationBalanceModel::sourceUpdateInterval() const
36 {
37  return
38  mesh_.solverDict(name_)
39  .lookupOrDefault<label>("sourceUpdateInterval", 1);
40 }
41 
42 
43 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
44 
45 inline const Foam::phaseSystem&
47 {
48  return fluid_;
49 }
50 
51 
52 inline const Foam::fvMesh&
54 {
55  return mesh_;
56 }
57 
58 
59 inline const Foam::dictionary&
61 {
62  return dict_;
63 }
64 
65 
66 inline const Foam::phaseModel&
68 {
69  return continuousPhase_;
70 }
71 
72 
75 {
76  return velocityGroups_;
77 }
78 
79 
82 {
83  return sizeGroups_;
84 }
85 
86 
89 {
90  return phasePairs_;
91 }
92 
93 
96 {
97  return v_;
98 }
99 
100 
101 inline const Foam::volScalarField&
103 {
104  if (velocityGroups_.size() > 1)
105  {
106  return alphas_();
107  }
108  else
109  {
110  return velocityGroups_.first().phase();
111  }
112 }
113 
114 
115 inline const Foam::volVectorField&
117 {
118  if (velocityGroups_.size() > 1)
119  {
120  return U_();
121  }
122  else
123  {
124  return velocityGroups_.first().phase().U();
125  }
126 }
127 
128 
129 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
const volVectorField & U() const
Return average velocity.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const PtrList< dimensionedScalar > & v() const
Return the sizeGroup boundaries.
const phasePairTable & phasePairs() const
Return list of unordered phasePairs in this populationBalance.
const dictionary & dict() const
Return populationBalanceCoeffs dictionary.
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
Definition: solution.C:342
T lookupType(const word &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const UPtrList< velocityGroup > & velocityGroups() const
Return the velocityGroups belonging to this populationBalance.
const phaseModel & continuousPhase() const
Return continuous phase.
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:67
const phaseSystem & fluid() const
Return reference to the phaseSystem.
const UPtrList< sizeGroup > & sizeGroups() const
Return the sizeGroups belonging to this populationBalance.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const fvMesh & mesh() const
Return reference to the mesh.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53