Generalizations of the Fundamental Theorem of Calculus (Part II)

Using Divergence theorem to find London attraction potential between point particle and a finite cylinder.

Find (Overscript[F,  ->])  such that div F is \(TraditionalForm\`\(-1\)\/\((\(r\& -> \) - \(x\& -> \))\)\^6\)   where (Overscript[r,  ->])  = (ξ,η,ζ) is a position in the cylinder and (Overscript[x,  ->]) =(x,y,z) is a general position in space (A fairly general method to do this and similar problems can be found in Argento C; Jagota A; Carter WC ``Surface formulation for molecular interactions of macroscopic bodies'' J.Mech. Physics Solids 1997,  pp 1161-1183 .

FVecLondon  =  (1/(3 ((((((ξ - x))^2)  + (((η - y))^2)  +  (((ζ - z))^2)))^3))) {ξ - x,  η - y,  ζ - 
            z}

<< Calculus`VectorAnalysis`

The following verifies that the correct vector potential is obtained

FullSimplify[
      Div[FVecLondon, Cartesian[ξ, η, ζ]]]

Therefore,  \(TraditionalForm\`∫\_\(Cylinder

          Volume\)\(1\/\((\(r\& -> \) - \(x\& -> \))\)\^6\) dV\) = \(TraditionalForm\`∫\_\(Cylinder

          Surfaces\)\(FVecLondon\& ⇀ \) • d\(A\& -> \)\) =  \(TraditionalForm\`∫\_\(Cylinder

          Surface\)\(FVecLondon\& ⇀ \) • d\(A\& -> \)\)+ \(TraditionalForm\`∫\_\(Cylinder

          Ends\)\(FVecLondon\& ⇀ \) • d\(A\& -> \)\)

Cylindrical coordinates: (ξ,η,ζ) = (r Cos[t], r Sin[t], ζ):
One cylindrical surface  r= R = const. t ∈ (0, 2π), ζ ∈ (-(L/2) , (L/2))
Two caps r ∈ (0,R) t ∈ (0, 2π), ζ=±(L/2)

Cylinder Surface normals and differential quantities

CylSurf  =  {R Cos[t],  R  Sin[t], ζ}

The infinitessimal surface vectors (Overscript[((Subscript[R, u])),  ⇀])  and (Overscript[((Subscript[R, v])),  ⇀])  for the cylinder surface

CylSurfRt  =  D[CylSurf, t]
CylSurfRz    =  D[CylSurf, ζ]

The surface normal given by (Overscript[((Subscript[R, u])),  ⇀])  × (Overscript[((Subscript[R, v])),  ⇀])  for the cylinder surface

NormalVecCylSurf  =  Cross[CylSurfRt, CylSurfRz]

UnitNormalVecCylSurf  =  NormalVecCylSurf/R

The integrand to be evaluated over the cylinder surface

CylinderIntegrand  =  
      FullSimplify[(FVecLondon /. {ξ -> 
                  R Cos[t],  η ->  R Sin[t]}) . 
          UnitNormalVecCylSurf]

Closed form for integral is un-findable, use a numeric integration--this will be written in two forms
1) A general function of x,y,z of the point particle and the cylinder radius and length.
2) Because of the polar symmetry, the integral should not be a function of  x,y but of only r = (Sqrt[(x^2)  +  (y^2)])

CylinderContribution[xpos_,  ypos_,  zpos_,  CylRad_ ,  
        CylLen_]  :=  
      NIntegrate[
        Evaluate[
          CylinderIntegrand /. {x -> xpos, y -> ypos,  
              z -> zpos, R -> CylRad,  
              L  ->  CylLen}],  {ζ, -CylLen/2, 
          CylLen/2}, {t, 0,  2  π}]

CylinderContribution[dist_,  zpos_,  CylRad_ ,  CylLen_]  := 
      NIntegrate[
        Evaluate[
          CylinderIntegrand /. {x -> dist, y -> 0,  
              z -> zpos, R -> CylRad,  
              L  ->  CylLen}],  {ζ, -CylLen/2, 
          CylLen/2}, {t, 0,  2  π}]

Checking the numerical integration for the first form of the function

CylinderContribution[2, 2, 1/2, 1, 1]

Checking the numerical integration for the second form of the function

CylinderContribution[2 Sqrt[2], 1/2, 1, 1]

Top Cap Surface normals and differential quantities, parallel method to cylinder surface

TopSurf  =  {r Cos[t], r Sin[t], (L/2)}

TopSurfRt  =  D[TopSurf, t]
TopSurfRr    =  D[TopSurf, r]

NormalVecTopSurf  =  
      FullSimplify[Cross[TopSurfRr, TopSurfRt]]

UnitNormalTopCylSurf  =  NormalVecTopSurf/r

TopIntegrand   =  
      FullSimplify[(FVecLondon /. {ξ -> 
                  r Cos[t],  η ->  r Sin[t], ζ -> 
                  L/2}) . NormalVecTopSurf]

TopContribution[xpos_,  ypos_,  zpos_,  CylRad_ ,  CylLen_]  :=  
      NIntegrate[
        Evaluate[
          TopIntegrand /. {x -> xpos, y -> ypos,  z -> zpos, 
              R -> CylRad,  L  ->  CylLen}], {r, 0,  
          CylRad}, {t, 0, 2 π}]

TopContribution[dist_,  zpos_,  CylRad_ ,  CylLen_]  :=  
      NIntegrate[
        Evaluate[
          TopIntegrand /. {x -> dist, y -> 0,  z -> zpos, 
              R -> CylRad,  L  ->  CylLen}], {r, 0,  
          CylRad}, {t, 0, 2 π}]

TopContribution[Sqrt[2], Sqrt[2], 1/3, 1, 2]

TopContribution[2, 1/3, 1, 2]

Bottom Cap Surface normals and differential quantities

BotSurf  =  {r Cos[t], r Sin[t], ((-L)/2)}

BotSurfRt  =  D[BotSurf, t]
BotSurfRr    =  D[BotSurf, r]

NormalVecBotSurf  =  
      FullSimplify[Cross[BotSurfRt, BotSurfRr]]

UnitNormalVecBotSurf  =  NormalVecBotSurf/r

BotIntegrand   =  
      FullSimplify[(FVecLondon /. {ξ -> 
                  r Cos[t],  η ->  
                  r Sin[t], ζ -> -L/2}) . 
          NormalVecBotSurf]

BotContribution[xpos_,  ypos_,  zpos_,  CylRad_ ,  CylLen_]  :=  
      NIntegrate[
        Evaluate[
          BotIntegrand /. {x -> xpos, y -> ypos,  z -> zpos, 
              R -> CylRad,  L  ->  CylLen}], {r, 0,  
          CylRad}, {t, 0, 2 π}]

BotContribution[dist_,  zpos_,  CylRad_ ,  CylLen_]  :=  
      NIntegrate[
        Evaluate[
          BotIntegrand /. {x -> dist, y -> 0,  z -> zpos, 
              R -> CylRad,  L  ->  CylLen}], {r, 0,  
          CylRad}, {t, 0, 2 π}]

BotContribution[Sqrt[2], Sqrt[2], 1/3, 1, 2]

BotContribution[2, 1/3, 1, 2]

Adding up all the surface integral contributions

LondonCylinderPotential[dist_,  zpos_,  CylRad_ ,  CylLen_]   := 
      CylinderContribution[dist, zpos, CylRad, CylLen]  +  
        TopContribution[dist, zpos, CylRad, CylLen]  +  
        BotContribution[dist, zpos, CylRad, CylLen]

LondonCylinderPotential[2,  .5, 1, 3]

<< Graphics`Graphics`

Visualize result as a function of radial distance at different altitudes

LondonPlot  = 
      Plot[{LondonCylinderPotential[dist, 0, 1, 4/3], 
          LondonCylinderPotential[dist, 2/3, 1, 4/3], 
          LondonCylinderPotential[dist, 4/3, 1, 4/3], 
          LondonCylinderPotential[dist, 2, 1, 4/3]}, {dist, 1.1, 3}, 
        PlotStyle -> {{Thickness[0.02], 
              RGBColor[1, 0, 0]}, {Thickness[0.015],  
              RGBColor[0, 0.5, 0]},  {Thickness[0.01], 
              RGBColor[0, 0, 1]}, {Thickness[0.005], 
              RGBColor[1, 0, 1]}}]

Show[LondonPlot, PlotRange -> {-1, 0}]

Visualize potential at fixed altitudes above cylinder

TopOfCylinder  = 
      Plot[{LondonCylinderPotential[dist, 1.1, 1, 1], 
          LondonCylinderPotential[dist, 1.2, 1, 1], 
          LondonCylinderPotential[dist, 1.3, 1, 1], 
          LondonCylinderPotential[dist, 1.4, 1, 1]}, {dist, 0, 3}, 
        PlotStyle -> {{Thickness[0.02], 
              RGBColor[1, 0, 0]}, {Thickness[0.015],  
              RGBColor[0, 0.5, 0]},  {Thickness[0.01], 
              RGBColor[0, 0, 1]}, {Thickness[0.005], 
              RGBColor[1, 0, 1]}}]