aboutsummaryrefslogtreecommitdiff
path: root/sphere.mac
diff options
context:
space:
mode:
authorThomas Albers Raviola <thomas@thomaslabs.org>2024-08-19 17:43:34 +0200
committerThomas Albers Raviola <thomas@thomaslabs.org>2024-08-19 17:43:34 +0200
commitc5bd2a39b0fe072613bcbebd597a6f7d701945c1 (patch)
treec0949f2f7f11b5558185f867cf85840fa29edfac /sphere.mac
parente6cee1630795b118414070d52606b7be1813a328 (diff)
First commitHEADmaster
Diffstat (limited to 'sphere.mac')
-rw-r--r--sphere.mac65
1 files changed, 51 insertions, 14 deletions
diff --git a/sphere.mac b/sphere.mac
index b58cd57..f65c932 100644
--- a/sphere.mac
+++ b/sphere.mac
@@ -7,8 +7,8 @@ linel: 150;
derivabbrev: true;
+/** **/
load("ctensor");
-
dim: 2;
cframe_flag: false;
ct_coords: [θ, ϕ];
@@ -24,34 +24,71 @@ lg[2, 2] : sin(θ)^2;
cmetric();
/* mcs[i, j, k]: Christoffel symbols of the second kind (one upper index - k) */
-christof(false);
+christof(true);
+ricci(true);
+
+/** **/
+load("itensor");
+
+imetric(g);
+idim(2);
+metricconvert: true;
+
+/** **/
+depends([c, M, N, P], [u, θ]);
-depends(c, [u, θ]);
+Cdown: zeromatrix(2, 2);
+Cdown[1, 1] : 2*c;
+Cdown[2, 2] : -2*c*sin(θ)^2;
Ndown: zeromatrix(2, 2);
Ndown[1, 1] : 2*diff(c, u);
Ndown[2, 2] : -2*diff(c, u)*sin(θ)^2;
-f(m, n) := sum(ug[m, a] * sum(ug[n, b] * Ndown[a, b], b, 1, 2), a, 1, 2);
-
+f(m, n, T) := sum(ug[m, a] * sum(ug[n, b] * T[a, b], b, 1, 2), a, 1, 2);
Nup: zeromatrix(2, 2);
-for i: 1 thru 2 do for j: 1 thru 2 do Nup[i, j]: f(i, j);
+for i: 1 thru 2 do for j: 1 thru 2 do Nup[i, j]: f(i, j, Ndown);
+
+Cup: zeromatrix(2, 2);
+for i: 1 thru 2 do for j: 1 thru 2 do Cup[i, j]: f(i, j, Cdown);
+
+/** Mass-loss formula **/
+mass_aspect_eqn: Mu = (1/4)*covdiff(Nu([],[A,B]), B, A)
+-(1/8)*Nd([A,B], [])*Nu([], [A,B]);
+Mu: block([Cu,Cd,Nu,Nd,expr],
+ expr: ic_convert(mass_aspect_eqn),
+ Cu: Cup, Cd: Cdown, Nu: Nup, Nd: Ndown,
+ expand(ev(expr)));
-X: sum(sum(Nup[A,B]*Ndown[A,B], A, 1, 2), B, 1, 2);
+/** Momentum-loss formula **/
+momentum_aspect_eqn: Pu([A], []) = covdiff(M([],[]), A)
++ (1/8)*covdiff(Cu([],[B,C])*Nd([C,B],[]), A)
++ (1/4)*covdiff(covdiff(Cu([], [B, C]), B, A)
+ - g([],[C,E])*g([],[B,D])*covdiff(Cd([A,B],[]), D, E), C)
++ (1/4)*covdiff(Nu([], [B,C])*Cd([A,C],[]) - Cu([],[B,C])*Nd([A,C],[]), B)
+- (1/4)*Nu([], [B,C])*covdiff(Cd([B,C],[]), A);
-Q: zeromatrix(2, 1);
-for i: 1 thru 2 do Q[i]: sum(diff(Nup[i,B], θ)
- + sum(mcs[B, D, i] * Nup[D, B], D, 1, 2)
- + sum(mcs[B, D, B] * Nup[i, D], D, 1, 2), B, 1, 2);
-Y: diff(Q[1], θ) + sum(sum(mcs[A, B, A], A, 1, 2) * Q[B], B, 1, 2),expand;
+block([Cu,Cd,Nu,Nd,expr],
+ expr: ic_convert(eqn),
+ Cu: Cup, Cd: Cdown, Nu: Nup, Nd: Ndown,
+ ev(expr),
+ Pu[1]),expand;
+sachs_coeff: -(2/3)*g([],[A,B])*(P([B], []) + Cd([B,C],[])*Ubu([],[C]) + βb([],[],B));
+bondi_coeff: 2*N + 3*c*diff(c,θ) + 4*c^2*cot(θ);
-/* M_u */
-- (1/8)*X + (1/4)*Y,expand;
+Nu: block([expr, X, Cu, Cd, Nu, Nd, Ubu, βb, N],
+ expr: ic_convert(sachs_coeff=X([], [A])),
+ expr: subst([Cu=Cup, Cd=Cdown, Nu=Nup, Nd=Ndown], expr),
+ Ubu[1]: -(diff(c, θ) + 2*c*cot(θ)),
+ βb: -(1/4)*c^2,
+ expand(ev(expr)),
+ N: rhs(first(solve(X[1]=bondi_coeff, N))),
+ subst(diff(P[1],u)=Pu[1], diff(-3*N, u)));