All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
phaseChange.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) 2018-2020 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::diameterModels::driftModels::phaseChange
26 
27 Description
28  Drift induced by phase change. By default phase change mass
29  flux is distributed between sizeGroups of each velocityGroup with phase
30  change based on interfacial area of each size group.
31 
32 SourceFiles
33  phaseChange.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef phaseChange_H
38 #define phaseChange_H
39 
40 #include "driftModel.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace diameterModels
47 {
48 namespace driftModels
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class phaseChange Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class phaseChange
56 :
57  public driftModel
58 {
59  // Private Data
60 
61  //- PhasePairs between which phaseChange occurs, e.g.,
62  // "((gasI and liquid) (gasII and liquid))"
63  List<phasePairKey> pairKeys_;
64 
65  //- Distribute phase change mass flux between sizeGroups based on the
66  // number concentration, rather than the interfacial area
67  const Switch numberWeighted_;
68 
69  //- Weighting with which the phase change mass flux is distributed
71 
72  //- Name of the mass transfer rate
73  const word dmdtfName_;
74 
75  //- Name of the specie which changes phase, empty by default
76  const word specieName_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("phaseChange");
83 
84  // Constructor
85 
86  //- Construct from a population balance model and a dictionary
88  (
90  const dictionary& dict
91  );
92 
93 
94  //- Destructor
95  virtual ~phaseChange()
96  {}
97 
98 
99  // Member Functions
100 
101  //- Precompute diameter independent expressions
102  virtual void precompute();
103 
104  //- Add to driftRate
105  virtual void addToDriftRate
106  (
107  volScalarField& driftRate,
108  const label i
109  );
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace driftModels
116 } // End namespace diameterModels
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
const dictionary & dict() const
Return reference to model dictionary.
Definition: driftModel.H:145
Base class for drift models.
Definition: driftModel.H:50
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
virtual void addToDriftRate(volScalarField &driftRate, const label i)
Add to driftRate.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Class that solves the univariate population balance equation by means of a class method (also called ...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
virtual void precompute()
Precompute diameter independent expressions.
const populationBalanceModel & popBal() const
Return reference to the populationBalanceModel.
Definition: driftModel.H:139
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
Definition: Switch.H:60
phaseChange(const populationBalanceModel &popBal, const dictionary &dict)
Construct from a population balance model and a dictionary.
Drift induced by phase change. By default phase change mass flux is distributed between sizeGroups of...
Definition: phaseChange.H:54
A class for handling words, derived from string.
Definition: word.H:59
TypeName("phaseChange")
Runtime type information.
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
Namespace for OpenFOAM.