# Forms of the first law of thermodynamics

The first law of thermodynamics states that

$$\frac{D}{Dt}(K+U)=W+H,$$

where K is the kinetic energy, U is the internal energy, W is the power of the external forces and H is the heat flux. I have seen (in my textbook) how this was reduced to the local law

$$\rho\frac{De}{Dt}=\sigma:D-\nabla\cdot q+\rho\mathbb E,$$

where $\rho$ is the density, $e$ is the energy per unit mass, $\sigma$ is the stress tensor, $D$ is the rate of deformation tensor, $q$ is the heat flux vector, $\mathbb E$ is the internal heat generation per unit mass. And ":" is the double dot product.

I want to show that the above is equivalent to the following:

$$\rho\frac{D}{Dt}(e+\frac{v^2}{2})=\nabla\cdot(\sigma\cdot v)+\rho f\cdot v+\rho\mathbb E-\nabla\cdot q$$ Here, $v$ is the velocity and $f$ is the net body force per unit mass.

(The book is An Introduction to Continuum Mechanics by J. Reddy, a Cambrige edition.)

Just calculate the difference between the first and second equation you want to show to be equivalent. The difference should be $0=0$ if they're equivalent. You actually get: $$-\rho \frac{D}{Dt}(\frac{v^2}{2}) =\sigma:D-\nabla\cdot (\sigma\cdot v)-\rho f\cdot v$$ All the other terms agree.

The equation above really says $0=0$ because the terms may be matched one-by-one. First, $$-\rho \frac{D}{Dt}(\frac{v^2}{2}) =-\rho v\cdot \frac{D}{Dt}v = -\rho v\cdot f$$ because the net body force per unit mass $f$ may be written as $a$ which is just $F=ma$ calculated per unit mass. And $Dv/Dt =a$. So the left hand side is equal to the last term of the right hand side.

Similarly, $$\sigma:D = \nabla\cdot (\sigma\cdot v)$$ so the first two terms of the right hand side cancel, too. This identity is a bit more subtle but at least schematically, the rate of the deformation tensor $D$ is also related to some spatial derivative of the velocity, $\nabla v\sim \nabla (D/Dt)x\sim (D/Dt)\nabla x\sim D$, with some proper contractions. Both terms are linear in $\sigma$. In the sequence of derivations, note that the deformation is measured from the tensor components of $\nabla x$ of a sort (how much the dislocation in meters depends on the position in meters: that's how you get the deformation; and it's differentiated because it's the rate).

It's a bit confusing that $\sigma$ is $\nabla$ differentiated on one side but not the other but some continuity equation for the stress tensor will deal with that... (The extra term that may appear in this continuity equation for the stress tensor is probably what converts a partial derivative to the "total" time derivative, something I neglected above, too.) This answer admits that it's not complete but I believe that the textbook on mechanics has to have the detailed description of all the steps sketched above somewhere.

Let's start from

$$\rho\frac{De}{Dt}=\sigma:\mathbf{D}-\nabla\cdot \mathbf{q}+\rho\mathbb E$$

$$\mathbf{D}$$ is the rate of deformation tensor, and it was previously (in the same book) defined as

$$\mathbf{D}=\frac{1}{2}[\nabla \mathbf{v}+(\nabla \mathbf{v})^T]$$

Then

$$\mathbf{\sigma}:\mathbf{D}=\frac{1}{2}\mathbf{\sigma}:\nabla \mathbf{v}+\frac{1}{2}\mathbf{\sigma}:\nabla \mathbf{v}^T=\frac{1}{2}\mathbf{\sigma}:\nabla \mathbf{v}+\frac{1}{2}\mathbf{\sigma}^T:\nabla \mathbf{v}=\frac{1}{2}\mathbf{\sigma}:\nabla \mathbf{v}+\frac{1}{2}\mathbf{\sigma}:\nabla \mathbf{v}=\mathbf{\sigma}:\nabla \mathbf{v}$$

Where second passage is made possible by this identity of double dot product, and third passage by the conservation of angular momentum which implies $$\sigma=\sigma^T$$

Conservation of linear momentum instead gives

$$(\nabla\cdot\sigma)+\rho\mathbf{f}=\rho\frac{D\mathbf{v}}{Dt}$$

Multiplying each side scalarly by $$\mathbf{v}$$ we have

$$(\nabla\cdot\sigma)\cdot\mathbf{v}+\rho\mathbf{f}\cdot\mathbf{v}=\rho\frac{D\mathbf{v}}{Dt}\cdot\mathbf{v}=\rho\frac{1}{2}\frac{D(\mathbf{v}\cdot\mathbf{v})}{Dt}=\frac{1}{2}\rho\frac{Dv^2}{Dt}$$

Adding this to starting equation and substituting what we have found for $$\sigma:\mathbf{D}$$ term, we get

$$\rho\frac{D}{Dt}(e+\frac{v^2}{2})=\mathbf{\sigma}:\nabla \mathbf{v}+(\nabla\cdot\sigma)\cdot\mathbf{v}+\rho\mathbf{f}\cdot\mathbf{v}-\nabla\cdot \mathbf{q}+\rho\mathbb E$$

Considering that

$$\nabla\cdot(\sigma\cdot\mathbf{v})=(\nabla\cdot\sigma)\cdot\mathbf{v}+\sigma:\nabla\mathbf{v}$$

We obtain

$$\rho\frac{D}{Dt}(e+\frac{v^2}{2})=\nabla\cdot(\sigma\cdot\mathbf{v})+\rho\mathbf{f}\cdot\mathbf{v}-\nabla\cdot \mathbf{q}+\rho\mathbb E$$

Which is the formulation we aimed to reach