# Leak
## Microsim
### Live player
<div class="microsim-player">
<iframe src="https://editor.p5js.org/sciencenibber/full/waAt3Q5uV" width="100%" height="620" frameborder="0" sandbox="allow-scripts allow-same-origin"></iframe>
</div>
<div class="microsim-fallback">
<img src="Microsims/thumbs/Leak.png" alt="Leak 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/waAt3Q5uV">open sketch in the p5.js editor</a></em></p>
</div>
**Editor URL:** https://editor.p5js.org/sciencenibber/sketches/waAt3Q5uV
**Description (100 words):**
A 2D vacuum-chamber leak detector. A rectangular chamber holds ~200 gas particles bouncing off the walls with thermal speeds drawn from a Maxwell-Boltzmann-like distribution. The right wall has a defect window of adjustable diameter; particles crossing that window escape into a mass-spectrometer detector strip and stream toward an ion-collector dot. Three sliders along the bottom set the defect diameter (50 nm to 5 um), the chamber pressure (1 to 200 kPa), and the gas species (He, N2, or Air). Live readouts in the top-right report the leak rate Q, the Knudsen number Kn, and the flow regime: viscous, transitional, or molecular.
```js
// =====================================================================
// Leak.js -- Wikitube microsim
// Article: Leak en.wikitube.io/wiki/Leak
// Room: Helium Pattern: E (particle systems)
// ---------------------------------------------------------------------
// Idea: a 2D vacuum-chamber leak detector. A rectangular chamber is
// filled with gas particles (helium, nitrogen, or air) that bounce
// off the walls with thermal speeds drawn from a Maxwell-Boltzmann
// distribution. A defect on the right-hand wall has an adjustable
// diameter d. Every particle that crosses the wall plane inside the
// defect window escapes -- the count rate of escapes is the simulated
// leak rate Q.
//
// The microsim makes three physical facts visible:
//
// 1. Helium leaks faster than air through the same hole.
// Effusion rate scales as 1 / sqrt(M_molar), so He at M = 4
// leaks sqrt(29/4) = 2.69x faster than air at M = 29 and
// sqrt(28/4) = 2.65x faster than N2 at M = 28.
//
// 2. Flow regime depends on the Knudsen number Kn = lambda / d.
// At STP, lambda(He) ~ 180 nm, lambda(N2) ~ 65 nm, lambda(air)
// ~ 68 nm. As d shrinks, Kn rises and the flow turns from
// viscous Poiseuille (Q ~ d^4) to molecular effusion
// (Q ~ d^3 * sqrt(T/M)).
//
// 3. Higher chamber pressure means more particles per unit volume,
// which scales the leak rate linearly above noise floor:
// Q = C * dP, with C set by geometry and flow regime.
//
// Canonical equation displayed in the bottom-right HUD:
//
// Q = C * dP (linear-regime leak rate)
//
// Visual layout (720 x 520 canvas):
// * top-left: HUD title + en.wikitube.io/wiki/Leak subtitle
// * top-right: live readout (leak rate Q, Knudsen number Kn,
// flow regime label: viscous / transitional / molecular)
// * left-center: chamber rectangle filled with bouncing particles
// * right wall: defect window of width d (red-orange highlight)
// * right zone: detector strip showing escaped particles streaming
// into a mass-spectrometer-style funnel
// * bottom: three sliders -- hole diameter (nm),
// chamber pressure (kPa),
// gas species (He / N2 / Air)
// * bottom-right: canonical equation
//
// Conventions (Wikitube Betterfire Standard v0):
// * single ARTICLE constant at the top, single quotes
// * p5.disableFriendlyErrors = true to keep the editor console clean
// * non-ASCII (Greek lambda, dots, arrows) lives in COMMENTS ONLY;
// every text() string literal is ASCII
// * Energy-room palette (P5_JS_EDITOR section 4): dark BG, HOT/COLD
// tones, STRUCT grey, TRAJ accent
// =====================================================================
const ARTICLE = 'Leak';
const TITLE = ARTICLE.replace(/_/g, ' ');
p5.disableFriendlyErrors = true;
// ----- Energy room palette (P5_JS_EDITOR section 4) ------------------
const BG = 18;
const FG = 240;
const DIM = [240, 240, 240, 140];
const HOT = [220, 110, 60]; // defect window / leaks
const COLD = [60, 130, 220]; // chamber interior wash
const STRUCT = [120, 130, 150]; // walls / axes
const TRAJ = [240, 220, 80]; // tracer particle highlight
const ACCENT = [200, 100, 220]; // mass-spec detector wash
const SCRATCH = [120, 120, 120, 90]; // grid / scratch
// ----- Gas species table (each row: name, M_molar, lambda_STP_nm) ---
// lambda values are mean free path at 1 atm, 300 K. M_molar in g/mol.
const SPECIES = [
{ name: 'He', M: 4.003, lam: 180, color: [180, 220, 255] },
{ name: 'N2', M: 28.014, lam: 65, color: [120, 200, 140] },
{ name: 'Air', M: 28.97, lam: 68, color: [200, 200, 200] },
];
// ----- Chamber and plot geometry (canvas-space) ----------------------
const CHAMBER_X = 60;
const CHAMBER_Y = 90;
const CHAMBER_W = 380;
const CHAMBER_H = 280;
const DETECTOR_X = CHAMBER_X + CHAMBER_W + 30;
const DETECTOR_Y = CHAMBER_Y;
const DETECTOR_W = 200;
const DETECTOR_H = CHAMBER_H;
// ----- Simulation parameters (sliders set the live values) -----------
let dSlider; // defect diameter, scaled in nanometres
let pSlider; // chamber pressure, kPa
let speciesSlider; // 0=He, 1=N2, 2=Air
// ----- Particle pool -------------------------------------------------
// Each particle is { x, y, vx, vy }. They bounce off chamber walls.
// Position is in chamber-local pixels relative to (CHAMBER_X, CHAMBER_Y).
let particles = [];
const N_PARTICLES = 220;
// Escaped-particle stream in the detector strip -- short-lived dots
let escaped = [];
// Rolling escape counter for an EMA of leak rate
let escapeCount = 0;
let leakRateEMA = 0;
const EMA_ALPHA = 0.05;
// ----- Live frame state, written at the top of draw() and read by
// the HUD / label helpers (so drawHUD() can be parameterless) ---
let live = {
dNm: 800,
pKpa: 100,
sp: SPECIES[0],
Kn: 1.0,
regime: 'transitional',
lamNm: 180,
};
// ---------------------------------------------------------------------
function setup() {
createCanvas(720, 520);
pixelDensity(2);
textFont('system-ui');
noStroke();
// ----- Slider layout (bottom of canvas) -----
// dSlider: defect diameter from 50 nm (tight) to 5000 nm = 5 um (loose)
dSlider = createSlider(50, 5000, 800, 10);
dSlider.position(70, 460);
dSlider.size(180);
// pSlider: chamber pressure 1 kPa to 200 kPa
pSlider = createSlider(1, 200, 100, 1);
pSlider.position(290, 460);
pSlider.size(180);
// speciesSlider: 0..2 indexes into SPECIES
speciesSlider = createSlider(0, 2, 0, 1);
speciesSlider.position(510, 460);
speciesSlider.size(140);
// ----- Seed particles uniformly inside the chamber, with thermal
// velocities scaled to be visible at canvas scale -----
for (let i = 0; i < N_PARTICLES; i++) {
particles.push(newParticle());
}
}
// New particle drawn from a Maxwell-Boltzmann-like speed distribution.
// True MB speed = sqrt(8 k_B T / (pi M)), here we just normalise so
// helium is visibly faster than nitrogen on the same canvas.
function newParticle() {
const sp = SPECIES[speciesSlider ? speciesSlider.value() : 0];
// mean speed scales as 1 / sqrt(M_molar)
const vBase = 2.4 * Math.sqrt(29 / sp.M);
const ang = random(TWO_PI);
// Maxwell-Boltzmann-ish radial draw: chi distribution k=3 sampled
// crudely as the magnitude of three gaussians
const r = Math.sqrt(
Math.pow(randomGaussian(), 2) +
Math.pow(randomGaussian(), 2) +
Math.pow(randomGaussian(), 2)
) * vBase * 0.4 + vBase * 0.4;
return {
x: random(8, CHAMBER_W - 8),
y: random(8, CHAMBER_H - 8),
vx: r * Math.cos(ang),
vy: r * Math.sin(ang),
ageEscaped: 0,
};
}
// ---------------------------------------------------------------------
function draw() {
background(BG);
// ----- Read live slider values into named locals -----
const dNm = dSlider.value(); // defect diameter in nm
const pKpa = pSlider.value(); // pressure in kPa
const sp = SPECIES[speciesSlider.value()];
// Visual defect height on screen scaled logarithmically so 50 nm
// is still drawable and 5000 nm doesn't blow out the chamber.
const dPx = map(Math.log10(dNm), Math.log10(50), Math.log10(5000),
3, 70);
const defectCenterY = CHAMBER_H / 2;
const defectHalf = dPx / 2;
// ----- Compute regime label and Knudsen number -----
// lambda(P) = lambda_STP * (P_STP / P), STP = 101.325 kPa.
// d_phys is the chosen defect diameter in nm.
const lambdaNm = sp.lam * (101.325 / pKpa);
const Kn = lambdaNm / dNm;
let regime;
if (Kn < 0.01) regime = 'viscous';
else if (Kn < 10 ) regime = 'transitional';
else regime = 'molecular';
// Stash live frame state for the HUD helpers
live.dNm = dNm;
live.pKpa = pKpa;
live.sp = sp;
live.Kn = Kn;
live.regime = regime;
live.lamNm = lambdaNm;
// ----- Update particles -----
updateParticles(dPx, defectCenterY, defectHalf, sp, pKpa);
// ----- Draw everything -----
drawChamber(defectCenterY, defectHalf, sp, pKpa);
drawParticles(sp);
drawDetector(sp);
drawEscaped();
drawControlLabels();
drawEquation();
drawHUD();
}
// ---------------------------------------------------------------------
// Particle update: integrate position, bounce off walls, escape through
// the defect window, and resample the pool when species or pressure
// changes count.
function updateParticles(dPx, defectCenterY, defectHalf, sp, pKpa) {
// Target population is proportional to pressure (capped).
const target = Math.round(constrain(N_PARTICLES * pKpa / 100,
40, N_PARTICLES * 1.6));
while (particles.length < target) particles.push(newParticle());
while (particles.length > target) particles.pop();
const speedScale = Math.sqrt(29 / sp.M); // per-species speed factor
for (let i = particles.length - 1; i >= 0; i--) {
const p = particles[i];
// Integrate position. dt baked into vBase magnitude.
p.x += p.vx * speedScale * 0.55;
p.y += p.vy * speedScale * 0.55;
// Bounce off left wall
if (p.x < 2) { p.x = 2; p.vx = -p.vx; }
// Top wall
if (p.y < 2) { p.y = 2; p.vy = -p.vy; }
// Bottom wall
if (p.y > CHAMBER_H - 2) { p.y = CHAMBER_H - 2; p.vy = -p.vy; }
// Right wall: bounce except inside the defect window
if (p.x > CHAMBER_W - 2) {
const insideDefect = Math.abs(p.y - defectCenterY) < defectHalf;
if (insideDefect && p.vx > 0) {
// Escape! Emit a streamer in the detector strip.
escaped.push({
x: 0,
y: p.y + CHAMBER_Y - DETECTOR_Y,
vx: Math.abs(p.vx) * speedScale * 0.8 + 1.6,
vy: p.vy * speedScale * 0.3,
life: 0,
color: sp.color,
});
escapeCount++;
// Recycle the particle back into the chamber interior so the
// pressure-driven population stays roughly constant.
const reseed = newParticle();
particles[i] = reseed;
} else {
p.x = CHAMBER_W - 2;
p.vx = -p.vx;
}
}
}
// Update escape stream in the detector strip
for (let j = escaped.length - 1; j >= 0; j--) {
const e = escaped[j];
e.x += e.vx;
e.y += e.vy;
e.life += 1;
if (e.x > DETECTOR_W - 8 || e.life > 240) escaped.splice(j, 1);
}
// EMA of escape rate per frame -> displayed as "leak rate Q"
leakRateEMA = (1 - EMA_ALPHA) * leakRateEMA + EMA_ALPHA * escapeCount;
escapeCount = 0;
}
// ---------------------------------------------------------------------
// Draw chamber walls, defect window highlight, and faint grid.
function drawChamber(defectCenterY, defectHalf, sp, pKpa) {
// Soft interior wash, tinted by gas color and pressure
noStroke();
fill(sp.color[0], sp.color[1], sp.color[2],
map(pKpa, 1, 200, 8, 36));
rect(CHAMBER_X, CHAMBER_Y, CHAMBER_W, CHAMBER_H);
// Walls
noFill();
stroke(...STRUCT);
strokeWeight(2);
rect(CHAMBER_X, CHAMBER_Y, CHAMBER_W, CHAMBER_H);
// Defect window on the right wall: drawn as a gap with hot-orange
// glow on both sides.
const wx = CHAMBER_X + CHAMBER_W;
const wy = CHAMBER_Y + defectCenterY;
// Erase the wall segment inside the gap
stroke(BG);
strokeWeight(3);
line(wx, wy - defectHalf, wx, wy + defectHalf);
// Hot-orange tick at each gap edge
stroke(...HOT);
strokeWeight(2);
line(wx - 6, wy - defectHalf, wx + 6, wy - defectHalf);
line(wx - 6, wy + defectHalf, wx + 6, wy + defectHalf);
// Faint dimension lines for the defect width
stroke(HOT[0], HOT[1], HOT[2], 90);
strokeWeight(1);
line(wx + 14, wy - defectHalf, wx + 14, wy + defectHalf);
// Chamber title
noStroke();
fill(...DIM);
textSize(12);
textAlign(LEFT, BOTTOM);
text('Chamber', CHAMBER_X + 4, CHAMBER_Y - 4);
}
// ---------------------------------------------------------------------
// Draw all chamber particles with species-tinted colour. Tracer dots
// (a 1-in-20 sample) get the bright TRAJ accent.
function drawParticles(sp) {
noStroke();
for (let i = 0; i < particles.length; i++) {
const p = particles[i];
const px = p.x + CHAMBER_X;
const py = p.y + CHAMBER_Y;
if (i % 20 === 0) {
fill(...TRAJ);
ellipse(px, py, 4.5);
} else {
fill(sp.color[0], sp.color[1], sp.color[2], 220);
ellipse(px, py, 3);
}
}
}
// ---------------------------------------------------------------------
// Draw the mass-spectrometer-style detector strip to the right of the
// chamber. The funnel narrows to a single dot, suggesting the He leak
// detector's ion source.
function drawDetector(sp) {
// Strip background
noStroke();
fill(ACCENT[0], ACCENT[1], ACCENT[2], 20);
rect(DETECTOR_X, DETECTOR_Y, DETECTOR_W, DETECTOR_H);
// Strip border
noFill();
stroke(...STRUCT);
strokeWeight(1.5);
rect(DETECTOR_X, DETECTOR_Y, DETECTOR_W, DETECTOR_H);
// Funnel: straight on the left, converging to a point on the right
stroke(...ACCENT);
strokeWeight(2);
const fx0 = DETECTOR_X + 6;
const fy0 = DETECTOR_Y + DETECTOR_H / 2;
const fx1 = DETECTOR_X + DETECTOR_W - 18;
line(fx0, DETECTOR_Y + 24, fx1, fy0);
line(fx0, DETECTOR_Y + DETECTOR_H - 24, fx1, fy0);
// Detector dot (the ion collector)
fill(...ACCENT);
noStroke();
ellipse(fx1 + 8, fy0, 9);
// Label
fill(...DIM);
textSize(12);
textAlign(LEFT, BOTTOM);
text('Mass-spec detector', DETECTOR_X + 4, DETECTOR_Y - 4);
}
// ---------------------------------------------------------------------
// Draw the escaped-particle streamers traversing the detector strip.
function drawEscaped() {
noStroke();
for (const e of escaped) {
const a = map(e.life, 0, 240, 240, 30);
fill(e.color[0], e.color[1], e.color[2], a);
ellipse(DETECTOR_X + e.x, DETECTOR_Y + e.y, 3.2);
}
}
// ---------------------------------------------------------------------
// Top HUD: article title + URL (top-left) and live readout (top-right).
function drawHUD() {
const Kn = live.Kn;
const regime = live.regime;
noStroke();
// Title block
fill(0, 180);
rect(0, 0, width, 56);
fill(FG);
textSize(22);
textAlign(LEFT, TOP);
text(TITLE, 14, 14);
fill(...DIM);
textSize(12);
text('Wikitube microsim . en.wikitube.io/wiki/' + ARTICLE,
14, 40);
// Live readout block (top-right)
textAlign(RIGHT, TOP);
fill(FG);
textSize(13);
text('Q (leak rate): ' + nf(leakRateEMA, 1, 2) + ' particles / frame',
width - 14, 12);
text('Kn = lambda / d = ' + nf(Kn, 1, 3), width - 14, 28);
let regimeColor = regime === 'viscous' ? COLD :
regime === 'molecular' ? HOT :
STRUCT;
fill(regimeColor[0], regimeColor[1], regimeColor[2]);
text('regime: ' + regime, width - 14, 44);
}
// ---------------------------------------------------------------------
// Slider labels and live values, drawn above each slider.
function drawControlLabels() {
const dNm = live.dNm;
const pKpa = live.pKpa;
const sp = live.sp;
noStroke();
fill(...DIM);
textSize(11);
textAlign(LEFT, BOTTOM);
// dSlider (60..250 -> below it x=70 y=455)
text('defect diameter d = ' + nf(dNm, 1, 0) + ' nm', 70, 455);
// pSlider
text('chamber pressure = ' + nf(pKpa, 1, 0) + ' kPa', 290, 455);
// speciesSlider
text('gas: ' + sp.name + ' (M = ' + nf(sp.M, 1, 1) + ' g/mol)',
510, 455);
// Slider tick marks under speciesSlider showing He / N2 / Air
fill(...DIM);
textSize(10);
textAlign(CENTER, TOP);
for (let i = 0; i < SPECIES.length; i++) {
const tx = 510 + (i * 70);
text(SPECIES[i].name, tx, 482);
}
}
// ---------------------------------------------------------------------
// Canonical equation, drawn bottom-right.
function drawEquation() {
noStroke();
fill(...DIM);
textSize(12);
textAlign(RIGHT, BOTTOM);
text('Q = C * dP (linear-regime leak rate)',
width - 14, height - 6);
}
```
## Links (Wikipedia order)
<!-- injected from _registry/childlinks/Leak.json (2026-07-30T02:09:12Z) -->
`Accessible_bathtub` · `Air_conditioning` · `Air_gap_(plumbing)` · `Airplane` · `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` · `Brake` · `Brazing` · `British_Standard_Pipe` · `Building_envelope` · `Butterfly_valve` · `Capillary_action` · `Cast_iron_pipe` · `Centrifugal_pump` · `Check_valve` · `Chemical_drain_cleaners` · `Chemical_plant` · `Chemigation_valve` · `Chopper_pump` · `Circulator_pump` · `Cistern` · `Closet_flange` · `Compatibility_(chemical)` · `Compression_fitting` · `Concentric_reducer` · `Condensate_pump` · `Construction` · `Control_valve` · `Copper_tubing` · `Core_drill` · [[Corrosion]] · `Coupling_(piping)` · `Crimp_(joining)` · `Dangerous_goods` · `Dehumidifier` · `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` · `Eddy_current` · `Elastomer` · `Electric_water_boiler` · `Electrolyte` · `Evaporative_cooler` · `Expansion_tank` · `Explosion` · `Explosive` · [[Fatigue_(material)]] · `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` · `Gas` · `Gas_leak` · `Gasket` · `Gate_valve` · `Globe_valve` · `Grade_(slope)` · `Grease_trap` · `Greywater` · `Grinder_pump` · `Heart` · `Heat_exchanger` · [[Heat_transfer]] · `Heat_trap` · [[Helium]] · `Hose_coupling` · `Hot_air_balloon` · `Hot_water_storage_tank` · `Hull_(watercraft)` · `Humidifier` · `Hydraulic_shock` · [[Hydrogen]] · `Hydronic_balancing` · `Hydronics` · `Hydrostatic_loop` · `Hydrostatic_pressure` · `Hydrostatic_test` · `IAPMO` · `Icemaker` · `Instant_hot_water_dispenser` · `Laundry_room` · [[Leak_detection]] · `Liquid` · `Manifold_(fluid_mechanics)` · `Matter` · `Mechanical,_electrical,_and_plumbing` · `Mold` · `Molecule` · `Motor_oil` · `National_pipe_thread` · [[Natural_gas]] · `Needle_valve` · `Neutral_axis` · `Nipple_(plumbing)` · `Nominal_Pipe_Size` · `Nondestructive_testing` · `O-ring` · `Oakum` · `Onsite_sewage_facility` · `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` · `Polymer` · `Power_steering` · `Pressure` · `Pressure-balanced_valve` · `Pressure_regulator` · `Pressure_vacuum_breaker` · `Pump` · `Push-to-pull_compression_fittings` · `Putty` · `Radiator` · `Radiator_(heating)` · `Reduced_pressure_zone_device` · `Refrigerant` · `Refrigerator` · `Relief_valve` · `Riser_clamp` · `Rooftop_water_tower` · `Rust` · `Safety_valve` · `Sanitary_sewer` · `Scalding` · `Seal_(mechanical)` · `Sealant` · `Sewage` · `Sewage_pumping` · `Sewer_gas` · `Sewerage` · `Ship` · `Shower` · `Sink` · `Siphon` · `Soap` · `Soldering` · `Sound` · `Spacecraft` · `Storage_water_heater` · `Storm_drain` · `Stormwater` · `Strap_wrench` · `Street_elbow` · `Stress_corrosion_cracking` · `Submersible_pump` · `Sump_pump` · `Superheated_steam` · `Surface_tension` · `Swaging` · `Tankless_water_heating` · `Tap_(valve)` · `Tap_and_die` · `Tap_water` · `Temperature` · `Thermal_expansion` · `Thermal_insulation` · `Thermosiphon` · `Thermostatic_mixing_valve` · `Thread_seal_tape` · `Threaded_pipe` · `Trap_(plumbing)` · `Trench_drain` · `Tube_bending` · `Uniform_Plumbing_Code` · `Urinal` · `Vacuum` · `Vacuum_breaker` · `Vacuum_ejector` · `Valve` · `Venturi_effect` · [[Viscosity]] · `Washer_(hardware)` · `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` · `Weight` · `Welding` · `Well` · `Wind_tunnel` · `World_Plumbing_Council` · `Zone_valve`
## From the vault media library
!Leak thumb.png
*Leak — 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
A **leak** is the unintended escape of a fluid — gas or liquid — from a sealed container or piping [[System|system]] through a defect, weld imperfection, faulty seal, crack, or permeable wall region. Leaks are quantified by **leak rate** Q, expressed in mbar·L/s, Pa·m³/s, or standard cm³/s, defined as the volumetric flow of fluid at a reference pressure across a known pressure drop ΔP. In the linear regime Q = C × ΔP, where conductance C depends sharply on flow regime: at high pressures or wide apertures, viscous Poiseuille flow scales as d⁴ × ΔP / (η × L); at low pressures or sub-micron apertures, molecular effusive flow scales as d³ × √(T/M) and is independent of [[Viscosity|viscosity]]. The transition is set by the **Knudsen number** Kn = λ/d, where λ is the mean free path; Kn < 0.01 is viscous, Kn > 10 is molecular, between is transitional. In molecular flow, lighter species leak faster — which is why **helium**, the second-lightest [[Noble_gas|noble gas]] and smallest single-atom species (van der Waals radius 140 pm), is the canonical tracer for [[Leak_detection|leak detection]]: a [[Helium_mass_spectrometer|helium mass spectrometer]] leak detector resolves rates down to ~10⁻¹² mbar·L/s, orders of magnitude below bubble or pressure-decay tests. Leaks are distinguished from **permeation**, the [[Diffusion|diffusion]] of solute through bulk material, and from **virtual leaks**, outgassing of trapped pockets. Leak tightness is a defining failure mode for vacuum chambers, cryostats, pressure vessels, refrigeration loops, semiconductor process tools, fuel tanks, nuclear containment, and the LHC's cryogenic ring; every such system carries a published leak-rate specification.
## See also
- Room hub: [[Helium]]
- p5.js Editor conventions: P5 JS EDITOR
- Wiki root: MAIN
---
*Scaffolded by `generative-microsim` from row 76 of the Helium sheet on 2026-05-12T07:49:22Z.*
<!-- 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) : [Wikitube](https://en.wikitube.io/wiki/Leak)
## Previous hub tags
Tree parent: [[Helium]].
Legacy hubs: none.
---
*Sources: 1 legacy note. Minted wave 1, 2026-07-30 (v1.6 order).*