# Hazmat Chemical Database for AnyHazard A feature pitch for AnyHazard plume simulation. --- ## **Problem** AnyHazard's hazmat plume simulation has a small preset list of chemicals. The clipboard lets users select a chemical and adjust isolation/downwind distances with sliders, but vapor density is fixed per chemical. AnyHazard itself only simulates lagrangian particles based on the selection — no editing capability. We need to expand the chemical database so users can select from the full ERG catalog. Emergency responders reference the ERG (Emergency Response Guidebook) which contains hundreds of chemicals with pre-defined protective action distances. Currently, users must: 1. Look up the chemical in an external reference 2. Find vapor density and distance values 3. Manually enter them into the simulation 4. Hope they didn't make a transcription error This slows down both training exercises and real incident response. The AnyHazard clipboard (companion app) also lacks chemical selection, forcing the same manual workflow on mobile. --- ## **Appetite** **2 weeks** — Small batch This is a data-driven feature. The core work is: - Curating/importing a chemical database - Building a searchable picker UI - Wiring selection to existing plume parameters The plume simulation already works. We're adding a lookup layer, not rebuilding physics. --- ## **Solution** ### Chemical Database Import ERG chemical data with fields: - **Name** and **UN Number** (for search) - **Vapor Density** (relative to air) - **Isolation Distance** (initial) - **Downwind Distance** (protective action) ### Searchable Picker Add a chemical selector to AnyHazard's hazmat tool: - Search by name or UN number - Show key values before selection - One tap fills vapor density and distances ### Clipboard Sync Extend the AnyHazard clipboard to include chemical selection: - Same searchable database - Selection syncs to main simulation - Field users can set up scenarios on mobile ### Template Output When a chemical is selected, populate the plume simulation with: ``` Chemical: Chlorine (UN 1017) Vapor Density: 2.5 (heavier than air) Isolation: 100m Downwind (day): 0.5 km Downwind (night): 1.5 km ``` --- ## **Rabbit Holes** **ERG Data Complexity** — The ERG has different distances for small vs. large spills, day vs. night, and some chemicals have fire/explosion considerations. Start with the most common scenario (large spill) and expand later. **Temperature Effects** — Vapor density and dispersion change with temperature. The basic implementation ignores this; it's a future extension, not week-2 scope. **Release Rates** — Real incidents have varying release amounts over time. This requires time-series input and dynamic simulation updates. Flag for future but don't attempt now. **Data Licensing** — Verify ERG data is public domain (it is — published by DOT/PHMSA). No licensing rabbit hole. --- ## **No-Gos** - **No custom chemical editor** — Users pick from the database, not create new entries - **No temperature modeling** — Use standard conditions; temperature is a future extension - **No time-varying releases** — Single release amount, not dynamic curves - **No plume physics changes** — We're feeding parameters to existing simulation, not rewriting dispersion models - **No offline ERG sync** — Clipboard requires connectivity for chemical lookup (can cache recent selections)