The text is somewhat confusing (or at least the parts you have posted are without their surrounding context).
There are two ways of describing fluid flows:
- The more widely used Eulerian specification describes the fluid by the instantaneous velocity [itex]\mathbf{v}[/itex] of the fluid element which at time [itex]t[/itex] is at position [itex]\mathbf{x}[/itex]. As time changes, different fluid elements will occupy this position. The independent variables are [itex]\mathbf{x}[/itex] and [itex]t[/itex].
- The Lagrangian specification, used in the post in question, describes the fluid by the position [itex]\mathbf{x}[/itex] at time [itex]t[/itex] of the fluid element originally at position [itex]\mathbf{X}[/itex]. The independent variables are [itex]\mathbf{X}[/itex] and [itex]t[/itex].
The two specifications are related by [tex]
\mathbf{v}(\mathbf{x}(\mathbf{X},t),t) = \left.\frac{\partial \mathbf{x}}{\partial t}\right|_{(\mathbf{X},t)}.[/tex]
The material derivative [tex]
\frac{D}{Dt} = \frac{\partial}{\partial t}+ \mathbf{v} \cdot \nabla[/tex] is relevant to the Eulerian specification, in which
partial differentiation with respect to time is at a fixed position occupied by successive different fluid elements. Finding the rate of change with respect to time experienced by a particular fluid element requires the addition of the advective [itex]\mathbf{v} \cdot \nabla[/itex] term. (To be clear, the spatial derivative is with respect to [itex]\mathbf{x}[/itex].) But in the Lagrangian specification, which the text is using here, a particular fluid element is labelled by its initial position [itex]\mathbf{X}[/itex], and
partial differentiation with respect to time
holding [itex]\mathbf{X}[/itex] constant does "follow the fluid" without the need for an advective term.
The complication here is that when the author writes [itex]\theta = \nabla \cdot \mathbf{v}[/itex] they apparently intend differentiation not with respect to the initial position [itex]\mathbf{X}[/itex] but with respect to the current position [itex]\mathbf{x}[/itex]. Allowing for this and using the normal partial time derivative yields the result (at least in the 2D case, which is the only case I could be bothered to check).
Starting with
@Mark44's expression for [itex]J[/itex] you can take the partial derivative with respect to time and then simplify some terms using [tex]
\frac{\partial^2 x_i}{\partial X_j\,\partial t} = \frac{\partial v_i}{\partial X_j}[/tex] since in the Lagrangian specificattion the velocity field is just the partial derivative of the current position with respect to time. You can then use the chain rule [tex]
\frac{\partial v_i}{\partial X_j} = \sum_k \frac{\partial v_i}{\partial x_k} \frac{\partial x_k}{\partial X_j}[/tex] and you will find some terms will cancel, giving a result equal to [tex]
J \theta = J \sum_i \frac{\partial v_i}{\partial x_i}.[/tex]