Starting from the inner energy U the thermodynamic framework is developed. Starting from the question how can U of the container content be changed. In the classical treatment of chemical thermodynamics only mechanical work W and heat Q are considered because other forms of energy like electric or magnetic energies are usually not relevant to chemical reactions. However, if required the thermodynamic framework can be extended to consider any energy transfer.
Now to change U in a container we can either provide or extract energy, in our case work W or heat Q
(7)
The convention of energy transfer in chemistry follows the convention which is shown in Figure 1. Everything which flows into the container is positive, what flows out is negative. However, engineers do think different. They think in terms of steam engines. They put heat into a machine and get work done by it which is positive for them. So in engineering texts Equation (7) is written as
Equation (7) describes the overall energy transfer. For infinitesimal changes the mathematical notation for the differential is
(8)
Figure 1: Sign convention of energy transfer used by chemists. Flow into the container is positive, out of the container negative.
The greek δ in equation which replaces d is not exactly an algebraic symbol but is used to emphasize that neither W nor Q are state functions but only the sum U is. Therefore neither W nor Q are of much use because they are path dependent. It will be the task of the following sections to elaborate this and to finally eliminate W as well as Q and to replace these parameters with more useful expressions.