I'm trying to follow the book Turbulence by Davidson. Currently I'm having trouble in converting the differential NS equation to its integral form but I cannot see clearly how the Divergence theorem is applied to obtain it.
Given that the NS equation is:
$$\frac{Du}{Dt} =\frac{\partial u}{\partial t} + (u\cdot\nabla)u= -\nabla\left(\frac{P}{\rho}\right) + \nu\nabla^2u $$
And knowing that the divergence theorem gives
$$\oint F\cdot dS = \iiint \nabla\cdot F\,dV$$
Therefore the integral form will be:
$$ \frac{\partial }{\partial t} \iiint \rho u_i\,dV = -\oint u_i(\rho u\cdot dS) - \oint PdS +\text{viscous term}$$
I've been trying for hours to convert $ \iiint(u\cdot \nabla)u\,dV$ to $\oint u_i(\rho u\cdot dS) $ but I just can't seem to get it.
I have found that there is an identity:
$$\rho u\cdot\nabla u + \rho u \nabla\cdot u = \nabla\cdot(\rho u u ) $$
from this Physics Forums thread, but I have no idea where it comes from.
and since mass is conserved, it becomes
$$\rho u\cdot\nabla u = \nabla\cdot(\rho u u ) $$
so I've basically focused my attention on trying to convert $\nabla\cdot(\rho u u ) $ to $\oint u_i(\rho u\cdot dS)$ but my question is how come one of the $u$ can be broken off and placed at the front with the subscript $i$ and why is it $(pu\cdot dS)$ and not $(puu\cdot dS)$ instead?