summaryrefslogtreecommitdiff
path: root/3717/CH20/EX20.2/Ex20_2.sce
blob: 876e9155bdaac5b1863e6d22cfc847cbc4109b35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Ex20_2 Page:391 (2014)
clc;clear;
q = 1.6e-019;    // Charge on an electron, C
e = 1.6e-019;    // Energy equivalent of 1 eV, J/eV
m = 1.67e-027;    // Mass of a proton, kg
B = 2;    // Applied magnetic field, T
R = 0.25;    // Maximum radius of cyclotron, m
f = q*B/(2*%pi*m);    // Frequency needed for applying alternating voltage, Hz
K = (q*B*R)^2/(2*m);    // Kinetic energy of protons when they leave the cyclotron, J
printf("\nThe frequency needed for applying alternating voltage = %4.1f MHz", f/1e+006);
printf("\nThe kinetic energy of protons when they leave the cyclotron = %2d MeV", ceil(K/(e*1e+006)));

// Result
// The frequency needed for applying alternating voltage = 30.5 MHz
// The kinetic energy of protons when they leave the cyclotron = 12 MeV