# Finding the number of moles of an ideal gas in a capillary

1. Oct 21, 2016

### Potatochip911

1. The problem statement, all variables and given/known data
The temperature across the capillary with constant cross-sectional area and length L is given by $T=T_0e^{-kx}$. Assuming an ideal gas and constant pressure show the number of moles to be: $$n=\frac{PV(e^{kL} - 1)}{RkLT_0}$$

2. Relevant equations
$PV=nRT$

3. The attempt at a solution

The equation of state can be expressed as $g(P,V,T) = 0$ but since pressure is given to be constant we have $g(V,T) = 0$ therefore we can express the volume as $V=V(T)$ from which we can get the differential for V as $$dV = (\frac{\partial V}{\partial T})dT = \frac{nR}{P}dT\\ V =\frac{nR}{P} \int_{T_i}^{T_f}dT = \frac{nR}{P}(T_f-T_i)$$

Using $T=T_0e^{-kx}$ it is evident that $T_f = T_0e^{-kL}$ and $T_i = T_0$ therefore $$V = \frac{nRT_0}{P}(e^{-kL}-1)\Longrightarrow n=\frac{PV}{nRT_0(e^{-kL}-1)}$$

Which clearly isn't the correct answer. I'm curious as to what the mistake is following this reasoning.

Another method I've attempted is for an ideal gas $n=n(P,V,T)$ but pressure is constant therefore $n=n(V,T)$ and we obtain the differential $$dn = \left(\frac{\partial n}{\partial V}\right)_{P,T} dV + \left(\frac{\partial n}{\partial T}\right)_{P,V} dT$$

Now I know from the the answer that $\left(\frac{\partial n}{\partial T}\right)_{P,V}$ must equal 0 since the answer is obtained from integrating $dn = \left(\frac{\partial n}{\partial V}\right)_{P,T} dV$ but I can't seem to justify why $\left(\frac{\partial n}{\partial T}\right)_{P,V}$ should be equal to zero without setting both of them equal to zero.

2. Oct 21, 2016

### haruspex

You need to understand what your differential equation says. You have taken a constant n and expressed how the volume changes if you change the temperature. Since the change in temperature was negative, you got a negative volume change.
Consider segments length dx and the number of moles they contain.

3. Oct 21, 2016

### Potatochip911

Edit: Ok so that's the logic behind taking $dn/dV$ and then multiplying the $dV$ over and integrating, but shouldn't this also come from my second method in the main post?

Last edited: Oct 21, 2016
4. Oct 21, 2016

### haruspex

Your second method considers how n varies as T and V change independently. I cannot think what that means in the context of the question.
As I posted, your independent variable should be distance along the capillary.