Partial pressure and gas calculations