# Clarification on thermodynamics and mechanics

This is a follow-up question to an answer https://physics.stackexchange.com/a/746974/377012 on this topic. In that answer, what does $$W$$ refer to? Is it the work done ON the system, by forces OTHER THAN those that are associated with the potential-energy of the system? So, if the definition of total-energy excludes any potential-energy term, then we may treat $$W$$ as the total work done on the system.

On a related note, there seem to be two common versions of the first law of thermodynamics:

1. Change in total energy of the system = Heat supplied to the system + Work done ON the system

2. Change in total energy of the system = Heat supplied to the system - Work done BY the system

Is it true that (1) is a more general statement of the law, while (2) applies ONLY when work done by the system happens to be the negative of work done on the system?

The short answers to the questions I raised earlier are:

(1) Both forms of the 1st law of thermodynamics are equivalent. In both those forms, the term "work" must be interpreted as "thermodynamic work".

(2) Work-energy theorem is applicable to all mechanical systems, while the first law of thermodynamics is applicable to all "thermodynamic systems" (which is a subset of all mechanical systems).

The long explanation follows:

In order to clearly (and consistently) state the work-energy theorem (from Newtonian mechanics) and the first law of thermodynamics, we need to distinguish between different of notions of work. They are: (i) Work done ON a system, vs. Work done BY a system. In general, they are NOT negatives of each other. (ii) Thermodynamic work, and Non-Thermodynamic work. (iii) Macroscopic work and Microscopic work.

Combining these three categories, we have $$2^3 =8$$ different notions of work!

All these notions of work use the same basic idea $$W \space \space = \space \space \sum_i \space \vec F_i \space \cdot \space \Delta \vec r_i \qquad \cdots \cdots \cdots \quad (1)$$ where $$\Delta \vec r_i$$ is the displacement of the particle ON WHICH the force $$\vec F_i$$ acts.

The different notions of work differ in the forces $$\vec F_i$$ that are included in the above summation. For work done ON the system, we include forces that ACT ON some object(s) of the system. For work done BY the system, we include forces that are EXERTED BY some object(s) of the system.

Work energy theorem (of Newtonian Mechanics) states that

Total work done BY the system = Total increase in its kinetic energy $$W^{Total}_{ON} \space \space = \space \space \Delta KE \space \space = \space \space KE_2 \space - \space KE_1 \qquad \qquad ............(2)$$ Next, we may think of splitting the total work into conservative-work, and non-conservative-work. But unfortunately, splitting a force into its conservative and non-conservative components is non-unique (and non-canonical), so we take a different approach in thermodynamics.

It turns out that in any real-world situation, we can split a given (physical) force uniquely, into its thermodynamic and non-thermodynamic counterparts. This leads naturally to the notions of thermodynamic and non-thermodynamic work:

A force exerted by an object A on (another) object B is said to be a thermodynamic-force if and only if the two objects maintain persistent contact, at the point-of-action of the force. All other forces, including non-contact forces that "act-at-a-distance" are all non-thermodynamic forces.

A mechanical system is any collection of objects in the universe, that are conceptually grouped together (for the purpose of scientific analysis). A thermodynamic system is a mechanical system, which satisfies the following technical condition, which shall be called the TD-validity condition:

The non-thermodynamic forces acting on the system are pseudo-consevative, in the sense that the total work done by these forces is equal to the decrease in some potential energy of the system. More precisely, the total work done by all the non-thermodynamic forces acting on the system over a time-interval from $$t_1$$ to $$t_2$$ can be expressed as $$W^{N-TD}_{ON} \space \space = \space \space -\Delta PE \space \space = \ PE_1 \space - \space PE_2 \space \space = \space \space \phi(s(t_1)) - \phi(s(t_2))$$
where $$\phi(\cdot)$$ is a well-defined (state-)function, and $$s(t)$$ is the so-called state of the system at time $$t$$. PE stands for the potential-energy of the system. The negative sign in the $$-\Delta PE$$ term of the equation above is intentional.

Note that the above condition is more general (ie, more relaxed) than requiring that all non-thermodynamic forces acting on the system be expressed at the (negative) gradient of a time-invariant potential-function. In fact, any force that acts on a stationary object satisfies the validity condition. More generally, any force that is perpendicular to the motion of its target-object also satisfies the TD-validity condition. Indeed, the Lorentz force $$\space \vec F \space = \space q \vec E + q \space \vec v \times \vec B \space$$ induced by static (ie, time-invariant) electromagnetic fields on a charged particle $$q$$ satisfies the TD-validity condition.

