Gauss Divergence Theorem relates the flux of a vector field through a closed surface to the divergence of the field in the volume enclosed.
In vector calculus, the divergence theorem, also known as Gauss's theorem or Ostrogradsky's theorem, is a result that relates the flux of a vector field through a closed surface to the divergence of the field in the volume enclosed.
More precisely, the divergence theorem states that the surface integral of a vector field over a closed surface, which is called the flux through the surface, is equal to the volume integral of the divergence over the region inside the surface. Intuitively, it states that the sum of all sources of the field in a region (with sinks regarded as negative sources) gives the net flux out of the region.
The divergence theorem is an important result for the mathematics of physics and engineering, in particular in electrostatics and fluid dynamics.
In physics and engineering, the divergence theorem is usually applied in three dimensions. However, it generalizes to any number of dimensions. In one dimension, it is equivalent to integration by parts. In two dimensions, it is equivalent to Green's theorem.
Suppose $V$ is a subset of $\mathbb {R} ^{n}$ (in the case of $n = 3$, $V$ represents a volume in three-dimensional space) which is compact and has a piecewise smooth boundary $S$ (also indicated with $\partial V = S$). If $\mathbf {F}$ is a continuously differentiable vector field defined on a neighborhood of $V$, then:
$$ \iiint _ {V}\left(\mathbf {\nabla } \cdot \mathbf {F} \right)\ dV = \oint _ S (\mathbf {F} \cdot \mathbf {n} )\ dS \text . $$
The left side is a volume integral over the volume $V$, the right side is the surface integral over the boundary of the volume $V$. The closed manifold $\partial V$ is oriented by outward-pointing normals, and $\mathbf {n}$ is the outward pointing unit normal at each point on the boundary $\partial V$. ($d\mathbf {S}$ may be used as a shorthand for $\mathbf {n} dS$.) In terms of the intuitive description above, the left-hand side of the equation represents the total of the sources in the volume $V$, and the right-hand side represents the total flow across the boundary $S$.
Source: Wikipedia