summaryrefslogtreecommitdiff
path: root/setup.mac
blob: 96d0b3152f34dcbb1aada128286b141a52948e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
 * Setup
 */
linel: 120;

derivabbrev: true;

load("ctensor");

dim: 4;
cframe_flag: false;
ct_coords: [u, r, θ, ϕ];

/* Original Bondi U and V are replaced by A and B; V is reserved for potential */
depends([A, B, β, γ], [u, r, θ]);

/*
Bondi metric ansatz
NOTE: Signature is different than original Bondi paper
*/
bondi_ansatz() := block([m],
  m: zeromatrix(4, 4),
  /* du du */
  m[1, 1] : -B * r^-1 * exp(2 * β) + A^2 * r^2 * exp(2 * γ),
  /* du dr */
  m[1, 2] : -exp(2 * β),
  m[2, 1] : -exp(2 * β),
  /* du dθ */
  m[1, 3] : -A * r^2 * exp(2 * γ),
  m[3, 1] : -A * r^2 * exp(2 * γ),
  /* dθ dθ */
  m[3, 3] : r^2 * exp(2 * γ),
  /* dϕ dϕ */
  m[4, 4] : r^2 * exp(- 2 * γ) * sin(θ)^2,
  m)$

lg: bondi_ansatz()$

/* Load metric and compute inverse */
cmetric()$

/* Force simplification of some expressions */
ug[2,2] : expand(ug[2,2]),simp;

/* mcs[i, j, k]: Christoffel symbols of the second kind (one upper index - k) */
christof(false);

/* ric[i, j]: R_ab Ricci tensor*/
ricci(false);

/* uric[i, j]: R^a_b Ricci tensor */
uricci(false);

/* Ricci scalar */
ric_s : expand(scurvature());

/* riem[a,b,c,d] => R^d_{abc}*/
riemann(false);

/* uriem[a,b,c,d] => R_{abcd} */
uriemann(false);

/* uriem[a,b,c,d] => R^{abcd} */
lriemann(false);


/* 2-sphere submanifold */

/* 2-sphere submanifold metric */
h_AB[3,3] : exp(2*γ)$
h_AB[4,4] : exp(-2*γ)*sin(θ)^2$
h_AB[3,4] : 0$
h_AB[4,3] : 0$

/* 2-sphere submanifold inverse metric */
uh_AB[3,3] : exp(-2*γ)$
uh_AB[4,4] : exp(2*γ)*sin(θ)^-2$
uh_AB[3,4] : 0$
uh_AB[4,3] : 0$

/* 2-sphere metric */
q_AB[3,3] : 1$
q_AB[4,4] : sin(θ)^2$
q_AB[3,4] : 0$
q_AB[4,3] : 0$

/* 2-sphere inverse metric */
uq_AB[3,3] : 1$
uq_AB[4,4] : sin(θ)^-2$
uq_AB[3,4] : 0$
uq_AB[4,3] : 0$

/* Christoffel symbols of 2-sphere */
for i : 3 thru 4 do for j : 3 thru 4 do for k : 3 thru 4 do (
  h_mcs[i, j, k] : sum(uh_AB[k,C]*(
      cdiff(h_AB[j, C], i)
      + cdiff(h_AB[i, C], j)
      + cdiff(h_AB[i, j], C))/2, C, 3, 4));

/* Riemann tensor of 2-sphere */
for i : 3 thru 4 do for j : 3 thru 4 do for k : 3 thru 4 do for l : 3 thru 4 do (
  h_riem[i,j,k,l] : expand(
    cdiff(h_mcs[i,k,l], j)
    - cdiff(h_mcs[j,k,l], i)
    + sum(h_mcs[i,k,n]*h_mcs[l,n,j] - h_mcs[j,k,n]*h_mcs[n,i,l], n, 3, 4)));

/* Ricci tensor of 2-sphere */
for i : 3 thru 4 do for j : 3 thru 4 do (
  h_ric[i,j] : expand(sum(h_riem[i,k,j,k], k, 3, 4)));

/* Ricci scalar of 2-sphere */
h_ric_s : expand(sum(sum(uh_AB[i,j]*h_ric[i,j], i, 3, 4), j, 3, 4));

print("Setup done!");