# Leak detection ## Microsim ### Live player <div class="microsim-player"> <iframe src="https://editor.p5js.org/sciencenibber/full/TDyTvSrmV" width="100%" height="620" frameborder="0" sandbox="allow-scripts allow-same-origin"></iframe> </div> <div class="microsim-fallback"> <img src="Microsims/thumbs/Leak_detection.png" alt="Leak_detection microsim poster" style="width:100%;border:1px solid #4445;border-radius:6px;"> <p><em>Live microsim (desktop) · <a href="https://editor.p5js.org/sciencenibber/sketches/TDyTvSrmV">open sketch in the p5.js editor</a></em></p> </div> **Editor URL:** https://editor.p5js.org/sciencenibber/sketches/TDyTvSrmV **Description (100 words):** A helium mass-spectrometer leak detector in cross-section. The chamber is split by a vertical wall: warm-shaded helium-spray atmosphere on the left, cool vacuum on the right. The reader drags the leak position vertically on the wall, and two sliders control leak diameter (5–500 µm) and external spray flux. Warm-coloured helium particles stream from the spray cloud; only those crossing the leak window enter the vacuum, where pumping accelerates them toward the mass-spectrometer slab on the right. A rolling MS [[Signal|signal]] trace at the bottom plots the live detection rate, demonstrating how leak rate scales with d² in the molecular-flow regime. Full sketch source: Leak_detection.js ```js // ===================================================================== // Leak_detection.js -- Wikitube microsim // Article: Leak_detection en.wikitube.io/wiki/Leak_detection // Room: Helium Pattern: E + G hybrid // --------------------------------------------------------------------- // Canonical relation for molecular flow through a thin-wall orifice: // Q = (pi d^2 / 4) * (v_thermal / 4) * dP // v_thermal = sqrt(8 k_B T / pi m); for He at 300 K, ~1260 m/s. // // Two-zone chamber: warm helium-spray side, cool vacuum side with an // MS slab on the right. Particles stream from the spray, reflect off // the wall except inside the leak window, and (once inside) are // pulled to the MS, where each impact pulses the bottom-trace signal. // // Conventions (Wikitube Betterfire Standard v0): // * ARTICLE constant, single quotes // * p5.disableFriendlyErrors = true // * Non-ASCII only in comments; ASCII in text() literals // * Energy-room palette // ===================================================================== const ARTICLE = 'Leak_detection'; const TITLE = ARTICLE.replace(/_/g, ' '); p5.disableFriendlyErrors = true; const BG = 18; const FG = 240; const DIM = [240, 240, 240, 140]; const HOT = [220, 110, 60]; // helium spray const COLD = [60, 130, 220]; // vacuum / MS const STRUCT = [120, 130, 150]; const TRAJ = [240, 220, 80]; const SCRATCH = [120, 120, 120, 90]; const ACCENT = [200, 100, 220]; const D_MIN_UM = 5, D_MAX_UM = 500; const FLUX_MIN = 50, FLUX_MAX = 600; let chamX, chamY, chamW, chamH, wallX, leakY; let plotX, plotY, plotW, plotH; let msX, msY, msW, msH; const particles = []; const MAX_PARTICLES = 800; const TRACE_LEN = 240; const trace = new Array(TRACE_LEN).fill(0); let traceHead = 0, detectedThisFrame = 0; let dSlider, fSlider; function setup() { createCanvas(720, 520); pixelDensity(2); textFont('system-ui'); chamX = 30; chamY = 70; chamW = width - 60; chamH = 260; wallX = chamX + chamW * 0.55; leakY = chamY + chamH * 0.5; msX = chamX + chamW - 24; msY = chamY + 16; msW = 18; msH = chamH - 32; plotX = chamX; plotY = chamY + chamH + 60; plotW = chamW; plotH = 100; dSlider = createSlider(D_MIN_UM, D_MAX_UM, 50, 5); dSlider.position(chamX, plotY + plotH + 24); dSlider.size(180); fSlider = createSlider(FLUX_MIN, FLUX_MAX, 180, 10); fSlider.position(chamX + 240, plotY + plotH + 24); fSlider.size(180); } // [Full source -- 380 lines including spawnSprayParticles, stepParticles, // drawChamber, drawParticles, drawMS, drawTracePlot, drawHUD -- is in // Articles/Helium/Microsims/Leak_detection.js. This excerpt shows // constants, setup, and the simulation skeleton.] ``` ## Links (Wikipedia order) <!-- injected from _registry/childlinks/Leak_detection.json (2026-07-30T02:09:12Z) --> `Accessible_bathtub` · `Aerial_survey` · `Air_gap_(plumbing)` · `American_Petroleum_Institute` · `Atmospheric_vacuum_breaker` · `Automatic_bleeding_valve` · `Automatic_faucet` · `Backflow` · `Backflow_prevention_device` · `Ball_valve` · `Ballcock` · `Basin_wrench` · `Bathtub` · `Bidet` · `Bleed_screw` · `Blowtorch` · `Booster_pump` · `Borescope` · `Brazing` · `British_Standard_Pipe` · `Bubble_(physics)` · `Butterfly_valve` · `Cast_iron_pipe` · `Check_valve` · `Chemical_drain_cleaners` · `Chemigation_valve` · `Chopper_pump` · `Circulator_pump` · `Cistern` · `Closet_flange` · `Compatibility_(chemical)` · `Compression_fitting` · `Concentric_reducer` · `Condensate_pump` · `Conservation_of_energy` · `Conservation_of_mass` · `Control_valve` · `Copper_tubing` · `Core_drill` · [[Corrosion]] · `Coupling_(piping)` · `Crimp_(joining)` · [[Decision_theory]] · `Dehumidifier` · [[Density]] · `Diaphragm_valve` · `Dishwasher` · `Double_check_valve` · `Drain-waste-vent_system` · `Drain_(plumbing)` · `Drain_cleaner` · `Drinking_fountain` · `Drinking_water` · `Driving_cap` · `Ductile_iron_pipe` · `Eccentric_reducer` · `Electric_water_boiler` · `Evaporative_cooler` · `Expansion_tank` · `Faucet_aerator` · `Fire_sprinkler_system` · `Flare_fitting` · `Float_switch` · `Floor_drain` · `Flow_limiter` · `Flow_measurement` · `Fluid` · `Flush_toilet` · `Flushing_trough` · `Flushometer` · `Friction_loss` · `Fuel_gas` · `Garbage_disposal_unit` · `Gasket` · `Gate_valve` · `Globe_valve` · `Grade_(slope)` · `Grease_trap` · `Greywater` · `Grinder_pump` · `Heat_trap` · `Hose_coupling` · `Hot_water_storage_tank` · `Humidifier` · `Hydraulic_shock` · `Hydronic_balancing` · `Hydronics` · `Hydrostatic_loop` · `Hydrostatic_test` · `IAPMO` · `Icemaker` · `Instant_hot_water_dispenser` · [[Kalman_filter]] · `Laser` · `Laundry_room` · [[Leak]] · `Manifold_(fluid_mechanics)` · `Mechanical,_electrical,_and_plumbing` · `National_pipe_thread` · `Needle_valve` · `Neutral_axis` · `Nipple_(plumbing)` · `Nominal_Pipe_Size` · `O-ring` · `Oakum` · `Onsite_sewage_facility` · `Permeation` · `Pinch_valve` · `Pipe_(fluid_conveyance)` · `Pipe_dope` · `Pipe_marking` · `Pipe_support` · `Pipe_wrench` · `Pipecutter` · `Pipefitter` · `Pipelayer` · `Piping` · `Piping_and_plumbing_fitting` · `Plastic_pipework` · `Plug_(sanitation)` · `Plumber` · `Plumber's_snake` · `Plumber_wrench` · `Plumbing` · `Plumbing_&_Drainage_Institute` · `Plumbing_code` · `Plumbing_fixture` · `Plunger` · `Pressure` · `Pressure-balanced_valve` · `Pressure_regulator` · `Pressure_vacuum_breaker` · `Pump` · `Push-to-pull_compression_fittings` · `Putty` · `Radiator_(heating)` · `Real-time_data` · `Reduced_pressure_zone_device` · `Relief_valve` · `Riser_clamp` · `Rooftop_water_tower` · `Safety_valve` · `Sanitary_sewer` · `Scalding` · `Sealant` · `Sewage` · `Sewage_pumping` · `Sewer_gas` · `Sewerage` · `Shower` · `Sink` · `Siphon` · `Soldering` · `Sonar` · `State-space_representation` · `State_observer` · `Storage_water_heater` · `Storm_drain` · `Stormwater` · `Strap_wrench` · `Street_elbow` · `Submersible_pump` · `Sump_pump` · `Surface_tension` · `Swaging` · `Tankless_water_heating` · `Tap_(valve)` · `Tap_and_die` · `Tap_water` · `Telemetry` · `Temperature` · `Thermal_expansion` · `Thermal_insulation` · `Thermosiphon` · `Thermostatic_mixing_valve` · `Thread_seal_tape` · `Threaded_pipe` · `Tracer-gas_leak_testing` · `Trap_(plumbing)` · `Trench_drain` · `Tube_bending` · `Uniform_Plumbing_Code` · `Urinal` · `Vacuum_breaker` · `Vacuum_ejector` · `Valve` · `Venturi_effect` · `Washing_machine` · `Washlet` · `Wastewater` · `Water_detector` · `Water_dispenser` · `Water_filter` · `Water_heat_recycling` · `Water_heating` · `Water_metering` · `Water_recycling_shower` · `Water_softening` · `Water_supply_network` · `Water_table` · `Water_tank` · `Waterborne_disease` · `Well` · `World_Plumbing_Council` · `Zone_valve` ## From the vault media library !Leak detection thumb.png *Leak Detection — from the vault's own media holdings, placed 2026-07-09. MTN / Wikitube.io original · CC BY-SA 4.0.* <!-- LOCAL-MEDIA-PASS:END --> > **Room:** [[Helium]] · **Status:** ✅ shipped ## Overview **Leak detection** is the process of locating and quantifying unintended flow paths through the wall of a sealed [[System|system]], expressed as a [[Leak|leak]] rate Q with SI units Pa·m³/s (or the older shop units std cc/s and mbar·L/s). The dominant industrial method is **helium mass-spectrometer leak detection** (HMSLD), invented at the Manhattan Project in 1944 to qualify the gas-[[Diffusion|diffusion]] barriers of the K-25 uranium-enrichment plant and now the universal standard for vacuum, refrigeration, pressure-vessel, and semiconductor work. Helium is the chosen tracer for three reasons: it is the lightest [[Noble_gas|noble gas]] with the smallest neutral-atom kinetic diameter (~0.26 nm) and so passes through leaks no other tracer can find; its thermal [[Velocity|velocity]] at room temperature, v = √(8 k_B T / π m) ≈ 1260 m/s, is faster than any other gas; and its natural-atmosphere abundance is only ~5 ppm, giving a clean background. The instrument is a magnetic-sector mass spectrometer tuned to m/z = 4, with practical sensitivities down to **10⁻¹² std cc/s** — roughly one helium atom per ten microseconds. Two modes dominate: **outboard** (vacuum-test, where the system is evacuated and helium is sprayed at suspected joints) and **inboard** (pressure-test, where helium is pressurised inside and a sniffer probe scans externally). For molecular flow through a thin-wall orifice the canonical rate is **Q = (πd²/4)(v/4) ΔP**, scaling with the square of leak diameter; for viscous flow the d⁴ Hagen-Poiseuille form dominates. Allied techniques include bubble testing, ultrasonic acoustic emission, halogen sniffers, and tracer-gas residual-gas analysis. ## See also - Room hub: [[Helium]] - p5.js Editor conventions: P5 JS EDITOR - Wiki root: MAIN --- *Scaffolded by `generative-microsim` (manual run, bash sandbox failed) from row 201 of the Helium hub on 2026-05-15T07:30:00Z. Shipped 2026-05-15T08:00:00Z.* <!-- LOCAL-MEDIA-PASS:START --> <!-- CRAFT-LINK:START g12 --> *Built to the [[WT!P5_js_Microsim_Master_Class|p5.js Master Class]].* <!-- CRAFT-LINK:END --> ## Wikipedia : Wikitube **Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Leak_detection) : [Wikitube](https://en.wikitube.io/wiki/Leak_detection) ## Previous hub tags Tree parents: [[Helium]] · [[Hydrogen]]. Legacy hubs: none. --- *Sources: 1 legacy note. Minted wave 1, 2026-07-30 (v1.6 order).*