nAr = p/(kB*Tg) - y[:,0]- 0.5*y[:,2]- y[:,1]
should be
nAr = p/(kB*Tg) - y[:,0]- 2*y[:,2]- y[:,1]
from argon conservation.
In the case of non-reacting gas, this would be:
nAr = p/(kB*Tg) - y[:,0]- y[:,2]- y[:,1]
because of partial pressures, which makes the exercise a bit confusing.
should be
from argon conservation.
In the case of non-reacting gas, this would be:
because of partial pressures, which makes the exercise a bit confusing.