Now that we have an accurate definition of thermodynamic systems, let's take the work-energy theorem one step forward: $$\begin{eqnarray} W^{Total}_{ON} & \space \space = \space \space & \Delta KE \qquad \qquad ............(2') \\ W^{N-TD}_{ON} \space + \space W^{TD}_{ON} & \space \space = \space \space & \Delta KE \nonumber \\ -\Delta PE \space + \space W^{TD}_{ON} & \space \space = \space \space & \Delta KE \nonumber \\ W^{TD}_{ON} & \space \space = \space \space & \Delta KE \space + \space \Delta PE \qquad \qquad ............(3) \end{eqnarray}$$

Next, we introduce the microscropic perspective of thermodynamics. In mechanics, we are typically content with a macroscopic description of objects. Abstract, idealized descriptions such as that of a particle, or a rigid-body, are examples of such macroscopic models of objects. But this ignores the microscopic/molecular motions and force-interactions within these objects.

In thermodynamics, we sometimes need a complete-model of the system, in order to properly decompose the total force into thermodynamic and non-thermodynamic forces. Forces that look like non-thermodynamic forces at the macroscopic level may turn out to be thermodynamic under the detailed model of the system (and vice versa). The complete-model of the system may include some macroscopic forces and motions, as well as some (many more!) microscopic forces and motions that manifest themselves only at the molecular level.

In view of such more detailed models, we expand the work energy theorem [Equation (3)] into a sum of macroscopic and microscopic components: $$\begin{eqnarray} W^{TD-Macro}_{ON} \space + \space W^{TD-micro}_{ON} & \space \space = \space \space & \Delta KE^{Macro} \space + \space \Delta PE^{Macro} \nonumber \\ & \space \space + \space \space & \Delta KE^{micro} \space + \space \Delta PE^{micro} \end{eqnarray}$$ The thermodynamic work done at the microscropic level is better known as heat-transfer. In particular, microscopic, thermodynamic work done ON a system is described as heat supplied to the system, denoted $$Q_{in}$$. In addition, the sum of the kinetic and potential energies at the microscopic level is better known as the internal energy of the system, denoted $$U^{int}$$.

Incorporating these conventions/terminologies, the work-energy theorem may be restated as follows:
$$\begin{eqnarray} W^{TD-Macro}_{ON} \space + Q_{in} & \space \space = \space \space & \Delta KE^{Macro} \space + \space \Delta PE^{Macro} \space + \space \Delta U^{int} \nonumber \\ & \space \space = \space \space & \Delta TE. \qquad \qquad ............(4) \end{eqnarray}$$ where we have defined the sum of macroscopic-kinetic, macroscopic-potential and internal-energies to be the so-called total-energy of the system, denoted $$TE$$.

This is one forms of the well-known first law of thermodynamics. We now derive the second well-known form from this.

Recall that thermodynamic forces are persistent, contact forces. For such forces, Newton's third law of motion implies that the work done by object A on object B is equal and opposite (in sign) to the work one on object A by object B. Such an (anti-)symmetry property does NOT hold (in general) for other action-reaction pairs. Using this VERY SPECIAL property, Equation (4) may be rewritten as $$\begin{eqnarray} -W^{TD-Macro}_{BY} \space + Q_{in} & \space \space = \space \space & \Delta KE^{Macro} \space + \space \Delta PE^{Macro} \space + \space \Delta U^{int} \nonumber \\ + Q_{in} \space - \space W^{TD-Macro}_{BY} \space & \space \space = \space \space & \Delta TE. \qquad \qquad ............(5) \end{eqnarray}$$ which is the other well-known form of the 1st law of thermodynamics.

The key point of this discussion is that the work term in the statement of this law should be interpreted as the macroscopic thermodynamic work, which results from persistent contact-forces between objects. Owing to the anti-symmetry property of thermodynamic work, it is sufficient to consider only thermodynamic forces between an object OF the system and another object OUTSIDE the system.

Now, Let's apply our precise interpretation of thermodynamics to specific examples below:

1. Consider two particles that exert gravitational forces on each other. If both particles are mobile, then a mechanical system that includes one of the objects and excludes the other is NOT a valid thermodynamic system. This is because the gravitational force is not a thermodynamic force (as it does not require persistent contact), and the work done by this force can only be expressed as the change in a potential energy function, that depends on the position of BOTH particles, one of which is NOT part of the system-state. This example shows that an improper split between the "system" and its "environment" may violate the TD-validity condition, and render the laws of thermodynamics inapplicable to the chosen "system".

