Introduction

Usual presentation of the first law

Many widely available physical chemistry textbooks introduce the first law of thermodynamics and the law of conservation of energy as the same physical law. Usually, the first law states that, for any given closed system, there is a function U, called internal energy, which is defined for that system and varies by exchanging heat (Q) and work (W) with its surroundings. The first law is expressed by the following energy balance,

$$\begin{aligned} {\Delta} U = Q + W. \end{aligned}$$
(1)

Here, the system is a fixed portion of matter contained within a well-defined region of space by a boundary, that is, a closed surface that separates the system from its exterior. Heat is the exchange of energy due to temperature differences. Complementarily, work is the exchange of energy that is not due to temperature differences. It is possible to separate the net work W into the sum of several terms: one referring to the deformation of the system’s boundaries and others, such as electrical work, friction work, shaft work, etc. [4], that is,

$$\begin{aligned} W = W_{\text {df}} + W_{\text {el}} + W_{\text {fr}} + W_{\text {sh}} + ... \end{aligned}$$
(2)

In this text, we will consider only the deformation work, that is, \(W = W_{\text {df}}\). A system is said to be rigid if its boundaries cannot be deformed, meaning that \(W = 0\) and \(\Delta U = Q\).

In mechanics, the action of work is not only capable of deforming the body boundaries, but also of changing its kinetic energy. We can write the so-called mechanical energy theorem as

$$\begin{aligned} W_{\text {tot}} = \Delta K + W_{\text {df}}, \end{aligned}$$
(3)

where K is the kinetic energy and \(W_{\text {tot}}\) is the total work. If a body is rigid, that means that \(W_{\text {tot}}= \Delta K\). Next, we use the theory of continuum mechanics to throw light on the meaning of the term \(W_{\text {df}}\).

Basic definitions of continuum mechanics

Continuum mechanics is a branch of mathematical physics that aims to model and describe physical bodies not based on their molecular constitution. It was developed from the theory of elasticity and fluid dynamics and extended especially in the twentieth century [8].

In continuum mechanics, the region of space we are interested in is called a body. At any given time, the points of the body compose a well-defined configuration. It is possible to choose any of these configurations as a referential one, so that all other configurations are measured with respect to it. The referential configuration is called the material one, whereas any other is called a spatial configuration.

Every point \(\mathbf{X}\) in the material configuration is mapped to a unique point \(\mathbf{x}\) of the spatial configuration by a deformation function \(\chi\), so that \(\mathbf{x} = \chi (\mathbf{X}, t)\). These points are defined uniquely by a position vector in a given coordinate system (Fig. 1). Since \(\mathbf{x}\) is a vector, \(\chi\) is a vector function. We refer to \(\mathbf{X}\) as a material point and to \(\mathbf{x}\) as a spatial point. A field is a function assigned to each of these points in space. It can be scalar, vector or tensor valued. The gradient of a vector field is a second-order tensor field, that is, at any point, a matrix whose entries are defined by the derivatives of the three vector field components with respect to the three space coordinates. Therefore, the material gradient of the deformation function, given by the operator \(\nabla\), is the deformation gradient, \(\mathbf{F}(\mathbf{X},t)\), defined as

$$\begin{aligned}&\mathbf{F}(\mathbf{X},t) = \nabla \mathbf{x}(\mathbf{X},t),\quad \text {where} \end{aligned}$$
(4)
$$\begin{aligned}&F_{ij} = \frac{\partial x_i}{\partial X_j} \end{aligned}$$
(5)

are the components of \(\mathbf{F}\), \(i = 1, 2\) or 3 and \(j = 1, 2\) or 3.

Fig. 1
figure 1

Mapping material points of the reference configuration \(\mathbb {B}\) to spatial points in the spatial configuration \(B_t\)

The partial derivative of the deformation function with respect to time defines the velocity field, that is,

$$\begin{aligned}\frac{\partial }{\partial t}{\chi }(\mathbf{X}, t)=\frac{\partial }{\partial t}{} \mathbf{x}(\mathbf{X}, t)=\dot{\mathbf{x}}(\mathbf{X},t)=\dot{\mathbf{x}}(\chi ^{-1}(\mathbf{x},t),t)=\dot{\mathbf{x}}(\mathbf{x},t).\end{aligned}$$

