Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. try it 4
  2.  
  3. normal1[s_, t_] = Cross[D[{x1[s, t], y1[s, t], z1[s, t]}, s], D[{x1[s, t], y1[s, t], z1[s, t]}, t]];
  4. normal2[s_, t_] = Cross[D[{x2[s, t], y2[s, t], z2[s, t]}, s], D[{x2[s, t], y2[s, t], z2[s, t]}, t]];
  5.  
  6. NIntegrate[Field[x1[s, t], y1[s, t], z1[s, t]] . normal1[s, t], {s, s1low, s1high}, {t, t1low, t1high}]
  7. NIntegrate[Field[x2[s, t], y2[s, t], z2[s, t]] . normal2[s, t], {s, s2low, s2high}, {t, t2low, t2high}]
  8.  
  9. Because divField[x,y,z] = 0, we know that any two curves that share a common boundary will have equal net flow across them. This is because the divField, which is 0, is equal to:
  10.  
  11. 0 = Integrate[divField[x, y, z], z, y, {x, R, ""}] = Integrate[PathIntegral[Field . topunitnormal, Contours -> False, Path -> Subscript[C, 1]], A] - Integrate[PathIntegral[Field . topunitnormal, Contours -> False, Path -> Subscript[C, 2]], A],
  12.  
  13.  
  14.  
  15. Clear[x2, y2, z2, s, t];
  16. x2[r_, s_] = -1 + r Cos[s];
  17. y2[r_, s_] = -3 + 2 r Sin[s];
  18. z2[r_, s_] = 3;
  19.  
  20. {{r2low, r2high}, {s2low, s2high}} = {{0, 5}, {0, 2 Pi}};
  21.  
  22. C2plot = ParametricPlot3D[Evaluate[{x2[r, s], y2[r, s], z2[r, s]}], {r, r2low, r2high}, {s, s2low, s2high}, Mesh -> {0, 30}, Boxed -> False, ViewPoint -> CMView, PlotRange -> All, AxesLabel -> {"x", "y", "z"}]
  23.  
  24. Show[C1plot, C2plot, ViewPoint -> {5, 0, -5}]
  25.  
  26. normal2[s_, t_] = Cross[D[{x2[r, s], y2[r, s], z2[r, s]}, r], D[{x2[r, s], y2[r, s], z2[r, s]}, s]];
  27.  
  28. NIntegrate[Field[x2[r, s], y2[r, s], z2[r, s]] . normal2[r, s], {r, r2low, r2high}, {s, s2low, s2high}]
  29.  
  30. Once again, because divField[x,y,z] = 0 and because the two curves share a common boundary, they will have equal net flow across them. I proved this in the previous problem.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement