SHARE
TWEET

Kerr Escape & Recoil Solver

Yukterez Dec 19th, 2019 21 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (* yukterez.net - Kerr Escape & Recoil Solver - Syntax: Mathematica *)
  2.  
  3. a=1/2;
  4. r=isco;
  5. ℧=0;
  6. M1=1; M2=10;
  7. vt=vφ;
  8.  
  9. Σ[r_]:=r^2;
  10. Δ[r_]:=r^2-2 r+a^2+℧^2;
  11. Χ[r_]:=(r^2+a^2)^2-a^2 Δ[r];
  12. κ[r_]:=a;
  13. j[v_]:=Sqrt[1-v^2];
  14. Ы[r_]:=Sqrt[Χ[r]/Σ[r]];
  15. ω[r_]:=(a (2 r-℧^2))/Χ[r];
  16.  
  17. rA=1+Sqrt[1-a^2-℧^2];
  18. rE=1+Sqrt[1-℧^2];
  19. rp=rf/.Solve[4 a^2 (rf-℧^2)-(rf^2-3 rf+2 ℧^2)^2==0&&rf>=1,rf]; "rPht"->N[rp]
  20.  
  21. isco=Quiet[Min[RI/.NSolve[0==RI (6 RI-RI^2-9 ℧^2+3 a^2)+4 ℧^2 (℧^2-a^2)-8 a (RI-℧^2)^(3/2)&&RI>=If[Element[rA,Reals],rA,0],RI]]]; "isco"->isco
  22.  
  23. ε[r_]:=Sqrt[Δ[r] Σ[r]/Χ[r]]/j[vt]+Lz[r] ω[r];
  24. Lz[r_]:=vφ Ы[r]/j[vt];
  25.  
  26. red[r_]:=Quiet[Reduce[dt==(Lz[r] (-a (a^2+r^2)+Δ[r] κ[r])+ε[r] ((a^2+r^2)^2-Δ[r] κ[r]^2))/(Δ[r] Σ[r])&&0==((a^2+(-2+r) r+℧^2) (16 a dt d\[CapitalPhi] r (r-℧^2)+8 dt^2 r (-r+℧^2)+d\[CapitalPhi]^2 r (8 r (-a^2+r^3)+a^2 (4 a^2+4 ℧^2-4 (a-℧) (a+℧)))))/(8 r^6)&&d\[CapitalPhi]==(Lz[r] (-a^2+Δ[r])+ε[r] (a (a^2+r^2)-Δ[r] κ[r]))/(Δ[r] Σ[r])&&vt>0,{vt,d\[CapitalPhi],dt},Reals]];red[r]
  27.  
  28. vPro=red[r][[1,2]]; "vPro"->vPro
  29. vEsc=Quiet@Reduce[ε[r]==1,vt][[2,2]]; "vEsc"->vEsc
  30. vDif=Quiet[vd/.Solve[(vPro+vd)/(1+vPro vd)==vEsc,vd][[1]]]; "vDif"->vDif
  31.  
  32. v1=vDif;sol=Quiet[Simplify[Reduce[
  33. (M1/Sqrt[1-v1^2]-M1)+(M2/Sqrt[1-v2^2]-M2)==Ek&&((M1 v1)/Sqrt[1-v1^2])+((M2 v2)/Sqrt[1-v2^2])==0&&
  34. Ek>0&&M1>0&&M2>M1&&v1>0&&v2<0, {Ek,v2}, Reals]]];
  35.  
  36. "vRec"->sol[[2,2]]
  37. "Ek"->sol[[1,2]]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top