Example
Clear[v,S,g,n]
v[x_,y_,z_]:={x,y,z}
S[x_,y_]:=1-x^2-y^2
g[x_,y_,z_]:=(1-x^2-y^2)-z
vf=Plot3D[S[x,y],{x,-1,1},{y,-1,1}];
grad3[g][x,y,z]
n=grad3[g][x,y,z]/norm[grad3[g][x,y,z]]
vp=vectorPlot[{{0,0,S[0,0]}+{0,0,0}},{{0,0,S[0,0]}+n/.{x->0,y->0,z->0}}];
Show[vf,vp];
Where's the normal?
Show[vf,vp,ViewPoint->{0,-1,-1}];It is an inward pointing normal. We will get the flux from the outside to the inside.
Simplify[v[x,y,S[x,y]].n]
Dx=D[S[x,y],x] Dy=D[S[x,y],y]
dS=Sqrt[1+Dx^2+Dy^2]
Simplify[(v[x,y,S[x,y]].n)*dS]
Integrate[1+x^2+y^2,{x,-1,1},
{y,-Sqrt[1-x^2],Sqrt[1-x^2]}]