# Generalization of first law of thermodynamics

What is the mathematical statement for the first law of thermodynamics, accounting for kinetic energy, potential energy, internal energy, work, heat and most importantly taking into consideration the work-energy theorem? Also, is $$∆U=∆Q-∆W$$ only valid for systems whose center of mass is at rest in an inertial frame, or is it also valid for other systems?If so, please specify. Thanks

• Remark: the first law if thermodynamics is actually the energy conservation law. Sep 25, 2021 at 15:32

What is the mathematical statement for the first law of thermodynamics, accounting for kinetic energy, potential energy, internal energy, work, heat and most importantly taking into consideration the work-energy theorem?

The general form of the first law for an closed system (a system where no mass crosses the system boundary) is

$$\Delta E_{tot}=\Delta U+\Delta KE +\Delta PE= Q-W$$

Where the terms are defined in the figure below that illustrates a general closed system.

The work $$W$$ term includes the work that crosses the system boundary (that associated with the change in internal energy) as well as the external work on the system as a whole. It is the net external work done on the system as whole where the work energy theorem applies, i.e.,

$$W_{net-external}=\Delta KE$$

Also, is $$∆U=∆Q-∆W$$ only valid for systems whose center of mass is at rest in an inertial frame, or is it also valid for other systems?

It is valid whether or not the center of mass is at rest or moving in an inertial frame, because $$\Delta U$$ only applies to the change in internal kinetic and potential energy of the system at the atomic/molecular level.

For example, the temperature of your cup of coffee, which is a measure of its internal kinetic energy, doesn't change if you drink it while standing on the road, or in your car traveling at a constant velocity with respect to the road. But the kinetic energy of the cup of coffee as a whole is zero with respect to the road when you are standing on the road, and 1/2$$mv^2$$ with respect to the road while driving the car.

but the work energy theorum states that work done by all the forces whether internal or external equals change in kinetic energy, so why are we considering only external work? Is there a difference between "work" in thermodynamics and in mechanics?

There is a difference between the thermodynamic boundary work done by or on the closed system (the work done in expanding or compressing the boundary of the system) denoted as $$W_{sys}$$ in the diagram and the external work done on the system as a whole, denoted as $$W_{ext}$$ in the diagram.

The boundary work $$W_{sys}$$ can increase or decrease the internal kinetic and/or potential energy at the atomic/molecular level per the version of the first law that doesn't include changes in kinetic or potential energy of the system as a whole. An example is a gas in a cylinder fitted with a piston undergoing expansion or compression but with the cylinder being at rest with respect to the external frame of reference depicted in the diagram.

The external work $$W_{ext}$$ would be due to an external force that results in a change in velocity and/or elevation of cylinder of gas with respect to the external frame of reference in the diagram.

The work energy theorem is applied to the latter, but generally not to the former, though I suppose it could be argued that it applies in the sense that the expansion or compression of the gas can result in a change in the average kinetic energy of the gas molecules, as reflected by an decrease or increase in the temperature of the gas.

Hope this helps.

• Nice figure; some similar figures fail to include the rotational kinetic energy. Dec 20, 2020 at 0:36
• @JohnDarby Thanks for that Dec 20, 2020 at 1:57
• @BobD but the work energy theorum states that work done by all the forces whether internal or external equals change in kinetic energy, so why are we considering only external work? Is there a difference between "work" in thermodynamics and in mechanics? Dec 20, 2020 at 18:46
• @ParthBhardwaj I have updated my answer to respond to your follow up question. Hope it helps. Dec 20, 2020 at 19:49
• @BobD yes it does help,thanks for that. Dec 21, 2020 at 5:31

The relationship you state is for a closed system with no change in center of mass kinetic or potential energy, viewed from an inertial frame. You also have to consider whether the system is open or closed. An open system can have mass flow in/out but a closed system cannot.

For the detailed relationships, see any good text on thermodynamics, such as one by Sonntag and Van Wylen, and search for first law on the web.

The law of conservation of energy states that the total energy of an isolated system is constant; For a thermodynamic process (closed system) without transfer of matter, the first law is often formulated

$$dU=\delta Q+\delta W$$ or $$dU=TdS-PdV$$

In the case of a closed system in which the particles of the system are of different types and, because chemical reactions may occur, their respective numbers are not necessarily constant, the fundamental thermodynamic relation for $$dU$$ becomes:

