/* * 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$ /* 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)); /* 2-sphere */ /* 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 ( q_mcs[i, j, k] : sum(uq_AB[k,C]*( cdiff(q_AB[j, C], i) + cdiff(q_AB[i, C], j) - cdiff(q_AB[i, j], C))/2, C, 3, 4)); print("Setup done!");