We know that the internal energy for an ideal gas depends only on its temperature.

What confused me was the correct defination of the internal energy for the ideal gas.

Is it:

$dU = nC_vdT$


$U = nC_vT$ . Here the $nC_vT$ term comes from the kinetic energy of the ideal gas which would imply $dU = Cv(dnT+ndT)$ ?


This confusion arised while considering a thought experiment in which there is an insulated container consisting of two chambers A and B as shown in the figure , seperated by an insulated rigid rod with a valve. (You may choose to ignore this thought experiment)

The two chambers consist of air with the initial pressure of air in chamber A being higher than that in chamber B. The valve is opened allowing air in chamber A to move slowly to B. The valve is closed when the pressures in both chambers become equal. I wanted to calculate the final temperature and pressure in each container.

Here is what I did:

Our control mass system is taken as the whole container as shown by dotted lines in the figure.

Since the container is insulated and the displacement work is zero (container is rigid), we get $\Delta U = 0$ for our control mass system for the process.

enter image description here

$\Delta U$ = $\Delta U_a + \Delta U_b = 0$

$\implies U_a,initial +U_b,initial = U_a,final +U_b,final $

We can consider $2$ ways of proceeding:


If we define $U$ as $U=nC_vT$ and proceed which would result in:

$n_{a,init}C_vT_{a,init} +$ $n_{b,init}C_vT_{b,init} =$
$n_{a,final}C_vT_{a,final}+$ $n_{b,final}C_vT_{b,final}$


If we define $U$ as $dU=nCvdT$, which means we'll take $dU_a = n_aCvdT_a$ and $dU_b = n_bCvdT_b$ and then set $dU_a+dU_b = 0$ and integrate on both sides. Here $n_a$ and $n_b$ are varying with time as the air diffuses through the valve.

So which defination is correct?

  • $\begingroup$ Internal energy is adittive quantity per subsystems, this implies that constant k vanish. First definition is correct because as you says na and nb was changing in time $\endgroup$
    – fika97
    Aug 27, 2019 at 12:08
  • $\begingroup$ It's the first one (dU etc.) Don't forget that $C_V$ can itself depend on temperature for an ideal gas (e.g. most diatomic gases are ideal gases to very good approximation at low pressure, and their heat capacity depends on $T$). $\endgroup$ Feb 20, 2023 at 13:21
  • $\begingroup$ Also the ideal gas internal energy definitely depends on both $n$ and $T$, though we often deal with cases of constant $n$. $\endgroup$ Mar 27 at 11:28

1 Answer 1


Based on the open system (control volume) version of the first law of thermodynamics, the correct equations for the changes in internal energy of the gases in the two chambers in the thought experiment are:

$$dU_a=d(n_au_a)=d(n_aC_vT_a)=h_adn_a$$and$$dU_b=d(n_bu_b)=d(n_bC_vT_b)=-h_adn_a$$where $n_a$ is the number of moles in higher pressure chamber A, $n_b$ is the number of moles in chamber B, $u_a$ is the molar internal energy of the gas in chamber A, $u_b$ is the molar internal energy of the gas in chamber B, $h_a=u_a+P_av_a$ is the molar enthalpy of the gas in chamber A, $v_a$ is the molar volume of the gas in chamber A, and where $dn_a$ is negative and $dn_b=-dn_a$. If we add the above two equations together, we obtain: $$d(U_a+U_b)=d(n_aC_vT_a+n_bC_vT_b)=0$$ This confirms that your first equation is correct.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.