Why is this true: $\nabla \cdot (S\cdot \vec v )=S:(\nabla \otimes \vec v)+\vec v \cdot (\nabla \cdot S)$? I am doing fluid mechanics and I don't understand a particular step that is being used.
It is the following step which I don't understand:
$\nabla \cdot (S\cdot \vec  v )=S:(\nabla \otimes \vec v)+\vec v \cdot (\nabla \cdot S)$
(In the above: $S$ is a matrix;  $:$ denotes a double contraction)
Can someone please provide me some background/ intuition why this is a logical step? 
 A: The notation is probably what's tripping you up.  Notation like this without indices can take some time to get used to, but it's clear that what's intended is something like (in Einstein notation)
$$\partial_i ({S^i}_j v^j) = {S^i}_j (\partial_i v^j) + v^j (\partial_i {S^i}_j)$$
It should be more readily apparent that this is just an application of the product rule.  Another way to denote what's going on without resorting to some kind of index notation is to use some marking to denote the "scope" of differentiation.  Let $S$ be a vector-valued linear function of a vector.  Then we could write the equation as
$$\nabla \cdot S(v) = S^T(\dot \nabla) \cdot \dot v + \dot S^T(\dot \nabla) \cdot v$$
where $S^T$ is the adjoint map (which uses the transpose matrix).  The overdots say "differentiate this and nothing else in this term" and accomplish what is needed here; each term differentiates only one of the matrix $S$ or the vector $v$, not both.
A: $
\def\c{\cdot}
\def\k{\otimes}
\def\n{\nabla}
\def\p{\partial}
$First calculate the differential of the expression
$$\eqalign{
d(S\c v) &= dS\c v + S\c dv \\&= dS\c v + dv\c S^T  \\
}$$
The substitution $\,(d \to \n\k)\;$ produces the gradient
$$\eqalign{
\n\k(S\c v) &= (\n\k S)\c v + (\n\k v)\c S^T  \\
}$$
Contracting with the identity matrix yields the divergence,
i.e. $\;I:(\n\k v)=\n\c v$
Therefore
$$\eqalign{
\n\c(S\c v) &= I:(\n\k(S\c v)) \\
 &= (I:\n\k S)\c v + I:((\n\k v)\c S^T)  \\
 &= (\n\c S)\c v + S:(\n\k v)  \\
}$$
The rules for rearranging terms in a double-contraction product of matrices are
$$\eqalign{
A:B &= B:A \\
A:B &= A^T:B^T \\
A:(BC) &= (AC^T):B &= (B^TA):C \\
}$$
which can be deduced by considering either definition of this product
$$\eqalign{
A:B \;=\; \sum_{i=1}^m\sum_{j=1}^n A_{ij}B_{ij} \;=\; {\rm trace}(A^TB) 
}$$
