# Is it possible to calculate the mass of gas remaining in a cylinder simply by measuring temperature and pressure?

Given $$pV=nRT$$, where;

$$p$$ = Pressure, $$V$$ = Volume, $$n$$ = Number of moles of gas, $$R$$ = Gas constant and $$T$$ = Temperature in Kelvin.

Also, the mass can be calculated by;

$$m = nM \rightarrow n = \frac{m}{M}$$, where;

$$m$$ = mass, $$n$$ = Number of moles and $$M$$ = Relative molecular mass.

Putting these two equations together, I get;

$$pV = \frac{mRT}{M} \rightarrow m = \frac{pVM}{RT}$$.

Therefore I assume that as you release gas from that cylinder, you can calculate the mass of gas remaining in the cylinder simply by taking readings of the temperature and pressure in the cylinder.

Of course, this is assuming you know the volume of the cylinder, as well as it having just one gas, so you know the Relative atomic mass too.

Is this correct?

• Yes, for an ideal gas. – Chet Miller Apr 11 at 17:27
• @ChetMiller thanks for this answer. I understand what an ideal gas is and what the requirements are for a gas to be classed as an "ideal gas". However, one thing I don't 100% understand is at what point approximating the gas as an ideal gas breaks down, and therefore between what limits would this be accurate? – PhysicsGuy123 Apr 11 at 17:31
• Are you familiar with the "principle of corresponding states," and the expression for the compressibility factor z as a function of reduced pressure and reduced temperature. – Chet Miller Apr 11 at 17:33
• I was not previously aware of this until you mentioned it, but I have done a bit of research now on the internet regarding the value of z. How would this be used in this instance? – PhysicsGuy123 Apr 11 at 18:11
• If z differs significantly from 1.0, the ideal gas law is inaccurate. – Chet Miller Apr 11 at 18:30