Ideal gas – pV = nRT in a cylinder
PhysicsThermal Physics & GasesAges 17–18
How do you mainly use this simulation?
Use it with your class: students open it from a link or a QR code, with no account needed.
Gas molecules move randomly inside a cylinder fitted with a piston. Drag the piston to change the volume, slide the temperature bar to heat or cool the gas; the pressure p = nRT/V updates instantly along with a state graph (isothermal p–V, isochoric p–T, or isobaric V–T) showing the theoretical curve and the trace of states visited. The First law screen takes the gas through isothermal, isobaric, isochoric or adiabatic changes or a full cycle: supply heat Q and see the work as the area under the p–V curve, ΔU = Q − W, live energy bars and the cycle efficiency. The Real gases screen uses the van der Waals equation for He, N₂, CO₂ and NH₃: a graph of the compression factor Z = pV/(nRT) against p at several temperatures, molecules with their own volume and attractions, and liquefaction below the critical temperature. The Degrees of freedom screen shows the equipartition of energy: heat 1 mol of He, Ar, N₂ or O₂ at constant volume or constant pressure, read the temperature rise and work out the molar heat capacities and their ratio γ; a collision tracker in a box of hard-sphere molecules measures the mean free path at different pressures and compares it with λ = kT/(√2·πd²p).
Lesson: Kinetic theory of gases, Boyle's law, Charles's law, the ideal gas equation of state, first law of thermodynamics, equipartition of energy, mean free path
What it shows
The ideal gas equation pV = nRT links pressure, volume, absolute temperature and amount of gas. In the kinetic model, pressure comes from molecules hitting the walls, harder and more often when the gas is hotter; fixing one quantity gives Boyle's law, Charles's law and the pressure law. The First law screen applies energy conservation: ΔU = Q − W with W the work done by the gas, or ΔU = Q + W with W the work done on it. The work is the area under the p–V curve, the four processes share the heat differently, and a closed cycle turns net heat into net work. The Real gases screen shows where pV = nRT fails: in the van der Waals equation, attractions (a) make Z < 1 at moderate pressure and the molecules' own volume (b) makes Z > 1 at high pressure, while low temperature makes CO₂ and NH₃ liquefy. The Degrees of freedom screen shares the energy out: each translational or rotational degree of freedom holds ½kT per molecule, so heating at constant volume and at constant pressure gives the molar heat capacities and γ, and a collision tracker shows that molecules travel a mean free path λ = kT/(√2·πd²p) between collisions.
How to use
On Gas laws, drag the piston, change Temperature T and press Switch graph. On First law, pick a process and a gas, set Heat Q (or Volume V₂ for adiabatic changes and cycles), the start state T₁ and V₁, and the sign convention. Press Run process to watch the state move along the p–V curve while the shaded area and the Q, W and ΔU bars grow; the table lists every step. On Real gases, choose a Gas, set Temperature T and Molar volume Vₘ, read Z on the Z–p graph and press Record point. On Degrees of freedom, choose Heat capacity, a Gas and Heat at, press Add heat Q and read ΔT; the tables give C and γ. Choose Mean free path, set Pressure p and press Measure λ.
Parameters you can change
- Amount of gas n 0.5–3 mol
- Temperature T 200–600 K
- Volume V 5–40 L
- Process graph Isothermal: p–V, Isochoric: p–T, Isobaric: V–T
- Screen Gas laws, First law of thermodynamics, Real gases, Degrees of freedom
- Process (First law screen) Isothermal (T constant), Isobaric (p constant), Isochoric (V constant), Adiabatic (Q = 0), Cycle: 2 isochoric + 2 isobaric, Otto cycle (petrol engine)
- Heat Q supplied to the gas -3000–3000 J
- Final volume V₂ (adiabatic, cycles) 2–60 L
- Type of gas Monatomic gas (He, Ar), Diatomic gas (N₂, O₂)
- Sign convention for work W = work done by the gas: ΔU = Q − W, W = work done on the gas: ΔU = Q + W
- Gas (Real gases) Helium He, Nitrogen N₂, Carbon dioxide CO₂, Ammonia NH₃
- Temperature T (Real gases) 250–1000 K
- Molar volume Vₘ (Real gases) 0.05–25 L/mol
- Part (Degrees of freedom) Heat capacity, Mean free path
- Gas (Degrees of freedom) Helium He, Argon Ar, Nitrogen N₂, Oxygen O₂
- Temperature T (Degrees of freedom) 200–400 K
- Heat at (Degrees of freedom) Constant volume, Constant pressure
- Heat Q per press 50–500 J
- Pressure p (mean free path) 20–400 kPa
Questions to explore
- Why must temperature be in kelvin, not degrees Celsius, when you use pV = nRT?
- In an isobaric process, what happens to the volume when the absolute temperature is doubled?
- Using the moving molecules, why does heating a gas at constant volume increase its pressure?
- Why does an isobaric expansion need more heat than an isochoric heating with the same temperature rise?
- Why does a diatomic gas need more heat than a monatomic gas to warm by 1 K at constant volume?