Skip to content

Aerosol size distributions

Download Python script

Why can two plots of the same aerosol population have different heights and shapes? The ordinate may describe number per unit diameter, number in a bin, or number per logarithmic interval. Recognizing that distinction is essential when comparing an instrument spectrum with a model’s initial conditions.

Here we construct one- and two-component lognormal populations, compare a diameter density with bin-integrated numbers, and convert the density into Particula’s native radius coordinate. The calculation uses CPU NumPy arrays; familiarity with native particle construction helps with the last step. The populations are illustrative, not fitted measurements.

Python · section 1
# In Colab uncomment the following command to install particula:
# Install from the repository root: `python -m pip install -e ".[extra]"`
import matplotlib.pyplot as plt
import numpy as np
import particula as par

For diameter , a lognormal number density has the form

Here is the geometric mean diameter and the geometric standard deviation. Particula’s argument is named mode, but the helper passes it to SciPy as scale: it is , not the peak of . The latter occurs at . See SciPy’s lognormal parameterization.

The helper normalizes each component numerically over the supplied grid to its requested total . Thus a correct total alone does not prove that the grid captures the tails of the intended untruncated distribution.

For the first plots, is in micrometres and the supplied totals are numbers, so the PDF ordinate is number per micrometre. Dividing by would give a probability density; the plotted quantity itself is population-scaled.

Logarithmic spacing resolves several size decades with a manageable grid. The domain below is 0.001–10 µm in diameter. Logarithmic spacing of the points does not itself turn a density per diameter into a density per log diameter.

Python · section 2
# Define the x_values as a range of particle diameters
x_values = np.logspace(-3, 1, 2000) # From 0.001 to 10 microns

The first component has a geometric mean diameter of 0.02 µm, geometric standard deviation 1.4, and total number 1,000. Keeping the total separate from size and spread lets us distinguish abundance from distribution shape.

Python · section 4
# Single mode distribution
single_mode_gsd = np.array([1.4])
single_mode = np.array([0.02])
single_mode_nparticles = np.array([1e3])
single_mode_distribution = par.particles.get_lognormal_pdf_distribution(
x_values, single_mode, single_mode_gsd, single_mode_nparticles
)

The second population retains the first component and adds a broader one centered at 1 µm, also with total number 1,000. Equal component totals do not imply equal peak heights in a density per unit diameter.

Python · section 6
# Multi-mode distribution
multi_mode_gsd = np.array([1.4, 1.8])
multi_mode = np.array([0.02, 1.0])
multi_mode_nparticles = np.array([1e3, 1e3])
multi_mode_distribution = par.particles.get_lognormal_pdf_distribution(
x_values, multi_mode, multi_mode_gsd, multi_mode_nparticles
)

The next plot uses a logarithmic horizontal axis but retains on the vertical axis. Look for the narrow small-particle peak and the broader large-particle component. Their height difference reflects width and coordinate choice as well as abundance. Visual area on this log-axis figure is not the integral over linear diameter.

Python · section 8
plt.figure(figsize=(10, 6))
plt.plot(x_values, single_mode_distribution, label="Single Mode", linewidth=4)
plt.plot(x_values, multi_mode_distribution, label="Multi Mode")
plt.title("Lognormal Particle Size Distribution")
plt.xlabel("Particle Diameter (μm)")
plt.ylabel("Number per micrometre of diameter")
plt.xscale("log")
plt.legend()
plt.grid(True)
plt.show()
Aerosol size distributions: saved scientific figure
Aerosol size distributions · saved execution output

Recover the total with the matching integral

Section titled “Recover the total with the matching integral”

The printed integrals use the diameter coordinates, rather than summing the PDF values. Compare them with the supplied totals: 1,000 for the single component and 2,000 for the mixture. This checks the normalization convention; the helper’s explicit normalization means it is not an independent test of physical realism or tail coverage.

