Yukterez

Schwarzschild Escape & Recoil Solver

Dec 19th, 2019
23
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (* yukterez.net - Schwarzschild Escape & Recoil Solver - Syntax: Mathematica *)
  2.  
  3. r=6;
  4. M1=1;
  5. M2=10;
  6.  
  7. g00=1/(1-2/r);
  8. vPro=Sqrt[1/r] Sqrt[g00];
  9. "vPro"->N[vPro]
  10.  
  11. ε=1/(Sqrt[1-vt^2] Sqrt[g00]);
  12. vEsc=Quiet@Reduce[ε==1,vt][[2,2]];
  13. "vEsc"->N[vEsc]
  14. vDif=vd/.Solve[(vPro+vd)/(1+vPro vd)==vEsc,vd][[1]];
  15. "vDif"->N[vDif]
  16.  
  17. v1=vDif;
  18. sol=Simplify[Reduce[
  19. (M1/Sqrt[1-v1^2]-M1)+(M2/Sqrt[1-v2^2]-M2)==Ek&&
  20. ((M1 v1)/Sqrt[1-v1^2])+((M2 v2)/Sqrt[1-v2^2])==0&&
  21. Ek>0&&M1>0&&M2>M1&&v1>0&&v2<0,
  22. {Ek,v2}, Reals]];
  23.  
  24. "vRec"->N[sol[[2,2]]]
  25. "Ek"->N[sol[[1,2]]]
RAW Paste Data