Π Chamber droplet gain and background count in a two-layer seed-growth model
View code · Download Python script · Download complete ZIP
Can a simulation match a cloud droplet gain while starting with too few
droplets? In this two-layer seed-growth model, a localized dry inlet acts
on droplets grown from a continuous salt and vapor supply. The study
also tests prescribed air velocities with a fitted wet-droplet supply.
Use the ZIP download with Particula, NumPy, Matplotlib, Warp, a CUDA GPU
and the CUDA compiler (nvcc on PATH, or set NVCC).
Compare each treatment with its own continuously seeded background
Section titled “Compare each treatment with its own continuously seeded background”Both seed loadings evolve for six hours from empty, saturated air. A control and a dry-air branch each continue six hours from that same background. The two-layer model uses a fixed four-second NaCl water-transfer table. The counter samples the upper-layer mean during the final hour. Each stage checks number and water conservation. Published measurements are read only for comparison.
Python · section 1
import matplotlib.pyplot as plt
if "saved_data" in globals(): report = globals()["saved_data"]else: from scripts.pi_chamber_lidar.replay import simulate
report = simulate()
print(f"CUDA device: {report['device']}")for row in report["states"]: print( f"{row['case']}: {row['model_cloud']:.1f} cloud droplets/cm³, " f"{row['model_water']:.1f} mg/m³ visible liquid water" )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
CUDA device: NVIDIA GeForce RTX 5060
clean-B: 11.3 cloud droplets/cm³, 70.8 mg/m³ visible liquid water
polluted-B: 455.7 cloud droplets/cm³, 332.9 mg/m³ visible liquid water
clean-E: 16.4 cloud droplets/cm³, 54.7 mg/m³ visible liquid water
polluted-E: 528.7 cloud droplets/cm³, 222.6 mg/m³ visible liquid water
Read the change alongside the absolute population
Section titled “Read the change alongside the absolute population”Both panels show cloud droplets from 2 to 40.679 µm in polluted air. The first counts the background. The second subtracts that background from the dry-air treatment. A common zero within each panel preserves the ordering, and the numerical labels give the concentrations.
Python · section 2
states = {row["case"]: row for row in report["states"]}background = states["polluted-B"]treated = states["polluted-E"]quantities = ("measured_cloud", "model_cloud")fig, axes = plt.subplots(1, 2, figsize=(8, 3.8), layout="constrained")for axis, title, values in zip( axes, ("Background", "Gain after dry air enters"), ( [background[k] for k in quantities], [treated[k] - background[k] for k in quantities], ), strict=True,): bars = axis.bar( ["Measured", "Two-layer seed growth"], values, color=["#243E43", "#135963"], ) axis.bar_label(bars, fmt="%.0f", padding=4) axis.set( title=title, ylabel="Cloud droplets (cm⁻³)", ylim=(0, max(values) * 1.2) ) axis.spines[["top", "right"]].set_visible(False)plt.show()
The two-layer seed-growth model gains 73 droplets/cm³ in polluted air, close to the measured gain of 72. Its background contains only 456 droplets/cm³ against 1,562 measured. For the spectrum and lidar comparison, the study uses a two-layer case with both vapor and dry air supplied locally. It compares that case with prescribed flow and a fitted wet-droplet supply.
Related studies
Section titled “Related studies”Explore this topic: Chamber experiments · Condensation and evaporation · GPU workflows