powerLawUniformBinary.C
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 #include "powerLawUniformBinary.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 namespace diameterModels
37 {
38 namespace binaryBreakupModels
39 {
40  defineTypeNameAndDebug(powerLawUniformBinary, 0);
42  (
43  binaryBreakupModel,
44  powerLawUniformBinary,
45  dictionary
46  );
47 }
48 }
49 }
50 
51 
52 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
53 
56 (
57  const populationBalanceModel& popBal,
58  const dictionary& dict
59 )
60 :
61  binaryBreakupModel(popBal, dict),
62  power_(dict.get<scalar>("power"))
63 {}
64 
65 
66 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
67 
68 void
71 (
72  volScalarField& binaryBreakupRate,
73  const label i,
74  const label j
75 )
76 {
77  const sizeGroup& fj = popBal_.sizeGroups()[j];
78 
79  binaryBreakupRate.primitiveFieldRef() +=
80  pow(fj.x().value(), power_)*2.0/fj.x().value();
81 }
82 
83 
84 // ************************************************************************* //
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
const Type & value() const noexcept
Return const reference to value.
dictionary dict
const dimensionedScalar & x() const
Return representative volume of the sizeGroup.
Definition: sizeGroupI.H:52
addToRunTimeSelectionTable(binaryBreakupModel, LehrMilliesMewes, dictionary)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Class that solves the univariate population balance equation by means of a class method (also called ...
powerLawUniformBinary(const populationBalanceModel &popBal, const dictionary &dict)
virtual void addToBinaryBreakupRate(volScalarField &binaryBreakupRate, const label i, const label j)
Add to binary breakupRate.
Macros for easy insertion into run-time selection tables.
Base class for binary breakup models which give the breakup rate between a sizeGroup pair directly...
This class represents a single sizeGroup belonging to a velocityGroup. The main property of a sizeGro...
Definition: sizeGroup.H:92
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
Namespace for OpenFOAM.