I am having problems understanding the exact definition of internal energy. Different sources say different things. My textbook says that the internal energy of a system is the sum of the kinetic energies and potential energies of all the molecules present in it. But wait! Is thermodynamics not a macroscopic study of systems? Are we allowed to mention atoms and molecules while defining thermodynamic quantities?
I tried Physical Chemistry by Peter Atkins. The approach adopted there seemed like the way to go. I still have some doubts. This is an excerpt.
The formal statement of the First Law
We begin by pretending that we do not know what we mean by 'energy'. We pretend that we only know what is meant by work, because we can observe a weight begin raised or lowered in the surroundings. We also know how to measure work by noting the height through which the weight is raised. Throughout this section, work will be the fundamental, measurable quantity, and we define energy,heat and the First Law in terms of work alone. We shall employ terms that have been established by the Zeroth Law of thermodynamics, namely, state and temperature and the concepts of temperature and the concepts of adiabatic and diathermic walls.
Q1. One of our objectives here is to define heat. If we do not know what heat is how do we know the meaning of adiabatic or diathermic? Does it not make the definition circular?
In an adiabatic system of a given composition, it is known experimentally that the same increase in temperature is brought about by the same quantity of any kind of work we do on the system. Thus if 1 kJ of mechanical work is done on the system (by stirring it with rotating paddles, for instance), or 1 kJ of electrical work is done (by passing an electric current through a heater), and so on, then the same rise in temperature is produced. The following statement of the first law of Thermodynamics is a summary of a large number of observations of this kind.
The work needed to change an adiabatic system from one specified state to another specified state is independent of the way in which the work is done.
This form of the law looks completely different from the form we gave before, but we shall now see how it implies $\Delta U=q+w$.
Suppose we do work $w_{ad}$ on an adiabatic system to change it from an initial state $i$ to a final state $f$. The work maybe of any kind (mechanical or electrical). However, the First Law tells us that $w_{ad}$ is the same for all the paths and depends only on the initial and final states.
The fact that $w_{ad}$ is independent of the path implies that to each state of the system we can attach a value of a quantity-we call it the 'internal energy' $U$- and express the work as a difference in internal energies.
$\Delta w_{ad}=U_f-U_i=\Delta U$ This equation also show that we can measure the change in internal energy of a system by measure the work needed to bring about a change in an adiabatic system.
Q2. Is there way to show that there is some "adiabatic path" between any two states? Isn't this necessary for the definition of internal energy to be valid?
For instance all the states that can be reached from $P_0$ by expanding adiabatically lie on the curve. The above definition does not tell us exactly how to evaluate the value of internal energy between two points between which there is no "adiabatic path".
The mechanical definition of heat
Suppose we strip away the thermal insulation around the system and make it diathermic. The system is now in thermal contact with its surroundings as we drive it from the same initial state to the same final state. The change in internal energy is the same as before, because U is a state function, but we might find that the work we must do is not the same as before. Thus, whereas we might have needed to do 42 kJ of work when the system was in an adiabatic container to achieve the same change of state we might have to do 50 kJ of work. The difference between the work done in the two cases is defined as the heat absorbed:
$$q=w_{ad}-w$$
Q3. What am I missing? Is there any nice article that clearly defines internal energy? Information regarding books or links will be appreciated.