summaryrefslogtreecommitdiff
path: root/1646/CH17/EX17.14/Ch017Ex14.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1646/CH17/EX17.14/Ch017Ex14.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1646/CH17/EX17.14/Ch017Ex14.sce')
-rwxr-xr-x1646/CH17/EX17.14/Ch017Ex14.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/1646/CH17/EX17.14/Ch017Ex14.sce b/1646/CH17/EX17.14/Ch017Ex14.sce
new file mode 100755
index 000000000..5ddb72a91
--- /dev/null
+++ b/1646/CH17/EX17.14/Ch017Ex14.sce
@@ -0,0 +1,16 @@
+// Scilab code Ex17.14 : Pg:896 (2011)
+clc;clear;
+e = 1.6e-019; // Charge on an electron, C
+c = 3e+08; // Speed of light, m/s
+B_orbit = 0.5; // Magnetic field at the orbit of the betatron, T
+f = 60; // Operating frequency of the betatron, Hz
+omega = 2*%pi*f; // Angular frequency of operation, rad/s
+r = 1.6/2; // Radius of stable orbit, m
+K_av = 4*omega*e*r^2*B_orbit/1.6e-019; // Average energy gained by the electron per turn, eV
+K_max = c*e*r*B_orbit/1.6e-019; // Maximum energy gained by the eectron, eV
+printf("\nThe average energy gained by the electron per turn = %5.1f eV", K_av);
+printf("\nThe maximum energy gained by the electron = %5.1e eV", K_max);
+
+// Result
+// The average energy gained by the electron per turn = 482.5 eV
+// The maximum energy gained by the electron = 1.2e+008 eV