Based on this reasoning, to find the flux, we need to take the dot product of v with the unit surface normal n to "S" at each point, which will give us a scalar field, and integrate the obtained field as above.