gas volume calculation