While deriving the Euler's equations of motion in case of Fluid dynamics, I came across this part -
Here $p$ denotes the hydrostatic pressure(scalar function) I am unable to understand how it transformed this -
$\iint _{\Delta S} - p\hat{n}~ds = -\iiint_{\Delta V} \nabla p~dv$
It says its a consequence of Gauss Divergence theorem but I could try only the below -
$\iint _{\Delta S} - p\hat{n}~ds = \iiint _{\Delta V} \nabla\cdot(-p)~dv$ , but this seems wrong as how can i take the divergence of the scalar function?
Reference - Textbook of Fluid Dynamics by F. Chorlton, page 96, Euler's equation of motion
Apply the divergence theorem to the vector field $p\,\mathbf{i}$ where $\mathbf{i}$ is the unit basis vector pointing in the $x-$direction.
Noting that $\nabla \cdot (p \, \mathbf{i}) = \frac{\partial p}{\partial x},$ we have
$$\int_S p \,n_x\,dS=\int_S p \mathbf{i} \cdot \mathbf{n}\,dS=\int_V \frac{\partial p}{\partial x}\,dV$$
where $\mathbf{n} = n_x \mathbf{i} + n_y \mathbf{j} + n_z \mathbf{k}$ is the normal vector.
Repeat for $p \, \mathbf{j}$ and $p \,\mathbf{k}$. Multiply each result by the appropriate unit basis vector and sum to get
$$\int_S p \,\mathbf{n}\,dS\\= \int_S p(n_x \mathbf{i} + n_y \mathbf{j} + n_z \mathbf{k})\, dS \\=\left(\int_S p \,n_x\,dS\right) \mathbf{i} + \left(\int_S p \,n_y\,dS\right) \mathbf{j} + \left(\int_S p \,n_z\,dS\right) \mathbf{k} \\ =\left(\int_V \frac{\partial p}{\partial x}\,dV\right) \mathbf{i} + \left(\int_V \frac{\partial p}{\partial y}\,dV\right) \mathbf{j} + \left(\int_V \frac{\partial p}{\partial z}\,dV\right) \mathbf{k}\\ = \int_V \left(\frac{\partial p}{\partial x}\mathbf{i} + \frac{\partial p}{\partial y}\mathbf{j} + \frac{\partial p}{\partial z}\mathbf{k}\right) \, dV\\=\int_V \nabla p \,dV.$$
The general result -- of which the more familiar divergence theorem is a consequence -- is $$\int_V \partial_i f\, dV = \int_S f n_i \, dS$$