diff options
author | Jovina Dsouza | 2014-07-07 16:34:28 +0530 |
---|---|---|
committer | Jovina Dsouza | 2014-07-07 16:34:28 +0530 |
commit | fffcc90da91b66ee607066d410b57f34024bd1de (patch) | |
tree | 7b8011d61013305e0bf7794a275706abd1fdb0d3 /Applied_Physics_II/Chapter_4.ipynb | |
parent | 299711403e92ffa94a643fbd960c6f879639302c (diff) | |
download | Python-Textbook-Companions-fffcc90da91b66ee607066d410b57f34024bd1de.tar.gz Python-Textbook-Companions-fffcc90da91b66ee607066d410b57f34024bd1de.tar.bz2 Python-Textbook-Companions-fffcc90da91b66ee607066d410b57f34024bd1de.zip |
adding book
Diffstat (limited to 'Applied_Physics_II/Chapter_4.ipynb')
-rwxr-xr-x | Applied_Physics_II/Chapter_4.ipynb | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/Applied_Physics_II/Chapter_4.ipynb b/Applied_Physics_II/Chapter_4.ipynb new file mode 100755 index 00000000..f94b4b09 --- /dev/null +++ b/Applied_Physics_II/Chapter_4.ipynb @@ -0,0 +1,141 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Lasers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.1, Page number 4-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "P = 3.147*10**-3 #output power(W)\n", + "t = 60 #time(sec)\n", + "lamda = 632.8*10**-9 #wavelength(m)\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "\n", + "#Calculations\n", + "N = (P*t*lamda)/(h*c)\n", + "\n", + "#Result\n", + "print \"No. of photons emittd each minute is\",round(N/1e+17),\"*10^17\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of photons emittd each minute is 6.0 *10^17\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.2, Page number 4-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T = 300 #temperature(K)\n", + "lamda = 694.3*10**-9 #wavelength(m)\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "k = 1.38*10**-23 #Boltman's constant(J/K)\n", + "\n", + "#Calculations\n", + "N2_by_N1 = math.exp((-h*c)/(lamda*k*T))\n", + " \n", + "#Result\n", + "print \"Ratio of population =\",round(N2_by_N1/1e-31,3),\"*10^-31\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of population = 8.874 *10^-31\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.3, Page number 4-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "P = 100*10**3 #output power(W)\n", + "t = 20*10**-9 #time(sec)\n", + "N = 6.981*10**15 #no. of photons\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "\n", + "#Calculations\n", + "lamda = (N*h*c)/(P*t)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-10),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 6943.0 A\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |