differential geometry - How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?
I am seeking a convenient and effective way to calculate such geometric quantities. I've used packages like TensoriaCalc
, but they don't work at all time. Sometimes, I run into the following error:
Symbol
Tensor
is Protected.
SymbolTensorType
is Protected.
SymbolTensorName
is Protected.
Here is the code I'm using:
Clear [i, j, φ, τ, σ]
q["case"] = Metric[ SubMinus[i], SubMinus[j],
E^(2 φ[σ]) (\[DifferentialD]τ^2 + \[DifferentialD] σ^2),
CoordinateSystem -> {τ, σ}, TensorName -> "T", StartIndex -> 1 ]
I think the above is correct, since I merely modified the example from the package manual. It gives me the correct answer sometimes (if I only use one notebook).
Also, I ran the codes from the chapter "General Relativity" in the book "Mathmatica for theoretical physics" by Gerd Baumann, but none of them work
Is there more efficient way to calculate them? Please give me some suggestions about this.
Answer
I stumbled upon this question via Google. Thanks for using my TensoriaCalc
package!
My response is probably too late, but I believe the problem you cited
Symbol Tensor is Protected.
Symbol TensorType is Protected.
Symbol TensorName is Protected.
is because you loaded TensoriaCalc
more than once in the same kernel session.
When writing the package, I had to Protect
all the symbols used in the package, such as Tensor
, Metric
, etc. This means their definitions cannot be altered by an external user, as otherwise, it will create inconsistencies. This is why loading TensoriaCalc
more than once gives an error, because you are essentially trying to define these symbols yet again.
Hope this helps.
Comments
Post a Comment