Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Tensor software for General Relativity

  1. May 26, 2013 #1
    I have used GRTensorII and Cadabra for some time. And I think Cadabra have great potential for GR. But the current vision of Cadabra only deals with abstract tensor analysis, not with writing out of explicit components. So ,(eq :)when I try to check my final tensor expressions of solutions of black hole or any other kinds of spacetime problem ,I have to rewrite the expressions on GRTensorII.
    Is there any other software or pactage that can do all the things? I'm not particularly familiar with Mathematica and Maxima, they can both achieve abstract tensor analysis and write out of explicit components?
     
  2. jcsd
  3. May 26, 2013 #2

    Mentz114

    User Avatar
    Gold Member

    Maxima has a useful package called ctensor which handles tensor components. It has routines to calculate the GR tensors from a metric or frame field. I've used it a lot written many scripts to do covariant differentiation and other useful things.
     
  4. May 26, 2013 #3

    George Jones

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    What version of Maple do you use. I just had the latest version (17) installed on my computers a couple days ago. I think this version has more facility for doing GR calculations without having to use GRTensorII.
     
  5. May 26, 2013 #4
    Maple 7 in winXP and Maple 13 in Ubuntu 13.04 ~ Actually, I have downloaded the Maple 17 x64 Linux ,but the licence doesn't work.
     
  6. May 26, 2013 #5
    I'm going to study Maxima (ctensor) , I feel it is very similar to GRTensor ,I do not know if it could do the abstract tensor analysis.
     
  7. May 26, 2013 #6

    Mentz114

    User Avatar
    Gold Member

    There is a package called 'itensor' which can do some abstract computations.
     
  8. May 26, 2013 #7
    Thanks a lot !~ I decided to give it a try.
     
  9. May 26, 2013 #8

    Mentz114

    User Avatar
    Gold Member

    The best way to use Maxima is with batch files. Here's one to start you off. Copy this into a text file and (if you're using Windows) give it a .mac extension. Use the 'Load Batch File' menu option to run it.
    Code (Text):

    /********************************
    Einstein-DeSitter ( FRW with k=0)
    Spherical polar
    ***************************/
    kill(all);
    load(ctensor);
    ratflag:true;
    ratricci:true;
    ratriemann:true;
    ct_coords:[t,r,theta,phi];

    depends([a],[t])$

    lg:matrix([-1,0,0,0], [0,a^2,0,0], [0,0,a^2*r^2,0], [0,0,0,a^2*r^2*sin(theta)^2]);
    ug:ratsimp(invert(lg));
    ricci(true);
    lriemann(false);
    uriemann(false);
    leinstein(false);
    einlow:zeromatrix(4,4)$
    for _a thru 4 do  for _b thru 4 do ( einlow[_a,_b]:factor(ratsimp(lein[_a,_b])) );
    einlow;

    /** Ricci scalar **/
    scurvature();
    ratsimp(%);
    /** K-invariant ***/
    rinvariant();
    ratsimp(%);
    /** V = \partial_t ***/
    V:zeromatrix(1,4)$
    V[1,1]:1$
    V;
    /* gravitoElectric- tensor : contract lriem with V */
    lriemann(false);
    T:zeromatrix(4,4)$
    for a thru 4 do ( for b thru 4 do ( for m thru 4 do ( for n thru 4 do
    ( T[a,b]:T[a,b] + lriem[a,m,b,n]*V[1,m]*V[1,n] ))));
    T:ratsimp(T);
     
     
  10. May 26, 2013 #9

    George Jones

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    It looks like you are going to use other packages, but here is what Maple documentation says,

    http://www.maplesoft.com/products/maple/new_features/physics.aspx#Tensors

    I haven't had a chance to investigate this.
     
  11. May 27, 2013 #10
  12. May 27, 2013 #11

    George Jones

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    My employer has a site license.

    Sorry, Physics Forums cannot support illegal activities.
     
  13. Jun 4, 2014 #12
    Hi everyone!
    How can I make a Riemann tensor for a metric in a locally inertial frame?

    What I mean is that, maple makes Riemann tensor by Riemann(ginv, D2, Cf1), and it uses the four sentences consisting Christoffel symbols and their derivatives in order to make the Riemann tensor.
    However, I want to make a Riemann tensor in which just the derivatives of the Christoffel symbols are considered.
    Can anyone help me please?
     
  14. Jun 4, 2014 #13

    pervect

    User Avatar
    Staff Emeritus
    Science Advisor

    I think what you probably want is to use an anholonomic basis. I use GRTensor, but try looking at FrameData with DGSetup and look for remarks about anholonomic basis in the documentation.
     
  15. Jun 4, 2014 #14

    bcrowell

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

  16. Jun 6, 2014 #15
    Dear friends,
    Now that I am using GRTensor, I get t a very strange error- at least for me!!!
    I used to read an .mpl file, consisting some functions, definitions, ... but now maple cannot read my file.
    I mean when I say: read "/home/.../ myfile.mpl", I get to the error:
    Error, unable to read `/home/.../ myfile.mpl`.
    could you please help me with this? I really need to read the file! :(
     
  17. Jun 10, 2014 #16
    Hi again!
    any suggestions for my last problem?
    since I installed the grii package, "read " command does not work any more :(
     
  18. Jun 10, 2014 #17

    Sorry friends!
    I found the problem!!!!
    I have changed one of the directory's name!! :rofl:
     
  19. Aug 7, 2015 #18
    Hey, I'm sorry to revive a dead topic, but does anyone have experience with SageManifolds (http://sagemanifolds.obspm.fr/)? I would especially appreciate a comparison of SageManifolds to Mathematica. I am considering whether I should use free software or simply buy Mathematica.

    The reason I would like Sage is because it seems fairly easy to use.

    Ps. As a side note, does anyone have any opinion on the usage of Sage itself?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Tensor software for General Relativity
Loading...