summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (patch)
treedb67ac5738a18b921d9a8cf6e86f402703f30bdf /Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb
parent37d315828bbfc0f5cabee669d2b9dd8cd17b5154 (diff)
downloadPython-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.gz
Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.bz2
Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.zip
add/remove books
Diffstat (limited to 'Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb')
-rwxr-xr-xEngineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb114
1 files changed, 114 insertions, 0 deletions
diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb
new file mode 100755
index 00000000..8645ed7b
--- /dev/null
+++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter6.ipynb
@@ -0,0 +1,114 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9517150eeae7e7bf9389a01495b7c5d59b808d0c5432252a5c80e780ef687d70"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "6: Fiber Optics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.1, Page number 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5; #refractive index of core\n",
+ "n2 = 1.0; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "thetac = math.asin(n2/n1); #critical angle(radian)\n",
+ "thetac = thetac*180/math.pi; #critical angle(degrees)\n",
+ "thetac = math.ceil(thetac*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical angle is\",thetac,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical angle is 41.82 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.2, Page number 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.5; #refractive index of core\n",
+ "n2 = 1.47; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "thetac = math.asin(n2/n1); #critical angle(radian)\n",
+ "thetac = thetac*180/math.pi; #critical angle(degrees)\n",
+ "thetac = math.ceil(thetac*10**2)/10**2; #rounding off to 2 decimals\n",
+ "NA = math.sqrt(n1**2-n2**2); #numerical aperture of fiber\n",
+ "NA = math.ceil(NA*10)/10; #rounding off to 1 decimal\n",
+ "thetaa = math.asin(NA); #acceptance angle(radian)\n",
+ "thetaa = thetaa*180/math.pi; #acceptance angle(degrees)\n",
+ "thetaa = math.ceil(thetaa*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical angle is\",thetac,\"degrees\"\n",
+ "print \"numerical aperture of fiber is\",NA\n",
+ "print \"acceptance angle is\",thetaa,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical angle is 78.53 degrees\n",
+ "numerical aperture of fiber is 0.3\n",
+ "acceptance angle is 17.46 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file