Thermodynamics of ideal gases