diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | db0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch) | |
tree | b95975d958cba9af36cb1680e3f77205354f6512 /Engineering_Physics_by_P.K.Palanisamy | |
parent | 5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff) | |
download | Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2 Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip |
add books
Diffstat (limited to 'Engineering_Physics_by_P.K.Palanisamy')
32 files changed, 9998 insertions, 0 deletions
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter10_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter10_1.ipynb new file mode 100755 index 00000000..e1e3146e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter10_1.ipynb @@ -0,0 +1,410 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#10: Dielectric properties"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.1, Page number 10.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy stored in the condenser is 1.0 J\n",
+ "energy stored in the dielectric is 0.99 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=2*10**-6; #capacitance(F)\n",
+ "V=1000; #voltage(V)\n",
+ "epsilon_r=100;\n",
+ "\n",
+ "#Calculation\n",
+ "W=C*V**2/2; #energy stored in the condenser(J)\n",
+ "C0=C/epsilon_r;\n",
+ "W0=C0*V**2/2;\n",
+ "E=1-W0; #energy stored in the dielectric(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy stored in the condenser is\",W,\"J\"\n",
+ "print \"energy stored in the dielectric is\",E,\"J\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.2, Page number 10.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio betwen electronic and ionic polarizability is 1.738\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon_r=4.94;\n",
+ "n2=2.69;\n",
+ "\n",
+ "#Calculation\n",
+ "x=(epsilon_r-1)/(epsilon_r+2);\n",
+ "y=(n2-1)/(n2+2);\n",
+ "r=(x/y)-1; #ratio betwen electronic and ionic polarizability\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio betwen electronic and ionic polarizability is\",round(1/r,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.3, Page number 10.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "parallel loss resistance is 10.0 ohm\n",
+ "answer varies due to rounding off errors\n",
+ "parallel loss capacitance is 226.56 *10**-12 Farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon_r=2.56;\n",
+ "epsilon_R=2.65*0.7*10**-4;\n",
+ "tan_delta=0.7*10**-4; \n",
+ "A=8*10**-4; #area(m**2)\n",
+ "d=0.08*10**-3; #diameter(m)\n",
+ "f=1*10**6; #frequency(Hz)\n",
+ "epsilon0=8.85*10**-12;\n",
+ "\n",
+ "#Calculation\n",
+ "Rp=d/(2*math.pi*f*epsilon0*epsilon_R*A); #parallel loss resistance(ohm)\n",
+ "Cp=A*epsilon0*epsilon_r/d; #parallel loss capacitance(Farad)\n",
+ "\n",
+ "#Result\n",
+ "print \"parallel loss resistance is\",round(Rp/10**6),\"ohm\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"parallel loss capacitance is\",round(Cp*10**12,2),\"*10**-12 Farad\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.4, Page number 10.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dielectric constant of material is 1.339\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=3*10**28; #number of atoms(per m**3)\n",
+ "alphae=10**-40; \n",
+ "epsilon0=8.854*10**-12;\n",
+ "\n",
+ "#Calculation\n",
+ "epsilon_r=1+(N*alphae/epsilon0); #dielectric constant of material\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric constant of material is\",round(epsilon_r,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.5, Page number 10.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electronic polarizability is 2.243 *10**-41 Fm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=2.7*10**25; #number of atoms(per m**3)\n",
+ "epsilon0=8.854*10**-12;\n",
+ "epsilon_r=1.0000684;\n",
+ "\n",
+ "#Calculation\n",
+ "alphae=epsilon0*(epsilon_r-1)/N; #electronic polarizability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarizability is\",round(alphae*10**41,3),\"*10**-41 Fm**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.6, Page number 10.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "capacitance is 8.85e-12 F\n",
+ "charge on plates is 8.85e-10 coulomb\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon0=8.85*10**-12;\n",
+ "A=100*10**-4; #area(m**2)\n",
+ "d=10**-2; #diameter(m)\n",
+ "V=100; #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "C=epsilon0*A/d; #capacitance(F)\n",
+ "Q=C*V; #charge on plates(coulomb)\n",
+ "\n",
+ "#Result\n",
+ "print \"capacitance is\",C,\"F\"\n",
+ "print \"charge on plates is\",Q,\"coulomb\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.7, Page number 10.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electronic polarizability is 3.181 *10**-40 Fm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=6.02*10**26; #avagadro number\n",
+ "d=2050; #density(kg/m**3)\n",
+ "w=32; #atomic weight\n",
+ "gama=1/3; #internal field constant\n",
+ "epsilon0=8.55*10**-12;\n",
+ "epsilon_r=3.75;\n",
+ "\n",
+ "#Calculation\n",
+ "N=n*d/w; #number of atoms(per m**3)\n",
+ "alphae=3*epsilon0*((epsilon_r-1)/(epsilon_r+2))/N; #electronic polarizability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarizability is\",round(alphae*10**40,3),\"*10**-40 Fm**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.8, Page number 10.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resultant voltage is 39.73 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Q=2*10**-10; #charge(C)\n",
+ "d=4*10**-3; #seperation(m)\n",
+ "epsilon_r=3.5;\n",
+ "A=650*10**-6; #area(m**2)\n",
+ "epsilon0=8.85*10**-12;\n",
+ "\n",
+ "#Calculation\n",
+ "V=Q*d/(epsilon0*epsilon_r*A); #resultant voltage(V)\n",
+ "\n",
+ "#Result\n",
+ "print \"resultant voltage is\",round(V,2),\"Volts\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.9, Page number 10.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dielectric displacement is 265.5 *10**-9 C m**-2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=2*10**-3; #seperation(m)\n",
+ "epsilon_r=6;\n",
+ "V=10; #voltage(V)\n",
+ "epsilon0=8.85*10**-12;\n",
+ "\n",
+ "#Calculation\n",
+ "E=V/d;\n",
+ "D=epsilon0*epsilon_r*E; #dielectric displacement(C m**-2)\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric displacement is\",round(D*10**9,1),\"*10**-9 C m**-2\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter10_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter10_2.ipynb new file mode 100755 index 00000000..e1e3146e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter10_2.ipynb @@ -0,0 +1,410 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#10: Dielectric properties"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.1, Page number 10.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy stored in the condenser is 1.0 J\n",
+ "energy stored in the dielectric is 0.99 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=2*10**-6; #capacitance(F)\n",
+ "V=1000; #voltage(V)\n",
+ "epsilon_r=100;\n",
+ "\n",
+ "#Calculation\n",
+ "W=C*V**2/2; #energy stored in the condenser(J)\n",
+ "C0=C/epsilon_r;\n",
+ "W0=C0*V**2/2;\n",
+ "E=1-W0; #energy stored in the dielectric(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy stored in the condenser is\",W,\"J\"\n",
+ "print \"energy stored in the dielectric is\",E,\"J\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.2, Page number 10.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio betwen electronic and ionic polarizability is 1.738\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon_r=4.94;\n",
+ "n2=2.69;\n",
+ "\n",
+ "#Calculation\n",
+ "x=(epsilon_r-1)/(epsilon_r+2);\n",
+ "y=(n2-1)/(n2+2);\n",
+ "r=(x/y)-1; #ratio betwen electronic and ionic polarizability\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio betwen electronic and ionic polarizability is\",round(1/r,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.3, Page number 10.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "parallel loss resistance is 10.0 ohm\n",
+ "answer varies due to rounding off errors\n",
+ "parallel loss capacitance is 226.56 *10**-12 Farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon_r=2.56;\n",
+ "epsilon_R=2.65*0.7*10**-4;\n",
+ "tan_delta=0.7*10**-4; \n",
+ "A=8*10**-4; #area(m**2)\n",
+ "d=0.08*10**-3; #diameter(m)\n",
+ "f=1*10**6; #frequency(Hz)\n",
+ "epsilon0=8.85*10**-12;\n",
+ "\n",
+ "#Calculation\n",
+ "Rp=d/(2*math.pi*f*epsilon0*epsilon_R*A); #parallel loss resistance(ohm)\n",
+ "Cp=A*epsilon0*epsilon_r/d; #parallel loss capacitance(Farad)\n",
+ "\n",
+ "#Result\n",
+ "print \"parallel loss resistance is\",round(Rp/10**6),\"ohm\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"parallel loss capacitance is\",round(Cp*10**12,2),\"*10**-12 Farad\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.4, Page number 10.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dielectric constant of material is 1.339\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=3*10**28; #number of atoms(per m**3)\n",
+ "alphae=10**-40; \n",
+ "epsilon0=8.854*10**-12;\n",
+ "\n",
+ "#Calculation\n",
+ "epsilon_r=1+(N*alphae/epsilon0); #dielectric constant of material\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric constant of material is\",round(epsilon_r,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.5, Page number 10.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electronic polarizability is 2.243 *10**-41 Fm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=2.7*10**25; #number of atoms(per m**3)\n",
+ "epsilon0=8.854*10**-12;\n",
+ "epsilon_r=1.0000684;\n",
+ "\n",
+ "#Calculation\n",
+ "alphae=epsilon0*(epsilon_r-1)/N; #electronic polarizability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarizability is\",round(alphae*10**41,3),\"*10**-41 Fm**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.6, Page number 10.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "capacitance is 8.85e-12 F\n",
+ "charge on plates is 8.85e-10 coulomb\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon0=8.85*10**-12;\n",
+ "A=100*10**-4; #area(m**2)\n",
+ "d=10**-2; #diameter(m)\n",
+ "V=100; #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "C=epsilon0*A/d; #capacitance(F)\n",
+ "Q=C*V; #charge on plates(coulomb)\n",
+ "\n",
+ "#Result\n",
+ "print \"capacitance is\",C,\"F\"\n",
+ "print \"charge on plates is\",Q,\"coulomb\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.7, Page number 10.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electronic polarizability is 3.181 *10**-40 Fm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=6.02*10**26; #avagadro number\n",
+ "d=2050; #density(kg/m**3)\n",
+ "w=32; #atomic weight\n",
+ "gama=1/3; #internal field constant\n",
+ "epsilon0=8.55*10**-12;\n",
+ "epsilon_r=3.75;\n",
+ "\n",
+ "#Calculation\n",
+ "N=n*d/w; #number of atoms(per m**3)\n",
+ "alphae=3*epsilon0*((epsilon_r-1)/(epsilon_r+2))/N; #electronic polarizability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarizability is\",round(alphae*10**40,3),\"*10**-40 Fm**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.8, Page number 10.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resultant voltage is 39.73 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Q=2*10**-10; #charge(C)\n",
+ "d=4*10**-3; #seperation(m)\n",
+ "epsilon_r=3.5;\n",
+ "A=650*10**-6; #area(m**2)\n",
+ "epsilon0=8.85*10**-12;\n",
+ "\n",
+ "#Calculation\n",
+ "V=Q*d/(epsilon0*epsilon_r*A); #resultant voltage(V)\n",
+ "\n",
+ "#Result\n",
+ "print \"resultant voltage is\",round(V,2),\"Volts\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.9, Page number 10.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dielectric displacement is 265.5 *10**-9 C m**-2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=2*10**-3; #seperation(m)\n",
+ "epsilon_r=6;\n",
+ "V=10; #voltage(V)\n",
+ "epsilon0=8.85*10**-12;\n",
+ "\n",
+ "#Calculation\n",
+ "E=V/d;\n",
+ "D=epsilon0*epsilon_r*E; #dielectric displacement(C m**-2)\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric displacement is\",round(D*10**9,1),\"*10**-9 C m**-2\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter11_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter11_1.ipynb new file mode 100755 index 00000000..43338be1 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter11_1.ipynb @@ -0,0 +1,529 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#11: Magnetic properties"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.1, Page number 11.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative permeability of iron is 2154\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",
+ "M=1.4; #magnetic field(T)\n",
+ "H=6.5*10**-4; #magnetic field(T)\n",
+ "\n",
+ "#Calculation\n",
+ "chi=M/H;\n",
+ "mew_r=1+chi; #relative permeability of iron\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability of iron is\",int(mew_r)\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.2, Page number 11.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative permeability is 16\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=3300; #magnetic field(amp/m)\n",
+ "H=220; #magnetic field(amp/m)\n",
+ "\n",
+ "#Calculation\n",
+ "chi=M/H;\n",
+ "mew_r=1+chi; #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability is\",int(mew_r)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.3, Page number 11.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetisation of material is 1.5 *10**3 A/m\n",
+ "flux density is 1.2585 T\n",
+ "answer given in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H=10**6; #magnetic field(amp/m)\n",
+ "chi=1.5*10**-3;\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "\n",
+ "#Calculation\n",
+ "M=chi*H; #magnetisation of material(A/m)\n",
+ "B=mew0*(M+H); #flux density(T)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M/10**3,\"*10**3 A/m\"\n",
+ "print \"flux density is\",round(B,4),\"T\"\n",
+ "print \"answer given in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.4, Page number 11.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetisation of material is 37.0 A/m\n",
+ "flux density is 0.0126 wb/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H=10**4; #magnetic field(amp/m)\n",
+ "chi=3.7*10**-3;\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "\n",
+ "#Calculation\n",
+ "M=chi*H; #magnetisation of material(A/m)\n",
+ "B=mew0*(M+H); #flux density(T)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M,\"A/m\"\n",
+ "print \"flux density is\",round(B,4),\"wb/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.5, Page number 11.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetic moment is 7.854 *10**-3 Am**2\n",
+ "answer given in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=5*10**-2 #radius(m)\n",
+ "I=500*10**-3; #current(A)\n",
+ "\n",
+ "#Calculation\n",
+ "A=2*math.pi*r**2;\n",
+ "mew_m=I*A; #magnetic moment(Am**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment is\",round(mew_m*10**3,3),\"*10**-3 Am**2\"\n",
+ "print \"answer given in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.6, Page number 11.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "change in magnetic moment is 3.943 *10**-29 Am**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=5.29*10**-11; #radius(m)\n",
+ "B=2; #magnetic field(T)\n",
+ "e=1.602*10**-19; #charge(c)\n",
+ "m=9.108*10**-31; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "mew_ind=e**2*r**2*B/(4*m); #change in magnetic moment(Am**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in magnetic moment is\",round(mew_ind*10**29,3),\"*10**-29 Am**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.7, Page number 11.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "susceptibility is 3.267 *10**-4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "chi1=2.8*10**-4; #susceptibility\n",
+ "T1=350; #temperature(K)\n",
+ "T2=300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "chi2=chi1*T1/T2; #susceptibility\n",
+ "\n",
+ "#Result\n",
+ "print \"susceptibility is\",round(chi2*10**4,3),\"*10**-4\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.8, Page number 11.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetic moment is 0.61 mewB\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Bs=0.65; #magnetic induction(wb/m**2)\n",
+ "d=8906; #density(kg/m**3)\n",
+ "n=6.025*10**26; #avagadro number\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "w=58.7; #atomic weight(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "N=d*n/w; #number of nickel atoms(per m**3)\n",
+ "mew_m=Bs/(N*mew0*9.27*10**-24); #magnetic moment(mewB)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment is\",round(mew_m,2),\"mewB\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.9, Page number 11.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "temperature is 3.9 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew=9.4*10**-24; \n",
+ "H=2; #magnetic field(weber/m**2)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "T=2*mew*H/(math.log(2)*k); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T,1),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.10, Page number 11.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetic moment per gram 1966.851 Am**2\n",
+ "magnetic moment per gram is 2.4716 Wb/m**2\n",
+ "answer given in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=7.8*10**3; #density(kg/m**3)\n",
+ "n=6.025*10**26; #number of atoms\n",
+ "w=157.26; #atomic weight(kg)\n",
+ "mewm=9.27*10**-24;\n",
+ "mew=7.1*mewm;\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "\n",
+ "#Calculation\n",
+ "N=d*n/w; #number of atoms\n",
+ "mew_B=N*mew/10**3; #magnetic moment per gram(Am**2)\n",
+ "Bs=N*mew0*mew;\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment per gram\",round(mew_B,3),\"Am**2\"\n",
+ "print \"magnetic moment per gram is\",round(Bs,4),\"Wb/m**2\"\n",
+ "print \"answer given in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.11, Page number 11.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical field is 0.02166 Tesla\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tc=3.7; #temperature(K)\n",
+ "Hc0=0.0306; #critical field(T)\n",
+ "T=2; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc2=Hc0*(1-(T/Tc)**2); #critical field(T)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical field is\",round(Hc2,5),\"Tesla\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.12, Page number 11.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical current is 134.33 A\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",
+ "Tc=7.18; #temperature(K)\n",
+ "H0=6.5*10**4; #critical field(T)\n",
+ "T=4.2; #temperature(K)\n",
+ "d=1*10**-3; #diameter(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc=H0*(1-(T/Tc)**2); #critical field(T)\n",
+ "ic=math.pi*d*Hc; #critical current(A)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical current is\",round(ic,2),\"A\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter11_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter11_2.ipynb new file mode 100755 index 00000000..43338be1 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter11_2.ipynb @@ -0,0 +1,529 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#11: Magnetic properties"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.1, Page number 11.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative permeability of iron is 2154\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",
+ "M=1.4; #magnetic field(T)\n",
+ "H=6.5*10**-4; #magnetic field(T)\n",
+ "\n",
+ "#Calculation\n",
+ "chi=M/H;\n",
+ "mew_r=1+chi; #relative permeability of iron\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability of iron is\",int(mew_r)\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.2, Page number 11.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative permeability is 16\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=3300; #magnetic field(amp/m)\n",
+ "H=220; #magnetic field(amp/m)\n",
+ "\n",
+ "#Calculation\n",
+ "chi=M/H;\n",
+ "mew_r=1+chi; #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability is\",int(mew_r)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.3, Page number 11.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetisation of material is 1.5 *10**3 A/m\n",
+ "flux density is 1.2585 T\n",
+ "answer given in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H=10**6; #magnetic field(amp/m)\n",
+ "chi=1.5*10**-3;\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "\n",
+ "#Calculation\n",
+ "M=chi*H; #magnetisation of material(A/m)\n",
+ "B=mew0*(M+H); #flux density(T)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M/10**3,\"*10**3 A/m\"\n",
+ "print \"flux density is\",round(B,4),\"T\"\n",
+ "print \"answer given in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.4, Page number 11.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetisation of material is 37.0 A/m\n",
+ "flux density is 0.0126 wb/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H=10**4; #magnetic field(amp/m)\n",
+ "chi=3.7*10**-3;\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "\n",
+ "#Calculation\n",
+ "M=chi*H; #magnetisation of material(A/m)\n",
+ "B=mew0*(M+H); #flux density(T)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M,\"A/m\"\n",
+ "print \"flux density is\",round(B,4),\"wb/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.5, Page number 11.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetic moment is 7.854 *10**-3 Am**2\n",
+ "answer given in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=5*10**-2 #radius(m)\n",
+ "I=500*10**-3; #current(A)\n",
+ "\n",
+ "#Calculation\n",
+ "A=2*math.pi*r**2;\n",
+ "mew_m=I*A; #magnetic moment(Am**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment is\",round(mew_m*10**3,3),\"*10**-3 Am**2\"\n",
+ "print \"answer given in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.6, Page number 11.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "change in magnetic moment is 3.943 *10**-29 Am**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=5.29*10**-11; #radius(m)\n",
+ "B=2; #magnetic field(T)\n",
+ "e=1.602*10**-19; #charge(c)\n",
+ "m=9.108*10**-31; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "mew_ind=e**2*r**2*B/(4*m); #change in magnetic moment(Am**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in magnetic moment is\",round(mew_ind*10**29,3),\"*10**-29 Am**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.7, Page number 11.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "susceptibility is 3.267 *10**-4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "chi1=2.8*10**-4; #susceptibility\n",
+ "T1=350; #temperature(K)\n",
+ "T2=300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "chi2=chi1*T1/T2; #susceptibility\n",
+ "\n",
+ "#Result\n",
+ "print \"susceptibility is\",round(chi2*10**4,3),\"*10**-4\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.8, Page number 11.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetic moment is 0.61 mewB\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Bs=0.65; #magnetic induction(wb/m**2)\n",
+ "d=8906; #density(kg/m**3)\n",
+ "n=6.025*10**26; #avagadro number\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "w=58.7; #atomic weight(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "N=d*n/w; #number of nickel atoms(per m**3)\n",
+ "mew_m=Bs/(N*mew0*9.27*10**-24); #magnetic moment(mewB)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment is\",round(mew_m,2),\"mewB\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.9, Page number 11.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "temperature is 3.9 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew=9.4*10**-24; \n",
+ "H=2; #magnetic field(weber/m**2)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "T=2*mew*H/(math.log(2)*k); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T,1),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.10, Page number 11.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetic moment per gram 1966.851 Am**2\n",
+ "magnetic moment per gram is 2.4716 Wb/m**2\n",
+ "answer given in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=7.8*10**3; #density(kg/m**3)\n",
+ "n=6.025*10**26; #number of atoms\n",
+ "w=157.26; #atomic weight(kg)\n",
+ "mewm=9.27*10**-24;\n",
+ "mew=7.1*mewm;\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "\n",
+ "#Calculation\n",
+ "N=d*n/w; #number of atoms\n",
+ "mew_B=N*mew/10**3; #magnetic moment per gram(Am**2)\n",
+ "Bs=N*mew0*mew;\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment per gram\",round(mew_B,3),\"Am**2\"\n",
+ "print \"magnetic moment per gram is\",round(Bs,4),\"Wb/m**2\"\n",
+ "print \"answer given in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.11, Page number 11.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical field is 0.02166 Tesla\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tc=3.7; #temperature(K)\n",
+ "Hc0=0.0306; #critical field(T)\n",
+ "T=2; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc2=Hc0*(1-(T/Tc)**2); #critical field(T)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical field is\",round(Hc2,5),\"Tesla\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.12, Page number 11.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical current is 134.33 A\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",
+ "Tc=7.18; #temperature(K)\n",
+ "H0=6.5*10**4; #critical field(T)\n",
+ "T=4.2; #temperature(K)\n",
+ "d=1*10**-3; #diameter(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc=H0*(1-(T/Tc)**2); #critical field(T)\n",
+ "ic=math.pi*d*Hc; #critical current(A)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical current is\",round(ic,2),\"A\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter12_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter12_1.ipynb new file mode 100755 index 00000000..93ea352e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter12_1.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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter12_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter12_2.ipynb new file mode 100755 index 00000000..93ea352e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter12_2.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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter13_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter13_1.ipynb new file mode 100755 index 00000000..fa599112 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter13_1.ipynb @@ -0,0 +1,274 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#13: Fiber Optics "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.1, Page number 13.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.391\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.55; #refractive index of core\n",
+ "n2=1.50; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.2, Page number 13.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "angle of acceptance is 26 degrees 29.5 minutes\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.563; #refractive index of core\n",
+ "n2=1.498; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "alpha_i=math.asin(NA); #angle of acceptance(radian)\n",
+ "alpha_i=(alpha_i*180/math.pi); #angle(degrees)\n",
+ "alpha_id=int(alpha_i);\n",
+ "alpha_im=60*(alpha_i-alpha_id);\n",
+ "\n",
+ "#Result\n",
+ "print \"angle of acceptance is\",alpha_id,\"degrees\",round(alpha_im,1),\"minutes\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.3, Page number 13.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "refractive index of core is 1.2333\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA=0.39; #numerical aperture\n",
+ "delta=0.05; #difference of indices\n",
+ "\n",
+ "#Calculation\n",
+ "n1=NA/math.sqrt(2*delta); #refractive index of core\n",
+ "\n",
+ "#Result\n",
+ "print \"refractive index of core is\",round(n1,4)\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.4, Page number 13.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fractional index change is 0.0416\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.563; #refractive index of core\n",
+ "n2=1.498; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "delta=(n1-n2)/n1; #fractional index change\n",
+ "\n",
+ "#Result\n",
+ "print \"fractional index change is\",round(delta,4)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.5, Page number 13.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.2965\n",
+ "angle of acceptance is 17 degrees 15.0 minutes\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.48; #refractive index of core\n",
+ "n2=1.45; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "alpha_i=math.asin(NA); #angle of acceptance(radian)\n",
+ "alpha_i=(alpha_i*180/math.pi); #angle(degrees)\n",
+ "alpha_id=int(alpha_i);\n",
+ "alpha_im=60*(alpha_i-alpha_id);\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,4)\n",
+ "print \"angle of acceptance is\",alpha_id,\"degrees\",round(alpha_im),\"minutes\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.6, Page number 13.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "attenuation loss is 3.98 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pout=40; #power(mW)\n",
+ "Pin=100; #power(mW)\n",
+ "\n",
+ "#Calculation\n",
+ "al=-10*math.log10(Pout/Pin); #attenuation loss(dB)\n",
+ "\n",
+ "#Result\n",
+ "print \"attenuation loss is\",round(al,2),\"dB\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter13_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter13_2.ipynb new file mode 100755 index 00000000..fa599112 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter13_2.ipynb @@ -0,0 +1,274 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#13: Fiber Optics "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.1, Page number 13.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.391\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.55; #refractive index of core\n",
+ "n2=1.50; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.2, Page number 13.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "angle of acceptance is 26 degrees 29.5 minutes\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.563; #refractive index of core\n",
+ "n2=1.498; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "alpha_i=math.asin(NA); #angle of acceptance(radian)\n",
+ "alpha_i=(alpha_i*180/math.pi); #angle(degrees)\n",
+ "alpha_id=int(alpha_i);\n",
+ "alpha_im=60*(alpha_i-alpha_id);\n",
+ "\n",
+ "#Result\n",
+ "print \"angle of acceptance is\",alpha_id,\"degrees\",round(alpha_im,1),\"minutes\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.3, Page number 13.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "refractive index of core is 1.2333\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA=0.39; #numerical aperture\n",
+ "delta=0.05; #difference of indices\n",
+ "\n",
+ "#Calculation\n",
+ "n1=NA/math.sqrt(2*delta); #refractive index of core\n",
+ "\n",
+ "#Result\n",
+ "print \"refractive index of core is\",round(n1,4)\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.4, Page number 13.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fractional index change is 0.0416\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.563; #refractive index of core\n",
+ "n2=1.498; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "delta=(n1-n2)/n1; #fractional index change\n",
+ "\n",
+ "#Result\n",
+ "print \"fractional index change is\",round(delta,4)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.5, Page number 13.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.2965\n",
+ "angle of acceptance is 17 degrees 15.0 minutes\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.48; #refractive index of core\n",
+ "n2=1.45; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "alpha_i=math.asin(NA); #angle of acceptance(radian)\n",
+ "alpha_i=(alpha_i*180/math.pi); #angle(degrees)\n",
+ "alpha_id=int(alpha_i);\n",
+ "alpha_im=60*(alpha_i-alpha_id);\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,4)\n",
+ "print \"angle of acceptance is\",alpha_id,\"degrees\",round(alpha_im),\"minutes\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 13.6, Page number 13.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "attenuation loss is 3.98 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pout=40; #power(mW)\n",
+ "Pin=100; #power(mW)\n",
+ "\n",
+ "#Calculation\n",
+ "al=-10*math.log10(Pout/Pin); #attenuation loss(dB)\n",
+ "\n",
+ "#Result\n",
+ "print \"attenuation loss is\",round(al,2),\"dB\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter14_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter14_1.ipynb new file mode 100755 index 00000000..ef73934a --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter14_1.ipynb @@ -0,0 +1,281 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#14: Acoustics of buildings and acoustic quieting"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.1, Page number 14.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "reverberation time of hall is 1.264 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=475; #volume(m**3)\n",
+ "aw=200; #area of wall(m**2)\n",
+ "ac=100; #area of ceiling(m**2)\n",
+ "ac_w=0.025; #absorption coefficient of wall\n",
+ "ac_c=0.02; #absorption coefficient of ceiling\n",
+ "ac_f=0.55; #absorption coefficient of floor\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=(aw*ac_w)+(ac*ac_c)+(ac*ac_f); \n",
+ "T=0.165*V/sigma_as; #reverberation time of hall(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"reverberation time of hall is\",round(T,3),\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.2, Page number 14.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "new reverberation time is 1.31 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=12500; #volume(m**3)\n",
+ "T1=1.5; #reverberation time(sec)\n",
+ "n=200; #number of cushioned chairs\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=0.165*V/T1; \n",
+ "T2=0.165*V/(sigma_as+n); #new reverberation time(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"new reverberation time is\",round(T2,2),\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.3, Page number 14.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total absorption in the hall is 660.0 OWU\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=5000; #volume(m**3)\n",
+ "T=1.25; #time(s)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n",
+ "\n",
+ "#Result\n",
+ "print \"total absorption in the hall is\",sigma_as,\"OWU\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.4, Page number 14.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total absorption in the hall is 1045.0 OWU\n",
+ "new period of reverberation is 1.369 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=9500; #volume(m**3)\n",
+ "T=1.5; #time(s)\n",
+ "x=100; #absorption(sabines)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n",
+ "T=0.165*V/(sigma_as+x); #new period of reverberation(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"total absorption in the hall is\",sigma_as,\"OWU\"\n",
+ "print \"new period of reverberation is\",round(T,3),\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.5, Page number 14.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total absorption in the hall is 70.714 OWU\n",
+ "average absorption coefficient is 0.074 sabine/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=20*15*5; #volume(m**3)\n",
+ "T=3.5; #time(s)\n",
+ "A=950; #surface area(m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n",
+ "ac=sigma_as/A; #average absorption coefficient\n",
+ "\n",
+ "#Result\n",
+ "print \"total absorption in the hall is\",round(sigma_as,3),\"OWU\"\n",
+ "print \"average absorption coefficient is\",round(ac,3),\"sabine/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.6, Page number 14.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "reverberation time of hall is 4.023 s\n",
+ "number of persons to be seated is 5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=2265; #volume(m**3)\n",
+ "sigma_as=92.9; #absorption(m**2)\n",
+ "a=18.6; #area(m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "T=0.165*V/sigma_as; #reverberation time of hall(s)\n",
+ "T1=0.165*V/2; \n",
+ "inc=T1-sigma_as; #increase in absorption(OWU)\n",
+ "n=inc/a; #number of persons to be seated\n",
+ "\n",
+ "#Result\n",
+ "print \"reverberation time of hall is\",round(T,3),\"s\"\n",
+ "print \"number of persons to be seated is\",int(n)"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter14_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter14_2.ipynb new file mode 100755 index 00000000..ef73934a --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter14_2.ipynb @@ -0,0 +1,281 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#14: Acoustics of buildings and acoustic quieting"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.1, Page number 14.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "reverberation time of hall is 1.264 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=475; #volume(m**3)\n",
+ "aw=200; #area of wall(m**2)\n",
+ "ac=100; #area of ceiling(m**2)\n",
+ "ac_w=0.025; #absorption coefficient of wall\n",
+ "ac_c=0.02; #absorption coefficient of ceiling\n",
+ "ac_f=0.55; #absorption coefficient of floor\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=(aw*ac_w)+(ac*ac_c)+(ac*ac_f); \n",
+ "T=0.165*V/sigma_as; #reverberation time of hall(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"reverberation time of hall is\",round(T,3),\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.2, Page number 14.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "new reverberation time is 1.31 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=12500; #volume(m**3)\n",
+ "T1=1.5; #reverberation time(sec)\n",
+ "n=200; #number of cushioned chairs\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=0.165*V/T1; \n",
+ "T2=0.165*V/(sigma_as+n); #new reverberation time(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"new reverberation time is\",round(T2,2),\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.3, Page number 14.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total absorption in the hall is 660.0 OWU\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=5000; #volume(m**3)\n",
+ "T=1.25; #time(s)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n",
+ "\n",
+ "#Result\n",
+ "print \"total absorption in the hall is\",sigma_as,\"OWU\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.4, Page number 14.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total absorption in the hall is 1045.0 OWU\n",
+ "new period of reverberation is 1.369 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=9500; #volume(m**3)\n",
+ "T=1.5; #time(s)\n",
+ "x=100; #absorption(sabines)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n",
+ "T=0.165*V/(sigma_as+x); #new period of reverberation(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"total absorption in the hall is\",sigma_as,\"OWU\"\n",
+ "print \"new period of reverberation is\",round(T,3),\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.5, Page number 14.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total absorption in the hall is 70.714 OWU\n",
+ "average absorption coefficient is 0.074 sabine/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=20*15*5; #volume(m**3)\n",
+ "T=3.5; #time(s)\n",
+ "A=950; #surface area(m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n",
+ "ac=sigma_as/A; #average absorption coefficient\n",
+ "\n",
+ "#Result\n",
+ "print \"total absorption in the hall is\",round(sigma_as,3),\"OWU\"\n",
+ "print \"average absorption coefficient is\",round(ac,3),\"sabine/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 14.6, Page number 14.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "reverberation time of hall is 4.023 s\n",
+ "number of persons to be seated is 5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=2265; #volume(m**3)\n",
+ "sigma_as=92.9; #absorption(m**2)\n",
+ "a=18.6; #area(m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "T=0.165*V/sigma_as; #reverberation time of hall(s)\n",
+ "T1=0.165*V/2; \n",
+ "inc=T1-sigma_as; #increase in absorption(OWU)\n",
+ "n=inc/a; #number of persons to be seated\n",
+ "\n",
+ "#Result\n",
+ "print \"reverberation time of hall is\",round(T,3),\"s\"\n",
+ "print \"number of persons to be seated is\",int(n)"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter1_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter1_1.ipynb new file mode 100755 index 00000000..3dd56e56 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter1_1.ipynb @@ -0,0 +1,209 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#1: Bonding in Solids"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.1, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "net change in energy per mole is -296 kJ/mol\n",
+ "answer varies due to rounding off errors\n",
+ "since the net change in energy is negative, the A+B- molecule will be stable\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r=3*10**-10; #seperation(m)\n",
+ "N=6.022*10**20;\n",
+ "Ea=502; #ionisation energy of A(kJ/mol)\n",
+ "Eb=-335; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "E=-e**2*N/(4*math.pi*epsilon0*r); #electrostatic attraction(kJ/mol)\n",
+ "nE=Ea+Eb+E; #net change in energy per mole(kJ/mol)\n",
+ "\n",
+ "#Result\n",
+ "print \"net change in energy per mole is\",int(nE),\"kJ/mol\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"since the net change in energy is negative, the A+B- molecule will be stable\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.2, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy required is 0.5 eV\n",
+ "seperation is 2.88 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "IPk=4.1; #IP of K(eV)\n",
+ "EACl=3.6; #EA of Cl(eV)\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "onebyepsilon0=9*10**9;\n",
+ "\n",
+ "#Calculation\n",
+ "deltaE=IPk-EACl;\n",
+ "Ec=deltaE; #energy required(eV)\n",
+ "R=e*onebyepsilon0/deltaE; #seperation(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy required is\",Ec,\"eV\"\n",
+ "print \"seperation is\",round(R*10**9,2),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.3, Page number 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bond energy is 4.61 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r0=236*10**-12; #seperation(m)\n",
+ "N=6.022*10**20;\n",
+ "IP=5.14; #ionisation energy of A(kJ/mol)\n",
+ "EA=3.65; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "Ue=-e**2/(4*math.pi*epsilon0*r0*e); #potential energy(eV)\n",
+ "BE=-Ue-IP+EA; #bond energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"bond energy is\",round(BE,2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.4, Page number 1.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "cohesive energy is 7.965 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1.748; #madelung constant\n",
+ "n=9; #born repulsive exponent\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r0=0.281*10**-9; #seperation(m)\n",
+ "IE=5.14; #ionisation energy of A(kJ/mol)\n",
+ "EA=3.61; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "CE=A*e**2*(1-(1/n))/(4*math.pi*epsilon0*r0*e); #cohesive energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"cohesive energy is\",round(CE,3),\"eV\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter1_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter1_2.ipynb new file mode 100755 index 00000000..3dd56e56 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter1_2.ipynb @@ -0,0 +1,209 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#1: Bonding in Solids"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.1, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "net change in energy per mole is -296 kJ/mol\n",
+ "answer varies due to rounding off errors\n",
+ "since the net change in energy is negative, the A+B- molecule will be stable\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r=3*10**-10; #seperation(m)\n",
+ "N=6.022*10**20;\n",
+ "Ea=502; #ionisation energy of A(kJ/mol)\n",
+ "Eb=-335; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "E=-e**2*N/(4*math.pi*epsilon0*r); #electrostatic attraction(kJ/mol)\n",
+ "nE=Ea+Eb+E; #net change in energy per mole(kJ/mol)\n",
+ "\n",
+ "#Result\n",
+ "print \"net change in energy per mole is\",int(nE),\"kJ/mol\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"since the net change in energy is negative, the A+B- molecule will be stable\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.2, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy required is 0.5 eV\n",
+ "seperation is 2.88 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "IPk=4.1; #IP of K(eV)\n",
+ "EACl=3.6; #EA of Cl(eV)\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "onebyepsilon0=9*10**9;\n",
+ "\n",
+ "#Calculation\n",
+ "deltaE=IPk-EACl;\n",
+ "Ec=deltaE; #energy required(eV)\n",
+ "R=e*onebyepsilon0/deltaE; #seperation(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy required is\",Ec,\"eV\"\n",
+ "print \"seperation is\",round(R*10**9,2),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.3, Page number 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bond energy is 4.61 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r0=236*10**-12; #seperation(m)\n",
+ "N=6.022*10**20;\n",
+ "IP=5.14; #ionisation energy of A(kJ/mol)\n",
+ "EA=3.65; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "Ue=-e**2/(4*math.pi*epsilon0*r0*e); #potential energy(eV)\n",
+ "BE=-Ue-IP+EA; #bond energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"bond energy is\",round(BE,2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.4, Page number 1.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "cohesive energy is 7.965 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1.748; #madelung constant\n",
+ "n=9; #born repulsive exponent\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r0=0.281*10**-9; #seperation(m)\n",
+ "IE=5.14; #ionisation energy of A(kJ/mol)\n",
+ "EA=3.61; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "CE=A*e**2*(1-(1/n))/(4*math.pi*epsilon0*r0*e); #cohesive energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"cohesive energy is\",round(CE,3),\"eV\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter2_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter2_1.ipynb new file mode 100755 index 00000000..dc0f7988 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter2_1.ipynb @@ -0,0 +1,559 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#2: Crystallography and Crystal Structures"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.3, Page number 2.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of atoms in (100) is a**(-2) atoms/mm**2\n",
+ "number of atoms in (110) is 0.707106781186547/a**2 atoms/mm**2\n",
+ "number of atoms in (111) is 0.577350269189626/a**2 atoms/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import Symbol\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=Symbol('a'); #lattice constant(mm)\n",
+ "x1=4;\n",
+ "x2=math.sqrt(2);\n",
+ "b=a*math.sqrt(2);\n",
+ "theta=30; #angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "na1=x1*1/(x1*a**2); #number of atoms in (100)(per mm**2)\n",
+ "na2=1/(x2*a**2); #number of atoms in (110)(per mm**2)\n",
+ "A3=(1/2)*b*b*math.cos(theta); \n",
+ "t=60/360*3;\n",
+ "na3=t/A3; #number of atoms in (111)(per mm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms in (100) is\",na1,\"atoms/mm**2\"\n",
+ "print \"number of atoms in (110) is\",na2,\"atoms/mm**2\"\n",
+ "print \"number of atoms in (111) is\",na3,\"atoms/mm**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.4, Page number 2.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar spacing for (110) is 0.2556 nm\n",
+ "interplanar spacing for (212) is 0.1205 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.1278; #atomic radius(m)\n",
+ "h1=1;\n",
+ "k1=1;\n",
+ "l1=0;\n",
+ "h2=2;\n",
+ "k2=1;\n",
+ "l2=2;\n",
+ "\n",
+ "#Calculation\n",
+ "a=round(4*r/math.sqrt(2),4);\n",
+ "d110=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (110)(nm)\n",
+ "d212=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (212)(nm)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar spacing for (110) is\",round(d110,4),\"nm\"\n",
+ "print \"interplanar spacing for (212) is\",d212,\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.5, Page number 2.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "seperation between successive lattice planes is 1 : 0.71 : 0.58\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h1=1;\n",
+ "k1=0;\n",
+ "l1=0;\n",
+ "h2=1;\n",
+ "k2=1;\n",
+ "l2=0;\n",
+ "h3=1;\n",
+ "k3=1;\n",
+ "l3=1;\n",
+ "\n",
+ "#Calculation\n",
+ "d100=1/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (110)\n",
+ "d110=1/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (110)\n",
+ "d111=1/math.sqrt(h3**2+k3**2+l3**2); #interplanar spacing for (111)\n",
+ "\n",
+ "#Result\n",
+ "print \"seperation between successive lattice planes is\",int(d100),\":\",round(d110,2),\":\",round(d111,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.6, Page number 2.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices of plane is ( 3.0 6.0 1.0 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=1;\n",
+ "b=1/2;\n",
+ "c=3;\n",
+ "\n",
+ "#Calculation\n",
+ "A=1/a;\n",
+ "B=1/b;\n",
+ "C=1/c;\n",
+ "h=A*c;\n",
+ "k=B*c;\n",
+ "l=C*c; #miller indices of plane\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices of plane is (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.7, Page number 2.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "radius of interstitial sphere is 0.155 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=1; #assume\n",
+ "\n",
+ "#Calculation\n",
+ "a=4/math.sqrt(3);\n",
+ "R=(a-(2*r))/2; #radius of interstitial sphere(r)\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of interstitial sphere is\",round(R,3),\"r\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.8, Page number 2.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "decrease of volume is 0.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=1.258; #atomic radius(angstrom)\n",
+ "r2=1.292; #atomic radius(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "a1=4*r1/math.sqrt(3); #spacing(angstrom)\n",
+ "n1=((1/8)*8)+1; #number of atoms per unit cell\n",
+ "v1=a1**3/n1; #volume occupied by 1 atom(m**3)\n",
+ "n2=(1/2*6)+(1/8*8); #number of atoms per unit cell\n",
+ "a2=2*math.sqrt(2)*r2; #spacing(angstrom)\n",
+ "v2=a2**3/n2; #volume occupied by 1 atom(m**3)\n",
+ "dc=(v1-v2)*100/v1; #change in volume(%)\n",
+ "\n",
+ "#Result\n",
+ "print \"decrease of volume is\",round(dc,1),\"%\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.9, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "volume of unit cell is 9.356 *10**-29 m**3\n",
+ "density of zinc is 6960 kg/m**3\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.27*10**-9; #spacing(m)\n",
+ "c=0.494*10**-9;\n",
+ "n=6; #number of atoms\n",
+ "M=65.37; #atomic weight\n",
+ "N=6.023*10**26; #avagadro number\n",
+ "\n",
+ "#Calculation\n",
+ "V=3*math.sqrt(3)*a**2*c/2; #volume of unit cell(m**3)\n",
+ "rho=n*M/(N*V); #density of zinc(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"volume of unit cell is\",round(V*10**29,3),\"*10**-29 m**3\"\n",
+ "print \"density of zinc is\",int(rho),\"kg/m**3\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.10, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "radius of interstitial sphere is 0.414 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=1; #assume\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(2);\n",
+ "R=(a/2)-r; #radius of interstitial sphere(r)\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of interstitial sphere is\",round(R,3),\"r\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.11, Page number 2.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of atoms per m**3 is 1.77 *10**29\n",
+ "density of diamond is 3535.7 kg/m**3\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.356*10**-9; #cube edge(m)\n",
+ "m=12.01; #atomic weight of carbon\n",
+ "N=6.023*10**26; #avagadro number\n",
+ "\n",
+ "#Calculation\n",
+ "n=8/a**3; #number of atoms per m**3\n",
+ "M=m/N;\n",
+ "d=M*n; #density of diamond(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms per m**3 is\",round(n/10**29,2),\"*10**29\"\n",
+ "print \"density of diamond is\",round(d,1),\"kg/m**3\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.12, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "distance between 2 adjacent atoms is 2.81 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mw=23+35.5; #molecular weight of NaCl(gm/mol)\n",
+ "N=6.023*10**23; #avagadro number(per mol)\n",
+ "d=2.18; #mass of unit volume\n",
+ "\n",
+ "#Calculation\n",
+ "M=mw/N; #mass of NaCl molecule(gm)\n",
+ "n=2*d/M; #number of atoms per unit volume(atoms/cm**3)\n",
+ "a=(1/n)**(1/3); #distance between 2 adjacent atoms(cm)\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between 2 adjacent atoms is\",round(a*10**8,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.13, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of copper crystal is 8.929 gm/cm**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=63.5; #atomic weight\n",
+ "N=6.023*10**23; #avagadro number\n",
+ "r=1.278*10**-8; #radius(m)\n",
+ "n=4;\n",
+ "\n",
+ "#Calculation\n",
+ "m=M/N; #mass of copper atom(gm)\n",
+ "a=4*r/math.sqrt(2);\n",
+ "Mu=n*m; #mass of unit cell\n",
+ "d=Mu/a**3; #density of copper crystal(gm/cm**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of copper crystal is\",round(d,3),\"gm/cm**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.14, Page number 2.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "free volume per unit cell is 7.6795 *10**-30 m**3\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.1249*10**-9; #radius(m)\n",
+ "pf=0.68; #packing factor\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(3); #lattice constant(m)\n",
+ "v=a**3; #volume of unit cell(m**3)\n",
+ "Fv=(1-pf)*v; #free volume per unit cell(m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"free volume per unit cell is\",round(Fv*10**30,4),\"*10**-30 m**3\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter2_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter2_2.ipynb new file mode 100755 index 00000000..dc0f7988 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter2_2.ipynb @@ -0,0 +1,559 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#2: Crystallography and Crystal Structures"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.3, Page number 2.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of atoms in (100) is a**(-2) atoms/mm**2\n",
+ "number of atoms in (110) is 0.707106781186547/a**2 atoms/mm**2\n",
+ "number of atoms in (111) is 0.577350269189626/a**2 atoms/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import Symbol\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=Symbol('a'); #lattice constant(mm)\n",
+ "x1=4;\n",
+ "x2=math.sqrt(2);\n",
+ "b=a*math.sqrt(2);\n",
+ "theta=30; #angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "na1=x1*1/(x1*a**2); #number of atoms in (100)(per mm**2)\n",
+ "na2=1/(x2*a**2); #number of atoms in (110)(per mm**2)\n",
+ "A3=(1/2)*b*b*math.cos(theta); \n",
+ "t=60/360*3;\n",
+ "na3=t/A3; #number of atoms in (111)(per mm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms in (100) is\",na1,\"atoms/mm**2\"\n",
+ "print \"number of atoms in (110) is\",na2,\"atoms/mm**2\"\n",
+ "print \"number of atoms in (111) is\",na3,\"atoms/mm**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.4, Page number 2.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar spacing for (110) is 0.2556 nm\n",
+ "interplanar spacing for (212) is 0.1205 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.1278; #atomic radius(m)\n",
+ "h1=1;\n",
+ "k1=1;\n",
+ "l1=0;\n",
+ "h2=2;\n",
+ "k2=1;\n",
+ "l2=2;\n",
+ "\n",
+ "#Calculation\n",
+ "a=round(4*r/math.sqrt(2),4);\n",
+ "d110=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (110)(nm)\n",
+ "d212=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (212)(nm)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar spacing for (110) is\",round(d110,4),\"nm\"\n",
+ "print \"interplanar spacing for (212) is\",d212,\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.5, Page number 2.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "seperation between successive lattice planes is 1 : 0.71 : 0.58\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h1=1;\n",
+ "k1=0;\n",
+ "l1=0;\n",
+ "h2=1;\n",
+ "k2=1;\n",
+ "l2=0;\n",
+ "h3=1;\n",
+ "k3=1;\n",
+ "l3=1;\n",
+ "\n",
+ "#Calculation\n",
+ "d100=1/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (110)\n",
+ "d110=1/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (110)\n",
+ "d111=1/math.sqrt(h3**2+k3**2+l3**2); #interplanar spacing for (111)\n",
+ "\n",
+ "#Result\n",
+ "print \"seperation between successive lattice planes is\",int(d100),\":\",round(d110,2),\":\",round(d111,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.6, Page number 2.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices of plane is ( 3.0 6.0 1.0 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=1;\n",
+ "b=1/2;\n",
+ "c=3;\n",
+ "\n",
+ "#Calculation\n",
+ "A=1/a;\n",
+ "B=1/b;\n",
+ "C=1/c;\n",
+ "h=A*c;\n",
+ "k=B*c;\n",
+ "l=C*c; #miller indices of plane\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices of plane is (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.7, Page number 2.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "radius of interstitial sphere is 0.155 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=1; #assume\n",
+ "\n",
+ "#Calculation\n",
+ "a=4/math.sqrt(3);\n",
+ "R=(a-(2*r))/2; #radius of interstitial sphere(r)\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of interstitial sphere is\",round(R,3),\"r\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.8, Page number 2.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "decrease of volume is 0.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=1.258; #atomic radius(angstrom)\n",
+ "r2=1.292; #atomic radius(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "a1=4*r1/math.sqrt(3); #spacing(angstrom)\n",
+ "n1=((1/8)*8)+1; #number of atoms per unit cell\n",
+ "v1=a1**3/n1; #volume occupied by 1 atom(m**3)\n",
+ "n2=(1/2*6)+(1/8*8); #number of atoms per unit cell\n",
+ "a2=2*math.sqrt(2)*r2; #spacing(angstrom)\n",
+ "v2=a2**3/n2; #volume occupied by 1 atom(m**3)\n",
+ "dc=(v1-v2)*100/v1; #change in volume(%)\n",
+ "\n",
+ "#Result\n",
+ "print \"decrease of volume is\",round(dc,1),\"%\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.9, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "volume of unit cell is 9.356 *10**-29 m**3\n",
+ "density of zinc is 6960 kg/m**3\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.27*10**-9; #spacing(m)\n",
+ "c=0.494*10**-9;\n",
+ "n=6; #number of atoms\n",
+ "M=65.37; #atomic weight\n",
+ "N=6.023*10**26; #avagadro number\n",
+ "\n",
+ "#Calculation\n",
+ "V=3*math.sqrt(3)*a**2*c/2; #volume of unit cell(m**3)\n",
+ "rho=n*M/(N*V); #density of zinc(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"volume of unit cell is\",round(V*10**29,3),\"*10**-29 m**3\"\n",
+ "print \"density of zinc is\",int(rho),\"kg/m**3\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.10, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "radius of interstitial sphere is 0.414 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=1; #assume\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(2);\n",
+ "R=(a/2)-r; #radius of interstitial sphere(r)\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of interstitial sphere is\",round(R,3),\"r\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.11, Page number 2.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of atoms per m**3 is 1.77 *10**29\n",
+ "density of diamond is 3535.7 kg/m**3\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.356*10**-9; #cube edge(m)\n",
+ "m=12.01; #atomic weight of carbon\n",
+ "N=6.023*10**26; #avagadro number\n",
+ "\n",
+ "#Calculation\n",
+ "n=8/a**3; #number of atoms per m**3\n",
+ "M=m/N;\n",
+ "d=M*n; #density of diamond(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms per m**3 is\",round(n/10**29,2),\"*10**29\"\n",
+ "print \"density of diamond is\",round(d,1),\"kg/m**3\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.12, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "distance between 2 adjacent atoms is 2.81 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mw=23+35.5; #molecular weight of NaCl(gm/mol)\n",
+ "N=6.023*10**23; #avagadro number(per mol)\n",
+ "d=2.18; #mass of unit volume\n",
+ "\n",
+ "#Calculation\n",
+ "M=mw/N; #mass of NaCl molecule(gm)\n",
+ "n=2*d/M; #number of atoms per unit volume(atoms/cm**3)\n",
+ "a=(1/n)**(1/3); #distance between 2 adjacent atoms(cm)\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between 2 adjacent atoms is\",round(a*10**8,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.13, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of copper crystal is 8.929 gm/cm**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=63.5; #atomic weight\n",
+ "N=6.023*10**23; #avagadro number\n",
+ "r=1.278*10**-8; #radius(m)\n",
+ "n=4;\n",
+ "\n",
+ "#Calculation\n",
+ "m=M/N; #mass of copper atom(gm)\n",
+ "a=4*r/math.sqrt(2);\n",
+ "Mu=n*m; #mass of unit cell\n",
+ "d=Mu/a**3; #density of copper crystal(gm/cm**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of copper crystal is\",round(d,3),\"gm/cm**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.14, Page number 2.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "free volume per unit cell is 7.6795 *10**-30 m**3\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.1249*10**-9; #radius(m)\n",
+ "pf=0.68; #packing factor\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(3); #lattice constant(m)\n",
+ "v=a**3; #volume of unit cell(m**3)\n",
+ "Fv=(1-pf)*v; #free volume per unit cell(m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"free volume per unit cell is\",round(Fv*10**30,4),\"*10**-30 m**3\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter3_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter3_1.ipynb new file mode 100755 index 00000000..5c886a5b --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter3_1.ipynb @@ -0,0 +1,249 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#3: X-ray Diffraction"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.1, Page number 3.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength of X-rays is 0.08496 nm\n",
+ "answer varies due to rounding off errors\n",
+ "when theta=90, maximum order of diffraction possible is 7\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=0.313; #lattice spacing(m)\n",
+ "theta=7+(48/60); #angle(degrees)\n",
+ "n=1;\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "lamda=2*d*math.sin(theta)/n; #wavelength of X-rays(nm)\n",
+ "#when theta=90\n",
+ "n=2*d/lamda; #maximum order of diffraction possible\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of X-rays is\",round(lamda,5),\"nm\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"when theta=90, maximum order of diffraction possible is\",int(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.2, Page number 3.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interatomic spacing is 2.67 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.5418; #wavelength(angstrom)\n",
+ "theta=30; #angle(degrees)\n",
+ "n=1; #first order\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1;\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "d=n*lamda/(2*math.sin(theta)); \n",
+ "a=d*math.sqrt(h**2+k**2+l**2); #interatomic spacing(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interatomic spacing is\",round(a,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.3, Page number 3.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 21 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d100=0.28; #spacing(nm)\n",
+ "lamda=0.071; #wavelength of X rays(nm)\n",
+ "n=2; #second order\n",
+ "\n",
+ "#Calculation\n",
+ "d110=round(d100/math.sqrt(2),3); #spacing(nm)\n",
+ "x=n*lamda/(2*d110);\n",
+ "theta=math.asin(x); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",int(theta),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.4, Page number 3.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "distance between planes is 0.27 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.38; #lattice constant(nm)\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=0;\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #distance between planes(nm)\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between planes is\",round(d,2),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.5, Page number 3.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 32.0 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.19; #lattice constant(nm)\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1;\n",
+ "lamda=0.058; #wavelength of X rays(nm)\n",
+ "n=2; #second order\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #distance between planes(nm)\n",
+ "x=n*lamda/(2*d);\n",
+ "theta=math.asin(x); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",round(theta),\"degrees\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter3_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter3_2.ipynb new file mode 100755 index 00000000..5c886a5b --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter3_2.ipynb @@ -0,0 +1,249 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#3: X-ray Diffraction"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.1, Page number 3.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength of X-rays is 0.08496 nm\n",
+ "answer varies due to rounding off errors\n",
+ "when theta=90, maximum order of diffraction possible is 7\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=0.313; #lattice spacing(m)\n",
+ "theta=7+(48/60); #angle(degrees)\n",
+ "n=1;\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "lamda=2*d*math.sin(theta)/n; #wavelength of X-rays(nm)\n",
+ "#when theta=90\n",
+ "n=2*d/lamda; #maximum order of diffraction possible\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of X-rays is\",round(lamda,5),\"nm\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"when theta=90, maximum order of diffraction possible is\",int(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.2, Page number 3.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interatomic spacing is 2.67 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.5418; #wavelength(angstrom)\n",
+ "theta=30; #angle(degrees)\n",
+ "n=1; #first order\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1;\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "d=n*lamda/(2*math.sin(theta)); \n",
+ "a=d*math.sqrt(h**2+k**2+l**2); #interatomic spacing(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interatomic spacing is\",round(a,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.3, Page number 3.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 21 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d100=0.28; #spacing(nm)\n",
+ "lamda=0.071; #wavelength of X rays(nm)\n",
+ "n=2; #second order\n",
+ "\n",
+ "#Calculation\n",
+ "d110=round(d100/math.sqrt(2),3); #spacing(nm)\n",
+ "x=n*lamda/(2*d110);\n",
+ "theta=math.asin(x); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",int(theta),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.4, Page number 3.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "distance between planes is 0.27 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.38; #lattice constant(nm)\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=0;\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #distance between planes(nm)\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between planes is\",round(d,2),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.5, Page number 3.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 32.0 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.19; #lattice constant(nm)\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1;\n",
+ "lamda=0.058; #wavelength of X rays(nm)\n",
+ "n=2; #second order\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #distance between planes(nm)\n",
+ "x=n*lamda/(2*d);\n",
+ "theta=math.asin(x); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",round(theta),\"degrees\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter4_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter4_1.ipynb new file mode 100755 index 00000000..2b7c926e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter4_1.ipynb @@ -0,0 +1,203 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#4: Defects in Crystals"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.1, Page number 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of vacancies is 1.082 *10**5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ev=1;\n",
+ "k=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "e=1.6*10**-19; #charge(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "r=Ev/(2.303*1000*k/e); \n",
+ "n=10**r; #ratio of n1000/n500\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of vacancies is\",round(n/10**5,3),\"*10**5\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.2, Page number 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of vacancies per atom at 350K is 0.5486 *10**-17\n",
+ "number of vacancies per atom at 500K is 0.827 *10**-12\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ev=1.2;\n",
+ "k=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "e=1.6*10**-19; #charge(eV)\n",
+ "T1=350; #temperature(K)\n",
+ "T2=500; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "x1=Ev/(2.303*k*T1/e);\n",
+ "n1=1/(10**x1); #number of vacancies per atom at 350K\n",
+ "x2=Ev/(2.303*k*T2/e);\n",
+ "n2=1/(10**x2); #number of vacancies per atom at 500K\n",
+ "\n",
+ "#Result\n",
+ "print \"number of vacancies per atom at 350K is\",round(n1*10**17,4),\"*10**-17\"\n",
+ "print \"number of vacancies per atom at 500K is\",round(n2*10**12,3),\"*10**-12\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.3, Page number 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "average energy required is 1.971 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=2.82*10**-10; #distance(m)\n",
+ "k=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "e=1.6*10**-19; #charge(eV)\n",
+ "T=273+25; #temperature(K)\n",
+ "sd=5*10**11; #schotky defects(per m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "V=(2*d)**3; #volume of unit cell(m**3)\n",
+ "N=4/V; #density of ion pairs\n",
+ "x=round(math.log10(N/sd),2);\n",
+ "Es=2*(k/e)*T*2.303*x; #average energy required(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"average energy required is\",round(Es,3),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.4, Page number 4.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of Frenkel defects is 1.125 *10**-6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=273+25; #temperature(K)\n",
+ "T2=273+350; #temperature(K)\n",
+ "Ef=1.35; #energy(eV)\n",
+ "k=8.625*10**-5;\n",
+ "\n",
+ "#Calculation\n",
+ "x=(Ef/k)*((1/(2*T1))-(1/(2*T2)))/2.303;\n",
+ "r=1/(10**round(x,3)); #ratio of Frenkel defects\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of Frenkel defects is\",round(r*10**6,3),\"*10**-6\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter4_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter4_2.ipynb new file mode 100755 index 00000000..2b7c926e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter4_2.ipynb @@ -0,0 +1,203 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#4: Defects in Crystals"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.1, Page number 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of vacancies is 1.082 *10**5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ev=1;\n",
+ "k=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "e=1.6*10**-19; #charge(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "r=Ev/(2.303*1000*k/e); \n",
+ "n=10**r; #ratio of n1000/n500\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of vacancies is\",round(n/10**5,3),\"*10**5\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.2, Page number 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of vacancies per atom at 350K is 0.5486 *10**-17\n",
+ "number of vacancies per atom at 500K is 0.827 *10**-12\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ev=1.2;\n",
+ "k=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "e=1.6*10**-19; #charge(eV)\n",
+ "T1=350; #temperature(K)\n",
+ "T2=500; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "x1=Ev/(2.303*k*T1/e);\n",
+ "n1=1/(10**x1); #number of vacancies per atom at 350K\n",
+ "x2=Ev/(2.303*k*T2/e);\n",
+ "n2=1/(10**x2); #number of vacancies per atom at 500K\n",
+ "\n",
+ "#Result\n",
+ "print \"number of vacancies per atom at 350K is\",round(n1*10**17,4),\"*10**-17\"\n",
+ "print \"number of vacancies per atom at 500K is\",round(n2*10**12,3),\"*10**-12\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.3, Page number 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "average energy required is 1.971 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=2.82*10**-10; #distance(m)\n",
+ "k=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "e=1.6*10**-19; #charge(eV)\n",
+ "T=273+25; #temperature(K)\n",
+ "sd=5*10**11; #schotky defects(per m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "V=(2*d)**3; #volume of unit cell(m**3)\n",
+ "N=4/V; #density of ion pairs\n",
+ "x=round(math.log10(N/sd),2);\n",
+ "Es=2*(k/e)*T*2.303*x; #average energy required(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"average energy required is\",round(Es,3),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.4, Page number 4.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of Frenkel defects is 1.125 *10**-6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=273+25; #temperature(K)\n",
+ "T2=273+350; #temperature(K)\n",
+ "Ef=1.35; #energy(eV)\n",
+ "k=8.625*10**-5;\n",
+ "\n",
+ "#Calculation\n",
+ "x=(Ef/k)*((1/(2*T1))-(1/(2*T2)))/2.303;\n",
+ "r=1/(10**round(x,3)); #ratio of Frenkel defects\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of Frenkel defects is\",round(r*10**6,3),\"*10**-6\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter5_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter5_1.ipynb new file mode 100755 index 00000000..f1b18946 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter5_1.ipynb @@ -0,0 +1,238 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#5: Elements of statistical mechanics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.1, Page number 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "average thermal energy is 0.039 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=1.38*10**-23; #boltzmann constant(J)\n",
+ "T=300; #temperature(K)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "E=3*k*T/(2*e); #average thermal energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"average thermal energy is\",round(E,3),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.3, Page number 5.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fermi function is 0.269\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "kT=1; #assume\n",
+ "E_Ef=kT;\n",
+ "\n",
+ "#Calculation\n",
+ "FE=1/(1+math.exp(1)); #fermi function\n",
+ "\n",
+ "#Result\n",
+ "print \"fermi function is\",round(FE,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.4, Page number 5.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " temperature is 290.2 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "FE=10/100; #fermi function\n",
+ "EF=5.5; #energy function(eV)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "k=1.38*10**-23; #boltzmann constant(J)\n",
+ "\n",
+ "#Calculation\n",
+ "E=EF+(EF/100); #energy(eV)\n",
+ "x=math.log((1/FE)-1);\n",
+ "T=(E-EF)*e/(k*x); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T,1),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.5, Page number 5.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fermi velocity is 0.86 *10**6 m s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=1.38*10**-23; #boltzmann constant(J)\n",
+ "T=24600; #temperature(K)\n",
+ "m=9.108*10**-31; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "vF=math.sqrt(2*k*T/m); #fermi velocity(m s-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"fermi velocity is\",round(vF/10**6,2),\"*10**6 m s-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.6, Page number 5.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of states is 1.1877 *10**26\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from scipy.integrate import quad\n",
+ "\n",
+ "#Variable declaration\n",
+ "EF=3.0; #fermi energy(eV)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.14*10**-31; #mass(kg)\n",
+ "h=6.62*10**-34; #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "E1=EF*e; #energy(J)\n",
+ "E2=(EF+0.01)*e; #energy(J)\n",
+ "def zintg(E):\n",
+ "\treturn (4*math.pi*(2*m)**(3/2)*math.sqrt(E))/h**3;\n",
+ "\n",
+ "n=quad(zintg,E1,E2)[0]; #number of states\n",
+ "\n",
+ "#Result\n",
+ "print \"number of states is\",round(n/10**26,4),\"*10**26\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter5_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter5_2.ipynb new file mode 100755 index 00000000..f1b18946 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter5_2.ipynb @@ -0,0 +1,238 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#5: Elements of statistical mechanics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.1, Page number 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "average thermal energy is 0.039 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=1.38*10**-23; #boltzmann constant(J)\n",
+ "T=300; #temperature(K)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "E=3*k*T/(2*e); #average thermal energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"average thermal energy is\",round(E,3),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.3, Page number 5.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fermi function is 0.269\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "kT=1; #assume\n",
+ "E_Ef=kT;\n",
+ "\n",
+ "#Calculation\n",
+ "FE=1/(1+math.exp(1)); #fermi function\n",
+ "\n",
+ "#Result\n",
+ "print \"fermi function is\",round(FE,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.4, Page number 5.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " temperature is 290.2 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "FE=10/100; #fermi function\n",
+ "EF=5.5; #energy function(eV)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "k=1.38*10**-23; #boltzmann constant(J)\n",
+ "\n",
+ "#Calculation\n",
+ "E=EF+(EF/100); #energy(eV)\n",
+ "x=math.log((1/FE)-1);\n",
+ "T=(E-EF)*e/(k*x); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T,1),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.5, Page number 5.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fermi velocity is 0.86 *10**6 m s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=1.38*10**-23; #boltzmann constant(J)\n",
+ "T=24600; #temperature(K)\n",
+ "m=9.108*10**-31; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "vF=math.sqrt(2*k*T/m); #fermi velocity(m s-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"fermi velocity is\",round(vF/10**6,2),\"*10**6 m s-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.6, Page number 5.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of states is 1.1877 *10**26\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from scipy.integrate import quad\n",
+ "\n",
+ "#Variable declaration\n",
+ "EF=3.0; #fermi energy(eV)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.14*10**-31; #mass(kg)\n",
+ "h=6.62*10**-34; #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "E1=EF*e; #energy(J)\n",
+ "E2=(EF+0.01)*e; #energy(J)\n",
+ "def zintg(E):\n",
+ "\treturn (4*math.pi*(2*m)**(3/2)*math.sqrt(E))/h**3;\n",
+ "\n",
+ "n=quad(zintg,E1,E2)[0]; #number of states\n",
+ "\n",
+ "#Result\n",
+ "print \"number of states is\",round(n/10**26,4),\"*10**26\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter6_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter6_1.ipynb new file mode 100755 index 00000000..9746dc5d --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter6_1.ipynb @@ -0,0 +1,603 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 6: Principles of quantum mechanics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.1, Page number 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 1.323 *10**-14 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/s)\n",
+ "m=1.67*10**-27; #mass of proton(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h*10/(m*c); #de broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda*10**14,3),\"*10**-14 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.2, Page number 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.613 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=400; #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",lamda,\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.3, Page number 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.181 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=1.674*10**-27; #mass of proton(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "E=0.025*1.6*10**-19; #energy(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h/math.sqrt(2*m*E); #de broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda*10**9,3),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.4, Page number 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.3065 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=1600; #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",lamda,\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.5, Page number 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "uncertainity in momentum is 5.27 *10**-24 kg m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "deltax=0.2*10**-10; #distance(m)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "deltap=h/(2*math.pi*deltax); #uncertainity in momentum(kg m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"uncertainity in momentum is\",round(deltap*10**24,2),\"*10**-24 kg m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.6, Page number 6.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lowest energy of electron is 112.9 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=n2=n3=1;\n",
+ "h=6.62*10**-34; #planck's constant\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "L=0.1*10**-9; #side(m) \n",
+ "\n",
+ "#Calculation\n",
+ "E1=h**2*(n1**2+n2**2+n3**2)/(8*m*1.6*10**-19*L**2); #lowest energy of electron(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",round(E1,1),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.7, Page number 6.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lowest energy of electron is 1.208 *10**4 eV\n",
+ "value of E112, E121, E211 is 2.4168 *10**4 eV\n",
+ "value of E122, E212, E221 is 3.625 *10**4 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=n2=n3=1;\n",
+ "h=6.62*10**-34; #planck's constant\n",
+ "m=8.5*10**-31; #mass(kg)\n",
+ "L=10**-11; #side(m) \n",
+ "\n",
+ "#Calculation\n",
+ "E111=h**2*(n1**2+n2**2+n3**2)/(8*m*1.6*10**-19*L**2); #lowest energy of electron(eV)\n",
+ "E112=6*h**2/(8*m*1.6*10**-19*L**2); #value of E112(eV)\n",
+ "E121=E112; #value of E121(eV)\n",
+ "E211=E112; #value of E211(eV)\n",
+ "E122=9*h**2/(8*m*1.6*10**-19*L**2); #value of E122(eV)\n",
+ "E212=E122; #value of E212(eV)\n",
+ "E221=E122; #value of E221(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",round(E111/10**4,3),\"*10**4 eV\"\n",
+ "print \"value of E112, E121, E211 is\",round(E121/10**4,4),\"*10**4 eV\"\n",
+ "print \"value of E122, E212, E221 is\",round(E122/10**4,3),\"*10**4 eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.8, Page number 6.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.0275 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of electron(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "E=2000*1.6*10**-19; #energy(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h/math.sqrt(2*m*E); #de broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda*10**9,4),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.9, Page number 6.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lowest energy of electron is 0.377 *10**-18 joule\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of electron(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "n=1;\n",
+ "L=4*10**-10; #side(m) \n",
+ "\n",
+ "#Calculation\n",
+ "E1=n**2*h**2/(8*m*L**2); #lowest energy of electron(joule)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",round(E1*10**18,3),\"*10**-18 joule\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.10, Page number 6.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lowest energy of electron is 0.6031 *10**-17 joule\n",
+ "energy of electron in 1st state is 2.412 *10**-17 joule\n",
+ "energy of electron in 2nd state is 5.428 *10**-17 joule\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of electron(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "n1=1;\n",
+ "n2=2;\n",
+ "n3=3;\n",
+ "L=1*10**-10; #side(m) \n",
+ "\n",
+ "#Calculation\n",
+ "E1=n1**2*h**2/(8*m*L**2); #lowest energy of electron(joule)\n",
+ "E2=n2**2*h**2/(8*m*L**2); #energy of electron in 1st state(joule)\n",
+ "E3=n3**2*h**2/(8*m*L**2); #energy of electron in 2nd state(joule)\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",round(E1*10**17,4),\"*10**-17 joule\"\n",
+ "print \"energy of electron in 1st state is\",round(E2*10**17,3),\"*10**-17 joule\"\n",
+ "print \"energy of electron in 2nd state is\",round(E3*10**17,3),\"*10**-17 joule\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.11, Page number 6.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity is 4386 km/s\n",
+ "kinetic energy is 54.71 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of electron(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "lamda=1.66*10**-10; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "v=h/(m*lamda); #velocity(m/s)\n",
+ "KE=(1/2)*m*v**2; #kinetic energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity is\",int(v/10**3),\"km/s\"\n",
+ "print \"kinetic energy is\",round(KE/(1.6*10**-19),2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.12, Page number 6.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.1 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=15000; #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda,1),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.13, Page number 6.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "spacing of crystal is 0.3816 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=344; #voltage(V)\n",
+ "n=1;\n",
+ "theta=60*math.pi/180; #angle(radian)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=round(12.26/math.sqrt(V),3); #de broglie wavelength(angstrom)\n",
+ "d=n*lamda/(2*math.sin(theta)); #spacing of crystal(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"spacing of crystal is\",round(d,4),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.14, Page number 6.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 9.787 *10**-6 m\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "E=1.5*9.1*10**-31; #energy(joule)\n",
+ "m=1.676*10**-27; #mass(kg)\n",
+ "h=6.62*10**-34; #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(2*E/m); \n",
+ "lamda=h/(m*v); #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**6,3),\"*10**-6 m\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter6_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter6_2.ipynb new file mode 100755 index 00000000..9746dc5d --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter6_2.ipynb @@ -0,0 +1,603 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 6: Principles of quantum mechanics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.1, Page number 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 1.323 *10**-14 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/s)\n",
+ "m=1.67*10**-27; #mass of proton(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h*10/(m*c); #de broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda*10**14,3),\"*10**-14 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.2, Page number 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.613 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=400; #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",lamda,\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.3, Page number 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.181 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=1.674*10**-27; #mass of proton(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "E=0.025*1.6*10**-19; #energy(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h/math.sqrt(2*m*E); #de broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda*10**9,3),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.4, Page number 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.3065 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=1600; #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",lamda,\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.5, Page number 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "uncertainity in momentum is 5.27 *10**-24 kg m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "deltax=0.2*10**-10; #distance(m)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "deltap=h/(2*math.pi*deltax); #uncertainity in momentum(kg m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"uncertainity in momentum is\",round(deltap*10**24,2),\"*10**-24 kg m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.6, Page number 6.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lowest energy of electron is 112.9 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=n2=n3=1;\n",
+ "h=6.62*10**-34; #planck's constant\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "L=0.1*10**-9; #side(m) \n",
+ "\n",
+ "#Calculation\n",
+ "E1=h**2*(n1**2+n2**2+n3**2)/(8*m*1.6*10**-19*L**2); #lowest energy of electron(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",round(E1,1),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.7, Page number 6.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lowest energy of electron is 1.208 *10**4 eV\n",
+ "value of E112, E121, E211 is 2.4168 *10**4 eV\n",
+ "value of E122, E212, E221 is 3.625 *10**4 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=n2=n3=1;\n",
+ "h=6.62*10**-34; #planck's constant\n",
+ "m=8.5*10**-31; #mass(kg)\n",
+ "L=10**-11; #side(m) \n",
+ "\n",
+ "#Calculation\n",
+ "E111=h**2*(n1**2+n2**2+n3**2)/(8*m*1.6*10**-19*L**2); #lowest energy of electron(eV)\n",
+ "E112=6*h**2/(8*m*1.6*10**-19*L**2); #value of E112(eV)\n",
+ "E121=E112; #value of E121(eV)\n",
+ "E211=E112; #value of E211(eV)\n",
+ "E122=9*h**2/(8*m*1.6*10**-19*L**2); #value of E122(eV)\n",
+ "E212=E122; #value of E212(eV)\n",
+ "E221=E122; #value of E221(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",round(E111/10**4,3),\"*10**4 eV\"\n",
+ "print \"value of E112, E121, E211 is\",round(E121/10**4,4),\"*10**4 eV\"\n",
+ "print \"value of E122, E212, E221 is\",round(E122/10**4,3),\"*10**4 eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.8, Page number 6.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.0275 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of electron(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "E=2000*1.6*10**-19; #energy(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h/math.sqrt(2*m*E); #de broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda*10**9,4),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.9, Page number 6.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lowest energy of electron is 0.377 *10**-18 joule\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of electron(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "n=1;\n",
+ "L=4*10**-10; #side(m) \n",
+ "\n",
+ "#Calculation\n",
+ "E1=n**2*h**2/(8*m*L**2); #lowest energy of electron(joule)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",round(E1*10**18,3),\"*10**-18 joule\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.10, Page number 6.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lowest energy of electron is 0.6031 *10**-17 joule\n",
+ "energy of electron in 1st state is 2.412 *10**-17 joule\n",
+ "energy of electron in 2nd state is 5.428 *10**-17 joule\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of electron(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "n1=1;\n",
+ "n2=2;\n",
+ "n3=3;\n",
+ "L=1*10**-10; #side(m) \n",
+ "\n",
+ "#Calculation\n",
+ "E1=n1**2*h**2/(8*m*L**2); #lowest energy of electron(joule)\n",
+ "E2=n2**2*h**2/(8*m*L**2); #energy of electron in 1st state(joule)\n",
+ "E3=n3**2*h**2/(8*m*L**2); #energy of electron in 2nd state(joule)\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",round(E1*10**17,4),\"*10**-17 joule\"\n",
+ "print \"energy of electron in 1st state is\",round(E2*10**17,3),\"*10**-17 joule\"\n",
+ "print \"energy of electron in 2nd state is\",round(E3*10**17,3),\"*10**-17 joule\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.11, Page number 6.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity is 4386 km/s\n",
+ "kinetic energy is 54.71 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9.1*10**-31; #mass of electron(kg)\n",
+ "h=6.626*10**-34; #planck's constant\n",
+ "lamda=1.66*10**-10; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "v=h/(m*lamda); #velocity(m/s)\n",
+ "KE=(1/2)*m*v**2; #kinetic energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity is\",int(v/10**3),\"km/s\"\n",
+ "print \"kinetic energy is\",round(KE/(1.6*10**-19),2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.12, Page number 6.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.1 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=15000; #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda,1),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.13, Page number 6.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "spacing of crystal is 0.3816 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=344; #voltage(V)\n",
+ "n=1;\n",
+ "theta=60*math.pi/180; #angle(radian)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=round(12.26/math.sqrt(V),3); #de broglie wavelength(angstrom)\n",
+ "d=n*lamda/(2*math.sin(theta)); #spacing of crystal(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"spacing of crystal is\",round(d,4),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.14, Page number 6.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 9.787 *10**-6 m\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "E=1.5*9.1*10**-31; #energy(joule)\n",
+ "m=1.676*10**-27; #mass(kg)\n",
+ "h=6.62*10**-34; #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(2*E/m); \n",
+ "lamda=h/(m*v); #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**6,3),\"*10**-6 m\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter7_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter7_1.ipynb new file mode 100755 index 00000000..8fddb7ff --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter7_1.ipynb @@ -0,0 +1,212 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#7: Band Theory of Solids"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.1, Page number 7.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of electrons is 5.86 *10**28\n",
+ "mobility of electrons is 0.725 *10**-2 m**2 V-1 s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho_s=10.5*10**3; #density(kg/m**3)\n",
+ "NA=6.02*10**26; #avagadro number(per k mol)\n",
+ "MA=107.9; #atomic mass\n",
+ "sigma=6.8*10**7; #conductance(ohm-1 m-1)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "n=rho_s*NA/MA; #density of electrons\n",
+ "mew=sigma/(n*e); #mobility of electrons(m**2/Vs)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of electrons is\",round(n/10**28,2),\"*10**28\"\n",
+ "print \"mobility of electrons is\",round(mew*10**2,3),\"*10**-2 m**2 V-1 s-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.2, Page number 7.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mobility of electrons is 0.427 *10**-2 m V-1 s-1\n",
+ "average time of collision is 2.43 *10**-14 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=8.92*10**3; #density(kg/m**3)\n",
+ "rho=1.73*10**-8; #resistivity of copper(ohm m)\n",
+ "NA=6.02*10**26; #avagadro number(per k mol)\n",
+ "Aw=63.5; #atomic weight\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "n=d*NA/Aw; #density of electrons\n",
+ "mew=1/(rho*n*e); #mobility of electrons(m**2/Vs)\n",
+ "t=m/(n*e**2*rho); #average time of collision(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"mobility of electrons is\",round(mew*10**2,3),\"*10**-2 m V-1 s-1\"\n",
+ "print \"average time of collision is\",round(t*10**14,2),\"*10**-14 s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.3, Page number 7.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relaxation time of conduction electrons is 3.97 *10**-14 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "P=1.54*10**-8; #resistance(ohm m)\n",
+ "n=5.8*10**28; #number of electrons(per m**3)\n",
+ "m=9.108*10**-31; #mass(kg)\n",
+ "e=1.602*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "t=m/(n*e**2*P); #relaxation time of conduction electrons(s) \n",
+ "\n",
+ "#Result\n",
+ "print \"relaxation time of conduction electrons is\",round(t*10**14,2),\"*10**-14 s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.4, Page number 7.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "free electron concentration is 1.8088 *10**29 electrons/m**2\n",
+ "mobility is 1.278 *10**-3 m s-1 V-1\n",
+ "drift velocity of electrons is 0.23 *10**-3 m s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=0.06; #resistance(ohm)\n",
+ "I=15; #current(A)\n",
+ "D=5; #length(m)\n",
+ "MA=26.98; #atomic mass\n",
+ "rho_s=2.7*10**3; #density(kg/m**3)\n",
+ "NA=6.025*10**26; #avagadro number(per k mol)\n",
+ "e=1.602*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "n=3*rho_s*NA/MA; #free electron concentration(electrons/m**2)\n",
+ "mew=1/(n*e*rho_s*10**-11); #mobility(m s-1 V-1)\n",
+ "E=I*R/D; #electric field(V/m)\n",
+ "vd=mew*E; #drift velocity of electrons(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"free electron concentration is\",round(n/10**29,4),\"*10**29 electrons/m**2\"\n",
+ "print \"mobility is\",round(mew*10**3,3),\"*10**-3 m s-1 V-1\"\n",
+ "print \"drift velocity of electrons is\",round(vd*10**3,2),\"*10**-3 m s-1\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter7_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter7_2.ipynb new file mode 100755 index 00000000..8fddb7ff --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter7_2.ipynb @@ -0,0 +1,212 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#7: Band Theory of Solids"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.1, Page number 7.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of electrons is 5.86 *10**28\n",
+ "mobility of electrons is 0.725 *10**-2 m**2 V-1 s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho_s=10.5*10**3; #density(kg/m**3)\n",
+ "NA=6.02*10**26; #avagadro number(per k mol)\n",
+ "MA=107.9; #atomic mass\n",
+ "sigma=6.8*10**7; #conductance(ohm-1 m-1)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "n=rho_s*NA/MA; #density of electrons\n",
+ "mew=sigma/(n*e); #mobility of electrons(m**2/Vs)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of electrons is\",round(n/10**28,2),\"*10**28\"\n",
+ "print \"mobility of electrons is\",round(mew*10**2,3),\"*10**-2 m**2 V-1 s-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.2, Page number 7.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mobility of electrons is 0.427 *10**-2 m V-1 s-1\n",
+ "average time of collision is 2.43 *10**-14 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=8.92*10**3; #density(kg/m**3)\n",
+ "rho=1.73*10**-8; #resistivity of copper(ohm m)\n",
+ "NA=6.02*10**26; #avagadro number(per k mol)\n",
+ "Aw=63.5; #atomic weight\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "n=d*NA/Aw; #density of electrons\n",
+ "mew=1/(rho*n*e); #mobility of electrons(m**2/Vs)\n",
+ "t=m/(n*e**2*rho); #average time of collision(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"mobility of electrons is\",round(mew*10**2,3),\"*10**-2 m V-1 s-1\"\n",
+ "print \"average time of collision is\",round(t*10**14,2),\"*10**-14 s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.3, Page number 7.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relaxation time of conduction electrons is 3.97 *10**-14 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "P=1.54*10**-8; #resistance(ohm m)\n",
+ "n=5.8*10**28; #number of electrons(per m**3)\n",
+ "m=9.108*10**-31; #mass(kg)\n",
+ "e=1.602*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "t=m/(n*e**2*P); #relaxation time of conduction electrons(s) \n",
+ "\n",
+ "#Result\n",
+ "print \"relaxation time of conduction electrons is\",round(t*10**14,2),\"*10**-14 s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.4, Page number 7.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "free electron concentration is 1.8088 *10**29 electrons/m**2\n",
+ "mobility is 1.278 *10**-3 m s-1 V-1\n",
+ "drift velocity of electrons is 0.23 *10**-3 m s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=0.06; #resistance(ohm)\n",
+ "I=15; #current(A)\n",
+ "D=5; #length(m)\n",
+ "MA=26.98; #atomic mass\n",
+ "rho_s=2.7*10**3; #density(kg/m**3)\n",
+ "NA=6.025*10**26; #avagadro number(per k mol)\n",
+ "e=1.602*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "n=3*rho_s*NA/MA; #free electron concentration(electrons/m**2)\n",
+ "mew=1/(n*e*rho_s*10**-11); #mobility(m s-1 V-1)\n",
+ "E=I*R/D; #electric field(V/m)\n",
+ "vd=mew*E; #drift velocity of electrons(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"free electron concentration is\",round(n/10**29,4),\"*10**29 electrons/m**2\"\n",
+ "print \"mobility is\",round(mew*10**3,3),\"*10**-3 m s-1 V-1\"\n",
+ "print \"drift velocity of electrons is\",round(vd*10**3,2),\"*10**-3 m s-1\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter8_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter8_1.ipynb new file mode 100755 index 00000000..e6d0049e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter8_1.ipynb @@ -0,0 +1,873 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#8: Semiconductors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.1, Page number 8.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistivity is 0.471 ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=2.37*10**19; #carrier density(per m**3)\n",
+ "mew_e=0.38; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.18; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i=ni*e*(mew_e+mew_h); \n",
+ "rho=1/sigma_i; #resistivity(ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",round(rho,3),\"ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.2, Page number 8.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "position of fermi level is 0.576 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg=1.12; #band gap(eV)\n",
+ "T=300; #temperature(K)\n",
+ "m0=1; #assume\n",
+ "me=0.12*m0;\n",
+ "mh=0.28*m0;\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "EF=(Eg/2)+(3*k*T*math.log(mh/me)/(4*e)); #position of fermi level(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"position of fermi level is\",round(EF,3),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.3, Page number 8.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "concentration of intrinsic charge carriers is 33.48 *10**18 per m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "m=9.109*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plancks constant\n",
+ "Eg=0.7; #energy(eV)\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "x=(2*math.pi*m*k/h**2)**(3/2);\n",
+ "y=math.exp(-Eg*e/(2*k*T));\n",
+ "ni=2*x*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"concentration of intrinsic charge carriers is\",round(ni/10**18,2),\"*10**18 per m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.4, Page number 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistivity is 0.449 ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=2.4*10**19; #carrier density(per m**3)\n",
+ "mew_e=0.39; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.19; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i=ni*e*(mew_e+mew_h); \n",
+ "rhoi=1/sigma_i; #resistivity(ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",round(rhoi,3),\"ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.5, Page number 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistance is 4.31 *10**3 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=2.5*10**19; #carrier density(per m**3)\n",
+ "mew_e=0.39; #electron mobility(m**2/Vs)\n",
+ "mew_p=0.19; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "l=1*10**-2; #length(m)\n",
+ "A=10**-3*10**-3; #area(m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "R=l/(ni*e*A*(mew_p+mew_e)); #resistance(ohm)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistance is\",round(R/10**3,2),\"*10**3 ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.6, Page number 8.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "conductivity is 1.578 *10**-3 ohm-1 m-1\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",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "m=9.109*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plancks constant\n",
+ "Eg=1.1; #energy(eV)\n",
+ "e=1.6*10**-19; \n",
+ "mew_e=0.48; #electron mobility(m**2/Vs)\n",
+ "mew_p=0.013; #hole mobility(m**2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "C=2*((2*math.pi*m*k/h**2)**(3/2));\n",
+ "y=math.exp(-Eg*e/(2*k*T));\n",
+ "ni=C*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n",
+ "sigma_i=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",round(sigma_i*10**3,3),\"*10**-3 ohm-1 m-1\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.7, Page number 8.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "concentration of intrinsic charge carriers is 3.35 *10**19 per m**3\n",
+ "conductivity is 3.589 ohm-1 m-1\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "m=9.109*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plancks constant\n",
+ "Eg=0.7; #energy(eV)\n",
+ "e=1.6*10**-19; \n",
+ "mew_e=0.48; #electron mobility(m**2/Vs)\n",
+ "mew_p=0.013; #hole mobility(m**2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "C=2*((2*math.pi*m*k/h**2)**(3/2));\n",
+ "y=math.exp(-Eg*e/(2*k*T));\n",
+ "ni=C*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n",
+ "sigma_i=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"concentration of intrinsic charge carriers is\",round(ni/10**19,2),\"*10**19 per m**3\"\n",
+ "print \"conductivity is\",round(sigma_i,3),\"ohm-1 m-1\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.8, Page number 8.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "forbidden energy gap is 0.793 eV\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; \n",
+ "mew_e=0.36; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.17; #hole mobility(m**2/Vs)\n",
+ "rho=2.12; #resistivity(ohm m)\n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "m=9.109*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plancks constant\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=1/rho;\n",
+ "ni=sigma/(e*(mew_e+mew_h));\n",
+ "C=2*((2*math.pi*m*k/h**2)**(3/2));\n",
+ "y=C*T**(3/2)/ni;\n",
+ "z=math.log(y);\n",
+ "Eg=2*k*T*z/(1.6*10**-19); #forbidden energy gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"forbidden energy gap is\",round(Eg,3),\"eV\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.9, Page number 8.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy band gap is 0.452 eV\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "x=0.6532;\n",
+ "y=0.3010;\n",
+ "T1=273+20; #temperature(K)\n",
+ "T2=273+32; #temperature(K)\n",
+ "k=8.616*10**-5;\n",
+ "\n",
+ "#Calculation\n",
+ "dy=x-y;\n",
+ "dx=(1/T1)-(1/T2);\n",
+ "Eg=2*k*dy/dx; #energy band gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy band gap is\",round(Eg,3),\"eV\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.10, Page number 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "temperature is 1729.0 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "EF=0.18; #fermi shift(eV)\n",
+ "E=1.2; #energy gap(eV)\n",
+ "e=1.6*10**-19; \n",
+ "r=5; \n",
+ "\n",
+ "#Calculation\n",
+ "T=EF*e*4/(3*k*math.log(r)); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.11, Page number 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electron concentration is 2.0 *10**9 per m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Na=5*10**23; #number of atoms(atoms)\n",
+ "Nd=3*10**23; #number of atoms(atoms)\n",
+ "ni=2*10**16; #intrinsic charge carriers(per m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "p=2*(Na-Nd)/2; #hole concentration(per m**3)\n",
+ "n=ni**2/p; #electron concentration(per m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"electron concentration is\",n/10**9,\"*10**9 per m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.12, Page number 8.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "conductivity is 0.432 *10**-3 ohm-1 m-1\n",
+ "conductivity is 10.38 ohm-1 m-1\n",
+ "conductivity is 3.99 ohm-1 m-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=1.5*10**16; #carrier density(per m**3)\n",
+ "mew_e=0.13; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.05; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "d=2.33*10**3; #density(kg/m**3)\n",
+ "n=28.1;\n",
+ "na=6.02*10**26; #number of atoms\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "Nd=d*na/(n*10**8);\n",
+ "p=ni**2/Nd; \n",
+ "sigma_ex1=Nd*e*mew_e; #conductivity(ohm-1 m-1)\n",
+ "n=p;\n",
+ "Na=Nd;\n",
+ "sigma_ex2=Na*e*mew_h; #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n",
+ "print \"conductivity is\",round(sigma_ex1,2),\"ohm-1 m-1\"\n",
+ "print \"conductivity is\",round(sigma_ex2,2),\"ohm-1 m-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.13, Page number 8.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "conductivity is 0.4392 *10**-3 ohm-1 m-1\n",
+ "hole concentration is 2250000000.0 per m**3\n",
+ "conductivity is 2.16 *10**3 ohm-1 m-1\n",
+ "position of fermi level is 0.02 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=1.5*10**16; #carrier density(per m**3)\n",
+ "mew_e=0.135; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.048; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "Nd=10**23; \n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23;\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "p=ni**2/Nd; #hole concentration(per m**3)\n",
+ "sigma_ex=Nd*e*mew_e; #conductivity(ohm-1 m-1)\n",
+ "x=3*k*T*math.log(mew_e/mew_h)/4;\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n",
+ "print \"hole concentration is\",p,\"per m**3\"\n",
+ "print \"conductivity is\",sigma_ex/10**3,\"*10**3 ohm-1 m-1\"\n",
+ "print \"position of fermi level is\",round(x/(1.6*10**-19),2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.14, Page number 8.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "diffusion coefficient is 49.162 *10**-4 m**2 s-1\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew_e=0.19; #electron mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23;\n",
+ "\n",
+ "#Calculation\n",
+ "Dn=mew_e*k*T/e; #diffusion coefficient(m**2 s-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"diffusion coefficient is\",round(Dn*10**4,3),\"*10**-4 m**2 s-1\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.15, Page number 8.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hall voltage is 1.83 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH=3.66*10**-4; #hall coefficient(m**3/coulomb)\n",
+ "I=10**-2; #current(amp)\n",
+ "B=0.5; #magnetic field(wb/m**2)\n",
+ "t=1*10**-3; #thickness(m)\n",
+ "\n",
+ "#Calculation\n",
+ "VH=RH*I*B*10**3/t; #hall voltage(mV)\n",
+ "\n",
+ "#Result\n",
+ "print \"hall voltage is\",VH,\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.16, Page number 8.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hall coefficient is 3.7e-06 C-1 m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vy=37*10**-6; #voltage(V)\n",
+ "t=10**-3; #thickness(m)\n",
+ "Bz=0.5; #magnetic field(wb/m**2)\n",
+ "Ix=20*10**-3; #current(A)\n",
+ "\n",
+ "#Calculation\n",
+ "RH=Vy*t/(Ix*Bz); #hall coefficient(m**3/coulomb)\n",
+ "\n",
+ "#Result\n",
+ "print \"hall coefficient is\",RH,\"C-1 m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.17, Page number 8.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of charge carriers is 9.124 *10**22 m**3\n",
+ "mobility of charge carriers is 17.125 *10**-3 m**2 V-1 s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH=6.85*10**-5; #hall coefficient(m**3/coulomb)\n",
+ "e=1.6*10**-19; \n",
+ "sigma=250; #conductivity(m-1 ohm-1)\n",
+ "\n",
+ "#Calculation\n",
+ "n=1/(RH*e); #density of charge carriers(m**3)\n",
+ "mew=sigma/(n*e); #mobility of charge carriers(m**2/Vs)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of charge carriers is\",round(n/10**22,3),\"*10**22 m**3\"\n",
+ "print \"mobility of charge carriers is\",mew*10**3,\"*10**-3 m**2 V-1 s-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.18, Page number 8.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hall voltage is 1.431 micro V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I=30; #current(A)\n",
+ "B=1.75; #magnetic field(T)\n",
+ "n=6.55*10**28; #electron concentration(/m**3)\n",
+ "t=0.35*10**-2; #thickness(m)\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "VH=I*B*10**6/(n*e*t); #hall voltage(micro V)\n",
+ "\n",
+ "#Result\n",
+ "print \"hall voltage is\",round(VH,3),\"micro V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.19, Page number 8.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of charge carriers is 1.708 *10**22 per m**3\n",
+ "mobility of charge carriers is 0.041 m**2 V-1 s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH=3.66*10**-4; #hall coefficient(m**3/coulomb)\n",
+ "e=1.6*10**-19;\n",
+ "Pn=8.93*10**-3; #resistivity(ohm m)\n",
+ "\n",
+ "#Calculation\n",
+ "n=1/(RH*e); #density of charge carriers(per m**3)\n",
+ "mew_e=RH/Pn; #mobility of charge carriers(m**2/Vs)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of charge carriers is\",round(n/10**22,3),\"*10**22 per m**3\"\n",
+ "print \"mobility of charge carriers is\",round(mew_e,3),\"m**2 V-1 s-1\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter8_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter8_2.ipynb new file mode 100755 index 00000000..e6d0049e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter8_2.ipynb @@ -0,0 +1,873 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#8: Semiconductors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.1, Page number 8.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistivity is 0.471 ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=2.37*10**19; #carrier density(per m**3)\n",
+ "mew_e=0.38; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.18; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i=ni*e*(mew_e+mew_h); \n",
+ "rho=1/sigma_i; #resistivity(ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",round(rho,3),\"ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.2, Page number 8.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "position of fermi level is 0.576 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg=1.12; #band gap(eV)\n",
+ "T=300; #temperature(K)\n",
+ "m0=1; #assume\n",
+ "me=0.12*m0;\n",
+ "mh=0.28*m0;\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "EF=(Eg/2)+(3*k*T*math.log(mh/me)/(4*e)); #position of fermi level(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"position of fermi level is\",round(EF,3),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.3, Page number 8.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "concentration of intrinsic charge carriers is 33.48 *10**18 per m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "m=9.109*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plancks constant\n",
+ "Eg=0.7; #energy(eV)\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "x=(2*math.pi*m*k/h**2)**(3/2);\n",
+ "y=math.exp(-Eg*e/(2*k*T));\n",
+ "ni=2*x*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"concentration of intrinsic charge carriers is\",round(ni/10**18,2),\"*10**18 per m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.4, Page number 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistivity is 0.449 ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=2.4*10**19; #carrier density(per m**3)\n",
+ "mew_e=0.39; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.19; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i=ni*e*(mew_e+mew_h); \n",
+ "rhoi=1/sigma_i; #resistivity(ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",round(rhoi,3),\"ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.5, Page number 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistance is 4.31 *10**3 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=2.5*10**19; #carrier density(per m**3)\n",
+ "mew_e=0.39; #electron mobility(m**2/Vs)\n",
+ "mew_p=0.19; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "l=1*10**-2; #length(m)\n",
+ "A=10**-3*10**-3; #area(m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "R=l/(ni*e*A*(mew_p+mew_e)); #resistance(ohm)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistance is\",round(R/10**3,2),\"*10**3 ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.6, Page number 8.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "conductivity is 1.578 *10**-3 ohm-1 m-1\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",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "m=9.109*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plancks constant\n",
+ "Eg=1.1; #energy(eV)\n",
+ "e=1.6*10**-19; \n",
+ "mew_e=0.48; #electron mobility(m**2/Vs)\n",
+ "mew_p=0.013; #hole mobility(m**2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "C=2*((2*math.pi*m*k/h**2)**(3/2));\n",
+ "y=math.exp(-Eg*e/(2*k*T));\n",
+ "ni=C*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n",
+ "sigma_i=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",round(sigma_i*10**3,3),\"*10**-3 ohm-1 m-1\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.7, Page number 8.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "concentration of intrinsic charge carriers is 3.35 *10**19 per m**3\n",
+ "conductivity is 3.589 ohm-1 m-1\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "m=9.109*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plancks constant\n",
+ "Eg=0.7; #energy(eV)\n",
+ "e=1.6*10**-19; \n",
+ "mew_e=0.48; #electron mobility(m**2/Vs)\n",
+ "mew_p=0.013; #hole mobility(m**2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "C=2*((2*math.pi*m*k/h**2)**(3/2));\n",
+ "y=math.exp(-Eg*e/(2*k*T));\n",
+ "ni=C*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n",
+ "sigma_i=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"concentration of intrinsic charge carriers is\",round(ni/10**19,2),\"*10**19 per m**3\"\n",
+ "print \"conductivity is\",round(sigma_i,3),\"ohm-1 m-1\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.8, Page number 8.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "forbidden energy gap is 0.793 eV\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; \n",
+ "mew_e=0.36; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.17; #hole mobility(m**2/Vs)\n",
+ "rho=2.12; #resistivity(ohm m)\n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "m=9.109*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plancks constant\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=1/rho;\n",
+ "ni=sigma/(e*(mew_e+mew_h));\n",
+ "C=2*((2*math.pi*m*k/h**2)**(3/2));\n",
+ "y=C*T**(3/2)/ni;\n",
+ "z=math.log(y);\n",
+ "Eg=2*k*T*z/(1.6*10**-19); #forbidden energy gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"forbidden energy gap is\",round(Eg,3),\"eV\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.9, Page number 8.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy band gap is 0.452 eV\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "x=0.6532;\n",
+ "y=0.3010;\n",
+ "T1=273+20; #temperature(K)\n",
+ "T2=273+32; #temperature(K)\n",
+ "k=8.616*10**-5;\n",
+ "\n",
+ "#Calculation\n",
+ "dy=x-y;\n",
+ "dx=(1/T1)-(1/T2);\n",
+ "Eg=2*k*dy/dx; #energy band gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy band gap is\",round(Eg,3),\"eV\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.10, Page number 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "temperature is 1729.0 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "EF=0.18; #fermi shift(eV)\n",
+ "E=1.2; #energy gap(eV)\n",
+ "e=1.6*10**-19; \n",
+ "r=5; \n",
+ "\n",
+ "#Calculation\n",
+ "T=EF*e*4/(3*k*math.log(r)); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.11, Page number 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electron concentration is 2.0 *10**9 per m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Na=5*10**23; #number of atoms(atoms)\n",
+ "Nd=3*10**23; #number of atoms(atoms)\n",
+ "ni=2*10**16; #intrinsic charge carriers(per m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "p=2*(Na-Nd)/2; #hole concentration(per m**3)\n",
+ "n=ni**2/p; #electron concentration(per m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"electron concentration is\",n/10**9,\"*10**9 per m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.12, Page number 8.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "conductivity is 0.432 *10**-3 ohm-1 m-1\n",
+ "conductivity is 10.38 ohm-1 m-1\n",
+ "conductivity is 3.99 ohm-1 m-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=1.5*10**16; #carrier density(per m**3)\n",
+ "mew_e=0.13; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.05; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "d=2.33*10**3; #density(kg/m**3)\n",
+ "n=28.1;\n",
+ "na=6.02*10**26; #number of atoms\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "Nd=d*na/(n*10**8);\n",
+ "p=ni**2/Nd; \n",
+ "sigma_ex1=Nd*e*mew_e; #conductivity(ohm-1 m-1)\n",
+ "n=p;\n",
+ "Na=Nd;\n",
+ "sigma_ex2=Na*e*mew_h; #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n",
+ "print \"conductivity is\",round(sigma_ex1,2),\"ohm-1 m-1\"\n",
+ "print \"conductivity is\",round(sigma_ex2,2),\"ohm-1 m-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.13, Page number 8.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "conductivity is 0.4392 *10**-3 ohm-1 m-1\n",
+ "hole concentration is 2250000000.0 per m**3\n",
+ "conductivity is 2.16 *10**3 ohm-1 m-1\n",
+ "position of fermi level is 0.02 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=1.5*10**16; #carrier density(per m**3)\n",
+ "mew_e=0.135; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.048; #hole mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "Nd=10**23; \n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23;\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "p=ni**2/Nd; #hole concentration(per m**3)\n",
+ "sigma_ex=Nd*e*mew_e; #conductivity(ohm-1 m-1)\n",
+ "x=3*k*T*math.log(mew_e/mew_h)/4;\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n",
+ "print \"hole concentration is\",p,\"per m**3\"\n",
+ "print \"conductivity is\",sigma_ex/10**3,\"*10**3 ohm-1 m-1\"\n",
+ "print \"position of fermi level is\",round(x/(1.6*10**-19),2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.14, Page number 8.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "diffusion coefficient is 49.162 *10**-4 m**2 s-1\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew_e=0.19; #electron mobility(m**2/Vs)\n",
+ "e=1.6*10**-19; \n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23;\n",
+ "\n",
+ "#Calculation\n",
+ "Dn=mew_e*k*T/e; #diffusion coefficient(m**2 s-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"diffusion coefficient is\",round(Dn*10**4,3),\"*10**-4 m**2 s-1\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.15, Page number 8.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hall voltage is 1.83 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH=3.66*10**-4; #hall coefficient(m**3/coulomb)\n",
+ "I=10**-2; #current(amp)\n",
+ "B=0.5; #magnetic field(wb/m**2)\n",
+ "t=1*10**-3; #thickness(m)\n",
+ "\n",
+ "#Calculation\n",
+ "VH=RH*I*B*10**3/t; #hall voltage(mV)\n",
+ "\n",
+ "#Result\n",
+ "print \"hall voltage is\",VH,\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.16, Page number 8.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hall coefficient is 3.7e-06 C-1 m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vy=37*10**-6; #voltage(V)\n",
+ "t=10**-3; #thickness(m)\n",
+ "Bz=0.5; #magnetic field(wb/m**2)\n",
+ "Ix=20*10**-3; #current(A)\n",
+ "\n",
+ "#Calculation\n",
+ "RH=Vy*t/(Ix*Bz); #hall coefficient(m**3/coulomb)\n",
+ "\n",
+ "#Result\n",
+ "print \"hall coefficient is\",RH,\"C-1 m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.17, Page number 8.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of charge carriers is 9.124 *10**22 m**3\n",
+ "mobility of charge carriers is 17.125 *10**-3 m**2 V-1 s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH=6.85*10**-5; #hall coefficient(m**3/coulomb)\n",
+ "e=1.6*10**-19; \n",
+ "sigma=250; #conductivity(m-1 ohm-1)\n",
+ "\n",
+ "#Calculation\n",
+ "n=1/(RH*e); #density of charge carriers(m**3)\n",
+ "mew=sigma/(n*e); #mobility of charge carriers(m**2/Vs)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of charge carriers is\",round(n/10**22,3),\"*10**22 m**3\"\n",
+ "print \"mobility of charge carriers is\",mew*10**3,\"*10**-3 m**2 V-1 s-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.18, Page number 8.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hall voltage is 1.431 micro V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I=30; #current(A)\n",
+ "B=1.75; #magnetic field(T)\n",
+ "n=6.55*10**28; #electron concentration(/m**3)\n",
+ "t=0.35*10**-2; #thickness(m)\n",
+ "e=1.6*10**-19; \n",
+ "\n",
+ "#Calculation\n",
+ "VH=I*B*10**6/(n*e*t); #hall voltage(micro V)\n",
+ "\n",
+ "#Result\n",
+ "print \"hall voltage is\",round(VH,3),\"micro V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.19, Page number 8.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of charge carriers is 1.708 *10**22 per m**3\n",
+ "mobility of charge carriers is 0.041 m**2 V-1 s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH=3.66*10**-4; #hall coefficient(m**3/coulomb)\n",
+ "e=1.6*10**-19;\n",
+ "Pn=8.93*10**-3; #resistivity(ohm m)\n",
+ "\n",
+ "#Calculation\n",
+ "n=1/(RH*e); #density of charge carriers(per m**3)\n",
+ "mew_e=RH/Pn; #mobility of charge carriers(m**2/Vs)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of charge carriers is\",round(n/10**22,3),\"*10**22 per m**3\"\n",
+ "print \"mobility of charge carriers is\",round(mew_e,3),\"m**2 V-1 s-1\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter9_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter9_1.ipynb new file mode 100755 index 00000000..bd885ca7 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter9_1.ipynb @@ -0,0 +1,195 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#9: Physics of Semiconductor Devices"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.1, Page number 9.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength of radiation is 0.868 micro m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=6.62*10**-34; #planck's constant(J sec)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "Eg=1.43*1.6*10**-19; #energy gap(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h*c*10**6/Eg; #wavelength of radiation(micro m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of radiation is\",round(lamda,3),\"micro m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.2, Page number 9.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time taken is 3.7 *10**-9 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=5*10**-6; #thickness(m)\n",
+ "Dc=3.4*10**-3; #diffusion coefficient(m**2 S-1)\n",
+ "\n",
+ "#Calculation\n",
+ "tow_diff=d**2/(2*Dc); #time taken(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"time taken is\",round(tow_diff*10**9,1),\"*10**-9 s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.3, Page number 9.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "transit time is 5e-11 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "w=5*10**-6; #thickness(m)\n",
+ "vsat=10**5; #velocity(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "tow_drift=w/vsat; #transit time(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"transit time is\",tow_drift,\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.4, Page number 9.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "diode capacitance is 28.8 pF\n",
+ "frequency bandwidth is 110 MHz\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=10**-6; #area(m**2)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "Nd=10**21; #electron concentration(m**-3)\n",
+ "epsilonr=11.7;\n",
+ "epsilon0=8.85*10**-12;\n",
+ "V=10; #potential(V)\n",
+ "RL=50; #resistance(ohm)\n",
+ "\n",
+ "#Calculation\n",
+ "Cj=(A/2)*math.sqrt(2*e*epsilonr*epsilon0*Nd/V); #diode capacitance(F)\n",
+ "delta_fel=1/(2*math.pi*RL*Cj); #frequency bandwidth(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"diode capacitance is\",round(Cj*10**12,1),\"pF\"\n",
+ "print \"frequency bandwidth is\",int(delta_fel*10**-6),\"MHz\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter9_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter9_2.ipynb new file mode 100755 index 00000000..bd885ca7 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter9_2.ipynb @@ -0,0 +1,195 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#9: Physics of Semiconductor Devices"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.1, Page number 9.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength of radiation is 0.868 micro m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=6.62*10**-34; #planck's constant(J sec)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "Eg=1.43*1.6*10**-19; #energy gap(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h*c*10**6/Eg; #wavelength of radiation(micro m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of radiation is\",round(lamda,3),\"micro m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.2, Page number 9.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time taken is 3.7 *10**-9 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=5*10**-6; #thickness(m)\n",
+ "Dc=3.4*10**-3; #diffusion coefficient(m**2 S-1)\n",
+ "\n",
+ "#Calculation\n",
+ "tow_diff=d**2/(2*Dc); #time taken(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"time taken is\",round(tow_diff*10**9,1),\"*10**-9 s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.3, Page number 9.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "transit time is 5e-11 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "w=5*10**-6; #thickness(m)\n",
+ "vsat=10**5; #velocity(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "tow_drift=w/vsat; #transit time(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"transit time is\",tow_drift,\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.4, Page number 9.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "diode capacitance is 28.8 pF\n",
+ "frequency bandwidth is 110 MHz\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=10**-6; #area(m**2)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "Nd=10**21; #electron concentration(m**-3)\n",
+ "epsilonr=11.7;\n",
+ "epsilon0=8.85*10**-12;\n",
+ "V=10; #potential(V)\n",
+ "RL=50; #resistance(ohm)\n",
+ "\n",
+ "#Calculation\n",
+ "Cj=(A/2)*math.sqrt(2*e*epsilonr*epsilon0*Nd/V); #diode capacitance(F)\n",
+ "delta_fel=1/(2*math.pi*RL*Cj); #frequency bandwidth(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"diode capacitance is\",round(Cj*10**12,1),\"pF\"\n",
+ "print \"frequency bandwidth is\",int(delta_fel*10**-6),\"MHz\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ }
+ ],
+ "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
+}
diff --git a/Engineering_Physics_by_P.K.Palanisamy/README.txt b/Engineering_Physics_by_P.K.Palanisamy/README.txt new file mode 100644 index 00000000..b9fb4354 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/README.txt @@ -0,0 +1,10 @@ +Contributed By: KRISHNA CHAITANYA +Course: btech +College/Institute/Organization: JNTUH +Department/Designation: Computer Science +Book Title: Engineering Physics +Author: P.K.Palanisamy +Publisher: Scitech Publications, Chennai +Year of publication: 2012 +Isbn: 9788183714631 +Edition: 2
\ No newline at end of file diff --git a/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter2.png b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter2.png Binary files differnew file mode 100755 index 00000000..074a3991 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter2.png diff --git a/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter6.png b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter6.png Binary files differnew file mode 100755 index 00000000..8fb78a80 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter6.png diff --git a/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter9.png b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter9.png Binary files differnew file mode 100755 index 00000000..896ba33a --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter9.png |