# First law of thermodynamics The first law is conservation of [[Energy]] with the bookkeeping made explicit: the change in a system's [[Internal_energy]] equals the heat added minus the work it does, ΔU = Q − W. Nothing is created and nothing vanishes — energy only crosses the boundary, as heat or as work, and those are the only two doors. ## Microsim — p5.js Sidecar: `First_law_of_thermodynamics.p5.js` · route leaf: `microsim/p5js/First_law_of_thermodynamics__20260910T0400Z`. Built to the Betterfire Standard v0 (single `ARTICLE` constant, HUD title and Wikitube URL, control hints, parameter readout and equation). | Control | Does | |---------|------| | `Q slider` | heat added to the gas, in joules | | `W slider` | work done by the gas on the piston | | `[space]` | reset the cycle to ΔU = 0 | *What to watch:* The gas keeps its energy books. Add heat and the bar grows; let the piston push out and it shrinks by exactly the work done — the two never fail to balance. ## Two doors, one balance Heat and work are not properties a system *has*; they are transfers, defined only while something is happening. [[Internal_energy]] is the property. That distinction is the whole content of the law and the reason a cycle returning to its start has ΔU = 0 no matter how violent the path. [[Combustion]] converts chemical energy to thermal energy inside the boundary; a piston moves the boundary and does work. Run both at once — as every engine and every [[Fuel_cell]] does — and the first law is the audit. ## Why it constrains without deciding The law permits any process that balances. It does not say which direction things go: it allows a [[Water|puddle]] to freeze while warming the room, which never happens. That asymmetry needs the [[Second_law_of_thermodynamics]] and [[Entropy]]. The first law only sets the budget, which is why [[Energy_transformation|efficiency]] arguments always cite both — one caps how much, the other caps how good. **Reads with:** *Thermodynamics and Chemistry, 2nd ed. (Howard DeVoe, 2020)* — [OTL record](https://open.umn.edu/opentextbooks/textbooks/thermodynamics-and-chemistry) · [download](https://www2.chem.umd.edu/thermobook/downloads.htm) · CC BY 4.0. Section 6 of the [[PORTAL_Thury_Hydrodynamics_Apex_Spine|Apex Spine]] book shelf. **On the spine:** [[Internal_energy]] · [[Enthalpy]] · [[Second_law_of_thermodynamics]] · [[Energy]] · [[WT!Thury_Hydrodynamics_Compendium]]. <!-- MATTERSIM:BEGIN g33 — Matter & Energy Cluster microsim (framework build, specs/sims/First_law_of_thermodynamics.json); do not hand-edit inside --> **Microsim — three.js (Wikitube framework):** *First law of thermodynamics* <div class="wt-sim" data-src="https://wikitube-3d-microsims.netlify.app/matter/First_law_of_thermodynamics.html" data-title="First law of thermodynamics"></div> *Built from `MICROSIM_GUIDE/specs/sims/First_law_of_thermodynamics.json`; part of the [[PORTAL_Matter|Matter portal]] spine (section sims and See-also variants).* <!-- MATTERSIM:END --> ## Wikipedia : Wikitube **Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/First_law_of_thermodynamics) : [Wikitube](https://en.wikitube.io/wiki/First_law_of_thermodynamics) ## Previous hub tags Hubs: `Life_Physics`, `Systems`. Portals: [[PORTAL_Thury_Hydrodynamics_Apex_Spine]], [[PORTAL_Physics]], [[PORTAL_Energy]]. --- *Book-section wave · 2026-09-10 · article + p5 microsim shipped together.*