Then, we assign every spatial point a velocity vector, \(\dot{\mathbf{x}}(\mathbf{x},t)\). Furthermore, the spatial gradient of the velocity field \(\dot{\mathbf{x}}(\mathbf{x},t)\) defines the velocity gradient \(\nabla \dot{\mathbf{x}}(\mathbf{x},t)\), which is a tensor field, just like the deformation gradient. Like any other tensor field, the velocity gradient can be decomposed into two additive components: the symmetric part \(\mathbf{D}\) and the skew part \(\mathbf{W}\). Thus,

$$\begin{aligned} \nabla \dot{\mathbf{x}}(\mathbf{x},t) = \mathbf{D}(\mathbf{x},t) + \mathbf{W}(\mathbf{x},t). \end{aligned}$$
(6)

When \(\nabla \dot{\mathbf{x}}(\mathbf{x},t) = \mathbf{W}(\mathbf{x},t)\), the motion is said to be rigid, whereas when \(\nabla \dot{\mathbf{x}}(\mathbf{x},t) = \mathbf{D}(\mathbf{x},t)\), the motion is said to be a pure stretch [3]. The velocity field for rigid motion at a point \(\mathbf{x}\) is linearly related to the velocity at any point \(\mathbf{y}\) according to

$$\begin{aligned} \dot{\mathbf{x}}(\mathbf{x},t) = \dot{\mathbf{x}}(\mathbf{y},t) + \mathbf{w}(t)\times (\mathbf{x}-\mathbf{y}), \end{aligned}$$
(7)

where \(\mathbf{w}(t)\) is the axial vector of the skew tensor field \(\mathbf{W}\). The pure stretch velocity field has the form

$$\begin{aligned} \dot{\mathbf{x}}(\mathbf{x},t) = \left[ \sum ^3_{i=1}\lambda _i(\mathbf{e_i\otimes \mathbf{e}_i})\right] (\mathbf{x}-\mathbf{y}), \end{aligned}$$
(8)

where \(\lambda _i\), for \(i=1,2,3\), are the the symmetric tensor field \(\mathbf{D}\) eigenvalues and \(\mathbf{e}_i\) are the principal directions. This means that the symmetric tensor can be diagonalized, and each component in the main diagonal corresponds to one of the \(\lambda _i\). This is called the spectral theorem [3]. Pure stretches conserve both the linear and angular momenta of the body.

Continuum mechanics balance equations

Balance equations may be written for any additive property defined by a scalar, vector or tensor field in a continuous body. If \(\varPhi\) is such quantity, with \(\varphi\) being its volumetric density, the global and local balance equations for a body portion \(\mathcal {P}\) at time t are respectively

$$\begin{aligned}&\frac{{\mathrm{d}}{\varPhi }}{{\mathrm{d}}{t}}({{\mathcal {P}},t}) = \varPsi _{ {\partial {\mathcal {P}}}}({\mathcal {P}},t) + \varPsi _{\mathcal {P}}({\mathcal {P}},t),\quad \text {and} \end{aligned}$$
(9)
$$\begin{aligned}&\frac{\partial \varphi }{\partial t}(\mathbf{x},t) + {\text {div}}(\varphi \otimes \dot{\mathbf{x}}(\mathbf{x}, t) - {{\varvec{\psi }}_{\varphi }}(\mathbf{x}, t)) - \sigma _{\varphi }(\mathbf{x}, t) = 0. \end{aligned}$$
(10)

Here, \(\varPsi _{\partial P}\) is the total flux of the quantity across the boundary \(\partial \mathcal {P}\), \(\varPsi _{\mathcal {P}}\) is the total production or destruction of the quantity inside the body portion \(\mathcal {P}\), \(\varvec{\psi }_{\varphi }\) is the quantity flux superficial density at point \(\mathbf{x}\), and \(\sigma _{\varphi }\) is the quantity production or destruction volumetric density at point \(\mathbf{x}\), all them at time t.

