Advertisement
Guest User

y u no work

a guest
Nov 20th, 2015
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. (*Adjustables*)
  2. B = 1.2;
  3. rfvoltage = 18000;
  4.  
  5.  
  6. (*constants and useful functions*)
  7. c = 2.998*10^8;
  8. q = 1.60*10^-19 ;
  9. m0 = 1.672622*10^-27;
  10.  
  11. lorentz[r_] := Sqrt[1 + 0.1466032475398677* r^2];
  12. timearound[r_] := Pi*r/(c* Sqrt[1 - 1/((lorentz[r])^2)]);
  13. kinetic[r_] := (lorentz[r] - 1)*m0*c^2;
  14. radiusfromkinetic[
  15. ke_] := (r /. (Solve[(lorentz[r] - 1)*m0*c^2 == ke, r][[2]]));
  16. freqr[r_] := q*B/(lorentz[r]* m0*2*Pi);
  17.  
  18.  
  19. rad = radiusfromkinetic[q*rfvoltage];
  20. tbegin = 0;
  21. pieces = {};
  22. While[rad < .16, tfin = timearound[rad] + tbegin;
  23. AppendTo[pieces, {rad, t >= tbegin && t < tfin}]; tbegin = tfin;
  24. rad = radiusfromkinetic[kinetic[rad] + q*rfvoltage]]
  25. Plot[Piecewise[pieces], {x, 0, 3*10^-6}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement