A scheme/Racket based package for symbolic mathematics for physicist, which currently supports a realization of Euler-Lagrangian Equation in classical physics, Riemannian geometry and General Relativity calculations, and simple Grassmannian calculus.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
examples
LICENCE.txt
README.rst
calculus.rkt
fundamental.rkt
generic-hash.rkt
grassmannian-calculus.rkt
lagrangian.rkt
linear-algebra.rkt
mechanical-objects.rkt
numerical-differential-equation.rkt
plot.rkt
riemannian.rkt
show-expression.rkt
show-mechanical-objects.rkt
simplify.rkt
solve.rkt
tensor.rkt

README.rst

Schemannian

As a scheme/Racket based package for symbolic mathematics for physicist, "Schemannian" currently supports a realization of Euler-Lagrangian Equation is classical physics, Riemannian geometry and General Relativity calculations, and simple Grassmannian Calculus.

"Schemannian" won the first Jane Street prize of Lisp In Summer Projects 2013.

Test Environment

"Schemannian" is written and debugged using a Racket v5.3.1 in a 64-bit Ubuntu 13.04 (Raring Ringtail) computer, and a v5.3.5 in a 32-bit Ubuntu 12.04 (Precise Pangolin) computer. Racket is installed by the default setting of sudo apt-get install racket.

Highlights

"Schemannian" can calculate the Lagrangian and the equation of motion (by Euler-Lagrangian equation) of a classical mechanical system. For example, this piece of code will give you the equation of motion of the double pendulum.

(define pendulum1
  (make-pendulum 'm1 'l1 'pivotX1 'pivotY1 (make-function 'theta1 't)))
(define pendulum2
  (make-pendulum 'm2 'l2 (pendulum1 'X) (pendulum1 'Y) (make-function 'theta2 't)))

(define L (lagrangian (list pendulum1 pendulum2)))
(define euler-lagrangian-L
  (euler-lagrangian-equation L
                             (list (make-function 'theta1 't) (make-function 'theta2 't))
                             (list (deriv (make-function 'theta1 't) 't)
                                   (deriv (make-function 'theta2 't) 't))
                             't))

That is interesting, because Lagrangian formulation and Euler-Lagrangian equation are extremely important for loop calculations in quantum field theory. Those calculations are really tedious, and currently there is NO general propose package to do them.

"Schemannian" gives an interface to virtualize the motion of mechanical objects by Euler-Lagrangian equation.

"Schemannian" is capable to calculate typical General Relativity expressions such as Christoffel symbols, Riemann curvature tensor, Ricci curvature tensor, and Ricci scalar from the metric. For example, the following code calculate the curvature on the surface of a sphere.

(define g (make-tensor '((_ a) (_ b))
                       '(((** r 2) 0)
                         (0 (* (** r 2) (** (sin theta) 2))))))

(define Gamma^a_bc (christoffel '((^ a) (_ b) (_ c)) g '(theta phi)))
(define R^a_bcd (riemann-tensor '((^ a) (_ b) (_ c) (_ d)) Gamma^a_bc '(theta phi)))
(define R_ab (ricci-curvature-tensor '((_ a) (_ b)) R^a_bcd))
(ricci-scalar g R_ab)

The Schemannian Reference

Supported Math Functions

Expressions

Virtualization of Expressions

Simplification of Expressions

Linear Algebra

Equation Solving

Basic Calculus

Numerical Differential Equation Solving

Data Virtualization

Physics Related Functions

Euler Lagrangian Equation

Riemannian Geometry and General Relativity

Grassmannian Calculus

Copyright and License

This program has been written by Cong-Xin Qiu. It is protected by the "GNU Lesser General Public License".