Size Distributions
Notation
By convention blackboard bold characters denote size distributions
Blackboard bold font: π, π, π, π, π, π, π, ...
Histogram Representation
The size distribution is represented as a histogram. It is a composite data type SizeDistribution that has the fields Dp, De, ΞlnD, S, and N.
- π.Dp: Geometric midpoint diameters
- π.De: Bin edge diameters
- π.ΞlnD: Log bin spacing, ΞlnD = ln(Dup/Dlow)
- π.S: Spectral density
- π.N: Number concentration in the bin
The size distribution can be constructed various ways. The easiest is to use one of the constructor functions. For example, the lognormal function creates a lognormal size distribution. The following example creates a lognormal size distribution with number concentration equals 200 cm-3, geometric mode diameter of 80 nm, geometric standard deviation of 1.2, with 10 size bins between 30 and 300 nm. The result is placed in a DataFrame for display purposes. The r
function is to round the results for clarity. The output illustrates that the SizeDistribution type is simply a histagram table.
r(x) = round.(Int,x) # Function to round and convert to Int
π = lognormal([[200, 80, 1.2]]; d1 = 30.0, d2 = 300.0, bins = 10);
DataFrame(
Dlow = r(π.De[1:end-1]),
Dup = r(π.De[2:end]),
ΞlnD = round.(π.ΞlnD, digits = 2),
Dp = r(π.Dp),
S = r(π.S),
N = r(π.N),
)
10 rows Γ 6 columns
Dlow | Dup | ΞlnD | Dp | S | N | |
---|---|---|---|---|---|---|
Int64 | Int64 | Float64 | Int64 | Int64 | Int64 | |
1 | 30 | 38 | 0.23 | 34 | 0 | 0 |
2 | 38 | 48 | 0.23 | 42 | 1 | 0 |
3 | 48 | 60 | 0.23 | 53 | 37 | 9 |
4 | 60 | 75 | 0.23 | 67 | 276 | 64 |
5 | 75 | 95 | 0.23 | 85 | 418 | 96 |
6 | 95 | 119 | 0.23 | 106 | 128 | 30 |
7 | 119 | 150 | 0.23 | 134 | 8 | 2 |
8 | 150 | 189 | 0.23 | 169 | 0 | 0 |
9 | 189 | 238 | 0.23 | 212 | 0 | 0 |
10 | 238 | 300 | 0.23 | 267 | 0 | 0 |
Manipulating Size Distributions
Size distributions can be intuitively manipulated through operators. For example, the sum of two size distributions (π© = πβ + πβ) is the superposition.
# Example addition of size distributions
πβ = lognormal([[120, 90, 1.20]]; d1 = 10.0, d2 = 1000.0, bins = 256) # size distribution
πβ = lognormal([[90, 140, 1.15]]; d1 = 20.0, d2 = 800.0, bins = 256) # size distribution
π© = πβ + πβ
The package implements a list of Operators for size distribution manipulation. Check out the Tutorial Session 1 and/or Notebook S3 in the Notebooks section for visualizations.