Essays/Torsion Tensor/TorsionTensor03

From J Wiki
Jump to navigation Jump to search


GTT0300C.jpg


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

Phicn=:hcn smx"2 1 Phicv

Phicndxt1=:hcn  ((   [)smx 0|:])"2 2 Phicvdx
Phicndxt2=:hcndx((1|:[)smx    ])"3 1 Phicv
Phicndx  =:Phicndxt1+Phicndxt2

Phicndxdxt1=:hcn           ((   [)smx 0|:])"2 3 Phicvdxdx
Phicndxdxt2=:hcndx  (1|:])@((1|:[)smx 0|:])"3 2 Phicvdx
Phicndxdxt3=:hcndx         ((1|:[)smx 0|:])"3 2 Phicvdx
Phicndxdxt4=:hcndxdx       ((1|:[)smx    ])"4 1 Phicv
Phicndxdx  =:Phicndxdxt1+Phicndxdxt2+Phicndxdxt3+Phicndxdxt4


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"_

   (gXT(([Phicndx   hkAy)(((2^_22);2^_14)qteq[;])"2(0|:[:(gXT([Phicn   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

   (gXT(([Phicndxdx hkAy)(((2^_18);2^_14)qteq[;])"3(0|:[:(gXT([Phicndx 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


GTT0301C.jpg


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

Omgcv=:Omgdx+-@(ch2k smx"3 1 Omg)

Omgcvdxt1=:Omgdxdx
Omgcvdxt2=:ch2k  -@((   [)smx 0|:])"3 2 Omgdx
Omgcvdxt3=:ch2kdx-@((2|:[)smx    ])"4 1 Omg
Omgcvdx  =:Omgcvdxt1+Omgcvdxt2+Omgcvdxt3

Omgcvdxdxt1=:Omgdxdxdx
Omgcvdxdxt2=:ch2k           -@((   [)smx 0|:])"3 3 Omgdxdx
Omgcvdxdxt3=:ch2kdx  -@(2|:])@((2|:[)smx 0|:])"4 2 Omgdx
Omgcvdxdxt4=:ch2kdx         -@((2|:[)smx 0|:])"4 2 Omgdx
Omgcvdxdxt5=:ch2kdxdx       -@((2|:[)smx    ])"5 1 Omg
Omgcvdxdx  =:Omgcvdxdxt1+Omgcvdxdxt2+Omgcvdxdxt3+Omgcvdxdxt4+Omgcvdxdxt5


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. ... Omgcv is a tensor ...

   OmgcvBox=:([Omgcv hkAx);([(0|:])"2@:ycdx xfromy);[Omgcv hkAy
   OmgcvChk=:[(>@(0{])(((2^_44);2^_44)qteq[;])"2>@(1{])([smx"2 smx"2)>@(2{]))OmgcvBox

   (gXT OmgcvChk]) (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(([Omgcvdx   hkAy)(((2^_23);2^_18)qteq[;])"3(0|:[:(gXT([Omgcv   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

   (gXT(([Omgcvdxdx hkAy)(((2^_19);2^_14)qteq[;])"4(0|:[:(gXT([Omgcvdx 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


GTT0302C.jpg


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

Ups    =:((      0|:])-])"2@Omgcv
Upsdx  =:((  1 0 2|:])-])"3@Omgcvdx
Upsdxdx=:((1 0 2 3|:])-])"4@Omgcvdxdx


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. ... Ups is a tensor ...

   UpsBox=:([Ups hkAx);([(0|:])"2@:ycdx xfromy);[Ups hkAy
   UpsChk=:[(>@(0{])(((2^_44);2^_44)qteq[;])"2>@(1{])([smx"2 smx"2)>@(2{]))UpsBox

   (gXT UpsChk]) (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(([Upsdx   hkAy)(((2^_24);2^_22)qteq[;])"3(0|:[:(gXT([Ups   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

   (gXT(([Upsdxdx hkAy)(((2^_24);2^_22)qteq[;])"4(0|:[:(gXT([Upsdx 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


GTT0303C.jpg


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

S=:Ups*/"2 1 Phicn

Sdxt1=:Ups         (*/)"2 2 Phicndx
Sdxt2=:Upsdx(2|:])@(*/)"3 1 Phicn
Sdx  =:Sdxt1+Sdxt2

Sdxdxt1=:Ups             (*/)"2 3 Phicndxdx
Sdxdxt2=:Upsdx  (  2|:])@(*/)"3 2 Phicndx
Sdxdxt3=:Upsdx  (2 4|:])@(*/)"3 2 Phicndx
Sdxdxt4=:Upsdxdx(2 3|:])@(*/)"4 1 Phicn
Sdxdx  =:Sdxdxt1+Sdxdxt2+Sdxdxt3+Sdxdxt4


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. ... S is a tensor ...

   SBox=:([S hkAx);xcdy;([(0|:])"2@:ycdx xfromy);[S hkAy
   SChk=:[(>@(0{])(((2^_44);2^_44)qteq[;])"3>@(2{])([smx"2 3 smx"2 3)>@(1{])smx"2 3>@(3{]))SBox

   (gXT SChk]) (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. ... S in frame of reference which is not rotating ...
NB. ... S in frame of reference which is rotating ...

   (gXT(([S hkAy),:([S hkAx))]) (1 yCrandom yCpts)''
       0 0        0        0
       0 0        0        0
       0 0        0        0
_25.9184 0        0  11.9925

       0 0        0        0
       0 0        0        0
       0 0        0        0
       0 0        0        0

       0 0        0        0
       0 0        0        0
       0 0        0        0
       0 0        0        0

 25.9184 0        0 _11.9925
       0 0        0        0
       0 0        0        0
       0 0        0        0



       0 0        0        0
       0 0        0        0
       0 0        0        0
_25.9184 0 _14.9906  11.9925

       0 0        0        0
       0 0        0        0
       0 0        0        0
       0 0        0        0

       0 0        0        0
       0 0        0        0
       0 0        0        0
       0 0        0        0

 25.9184 0  14.9906 _11.9925
       0 0        0        0
       0 0        0        0
       0 0        0        0

NB. ... derivatives ...

   (gXT(([Sdx   hkAy)(((2^_19);2^_14)qteq[;])"4(0|:[:(gXT([S   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

   (gXT(([Sdxdx hkAy)(((2^_16);2^_14)qteq[;])"5(0|:[:(gXT([Sdx 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


GTT0304C.jpg


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

Gam    =:ch2k    +0.5*S
Gamdx  =:ch2kdx  +0.5*Sdx
Gamdxdx=:ch2kdxdx+0.5*Sdxdx


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"_

   (gXT(([Gamdx   hkAy)(((2^_20);2^_14)qteq[;])"4(0|:[:(gXT([Gam   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

   (gXT(([Gamdxdx hkAy)(((2^_17);2^_14)qteq[;])"5(0|:[:(gXT([Gamdx 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



Download: File:LTT0300C.txt
Download: File:LTT0301C.txt
Download: File:LTT0302C.txt
Download: File:LTT0303C.txt
Download: File:LTT0304C.txt




Download MoinMoin source: File:TorsionTensor03.ijs




Next Page: Essays/Torsion Tensor/TorsionTensor04
Prev Page: Essays/Torsion Tensor/TorsionTensor02




Contributed by Tom Allen