Free expansion of a gas against a rigid wall