Surface integral
This illustration implies that if the vector field is tangent to S at each  point, then the flux is zero, because the fluid just flows in parallel to S, and neither in nor out. This also implies that if v does not just flow along S, that is, if v has both a tangential and a normal component, then only the normal component contributes to the flux. Based on this reasoning, to find the flux, we need to take the dot product of v with the unit surface normal to S at each point, which will give us a scalar field, and integrate the obtained field as above. This gives the formula