[Physics] With ideal gases, varying quantity of moles, and having a constant volume how do temperature and pressure behave

ideal-gaspressuretemperaturethermodynamics

I'm trying to build a simulation of gases so I ended-up trying to use law of ideal gases ($PV = nRT$).

In my scenario:

  • volume is constant ($V=1\rm{m}^3$);

  • a known quantity of moles are being added to the system ($n_{added}$);

  • both pressure ($P$) and temperature ($T$) are unconstrained.

Imagine it is a closed container where you pump gas into it.

In other problems I've seen that either temperature or pressure would be considerer constant, so you can use one to find the other. In my problem there is no restriction on them, so theoretically both of them could fluctuate.

I am left with $$\frac{P}{T}=(n_{orig}+n_{added})R$$ where both $P$ and $T$ are unknown and I don't know how to solve this without making one of those a constant.

So how does one work out the value of pressure and temperature when you add molecules to the system given a constant volume? In reality does one of them remain constant so I could treat it as constant in my equation?

Maybe I'm on the wrong track using those equations and I apologise for my blatant ignorance. Thanks in advance.

Best Answer

If we assume that the gas in the basic container is at equilibrium, then it has a temperature that we can take to be $T_1$. If the gas being added is also at equilibrium it too will have a temperature that we can call $T_2$. If the two temperatures are the same, then the final temperature will be the same as the initial one.

On the other hand, if the two temperatures are different, the final temperature will be intermediate between the two. If we assume that the specific heat capacity of the gas is $C_v$, and if we assume that the added gas is hotter, then the base gas must be heated by $q_1 = m_1C_V(T_f - T_1)$ where $q_1$ is the heat added to the cooler gas, $m_1$ is the mass in grams of the cooler gas, and $t_f$ is the final temperature.

Similarly $q_2 = m_2 C_v (T_2 - T_f)$ is the heat that comes from the warmer gas. Clearly $q_1 = q_2$ and you know everything except the final temperature $T_f$ for which you can solve.

Note that I assumed that the temperature changes are small enough so that the heat capacity per gram $C_V$ is constant.

On an atomic level the molecules of the cooler gas are moving more slowly than those of the warmer gas. When mixed the molecules exchange energy by collision until a new equilibrium is reached.

HOWEVER: If you are using an ideal gas, the molecules are points and never collide and so equilibrium is never re-established. Welcome to the wonderful world of theoretical physics and the shortcomings of the ideal gas as a model of actual gases.

Related Question