You can actually get the desired result by inserting this before eq(Beqn):
for i thru 3 do for j thru 3 do for k thru 3 do for l thru 3 do for m thru 3
do for n thru 3 do kdelta[i,j,k,l,m,n]:kdelta([i,j,k],[l,m,n]);
Not very elegant, I know. ic_convert() is long overdue for an overhaul, as
it doesn't play very nicely with a number of things, including
kdelta/levi_civita.
Viktor
-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of karl
Sent: Friday, March 26, 2010 6:50 AM
To: maxima at math.utexas.edu
Subject: kdelta evaluation in ctensor?
Hi,
I am trying to compute the magnetic field using itensor and ctensor.
The problem i have, is that the itensor "kdelta" doesn't get evaluated.
This is somehow strange since itensor knows that
kdelta([1,2,3],[3,2,1]) = -1 etc...
here is my code:
load(itensor)$
load(ctensor)$
dim:3;
imetric(g);
defcon(g);
decsym(FV,2,0,[anti(all)],[]);
components( FV([i,j] , [] ), V([j],[],i)-V([i],[],j) ) ;
components( FV([],[i,j]), contract(g([],[i,k]) * g([],[j,l]) * FV([k,l],[])
) );
components( tmp([i],[]) , 1/2*levi_civita([i,j,k],[]) * FV([],[j,k]) );
Beqn : ic_convert( bfield([i],[]) =
ishow(canform(rename(expand(ev(tmp([i],[]),kdelta)))) ) );
ct_coords:[x,y,z];
lg:ug:ident(3);
V[1]:vx;
V[2]:vy;
V[3]:vz;
depends([vx,vy,vz],ct_coords);
ev(Beqn);
bfield[1];
and the output is
(kdelta[3,3,1,1,2,3]*'diff(vz,z,1)+kdelta[2,3,1,1,2,3]*'diff(vz,y,1)+ ...
but what I want is
'diff(vz,y,1) - 'diff(vy,z,1)
how can I make ctensor evaluate the kdelta symbol explicitely?
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima