Gas law (source code)

= Gas law

A <gas law> relates equilibrium variables such as <pressure>, <volume (thermodynamics)>, <temperature> and <amount of substance>. The <ideal gas law> $pV=nRT=Nk_BT$ provides a useful dilute-gas model. Holding <temperature> and particle number fixed predicts $p\propto1/V$; holding <pressure> and particle number fixed predicts $V\propto T$ with absolute <temperature>.

A piston and cylinder provide a direct comparison: vary one controlled variable slowly enough for the gas to equilibrate, then record the remaining pair. The constraint is part of the law being tested; rapid compression can heat the gas and need not follow an isothermal curve. At larger density, <real gas> effects require a more suitable <equation of state>. A gas law describes possible equilibrium states, while the <first law of thermodynamics> additionally determines the <heat> and <work> along a specified process.