Prerequisite concepts
In each coordinate system, there exists a formula for the divergance. The standard examples are: \[\begin{align}\vec\nabla\cdot\vec v &= \frac{\partial v_x}{\partial x} + \frac{\partial v_y}{\partial y}+\frac{\partial v_z}{\partial z} \text{ in rectangular coodinates} \\ \vec\nabla\cdot\vec v &= \frac{1}{s}\frac{\partial \left(s v_s\right)}{\partial s} + \frac{1}{s}\frac{\partial v_\phi}{\partial \phi}+\frac{\partial v_z}{\partial z} \text{ in cylindrical coodinates} \\ \vec\nabla\cdot\vec v &= \frac{1}{r^2}\frac{\partial \left(r^2 v_r\right)}{\partial r} + \frac{1}{r \sin(\theta)}\frac{\partial \left(\sin(\theta)\ v_\theta\right)}{\partial \theta}+\frac{1}{r \sin(\theta)}\frac{\partial v_\phi}{\partial \phi} \text{ in spherical coodinates}\end{align}\]
Components of the Divergence
For each partial derivative term in the divergence (in orthogonal coordinate systems), the direction of the component involved and the direction of the change agree (e.g. the $\textbf{x}$'s match in $\frac{\partial v_\textbf{x}}{\partial \textbf{x}}$.)