ChemistryStates of matterClass 11

Ideal gas in a box: interactive simulation

Gas pressure is simply molecules hitting the walls. More molecules, faster molecules or a smaller box all mean more hits per second, and so more pressure.

Useful for: JEE Main, NEET

Try this

Each control here changes one of n, T or V. The pressure is calculated from PV = nRT with R = 8.314 J mol⁻¹ K⁻¹, and the particles speed up as you heat the gas, just as kinetic theory predicts.

  1. 1

    Use the Room preset: 1 mol, 300 K, 24.9 L.

    What you should see

    P ≈ 100 kPa, about 1 atm.

  2. 2

    Halve the volume without changing anything else.

    What you should see

    The pressure doubles (Boyle’s law) and the wall-hit counter roughly doubles too.

  3. 3

    Double the temperature in kelvin at fixed volume.

    What you should see

    The pressure doubles and the particles move visibly faster.

  4. 4

    Watch the PV / nT readout while you change anything.

    What you should see

    It always stays at 8.314 — that constant is R.

Formulas behind it

Ideal gas equation

PV=nRTPV = nRT

Boyle’s law (n, T fixed)

P1V1=P2V2P_1V_1 = P_2V_2

Charles’s law (n, P fixed)

V1T1=V2T2\frac{V_1}{T_1} = \frac{V_2}{T_2}

Average kinetic energy

KE‾=32kBT\overline{KE} = \frac{3}{2}k_BT

Common mistakes

  • Using °C instead of kelvin in gas-law calculations.
  • Mixing litres with SI units: 1 L = 10⁻³ m³.
  • Assuming 22.4 L per mole at room temperature. It is 22.4 L only at 0 °C and 1 atm (about 22.7 L at the IUPAC STP of 1 bar).
Practise 3 questionsCheck your answer instantly, with a worked solution.Stuck on a ideal gas in a box question?Snap it and get a whiteboard video solution.

FAQ

When does a real gas behave like an ideal gas?

At low pressure and high temperature, when molecules are far apart and attractions between them matter little.

Why does pressure rise when a gas is heated in a closed container?

Hotter molecules move faster, so they hit the walls more often and harder.

What is the value of R in different units?

8.314 J mol⁻¹ K⁻¹ = 0.0821 L atm mol⁻¹ K⁻¹ = 0.0831 L bar mol⁻¹ K⁻¹.

Related simulations

All 65 simulations

Want a specific topic or simulation added?

Tell us in our feedback box which chapter or concept you want visualised next.

Send feedback