40
$\begingroup$

I need a differential geometry tool for Mathematica. Is there any add-on?

Unfortunately, Mathematica does not include such functionality or I can not find it.

$\endgroup$
10
  • 4
    $\begingroup$ Please be more specific. What exactly do you want to do? $\endgroup$
    – Yves Klett
    Mar 6, 2012 at 10:32
  • 2
    $\begingroup$ I've heard that this book is pretty good, and the authors developed some Mathematica framework for differential geometry which comes with the book. Did not have a chance to get my hands on it though. $\endgroup$ Mar 6, 2012 at 10:33
  • 3
    $\begingroup$ @user450 In the future, it is useful if you include information as to what you have already looked at (such as the Ricci package) or considered, and what you found missing. $\endgroup$
    – tkott
    Mar 6, 2012 at 15:07
  • 3
    $\begingroup$ I recommend xAct package for tensor calculus (not only for this) xact.es, there are big chances that is similar to the future Mathematica built-in functionality. $\endgroup$
    – Artes
    Mar 7, 2012 at 3:06
  • 1
    $\begingroup$ http://en.wikipedia.org/wiki/Tensor_software $\endgroup$
    – Nikolaj-K
    Mar 12, 2012 at 14:43

3 Answers 3

36
$\begingroup$

Atlas 2 for Mathematica is the add-on for doing modern differential geometry calculations.

The tool is available on DigiArea website and Wolfram Research website. The tool works with Mathematica 8 and Mathematica 9.

Calculations are coordinate free

  • First of all in the atlas tool all calculations are coordinate free. That means calculations are performed in terms of tensors, vectors and p-forms. Not their components!

    For example conformally flat metric tensor of sphere is presented as:

    conformally flat metric tensor

    where conformally flat metric tensor are coframe 1-forms and symbol - tensor product operator.


Standard differential geometry notations

  • Secondly, the package uses standard differential geometry notations for exterior derivative, covariant differentiation, tensor product etc. It is really helpful to see the same results/formulas on the screen and in my textbooks.

    • Example with Lie derivative calculation:

    conformally flat metric tensor

    • Example with exterior derivative calculation:

    conformally flat metric tensor

    • Example with tensor product calculation:

    conformally flat metric tensor

  • Atlas is very user-friendly and doesn't bog down with a lot of programming which is really importance for people interested in learning.

  • There are a lot of predefined operators to declare various DG objects.
    Just for example Invariants operator automatically calculates invariants of a mapping:

    • for an embedding of a curve - the curve's normalized moving frame and the curve's curvatures
    • for an embedding or immersion - the second fundamental form and mean curvature vector
    • for a submersion - A and T invariants, the mean curvature vector of corresponding fibers, the integrability obstruction of corresponding horizontal distribution and the riemannian obstruction (if the submersion is not a riemannian one).


Visualization of n-dimensional objects

  • The package has Visualize function that visualizes n-dimensional differential geometry objects using different Mathematica plot functions. The function allows quickly visualize an object and its projections. See some examples.

    For example visualization of projections for Mobius strip. Visualize Mobius strip Visualize Mobius strip


Differential Geometry Library

For instance:


Graphical user interfaces

  • There is a bunch of neat applications which included into the tool:
    • Atlas palette - Mathematica palette, allows manipulate, visualize and calculate entities for any of the objects from the library.
      • extends the keyboard with typesetting of characters and atlas symbols
      • gives access to the differential geometry library
      • generates notebook for any of the library objects that fully prepared to calculate differential geometry quantities for this entity
    • Atlas Wizard - solves differential geometry problems on the fly even if you have a little knowledge in the topic.

Video and Screencasts

$\endgroup$
2
  • 1
    $\begingroup$ link to wolfram research seems broken. $\endgroup$
    – chris
    Dec 29, 2018 at 20:44
  • $\begingroup$ The links are all to mostly broken, still. $\endgroup$ Jul 29, 2021 at 4:30
32
$\begingroup$

The modern differential geometry is a vast subject and while not specified exactly what you need the question is a bit too general. I would rather point out a few references.

If you are looking for a package for tensor calculus, especially in General Relativity, the best choice is xAct made by José M. Martín-García (as far as I know he actually develops built-in functionality for the future versions of Mathematica):

