Question: Continuum expression of first law of thermodynamics:

$$\frac{D E\_t}{D t}=\nabla\cdot({\bf \sigma\cdot v}) - \nabla\cdot{\bf q}$$

(I've seen it in my physics book)

How this equation is derived?

---

Where the $\bf q$ is Heat flux vector, $\sigma$ is stress tensor and $\bf v$ is velocity vector field.

(First law of thermodynamics:
$$\frac{DE\_t}{D t}=\frac{D W}{D t}+\frac{D Q}{D t}$$)

Answer: 
The starting point for the development of this equation is an energy balance on a fixed control volume of fluid:
$$\int{\frac{\partial E}{\partial t}dV}=-\int{E(\vec{v}\cdot \vec{n})dA}+\int{(\vec{v}\cdot \vec{\sigma} \cdot \vec{n})dA}-\int{\vec{q}\cdot\vec{n}}dA$$
where dV is differential volume, dA is differential surface of the control volume, and $\vec{n}$ is a unit outwardly directed normal from the control volume at its surface. The term on the left hand side represents the rate of change of energy within the control volume. The first integral on the right hand side represents the net rate at which energy is leaving the control volume by by flow into and out of the control volume. The second integral on the right hand side represents the rate at which the surroundings are doing work on the material on the control volume. The third integral on the right hand side represents the rate at which heat is leaving the control volume. If we apply the divergence theorem to the area integrals on the right hand side, we obtain:
$$\int{\left(\frac{\partial E}{\partial t}+\nabla \cdot(E\vec{v})\right)dV}=\int{(\nabla \cdot{(\vec{\sigma}\cdot \vec{v})}-\nabla \cdot \vec{q})}dV$$
This then yields:$$\frac{\partial E}{\partial t}+\nabla \cdot(E\vec{v})=\nabla \cdot{(\vec{\sigma}\cdot \vec{v})}-\nabla \cdot \vec{q}\tag{1}$$
Eqn. 1 is identical to the relationship given in Transport Phenomena by Bird, Stewart, and Lightfoot, with$$E=\rho (u+\frac{v^2}{2}+\phi)$$where $\rho$ is the fluid density, u is the internal energy per unit mass, v is the magnitude of the velocity, and $\phi$ is the gravitational potential.

For an incompressible fluid, the left hand side reduces to:$$\frac{\partial E}{\partial t}+\nabla \cdot(E\vec{v})=\frac{\partial E}{\partial t}+\vec{v}\cdot \nabla E=\frac{DE}{Dt}$$

ALTERNATE METHOD:
An alternate method of arriving at these same results is to use a moving control volume (rather than a fixed control volum employed in the development above), which moves and deforms with the fluid, and which contains a fixed mass of fluid. So this system is essentially the closed system encountered is standard thermodynamics. The starting equation for this development is:
$$\frac{d}{dt}\left[\int{EdV}\right]=\dot{Q}-\dot{W}\tag{2}$$
where the left hand side is the rate of change of energy within the moving volume of fluid (system), $\dot{Q}$ is the rate of addition of heat to the system and $\dot{W}$ is the rate at which the system is doing work on the surroundings:
$$\dot{Q}=-\int{\vec{q}\cdot\vec{n}}dA$$
$$\dot{W}=-\int{(\vec{v}\cdot \vec{\sigma} \cdot \vec{n})dA}$$
If we apply the Reynolds Transport Theorem (i.e., the 3D generalization of the Leibnitz rule for differentiation under the integral sign) to the left hand side of Eqn. 2, we obtain:
$$\frac{d}{dt}\left[\int{EdV}\right]=\int{\frac{\partial E}{\partial t}dV}+\int{E(\vec{v}\cdot \vec{n})dA}$$
The remainder of the development is the same as above.
Ok, let's take the 1st law (in any reference frame) as
$$\frac{D}{Dt}E\_t(V) = P + Q $$
where $V$ is a part of the body, $P$ is the work rate by mechanical processes and $Q$ is the change of heat content. They will hopefully become more clear when I say how they can be calculated:
$$P= \int\_V dV \rho \vec{v} \vec{b} + \int\_{\partial V} da \vec{v} \mathbf{T}\vec{n}$$
Here $\vec{v}$ is the velocity field, $\vec{b}$ is any force having an effect on the bulk of the body, e.g. gravitation, $\rho$ is the density, \vec{n} is the surface normal and $\mathbf{T}$ is the total stress tensor (including pressure!). So there are two kind of force types working on the continuum assumed: forces that work on the surface of the body element in question and forces that work everywhere.
$$Q= \int\_V dV \rho r - \int\_{\partial V} da \vec{q} \vec{n}$$
Here $r$ is the body bulk heat production and $\vec{q}$ is the heat flux, the same principle as above applies.  

So the assumption in continuum mechanics is that there is no work rate source apart from $r$, $\vec{q}$, $\vec{b}$ and $\mathbf{T}$ - or, that any work rate source can be expressed as one of them.  

If we now apply Gauss' theorem to have only volume integrals and neglect $r$ and $\vec{b}$ and set $\mathbf{T} \approx \sigma$, we arrive at a local formula - exactly your formula above.  

Did your physics book say anything about assumptions or approximations?