Yukterez

Newtonian Escape & Recoil Solver

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