Академический Документы
Профессиональный Документы
Культура Документы
Mathematica
George E. Hrabovsky
MAST
Introduction
This is the third of an apparently endless series of talks on how to use Mathematica in general relativity.
Two years ago I talked about the built-in capabilities for handling tensors.
Last year I talked about the xAct package in general and how to apply it to perturbative general relativ-
ity, deriving the scalar and tensor field equations for a gravitational perturbation given a Lagrangian.
This year I am talking about performing calculations in specific coordinate bases.
Past talks can be found at the website:
http : // www.madscitech.org/tensors.html
This talk will appear there also.
4 GR Calculations in Specific Bases Using Mathematica.nb
<< xAct`xTensor`
------------------------------------------------------------
CopyRight (C) 2003-2014, Jose M. Martin-Garcia, under the General Public License.
Connection established.
------------------------------------------------------------
CopyRight (C) 2002-2014, Jose M. Martin-Garcia, under the General Public License.
------------------------------------------------------------
These packages come with ABSOLUTELY NO WARRANTY; for details type Disclaimer[]. This is free software, and you
are welcome to redistribute it under certain conditions. See the General Public License for details.
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
8 GR Calculations in Specific Bases Using Mathematica.nb
$DefInfoQ = False;
$PrePrint = ScreenDollarIndices;
$CVSimplify = Simplify;
GR Calculations in Specific Bases Using Mathematica.nb 9
You should then define any scalar functions and constants you will need for your metric.
DefConstantSymbol[M]
DefConstantSymbol[G]
10 GR Calculations in Specific Bases Using Mathematica.nb
g θt → 0 g θr → 0 g θθ → - r2 g θϕ → 0
g ϕt → 0 g ϕr → 0 g ϕθ → 0 g ϕϕ → 2 r Sin[θ]2
12 GR Calculations in Specific Bases Using Mathematica.nb
TensorValues @ metric
FoldedRule
g rt → g tr , g θt → g tθ , g θr → g rθ , g ϕt → g tϕ , g ϕr → g rϕ , g ϕθ → g θϕ ,
2M 1
g tt → 1 - , g tr → 0, g tθ → 0, g tϕ → 0, g rr → ,
r 1- 2M r
g rθ → 0, g rϕ → 0, g θθ → - r2 , g θϕ → 0, g ϕϕ → 2 r Sin[θ]2
SetCMetric[g, - cb];
cd = CovDOfMetric[g]
CCovDPDcb,
M M
CTensor0, - , 0, 0, - , 0, 0, 0, {0, 0, 0, 0}, {0, 0, 0, 0},
2 M r - r2 2 M r - r2
M (2 M - r) M
, 0, 0, 0, 0, , 0, 0,
r3 2 M r - r2
(2 M - r) Sin[θ]2
{0, 0, - 2 M + r, 0}, 0, 0, 0, ,
r
1 1 Sin[2 θ]
{0, 0, 0, 0}, 0, 0, , 0, 0, , 0, 0, 0, 0, 0, ,
r r r
1 1
{0, 0, 0, 0}, 0, 0, 0, , {0, 0, 0, Cot[θ]}, 0, , Cot[θ], 0,
2r 2r
2M 1
{cb, - cb, - cb}, 0, CTensor1 - , 0, 0, 0, 0, , 0, 0,
r 1 - 2rM
0, 0, - r2 , 0, 0, 0, 0, 2 r Sin[θ]2 , {- cb, - cb}, 0
GR Calculations in Specific Bases Using Mathematica.nb 15
Christoffel[CD, PDcb][α, - β, - γ]
Γ[∇,] α βγ
Γ[∇,] t tt → 0
Γ[∇,] t tr → - 2 M r-r2
M
Γ[∇,] t tθ → 0
Γ[∇,] t tϕ → 0
Γ[∇,] t rr → 0
Γ[∇,] t rθ → 0
Γ[∇,] t rϕ → 0
Γ[∇,] t θθ → 0
Γ[∇,] t θϕ → 0
Γ[∇,] t ϕϕ → 0
Γ[∇,] r tt →
M (2 M-r)
r3
Γ[∇,] r tr → 0
Γ[∇,] r tθ → 0
Γ[∇,] r tϕ → 0
Γ[∇,] r rr →
M
2 M r-r2
Γ[∇,] r rθ → 0
Γ[∇,] r rϕ → 0
Γ[∇,] r θθ → - 2 M + r
Γ[∇,] r θϕ → 0
Γ[∇,] r ϕϕ →
(2 M-r) Sin[θ]2
r
Γ[∇,] θ tt → 0
Γ[∇,] θ tr → 0
Γ[∇,] θ tθ → 0
Γ[∇,] θ tϕ → 0
16 GR Calculations in Specific Bases Using Mathematica.nb
Γ[∇,] θ rr → 0
Γ[∇,] θ rθ →
1
r
Γ[∇,] θ rϕ → 0
Γ[∇,] θ θθ → 0
Γ[∇,] θ θϕ → 0
Γ[∇,] θ ϕϕ →
Sin[2 θ]
r
Γ[∇,] ϕ tt → 0
Γ[∇,] ϕ tr → 0
Γ[∇,] ϕ tθ → 0
Γ[∇,] ϕ tϕ → 0
Γ[∇,] ϕ rr → 0
Γ[∇,] ϕ rθ → 0
Γ[∇,] ϕ rϕ →
1
2r
Γ[∇,] ϕ θθ → 0
Γ[∇,] ϕ θϕ → Cot[θ]
Γ[∇,] ϕ ϕϕ → 0
GR Calculations in Specific Bases Using Mathematica.nb 17
rs = RicciScalar[cd][[1]]
2M+5r
-
2 r3
GR Calculations in Specific Bases Using Mathematica.nb 19
DefTensor[ρ, M4]
DefTensor[ρ, M4, GenSet[]]
Td[α, β]
ρ[] 0 0 0
0 0 0 0
0 0 0 0 βα
0 0 0 0
The pressure-less dust is very simple. A little more complicated is the perfect fluid. This requires us to
define a pressure field.
DefTensor[p, M4]
DefTensor[p, M4, GenSet[]]
Tf[α, β]
2 M
p[]+p[] 1- +ρ[] 0 0 0
r
p[]
0 2 M
0 0
1-
r αβ
0 0 -p[] r2 0
0 0 0 2 p[] r Sin[θ]2
1
tteq = Ricci[cd][{0, - cb}, {0, - cb}] - rs g[{0, - cb}, {0, - cb}] ⩵
2
8 π G Tf[{- 0, cb}, {- 0, cb}]
2M
M (- 2 M + r) 1 - r
(2 M + 5 r) 2M
+ ⩵ 8 G π p[] + p[] 1 - + ρ[]
2 r4 4 r3 r
tteq // FullSimplify
(2 M - r) (4 M + 5 r) 2M
- ⩵ 8 G π p[] 2 - + ρ[]
4 r4 r
eineq[a_, b_] :=
Einstein[cd][{a, - cb}, {b, - cb}] - 8 π G Tf[{- a, cb}, {- b, cb}] // FullSimplify
eineq[0, 0]
(2 M - r) (4 M + 5 r) 2M
- - 8 G π p[] 2 - + ρ[]
4 r4 r
eineq[1, 1]
M + 3 r - 16 G π p[] r3
2 r2 (- 2 M + r)
eineq[0, 1]
0
26 GR Calculations in Specific Bases Using Mathematica.nb
Thank You!