Essays/Torsion Tensor/TorsionTensor04

From J Wiki
Jump to: navigation, search


GTT0400C.jpg


NB. ... script torsiontensor.ijs ...

B2kt1=:     (0 3 1|:])"4@Gamdx
B2kt2=:   -@(0 1 3|:])"4@Gamdx
B2kt3=:Gam  (0 2 1|:])@([smx 0|:])"3 3 Gam
B2kt4=:Gam-@(0 1 2|:])@([smx 0|:])"3 3 Gam
B2k  =:B2kt1+B2kt2+B2kt3+B2kt4


B2kdxt1=:       (0 3 1 4|:])"5@Gamdxdx
B2kdxt2=:     -@(0 1 3 4|:])"5@Gamdxdx
B2kdxt3=:Gam    (0 2 1 4|:])@((   [)smx 0|:])"3 4 Gamdx
B2kdxt4=:Gamdx  (0 3 1 2|:])@((2|:[)smx 0|:])"4 3 Gam
B2kdxt5=:Gam  -@(0 1 2 4|:])@((   [)smx 0|:])"3 4 Gamdx
B2kdxt6=:Gamdx-@(0 1 3 2|:])@((2|:[)smx 0|:])"4 3 Gam
B2kdx  =:B2kdxt1+B2kdxt2+B2kdxt3+B2kdxt4+B2kdxt5+B2kdxt6


NB. ... execute (ijx) ...

   gXcme =:( 1.5    0.45   0.754 )"_
   gXpAll=:( 6     _1.4    1.7   )"_
   gXqAll=:( 1      1     _1     )"_
   gXwAll=:( 1.25   _      _     )"_

   yCpts=:0.3 2 50,(0.1,(1p1-0.1),28),0 2p1 50,:1 8 50"_

