Advertisement
Guest User

Transporte paralelo con torsión

a guest
Jul 14th, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. A[v_, w_] := Cross[v, w]; (*Torsion Tensor*)
  2. Subscript[e, 1] = {1, 0, 0}; (* Reference frame *)
  3. Subscript[e, 2] = {0, 1, 0};
  4. Subscript[e, 3] = {0, 0, 1};
  5. alpha[t_] := {0, t, Sin[2 \[Pi] t]}; (* Curve *)
  6. tmax = 10.; (* Max value for t parameter *)
  7. Do[
  8. Subscript[\[CapitalGamma], i, j, k][x_] :=
  9. A[Subscript[e, i], Subscript[e, j]][[k]],
  10. {i, 3}, {j, 3}, {k, 3}]
  11. ParallelTransport[v0_] :=
  12. NDSolve[Flatten[{
  13. Table[
  14. D[Subscript[Z, k][t], t] +
  15. Sum[Subscript[\[CapitalGamma],
  16. i\[InvisibleComma]j\[InvisibleComma]k][alpha[t]]*
  17. alpha'[t][[i]]*Subscript[Z, j][t], {i, 3}, {j, 3}] == 0, {k,
  18. 3}],
  19. Table[Subscript[Z, k][0] == v0[[k]], {k, 3}]}],
  20. Table[Subscript[Z, k][t], {k, 3}],
  21. {t, 0, tmax}];
  22. solutions = Table[ParallelTransport[Subscript[e, k]][[1]], {k, 3}];
  23. fun1[t_] :=
  24. Evaluate[Table[Subscript[Z, k][t], {k, 3}] /. solutions[[1]]];
  25. fun2[t_] :=
  26. Evaluate[Table[Subscript[Z, k][t], {k, 3}] /. solutions[[2]]];
  27. fun3[t_] :=
  28. Evaluate[Table[Subscript[Z, k][t], {k, 3}] /. solutions[[3]]];
  29. MyFrame[s_] :=
  30. Show[{
  31. ParametricPlot3D[alpha[t], {t, 0, tmax}],
  32. Graphics3D[{Arrowheads[0.03],
  33. Red, Arrow[{alpha[s], alpha[s] + fun1[s]}],
  34. Blue, Arrow[{alpha[s], alpha[s] + fun2[s]}],
  35. Green, Arrow[{alpha[s], alpha[s] + fun3[s]}]
  36. }]
  37. }, PlotRange -> {{-1, 1}, {-1, 10}, {-2, 2}},
  38. ViewPoint -> {1, 1, 1}, Boxed -> False, Axes -> False,
  39. PlotRangePadding -> 0., ImagePadding -> None, Background -> None,
  40. ImageSize -> 500]
  41. Manipulate[MyFrame[s], {s, 0, tmax}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement