MHD Energy Equation derivation I'm trying to go through a derivation for the energy equation in MHD in terms of partial derivatives, but I've hit a bit of a wall. 
I start with the equation
$$\frac{d}{dt}\left(\frac{p}{\rho^{\gamma}}\right) = 0$$ 
and need to end up with it in the following format
$$\frac{\partial p}{\partial t}+\mathbf{v} \cdot \nabla p-c_{s}^{2}\left(\frac{\partial \rho}{\partial t}+\mathbf{v} \cdot \nabla \rho\right)=0$$
where,
$$c_{s}^{2}=\frac{\gamma p_{0}}{\rho_{0}}=\frac{\gamma k_{B} T_{0}}{m}$$
by using the material time derivative
$$\frac{d}{d t} \equiv \frac{\partial}{\partial t}+\mathbf{v} \cdot \nabla$$
I really am not too sure how to get from the first equation to the second. Would appreciate some help
 A: Let's start with the adiabatic energy equation,
$$\frac{\text{D}}{\text{D}t}\left(\frac{p}{\rho^\gamma}\right) = 0,$$
where $\text{D}/\text{D}t$ is the material derivative. The eulerian form of the previous equation is
$$\frac{\partial}{\partial t}\left(\frac{p}{\rho^\gamma}\right) + \mathbf{v}\cdot\nabla\left(\frac{p}{\rho^\gamma}\right) = 0.$$ 
The change rule provides
$$\frac{1}{\rho^\gamma}\left(\frac{\partial p}{\partial t} + \mathbf{v}\cdot\nabla p\right) + p\left(\frac{\partial}{\partial t}\left(\frac{1}{\rho^\gamma}\right) + \mathbf{v}\cdot\nabla\left(\frac{1}{\rho^\gamma}\right)\right) = 0,$$
and multiplying by $\rho^\gamma$,
$$\frac{\partial p}{\partial t} + \mathbf{v}\cdot\nabla p + p\left(\rho^\gamma\frac{\partial}{\partial t}\left(\frac{1}{\rho^\gamma}\right) + \mathbf{v}\cdot\rho^\gamma\nabla\left(\frac{1}{\rho^\gamma}\right)\right) = 0.$$
Both time derivative and gradient can be written as
$$\rho^\gamma\frac{\partial}{\partial t}\left(\frac{1}{\rho^\gamma}\right) = -\frac{\gamma}{\rho}\frac{\partial\rho}{\partial t},$$
$$\rho^\gamma\nabla\left(\frac{1}{\rho^\gamma}\right) = -\frac{\gamma}{\rho}\nabla\rho.$$
Finally, plugging them into the last equation,
$$\frac{\partial p}{\partial t} + \mathbf{v}\cdot\nabla p - c_s^2\left(\frac{\partial\rho}{\partial t} + \mathbf{v}\cdot\nabla\rho\right) = 0.$$
where $c_s^2 = \gamma p/\rho$. In addition, taking the continuity equation, i.e.
$$\frac{\partial\rho}{\partial t} + \nabla\cdot\left(\rho\mathbf{v}\right) = 0,$$
or
$$\frac{\partial\rho}{\partial t} + \mathbf{v}\cdot\nabla\rho = - \rho\nabla\cdot\mathbf{v},$$
the MHD energy equation is given by
$$\frac{\partial p}{\partial t} + \mathbf{v}\cdot\nabla p + \rho c_s^2\nabla\cdot\mathbf{v} = 0,$$
or in conservative form,
$$\frac{\partial \rho  p}{\partial t} + \nabla\cdot (\rho\mathbf{v}p) = -(\rho c_s)^2\nabla\cdot\mathbf{v}.$$
