In[]:=
Get[FileNameJoin[{NotebookDirectory[],"SpTm","SpTm.wl"}]]
In[]:=
Protect[M];(*Misthemassofthestar*)​​SetMetricDiagonalMatrix-1-
2M
r
,
-1
1-
2M
r
,
2
r
,
2
r
2
Sin[θ]
,{t,r,θ,ϕ};
1. Set the componenets of original Riemann tensor
d
R
abc
:
In[]:=
SetTensor[STensor[R,{a,b,c},{d}],STCalcTensor["RiemannTensor"][[1,3,1]]]
2. Set the compoenents of
R
abcd
as:
In[]:=
SetTensor[STensor[R,{a,b,c,d},{}],STCalcComponents[
g
ce
e
R
abd
][[1,3,1]]]
3. Set the components of
abcd
R
as:
In[]:=
SetTensorSTensor[R,{},{a,b,c,d}],STCalcComponents
a
R
efg
be
g
cf
g
dg
g
[[1,3,1]]
4. Calculate the Kretschmann scalar by definition:
In[]:=
STCalcComponents
abcd
R
R
abcd

Out[]=
=-
24
2
M
6
r