$$dU=TdS-PdV+\sum_i\mu_i dN_i$$ . If the system has more external mechanical variables than just the volume that can change, the fundamental thermodynamic relation further generalizes to: $$dU=TdS-\sum_i X_idx_i+\sum_i\mu_i dN_i$$ Here the $$X_i$$ are the generalized forces corresponding to the external variables $$x_i$$.

The first law of thermodynamics is equivalent to the law of conservation of energy: energy cannot be created or destroyed; the total amount of energy in the Universe is fixed. Still, a modification is needed as you talk about non-inertial frames. As the normal energy conservation laws need modification as you go to the non-inertial frame. For example, the generalized force gets transform when you get into non-inertial frames. Thus you need to account for the fact that you are in a non-inertial frame. Other than that it's energy conservation and thus valid everywhere.

• So with the generalization we also include in internal energy the macroscopic kinetic and potential energy? For example if we have a container filled with gas in an external field should we also include the potential energy of the center of mass? But then we should no longer speak about potential but total energy? Jul 19, 2021 at 16:57

We start from work-energy theorem $$$$W_{\textrm{tot}} = \Delta E_{K\textrm{,tot}}$$$$ Kinetic energy is in part macroscopic and in part microscopic: $$$$W_{\textrm{tot}} = \Delta E_{K\textrm{,mac}} + \Delta E_{K\textrm{,mic}}$$$$ I add in both members the variation of internal potential energy $$$$W_{\textrm{tot}} + \Delta E_{P\textrm{,int}} = \Delta E_{K\textrm{,mac}} + \Delta E_{K\textrm{,mic}} + \Delta E_{P\textrm{,int}}$$$$ So $$$$W_{\textrm{tot}} - W_{\textrm{int}} = \Delta E_{K\textrm{,mac}} + \Delta U$$$$ where $$U= E_{C\textrm{,mic}} + E_{P\textrm{,int}}$$ is what is called internal energy. Conclusion: $$$$W_{\textrm{ext}} = \Delta E_{K\textrm{,mac}} + \Delta U$$$$ But the work done from external is part macroscopic and part microscopic (atoms move in very different ways, and there are microscopic works, but in general there is a global motion and a non zero mean force done on system): $$W_{\textrm{ext}} = W_{\textrm{ext,mac}} + W_{\textrm{ext,mic}}$$. The latter, the energy that cross the boundary system via microscopic works, is the heat $$Q$$ (we can have heat also via radiation) $$$$W_{\textrm{ext,mac}} + Q = \Delta E_{K\textrm{,mac}} + \Delta U$$$$ Now divide the external forces that do macroscopic work in two set: $$$$W_{\textrm{ext,mac}}' + W_{\textrm{ext,mac}}^* + Q = \Delta E_{K\textrm{,mac}} + \Delta U$$$$ where $$W_{\textrm{ext,mac}}^*=-\Delta E_{P\textrm{,est}}^*$$ is the work done by some (not necessarily all) conservative external forces. We can rearrange in this way $$$$\fbox{ \Delta E_{K\textrm{,mac}}+ \Delta E_{P\textrm{,est}}^* + \Delta U = W_{\textrm{ext,mac}}' + Q}$$$$ Usually we consider quasi static processes, and $$E_P$$ too doesn't play a role, so we simply write $$\Delta U = W + Q$$. Resuming

• $$\Delta E_{K\textrm{,mac}}$$ = Variation of external macroscopic kinetic energy
• $$\Delta E_{P\textrm{,est}}^*$$ = Variation of external potential energy relative to some conservative external forces (if here we are interested only to gravity, and $$\mathbf{g}$$ is uniform, we can use potential energy of center of mass)
• $$\Delta U$$ = Variation of internal energy (kinetic microscopic and internal potential)
• $$W_{\textrm{ext,mac}}'$$ = macroscopic work done by all external forces with the exception of the forces relative to the potential energy in the first member.
• $$Q$$ = microscopic work of the external forces done on the system (heat transferred to the system)

The more general form of the first law of thermodynamics is $$\Delta U+\Delta (PE)+\Delta (KE)=Q-W$$This includes the change in macroscopic potential energy of the system plus the change in macroscopic kinetic energy. So it takes into account the work-energy theorem.