summaryrefslogtreecommitdiff
path: root/Engineering_Physics/Chapter_2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Engineering_Physics/Chapter_2.ipynb')
-rw-r--r--Engineering_Physics/Chapter_2.ipynb238
1 files changed, 238 insertions, 0 deletions
diff --git a/Engineering_Physics/Chapter_2.ipynb b/Engineering_Physics/Chapter_2.ipynb
new file mode 100644
index 00000000..f57dc5cb
--- /dev/null
+++ b/Engineering_Physics/Chapter_2.ipynb
@@ -0,0 +1,238 @@
+{
+ "metadata": {
+ "name": "Chapter 2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Laser"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.1, Page number 59 "
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the number of photons emitted by laser\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nlamda=632.8*10**-9; #wavelength in m\nP=5*10**-3; #output power in W\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\nN=P/E; #number of photons emitted\n\n\n#Result\nprint(\"energy of one photon in eV is\",E_eV);\nprint(\"number of photons emitted per second is\",N);\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('energy of one photon in eV is', 1.964)\n('number of photons emitted per second is', 1.5917094275077976e+16)\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.2, Page number 60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the energy of emitted photons\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nlamda=632.8*10**-9; #wavelength in m\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\n\n#Result\nprint(\"energy of one photon in eV is\",E_eV);\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('energy of one photon in eV is', 1.964)\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.3, Page number 60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the value of E3\n\n#importing modules\nimport math\n\n#Variable declaration\nE1=0; #value of 1st energy level in eV\nE2=1.4; #value of 2nd energy level in eV\nlamda=1.15*10**-6;\nh=6.626*10**-34;\nc=3*10**8;\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE3=E2+E_eV;\nE3=math.ceil(E3*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"value of E3 in eV is\",E3);\n\n#answer given in the book for E3 is wrong",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('value of E3 in eV is', 2.49)\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.4, Page number 60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the wavelength of laser beam\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nE2=3.2; #value of higher energy level in eV\nE1=1.6; #value of lower energy level in eV\n\n#Calculation\nE=E2-E1; #energy difference in eV\nE_J=E*1.6*10**-19; #converting E from eV to J\nlamda=(h*c)/E_J; #wavelength of photon\n\n#Result\nprint(\"energy difference in eV\",E);\nprint(\"wavelength of photon in m\",lamda);\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('energy difference in eV', 1.6)\n('wavelength of photon in m', 7.76484375e-07)\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.5, Page number 60"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the wavelength of laser beam\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nE=1.42*1.6*10**-19; #band gap of GaAs in J\n\n#Calculation\nlamda=(h*c)/E; #wavelength of laser\n\n#Result\nprint(\"wavelength of laser emitted by GaAs in m\",lamda);\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('wavelength of laser emitted by GaAs in m', 8.74911971830986e-07)\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.6, Page number 61"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the relative population of energy levels\n\n#importing modules\nimport math\n\n#Variable declaration\nT=300; #temperature in K\nlamda=500*10**-9; #wavelength in m\nh=6.626*10**-34;\nc=3*10**8;\nk=1.38*10**-23;\n\n#Calculation\n#from maxwell and boltzmann law, relative population is given by\n#N1/N2=exp(-E1/kT)/exp(-E2/kT)\n#hence N1/N2=exp(-(E1-E2)/kT)=exp((h*new)/(k*T));\n#new=c/lambda\nR=(h*c)/(lamda*k*T);\nRP=math.exp(R);\n\n#Result\nprint(\"relative population between N1 and N2 is\",RP);\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('relative population between N1 and N2 is', 5.068255595981255e+41)\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.7, Page number 61"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To examine the possibility of stimulated emission\n\n#importing modules\nimport math\n\n#Variable declaration\nT=300; #temperature in K\nh=6.626*10**-34;\nc=3*10**8;\nk=1.38*10**-23;\nlamda=600*10**-9; #wavelength in m\n\n#Calculation\nR=(h*c)/(lamda*k*T);\nRs=1/(math.exp(R)-1);\n\n#Result\nprint(\"the ratio between stimulated emission to spontaneous emission is\",Rs);\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('the ratio between stimulated emission to spontaneous emission is', 1.7617782449453023e-35)\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.8, Page number 62"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the efficiency of a He-Ne laser\n\n#importing modules\nimport math\n\n#Variable declaration\nP=5*10**-3; #output power in W\nI=10*10**-3; #current in A\nV=3*10**3; #voltage in V\n\n#Calculation\ne=(P*100)/(I*V);\ne=math.ceil(e*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"efficiency of laser in % is\",e);\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('efficiency of laser in % is', 0.016667)\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.9, Page number 62"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the intensity of laser beam\n\n#importing modules\nimport math\n\n#Variable declaration\nP=1e-03; #output power in W\nd=1e-06; #diameter in m\n\n#Calculation\nr=d/2; #radius in m\nI=P/(math.pi*r**2); #intensity\nI=I/10**9;\nI=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"intensity of laser in W/m^2 is\",I,\"*10**9\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('intensity of laser in W/m^2 is', 1.2733, '*10**9')\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.10, Page number 62"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#To calculate the angular speed and divergence of laser beam\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda=632.8*10**-9; #wavelength in m\nD=5; #distance in m\nd=1*10**-3; #diameter in m\n\n#Calculation\ndeltatheta=lamda/d; #angular speed\ndelta_theta=deltatheta*10**4;\nr=D*deltatheta;\nr1=r*10**3; #converting r from m to mm\nA=math.pi*r**2; #area of the spread\n\n#Result \nprint(\"angular speed in radian is\",delta_theta,\"*10**-4\");\nprint(\"radius of the spread in mm is\",r1);\nprint(\"area of the spread in m^2 is\",A);\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('angular speed in radian is', 6.328, '*10**-4')\n('radius of the spread in mm is', 3.164)\n('area of the spread in m^2 is', 3.1450157329451454e-05)\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file