Python · section 10
single_mode_total_concentration = np.trapezoid(
single_mode_distribution, x_values
)
multi_mode_total_concentration = np.trapezoid(multi_mode_distribution, x_values)
print(f"Total Concentration for Single Mode: {single_mode_total_concentration}")
print(f"Total Concentration for Multi Mode: {multi_mode_total_concentration}")
Total Concentration for Single Mode: 1000.0
Total Concentration for Multi Mode: 2000.000000000002

A bin-integrated distribution stores a contribution for each interval; its total is . Particula calls this representation a PMF. Here “mass” in probability mass function does not mean particle material mass.

The helper weights the PDF by bin widths and rescales the sum to the requested total. On a logarithmic grid, large-diameter bins are wider in linear diameter, so weighting changes the relative heights. Both plots still describe the same chosen population, within the numerical discretization.

Python · section 11
single_pmf_distribution = par.particles.get_lognormal_pmf_distribution(
x_values, single_mode, single_mode_gsd, single_mode_nparticles
)
multi_pmf_distribution = par.particles.get_lognormal_pmf_distribution(
x_values, multi_mode, multi_mode_gsd, multi_mode_nparticles
)

Compare this plot with the PDF above. Bin width is now included, so peak heights cannot be compared directly across the two ordinates. Refining the grid changes number per bin even when the underlying continuous population is unchanged.

Python · section 12
plt.figure(figsize=(10, 6))
plt.plot(x_values, single_pmf_distribution, label="Single Mode", linewidth=4)
plt.plot(x_values, multi_pmf_distribution, label="Multi Mode")
plt.title("Lognormal PMF Particle Size Distribution")
plt.xlabel("Particle Diameter (μm)")
plt.ylabel("Number of Particles")
plt.xscale("log")
plt.legend()
plt.grid(True)
plt.show()
Aerosol size distributions: saved scientific figure
Aerosol size distributions · saved execution output

The PMF is already integrated over bins, so sum its entries without multiplying by bin widths again. The printed values can be compared with the earlier PDF integrals. Agreement checks consistent bookkeeping between representations.

Python · section 14
single_mode_total_concentration = single_pmf_distribution.sum()
multi_mode_total_concentration = multi_pmf_distribution.sum()
print(f"Total Concentration for Single Mode: {single_mode_total_concentration}")
print(f"Total Concentration for Multi Mode: {multi_mode_total_concentration}")
Total Concentration for Single Mode: 1000.0000000000001
Total Concentration for Multi Mode: 2000.0

The useful distinction is the integration rule: integrate a density against its coordinate, or sum bin contributions. A change in plot shape can therefore come entirely from representation. Before attributing it to aerosol physics, check the coordinate, units, bin widths, and normalization.

Native continuous_pdf storage uses radius in metres and . With in micrometres, , hence . Changing the coordinate requires changing the ordinate too; rescaling the horizontal axis alone would change the integral.

For this final model construction, interpret the supplied component totals as number concentrations in m⁻³. The same numerical spectrum then has units m⁻³ µm⁻¹ before conversion and m⁻⁴ afterward. This concentration convention is an input assumption, not a volume measurement. The radius grid accompanies the stored PDF.

Python · section 15
radius_grid_m = x_values * 1e-6 / 2
radius_pdf = multi_mode_distribution * 2e6
native_pdf = par.particles.create_particle_data_from_radii(
radii=radius_grid_m,
concentration=radius_pdf,
distribution_type="continuous_pdf",
density=1000.0,
)
print("Native radius-PDF number density [m^-3]:", native_pdf.number_density)
Native radius-PDF number density [m^-3]: [2000.]

The final printed native number density should retain the mixture’s supplied 2,000 m⁻³ under the stated concentration convention. The key result is that PDF, bin-integrated number, and native radius PDF require different ordinates while preserving the represented population.

To adapt this to an instrument spectrum, first identify whether its ordinate is , , or number in a bin. For example, . Then compare integrated concentration before and after conversion, and test sensitivity to the grid and measurement range. These would be additional checks, not results established by this example. Continue to population storage or use the same representation distinction in coagulation comparisons.

Explore this topic: Size distributions