Hi,
thanks for sharing your code!
We already have 3 modules that could help:
- sympy.tensor.tensor ==> abstract tensor expressions
- sympy.tensor.array ==> N-dimensional arrays
- sympy.diffgeom ==> some differential geometry
I think sympy.tensor.array could be interesting for you. The main thing that sympy.tensor.array is lacking is support for the tensor valence (covariant/contravariant).