itensor and ctensor: indexed objects in moving frames in specific coordinate systems and frame basis
- Subject: itensor and ctensor: indexed objects in moving frames in specific coordinate systems and frame basis
- From: Yaroslav Alekseev
- Date: Tue, 08 Feb 2011 22:37:42 +0300
Hi to all! I need to learn how to compute various expressions with indexed
objects in moving frames
in specific coordinate systems and frame basis. For example: to compute
contract(covdiff(V([],[j]),j))
in polar coordinate and frame
basis:matrix([a(r,phi),b(r,phi)],[c(r,phi),d(r,phi)]). In Maxima:
Maxima 5.23.2 http://maxima.sourceforge.net
using Lisp SBCL 1.0.43
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) kill(all);
(%o0) done
(%i1) load(itensor);
STYLE-WARNING: redefining MAXIMA::$NAME in DEFUN
STYLE-WARNING: redefining MAXIMA::DERIV in DEFUN
STYLE-WARNING: redefining MAXIMA::SDIFF in DEFUN
STYLE-WARNING: redefining MAXIMA::I-$DEPENDENCIES in DEFUN
STYLE-WARNING: redefining MAXIMA::$DECSYM in DEFUN
STYLE-WARNING: redefining MAXIMA::$CANFORM in DEFUN
(%o1) /usr/local/share/maxima/5.23.2/share/tensor/itensor.lisp
(%i2) load(ctensor);
(%o2) /usr/local/share/maxima/5.23.2/share/tensor/ctensor.mac
(%i3) iframe_flag:true;
(%o3) true
(%i4) ishow(covdiff(V([],[j]),j));
j j %1
(%t4) V + icc2 V
,j %1 j
(%o4) V([], [j], j) + icc2([%1, j], [j]) V([], [%1])
(%i5) ishow(ev(%,icc2));
%1 j j
(%t5) V ifc2 + V
%1 j ,j
(%o5) V([], [%1]) ifc2([%1, j], [j]) + V([], [j], j)
(%i6) ishow(ev(%,ifc2,ifc1));
%1 j %2
V ifg (ifb - ifb + ifb )
j %2 %1 %2 %1 j %1 j %2 j
(%t6) -------------------------------------------------- + V
2 ,j
(%o6) (V([], [%1]) ifg([], [j, %2]) (ifb([j, %2, %1]) - ifb([%2, %1, j])
+ ifb([%1, j, %2])))/2 + V([],
[j], j)
(%i7) expr:contract(ratexpand(%));
V([], [%1]) ifg([], [j, %2]) ifb([j, %2, %1], [])
(%o7) -------------------------------------------------
2
V([], [%1]) ifg([], [j, %2]) ifb([%2, %1, j], [])
- -------------------------------------------------
2
V([], [%1]) ifg([], [j, %2]) ifb([%1, j, %2], [])
+ ------------------------------------------------- + V([], [j], j)
2
(%i8) ishow(expr);
%1 j %2 %1 j %2 %1 j %2
V ifg ifb V ifg ifb V ifg ifb
j %2 %1 %2 %1 j %1
j %2
(%t8) ---------------------- - ---------------------- +
----------------------
2 2 2
j
+
V
,j
V([], [%1]) ifg([], [j, %2]) ifb([j, %2, %1], [])
(%o8) -------------------------------------------------
2
V([], [%1]) ifg([], [j, %2]) ifb([%2, %1, j], [])
- -------------------------------------------------
2
V([], [%1]) ifg([], [j, %2]) ifb([%1, j, %2], [])
+ ------------------------------------------------- + V([], [j], j)
2
(%i9) eqn:ishow(eq=expr);
%1 j %2 %1 j %2
V ifg ifb V ifg ifb
j %2 %1 %2 %1 j
(%t9) eq = ---------------------- - ----------------------
2 2
%1 j %2
V ifg ifb
%1 j
%2 j
+ ----------------------
+ V
2
,j
V([], [%1]) ifg([], [j, %2]) ifb([j, %2, %1], [])
(%o9) eq = -------------------------------------------------
2
V([], [%1]) ifg([], [j, %2]) ifb([%2, %1, j], [])
- -------------------------------------------------
2
V([], [%1]) ifg([], [j, %2]) ifb([%1, j, %2], [])
+ ------------------------------------------------- + V([], [j], j)
2
(%i10) ceqn:ic_convert(eqn);
STYLE-WARNING: redefining MAXIMA::$IC_CONVERT in DEFUN
STYLE-WARNING: redefining MAXIMA::$MAKEBOX in DEFUN
STYLE-WARNING: redefining MAXIMA::$CONMETDERIV in DEFUN
STYLE-WARNING: redefining MAXIMA::$IGEODESIC_COORDS in DEFUN
(%o10) eq :
sum(sum(sum(V ifg ifb , %1, 1, dim), %2, 1, dim), j, 1, dim)
%1 j, %2 j, %2, %1
---------------------------------------------------------------------------
2
sum(sum(sum(V ifg ifb , %1, 1, dim), %2, 1, dim), j, 1,
dim)
%1 j, %2 %2, %1, j
-
---------------------------------------------------------------------------
2
sum(sum(sum(V ifg ifb , %1, 1, dim), %2, 1, dim), j, 1,
dim)
%1 j, %2 %1, j, %2
+
---------------------------------------------------------------------------
2
+ sum(diff(V , ct_coords ), j, 1, dim)
j j
(%i11) ct_coordsys(polar);
(%o11) done
(%i12) depends(V,ct_coords);
(%o12) [V(r, phi)]
(%i13) ev(ceqn);
d d
(%o13) ---- (V ) + -- (V ) + (V ifg ifb + V ifg ifb
dphi 2 dr 1 2 2, 2 2, 2, 2 1 2, 2 2, 2, 1
+ V ifg ifb + V ifg ifb + ifg ifb V
2 2, 1 2, 1, 2 1 2, 1 2, 1, 1 1, 2 1, 2, 2 2
+ ifg ifb V + V ifg ifb + V ifg ifb )/2
1, 1 1, 1, 2 2 1 1, 2 1, 2, 1 1 1, 1 1, 1, 1
+ (V ifg ifb + V ifg ifb + V ifb ifg
2 2, 2 2, 2, 2 2 2, 1 2, 2, 1 1 1, 2, 2 2, 2
+ ifg V ifb + ifg V ifb + V ifb ifg
1, 2 2 2, 1, 2 1, 1 2 2, 1, 1 1 1, 2, 1 2, 1
+ V ifb ifg + V ifg ifb )/2
1 1, 1, 2 1, 2 1 1, 1 1, 1, 1
- (V ifg ifb + ifg V ifb + V ifb ifg
2 2, 2 2, 2, 2 1, 2 2 2, 2, 1 1 2, 1, 2 2, 2
+ V ifg ifb + ifb V ifg + V ifb ifg
1 1, 2 2, 1, 1 1, 2, 2 2 2, 1 1 1, 1, 2 2, 1
+ ifg ifb V + V ifg ifb )/2
1, 1 1, 2, 1 2 1 1, 1 1, 1, 1
(%i14)
What should I do next ?
--
Yaroslav