summaryrefslogtreecommitdiff
path: root/Engineering_Physics/Chapter3.ipynb
diff options
context:
space:
mode:
authorJovina Dsouza2014-07-25 00:00:07 +0530
committerJovina Dsouza2014-07-25 00:00:07 +0530
commitfd5a671b82455b88fd313d8d0bee2793ab27739a (patch)
treee35148d9f2c5d1ee88f62f903b2ca46292b6f568 /Engineering_Physics/Chapter3.ipynb
parentc8733e4b6b4bffcddf7eb45ff1c72ccc837aa3af (diff)
downloadPython-Textbook-Companions-fd5a671b82455b88fd313d8d0bee2793ab27739a.tar.gz
Python-Textbook-Companions-fd5a671b82455b88fd313d8d0bee2793ab27739a.tar.bz2
Python-Textbook-Companions-fd5a671b82455b88fd313d8d0bee2793ab27739a.zip
adding book
Diffstat (limited to 'Engineering_Physics/Chapter3.ipynb')
-rwxr-xr-xEngineering_Physics/Chapter3.ipynb83
1 files changed, 83 insertions, 0 deletions
diff --git a/Engineering_Physics/Chapter3.ipynb b/Engineering_Physics/Chapter3.ipynb
new file mode 100755
index 00000000..9e2d3109
--- /dev/null
+++ b/Engineering_Physics/Chapter3.ipynb
@@ -0,0 +1,83 @@
+{
+ "metadata": {
+ "name": "Chapter3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "3: Fibre Optics and Applications"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 3.1, Page number 84"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nn1 = 1.5; #refractive index of core\nn2 = 1.47; #refractive index of cladding\nn0 = 1; #refractive index of air\na = 180/math.pi; #conversion factor of radian to degree\n\n#Calculation\nNA = math.sqrt((n1**2)-(n2**2)); #numerical aperture\nNA=math.ceil(NA*10)/10; #rounding off to 1 decimal\nalpha_m = math.asin(NA/n0); #acceptance angle(radian)\nalpha_m = alpha_m*a; #acceptance angle(degrees)\nalpha_m=math.ceil(alpha_m*10**2)/10**2; #rounding off to 2 decimals\nphi_m = math.asin(NA/n1); #phase angle(radian)\nphi_m = phi_m*a; #phase angle(degrees)\nphi_m=math.ceil(phi_m*10**2)/10**2; #rounding off to 2 decimals\ntheta_c = math.asin(n2/n1); #critical angle(radian)\ntheta_c = theta_c*a; #critical angle(degrees)\ntheta_c=math.ceil(theta_c*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint \"numerical aperture is\",NA\nprint \"acceptance angle is\",alpha_m,\"degrees\"\nprint \"phase angle is\",phi_m,\"degrees\"\nprint \"critical angle is\",theta_c,\"degrees\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "numerical aperture is 0.3\nacceptance angle is 17.46 degrees\nphase angle is 11.54 degrees\ncritical angle is 78.522 degrees\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 3.2, Page number 85"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nn1 = 1.5; #refractive index of core\nn2 = 1.47; #refractive index of cladding\nc = 3*10**8; #velocity of light(m/sec)\n\n#Calculation\ndeltatbyL = (n1/n2)*((n1-n2)/c);\n\n#Result\nprint \"pulse broadening per unit length is\",deltatbyL,\"s/m\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "pulse broadening per unit length is 1.02040816327e-10 s/m\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 3.3, Page number 85"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nphi_m = 11.54; #phase angle(degrees)\na = 0.5*10**-4;\nx = math.pi/180; #conversion factor from degrees to radians\n\n#Calculation\nphi_m = phi_m*x; #phase angle(radian)\nL = a/math.tan(phi_m); #length(m)\nn = 1/(2*L); #total number of internal reflections(m-1)\n\n#Result\nprint \"alpha = 0 rays have no reflection. hence there are zero reflections for 1 metre.\"\nprint \"alpha = alpha_m rays have\",int(n),\"m-1 internal reflections\"\nprint \"answer given in the book is wrong\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "alpha = 0 rays have no reflection. hence there are zero reflections for 1 metre.\nalpha = alpha_m rays have 2041 m-1 internal reflections\nanswer given in the book is wrong\n"
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file