Lesson 4 of 15

The Ideal Gas Law

The Ideal Gas Law

The ideal gas law combines Boyle's Law, Charles's Law, and Avogadro's Law into a single equation that describes the state of an ideal gas — one in which molecules have no volume and no intermolecular forces.

The Equation

PV=nRTPV = nRT

Where:

  • PP is the pressure (Pa = N/m²)
  • VV is the volume (m³)
  • nn is the amount of gas (mol)
  • R=8.314J/(mol\cdotpK)R = 8.314\,\text{J/(mol·K)} is the universal gas constant
  • TT is the absolute temperature (K)

Three Rearrangements

Solving for each variable:

P=nRTVP = \frac{nRT}{V}

V=nRTPV = \frac{nRT}{P}

T=PVnRT = \frac{PV}{nR}

Standard Conditions

At standard temperature and pressure (STP: T=273.15KT = 273.15\,\text{K}, P=101325PaP = 101325\,\text{Pa}), one mole of an ideal gas occupies approximately 22.4L=0.0224m322.4\,\text{L} = 0.0224\,\text{m}^3.

This is the molar volume of an ideal gas at STP, a useful benchmark for checking calculations.

Limits of the Ideal Gas Model

Real gases deviate from ideal behavior at:

  • High pressure — molecules are compressed close enough that their volume matters
  • Low temperature — intermolecular attractions become significant

The van der Waals equation corrects for these effects:

(P+an2V2)(Vnb)=nRT\left(P + \frac{an^2}{V^2}\right)(V - nb) = nRT

Where aa accounts for intermolecular attractions and bb accounts for molecular volume. For most introductory problems, the ideal gas law is an excellent approximation.

Your Task

Implement the three functions below using R=8.314J/(mol\cdotpK)R = 8.314\,\text{J/(mol·K)}.

Python runtime loading...
Loading...
Click "Run" to execute your code.