2. Same set-up as before, but we include both particles in our system. This is a valid thermodynamic system, since the work done by gravitational forces are related to a change in gravitational potential energy. The macroscopic/total work done ON/BY the system is equal to the increase in (macroscopic/total) kinetic-energy of the system. It is also equal to the decrease in (gravitational) potential-energy of the system.
$$\begin{eqnarray*} W_{ON} = W_{BY} & \space = \space & \Delta KE = -\Delta PE \\ \end{eqnarray*}$$ In this example, there is no internal energy $$U^{int}$$, because the system consists of two particles (point-masses), with no finer structure. Also, note the the macroscopic/total work done ON and BY the system do not obey the (anti-)symmetry property of thermodynamic work. Indeed, the total work done ON/BY the system is equal to the sum of work done on both particles.

From the thermodynamic perspective, there is no heat transfer, and no thermodynamic work. Hence, there is no change in the total energy of the system (as expected).

1. Same two particles as before, but one of the particles is fixed. Our mechanical system includes only the mobile particle. This is a valid thermodynamic system, because the forces associated with the system (namely the action-reaction pair of gravitational forces) are non-thermodynamic, and conservative, whose associated potential energy is a function of the position of the mobile particle, which is part of the system-state. In this case as well, there is not heat transfer, and no the thermodynamic work done ON/BY the system. Hence, the total-energy remains unchanged. The effect of the gravitational force on the mobile particle is to simply exchange some of its macroscopic kinetic and potential-energies, without altering their sum.

This example brings out the need to distinguish thermodynamic work (which changes the total-energy of the system) from non-thermodynamic work, that (in thermodynamics) only exchanges potential energy with kinetic energy.

1. Finally, we consider a non-trivial example of an object sliding on a fixed, rough surface. The initially moving object is decelerated as it slides on the rough surface. Suppose $$F > 0$$ is the magnitude of (a constant) frictional-force acting on the object, and $$\Delta x > 0$$ is the magnitude of displacement of the sliding object, during a time-interval of interest.

Under this macroscopic model, the frictional force on the object acts in the direction opposite to the object's displacement. Hence $$W^{Total}_{ON} \space = \space -F \space \Delta x < 0$$, while $$W^{Total}_{BY} \space = \space 0$$, because the (reaction-)force exerted by the sliding object acts on the rough floor, which is assumed to be fixed (in this macroscopic model).

We may apply the work-energy theorem to the sliding block under this macroscopic model. This yields $$\Delta W^{Total}_{ON} \space \space = \space \space -F \ \Delta x \space \space = \space \space \Delta KE$$ We may apply this theorem to the floor as well. No work is done on the floor, and its kinetic energy remains unchanged (at zero).

If we try to (carelessly) apply the first law of thermodynamics to this macroscopic model of the system, we run into all sorts contradictions. If we apply the rules carefully, but retain the macroscopic model, we come to the conclusion that the sliding-object violates the TD-validity condition, and hence outside the scope of thermodynamics.

In order to correctly apply thermodynamics to this example, we are forced to consider a more detailed model of the system. One such model is provided in the appendix. According to this model, the non-thermodynamic frictional force $$\vec F$$ is replaced by microscopic forces, that are all thermodynamic in nature. Since there are no non-thermodynamic forces in the picture, TD-validity condition trivially satisfied, so both the sliding object and the floor are valid thermodynamic systems in their own right!

Since all forces are microscopic and thermodynamic in nature (persistent-contact-forces), all the thermodynamic work that is performed will be represented by heat transfers. Let $$Q \geq 0$$ by the heat transferred from the object to the floor. As a result of this transfer, the total energy (which is equal to the internal-energy) of the floor increases by an amount $$Q$$. At the same time, the total energy of the sliding object changes by $$-Q \leq 0$$. But the total energy of the sliding object is a sum of its kinetic and internal energies. Since the kinetic energy decreases by $$\space F \space \Delta x$$, it follows that its internal energy must increase by an amount $$-\Delta KE \space - \space Q \space \space = \space \space F \space \Delta x \space - \space Q$$.

Appendix:
Here is a somewhat simplistic attempt at the microscopic modeling, of an object sliding on a rough floor:

Each object (the sliding object and the fixed, rough floor) is modeled as an ideal rigid body (sliding object and the floor), together with a large number of tiny springs attached to its surface. As the object slides over the floor, the micro-springs of the object temporarily align with micro-springs of the floor, and compress each other for a short while, before snapping off eventually, as the objects slides well past the span of these individual micro-springs. As the pairs of micro-springs are compressed, the springs on the sliding object propagate the frictional forces acting on them to the rigid bulk of the sliding object, causing the object to decelerate. After the pairs of micro-springs snap out of contact with each other, they oscillate perpetually based on the potential energy stored in them while they were compressed. This is perceived in the macroscopic world as an increase in temperature of the object and the floor. Based on such a model, it may be seen that the aggregate displacement of the micro-springs at the point of application of frictional forces is less than the macroscopic displacement of the sliding object $$\Delta x$$. Hence, we conclude that the magnitude of (microscopic) thermodynamic work due to friction is less than the magnitude of the nominal work $$\space F \space \Delta x$$.

