Dear Ivan,
I quite agree with you, the documentation could use more detail. I know because I also get confused sometimes when I use my own tensor code! My excuse is that it was a lot worse in the past...
Meanwhile, I do recommend that, if you have not yet done so, you peruse the numerous tensor examples that I included (do demo(tensor) in Maxima to see a menu), and also the draft paper that I have at http://arxiv.org/abs/cs/0503073, which provides more details.
By the way, the reason trrc is not documented is that it is really meant to be an internal function; the user-level function to compute the rotation coefficients is the same christof() that is used to compute the Christoffel symbols in a coordinate base.
Viktor
-----Original Message-----
From: Ivan Zolotukhin [mailto:ivan.zolotukhin at gmail.com]
Sent: Sunday, November 30, 2008 12:58 PM
To: Viktor T. Toth
Cc: maxima at math.utexas.edu
Subject: Re: [Maxima] ctensor: compute Ricci rotation coefficients
Viktor,
Many thanks, that's simply great. I managed to reproduce everything
and now will try to make more complex things in 4D. May I suggest to
add some notes in the documentation for the newbies to feel more
comfortable when dealing with ctensor:
- fri should be array of Cartesian 1-forms, it was not straightforward
for me after docs reading
- add trrc() function into list of functions (now it's only mentioned
as internal one needed for christof())
- explain index ordering of the rotation coefficients
Thanks again. Maxima really rocks.
Ivan
On Sat, Nov 29, 2008 at 1:56 AM, Viktor T. Toth <vttoth at vttoth.com> wrote:
> Dear Ivan,
>
> Try this code:
>
> load(ctensor);
> cframe_flag:true;
> derivabbrev:true;
> dim:3;
> ct_coords:[r,p,z];
> depends(D, [r, p, z]);
> depends(g, [r]);
> depends(b, [r]);
> depends(W, [r,p]);
> lfg:ident(3);
> fri:matrix([1-z*W,0,0],[diff(g,r)*r*cos(b)-z*diff(W,p),r,0],[r*W,0,1]);
> cmetric();
> fr:ratsubst(D,1/(1-z*W),fr);
> trrc(all);
> ratsubst(1/(1-z*W),D,lcs[2,2,1]);
> ratsubst(diff(b,r)*sin(p)-diff(g,r)*cos(p)*sin(b),W,%);
> %,diff;
> factor(%);
>
>
> As you can see, it reproduces the correct result. Here's why:
>
> First, fri should be the array of Cartesian 1-forms, i.e., eq. (9) from the paper. You've been trying to do work that Maxima does by itself, namely calculate the set of basis vectors dual to fri; this is computed by cmetric() and stored in the matrix fr.
>
> Second, I am using ratsubst to introduce D as the paper does (after eq. 12) just prior to calculating the rotation coefficients.
>
> Third, the index ordering of the rotation coefficients is a little unusual; I must say I never liked this, but it's a matter of taste, and we've inherited this index ordering from the MACSYMA days. Anyhow, what you are looking for is lcs[2,2,1].
>
> Fourth, to reduce lcs[2,2,1] to the form given in eq. (15), you need to introduce the definition of W (5) and differentiate.
>
> I hope this helps.
>
>
> Viktor
>
>
> -----Original Message-----
> From: Ivan Zolotukhin [mailto:ivan.zolotukhin at gmail.com]
> Sent: Friday, November 28, 2008 5:04 PM
> To: Viktor T. Toth
> Cc: maxima at math.utexas.edu
> Subject: Re: [Maxima] ctensor: compute Ricci rotation coefficients
>
> Viktor,
>
> Thanks for your quick reply. Can't give you a Maple code at the
> moment, will do it later. Please take a look at the original paper I'm
> trying to repeat:
> http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1977ApJ...214..550P&data_type=PDF_HIGH&whole_paper=YES&type=PRINTER&filetype=.pdf
>
> The link points to a PDF file; dual basis is given by expression 12 at
> page 4; resulting coefficients are given by expression 15 at p.4.
>
> Ivan
>
> On Sat, Nov 29, 2008 at 12:20 AM, Viktor T. Toth <vttoth at vttoth.com> wrote:
>> Dear Ivan,
>>
>> The frame-base code is one of the more recent additions to ctensor, so it is
>> quite possible that it has bugs.
>>
>> Can you send me your Maple code (or your hand calculations) so that I can do
>> a comparison?
>>
>>
>> Viktor
>>
>>
>> -----Original Message-----
>> From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
>> On Behalf Of Ivan Zolotukhin
>> Sent: Friday, November 28, 2008 6:30 AM
>> To: maxima at math.utexas.edu
>> Subject: ctensor: compute Ricci rotation coefficients
>>
>> Hello,
>>
>> I'm trying to check with Maxima some paper that calculates Ricci
>> rotation coefficients in a custom base. Result by Maxima is wrong
>> since I'm able to repeat calculations made in paper in Maple. Could
>> you please check my Maxima session log below and tell me what I'm
>> doing wrong? Sorry if there are blunders, I'm new to Maxima.
>>
>> load(ctensor);
>> cframe_flag:true;
>> dim:3;
>> ct_coords:[r,p,z];
>> depends(D, [r, p, z]);
>> depends(g, [r]);
>> depends(b, [r]);
>> depends(W, [r,p]);
>> lfg:ident(3);
>> fri:matrix( [ D, -D * ( diff(g, r) * cos(b) - z/r * diff(W, p) ), -D
>> * r * W ], [0, 1/r, 0], [0, 0, 1]);
>> cmetric();
>> trrc(all);
>>
>> There should be only 4 nonvanishing components, but Maxima produces
>> more and they all are incorrect, e.g. lcs[2,1,2] = 1 / rD, whereas it
>> should be 1/r.
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>>
>
>