NB. ... B2k is a tensor ...

   B2kBox=:([B2k hkAx);xcdy;([(0|:])"2@:ycdx xfromy);[B2k hkAy
   B2kChk=:[(>@(0{])(((2^_43);2^_41)qteq[;])"4>@(1{])smx"2 4>@(2{])([smx"2 4[smx"2 4 smx"2 4)>@(3{]))B2kBox

   (gXT B2kChk]) (50 yCrandom yCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

NB. ... derivatives ...

   (gXT(([B2kdx hkAy)(((2^_15);2^_12)qteq[;])"5(0|:[:(gXT([B2k hkAy)])D.1])"_ 1)]) (50 yCrandom yCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1


GTT0401C.jpg


NB. ... script torsiontensor.ijs ...

B2kcvt1=:  (      0|:])@((0|:[)smx 0|:])
B2kcvt2=:-@(0 3 4 1|:])@((   [)smx 1|:])
B2kcvt3=:-@(  0 4 1|:])@((   [)smx 2|:])
B2kcvt4=:-@(    0 1|:])@((   [)smx    ])
B2kcv  =:B2kdx+Gam(B2kcvt1+B2kcvt2+B2kcvt3+B2kcvt4)"3 4 B2k


NB. ... execute (ijx) ...

   gXcme =:( 1.5    0.45   0.754 )"_
   gXpAll=:( 6     _1.4    1.7   )"_
   gXqAll=:( 1      1     _1     )"_
   gXwAll=:( 1.25   _      _     )"_

   yCpts=:0.3 2 50,(0.1,(1p1-0.1),28),0 2p1 50,:1 8 50"_

NB. ... B2kcv is a tensor ...

   B2kcvBox=:([B2kcv hkAx);xcdy;([(0|:])"2@:ycdx xfromy);[B2kcv hkAy
   B2kcvChk=:[(>@(0{])(((2^_37);2^_36)qteq[;])"5>@(1{])smx"2 5>@(2{])([smx"2 5[smx"2 5[smx"2 5 smx"2 5)>@(3{]))B2kcvBox

   (gXT B2kcvChk]) (50 yCrandom yCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1


GTT0402C.jpg


NB. ... script torsiontensor.ijs ...

NB. ... utility verb ...

BB2kcv=:B2kcv+S(0 1 4|:])@smx"3 4 B2k


NB. ... execute (ijx) ...

   gXcme =:( 1.5    0.45   0.754 )"_
   gXpAll=:( 6     _1.4    1.7   )"_
   gXqAll=:( 1      1     _1     )"_
   gXwAll=:( 1.25   _      _     )"_

   yCpts=:0.3 2 50,(0.1,(1p1-0.1),28),0 2p1 50,:1 8 50"_

NB. ... utility verb BB2kcv is a tensor ...

   BB2kcvBox=:([BB2kcv hkAx);xcdy;([(0|:])"2@:ycdx xfromy);[BB2kcv hkAy
   BB2kcvChk=:[(>@(0{])(((2^_37);2^_36)qteq[;])"5>@(1{])smx"2 5>@(2{])([smx"2 5[smx"2 5[smx"2 5 smx"2 5)>@(3{]))BB2kcvBox

   (gXT BB2kcvChk]) (50 yCrandom yCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

NB. ... Bianchi Identity ...

   *./^:5"5 (0=]) ((2^_36)qtsz]) (gXT([(]+(2|:])+2 3|:])"5@BB2kcv hkAy)]) (50 yCrandom yCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

   *./^:5"5 (0=]) ((2^_37)qtsz]) (gXT([(]+(2|:])+2 3|:])"5@BB2kcv hkAx)]) (50 yCrandom yCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1


GTT0403C.jpg


NB. ... script torsiontensor.ijs ...

Fcv=:+/"1@((<0 1)|:])"5@BB2kcv


NB. ... execute (ijx) ...

   gXcme =:( 1.5    0.45   0.754 )"_
   gXpAll=:( 6     _1.4    1.7   )"_
   gXqAll=:( 1      1     _1     )"_
   gXwAll=:( 1.25   _      _     )"_

   yCpts=:0.3 2 50,(0.1,(1p1-0.1),28),0 2p1 50,:1 8 50"_

NB. ... Maxwell's equation ...

   *./^:3"3 (0=]) ((2^_36)qtsz]) (gXT([(]+(0|:])+0 1|:])"3@Fcv hkAy)]) (50 yCrandom yCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

   *./^:3"3 (0=]) ((2^_37)qtsz]) (gXT([(]+(0|:])+0 1|:])"3@Fcv hkAx)]) (50 yCrandom yCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

NB. ... example ...
NB.
NB. ... Fcv in frame of reference which is not rotating ...
NB. ... Fcv in frame of reference which is rotating ...

   (gXT(([((2^_36)qtsz])@Fcv hkAy),:[((2^_37)qtsz])@Fcv hkAx)]) (1 yCrandom yCpts)''
       0       0        0        0
       0       0        0        0
       0       0        0        0
 252.997       0        0  9874.99

       0       0        0        0
       0       0        0        0
       0       0        0        0
       0  48.987        0        0

       0       0        0        0
       0       0        0        0
       0       0        0        0
       0       0  40.8337        0

_252.997       0        0 _9874.99
       0 _48.987        0        0
       0       0 _40.8337        0
       0       0        0        0



       0       0        0        0
       0       0        0        0
       0       0        0        0
 252.997       0        0  9874.99

       0       0        0        0
       0       0        0        0
       0       0        0        0
       0  48.987        0        0

       0       0        0        0
       0       0        0        0
       0       0        0        0
       0       0  40.8337  51.0421

_252.997       0        0 _9874.99
       0 _48.987        0        0
       0       0 _40.8337 _51.0421
       0       0        0        0



Download: File:LTT0400C.txt
Download: File:LTT0401C.txt
Download: File:LTT0402C.txt
Download: File:LTT0403C.txt




Download MoinMoin source: File:TorsionTensor04.ijs




Next Page: Essays/Torsion Tensor/TorsionTensor05
Prev Page: Essays/Torsion Tensor/TorsionTensor03




Contributed by Tom Allen