In other words, $$\quad -F \ \Delta x \space \space \leq \space \space W^{TD-Micro}_{ON} \space \space \leq \space \space 0 \quad$$ and $$\quad W^{TD-Micro}_{BY} = -W^{TD-Micro}_{ON} \geq 0$$.

As mentioned earlier, the microscopic, thermodynamic work is more commonly referred to as heat transfer. In this example, $$W^{TD-Micro}_{BY} \geq 0$$ is the amount of heat that is transferred from the sliding object to the rough floor.

Hope this helps ...

The two statements mean exactly the same because $$\text{work done by the system on its environment = - work done on the system by its environment}$$

• I (and other people who have posted on this topic before) have observed examples where the two works (work on the system, and work by the system) are not merely negatives of each other. For example, when a movable body is attracted to a fixed object (due to gravity for example), the movable body does zero work on it environment (ie, the fixed object), while the fixed body does positive work on the movable body. My question is, which of those works is relevant to thermodynamics, and how do you decide that in the general case. Sep 9, 2023 at 1:35
• Energy conservation demands that the two works be equal and opposite sign. Whether you ignore the effect of 10kWhr work done on the Earth while you find the same amount of thermal work (heat) important when boiling water on the stove is an issue of scale not equality. It is also true that gravitational (and also electric, magnetic) externally imposed potential plays a very different role in the energy balance equation of Gibbs, but if that is what you are interested in then ask as to why and how to handle externally imposed potentials in the energy balance. Sep 9, 2023 at 12:11
• I don't follow the requirement that the two works be equal and opposite. When two particles (system + environment) exert forces on each other, while the forces may be equal an opposite, the displacements need not be equal. Hence the work done by the first particle is not equal and negative of the work done on the first particle. What am I missing here? Another example of such asymmetry is a moving body brought to reset by a rough floor. As far as I understand, the moving body does zero work on the rough floor, while negative work is done on the moving object. Sep 9, 2023 at 22:45
• Also, how did you guess that I am confused about the role of externally imposed potentials? I had already posted a question on that very topic, at physics.stackexchange.com/q/779463/377012. I would appreciate it if you could chime in on that as well. Sep 9, 2023 at 22:45
• regarding your last question I actually did write a rather lengthy drivel to your question on that very subject but changed my mind because your question was also involved kinetic energies and other not directly thermal things and thought it would not be appropriate, but if you ask a separate question on the role of external potentials then I will post it. Note though taht it will only make sense to you if you are already familiar with both the Gibbs $dU=TdS-pdV+\mu dN$ and the Gibbs-Duhem equations $SdT-Vdp+Nd\mu=0$. Sep 9, 2023 at 23:03

The two versions of the first law referred to at the end of your post are for a closed system (no mass transfer). The work done on or by the system is the work that potentially changes only the internal energy of the system, I.e., changes in KE and PE at the molecular level. That energy is generally reference frame independent.

The equations ignore possible changes in the KE or PE of the system as a whole, generally referred to as mechanical energy, which is dependent on an external (to the system) reference frame. Those are covered in the general version of the first law which additionally include work that changes mechanical energy, as described in my answer in the link.

With respect to the two versions, the first is usually used in chemistry while the second in physics and engineering. The difference between the two is in the first version $$W$$ is negative if work is done by the system while in the second version $$W$$ is positive if work is done by the system. The two are consistent with respect to the expected change in internal energy.

As far as which version is more common, I have found it to be the second version, though I have no data to back it up.

Hope this helps.

• Thanks for following up on this issue. I have used a slightly different notation from your original post. I have used U to denote the "total energy" of the system, which includes "macroscopic" KE and PE as well. My question is motivated by the fact that work done by the system and on the system are not negatives of each other (as I have clarified in my other comment above). Hence, the two equations in my original posts are not (always) mutually equivalent. This is the aspect I am seeking clarification on. Sep 9, 2023 at 1:39

Below is the Kelvin form in use by the International Union of Pure and Applied Chemistry (IUPAC). Heat flow that exits system (exothermic process) is negative. Work done by a system causes energy to exit system and is therefore negative.

$$\Delta U = q + w$$

Below is the Clausius form used by engineers. Heat flow that exits system (exothermic process) is negative. Work done by a system is a positive benefit to us and is therefore positive.

$$\Delta U = q - w$$

The IUPAC form is consistent in its convention that energy in any form (heat or work) that is exiting a system is negative in sign when substituted into the first law.