The product \(\otimes\) depends on the nature of the field. If \(\varphi\) is a scalar field, \(\otimes\) is just a scalar multiplication. If \(\varphi\) is a vector field, \(\otimes\) is a tensor product. If \(\varphi\) is a second-order tensor, \(\otimes\) is another kind of product. For our purposes, we consider local balance equations only as well as scalar and vector fields \(\varphi\) only [6]. Thus, we may plug different fields into Eq. 10 to obtain local balance equations for different quantities. The operator \(\text {div}\) is the divergence operator, which is defined for vector and tensor fields. For a vector field \(\mathbf{v}\), its divergence is the scalar field \(\text {div}{} \mathbf{v} = \sum ^3_{i=1} \frac{\partial v_i}{\partial x_i}\), where \(v_i\) are the components of \(\mathbf{v}\) and \(x_i\) are the system coordinates. For a tensor field \(\mathbf{T}\), its divergence is a vector field \(\text {div}{} \mathbf{T}\) whose components in the orthogonal directions of the system coordinates \(x_1\), \(x_2\) and \(x_3\) are \(\sum ^3_{j=1}\frac{\partial T_{1j}}{\partial x_j}\)\(\sum ^3_{j=1}\frac{\partial T_{2j}}{\partial x_j}\)  and  \(\sum ^3_{j=1}\frac{\partial T_{3j}}{\partial x_j}\), respectively, and \(T_{ij}\) is the tensor \(\mathbf{T}\) element at row i and column j of the nine-element square matrix that represents the tensor.

Mass balance

As stated earlier, a body is considered a fixed amount of matter contained in a region of space of variable volume. This means that the total mass of a body is considered constant in time, but not its density. For the mass balance, we choose \(\varphi = \rho\), which is the volumetric density of mass, and both \({\varvec{\psi }}_{\varphi } = \mathbf{0}\) and \(\sigma _{\varphi } = 0\) as a consequence of the conservation of mass, that is, mass cannot flow through the boundaries or be created/destroyed. Then, Eq. 10 becomes

$$\begin{aligned} \frac{\partial \rho }{\partial t}(\mathbf{x},t) + {\text {div}}(\rho \dot{\mathbf{x}}(\mathbf{x},t)) = 0. \end{aligned}$$
(11)

Equation 11 is named the continuity equation.

Linear momentum balance

For the linear momentum balance, we choose

$$\begin{aligned} \varphi (\mathbf{x},t)&= \rho \dot{\mathbf{x}}(\mathbf{x},t),\\ \varvec{\psi }_{\varphi }(\mathbf{x},t)&= \mathbf{T}(\mathbf{x},t),\ \text {and} \\ \sigma _{\varphi }(\mathbf{x},t)&= \rho \mathbf{b}(\mathbf{x},t), \end{aligned}$$

where \(\mathbf{T}\) is the Cauchy stress tensor and \({\rho }{} \mathbf{b}\) are the body forces, that is, the volumetric density of forces production or destruction. The Cauchy stress tensor maps the normal vector \(\mathbf{n}\) at any given point on a surface to the surface traction \(\mathbf{t}\), which is force per unit area. That is, \(\mathbf{t} = \mathbf{Tn}\). Thus, the local linear momentum balance becomes

$$\begin{aligned} \frac{\partial \rho \dot{\mathbf{x}}}{\partial t}(\mathbf{x},t)+{\text {div}}(\rho \dot{\mathbf{x}}(\mathbf{x},t)\otimes \dot{\mathbf{x}}(\mathbf{x},t)-\mathbf{T}(\mathbf{x},t))-\rho \mathbf{b}(\mathbf{x},t)=0, \end{aligned}$$
(12)

which is the well-known Cauchy equation of motion. It relates to the motion of the body for a given state of stress. By imposing symmetry on the tensor field T, Eq. 12 also implies the local angular momentum balance [6].

Note that forces acting upon a real body will always change its momenta (linear or angular, or both momenta) simultaneously and cause a body distortion that does not alter such momenta, that is, a pure stretch. Therefore, forces that change the linear momentum, as well as forces that do not alter it, may be produced or destroyed and are considered by \({\rho }{} \mathbf{b}\). Obviously, the production or destruction of the second ones does not influence the linear momentum volumetric density, \(\rho \dot{\mathbf{x}}(\mathbf{x},t)\).

