Why is thermal energy not a state variable?

It is written on Wikipedia: (https://en.wikipedia.org/wiki/Thermal_energy)

The thermal energy of a system scales with its size and is therefore an extensive property. It is not a state function of the system unless the system has been constructed so that all changes in internal energy are due to changes in thermal energy, as a result of heat transfer (not work). Otherwise thermal energy is dependent on the way or method by which the system attained its temperature.

My question is: Why thermal energy is dependent on the way or method by which the system attained its temperature? You only need to give me an example proving that. Thanks in advance.

• "Heat" is not a state function but energy is a state function, and so is "thermal energy" which is just another expression for "internal energy". Some people would like to banish the word "heat " as a noun from English and use it only as a verb, that is to heat something. Use it as a verb and then you will not get confused. – hyportnex Feb 1 '16 at 13:23
• Wiki does not confuse between heat and thermal energy. – Trần Nhật Quang Feb 2 '16 at 7:52
• I think this is a good question. Why can't we use $U_{\rm thermal}$, $U_{\rm non-thermal}$, $V$, and $N$ as state variables instead of $U$, $V$, $N$? Wouldn't that make things less confusing? – Eric David Kramer Mar 11 at 13:31

Consider a system of an ideal gas where volume of the gas is constant (call it system A) and one where the pressure is constant (System B). Because the internal energy of the system is a state variable, same change in temperature would cause same change in internal energy. Now, $$\Delta U = Q + W$$ In A volume is constant so W=0 and hence Thermal energy $$Q$$ is equal to $$\Delta U$$. But in B the gas will expand, doing some work (say $$-W$$) and hence for the same change in $$U$$ we need to supply more thermal energy, equal to $$\Delta U +W$$.
Thermal energy is not a state variable because work can also contribute to thermal energy, e.g. through friction. Work can also contribute to other internal degrees of freedom. In general, work contributes to the total energy $$U = U_{\rm thermal} + U_{\rm non-thermal}.$$ Since work should be considered as contributing only to the total internal energy $$U$$, so should the heat $$Q$$, and therefore $$Q+W = \Delta U.$$ I think $$Q$$ could even contribute to non-thermal degrees of freedom if accompanied by an additional increase in entropy. I'm not 100% sure about this last statement.
• For an ideal gas isn't $U$ a state variable? – Aaron Stevens Apr 10 at 16:05