summaryrefslogtreecommitdiff
path: root/3710/CH8/EX8.11/Ex8_11.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3710/CH8/EX8.11/Ex8_11.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3710/CH8/EX8.11/Ex8_11.sce')
-rw-r--r--3710/CH8/EX8.11/Ex8_11.sce34
1 files changed, 34 insertions, 0 deletions
diff --git a/3710/CH8/EX8.11/Ex8_11.sce b/3710/CH8/EX8.11/Ex8_11.sce
new file mode 100644
index 000000000..e1057542a
--- /dev/null
+++ b/3710/CH8/EX8.11/Ex8_11.sce
@@ -0,0 +1,34 @@
+//Example 8.11, Page Number 396
+//The Function fpround(dependency) is used to round a floating point number x to n decimal places
+//Rayleigh scattering loss
+clc;
+
+l=1*(10**-6) //Wavelength in meter
+l1=10**3 //Length of the Fiber in kilometer
+n=1.45 //Refractive Index
+p=0.286
+B=7*(10**-11) //in meter square per Newton
+T=1400 //in kelvin
+k=1.38*(10**-23) //Boltzman Constant in meter square kilogram per second square Kelvin
+
+//From equation 8.38
+ar=((8*(%pi**3))/(3*(l**4)))*((n**8)*B*T*k*(p**2)) //ar is the attenuation due to Rayleigh scattering per meter
+ar=fpround(ar,6)
+mprintf("The Attenuation due to Rayleigh scattering in a silica fiber is %.2e /m\n",ar)
+
+i1=(ar*-1*l1)
+j=exp(i1)
+L=-10*log10(j) //L is the given loss generated from attenuation in dB
+L=fpround(L,5)
+mprintf(" The Total loss due to Attenuation is %.2f db/km\n",L)
+
+//at a wavelength of 1.55 micro meter
+l=1.55*(10**-6) //new Wavelength in meters
+
+ar=((8*(%pi**3))/(3*(l**4)))*((n**8)*B*T*k*(p**2)) //ar is the attenuation due to Rayleigh scattering per meter
+ar=fpround(ar,6)
+mprintf(" The Attenuation due to Rayleigh scattering in a silica fiber is %.1e /m\n",ar)
+
+L=-10*log10(exp(ar*-1*l1)) //L is the given loss generated from attenuation in dB
+L=fpround(L,2)
+mprintf(" The Total loss due to Attenuation is %.2f db/km",L)