Balance of the momentum derived kinetic energy

Considering the local linear momentum balance, given by Eq. 12, it is possible to obtain a balance like equation for the corresponding kinetic energy, which we call the momentum derived kinetic energy,

$$\begin{aligned} \frac{\rho }{2}\frac{{\mathrm{d}}{(\dot{\mathbf{x}}\cdot \dot{\mathbf{x}})}}{{\mathrm{d}}{t}}(\mathbf{x}, t) = {\text {div}(\mathbf{T\dot{x}})}(\mathbf{x}, t) + \rho \dot{\mathbf{x}}\cdot \mathbf{b}(\mathbf{x}, t) - \mathbf{T}:\nabla \dot{\mathbf{x}}(\mathbf{x}, t). \end{aligned}$$
(13)

For this equation, we recognize the balance terms

$$\begin{aligned} \varphi (\mathbf{x}, t)&= \frac{\rho }{2}\dot{\mathbf{x}}(\mathbf{x}, t)\cdot \dot{\mathbf{x}}(\mathbf{x}, t),\\ \varvec{\psi }_{\varphi }(\mathbf{x}, t)&= \mathbf{T}\dot{\mathbf{x}}(\mathbf{x}, t),\ {\text {and}}\\ \sigma _{\varphi }(\mathbf{x}, t)&= \rho \dot{\mathbf{x}}\cdot \mathbf{b}(\mathbf{x}, t) - \mathbf{T}:\nabla \dot{\mathbf{x}}(\mathbf{x}, t). \end{aligned}$$

To explain what the \(\mathbf{T}:\nabla \dot{\mathbf{x}}\) term means, suppose a matrix obtained by interchanging rows and columns of that one representing the tensor \(\mathbf{T}\), named the transposed matrix of \(\mathbf{T}\). Multiply this transposed matrix to the one representing the tensor \(\nabla \dot{\mathbf{x}}\), keeping the matrix for \(\nabla \dot{\mathbf{x}}\) on the right side. Then, sum the diagonal terms of the obtained product matrix. That is the scalar \(\mathbf{T}:\nabla \dot{\mathbf{x}}\) value.

Note that, because Eq. 13 comes from the local linear momentum balance and for a symmetric \(\mathbf{T}\) it also implies the local angular momentum balance, this equation just considers forces that are able to alter the linear or angular momentum of the body, or both. Thus, the corresponding kinetic energy volumetric density time rate cannot include the production or destruction of forces that do not alter both linear and angular momenta. This exclusion is provided by extracting the term \(\mathbf{T}:\nabla \dot{\mathbf{x}}(\mathbf{x}, t)\) from \(\rho \dot{\mathbf{x}}\cdot \mathbf{b}(\mathbf{x}, t)\). In this context, it is worth remembering that the kinetic energy involves the sum of non-negative velocity quadratic terms, whereas for the linear momentum only linear velocity terms are summed, which may cancel each other.

Total energy balance

For the total energy, we choose

$$\begin{aligned} \varphi (\mathbf{x},t)&= \rho \left(\frac{1}{2}\dot{\mathbf{x}}\cdot \dot{\mathbf{x}} + \gamma \right) (\mathbf{x},t), \\ \varvec{\psi }_{\varphi }(\mathbf{x},t)&= \mathbf{T}\dot{\mathbf{x}}(\mathbf{x}, t) - \mathbf{q}(\mathbf{x}, t),\ \text{ and }\\ \sigma _{\varphi }(\mathbf{x},t)&= \rho (r + \dot{\mathbf{x}}\cdot \mathbf{b})(\mathbf{x}, t), \end{aligned}$$

where \(\frac{\rho }{2}\dot{\mathbf{x}}\cdot \dot{\mathbf{x}}\) and \(\rho \gamma\) are the energy volumetric densities, respectively, for the momentum derived kinetic energy and complementary (total less momentum derived) energy. The quantity \(\mathbf{q}\) is the vectorial heat flux superficial density and the scalar \({\rho }r\) is the thermal energy source or sink volumetric density. Therefore, the total energy balance becomes