However if you need something straightforward and concise, look at this implementation below of a few fundamental objects in differential geometry. You need a metric g and a coordinate system xx on an open set of a 4-dimentional (riemannian or lorentzian) manifold (but it is a straightforward to define these objects for other dimentions) as an input, eg.

xx = {t, x, theta, phi};
g  = { { -E^(2 nu[x]), 0, 0, 0}, {0, E^(2 lambda[x]), 0, 0}, 
       {0, 0, x^2, 0},           {0, 0, 0, x^2 Sin[theta]^2}};

The above is a Lorentzian metric tensor (in a given map) of a static spherically symmetric four dimentional manifold, and the following are the inverse metric, Christoffel symbol of the second kind, Riemann and Ricci curvature tensors and the Ricci scalar with brief descriptions of their usage:

enter image description here

    InverseMetric[ g_, xx_] := 
        Block[{ res }, 
                res = Simplify[ Inverse[g] ];
                res
            ]

enter image description here

    ChristoffelSymbol[g_, xx_] := 
        Block[{n, ig, res}, 
               n = 4;
               ig = InverseMetric[ g, xx]; 
               res = Table[(1/2)*Sum[ ig[[i,s]]*(-D[ g[[j,k]], xx[[s]]] + 
                                                  D[ g[[j,s]], xx[[k]]] 
                                                + D[ g[[s,k]], xx[[j]]]), 
                                      {s, 1, n}], 
                           {i, 1, n}, {j, 1, n}, {k, 1, n}];
               res
             ]

enter image description here

    RiemannTensor[g_, xx_] := 
        Block[{n, Chr, res}, 
               n   = 4;
               Chr = ChristoffelSymbol[ g, xx];
               res = Table[  D[ Chr[[i,k,m]], xx[[l]]] 
                           - D[ Chr[[i,k,l]], xx[[m]]]
                           + Sum[ Chr[[i,s,l]]*Chr[[s,k,m]], {s, 1, n}]
                           - Sum[ Chr[[i,s,m]]*Chr[[s,k,l]], {s, 1, n}], 
                            {i, 1, n}, {k, 1, n}, {l, 1, n}, {m, 1, n}]; 
               res
             ]

enter image description here

    RicciTensor[g_, xx_] :=
        Block[{Rie, res, n}, 
               n = 4; 
               Rie = RiemannTensor[ g, xx]; 
               res = Table[ Sum[ Rie[[ s,i,s,j]], 
                                 {s, 1, n}], {i, 1, n}, {j, 1, n}]; 
               res
             ]   

enter image description here

    RicciScalar[g_, xx_] := 
        Block[{Ricc,ig, res, n}, 
               n = 4;
               Ricc = RicciTensor[ g, xx];
               ig = InverseMetric[ g, xx];
               res = Sum[ ig[[s,i]] Ricc[[s,i]], {s, 1, n}, {i, 1, n}];
               Simplify[res]
            ]     

This is not an optimal implementation, but it is a good point to start building your own package. You could think about introducing a functional definition of the covariant derivative as well as lower and upper indices of covariant and contravariant tensors. One of the common difficulties with this is the multiplicity of definitions and conventions for Riemann and Ricci tensors etc, and that's why I added descriptions of the given functions.

Besides of the above I recommend to look at the Wolfram Demonstrations :

e.g.

One should also look at the geometry section of

Next it would be even more helpful and strongly recommended to look at these articles (some of them are particularly devoted to differential geometry topics, others only deal with useful geometric techniques) in the Mathematica Journal :

$\endgroup$
3
  • $\begingroup$ does the current version of MMA now support Lie derivatives? $\endgroup$
    – ABCDEMMM
    Dec 11, 2021 at 12:02
  • $\begingroup$ @ABCDEMMM Simply no. $\endgroup$
    – Artes
    Dec 12, 2021 at 0:34
  • $\begingroup$ thanks!which package can solve Lie derivatives problems in MMA? $\endgroup$
    – ABCDEMMM
    Dec 12, 2021 at 0:43
6
$\begingroup$

You may want to look, also, at David Park's Tensorial application as well as the associated TensorForms subpackage. See: http://home.comcast.net/~djmpark/TensorialPage.html

$\endgroup$
9

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.