Flow Along a Curve

Consider a vector field v={v1,v2}=v1(x,y) i + v2(x,y) j.

Think of a small (infinitesimal) piece of curve again. The flow of v along the small piece of curve is in the direction of the unit tangent to the curve and is v times the small piece of arc length (the bigger the piece of curve, the more flow!). Adding these infinitesimal pieces up (integrating!) yields flow across the curve:

Integral of v.Tds

By the way, if the curve f(x,y) is already parametrized as r(t)={x(t),y(t)}, then r'(t)={x'(t),y'(t)} is the tangent vector, so the unit tangent vector must be
T(t)={x'(t),y(t)}/||{x'(t),y(t)}||
(Remember the vectorcalc1 notebook?)

Combining this with ds=||r'(t)|| dt yields
v.T ds = v.r'(t) dt

In[32]:=

  Clear[v,f,r,flow]
  v[x_,y_]:={x^2,-y^2}
  f[x_,y_]:=x^2+y^2-9

In[33]:=

  r[t_]:={3 Cos[t],3 Sin[t]}

In[34]:=

  T=r'[t]/norm[r'[t]]

Out[34]=

            -3 Sin[t]                    3 Cos[t]
  {---------------------------, ---------------------------}
                2           2                2           2
   Sqrt[9 Cos[t]  + 9 Sin[t] ]  Sqrt[9 Cos[t]  + 9 Sin[t] ]

In[35]:=

  Simplify[T]

Out[35]=

  {-Sin[t], Cos[t]}

In[36]:=

  integrand=(v[r[t][[1]],r[t][[2]]].T) norm[r'[t]]

Out[36]=

               2           2
  Sqrt[9 Cos[t]  + 9 Sin[t] ] 
   
                   2
         -27 Cos[t]  Sin[t]
    (--------------------------- - 
                  2           2
     Sqrt[9 Cos[t]  + 9 Sin[t] ]
   
                           2
           27 Cos[t] Sin[t]
      ---------------------------)
                   2           2
      Sqrt[9 Cos[t]  + 9 Sin[t] ]

In[37]:=

  Simplify[%]

Out[37]=

              2                         2
  3 (-9 Cos[t]  Sin[t] - 9 Cos[t] Sin[t] )

In[38]:=

  flow=Integrate[integrand,{t,0,2 Pi}]

Out[38]=

  0

Up to 2D Flows