A physics-based simulation of aerosol particle penetration and deposition in human respiratory organs, implementing the ICRP 66 Human Respiratory Tract Model with Weibel Model A lung morphometry.
-
Upload the notebook to Google Colab:
- Go to colab.research.google.com
- File → Upload → select
particle_deposition_simulation.ipynb
-
Enable GPU runtime:
- Runtime → Change runtime type → T4 GPU (or any available NVIDIA GPU)
- Click Save
-
Run all cells:
- Runtime → Run all (Ctrl+F9)
- The notebook is self-contained — all dependencies install automatically
-
Interact:
- Cell 11 provides an interactive widget with PM size bin toggle buttons
- Select any PM bin from PM₀.₁ (ultrafine) to PM₁₀ (coarse)
- Switch breathing scenarios (sleeping, sitting, light/heavy exercise)
| File | Description |
|---|---|
particle_deposition_simulation.ipynb |
Main notebook — complete simulation + visualization (run this in Colab) |
simulation_engine.py |
Standalone Python module with the ICRP 66 deposition model |
gpu_monte_carlo.py |
GPU-accelerated Monte Carlo particle tracker (PyTorch) |
README.md |
This file |
Weibel Model A symmetric dichotomous branching tree with 24 generations:
- Generation 0: Trachea (d = 18 mm, L = 120 mm)
- Generations 1–7: Bronchi (BB region)
- Generations 8–16: Bronchioles (bb region)
- Generations 17–23: Respiratory bronchioles + alveolar ducts/sacs (AI region)
1. Inertial Impaction (dominant for d > 2 μm):
Stk = ρ_p · d_p² · C_c · U / (18 · μ · D_aw)
η_imp = 1 - (2/π) · arccos(θ · Stk) for θ·Stk < 1
2. Gravitational Sedimentation (dominant for 0.5 < d < 5 μm):
V_ts = ρ_p · d_p² · g · C_c / (18 · μ)
η_sed = 1 - exp(-4 · V_ts · t_res · cos(φ) / (π · D_aw))
3. Brownian Diffusion (dominant for d < 0.1 μm):
D = k_B · T · C_c / (3π · μ · d_p)
Δ = D · L / (U · R²)
η_diff = Ingham (1975) series solution
4. Combined deposition (independent mechanisms):
η_total = 1 - (1 - η_imp)(1 - η_sed)(1 - η_diff)
C_c = 1 + Kn · (1.142 + 0.558 · exp(-0.999/Kn))
where Kn = 2λ/d_p (Allen & Raabe 1985 coefficients).
ICRP 66 semi-empirical fits for inhalability, anterior nasal (ET1), and posterior nasal-to-larynx (ET2) regions.
| Bin | Aerodynamic Diameter | Representative d_ae | Dominant Mechanism |
|---|---|---|---|
| PM₀.₁ | < 0.1 μm | 0.05 μm | Brownian diffusion |
| PM₀.₅ | 0.1 – 0.5 μm | 0.3 μm | Diffusion + sedimentation |
| PM₁.₀ | 0.5 – 1.0 μm | 0.7 μm | Minimum deposition zone |
| PM₂.₅ | 1.0 – 2.5 μm | 1.5 μm | Sedimentation |
| PM₄.₀ | 2.5 – 4.0 μm | 3.0 μm | Sedimentation + impaction |
| PM₁₀ | 4.0 – 10 μm | 7.0 μm | Impaction |
- Deterministic evaluation of ICRP 66 equations
- ~300 μs per particle size on CPU
- Full size sweep (200 points) in ~60 ms
- Stochastic Individual Path (SIP) model
- Bernoulli sampling at each bifurcation
- 15% coefficient of variation for inter-subject variability
- 500,000 particles per bin on T4 GPU (~2s per bin)
- Falls back to CPU with 100,000 particles if no GPU
- 5-layer feedforward network (SiLU + LayerNorm)
- Input: [log₁₀(d_p), scenario one-hot encoding]
- Output: [ET, BB, bb, AI, exhaled] fractions (softmax)
- Trained on 20,000 physics evaluations
- Real-time inference (<1 ms) for interactive exploration
The notebook produces 6 main visualization types:
- Regional deposition curves — Stacked area plot of ET/BB/bb/AI vs particle diameter
- Anatomical lung map — Schematic with deposition heatmap + generation-resolved bars
- Mechanism decomposition — Impaction/sedimentation/diffusion per generation
- Interactive Plotly dashboard — 4-panel with PM bin toggles
- Breathing scenario comparison — Side-by-side sleeping/sitting/light/heavy exercise
- Physics parameter space — C_c, D, V_ts, τ, Kn across particle sizes
# Install dependencies
pip install torch numpy matplotlib plotly scipy ipywidgets scikit-learn
# Run simulation engine
python simulation_engine.py
# Run Monte Carlo (GPU recommended)
python gpu_monte_carlo.py- ICRP Publication 66 (1994). Human Respiratory Tract Model for Radiological Protection. Ann. ICRP 24(1-3).
- Weibel, E.R. (1963). Morphometry of the Human Lung. Academic Press.
- Hinds, W.C. (1999). Aerosol Technology, 2nd Ed. Wiley.
- Hofmann, W. (2011). Modelling inhaled particle deposition in the human lung — A review. J. Aerosol Sci. 42, 693-724.
- Longest, P.W. & Holbrook, L.T. (2012). In silico models of aerosol delivery to the respiratory tract. J. Aerosol Sci. 45, 1-17.
- Ingham, D.B. (1975). Diffusion of aerosols from a stream flowing through a cylindrical tube. J. Aerosol Sci. 6, 125-132.
- Allen, M.D. & Raabe, O.G. (1985). Slip correction measurements of spherical solid aerosol particles. Aerosol Sci. Technol. 4, 269-286.
- Tian, G. et al. (2015). Stochastic individual path model for aerosol deposition. Aerosol Sci. Technol. 49, 875-890.
Live animated simulation of particulate matter (PM) inhalation and deposition in human organs, with physics-based particle trajectories computed from the ICRP 66 Human Respiratory Tract Model.
| File | Type | Description |
|---|---|---|
particle_sim_2d.jsx |
React Component | 2D animated canvas simulation with anatomical body cross-section |
particle_sim_3d.html |
Standalone HTML | 3D WebGL simulation with CAD-style navigation (Three.js r128) |
particle_deposition_simulation.ipynb |
Jupyter Notebook | Full GPU-accelerated physics model (from previous delivery) |
simulation_engine.py |
Python Module | ICRP 66 computation engine |
gpu_monte_carlo.py |
Python Module | GPU Monte Carlo tracker |
Open particle_sim_3d.html in any modern browser (Chrome, Firefox, Edge, Safari)
That's it — the file is completely self-contained. No server needed. Three.js loads from CDN.
# Python 3
python -m http.server 8000
# Then open: http://localhost:8000/particle_sim_3d.html- Left-drag: Orbit around the body
- Right-drag: Pan
- Scroll wheel: Zoom in/out
- Touch: Single-finger orbit (mobile)
- Wireframe button: Toggle body wireframe view
- X-Ray button: Increase organ visibility, decrease body opacity
The 2D simulation is a React component (.jsx). It renders in Claude.ai's artifact viewer directly.
# Create a new React project
npx create-react-app particle-sim
cd particle-sim
# Copy particle_sim_2d.jsx to src/App.jsx (rename the default export)
cp particle_sim_2d.jsx src/App.jsx
# Install dependencies (none beyond React)
npm startOr paste the code into any React playground (CodeSandbox, StackBlitz, etc.).
Both simulations implement identical physics from the ICRP 66 HRTM:
Each particle's deposition region is sampled from the ICRP 66 probability distribution:
- Compute regional deposition fractions (ET, BB, bb, AI) for the given diameter
- Sample a uniform random number r ∈ [0, 1]
- Map r to a region via cumulative distribution
- Particle follows the anatomical path to that region
- Trajectory: Interpolation along Weibel airway centerlines
- Brownian motion: Random displacement ∝ √D perpendicular to flow (Wiener process)
- Gravitational settling: Downward drift ∝ V_ts (Stokes settling velocity with Cunningham correction)
- Impaction at bifurcations: Encoded in the ICRP 66 deposition probability (Stokes number dependent)
Particles < 100 nm can translocate through the alveolar epithelium into systemic circulation:
- ~25-30% of alveolar-deposited UFPs enter bloodstream (Oberdörster 2004, Kreyling 2017)
- Distributed to liver, kidneys, brain, spleen via blood flow
- Visualized as red particles following blood vessel paths
| Diameter | Dominant Mechanism | Physics |
|---|---|---|
| < 0.1 μm | Brownian diffusion | D = kT·Cc/(3πμdp), Δ = DL/UR² |
| 0.1–0.5 μm | Deposition minimum | Low Stk, low Vts, moderate D |
| 0.5–2.5 μm | Sedimentation | Vts = ρp·dp²·g·Cc/(18μ) |
| 2.5–10 μm | Inertial impaction | Stk = τ·U/D_aw at bifurcations |
Cunningham slip correction (Allen & Raabe 1985):
Cc = 1 + Kn·(1.142 + 0.558·exp(-0.999/Kn))
where Kn = 2λ/dp (Knudsen number)
Impaction efficiency (Yeh & Schum 1980):
η_imp = 1 - (2/π)·arccos(θ·Stk) for θ·Stk < 1
Sedimentation efficiency:
η_sed = 1 - exp(-4·Vts·tres·cos(φ) / (π·D_aw))
Diffusion efficiency (Ingham 1975):
η_diff = f(Δ), where Δ = D·L/(U·R²)
Ingham series: η = 1 - 0.819·exp(-14.63Δ) - 0.0976·exp(-89.22Δ) - ...
Combined (independent mechanisms):
η_total = 1 - (1 - η_imp)(1 - η_sed)(1 - η_diff)
Toggle between these in both simulations:
| Bin | Representative d_ae | Visual Size | Color |
|---|---|---|---|
| PM₀.₁ | 0.05 μm | Smallest | Pink |
| PM₀.₅ | 0.3 μm | Small | Orange |
| PM₁.₀ | 0.7 μm | Medium-small | Yellow |
| PM₂.₅ | 1.5 μm | Medium | Green |
| PM₄.₀ | 3.0 μm | Medium-large | Blue |
| PM₁₀ | 7.0 μm | Largest | Purple |
- Anatomical body outline with positioned organs
- Real-time particle trails with Brownian jitter
- Particle glow effects proportional to size
- Deposited particles pulse at deposition site
- UFP translocation shown as color change (→ red) following blood vessels
- Live deposition statistics with ICRP 66 predicted values
- Physics readout (Cc, D, Vts, τ)
- Full procedural 3D human body with transparent skin
- Semi-transparent organs (lungs, heart, liver, kidneys, brain, stomach)
- Visible airway tree (trachea → bronchi → bronchioles → alveoli)
- Blood vessel paths for translocation
- Organ emission/glow proportional to local deposition
- CAD-style orbit/pan/zoom navigation
- Wireframe and X-Ray viewing modes
- Additive-blend particle rendering for depth perception
- ICRP Publication 66 (1994). Human Respiratory Tract Model for Radiological Protection.
- Weibel, E.R. (1963). Morphometry of the Human Lung.
- Oberdörster, G. et al. (2004). Translocation of inhaled ultrafine particles to the brain. Inhal. Toxicol. 16, 437-445.
- Kreyling, W.G. et al. (2017). Air–blood barrier translocation of tracheally instilled gold nanoparticles inversely depends on particle size. ACS Nano 8, 222-233.
- Hofmann, W. (2011). Modelling inhaled particle deposition in the human lung. J. Aerosol Sci. 42, 693-724.
- Ingham, D.B. (1975). Diffusion of aerosols from a stream flowing through a cylindrical tube. J. Aerosol Sci. 6, 125-132.