# Does the density form of Ideal gas law hold under condition of changing mass?

I'm trying to get a deeper understanding of this particular form of the ideal gas law I have seen. That form is $$P=\rho R T$$. I believe this form is not valid when mass or volume is changing. Am I correct? Below, I put a derivation of $$P=\rho R T$$ and some of my reasoning as to why I think it doesn't hold under changing mass or volume.

Derivation

The ideal gas law equation is $$PV=nR_1T$$ where $$R_1$$ is $$8.314 \frac{J}{mol \cdot K}$$ . If we can convert from moles to $$kg$$ we get:

$$R = 8.314 \frac{J}{mol \cdot K} \times \frac{1 mol}{0.02897 kg} = \frac{287 J }{kg \cdot K}$$

So we can change $$nR$$ where n is number of moles and $$R$$ is joules per mole-kelvin to $$mR$$ where m is mass and $$R$$ is Joules per kg-kelvin because $$nR = \text{ joules } = mR$$.

This gives $$PV=mRT$$

To get the density form, I believe we need to make these assumptions:

1. Assume $$m$$ is the mass of 1 liter of air
2. Assume V is 1 liter

Then we have $$P=\rho RT$$, where $$\rho$$ is the density of air.

When is it valid?

If I derived $$P=\rho R T$$ correctly, then it should not be valid if mass changes or if volume changes.

Proof:

\begin{align} P=\frac{mRT}{V} &= ρRT\\ \frac{m}{V} &= ρ \end{align}

If $$m$$ changes, but $$V$$ does not change, then $$\rho$$ must change. But $$\rho$$ is the density of air which is constant at STP. Thus the equation should not be valid if $$m$$ changes.

But people have told me this equation is valid and holds and that I am wrong. Am I wrong that the equation only holds under constant mass and volume? If so why am I wrong?

• The ideal gas law applies to an ideal gas in equilibrium. If the mass is changing, it is not in equilibrium. Commented Feb 9 at 13:39
• Conversion from moles to kilograms is not a change of units but of physical quantities. the proportionality between moles and mass is system-dependent. Commented Feb 9 at 13:54
• @bobD Okay, sounds like you are confirming that the P=ρRT form of the equation is not valid if mass changes? Commented Feb 12 at 11:02

If the air is required to be at STP (or any particular temperature and pressure), then the only two remaining variables are those that define the density: $$m$$ (or $$n$$, depending on your preferred form of the ideal gas law) and $$V$$. If you assert that $$V$$ is also fixed, then you have no free variables and you are left with a condition of fixed mass. Thus, you have a non-question. If you have an ideal gas, then your presented equation is valid. But it still only has the four variables ($$m$$, $$V$$, $$T$$, and $$P$$) that you can manipulate, so if you want to change one of them you must allow at least one other variable to vary.

Ideal gas law (constitutive equation) reads

$$P = \rho R T$$

and holds always, at least when the constant $$R$$ doesn't change. It could change if you different gas with different molar mass in the system.

This constitutive equation relates only local thermodynamic variables, and I'd say it's more general than its "extensive version" $$PV = n R_u T \ ,$$ that needs the info about the volume of the system as a whole, and assume uniform thermodynamic variables (i.e. that don't change in space).

Adding mass to a system. In your "derivation", the system has constant volume $$V$$ and starts with pressure $$P_1$$, temperature $$T_1$$ and mass $$m_1$$, and moles $$n_1$$, so density $$\rho_1 = \frac{m_1}{V}$$.

If you add mass to the system $$m_2 = m_1 + \Delta m$$, and thus mole $$n_2 = n_1 + \Delta n$$, and keeps constant volume $$V$$, you can't simultaneously keep $$P_2 =P_1$$ and $$T_2 = T_1$$, as you can realize comparing \begin{aligned} P_1 V & = n_1 R_u T_1 \\ P_2 V & = n_2 R_u T_2 \ , \end{aligned} so that the ratio $$\frac{P}{T}$$ is proportional to the number of moles (or to the mass) contained in the system $$\frac{P_2 \, T_1}{P_1 \, T_2} = \frac{n_2}{n_1} \ .$$ If you keep constant temperature $$T_2 = T_1$$, pressure increases, since $$\frac{P_2}{P_1} = \frac{n_2}{n_1}$$. In order to keep constant pressure $$P_2 = P_1$$, temperature needs to be lower $$\frac{T_2}{T_1} = \frac{n_1}{n_2}$$.

• I really want an answer that define when the "P=ρRT" form of the equation is or is not valid. It sounds like you are saying the "P=ρRT" is not valid if mass is changing, which was what I suspected, but could you possibly list the cases of when P=ρRT is and is not valid for me? Then I would mark correct. Commented Feb 12 at 11:05