$$\begin{aligned}& \frac{\partial }{\partial t}\rho \left(\frac{1}{2}\dot{\mathbf{x}}\cdot \dot{\mathbf{x}} + {\gamma }\right)(\mathbf{x},t)+\text {div}\left(\rho (\frac{1}{2}v^2 + {\gamma }\right)\dot{\mathbf{x}}(\mathbf{x},t)\nonumber \\& -\mathbf{T}\dot{\mathbf{x}}(\mathbf{x}, t) + \mathbf{q}(\mathbf{x}, t))-\rho (r + \dot{\mathbf{x}}\cdot \mathbf{b})(\mathbf{x}, t) =0. \end{aligned}$$
(14)

Complementary energy balance

We consider a body having only the momentum derived kinetic energy and the complementary one, the total energy being the sum of both. Then, subtracting the momentum derived kinetic energy balance Eq. 13 from the the total energy balance Eq. 14, we obtain the complementary energy balance equation for a continuum body, that is,

$$\begin{aligned} \rho \frac{{\mathrm{d}}{\gamma }}{{\mathrm{d}}{t}}(\mathbf{x},t) = -\text {div}(\mathbf{q})(\mathbf{x},t) + \rho r(\mathbf{x},t) + \mathbf{T}:\nabla {\dot{\mathbf{x}}}(\mathbf{x},t). \end{aligned}$$
(15)

For this equation, we recognize the balance terms

$$\begin{aligned} \varphi (\mathbf{x}, t)&= \rho \gamma (\mathbf{x}, t),\\ \varvec{\psi }_{\varphi }(\mathbf{x}, t)&= -\mathbf{q}(\mathbf{x}, t)\quad {\text {and}}\\ \sigma _{\varphi }(\mathbf{x}, t)&= \rho r(\mathbf{x}, t) + \mathbf{T}:\nabla \dot{\mathbf{x}}(\mathbf{x}, t). \end{aligned}$$

Internal and rigid motion kinetic energies for a system of particles

Rigid motion kinetic energy (\(E_{\text {rig}}\))

A rigid motion of the system cannot change the distances between the particles and sub-particle centers of mass. It is thought that this is because the system moves as a whole and the particles and sub-particles are carried along with it (compare to continuum mechanics Eq. 7). The kinetic energy associated with this kind of motion is called rigid motion kinetic energy, \(E_\text {rig}\). This energy can change only by means of exchanging work to the system surroundings, \(W_\text {rig}\), and never by exchange of heat, because it is not possible to translate or rotate a system by homogeneously heating or cooling it.

Internal energy (U)

The internal energy of the system is the sum, over all its particles, of the total (kinetic and potential) energy of each particle motion and its corresponding sub-particle motions, subtracted from the system energy, \(E_\text {rig}\). For example, suppose the particles are molecules. One can consider the movement energy of the molecules, the atoms that constitute the molecules, as well as electronic, nuclear and sub-nuclear movements energies. However, internal energy can change both with the exchange of heat to the system surroundings (by conduction, Q) or a mathematically well-defined work that does not cause rigid motion on the system, W (see Eq. 1). Such exchanges do not alter sub-particle motions. Therefore, these motions correspond to a constant term inside the internal energy, which vanishes with the variation of internal energy.

Energy balance

Since the system only has the \(E_\text {rig}\) and U energies, and the system can exchange energy to its surroundings by means of heat and work only, the system total energy change from an initial time to a given time t is

$$\begin{aligned} \Delta U(t) + \Delta E_\text {rig}(t) = Q(t) + W_{\text {tot}}(t), \end{aligned}$$
(16)

where the total work \(W_\text {tot}(t)\) exchanged along this time interval is an additive term formed by the work W(t) that is converted into internal energy and the quantity \(W_\text {rig}(t),\), which is converted into rigid motion kinetic energy, that is,

$$\begin{aligned} W_\text {tot}(t) = W_\text {rig}(t) + W(t). \end{aligned}$$
(17)

