Skip to content

Reproduce the turbulent shear drop spectrum

View code · Download Python script · Download complete ZIP

Saffman and Turner calculated how initially identical drops merge in uniform turbulence. Can a constant collision rate match both the mean mass and the rare large drops? The study report compares their equations and Figure 2 with Particula.

Start with 600 drops/cm³ and 1.5 g/m³ of water. The turbulent dissipation stays fixed while each merger changes the radii available for the next encounter. Seven CUDA ensembles vary the box volume, seed, time step or observation time. The CPU reference integrates the authors’ discrete mass balance and evaluates the constant-rate solution independently.

Use the downloadable ZIP for a standalone run with Particula, Warp, NumPy, SciPy, pandas and Matplotlib. The documentation renderer can also replot its saved numerical results on CPU. Inspect the exact eightfold class at the last time in Figure 2 before comparing it with the paper’s separate cumulative thresholds.

Python · section 1

import matplotlib.pyplot as plt
from scripts.shear_drop_spectrum.plots import spectrum_figure
if "saved_data" in globals():
report = globals()["saved_data"]
else:
from scripts.shear_drop_spectrum.study import simulate
report = simulate()
endpoint = next(
row
for row in report["summary"]
if row["case"] == "large_fine_pooled" and row["K"] == 0.09
)
print(f"Device: {report['device']}")
print(
f"Exact eightfold drops per million initial drops: {1e6 * endpoint['n8']:.0f}"
)
print(
f"Constant rate fitted to mean mass: {1e6 * endpoint['matched_constant']:.0f}"
)
for row in report["physical"]:
print(
f"At {row['minutes']} min, at least {row['mass_at_least']} initial masses: "
f"{row['cuda_per_L']:.0f} drops/L"
)
Warp 1.11.1 initialized:
   CUDA Toolkit 12.9, Driver 13.4
   Devices:
     "cpu"      : "CPU"
     "cuda:0"   : "NVIDIA GeForce RTX 5060" (8 GiB, sm_120, mempool enabled)
   Kernel cache:
     ~/.cache/warp/1.11.1
Module particula.gpu.kernels.coagulation 54feb45 load on device 'cuda:0' took 4.20 ms  (cached)
Module particula.gpu.kernels.environment e11375e load on device 'cuda:0' took 1.83 ms  (cached)
Module particula.gpu.kernels.coagulation 358b13f load on device 'cuda:0' took 2.15 ms  (cached)
Module particula.gpu.kernels._coagulation_native f93a244 load on device 'cuda:0' took 1.44 ms  (cached)
Module warp.utils f35afd3 load on device 'cuda:0' took 0.83 ms  (cached)
Module warp.math edde159 load on device 'cuda:0' took 2.16 ms  (cached)
Module warp.marching_cubes fb6e712 load on device 'cuda:0' took 2.48 ms  (cached)
Module particula.gpu.kernels._coagulation_budget b4a3978 load on device 'cuda:0' took 1.48 ms  (cached)
Module particula.execution.communication 2909959 load on device 'cuda:0' took 1.36 ms  (cached)
Module particula.gpu.kernels._population_validation edde159 load on device 'cuda:0' took 2.29 ms  (cached)
Module particula.gpu.kernels.communication ac9b2a2 load on device 'cuda:0' took 2.75 ms  (cached)
Module particula.gpu.properties.gas_properties edde159 load on device 'cuda:0' took 0.87 ms  (cached)
Module particula.gpu.properties.particle_properties edde159 load on device 'cuda:0' took 0.23 ms  (cached)
Module particula.gpu.dynamics.coagulation_funcs edde159 load on device 'cuda:0' took 2.45 ms  (cached)
Module particula.gpu.dynamics.condensation_funcs edde159 load on device 'cuda:0' took 2.28 ms  (cached)
Module particula.gpu.kernels._condensation_native edde159 load on device 'cuda:0' took 2.28 ms  (cached)
Module particula.gpu.kernels._condensation_parallel edde159 load on device 'cuda:0' took 2.28 ms  (cached)
Module particula.gpu.kernels.thermodynamics edde159 load on device 'cuda:0' took 2.29 ms  (cached)
Module particula.gpu.kernels.condensation edde159 load on device 'cuda:0' took 2.27 ms  (cached)
Module particula.gpu.kernels.exhaustion 616f81d load on device 'cuda:0' took 2.68 ms  (cached)
Module particula.gpu.kernels.slot_management 0375e2c load on device 'cuda:0' took 0.91 ms  (cached)
Module particula.gpu.kernels.nucleation 1124f09 load on device 'cuda:0' took 2.55 ms  (cached)
Module particula.execution.gpu_resources 30f296c load on device 'cuda:0' took 2.15 ms  (cached)
Module particula.gpu.warp_types edde159 load on device 'cuda:0' took 2.28 ms  (cached)
Module particula.execution.prepared_diagnostics f551690 load on device 'cuda:0' took 1.92 ms  (cached)
Module particula.gpu.dynamics.ion_pair_data edde159 load on device 'cuda:0' took 2.27 ms  (cached)
Module particula.gpu.dynamics.van_der_waals edde159 load on device 'cuda:0' took 2.29 ms  (cached)
Module particula.gpu.kernels._coagulation_subcycling edde159 load on device 'cuda:0' took 2.29 ms  (cached)
Module particula.gpu.kernels._brownian_parallel 5433dfc load on device 'cuda:0' took 3.32 ms  (cached)
Module particula.execution.prepared_guards 5366864 load on device 'cuda:0' took 1.53 ms  (cached)
Module particula.gpu.kernels._brownian_parallel f84feee load on device 'cuda:0' took 3.69 ms  (cached)
Module particula.gpu.kernels._brownian_parallel c0acfec load on device 'cuda:0' took 4.89 ms  (cached)
Module particula.gpu.kernels.coagulation 2feff1b load on device 'cuda:0' took 4.68 ms  (cached)
Module particula.gpu.kernels.coagulation 93d340b load on device 'cuda:0' took 2.62 ms  (cached)
Device: NVIDIA GeForce RTX 5060
Exact eightfold drops per million initial drops: 610
Constant rate fitted to mean mass: 102
At 16 min, at least 4 initial masses: 89 drops/L
At 90 min, at least 8 initial masses: 101 drops/L

Compare the spectrum and the chance of seeing a rare drop

Section titled “Compare the spectrum and the chance of seeing a rare drop”

The left panel overlays the independent equations, particle-resolved means with 95% Monte Carlo intervals, and digitized points from the authors’ theoretical curve. The right panel counts independent boxes containing an exact eightfold drop. Wilson intervals show the sampling uncertainty in that fraction.

Python · section 2
spectrum_figure(report)
plt.show()
Reproduce the turbulent shear drop spectrum: saved scientific figure
Reproduce the turbulent shear drop spectrum · saved execution output

Particula tracks the size-dependent shear solution through the eightfold mass class. Matching the final mean mass with a constant rate still gives only about one sixth as many drops in that class. Even at the last time, more than half the larger boxes contained zero exact eightfold drops. To test this prediction in a chamber, measure the initial width and sampling volume, then count the upper tail independently of the mean.

Explore this topic: Cloud-droplet collision kernels · GPU workflows