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.