Note that we defined the system of particle rigid motion and internal energies in terms of movements, that is, in terms of temporal derivatives, such that Eqs. 16 and 17 explicitly depend on time. This allows comparisons to continuum mechanics equations.

System of particles: first law and continuum mechanics

Imposing time dependence to Eq. 1, it can be written as

$$\begin{aligned} \Delta U(t) = Q(t) + W(t). \end{aligned}$$
(18)

Thus, analogously to the subtraction of Eq. 13 from Eq. 14 to obtain Eq. 15, which is the complementary energy balance, subtracting the equality \(\Delta E_\text {rig}(t)=W_\text {rig}(t)\) from Eq. 16 and considering Eq. 17, the first law of thermodynamics is obtained (Eq. 18). We can also write the first law by deriving Eq. 18 with respect to time, that is, in terms of powers. Then,

$$\begin{aligned} \frac{{\mathrm{d}}{U}}{{\mathrm{d}}{t}}(t) = \mathcal {H}(t) + P(t), \end{aligned}$$
(19)

where \(\mathcal {H}(t)=\frac{{\mathrm{d}}{Q}}{{\mathrm{d}}{t}}\) and \(P(t)=\frac{{\mathrm{d}}{W}}{{\mathrm{d}}{t}}\).

Note that, V being the body volume, the complementary power of the body at time t is

$$\begin{aligned} \frac{{\mathrm{d}}{\Gamma }}{{\mathrm{d}}{t}}(t)=\int _{V}\rho \frac{{\mathrm{d}}{\gamma }}{{\mathrm{d}}{t}}(\mathbf{x},t)\, \mathrm {d}V. \end{aligned}$$
(20)

Thus, integrating over the body volume the complementary energy balance equation for the continuous body (Eq. 15) and subtracting the integrated equation from the internal energy power equation (Eq. 19), by considering no heat exchange and no thermal energy source or sink (\(\mathcal {H}=0\), \(\mathbf{q} = \mathbf{0}\) and \(r = 0\)), we notice that

$$\begin{aligned} \frac{{\mathrm{d}}{U}}{{\mathrm{d}}{t}}(t) - \frac{{\mathrm{d}}{\Gamma }}{{\mathrm{d}}{t}}(t) = P(t) - \int _{V}\mathbf{T}:\nabla {\dot{\mathbf{x}}}(\mathbf{x},t)\,\mathrm {d}V. \end{aligned}$$

Therefore, the complementary and internal energies are the same if and only if the power P(t) equals the integral \(\int _{V}\mathbf{T}:\nabla {\dot{\mathbf{x}}}(\mathbf{x},t)\,\mathrm {d}V\). Because a continuous body is a mathematical model for the real physical system, which ultimately is a system of particles, it is expected that the complementary and internal energies are the same.

Considering that \(\mathbf{T}\) is a symmetric tensor field, it follows that the product \(\mathbf{T}:\nabla {\dot{\mathbf{x}}} = \mathbf{T}:\mathbf{D}\), because \(\mathbf{T}:\nabla {\dot{\mathbf{x}}} = \mathbf{T}:(\mathbf{D}+\mathbf{W})\) and \(\mathbf{T}:\mathbf{W} = 0\), since \(\mathbf{W}\) is skew. Thus, \(P(t)=\int _{V}{} \mathbf{T}:\mathbf{D}(\mathbf{x}, t)\,\mathrm {d}V\). Then, remembering that the symmetric part of the velocity gradient, \(\mathbf{D}\), is related to motions that conserve both linear and angular momenta (subsection 1.2), we confirm that \(P(t)\) cannot change such momenta, as expected. Moreover, bodies in an isotropic state of stress display \(\mathbf{T}=-p\mathbf{1}\), where \(p\) is the scalar pressure and \(\mathbf{1}\) is the unit tensor, while \(\text {div}(\dot{\mathbf{x}})(\mathbf{x},t)=0\) if the body volume cannot change [5]. Thus, \(\mathbf{T}:\nabla {\dot{\mathbf{x}}}=0\) for constant volume bodies in isotropic state of stress. Then, as well as mass, linear and angular momentum balances refer to the corresponding conservation laws, and there is a conservation law for the internal energy.