Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*Adjustables*)
- B = 1.2;
- rfvoltage = 18000;
- (*constants and useful functions*)
- c = 2.998*10^8;
- q = 1.60*10^-19 ;
- m0 = 1.672622*10^-27;
- lorentz[r_] := Sqrt[1 + 0.1466032475398677* r^2];
- timearound[r_] := Pi*r/(c* Sqrt[1 - 1/((lorentz[r])^2)]);
- kinetic[r_] := (lorentz[r] - 1)*m0*c^2;
- radiusfromkinetic[
- ke_] := (r /. (Solve[(lorentz[r] - 1)*m0*c^2 == ke, r][[2]]));
- freqr[r_] := q*B/(lorentz[r]* m0*2*Pi);
- rad = radiusfromkinetic[q*rfvoltage];
- tbegin = 0;
- pieces = {};
- While[rad < .16, tfin = timearound[rad] + tbegin;
- AppendTo[pieces, {rad, t >= tbegin && t < tfin}]; tbegin = tfin;
- rad = radiusfromkinetic[kinetic[rad] + q*rfvoltage]]
- Plot[Piecewise[pieces], {x, 0, 3*10^-6}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement