summaryrefslogtreecommitdiff
path: root/Engineering_Physics/Chapter3.ipynb
diff options
context:
space:
mode:
authorhardythe12014-07-25 12:32:04 +0530
committerhardythe12014-07-25 12:32:04 +0530
commitdccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5 (patch)
tree88c95b7c5d4bccfbcb2bdf16bf2bef0b73184808 /Engineering_Physics/Chapter3.ipynb
parentf2be2edf7d59ab0147b675ed707ebed209b3dcba (diff)
downloadPython-Textbook-Companions-dccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5.tar.gz
Python-Textbook-Companions-dccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5.tar.bz2
Python-Textbook-Companions-dccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5.zip
adding books
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