Simulation Methodology & Mathematical Architecture
Complete transparency into how the Peace Engineering simulation computes crater geometry, multi-year chemical fate and leaching, ecological recovery, and multi-explosion landscape fields inside index.html.
1. Modeling Paradigm: Analytical + Spatial Grid vs. Coupled Cellular PDE
A common question when reviewing spatial-temporal environmental visualizations is whether the underlying engine is a coupled cellular-automaton / finite-difference PDE solver (where every grid cell exchanges mass with neighboring cells at each time step $\Delta t$) or a closed-form analytical model evaluated on a display grid.
t ∈ [0, 30] years, projected onto a 108 × 108 cellular display grid (and an 85 × 85 3D terrain mesh). Because it is closed-form in time, scrubbing to any year or comparing 500 overlapping blasts runs in ~5 ms in a browser without numerical instability—at the cost of omitting coupled cell-to-cell advection-dispersion PDEs.
| Feature / Physics | Current PoC Analytical + 108×108 Grid | Future Upgrade Coupled Cellular / PDE |
|---|---|---|
| Time Stepping | Closed-form analytical functions of t (instant scrubbing from Yr 0 to Yr 30; zero Courant/CFL instability). |
Explicit or implicit time-stepping ($\Delta t$ hours–days) solving conservation of mass per voxel/cell. |
| Unsaturated Soil Leaching | Effective annual pore-water velocity $v_{\text{pore}}$ divided by linear retardation factor $R = 1 + (\rho_b/\theta) K_d$. | Richards equation for transient soil moisture + Advection-Dispersion-Reaction (ADR) PDE (e.g., HYDRUS-1D/2D). |
| Groundwater Plume | 1D vertical breakthrough to water table depth, followed by radial/elliptical downgradient spreading and dilution volume. | 2D/3D Darcy groundwater flow + solute transport (e.g., MODFLOW + MT3DMS) with hydraulic gradients and heterogeneity. |
| Multi-Blast Landscape (XX / YY km²) | Bounded-kernel stamping of XX seeded blasts onto a 108×108 grid + Poisson overlap area estimation. |
Full watershed-scale finite-volume transport with digital elevation model (DEM) runoff routing and stream networks. |
| Best Use Case | Rapid peace-engineering education, order-of-magnitude comparison, and hypothesis generation. | Site-specific environmental risk assessment, remediation design, and regulatory forecasting. |
2. Governing Equations Implemented in index.html
2.1 Physical Crater Scaling & 30-Year Geomorphic Slumping
Initial crater radius $R_0$ and depth $H_0$ follow Hopkinson–Cranz cube-root scaling as a function of TNT-equivalent explosive mass $W$ (kg), adjusted by soil geotechnical constants ($k_d, k_h$), burial coupling ($f_b$), and moisture coupling ($f_w = 0.94 + 0.14 \min(1, \text{Rain}/1200)$):
H₀ = min(3.8, k_h · f_b · f_w · W^(1/3)) [m]
slump(t) = 1 - exp(-t / τ_slump) (τ_slump = 7 yr in sand, 16 yr in cohesive soils)
R(t) = R₀ · (1 + 0.18 · slump(t)), H(t) = H₀ · (1 - 0.26 · slump(t))
2.2 Initial Chemical & Physical Deposition (CRREL High-Order vs. Low-Order)
Unconsumed energetic residue mass $M_{\text{res}}$ (g) depends critically on detonation efficiency:
M_TNT,0 = 1000 · W · f_res · f_TNT [g], M_RDX,0 = 1000 · W · f_res · f_RDX [g]
M_metal = M_metal,ref · (W / W_ref)^0.72 (Pb, Cu, Zn, Fe — independent of detonation efficiency)
Initial topsoil concentrations (mg/kg) are computed by mixing deposited mass into the affected crater + ejecta topsoil volume (radius $R_{\text{aff}} = \max(1.2, 2.4 R_0)$, mixing depth $0.25\text{ m}$, soil bulk density $\rho_b$).
2.3 Soil Sorption, Retardation & Vertical Leaching
Sorption is modeled via the linear organic-carbon partitioning relationship using U.S. EPA reference $K_{oc}$ values ($K_{oc,\text{TNT}} = 300\text{ mL/g}$, $K_{oc,\text{RDX}} = 50\text{ mL/g}$):
R = 1 + (ρ_b / θ) · K_d [dimensionless retardation factor]
v_pore = max(0.08, (Rain_mm / 1000) · 0.44 · K_sat,rel / θ) [m/yr]
v_leach = v_pore / R → z_front(t) = 0.65 · H₀ + v_leach · t
Because $K_{oc,\text{TNT}}$ is ~6× larger than $K_{oc,\text{RDX}}$, TNT stays heavily retarded in organic-rich topsoils (Chernozem, Wetland, Forest), whereas RDX migrates rapidly down to the water table depth $z_{\text{WT}}$ in low-organic Sandy soils.
2.4 Chemical Transformation, Decay & Groundwater Concentration
RDX_surface(t) = C_RDX,0 · exp(-k_RDX·t) · (0.08 + 0.92 · exp(-0.72 · v_RDX · t))
RDX_GW(t) = (M_RDX,0 · 10⁶ · exp(-k_RDX·t) · (1 - exp(-1.1·t_GW)) · 0.38) / V_dil(t_GW) [µg/L, when z_RDX ≥ z_WT]
Metals(t) = C_metal,0 · (0.93 + 0.07 · exp(-t / 40)) [non-degrading; minor mechanical dispersion only]
Here k_RDX increases with the biome's anaerobicFactor (capturing faster anaerobic RDX ring cleavage in saturated wetlands vs. aerated dry/sandy soils), while f_solid(t) models slow crystalline dissolution of low-order chunks over several years.
2.5 Soil Microbiome & Vegetation Recovery
Vegetation(t) = [100·(1 - exp(-t / τ_veg))] · (1 - 0.64·Tox_TNT) · (1 - 0.38·Tox_RDX) · (1 - 0.32·Tox_Metal)
Toxicity terms use log-scaled dose-response curves. Because Tox_Metal does not decay to zero, both microbiome and vegetation recovery inside the crater zone remain permanently capped below 100% unless remediated.
2.6 Multi-Explosion Landscape Field (XX Blasts over 1–6 Months in YY km²)
- Deterministic Placement: A seeded PRNG (
mulberry32) generatesXXblasts with random arrival times $t_{0,k} \in [0, \text{Months}/12]$ and spatial coordinates following Uniform, Diagonal Minefield Belt, or 5-Center Gaussian Clustered distributions. - CRREL Heterogeneity Mix: Each blast is independently assigned Low-Order (with probability
lowOrderPct, default 15%) or High-Order. - Poisson Overlap Land-Impact Estimate: Given total raw hazard footprint area $A_{\text{raw}} = \sum \pi r_k^2$ across total landscape area $A_{\text{tot}} = \text{YY} \times 10^6\text{ m}^2$, fractional impacted land accounts for random overlaps via $f_{\text{imp}} = 1 - \exp(-A_{\text{raw}} / A_{\text{tot}})$.
- Bounded-Kernel 108×108 Grid Stamping: Each active blast ($t \ge t_{0,k}$) stamps its radial core and wind-stretched plume only onto grid cells within its local bounding box, enabling real-time rendering up to 500 overlapping blasts.
3. Embedded Reference Parameters
3.1 Munition Impact Profiles (IMPACT_PROFILES)
| Profile | Default Mass (kg) | TNT / RDX Ratio | Pb / Cu / Zn / Fe (g) | Plastic / Bakelite (g) |
|---|---|---|---|---|
| TM-62M Anti-Tank | 7.50 kg | 45% / 55% | 18 / 42 / 35 / 1,850 g | 140 g |
| PMN-2 Anti-Personnel | 0.10 kg | 40% / 60% | 3.5 / 8 / 6 / 35 g | 310 g |
| Custom Scalable | 15.0 kg (0.05–25) | 50% / 50% | 32 / 75 / 60 / 3,600 g (scaled) | 180 g (scaled) |
3.2 Soil & Biome Presets (ENVIRONMENTS)
| Biome | Organic Carbon ($f_{oc}$) | Bulk Density ($\rho_b$) / Porosity ($\theta$) | Water Table ($z_{\text{WT}}$) | Default Rain / Wind | Retardation $R_{\text{TNT}}$ / $R_{\text{RDX}}$ |
|---|---|---|---|---|---|
| Chernozem (Black Earth) | 5.5% | 1.25 g/cm³ / 0.48 | 3.6 m | 580 mm / 4.8 m/s | 44.0 / 8.2 |
| Sandy / Permeable | 0.8% | 1.55 g/cm³ / 0.40 | 2.5 m | 780 mm / 5.5 m/s | 10.3 / 2.6 |
| Wetland / Floodplain | 7.0% | 1.05 g/cm³ / 0.58 | 0.95 m | 1150 mm / 3.5 m/s | 39.0 / 7.3 |
| Semi-Arid Dryland | 1.0% | 1.48 g/cm³ / 0.42 | 6.4 m | 240 mm / 8.2 m/s | 11.6 / 2.8 |
| Temperate Forest | 4.5% | 1.18 g/cm³ / 0.50 | 3.1 m | 860 mm / 2.4 m/s | 32.9 / 6.3 |
4. Key Simplifications & Roadmap to Coupled Cellular/PDE Modeling
- No Seasonal Hydrological Cycling: Rainfall is currently treated as a steady annual mean rather than storm pulses or freeze-thaw cycles (which accelerate spring snowmelt leaching).
- Simplified Dilution Volume in Groundwater: Aquifer RDX concentrations use a parameterized mixing volume rather than solving 3D Darcy flow + longitudinal/transverse dispersivity ($\alpha_L, \alpha_T$).
- No Multi-Contaminant Synergistic Toxicity: Biological suppression combines TNT, RDX, and metal terms multiplicatively; real-world "cocktail" interactions with PAHs and microplastics remain an active research frontier.
- Path to Cellular PDE Upgrade: Because the simulation already separates the physics layer (
computeScenarioState/buildLandscapeGrid) from the 2D/3D renderers, future versions can swap in a WebAssembly or WebGPU 2D/3D finite-difference ADR solver without rewriting the visualization UI.