# Second law of thermodynamics <!-- MICROSIMGEN:BEGIN v1.7 — generated by g08_place_microsims.py; three.js first (§15); do not hand-edit inside --> ## Microsims — three.js ### Second law of thermodynamics (three.js) <div class="microsim-player"> <iframe src="https://wikitube-3d-microsims.netlify.app/Second_law_of_thermodynamics.html" width="100%" height="620" frameborder="0" loading="lazy" sandbox="allow-scripts allow-same-origin" title="Second law of thermodynamics — three.js microsim"></iframe> </div> **Open it full-screen:** [Second_law_of_thermodynamics.html](https://wikitube-3d-microsims.netlify.app/Second_law_of_thermodynamics.html) · library `threejs` · route `microsim/threejs/` ### Related microsims Live sims on neighbouring articles — 2 of them inside this article's own Wikipedia link tree: - [[Entropy]] *(in tree)* - [[Kinetic_theory_of_gases]] *(in tree)* - [[Binding_energy]] *Sim hosted off-article; the article owns the reference, not the runtime (WIKI_RULES §10.4). Placed by `g08_place_microsims.py`.* <!-- MICROSIMGEN:END --> ## Microsim ### Live player <div class="microsim-player"> <iframe src="https://editor.p5js.org/sciencenibber/full/yFUkglebS" width="100%" height="620" frameborder="0" sandbox="allow-scripts allow-same-origin"></iframe> </div> <div class="microsim-fallback"> <img src="Microsims/thumbs/Second_law_of_thermodynamics.png" alt="Second_law_of_thermodynamics 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/yFUkglebS">open sketch in the p5.js editor</a></em></p> </div> **Editor URL:** https://editor.p5js.org/sciencenibber/sketches/yFUkglebS **Description (100 words):** A two-reservoir heat-engine diagram makes the second law tangible. Hot and cold reservoir bars stand on either side of a central engine block whose six-spoke wheel spins at the cycle rate. Hot tokens stream from the hot reservoir into the engine; yellow work tokens shoot up the shaft; cold tokens leave to the right. Four sliders set hot temperature, cold temperature, the Carnot fraction alpha, and cycle rate. A bottom-right panel reports per-cycle Q_H, W, Q_C, the entropy debits dS_hot and dS_cold, and the running cumulative entropy S_universe — which only stays flat when alpha equals one (reversible Carnot limit). ```js // ===================================================================== // Second_law_of_thermodynamics.js -- Wikitube microsim // Article: Second_law_of_thermodynamics // URL: en.wikitube.io/wiki/Second_law_of_thermodynamics // Room: Helium Pattern: K (stock-and-flow, // conservation, balance) // --------------------------------------------------------------------- // Idea: visualize the second law as a balance between three stocks -- // hot reservoir, engine working fluid, cold reservoir -- with explicit // Q tokens animated along the heat-flow paths. The reader scrubs // T_H, T_C, and an irreversibility factor alpha; the microsim then // runs a Carnot-style cycle and reports both the energy balance // (first law) and the entropy balance (second law) per cycle and // cumulatively. // // Three equivalent statements live on the same diagram: // * Clausius: no Q_C -> Q_H without W in (the cold-to-hot // arrow is colored 'forbidden' unless work is // supplied) // * Kelvin-Planck: eta < 1 always; some Q_C is rejected // * Boltzmann: cumulative dS_universe >= 0, drifts up forever // // Canonical equation (ASCII for the bottom-right HUD): // // dS_univ = Q_C/T_C - Q_H/T_H >= 0 // // Carnot efficiency bound: // // eta_max = 1 - T_C / T_H (alpha * eta_max actually applied) // // Per-cycle accounting at alpha (where 0 <= alpha <= 1): // Q_H = Q_HOT_PER_CYCLE (fixed pull from the hot stock) // eta = alpha * eta_max // W = eta * Q_H (work delivered) // Q_C = Q_H - W (rejected to cold) // dS_hot = -Q_H / T_H (entropy out of hot reservoir) // dS_cold = +Q_C / T_C (entropy into cold reservoir) // dS_univ = dS_hot + dS_cold (>= 0; zero iff alpha = 1) // // Visual layout (720 x 520 canvas): // * top-left: HUD title + en.wikitube.io URL subtitle // * top-right: running cumulative S_universe counter // * left: hot reservoir bar (HOT color, height ~ T_H) // * right: cold reservoir bar (COLD color, height ~ T_C) // * center: engine block with rotating shaft (W out the top) // * Q_H arrow: left -> center, animated tokens // * W arrow: center -> up (TRAJ yellow tokens) // * Q_C arrow: center -> right, animated tokens // * bottom: 4 sliders (T_H, T_C, alpha, cycle rate) // * bottom-right: per-cycle readouts and the canonical equation // // Conventions (Wikitube Betterfire Standard v0): // * single ARTICLE constant at the top, single quotes // * p5.disableFriendlyErrors = true // * non-ASCII (Greek eta, alpha, deltas, arrows) lives in COMMENTS // ONLY; every text() string literal is ASCII // * Energy-room palette: BG=18, FG=240, HOT, COLD, STRUCT, TRAJ // * pixelDensity(2), textFont('system-ui'), all sliders positioned // ===================================================================== const ARTICLE = 'Second_law_of_thermodynamics'; const TITLE = 'Second law of thermodynamics'; p5.disableFriendlyErrors = true; // ----- Energy room palette (P5_JS_EDITOR section 4) ------------------- const BG = 18; const FG = 240; const DIM = [240, 240, 240, 150]; const HOT = [220, 110, 60]; // hot reservoir / Q_H tokens const COLD = [60, 130, 220]; // cold reservoir / Q_C tokens const STRUCT = [120, 130, 150]; // engine block / structural grey const TRAJ = [240, 220, 80]; // work tokens (yellow accent) const SCRATCH = [120, 120, 120, 90]; // axis / scratch lines const FORBID = [200, 60, 60, 180]; // Clausius 'forbidden' tint // ----- Physical constants and per-cycle anchors ----------------------- const T_H_MIN = 200, T_H_MAX = 1000; // K, hot reservoir slider range const T_C_MIN = 50, T_C_MAX = 400; // K, cold reservoir slider range const Q_HOT_PER_CYCLE = 100; // J, fixed pull from hot per cycle const T_DISPLAY_MAX = 1000; // K, maps to full reservoir bar height // ----- DOM controls -------------------------------------------------- let tHotSlider, tColdSlider, alphaSlider, rateSlider; let pauseBtn, resetBtn; // ----- Simulation state ---------------------------------------------- let paused = false; let cyclesElapsed = 0; let S_universe = 0; // cumulative entropy produced, J/K let lastCycleAt = 0; // ms, for cycle-rate timing let lastCycle = null; // last cycle's per-cycle dict // ----- Animated Q-token state ---------------------------------------- // Tokens drift along three paths: hot->engine (Q_H), engine->cold (Q_C), // engine->up (W). Each token is a phase 0..1 along its path; on >= 1 it // recycles. Token count scales with eta_actual and Q magnitudes. const tokensQH = []; const tokensQC = []; const tokensW = []; const N_TOKENS_PER_PATH = 12; // ----- Plot rectangles for the three stocks -------------------------- // (set in setup; static for the run) let hotBar, coldBar, engineBox; let qHArrow, qCArrow, wArrow; function setup() { createCanvas(720, 520); pixelDensity(2); textFont('system-ui'); // ---- layout: stocks (left/right) and engine (center) -------------- hotBar = { x: 60, y: 90, w: 60, h: 280 }; coldBar = { x: 600, y: 90, w: 60, h: 280 }; engineBox = { x: 290, y: 170, w: 140, h: 130 }; // Heat-flow arrows: midline y, endpoints in pixels. qHArrow = { x0: hotBar.x + hotBar.w, x1: engineBox.x, y: hotBar.y + hotBar.h / 2 }; qCArrow = { x0: engineBox.x + engineBox.w, x1: coldBar.x, y: coldBar.y + coldBar.h / 2 }; // Work arrow: shaft sticks up out of engine top. wArrow = { x: engineBox.x + engineBox.w / 2, y0: engineBox.y, y1: 80 }; // ---- sliders: docked along the canvas bottom ---------------------- // Layout: four sliders in a 2x2 grid below the canvas. const sliderW = 180; const sx0 = 20, sx1 = 220; const sy0 = 420, sy1 = 470; tHotSlider = createSlider(T_H_MIN, T_H_MAX, 600, 5).position(sx0, sy0).size(sliderW); tColdSlider = createSlider(T_C_MIN, T_C_MAX, 300, 2).position(sx0, sy1).size(sliderW); alphaSlider = createSlider(0, 100, 80, 1).position(sx1 + 200, sy0).size(sliderW); // 0..100 -> 0..1 rateSlider = createSlider(0, 50, 20, 1).position(sx1 + 200, sy1).size(sliderW); // 0..50 -> 0..5 Hz pauseBtn = createButton('pause').position(sx0 + sliderW + 20, sy0).size(70, 22); pauseBtn.mousePressed(() => { paused = !paused; pauseBtn.html(paused ? 'play' : 'pause'); }); resetBtn = createButton('reset').position(sx0 + sliderW + 20, sy1).size(70, 22); resetBtn.mousePressed(resetSim); // ---- seed the token clouds at random phases so they fill the path - for (let i = 0; i < N_TOKENS_PER_PATH; i++) { tokensQH.push({ phase: i / N_TOKENS_PER_PATH }); tokensQC.push({ phase: i / N_TOKENS_PER_PATH }); tokensW.push ({ phase: i / N_TOKENS_PER_PATH }); } lastCycleAt = millis(); } function resetSim() { cyclesElapsed = 0; S_universe = 0; lastCycle = null; lastCycleAt = millis(); } // ===================================================================== // Per-frame update: advance simulation time and emit cycles // ===================================================================== function readControls() { // Read every slider once per frame into named locals. const TH = tHotSlider.value(); let TC = tColdSlider.value(); const alpha = alphaSlider.value() / 100; const rate = rateSlider.value() / 10; // 0..5 Hz // Physically meaningful only if TC < TH; clamp visually but let the // reader see the bound saturate when they set TC >= TH. if (TC >= TH) TC = TH - 1; const etaMax = 1 - TC / TH; const etaActual = alpha * etaMax; const Q_H = Q_HOT_PER_CYCLE; const W = etaActual * Q_H; const Q_C = Q_H - W; const dS_hot = -Q_H / TH; const dS_cold = Q_C / TC; const dS_univ = dS_hot + dS_cold; // >= 0 by construction return { TH, TC, alpha, rate, etaMax, etaActual, Q_H, W, Q_C, dS_hot, dS_cold, dS_univ }; } function stepCycles(ctrl) { // Emit a discrete cycle every (1 / rate) seconds when not paused. // At rate = 0 the simulation is frozen on cumulative totals. if (paused || ctrl.rate <= 0) return; const cyclePeriodMs = 1000 / ctrl.rate; const now = millis(); while (now - lastCycleAt >= cyclePeriodMs) { cyclesElapsed += 1; S_universe += ctrl.dS_univ; lastCycle = { Q_H: ctrl.Q_H, W: ctrl.W, Q_C: ctrl.Q_C, dS_hot: ctrl.dS_hot, dS_cold: ctrl.dS_cold, dS_univ: ctrl.dS_univ }; lastCycleAt += cyclePeriodMs; } } function advanceTokens(ctrl) { // Token speed scales with cycle rate; W path is dimmer when alpha is // small (less work delivered). const speed = 0.004 + 0.003 * ctrl.rate; for (const t of tokensQH) { t.phase = (t.phase + speed) % 1; } for (const t of tokensQC) { t.phase = (t.phase + speed) % 1; } // Work tokens slow down with alpha so the reader sees the shaft idle // when alpha -> 0 (purely dissipative engine, no work). const wSpeed = (0.001 + 0.005 * ctrl.rate) * (0.2 + 0.8 * ctrl.alpha); for (const t of tokensW) { t.phase = (t.phase + wSpeed) % 1; } } // ===================================================================== // Drawing // ===================================================================== function draw() { background(BG); const ctrl = readControls(); stepCycles(ctrl); advanceTokens(ctrl); drawReservoirs(ctrl); drawArrows(ctrl); drawEngine(ctrl); drawTokens(ctrl); drawSliderLabels(ctrl); drawReadouts(ctrl); drawHUD(); } // ----- Reservoirs ---------------------------------------------------- // Each reservoir is a glass tube whose fill height encodes T (K) on a // 0..T_DISPLAY_MAX scale. The fill color is HOT or COLD. A thermometer // label sits below. function drawReservoirs(ctrl) { // hot drawStock(hotBar, ctrl.TH, HOT, 'Hot reservoir', 'T_H = ' + Math.round(ctrl.TH) + ' K'); // cold drawStock(coldBar, ctrl.TC, COLD, 'Cold reservoir', 'T_C = ' + Math.round(ctrl.TC) + ' K'); } function drawStock(box, level, col, title, sub) { push(); // outline noFill(); stroke(STRUCT); strokeWeight(1.5); rect(box.x, box.y, box.w, box.h, 4); // fill const h = constrain(level / T_DISPLAY_MAX, 0, 1) * box.h; noStroke(); fill(col[0], col[1], col[2], 180); rect(box.x + 1, box.y + box.h - h + 1, box.w - 2, h - 2, 4); // tick marks every 200 K stroke(SCRATCH); strokeWeight(0.8); for (let k = 0; k <= T_DISPLAY_MAX; k += 200) { const y = box.y + box.h - (k / T_DISPLAY_MAX) * box.h; line(box.x - 4, y, box.x, y); noStroke(); fill(DIM); textSize(9); textAlign(RIGHT, CENTER); text(k, box.x - 6, y); stroke(SCRATCH); } // label below noStroke(); fill(FG); textSize(12); textAlign(CENTER, TOP); text(title, box.x + box.w / 2, box.y + box.h + 8); fill(DIM); textSize(11); text(sub, box.x + box.w / 2, box.y + box.h + 24); pop(); } // ----- Heat-flow arrows (and Clausius forbidden hint) ---------------- function drawArrows(ctrl) { // Q_H: hot -> engine (always flowing while engine runs) drawHFlowArrow(qHArrow.x0, qHArrow.x1, qHArrow.y, HOT, 'Q_H = ' + ctrl.Q_H.toFixed(1) + ' J'); // Q_C: engine -> cold (always >= 0 by Kelvin-Planck) drawHFlowArrow(qCArrow.x0, qCArrow.x1, qCArrow.y, COLD, 'Q_C = ' + ctrl.Q_C.toFixed(1) + ' J'); // W: engine -> up (length scales with W) drawWArrow(ctrl); } function drawHFlowArrow(x0, x1, y, col, label) { push(); stroke(col[0], col[1], col[2], 220); strokeWeight(3); line(x0 + 4, y, x1 - 10, y); // arrowhead fill(col[0], col[1], col[2], 220); noStroke(); const tip = x1 - 2; triangle(tip, y, tip - 12, y - 7, tip - 12, y + 7); // label above the line noStroke(); fill(FG); textSize(11); textAlign(CENTER, BOTTOM); text(label, (x0 + x1) / 2, y - 8); pop(); } function drawWArrow(ctrl) { push(); // Scale W arrow visible length with W; minimum visible stub even if W=0 const wLenFrac = Math.max(0.1, ctrl.W / Q_HOT_PER_CYCLE); const yStart = wArrow.y0 - 4; const yEnd = lerp(yStart, wArrow.y1, wLenFrac); stroke(TRAJ[0], TRAJ[1], TRAJ[2], 220); strokeWeight(3); line(wArrow.x, yStart, wArrow.x, yEnd + 10); fill(TRAJ[0], TRAJ[1], TRAJ[2], 220); noStroke(); triangle(wArrow.x, yEnd + 2, wArrow.x - 7, yEnd + 14, wArrow.x + 7, yEnd + 14); // label fill(FG); textSize(11); textAlign(LEFT, CENTER); text('W = ' + ctrl.W.toFixed(1) + ' J', wArrow.x + 12, (yStart + yEnd) / 2); pop(); } // ----- Engine block (center) ----------------------------------------- // Grey rounded rectangle with a rotating internal disc whose angular // velocity tracks the cycle rate; brightness tracks alpha. function drawEngine(ctrl) { push(); // body noStroke(); fill(STRUCT[0], STRUCT[1], STRUCT[2], 220); rect(engineBox.x, engineBox.y, engineBox.w, engineBox.h, 8); // shaft hole const cx = engineBox.x + engineBox.w / 2; const cy = engineBox.y + engineBox.h / 2; // rotating disc -- frame-tied so it visibly spins push(); translate(cx, cy); const spin = (frameCount * 0.04 * ctrl.rate) * (0.3 + 0.7 * ctrl.alpha); rotate(spin); // 6-spoke wheel stroke(40); strokeWeight(2); fill(60, 70, 80); ellipse(0, 0, 70, 70); stroke(TRAJ[0], TRAJ[1], TRAJ[2], 220); strokeWeight(3); for (let i = 0; i < 6; i++) { const a = (TWO_PI * i) / 6; line(0, 0, 30 * Math.cos(a), 30 * Math.sin(a)); } noStroke(); fill(TRAJ); ellipse(0, 0, 10, 10); pop(); // label noStroke(); fill(FG); textSize(12); textAlign(CENTER, TOP); text('Heat engine', cx, engineBox.y + engineBox.h + 6); textSize(11); fill(DIM); text('eta = ' + ctrl.etaActual.toFixed(3) + ' (eta_max = ' + ctrl.etaMax.toFixed(3) + ')', cx, engineBox.y + engineBox.h + 22); pop(); } // ----- Animated Q tokens along the arrows ---------------------------- function drawTokens(ctrl) { push(); noStroke(); // Q_H tokens: hot color, full opacity (always flowing) for (const t of tokensQH) { const x = lerp(qHArrow.x0 + 6, qHArrow.x1 - 14, t.phase); fill(HOT[0], HOT[1], HOT[2], 220); ellipse(x, qHArrow.y, 6, 6); } // Q_C tokens: cold color, scaled by Q_C/Q_H (fewer when alpha high) const qcFrac = ctrl.Q_C / Q_HOT_PER_CYCLE; for (let i = 0; i < tokensQC.length; i++) { if (i / tokensQC.length > qcFrac) break; // skip tokens beyond Q_C fraction const t = tokensQC[i]; const x = lerp(qCArrow.x0 + 6, qCArrow.x1 - 14, t.phase); fill(COLD[0], COLD[1], COLD[2], 220); ellipse(x, qCArrow.y, 6, 6); } // W tokens: yellow accent, scaled by W/Q_H const wFrac = ctrl.W / Q_HOT_PER_CYCLE; const yA = wArrow.y0 - 4; const yB = lerp(yA, wArrow.y1, Math.max(0.1, wFrac)); for (let i = 0; i < tokensW.length; i++) { if (i / tokensW.length > wFrac) break; const t = tokensW[i]; const y = lerp(yA, yB + 12, t.phase); fill(TRAJ[0], TRAJ[1], TRAJ[2], 220); ellipse(wArrow.x, y, 6, 6); } pop(); } // ----- Slider labels (right above each slider) ----------------------- function drawSliderLabels(ctrl) { push(); noStroke(); fill(DIM); textSize(11); textAlign(LEFT, BOTTOM); text('T_H (hot reservoir, K): ' + Math.round(ctrl.TH), 20, 418); text('T_C (cold reservoir, K): ' + Math.round(ctrl.TC), 20, 468); text('alpha (Carnot fraction): ' + ctrl.alpha.toFixed(2), 420, 418); text('cycle rate (Hz): ' + ctrl.rate.toFixed(1), 420, 468); pop(); } // ----- Per-cycle and cumulative readouts (bottom-right) -------------- function drawReadouts(ctrl) { push(); // background panel noStroke(); fill(0, 0, 0, 140); rect(440, 90, 270, 200, 4); // header fill(FG); textSize(12); textAlign(LEFT, TOP); text('Per cycle (J / J/K)', 452, 100); // values textSize(11); fill(DIM); let y = 122; const lh = 17; text('Q_H (heat in from hot) = ' + ctrl.Q_H.toFixed(2), 452, y); y += lh; text('W (work out) = ' + ctrl.W.toFixed(2), 452, y); y += lh; text('Q_C (heat out to cold) = ' + ctrl.Q_C.toFixed(2), 452, y); y += lh; y += 4; text('dS_hot = -Q_H/T_H = ' + ctrl.dS_hot.toFixed(4), 452, y); y += lh; text('dS_cold = Q_C/T_C = ' + ctrl.dS_cold.toFixed(4), 452, y); y += lh; // dS_univ in accent color when >0, struct grey when ~0 if (ctrl.dS_univ > 1e-4) fill(TRAJ); else fill(STRUCT); text('dS_univ = sum >= 0 = ' + ctrl.dS_univ.toFixed(4), 452, y); y += lh; y += 6; fill(FG); text('cycles: ' + cyclesElapsed + ' S_univ_cum: ' + S_universe.toFixed(3) + ' J/K', 452, y); pop(); } // ----- HUD: title top-left, equation bottom-right -------------------- function drawHUD() { push(); // top-left title block noStroke(); fill(FG); textSize(22); textAlign(LEFT, TOP); text(TITLE, 14, 14); textSize(12); fill(DIM); text('Wikitube microsim . en.wikitube.io/wiki/' + ARTICLE, 14, 42); // canonical equation, bottom-right, ASCII textSize(12); fill(FG); textAlign(RIGHT, BOTTOM); text('dS_univ = Q_C/T_C - Q_H/T_H >= 0', width - 14, height - 14); text('eta_max = 1 - T_C/T_H (Carnot)', width - 14, height - 30); pop(); } ``` ## Links (Wikipedia order) <!-- injected from _registry/childlinks/Second_law_of_thermodynamics.json (2026-07-30T02:09:12Z) --> `Absolute_zero` · `Absorption_refrigerator` · `Active_transport` · `Adenosine_triphosphate` · `Adiabatic_accessibility` · `Adiabatic_process` · `Adiabatic_theorem` · `An_Inquiry_Concerning_the_Source_of_the_Heat_Which_Is_Excited_by_Friction` · `Arrow_of_time` · `Atkinson_cycle` · `Atom` · `Axiom` · `Benjamin_Thompson` · `Big_Bang` · `Black-body_radiation` · `Black_hole_thermodynamics` · `Boltzmann_brain` · `Boltzmann_constant` · `Brayton_cycle` · `Brian_Greene` · `Brian_Pippard` · `Bridgman's_thermodynamic_equations` · `Brownian_ratchet` · `CPT_symmetry` · `Caloric_theory` · `Canonical_ensemble` · `Carnot's_theorem_(thermodynamics)` · `Carnot_cycle` · `Carnot_heat_engine` · `Causality` · `Charles_Kittel` · `Chemical_oscillator` · `Chemical_potential` · `Chemical_thermodynamics` · `Cheng_cycle` · `Clausius_theorem` · `Clausius–Duhem_inequality` · `Clifford_Truesdell` · [[Closed_system]] · `Combined-cycle_power_plant` · `Compressibility` · `Compressibility_factor` · `Conjugate_variables_(thermodynamics)` · `Conservation_of_energy` · `Constantin_Carathéodory` · `Control_volume` · `Convex_function` · `Critical_opalescence` · `Critical_point_(thermodynamics)` · `Daniel_Bernoulli` · `Death` · `Demon` · `Design_engineer` · `Diesel_cycle` · `Dirk_ter_Haar` · `Ecological_economics` · `Edward_A._Guggenheim` · `Einstein_refrigerator` · `Electrochemical_gradient` · `Elias_Gyftopoulos` · `Empirical_evidence` · `Endoreversible_thermodynamics` · [[Energy]] · [[Energy_transformation]] · [[Engineering]] · `Enthalpy` · [[Entropy]] · `Entropy_(classical_thermodynamics)` · `Entropy_(energy_dispersal)` · `Entropy_and_life` · `Entropy_production` · `Environmental_accounting` · `Equation_of_state` · `Equilibrium_thermodynamics` · `Ergodic_hypothesis` · `Ericsson_cycle` · `Erwin_Schrödinger` · `Exergy` · `Exergy_efficiency` · `First_law_of_thermodynamics` · `Fluctuation_theorem` · `Frank_L._Lambert` · `François_Massieu` · `Free_entropy` · `Fundamental_thermodynamic_relation` · `Gas` · `Gas_laws` · `Georg_Ernst_Stahl` · `George_N._Hatsopoulos` · `George_Uhlenbeck` · `Germany` · `Gibbs_free_energy` · `Gilbert_N._Lewis` · `H-theorem` · `Hampson–Linde_cycle` · `Harald_Wergeland` · `Heat` · `Heat_capacity` · `Heat_capacity_ratio` · `Heat_death_of_the_universe` · `Heat_death_paradox` · `Heat_engine` · `Heat_pump` · `Heat_pump_and_refrigeration_cycle` · [[Heat_transfer]] · `Helmholtz_free_energy` · `Herbert_Callen` · `Herbert_Kroemer` · `Hermann_von_Helmholtz` · `High-efficiency_hybrid_cycle` · `History_of_entropy` · `History_of_perpetual_motion_machines` · `History_of_thermodynamics` · `Hot_air_engine` · `Hygroscopic_cycle` · `Ideal_gas` · `Ideal_gas_law` · [[Ilya_Prigogine]] · `Inexact_differential` · `Infinitesimal` · `Institute_of_Physics` · `Intensive_and_extensive_properties` · `Internal_energy` · `Internal_pressure` · `Introduction_to_entropy` · `Irreversible_process` · `Isenthalpic_process` · `Isentropic_process` · `Isobaric_process` · `Isochoric_process` · [[Isolated_system]] · `Isothermal_flow` · `Isothermal_process` · `James_Clerk_Maxwell` · `James_Ladyman` · `James_Prescott_Joule` · `Jarzynski_equality` · `Johannes_Diderik_van_der_Waals` · `John_James_Waterston` · `John_Smeaton` · `Joseph_Henry_Keenan` · [[Josiah_Willard_Gibbs]] · `Julius_von_Mayer` · [[Jupiter]] · `Kalina_cycle` · `Katherine_Blundell` · `Katja_Lindenberg` · `Kelvin` · [[Kinetic_theory_of_gases]] · `Kleemenko_cycle` · `Ladder_paradox` · `Lars_Onsager` · `Latent_heat` · `Laurie_Butler` · `Laws_of_thermodynamics` · `Length_contraction` · `Lenoir_cycle` · `Linda_Reichl` · `List_of_thermodynamic_properties` · `Lord_Kelvin` · `Loschmidt's_paradox` · `Ludwig_Boltzmann` · `László_Tisza` · `Léon_Brillouin` · `Magnetic_Thermodynamic_Systems` · `Mark_Zemansky` · `Massachusetts_Institute_of_Technology` · `Material_properties_(thermodynamics)` · `Max_Planck` · `Maximum_entropy_thermodynamics` · `Maxwell's_demon` · `Maxwell's_equations` · `Maxwell's_thermodynamic_surface` · `Maxwell_relations` · `Maxwell–Boltzmann_distribution` · `Mechanical_equivalent_of_heat` · `Metabolism` · `Microcanonical_ensemble` · `Microstate_(statistical_mechanics)` · `Miller_cycle` · `Mixed/dual_cycle` · `Mole_(unit)` · `Molecule` · `Money` · `Nicolas_Léonard_Sadi_Carnot` · `Non-equilibrium_thermodynamics` · `Nucleation` · `Observable_universe` · `Observation` · `On_the_Equilibrium_of_Heterogeneous_Substances` · `Onsager_reciprocal_relations` · `Organic_Rankine_cycle` · `Otto_cycle` · `Oxford_University_Press` · `Partial_derivative` · `Particle_number` · `Partition_function_(statistical_mechanics)` · `Past_hypothesis` · `Percy_Williams_Bridgman` · `Perpetual_motion` · `Peter_Atkins` · `Phase_(matter)` · `Phenomenon` · `Photosynthesis` · `Physical_property` · `Pierre_Duhem` · `Piobert's_law` · `Planck_constant` · `Poincaré_recurrence_theorem` · `Polytropic_process` · `Power_(physics)` · `Pressure` · `Pressure_gain_combustion` · `Pressure–volume_diagram` · `Probability_distribution` · `Process_function` · `Pseudo_Stirling_cycle` · `Pulse_tube_refrigerator` · `Quantum_statistical_mechanics` · `Quantum_thermodynamics` · `Quasistatic_process` · `Radiation` · `Rankine_cycle` · `Real_gas` · `Reduced_properties` · `Reflections_on_the_Motive_Power_of_Fire` · `Refrigeration` · `Refrigerator` · `Regenerative_cooling` · `Relativistic_heat_conduction` · `Reversible_process_(thermodynamics)` · `Robert_Henry_Thurston` · [[Rudolf_Clausius]] · `Ruppeiner_geometry` · `Scuderi_cycle` · `Self-assembly` · [[Self-organization]] · `Sensible_heat` · `Seth_Lloyd` · `Siemens_cycle` · `Sign_convention` · `Solid_angle` · `Speed` · `Speed_of_light` · `Spontaneous_process` · `Stanford_Encyclopedia_of_Philosophy` · `State_function` · `State_of_matter` · `Statistical_mechanics` · `Stephen_Blundell` · `Stirling_cycle` · `Stoddard_engine` · `Sydney_Chapman_(mathematician)` · `Synergetics_(Haken)` · [[Systems_ecology]] · `Table_of_thermodynamic_equations` · `Temperature` · `Temperature–entropy_diagram` · `Theorem_of_corresponding_states` · `Thermal_diode` · `Thermal_efficiency` · `Thermal_expansion` · `Thermal_fluctuations` · `Thermodynamic_cycle` · `Thermodynamic_databases_for_pure_substances` · `Thermodynamic_diagrams` · `Thermodynamic_equations` · [[Thermodynamic_equilibrium]] · `Thermodynamic_free_energy` · `Thermodynamic_instruments` · `Thermodynamic_limit` · `Thermodynamic_operation` · `Thermodynamic_potential` · `Thermodynamic_process` · `Thermodynamic_state` · [[Thermodynamic_system]] · `Thermodynamic_temperature` · [[Thermodynamics]] · `Third_law_of_thermodynamics` · `Time` · `Time_dilation` · `Timeline_of_heat_engine_technology` · `Timeline_of_thermodynamics` · `Transcritical_cycle` · `Triple_point` · `Universal_(metaphysics)` · `Universe` · `University_Physics` · `Vapor_quality` · `Vis_viva` · `Volume_(thermodynamics)` · `Volumetric_flow_rate` · `Vuilleumier_cycle` · `Walther_Nernst` · [[Wayback_Machine]] · `Wolfram_Research` · `Work_(physics)` · `Work_(thermodynamics)` · `Zeroth_law_of_thermodynamics` ## From the Real GENERATIVE library ![Second law of thermodynamics](https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Carnot_heat_engine_2.svg/220px-Carnot_heat_engine_2.svg.png) *Second law of thermodynamics — placed from the Real G.E.N.E.R.A.T.I.V.E. course library (Energy room). Source: Wikimedia Commons (via Wikipedia article media). [Details & license](https://commons.wikimedia.org/wiki/File:Carnot_heat_engine_2.svg).* > The second law of thermodynamics is a physical law based on universal empirical observation concerning heat and energy interconversions. A simple statement of the law is that heat always flows spontaneously from hotter to colder regions of matter (or 'downhill' in terms of the temperature gradient). ([Wikipedia](https://en.wikipedia.org/wiki/Second_law_of_thermodynamics)) <!-- REAL-GENERATIVE-MEDIA:END --> <!-- LOCAL-MEDIA-PASS:START --> ## From the vault media library !Second law of thermodynamics thumb.png *Second Law Of Thermodynamics — 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 The **second law of thermodynamics** is the physical principle that the total [[Entropy|entropy]] of an [[Isolated_system|isolated system]] can never decrease over time; it can only stay constant in a reversible process or increase in any real, irreversible one. First formulated by Sadi Carnot (1824) in his analysis of heat engines, and made statement-precise by [[Rudolf_Clausius|Rudolf Clausius]] (1850) and William Thomson — Lord Kelvin (1851), the law sets a one-way arrow on natural processes: heat flows spontaneously from hot to cold, work converts fully to heat but heat cannot fully convert to work, and macroscopic order tends toward disorder. Three equivalent statements anchor the law. Clausius: no process is possible whose sole result is the transfer of heat from a cooler to a hotter body. Kelvin-Planck: no cyclic process can convert all absorbed heat into work. Caratheodory: near any equilibrium state there exist states unreachable by adiabatic processes. Ludwig Boltzmann's 1877 statistical interpretation expressed entropy as S = k_B * ln(Omega), the natural logarithm of the number of microstates compatible with a given macrostate, recasting the second law as overwhelming statistical likelihood rather than absolute prohibition. The law implies the Carnot efficiency bound eta <= 1 - T_C / T_H for any heat engine operating between hot and cold reservoirs, the existence of an absolute thermodynamic temperature scale, and the impossibility of perpetual-motion machines of the second kind. It governs refrigeration, cryogenic helium liquefaction (where helium-4 reaches 4.2 K only by extracting entropy through work), atmospheric dynamics, biological metabolism, [[Information|information]] erasure (Landauer's principle), and the cosmological arrow of time. ## See also - Room hub: [[Helium]] - p5.js Editor conventions: P5 JS EDITOR - Wiki root: MAIN --- *Scaffolded by `generative-microsim` from row 116 of the Helium sheet on 2026-05-14T12:24:59Z.* <!-- REAL-GENERATIVE-MEDIA: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/Second_law_of_thermodynamics) : [Wikitube](https://en.wikitube.io/wiki/Second_law_of_thermodynamics) ## Previous hub tags Tree parents: [[Cellular_automaton]] · [[Self-organization]]. Legacy hubs: none. --- *Sources: 1 legacy note. Minted wave 1, 2026-07-30 (v1.6 order).*