# 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.