LaakkonenAlopaeusAittamaaDsd.C
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 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 
28 #include "breakupModel.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace diameterModels
35 {
36 namespace daughterSizeDistributionModels
37 {
38  defineTypeNameAndDebug(LaakkonenAlopaeusAittamaaDsd, 0);
40  (
41  daughterSizeDistributionModel,
42  LaakkonenAlopaeusAittamaaDsd,
43  dictionary
44  );
45 }
46 }
47 }
48 
49 
50 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
51 
54 (
55  const breakupModel& breakup,
56  const dictionary& dict
57 )
58 :
59  daughterSizeDistributionModel(breakup, dict)
60 {}
61 
62 
63 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
64 
67 {}
68 
69 
70 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
71 
75 (
76  const label i,
77  const label k
78 ) const
79 {
80  const dimensionedScalar& xi = breakup_.popBal().sizeGroups()[i].x();
81  const dimensionedScalar& xk = breakup_.popBal().sizeGroups()[k].x();
82  const UPtrList<sizeGroup>& sizeGroups = breakup_.popBal().sizeGroups();
83 
84  if (i == 0)
85  {
86  const dimensionedScalar& xii = sizeGroups[i+1].x();
87 
88  return
89  (
90  5.0*pow4(xii)*sqr(xk) - 12.0*pow5(xi)*xii + 10.0*pow6(xi)
91  - (20.0*pow3(xi)*xii - 15.0*pow4(xi))*sqr(xk) - 6.0*pow5(xii)*xk
92  - (24*pow5(xi) - 30*pow4(xi)*xii)*xk + 2*pow6(xii)
93  )
94  /((xii - xi)*pow5(xk));
95  }
96  else if (i == k)
97  {
98  const dimensionedScalar& x = sizeGroups[i-1].x();
99 
100  return
101  (
102  (15.0*pow4(xi) - 20.0*x*pow3(xi))*sqr(xk)
103  + 5.0*pow4(x)*sqr(xk) + (30.0*x*pow4(xi) - 24.0*pow5(xi))*xk
104  - 6.0*pow5(x)*xk + 10.0*pow6(xi) - 12.0*x*pow5(xi) + 2.0*pow6(x)
105  )
106  /((xi - x)*pow5(xk));
107  }
108  else
109  {
110  const dimensionedScalar& x = sizeGroups[i-1].x();
111  const dimensionedScalar& xii = sizeGroups[i+1].x();
112 
113  return
114  (
115  5.0*pow4(xii)*sqr(xk) - 12.0*pow5(xi)*xii + 10.0*pow6(xi)
116  - (20.0*pow3(xi)*xii - 15.0*pow4(xi))*sqr(xk) - 6.0*pow5(xii)*xk
117  - (24*pow5(xi) - 30*pow4(xi)*xii)*xk + 2*pow6(xii)
118  )
119  /((xii - xi)*pow5(xk))
120  + (
121  (15.0*pow4(xi) - 20.0*x*pow3(xi))*sqr(xk)
122  + 5.0*pow4(x)*sqr(xk) + (30.0*x*pow4(xi) - 24.0*pow5(xi))*xk
123  - 6.0*pow5(x)*xk + 10.0*pow6(xi) - 12.0*x*pow5(xi) + 2.0*pow6(x)
124  )
125  /((xi - x)*pow5(xk));
126  }
127 }
128 
129 
130 // ************************************************************************* //
dictionary dict
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
dimensionedSymmTensor sqr(const dimensionedVector &dv)
label k
Boltzmann constant.
Generic dimensioned Type class.
dimensionedScalar pow5(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
const populationBalanceModel & popBal() const
Return reference to the populationBalanceModel.
Definition: breakupModel.H:144
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
const UPtrList< sizeGroup > & sizeGroups() const
Return the sizeGroups belonging to this populationBalance.
virtual dimensionedScalar calcNik(const label i, const label k) const
Return total number of particles assigned to class i when a particle.
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
LaakkonenAlopaeusAittamaaDsd(const breakupModel &breakup, const dictionary &dict)
dimensionedScalar pow4(const dimensionedScalar &ds)
dimensionedScalar pow6(const dimensionedScalar &ds)
const breakupModel & breakup_
Reference to the breakupModel.
Namespace for OpenFOAM.