diff options
author | hardythe1 | 2015-06-11 17:31:11 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-11 17:31:11 +0530 |
commit | 251a07c4cbed1a5a960f5ed416ce6ac13c8152b7 (patch) | |
tree | cb7f084fad6d7ee6ae89e586fad0e909b5408319 /Engineering_Physics_by_P.K.Palanisamy/Chapter12.ipynb | |
parent | 47d7279a724246ef7aa0f5359cf417992ed04449 (diff) | |
download | Python-Textbook-Companions-251a07c4cbed1a5a960f5ed416ce6ac13c8152b7.tar.gz Python-Textbook-Companions-251a07c4cbed1a5a960f5ed416ce6ac13c8152b7.tar.bz2 Python-Textbook-Companions-251a07c4cbed1a5a960f5ed416ce6ac13c8152b7.zip |
add books
Diffstat (limited to 'Engineering_Physics_by_P.K.Palanisamy/Chapter12.ipynb')
-rwxr-xr-x | Engineering_Physics_by_P.K.Palanisamy/Chapter12.ipynb | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter12.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter12.ipynb new file mode 100755 index 00000000..93ea352e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter12.ipynb @@ -0,0 +1,159 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#12: Lasers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.1, Page number 12.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative population is 1.0764 *10**-30\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "h=6.6*10**-34; #planck's constant(J sec)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "lamda=6943*10**-10; #wavelength(m)\n",
+ "k=8.61*10**-5;\n",
+ "T=300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "dE=h*c/(e*lamda);\n",
+ "N2byN1=math.exp(-dE/(k*T)); #relative population\n",
+ "\n",
+ "#Result\n",
+ "print \"relative population is\",round(N2byN1*10**30,4),\"*10**-30\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.2, Page number 12.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "divergence is 1.0 milli radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a1=4*10**-3; #diameter(m)\n",
+ "a2=6*10**-3; #diameter(m)\n",
+ "d1=1; #distance(m)\n",
+ "d2=2; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=(a2-a1)/(2*(d2-d1)); #divergence(radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"divergence is\",theta*10**3,\"milli radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.3, Page number 12.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "spot size is 0.867 micro m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "s=1*10**-3; #size(m)\n",
+ "l=1*10**-3; #length(m)\n",
+ "lamda=650*10**-9; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "tantheta=(l/2)/s; \n",
+ "theta=math.atan(tantheta); #angle(radian)\n",
+ "sintheta=round(math.sin(theta),2);\n",
+ "ss=0.6*lamda/sintheta; #spot size(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"spot size is\",round(ss*10**6,3),\"micro m\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
|