# How is temperature constant in enthalpy change formula?

I have learnt that temperature sort of indicates the internal energy of a system, or at least this is my intuition. So if temperature is constant, then internal energy is constant as well. But in the derivation of the following formula \begin{align}{ {\Delta H = \Delta U + \Delta n_g RT}} \end{align} T doesn't have a delta, which means it's treated like a constant value, but then wouldn't this make $$\Delta U = 0$$? In fact most questions in my textbook have the statement "at constant pressure and 298/300 K", but $$\Delta U$$ isn't 0 despite the temperature being constant.

Am I missing/neglecting something here?

• As long as the number of moles of all species is constant, U is a function of T and P only. But, if chemical reaction occurs, you make and break chemical bonds, and this changes the number of moles of each species. This causes U of the mixture to change at constant T and P. Oct 26, 2020 at 14:04
• @ChetMiller We have also to exclude spontaneous processes like phase changes ( 1 kg of ice at 1 atm and 0 deg C has dfiferent U than liquid water ) or compound redistribution between phases ( diffenent chemical potentials in phases before equilibrium is reached . Oct 26, 2020 at 14:15
• @Poutnik Yes, I agree with this. But sometimes people treat liquid water as a different chemical species than ice, such that a "reaction" took place. This is an OK approach too. Oct 26, 2020 at 14:29
• Is there a reason why U is a function of T and P only when the number of moles of all species is constant? Oct 26, 2020 at 18:02

The internal energy of a system is in general not only a function of temperature. This means that holding the temperature constant does not guarantee that the energy will be constant. The statement that the energy can be expressed as a function of only the temperature applies to the particular case of ideal gases.

Assuming that gases are ideal simplifies expressions for the change in internal energy and enthalpy. For ideal gases at constant temperature and composition ($$\Delta T=0$$ and $$\Delta n=0$$):

$$\Delta U = 0\\\Delta H = 0 \tag{1}$$

These expressions are not general. They apply to ideal gases at constant temperature and composition.

In general,

$$\Delta H = \Delta U + \Delta (pV) \tag{2}$$

For an ideal gas at constant temperature, $$\Delta (pV)= \Delta (nRT)= RT\Delta n$$

so that

$$\Delta H = \Delta U + RT\Delta n \tag{3}$$

It is also worth remembering that at constant pressure $$w=-p \Delta V$$ so that equation (2) becomes $$\Delta H = q_p$$ (in general for any substance, provided p is constant and only pV work is done). But what is $$\Delta U$$?

We can show from the ideal gas law that it is only a function of T for a constant amount of a pure ideal gas, and, from the kinetic theory of gases, one can also show that for one mole,

$$U_{m,i} = f_iRT$$

where $$f_i$$ is a constant that depends only on the type of gas (not on thermodynamic variables). Then

$$\Delta U = \sum_i U_{m,i}\Delta n_i = RT \sum_i f_i \Delta n_i$$

for a mixture of ideal gases.