diff options
Diffstat (limited to '767/CH6/EX6.5.2/Ch06Exa6_5_2.sci')
-rwxr-xr-x | 767/CH6/EX6.5.2/Ch06Exa6_5_2.sci | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/767/CH6/EX6.5.2/Ch06Exa6_5_2.sci b/767/CH6/EX6.5.2/Ch06Exa6_5_2.sci new file mode 100755 index 000000000..f4f43cd71 --- /dev/null +++ b/767/CH6/EX6.5.2/Ch06Exa6_5_2.sci @@ -0,0 +1,13 @@ +// Scilab code Exa6.5.2 : To calculate the length of the first and last drift tubes which accelerate the protons whose frequency and energies are given. Page 268 (2011)
+f = 200e+06; // Frequency of applied the voltage, Hz
+V_0 = 750e+03; // Applied potential difference, V
+q = 1.6e-019; // Charge of proton, C
+m = 1.67e-027; // Mass of proton, Kg
+n_1 = 1; // For first tube
+L_1 = sqrt(2*n_1*q*V_0/m)/(2*f); // Length of the first tube, m
+n_n = 128; // For last tube
+L_n = 1/(2*f)*sqrt(2*n_n*q*V_0/m); // Length of the last tube,m
+printf("\n Length of the first tube = %4.2f m \n Length of the last tube = %4.2f m ", L_1,L_n);
+// Result
+// Length of the first tube = 0.03 m
+// Length of the last tube = 0.34 m
\ No newline at end of file |