User:Tom Allen/TensorExperimentsZ29

From J Wiki
Jump to navigation Jump to search


gXm0All=. 1  0  _  0"_
gXm1All=. 1  0  1  1"_


Initn =.  1 , 0    , 0 , 0   "_
Initdn=. (0 , 0.01 , 0 , 0.06"_)*%@(1"_)

Initds=.%:@|@((gXM([(0{])@mcv nRef@hknQ),:@Initn)+/^:2@:*(]*/])@Initdn)

vS00xL   =.Initn
vS01dxL  =.0,0,0,0:
vS02d1L  =.Initdn%Initds
vS06ds   =.Initds
vS07count=.(0,5992"_)*1"_

vSgDd2=.0:

pdDA=:vSgD@vS''


Initn =.  1 , 0    , 0 , 0   "_
Initdn=. (0 , 0.01 , 0 , 0.06"_)*%@(1"_)

Initds=.%:@|@((gXM([(0{])@mcv nRef@hknQ),:@Initn)+/^:2@:*(]*/])@Initdn)

vS00xL   =.Initn
vS01dxL  =.0,0,0,0:
vS02d1L  =.Initdn%Initds
vS06ds   =.Initds
vS07count=.(0,5992"_)*1"_

vSgDd2=.gXM([([(0{])@E1cn nRef@hknQ),:@(S03xH{]))]

pdDB=:vSgD@vS''


nCcn3    =:                     cn3"1@:((S00xL{])"2) pdDB

nCOcn    =:(gXM([Ocn     nRef@hknQ)])@:((S00xL{])"2) pdDB

nCOcndc  =:(gXM([Ocndc   nRef@hknQ)])@:((S00xL{])"2) pdDB

nCE1cn   =:(gXM([E1cn    nRef@hknQ)])@:((S00xL{])"2) pdDB

nCEEMcn  =:(gXM([EEMcn   nRef@hknQ)])@:((S00xL{])"2) pdDB

nCHEMcn  =:(gXM([HEMcn   nRef@hknQ)])@:((S00xL{])"2) pdDB

nCPEMcn  =:(gXM([PEMcn   nRef@hknQ)])@:((S00xL{])"2) pdDB

nCJEMcn  =:(gXM([JEMcn   nRef@hknQ)])@:((S00xL{])"2) pdDB

nCJEMcndn=:(gXM([JEMcndn nRef@hknQ)])@:((S00xL{])"2) pdDB

nCX1cncv =:(gXM([X1cncv  nRef@hknQ)])@:((S00xL{])"2) pdDB


pdDA      arrayPut   'pdDA'
          arrayClose 'pdDA'
pdDB      arrayPut   'pdDB'
          arrayClose 'pdDB'
nCcn3     arrayPut   'nCcn3'
          arrayClose 'nCcn3'
nCOcn     arrayPut   'nCOcn'
          arrayClose 'nCOcn'
nCOcndc   arrayPut   'nCOcndc'
          arrayClose 'nCOcndc'
nCE1cn    arrayPut   'nCE1cn'
          arrayClose 'nCE1cn'
nCEEMcn   arrayPut   'nCEEMcn'
          arrayClose 'nCEEMcn'
nCHEMcn   arrayPut   'nCHEMcn'
          arrayClose 'nCHEMcn'
nCPEMcn   arrayPut   'nCPEMcn'
          arrayClose 'nCPEMcn'
nCJEMcn   arrayPut   'nCJEMcn'
          arrayClose 'nCJEMcn'
nCJEMcndn arrayPut   'nCJEMcndn'
          arrayClose 'nCJEMcndn'
nCX1cncv  arrayPut   'nCX1cncv'
          arrayClose 'nCX1cncv'


NB. ... establish arrays if necessary ...

                    arrayOpen  'pdDA'
pdDA=:     5993 8 4 arrayGet   'pdDA'   NB. ... shape required ...
                    arrayClose 'pdDA'

                    arrayOpen  'pdDB'
pdDB=:     5993 8 4 arrayGet   'pdDB'
                    arrayClose 'pdDB'

                    arrayOpen  'nCcn3'
nCcn3=:    5993     arrayGet   'nCcn3'
                    arrayClose 'nCcn3'

                    arrayOpen  'nCOcn'
nCOcn=:    5993 4   arrayGet   'nCOcn'
                    arrayClose 'nCOcn'

                    arrayOpen  'nCOcndc'
nCOcndc=:  5993 4 4 arrayGet   'nCOcndc'
                    arrayClose 'nCOcndc'

                    arrayOpen  'nCE1cn'
nCE1cn=:   5993 4   arrayGet   'nCE1cn'
                    arrayClose 'nCE1cn'

                    arrayOpen  'nCEEMcn'
nCEEMcn=:  5993 3   arrayGet   'nCEEMcn'
                    arrayClose 'nCEEMcn'

                    arrayOpen  'nCHEMcn'
nCHEMcn=:  5993 3   arrayGet   'nCHEMcn'
                    arrayClose 'nCHEMcn'

                    arrayOpen  'nCPEMcn'
nCPEMcn=:  5993 3   arrayGet   'nCPEMcn'
                    arrayClose 'nCPEMcn'

                    arrayOpen  'nCJEMcn'
nCJEMcn=:  5993 4   arrayGet   'nCJEMcn'
                    arrayClose 'nCJEMcn'

                    arrayOpen  'nCJEMcndn'
nCJEMcndn=:5993 4 4 arrayGet   'nCJEMcndn'
                    arrayClose 'nCJEMcndn'

                    arrayOpen  'nCX1cncv'
nCX1cncv=: 5993 4 4 arrayGet   'nCX1cncv'
                    arrayClose 'nCX1cncv'


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

NB. ... (cn0) direction of energy flow ...

   *./"1^:2@(0=])@:(((1{]),2{])"1)@(nCOcn"_)''
1
   *./"1^:2@(0=])@:((((<1 1){]),(<2 2){])"2)@(nCOcndc"_)''
1

NB. ... (cn0) direction of divergence (space) ...

   *./"1^:2@(0=])@:(((1{]),2{])"1)@(nCE1cn"_)''
1

NB. ... (cn0) direction of electric field ...

   *./"1^:2@(0=])@:(((1{]),2{])"1)@(nCEEMcn"_)''
1

NB. ... no magnetic field ...

   *./^:2@(0=])@(nCHEMcn"_)''
1

NB. ... no Poynting vector ...

   *./^:2@(0=])@(nCPEMcn"_)''
1

NB. ... (cno) direction of charge flow ...

   *./"1^:2@(0=])@:(((1{]),2{])"1)@(nCJEMcn"_)''
1
   *./"1^:2@(0=])@:((((<1 1){]),(<2 2){])"2)@(nCJEMcndn"_)''
1

NB. ... for this energy distribution (Euler) ...

   *./^:3@(0=])@(nCX1cncv"_)''
1


load 'plot'

pd <"1@(0|:])@:((cn0,cn1)@(S00xL{])"2) pdDA
pd <"1@(0|:])@:((cn0,cn1)@(S00xL{])"2) pdDB

pd 'pdf'
pd 'show'


Zgraphic2900C.jpg
... geodesic ...


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

   {:@:((S00xL{])"2) pdDA
1 59.92 0 359.52

   {:@:((S00xL{])"2) pdDB
1.00005 59.92 0 377.042


load 'plot'

pd ((i.@(1499"_){])@(nCcn3"_);(3{])"1@(i.@(1499"_){])@(nCOcn"_ ))''    NB. ... energy density (total) ...
pd ((i.@(1499"_){])@(nCcn3"_);(0{])"1@(i.@(1499"_){])@(nCE1cn"_))''    NB. ... divergence     (space) ...
pd ((i.@(1499"_){])@(nCcn3"_);(3{])"1@(i.@(1499"_){])@(nCE1cn"_))''    NB. ... divergence     (time)  ...

pd 'pdf'
pd 'show'


Zgraphic2901C.jpg
... waves ...


load 'plot'

pd (((574+i.@(351"_)){])@(nCcn3"_);(3{])"1@((574+i.@(351"_)){])@(nCOcn"_ ))''    NB. ... energy density (total) ...
pd (((574+i.@(351"_)){])@(nCcn3"_);(0{])"1@((574+i.@(351"_)){])@(nCE1cn"_))''    NB. ... divergence     (space) ...
pd (((574+i.@(351"_)){])@(nCcn3"_);(3{])"1@((574+i.@(351"_)){])@(nCE1cn"_))''    NB. ... divergence     (time)  ...

pd 'pdf'
pd 'show'


Zgraphic2902C.jpg
... waves ...


load 'plot'

pd ((i.@(1499"_){])@(nCcn3"_);(3{])"1@(i.@(1499"_){])@(nCOcn"_  ))''    NB. ... energy density (total) ...
pd ((i.@(1499"_){])@(nCcn3"_);(3{])"1@(i.@(1499"_){])@(nCJEMcn"_))''    NB. ... charge density ...
pd ((i.@(1499"_){])@(nCcn3"_);(0{])"1@(i.@(1499"_){])@(nCEEMcn"_))''    NB. ... electric field ...

pd 'pdf'
pd 'show'


Zgraphic2903C.jpg
... waves ...


load 'plot'

pd (((574+i.@(351"_)){])@(nCcn3"_);(3{])"1@((574+i.@(351"_)){])@(nCOcn"_  ))''    NB. ... energy density (total) ...
pd (((574+i.@(351"_)){])@(nCcn3"_);(3{])"1@((574+i.@(351"_)){])@(nCJEMcn"_))''    NB. ... charge density ...
pd (((574+i.@(351"_)){])@(nCcn3"_);(0{])"1@((574+i.@(351"_)){])@(nCEEMcn"_))''    NB. ... electric field ...

pd 'pdf'
pd 'show'


Zgraphic2904C.jpg
... waves ...


load 'plot'

pd ((i.@(1499"_){])@(nCcn3"_);(((<0 0){])+((<1 1){])+(<2 2){])"2@(i.@(1499"_){])@(nCOcndc"_))''
pd ((i.@(1499"_){])@(nCcn3"_);                      ((<3 3){])"2@(i.@(1499"_){])@(nCOcndc"_))''
pd ((i.@(1499"_){])@(nCcn3"_);                  +/@((<0 1)|:])"2@(i.@(1499"_){])@(nCOcndc"_))''

pd 'pdf'
pd 'show'


Zgraphic2905C.jpg
... conservation of energy ...


load 'plot'

pd ((i.@(1499"_){])@(nCcn3"_);(((<0 0){])+((<1 1){])+(<2 2){])"2@(i.@(1499"_){])@(nCJEMcndn"_))''
pd ((i.@(1499"_){])@(nCcn3"_);                      ((<3 3){])"2@(i.@(1499"_){])@(nCJEMcndn"_))''
pd ((i.@(1499"_){])@(nCcn3"_);                  +/@((<0 1)|:])"2@(i.@(1499"_){])@(nCJEMcndn"_))''

pd 'pdf'
pd 'show'


Zgraphic2906C.jpg
... conservation of charge ...



Download MoinMoin source: File:TensorExperimentsZ29.ijs