On this page
In short The pressure of a gas in a vertical cylinder with a heavy, free-moving piston is always P_atm + Mg/A. Heating the gas does not change its pressure. For a diatomic gas like air, 28.6% of added heat does work by lifting the piston.
When you solve thermodynamics problems, you will often meet a vertical cylinder fitted with a "heavy piston" that is free to move. This setup is a classic way to test if you understand what controls the pressure of an enclosed gas.
Here is how to set up the force balance, why heating the gas makes it expand isobarically (at constant pressure), and how to find the new height of the piston.
What is the pressure of a gas in a vertical cylinder with a heavy piston?
The gas pressure inside the cylinder depends entirely on what is pressing down from the outside. If the piston is free to slide up and down without friction, it rests in a state of mechanical equilibrium.
Three forces act on the piston:
The weight of the piston (Mg) pushing down, where M is the piston's mass and g is gravity.
Atmospheric pressure (P_atm) pushing down on the top of the piston. The force is P_atm × A, where A is the cross-sectional area.
The gas pressure (P_gas) pushing up from the inside. The upward force is P_gas × A.
For the piston to stay still (or move at a steady speed), the upward force must balance the total downward force: P_gas × A = P_atm × A + Mg
Dividing by the area A gives the standard formula: P_gas = P_atm + Mg/A
Because P_atm, M, g, and A are all fixed numbers, the gas pressure is constant as long as the piston is free to move.
What happens to the piston when the gas is heated?
Because the pressure is locked at P_atm + Mg/A, heating the gas triggers an isobaric expansion.
According to the ideal gas law (PV = nRT), if the pressure P and the number of moles n are constant, the volume V must increase in direct proportion to the absolute temperature T. This is Charles's Law.
When you heat the gas:
The molecules gain kinetic energy and strike the piston harder.
The pressure briefly rises above P_atm + Mg/A, creating a net upward force.
The piston moves up, increasing the volume.
As the volume grows, the molecules spread out, and the pressure drops back to its equilibrium value.
The result is that the piston rises to a new height. Unlike the free expansion of an ideal gas where no energy is lost to the surroundings, here the gas does mechanical work against the atmosphere and gravity. If you are struggling to picture how these variables change, the Fermi Simulation Lab has interactive simulations for the ideas that are easier to see than to read, such as watching a piston rise as you add heat.
How do you find the new height of the piston?
If you know the initial height h₁ and the initial temperature T₁, you can easily find the final height h₂ after heating the gas to a new temperature T₂.
Because the cylinder is a uniform shape, the volume of the gas is simply the cross-sectional area A multiplied by the height h (V = A × h). When you plug this into the ideal gas law for a constant-pressure process (V₁ / T₁ = V₂ / T₂), the equation becomes: (A × h₁) / T₁ = (A × h₂) / T₂
The area A cancels out from both sides, leaving a direct ratio between height and temperature: h₂ = h₁ × (T₂ / T₁)
This relationship shows that if you scale up the absolute temperature of the gas by a factor, the piston will rise to increase its original height by the exact same factor. Just remember that T₁ and T₂ must always be in Kelvin. If you use Celsius, the ratio will not work because zero degrees Celsius does not mean zero volume.
A worked example: heat added vs work done
Consider a vertical cylinder with a heavy piston containing an ideal diatomic gas, like air, which has a molar specific heat at constant volume Cv = 5/2 R. The piston is free to move.
Question: If you add 100 J of heat to the gas, how much of that energy goes into lifting the heavy piston (doing work)?
Step 1: Identify the process. Because the heavy piston is free to slide, the pressure is constant. Calculating the heat in isobaric and isochoric processes depends on which variable is locked; here, heat added at constant pressure is Q = n Cp ΔT. For a diatomic gas, Cp = Cv + R = 7/2 R.
Step 2: Find the work done. The work done by the gas in lifting the piston is W = P ΔV = n R ΔT.
Step 3: Find the ratio. The fraction of heat converted to work is: W / Q = (n R ΔT) / (n Cp ΔT) = R / (7/2 R) = 2/7
So, out of 100 J of heat, 2/7 × 100 ≈ 28.6 J is used to push the piston up, and the remaining 71.4 J increases the internal energy of the gas. If you want to walk through similar thermodynamic calculations, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning.



