diff options
1898 files changed, 97589 insertions, 38568 deletions
diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb deleted file mode 100755 index 1dc0f01d..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb +++ /dev/null @@ -1,314 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#Chapter 1(A):Bonding in Solids"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.1, Page number 1.14"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "-2*a/r**3 + 90*b/r**11\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "from sympy import *\n",
- "import numpy as np\n",
- "\n",
- "#Variable declaration\n",
- "n=1;\n",
- "m=9;\n",
- "a=Symbol('a')\n",
- "b=Symbol('b')\n",
- "r=Symbol('r')\n",
- "\n",
- "#Calculation\n",
- "y=(-a/(r**n))+(b/(r**m));\n",
- "y=diff(y,r);\n",
- "y=diff(y,r);\n",
- "\n",
- "#Result\n",
- "print y\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "young's modulus is 157 GPa\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "a=7.68*10**-29; \n",
- "r0=2.5*10**-10; #radius(m)\n",
- "\n",
- "#Calculation\n",
- "b=a*(r0**8)/9;\n",
- "y=((-2*a*r0**8)+(90*b))/r0**11; \n",
- "E=y/r0; #young's modulus(Pa)\n",
- "\n",
- "#Result\n",
- "print \"young's modulus is\",int(E/10**9),\"GPa\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.2, Page number 1.15"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 21,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Effective charge = 0.72 *10**-29 coulomb\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "\n",
- "#variable declarations\n",
- "d=((1.98)*10**-29)*1/3; #dipole moment\n",
- "b=(0.92); #bond length\n",
- "EC=d/(b*10**-10); #Effective charge\n",
- "\n",
- "#Result\n",
- "print \"Effective charge =\",round((EC*10**19),2),\"*10**-29 coulomb\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.3, Page number 1.15"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Cohesive energy = 668.9 *10**3 kJ/kmol\n",
- "#Answer varies due to rounding of numbers\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "A=1.748 #Madelung Constant \n",
- "N=6.02*10**26 #Avagadro Number\n",
- "e=1.6*10**-19\n",
- "n=9.5\n",
- "r=(0.324*10**-9)*10**3\n",
- "E=8.85*10**-12\n",
- "#Calculations\n",
- "U=((N*A*(e)**2)/(4*math.pi*E*r))*(1-1/n) #Cohesive energy\n",
- "\n",
- "#Result\n",
- "print \"Cohesive energy =\",round(U/10**3,1),\"*10**3 kJ/kmol\"\n",
- "print \"#Answer varies due to rounding of numbers\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.4, Page number 1.15"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Coulomb energy = -2.88 eV\n",
- "Energy required = -1.88 eV\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "#variable declaration\n",
- "I=5; #Ionisation energy\n",
- "A=4; #Electron Affinity\n",
- "e=(1.6*10**-19)\n",
- "E=8.85*10**-12 #epsilon constant\n",
- "r=0.5*10**-19 #dist between A and B\n",
- "\n",
- "#Calculations\n",
- "C=-(e**2/(4*math.pi*E*r*e))/10**10 #Coulomb energy\n",
- "E_c=I-A+C #Energy required\n",
- "\n",
- "#Result\n",
- "print \"Coulomb energy =\",round(C,2),\"eV\"\n",
- "print \"Energy required =\",round(E_c,2),\"eV\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.5, Page number 1.16"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Energy required= 1.49 eV\n",
- "Distance of separation = 9.66 Angstrom\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "I=5.14; #Ionization energy\n",
- "A=3.65; #Electron Affinity\n",
- "e=(1.6*10**-19);\n",
- "E=8.85*10**-12; \n",
- "#calculations\n",
- "E_c=I-A #Energy required\n",
- "r=e**2/(4*math.pi*E*E_c*e) #Distance of separation\n",
- "\n",
- "#Result\n",
- "print \"Energy required=\",E_c,\"eV\"\n",
- "print \"Distance of separation =\",round(r/10**-10,2),\"Angstrom\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.6, Page number 1.16"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Energy required= 1.49 eV\n",
- "Energy required = -6.1 eV\n",
- "Bond Energy = 4.61 eV\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration \n",
- "I=5.14; #Ionization energy\n",
- "A=3.65; #Electron Affinity\n",
- "e=(1.6*10**-19);\n",
- "E=8.85*10**-12; \n",
- "r=236*10**-12;\n",
- "\n",
- "#Calculations\n",
- "E_c=I-A #Energy required\n",
- "C=-(e**2/(4*math.pi*E*r*e)) #Potentential energy in eV\n",
- "BE=-(E_c+C) #Bond Energy\n",
- "#Result\n",
- "print \"Energy required=\",E_c,\"eV\"\n",
- "print \"Energy required =\",round(C,1),\"eV\"\n",
- "print \"Bond Energy =\",round(BE,2),\"eV\"\n",
- "\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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb index 1f6dc249..1f6dc249 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb deleted file mode 100755 index 0df96e78..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb +++ /dev/null @@ -1,313 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#Crystal Structures"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.1, Page number 1.36"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a= 5.43 Angstorm\n",
- "density = 6.88 kg/m**3\n",
- "#Answer given in the textbook is wrong\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "d=2.351 #bond lenght\n",
- "N=6.02*10**26 #Avagadro number\n",
- "n=8 #number of atoms in unit cell\n",
- "A=28.09 #Atomin mass of silicon\n",
- "m=6.02*10**26 #1mole\n",
- "\n",
- "#Calculations\n",
- "a=(4*d)/math.sqrt(3)\n",
- "p=(n*A)/((a*10**-10)*m) #density\n",
- "\n",
- "#Result\n",
- "print \"a=\",round(a,2),\"Angstorm\"\n",
- "print \"density =\",round(p*10**16,2),\"kg/m**3\"\n",
- "print\"#Answer given in the textbook is wrong\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.2, Page number 1.36"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " radius of largest sphere is 0.154700538379252*r\n",
- "maximum radius of sphere is 0.414213562373095*r\n"
- ]
- }
- ],
- "source": [
- " import math\n",
- "from __future__ import division\n",
- "from sympy import *\n",
- "\n",
- "#Variable declaration\n",
- "r=Symbol('r')\n",
- "\n",
- "#Calculation\n",
- "a1=4*r/math.sqrt(3);\n",
- "R1=(a1/2)-r; #radius of largest sphere\n",
- "a2=4*r/math.sqrt(2);\n",
- "R2=(a2/2)-r; #maximum radius of sphere\n",
- "\n",
- "#Result\n",
- "print \"radius of largest sphere is\",R1\n",
- "print \"maximum radius of sphere is\",R2 \n",
- " "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.3, Page number 1.37"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a1= 2.905 Angstrom\n",
- "Unit cell volume =a1**3 = 24.521 *10**-30 m**3\n",
- "Volume occupied by one atom = 12.26 *10**-30 m**3\n",
- "a2= 3.654 Angstorm\n",
- "Unit cell volume =a2**3 = 48.8 *10**-30 m**3\n",
- "Volume occupied by one atom = 12.2 *10**-30 m**3\n",
- "Volume Change in % = 0.493\n",
- "Density Change in % = 0.5\n",
- "Thus the increase of density or the decrease of volume is about 0.5%\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "r1=1.258 #Atomic radius of BCC\n",
- "r2=1.292 #Atomic radius of FCC\n",
- "\n",
- "#calculations\n",
- "a1=(4*r1)/math.sqrt(3) #in BCC\n",
- "b1=((a1)**3)*10**-30 #Unit cell volume\n",
- "v1=(b1)/2 #Volume occupied by one atom\n",
- "a2=2*math.sqrt(2)*r2 #in FCC\n",
- "b2=(a2)**3*10**-30 #Unit cell volume\n",
- "v2=(b2)/4 #Volume occupied by one atom \n",
- "v_c=((v1)-(v2))*100/(v1) #Volume Change in % \n",
- "d_c=((v1)-(v2))*100/(v2) #Density Change in %\n",
- "\n",
- "#Results\n",
- "print \"a1=\",round(a1,3),\"Angstrom\" \n",
- "print \"Unit cell volume =a1**3 =\",round((b1)/10**-30,3),\"*10**-30 m**3\"\n",
- "print \"Volume occupied by one atom =\",round(v1/10**-30,2),\"*10**-30 m**3\"\n",
- "print \"a2=\",round(a2,3),\"Angstorm\"\n",
- "print \"Unit cell volume =a2**3 =\",round((b2)/10**-30,3),\"*10**-30 m**3\"\n",
- "print \"Volume occupied by one atom =\",round(v2/10**-30,2),\"*10**-30 m**3\"\n",
- "print \"Volume Change in % =\",round(v_c,3)\n",
- "print \"Density Change in % =\",round(d_c,2)\n",
- "print \"Thus the increase of density or the decrease of volume is about 0.5%\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "##Example 1.4, Page number 1.38"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a= 0.563 *10**-9 metre\n",
- "spacing between the nearest neighbouring ions = 0.2814 nm\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "n=4 \n",
- "M=58.5 #Molecular wt. of NaCl\n",
- "N=6.02*10**26 #Avagadro number\n",
- "rho=2180 #density\n",
- "\n",
- "#Calculations\n",
- "a=((n*M)/(N*rho))**(1/3) \n",
- "s=a/2\n",
- "\n",
- "#Result\n",
- "print \"a=\",round(a/10**-9,3),\"*10**-9 metre\"\n",
- "print \"spacing between the nearest neighbouring ions =\",round(s/10**-9,4),\"nm\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 1.5, Page number 1.38"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "lattice constant, a= 0.36 nm\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "n=4 \n",
- "A=63.55 #Atomic wt. of NaCl\n",
- "N=6.02*10**26 #Avagadro number\n",
- "rho=8930 #density\n",
- "\n",
- "#Calculations\n",
- "a=((n*A)/(N*rho))**(1/3) #Lattice Constant\n",
- "\n",
- "#Result\n",
- "print \"lattice constant, a=\",round(a*10**9,2),\"nm\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "##Example 1.6, Page number 1.39"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Density of iron = 8805.0 kg/m**-3\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "\n",
- "#variable declaration\n",
- "r=0.123 #Atomic radius\n",
- "n=4\n",
- "A=55.8 #Atomic wt\n",
- "a=2*math.sqrt(2) \n",
- "N=6.02*10**26 #Avagadro number\n",
- "\n",
- "#Calculations\n",
- "rho=(n*A)/((a*r*10**-9)**3*N)\n",
- "\n",
- "#Result\n",
- "print \"Density of iron =\",round(rho),\"kg/m**-3\""
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
- "source": []
- }
- ],
- "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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb index 769473f9..769473f9 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb deleted file mode 100755 index c257bf8c..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb +++ /dev/null @@ -1,615 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#2: Crystal Planes and X-ray Diffraction"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.1, Page number 2.12"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "i)Number of atoms per unit area of (100)plane= 1/(4*R**2)\n",
- "ii)Number of atoms per unit area of (110)plane= 2.82842712474619*R**2\n",
- "iii)Number of atoms per unit area of (111)plane= 2.3094010767585*R**2\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "from sympy import *\n",
- "#Variable declaration\n",
- "R=Symbol('R')\n",
- "a=2*R\n",
- "\n",
- "#Results\n",
- "print\"i)Number of atoms per unit area of (100)plane=\",1/a**2\n",
- "print\"ii)Number of atoms per unit area of (110)plane=\",1/math.sqrt(2)*a**2\n",
- "print\"iii)Number of atoms per unit area of (111)plane=\",1/math.sqrt(3)*a**2"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.2, Page number 2.13"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 42,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "i)Surface area of the face ABCD = 13.0 *10**-14 mm**2\n",
- "ii)Surface area of plane (110) = 1.09 *10**13 atoms/mm**2\n",
- "iii)Surface area of pane(111)= 1.772 *10**13 atoms/mm**2\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "a=3.61*10**-7\n",
- "BC=math.sqrt(2)/2\n",
- "AD=(math.sqrt(6))/2\n",
- "#Result\n",
- "print\"i)Surface area of the face ABCD =\",round(a**2*10**14),\"*10**-14 mm**2\"\n",
- "print\"ii)Surface area of plane (110) =\",round((2/(a*math.sqrt(2)*a)/10**13),2),\"*10**13 atoms/mm**2\"\n",
- "print\"iii)Surface area of pane(111)=\",round(2/(BC*AD*a**2)*10**-13,3),\"*10**13 atoms/mm**2\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.3, Page number 2.14"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 43,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "d1 = 1.0\n",
- "d2 = 0.707\n",
- "d3 = 0.577\n",
- "d1:d2:d3 = 1.0 : 0.707 : 0.577\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",
- "a=1\n",
- "\n",
- "#Calculations\n",
- "d1=a/(math.sqrt(h1**2+k1**2+l1**2))\n",
- "d2=a/(math.sqrt(h2**2+k2**2+l2**2))\n",
- "d3=a/(math.sqrt(h3**2+k3**2+l3**2))\n",
- "\n",
- "#Result\n",
- "print\"d1 =\",d1 \n",
- "print\"d2 =\",round(d2,3)\n",
- "print\"d3 =\",round(d3,3)\n",
- "print\"d1:d2:d3 =\",d1,\":\",round(d2,3),\":\",round(d3,3)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.4, Page number 2.15"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 47,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "d(220) = 159.1 pm\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "h=2\n",
- "k=2\n",
- "l=0\n",
- "a=450\n",
- "\n",
- "#Calculations\n",
- "d=a/(math.sqrt(h**2+k**2+l**2))\n",
- "\n",
- "#Result\n",
- "print\"d(220) =\",round(d,1),\"pm\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.5, Page number 2.15"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 49,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a = 3.615 Angstroms\n",
- "d = 2.087 Angstroms\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "a=3.615\n",
- "r=1.278\n",
- "h=1\n",
- "k=1\n",
- "l=1\n",
- "\n",
- "#Calculations\n",
- "a=(4*r)/math.sqrt(2)\n",
- "d=a/(math.sqrt(h**2+k**2+l**2))\n",
- "\n",
- "#Result\n",
- "print\"a =\",round(a,3),\"Angstroms\"\n",
- "print\"d =\",round(d,3),\"Angstroms\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.7, Page number 2.15"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "d = 1.45 *10**-10 m\n",
- "a = 4.1 *10**-10 m\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "n=1\n",
- "lamda=1.54\n",
- "theta=32*math.pi/180\n",
- "h=2\n",
- "k=2\n",
- "l=0\n",
- "\n",
- "#Calculations\n",
- "d=(n*lamda*10**-10)/(2*math.sin(theta)) #derived from 2dsin(theta)=n*l\n",
- "a=d*(math.sqrt(h**2+k**2+l**2))\n",
- "\n",
- "#Results\n",
- "print\"d =\",round(d*10**10,2),\"*10**-10 m\"\n",
- "print\"a =\",round(a*10**10,1),\"*10**-10 m\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.8, Page number 2.16"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 50,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "i. d/n = 2.582 Angstroms\n",
- "ii. d/n = 1.824 Angstroms\n",
- "iii.d/n = 1.289 Angstroms\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "lamda=0.58\n",
- "theta1=6.45*math.pi/180\n",
- "theta2=9.15*math.pi/180\n",
- "theta3=13*math.pi/180\n",
- "\n",
- "#Calculations\n",
- "dbyn1=lamda/(2*(math.sin(theta1)))\n",
- "dbyn2=lamda/(2*math.sin(theta2))\n",
- "dbyn3=lamda/(2*math.sin(theta3))\n",
- " \n",
- "#Results\n",
- "print\"i. d/n =\",round(dbyn1,3),\"Angstroms\"\n",
- "print\"ii. d/n =\",round(dbyn2,3),\"Angstroms\"\n",
- "print\"iii.d/n =\",round(dbyn3,3),\"Angstroms\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.9, Page number 2.16"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 36,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "n = 1.53\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "d=1.18\n",
- "theta=90*math.pi/180\n",
- "lamda=1.540\n",
- "\n",
- "#Calculations\n",
- "n=(2*d*math.sin(theta))/lamda\n",
- "\n",
- "#Result\n",
- "print\"n =\",round(n,2)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.10, Page number 2.17"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 41,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a = 3.51 Angstorms\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "lamda=0.58\n",
- "theta=9.5*math.pi/180\n",
- "n=1\n",
- "d=0.5 #d200=a/math.sqrt(2**2+0**2+0**2)=0.5a\n",
- "#Calculations\n",
- "a=n*lamda/(2*d*math.sin(theta)) #2*d*sin(theta)=n*lamda \n",
- "\n",
- "#Result\n",
- "print\"a =\",round(a,2),\"Angstorms\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.11, Page number 2.17"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "sin(theta3) = 26 35.9387574495\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "lamda=0.842\n",
- "n1=1\n",
- "q=(8+(35/60))*(math.pi/180)\n",
- "n2=3\n",
- "d=1\n",
- "#Calculations\n",
- "#n*lamda=2*d*sin(theta)\n",
- "#n1*0.842=2*d*sin(q)\n",
- "#n3*0.842=2*d*sin(theta3)\n",
- "#Dividing both the eauations, we get\n",
- "#(n2*lamda)/(n1*lamda)=2*d*math.sin(theta3)/2*d*math.sin(q)\n",
- "theta3=math.asin((((n2*lamda)/(n1*lamda))*(2*d*math.sin(q)))/(2*d))\n",
- "d=theta3*180/math.pi;\n",
- "a_d=int(d);\n",
- "a_m=(d-int(d))*60\n",
- "\n",
- "#Result\n",
- "print\"sin(theta3) =\",a_d,a_m\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.12, Page number 2.18"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "d = 2.22 Angstorms\n",
- "sqrt(h**2+k**2+l**2) = 1.424\n",
- "Therefore, h**2+k**2+l**2 =sqrt(2)\n",
- "h =1, k=1\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "a=3.16\n",
- "lamda=1.54\n",
- "n=1\n",
- "theta=20.3*math.pi/180\n",
- "\n",
- "#Calculations\n",
- "d=(n*lamda)/(2*math.sin(theta))\n",
- "x=a/d #let math.sqrt(h**2+k**2+l**2)=x\n",
- "\n",
- "#Result\n",
- "print\"d =\",round(d,2),\"Angstorms\"\n",
- "print\"sqrt(h**2+k**2+l**2) =\",round(x,3)\n",
- "print\"Therefore, h**2+k**2+l**2 =sqrt(2)\"\n",
- "print\"h =1, k=1\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.13, Page number 2.18"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 53,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a = 4.09 Angstroms\n",
- "d = 2.36 Angstroms\n",
- "lamda = 1.552 Angstroms\n",
- "E = 8.0 *10**3 eV\n"
- ]
- }
- ],
- "source": [
- "## importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "n=4\n",
- "A=107.87\n",
- "rho=10500\n",
- "N=6.02*10**26\n",
- "h=1;\n",
- "k=1;\n",
- "l=1;\n",
- "H=6.625*10**-34\n",
- "e=1.6*10**-19\n",
- "theta=(19+(12/60))*math.pi/180\n",
- "C=3*10**8\n",
- "#Calculations\n",
- "a=((n*A)/(rho*N))**(1/3)*10**10\n",
- "d=a/math.sqrt(h**2+k**2+l**2)\n",
- "lamda=2*d*math.sin(theta)\n",
- "E=(H*C)/(lamda*10**-10*e)\n",
- "\n",
- "#Result\n",
- "print\"a =\",round(a,2),\"Angstroms\"\n",
- "print\"d =\",round(d,2),\"Angstroms\"\n",
- "print\"lamda =\",round(lamda,3),\"Angstroms\"\n",
- "print\"E =\",round(E/10**3),\"*10**3 eV\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 2.14, Page number 2.19"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 72,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "d = 2.64 Angstorms\n",
- "sin(theta)= 0.288\n",
- "X = 7.554 cm\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "a=4.57\n",
- "h=1\n",
- "k=1\n",
- "l=1\n",
- "lamda=1.52\n",
- "twotheta=33.5*math.pi/180\n",
- "r=5 #radius\n",
- "#Calculations\n",
- "d=a/(h**2+k**2+l**2)**(1/2)\n",
- "sintheta=lamda/(2*d)\n",
- "X=r/math.tan(twotheta)\n",
- "\n",
- "#Result\n",
- "print\"d =\",round(d,2),\"Angstorms\"\n",
- "print\"sin(theta)=\",round(sintheta,3)\n",
- "print\"X =\",round(X,3),\"cm\""
- ]
- }
- ],
- "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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb index 7ac8549d..7ac8549d 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb deleted file mode 100755 index 6553b45b..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb +++ /dev/null @@ -1,215 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#3(A):Defects In Solids "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.1, Page number 3.17"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "at 0K, The number of vacancies per kilomole of copper is 0\n",
- "at 300K, The number of vacancies per kilomole of copper is 7.577 *10**5\n",
- "at 900K, The numb ber of vacancies per kilomole of copper is 6.502 *10**19\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "N=6.023*10**26\n",
- "deltaHv=120\n",
- "B=1.38*10**-23\n",
- "k=6.023*10**23\n",
- "\n",
- "#Calculations\n",
- "n0=0 # 0 in denominator\n",
- "n300=N*math.exp(-deltaHv*10**3/(k*B*300)) #The number of vacancies per kilomole of copper\n",
- "n900=N*math.exp(-(deltaHv*10**3)/(k*B*900))\n",
- "\n",
- "#Results\n",
- "print\"at 0K, The number of vacancies per kilomole of copper is\",n0\n",
- "print\"at 300K, The number of vacancies per kilomole of copper is\",round(n300/10**5,3),\"*10**5\"\n",
- "print\"at 900K, The numb ber of vacancies per kilomole of copper is\",round(n900/10**19,3),\"*10**19\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.2, Page number 3.16"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Fraction of vacancies at 1000 degrees C = 8.5 *10**-7\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "from sympy import *\n",
- "\n",
- "#Variable declaration\n",
- "F_500=1*10**-10\n",
- "delta_Hv=Symbol('delta_Hv')\n",
- "k=Symbol('k')\n",
- "T1=500+273\n",
- "T2=1000+273\n",
- "\n",
- "\n",
- "#Calculations\n",
- "lnx=math.log(F_500)*T1/T2;\n",
- "x=math.exp(round(lnx,2))\n",
- "\n",
- "print\"Fraction of vacancies at 1000 degrees C =\",round(x*10**7,1),\"*10**-7\" "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.3, Page number 3.17"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Volume of unit cell of NaCl = 1.794 *10**-28 m**3\n",
- "Total number of ion pairs 'N' =' 2.23 *10**28\n",
- "The concentration of Schottky defects per m**3 at 300K = 6.42 *10**11\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "a=(2*2.82*10**-10)\n",
- "delta_Hs=1.971*1.6*10**-19\n",
- "k=1.38*10**-23\n",
- "T=300\n",
- "\n",
- "#Calculations\n",
- "V=a**3 #Volume of unit cell of NaCl\n",
- "N=4/V #Total number of ion pairs\n",
- "n=N*math.e**-(delta_Hs/(2*k*T)) \n",
- "\n",
- "#Result\n",
- "print\"Volume of unit cell of NaCl =\",round(V*10**28,3),\"*10**-28 m**3\"\n",
- "print\"Total number of ion pairs 'N' ='\",round(N/10**28,2),\"*10**28\"\n",
- "print\"The concentration of Schottky defects per m**3 at 300K =\",round(n/10**11,2),\"*10**11\"\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.4, Page number 3.18"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 36,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "The number that must be created on heating from 0 to 500K is n= 9.22 *10**12 per cm**3\n",
- "As one step is 2 Angstorms, 5*10**7 vacancies are required for 1cm\n",
- "The amount of climb down by the dislocation is 0.369 cm\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "N=6.023*10**23\n",
- "delta_Hv=1.6*10**-19\n",
- "k=1.38*10**-23\n",
- "T=500\n",
- "mv=5.55; #molar volume\n",
- "x=2*10**-8; #numbber of cm in 1 angstrom\n",
- "\n",
- "#Calculations\n",
- "n=N*math.exp(-delta_Hv/(k*T))/mv\n",
- "a=round(n/(5*10**7*10**6),4)*x;\n",
- "\n",
- "#Result\n",
- "print\"The number that must be created on heating from 0 to 500K is n=\",round(n/10**12,2),\"*10**12 per cm**3\" #into cm**3\n",
- "print\"As one step is 2 Angstorms, 5*10**7 vacancies are required for 1cm\"\n",
- "print\"The amount of climb down by the dislocation is\",a*10**8,\"cm\""
- ]
- }
- ],
- "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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb index ff712281..ff712281 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb deleted file mode 100755 index 5fa9129c..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb +++ /dev/null @@ -1,414 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#3(B):Principles of Quantum Mechanics"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.1, Page number 3.41"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Velocity = 1.38 *10**6 m/s\n",
- "Wavelength = 0.00286 Angstorm\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "KE=10 #Kinetic Energy of neutron in keV\n",
- "m=1.675*10**-27\n",
- "h=6.625*10**-34\n",
- "#Calculations\n",
- "KE=10**4*1.6*10**-19 #in joule\n",
- "v=((2*KE)/m)**(1/2) #derived from KE=1/2*m*v**2\n",
- "lamda=h/(m*v)\n",
- "#Results\n",
- "print\"Velocity =\",round(v/10**6,2),\"*10**6 m/s\"\n",
- "print\"Wavelength =\",round(lamda*10**10,5),\"Angstorm\"\n",
- " "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.2, Page number 3.41"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Momentum 2.4133\n",
- "de Brolie wavelength = 2.73 *10**-11 m\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "E=2*1000*1.6*10**-19 #in joules\n",
- "m=9.1*10**-31\n",
- "h=6.6*10*10**-34\n",
- "\n",
- "#Calculations\n",
- "p=math.sqrt(2*m*E)\n",
- "lamda= h/p\n",
- "\n",
- "#Result\n",
- "print\"Momentum\",round(p*10**23,4)\n",
- "print\"de Brolie wavelength =\",round(lamda*10**10,2),\"*10**-11 m\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.3, Page number 3.41"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "wavelength = 1.807 Angstorm\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "M=1.676*10**-27 #Mass of neutron\n",
- "m=0.025\n",
- "v=1.602*10**-19\n",
- "h=6.62*10**-34\n",
- "\n",
- "#Calculations\n",
- "mv=(2*m*v)**(1/2)\n",
- "lamda=h/(mv*M**(1/2))\n",
- "\n",
- "#Result\n",
- "print\"wavelength =\",round(lamda*10**10,3),\"Angstorm\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.4, Page number 3.42"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 21,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Wavelength = 0.1226 Angstorm\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "V=10000\n",
- "\n",
- "#Calculation\n",
- "lamda=12.26/math.sqrt(V)\n",
- "\n",
- "#Result\n",
- "print\"Wavelength =\",lamda,\"Angstorm\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.5, Page number 3.42"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false,
- "scrolled": true
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "The permitted electron energies = 38.0 *n**2 eV\n",
- "E1= 38.0 eV\n",
- "E2= 151.0 eV\n",
- "E3= 339.0 eV\n",
- "#Answer varies due to rounding of numbers\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "\n",
- "#Variable declaration\n",
- "e=1.6*10**-19; #charge of electron(coulomb)\n",
- "L=10**-10 #1Angstrom=10**-10 m\n",
- "n1=1;\n",
- "n2=2;\n",
- "n3=3;\n",
- "h=6.626*10**-34\n",
- "m=9.1*10**-31\n",
- "L=10**-10\n",
- "\n",
- "#Calculations\n",
- "E1=(h**2)/(8*m*L**2*e)\n",
- "E2=4*E1\n",
- "E3=9*E1\n",
- "#Result\n",
- "print\"The permitted electron energies =\",round(E1),\"*n**2 eV\"\n",
- "print\"E1=\",round(E1),\"eV\"\n",
- "print\"E2=\",round(E2),\"eV\"\n",
- "print\"E3=\",round(E3),\"eV\"\n",
- "print\"#Answer varies due to rounding of numbers\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.6, Page number 3.42"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "si**2 delta(x)= 0.2\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "i=1*10**-10; #interval\n",
- "L=10*10**-10; #width\n",
- "\n",
- "#Calculations\n",
- "si2=2*i/L;\n",
- "\n",
- "#Result\n",
- "print\"si**2 delta(x)=\",si2"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.7, Page number 3.43"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " E1 = 1.81 *10**-37 Joule\n",
- "E2 = 3.62 *10**-37 Joule\n",
- "E2-E1 = 1.81 *10**-37 J\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "nx=1\n",
- "ny=1\n",
- "nz=1\n",
- "a=1\n",
- "h=6.63*10**-34\n",
- "m=9.1*10**-31\n",
- "\n",
- "#Calculations\n",
- "E1=h**2*(nx**2+ny**2+nz**2)/(8*m*a**2)\n",
- "E2=(h**2*6)/(8*m*a**2) #nx**2+ny**2+nz**2=6\n",
- "diff=E2-E1\n",
- "#Result\n",
- "print\"E1 =\",round(E1*10**37,2),\"*10**-37 Joule\"\n",
- "print\"E2 =\",round(E2*10**37,2),\"*10**-37 Joule\"\n",
- "print\"E2-E1 =\",round(diff*10**37,2),\"*10**-37 J\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 3.8, Page number 3.43"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "E1 = 3.28 *10**-13 J\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "m=1.67*10**-27\n",
- "a=10**-14\n",
- "h=1.054*10**-34\n",
- "\n",
- "#Calculations\n",
- "E1=(1*math.pi*h)**2/(2*m*a**2)\n",
- "\n",
- "#Result\n",
- "print\"E1 =\",round(E1*10**13,2),\"*10**-13 J\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "#Example number 3.9, Page number 3.44"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a= 0.0158\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "from scipy.integrate import quad\n",
- "#Variable declarations\n",
- "k=1;\n",
- "\n",
- "#Calculations\n",
- "def zintg(x):\n",
- " return 2*k*math.exp(-2*k*x)\n",
- "a=quad(zintg,2/k,3/k)[0]\n",
- "\n",
- "#Result\n",
- "print \"a=\",round(a,4)"
- ]
- }
- ],
- "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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb index 5fa9129c..5fa9129c 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb deleted file mode 100755 index 84e4acb8..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb +++ /dev/null @@ -1,478 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#4: Electron Theory of Metals"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.1, Page number 4.28"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "energy difference is 1.81 *10**-37 J\n",
- "3/2*k*T = E2 = 3.62 *10**-37 J\n",
- "T = 1.75 *10**-14 K\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "m=9.1*10**-31; #mass(kg)\n",
- "nx=ny=nz=1;\n",
- "n=6;\n",
- "a=1; #edge(m)\n",
- "h=6.63*10**-34; #planck's constant\n",
- "k=1.38\n",
- "#Calculation\n",
- "E1=h**2*(nx**2+ny**2+nz**2)/(8*m*a**2);\n",
- "E2=h**2*n/(8*m*a**2);\n",
- "E=E2-E1; #energy difference(J)\n",
- "T=(2*E2*10**37)/(3*k*10**-23)\n",
- "#Result\n",
- "print \"energy difference is\",round(E*10**37,2),\"*10**-37 J\"\n",
- "print \"3/2*k*T = E2 =\",round(E2*10**37,2),\"*10**-37 J\"\n",
- "print \"T =\",round(T/10**23,2),\"*10**-14 K\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.2, Page number 4.28"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "temperature is 1261 K\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",
- "y=1/100; #percentage of probability\n",
- "x=0.5*1.6*10**-19; #energy(J)\n",
- "k=1.38*10**-23; #boltzmann constant\n",
- "\n",
- "#Calculation\n",
- "xbykT=math.log((1/y)-1);\n",
- "T=x/(k*xbykT); #temperature(K)\n",
- "\n",
- "#Result\n",
- "print \"temperature is\",int(T),\"K\"\n",
- "print \"answer varies due to rounding off errors\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.3, Page number 4.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "fermi energy is 3.2 eV\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "d=970; #density(kg/m**3)\n",
- "Na=6.02*10**26; #avagadro number\n",
- "w=23; #atomic weight\n",
- "m=9.1*10**-31; #mass(kg)\n",
- "h=6.62*10**-34; #planck's constant\n",
- "\n",
- "#Calculation\n",
- "N=d*Na/w; #number of atoms/m**3\n",
- "x=h**2/(8*m);\n",
- "y=(3*N/math.pi)**(2/3);\n",
- "EF=x*y; #fermi energy(J)\n",
- "\n",
- "#Result\n",
- "print \"fermi energy is\",round(EF/(1.6*10**-19),1),\"eV\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.4, Page number 4.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "p(E) = 0.269\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "kT=1;\n",
- "E_EF=1;\n",
- "\n",
- "#Calculations\n",
- "p_E=1/(1+math.exp(E_EF/kT)) \n",
- " \n",
- "#Result \n",
- "print \"p(E) =\",round(p_E,3)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.5, Page number 4.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "N = 2.4 *10**26 states\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "from scipy.integrate import quad \n",
- "\n",
- "#Variable declarations\n",
- "m=9.1*10**-31\n",
- "h=6.626*10**-34\n",
- "Ef=3.1\n",
- "Ef1=Ef+0.02\n",
- "e=1.6*10**-19\n",
- "#Calculations\n",
- "def zintg(E):\n",
- " return math.pi*((8*m)**(3/2))*(E**(1/2)*e**(3/2))/(2*(h**3))\n",
- "N=quad(zintg,Ef,Ef1)[0]\n",
- "\n",
- "#Result\n",
- "print\"N =\",round(N*10**-26,1),\"*10**26 states\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.6, Page number 4.30"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "n = 8.5 *10**28 /m**3\n",
- "The drift speed Vd = 36.6 *10**-5 m/s\n",
- "The mean free collision time Tc = 2.087 *10**-14 seconds\n",
- "Mean free path = 3.34 *10**-8 m(answer varies due to rounding off errors)\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "N=6.023*10**26 #Avagadro number\n",
- "D=8960 #density \n",
- "F_e=1 #no.of free electrons per atom \n",
- "W=63.54 #Atomic weight\n",
- "i=10\n",
- "e=1.602*10**-19\n",
- "m=9.1*10**-31\n",
- "rho=2*10**-8\n",
- "Cbar=1.6*10**6 #mean thermal velocity(m/s)\n",
- "\n",
- "#Calculations\n",
- "n=(N*D*F_e)/W\n",
- "A=math.pi*0.08**2*10**-4\n",
- "Vd=i/(A*n*e) #Drift speed\n",
- "Tc=m/(n*(e**2)*rho)\n",
- "lamda=Tc*Cbar\n",
- "\n",
- "#Result\n",
- "print\"n =\",round(n/10**28,1),\"*10**28 /m**3\"\n",
- "print\"The drift speed Vd =\",round(Vd*10**5,1),\"*10**-5 m/s\"\n",
- "print\"The mean free collision time Tc =\",round(Tc*10**14,3),\"*10**-14 seconds\"\n",
- "print\"Mean free path =\",round(lamda*10**8,2),\"*10**-8 m\"\"(answer varies due to rounding off errors)\" \n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.7, Page number 4.30"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "The mean free collision time = 4.8 *10**7 ohm**-1 m**-1\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "##Variable declaration\n",
- "n=8.5*10**28\n",
- "e=1.602*10**-19\n",
- "t=2*10**-14\n",
- "m=9.1*10**-31\n",
- "\n",
- "#Calculations\n",
- "Tc=n*(e**2)*t/m\n",
- "\n",
- "#Result\n",
- "print \"The mean free collision time =\",round(Tc/10**7,1),\"*10**7 ohm**-1 m**-1\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.8, Page number 4.31"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Relaxation time = 4.0 *10**-14 second\n",
- "Mobility = 7.0 *10**-3 m**2/volt-s\n",
- "Drift Velocity= 0.7 m/s\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "\n",
- "#Variable declaration\n",
- "e=1.6*10**-19\n",
- "E=1 #(V/m)\n",
- "rho=1.54*10**-8\n",
- "n=5.8*10**28\n",
- "\n",
- "#Calculations\n",
- "T=m/(rho*n*e**2)\n",
- "Me=(e*T)/m\n",
- "Vd=Me*E\n",
- "\n",
- "#Result \n",
- "print\"Relaxation time =\",round(T*10**14),\"*10**-14 second\"\n",
- "print\"Mobility =\",round(Me*10**3),\"*10**-3 m**2/volt-s\"\n",
- "print\"Drift Velocity=\",round(Vd*100,1),\"m/s\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.9, Page number 4.31"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Temperature coefficient of resistivity,a = 5.7\n",
- "rho_973 = 5.51 *10**-8 ohm-m\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "\n",
- "##Variable declaration\n",
- "rho_r=0\n",
- "T=300\n",
- "rho=1.7*10**-18\n",
- "\n",
- "#Calculations \n",
- "a=rho/T\n",
- "rho_973=a*973\n",
- "\n",
- "#Results\n",
- "print\"Temperature coefficient of resistivity,a =\",round(a*10**21,1)\n",
- "print\"rho_973 =\",round(rho_973*10**18,2),\"*10**-8 ohm-m\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 4.10, Page number 4.31"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Increase in resistivity in copper = 0.54 *10**-8 ohm m\n",
- "Total resistivity of copper alloy = 2.04 *10**-8 ohm m\n",
- "The resistivity of alloy at 3K = 0.54 *10**-8 ohm m\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "\n",
- "##Variable declaration\n",
- "rho1=1.2*10**-8\n",
- "p1=0.4\n",
- "rho2=0.12*10**-8\n",
- "p2=0.5\n",
- "rho3=1.5*10**-8\n",
- "#Calculations\n",
- "R=(rho1*p1)+(rho2*p2)\n",
- "R_c=R+rho3\n",
- "\n",
- "#Results\n",
- "print\"Increase in resistivity in copper =\",round(R*10**8,2),\"*10**-8 ohm m\"\n",
- "print\"Total resistivity of copper alloy =\",round(R_c*10**8,2),\"*10**-8 ohm m\"\n",
- "print\"The resistivity of alloy at 3K =\",round(R*10**8,2),\"*10**-8 ohm 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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb index 84e4acb8..84e4acb8 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb deleted file mode 100755 index 28d3f8c6..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb +++ /dev/null @@ -1,212 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#5(A): Dielectric Properties"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.1, Page number 5.27"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 40,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "insulation resistance is 0.85 *10**18 ohm\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",
- "rho=5*10**16; #resistivity(ohm m)\n",
- "l=5*10**-2; #thickness(m)\n",
- "b=8*10**-2; #length(m)\n",
- "w=3*10**-2; #width(m)\n",
- "\n",
- "#Calculation\n",
- "A=b*w; #area(m**2)\n",
- "Rv=rho*l/A; \n",
- "X=l+b; #length(m)\n",
- "Y=w; #perpendicular(m)\n",
- "Rs=Rv*X/Y; \n",
- "Ri=Rs*Rv/(Rs+Rv); #insulation resistance(ohm)\n",
- "\n",
- "#Result\n",
- "print \"insulation resistance is\",round(Ri/10**18,2),\"*10**18 ohm\"\n",
- "print \"answer varies due to rounding off errors\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.2, Page number 5.28"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 42,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "polarisability of He is 0.185 *10**-40 farad m**2\n",
- "relative permittivity is 1.000056\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",
- "epsilon0=8.84*10**-12;\n",
- "R=0.55*10**-10; #radius(m)\n",
- "N=2.7*10**25; #number of atoms\n",
- "\n",
- "#Calculation\n",
- "alpha_e=4*math.pi*epsilon0*R**3; #polarisability of He(farad m**2)\n",
- "epsilonr=1+(N*alpha_e/epsilon0); #relative permittivity\n",
- "\n",
- "#Result\n",
- "print \"polarisability of He is\",round(alpha_e*10**40,3),\"*10**-40 farad m**2\"\n",
- "print \"relative permittivity is\",round(epsilonr,6)\n",
- "print \"answer varies due to rounding off errors\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.3, Page number 5.28"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 43,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "field strength is 3.535 *10**7 V/m\n",
- "total dipole moment is 33.4 *10**-12 Cm\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "A=360*10**-4; #area(m**2)\n",
- "V=15; #voltage(V)\n",
- "C=6*10**-6; #capacitance(farad)\n",
- "epsilonr=8;\n",
- "epsilon0=8.84*10**-12;\n",
- "\n",
- "#Calculation\n",
- "E=V*C/(epsilon0*epsilonr*A); #field strength(V/m)\n",
- "dm=epsilon0*(epsilonr-1)*V*A; #total dipole moment(Cm)\n",
- "\n",
- "#Result\n",
- "print \"field strength is\",round(E/10**7,3),\"*10**7 V/m\"\n",
- "print \"total dipole moment is\",round(dm*10**12,1),\"*10**-12 Cm\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.4, Page number 5.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 45,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "the complex polarizability is (3.50379335033-0.0600074383321j) *10**-40 F-m**2\n",
- "answer cant be rouned off to 2 decimals as given in the textbook. Since it is a complex number and complex cant be converted to float\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "epsilonr=4.36; #dielectric constant\n",
- "t=2.8*10**-2; #loss tangent(t)\n",
- "N=4*10**28; #number of electrons\n",
- "epsilon0=8.84*10**-12; \n",
- "\n",
- "#Calculation\n",
- "epsilon_r = epsilonr*t;\n",
- "epsilonstar = (complex(epsilonr,-epsilon_r));\n",
- "alphastar = (epsilonstar-1)/(epsilonstar+2);\n",
- "alpha_star = 3*epsilon0*alphastar/N; #complex polarizability(Fm**2)\n",
- "\n",
- "#Result\n",
- "print \"the complex polarizability is\",alpha_star*10**40,\"*10**-40 F-m**2\"\n",
- "print \"answer cant be rouned off to 2 decimals as given in the textbook. Since it is a complex number and complex cant be converted to float\""
- ]
- }
- ],
- "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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb index 28d3f8c6..28d3f8c6 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb deleted file mode 100755 index 0ada6386..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb +++ /dev/null @@ -1,288 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#5(B): Magnetic Properties"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.1, Page number 5.65"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "temperature rise is 8.43 K\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "El=10**-2*50; #energy loss(J)\n",
- "H=El*60; #heat produced(J)\n",
- "d=7.7*10**3; #iron rod(kg/m**3)\n",
- "s=0.462*10**-3; #specific heat(J/kg K)\n",
- "\n",
- "#Calculation\n",
- "theta=H/(d*s); #temperature rise(K)\n",
- "\n",
- "#Result\n",
- "print \"temperature rise is\",round(theta,2),\"K\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.2, Page number 5.65"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "magnetic field at the centre is 14.0 weber/m**2\n",
- "dipole moment is 9.0 *10**-24 ampere/m**2\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",
- "new=6.8*10**15; #frequency(revolutions per second)\n",
- "mew0=4*math.pi*10**-7;\n",
- "R=5.1*10**-11; #radius(m)\n",
- "\n",
- "#Calculation\n",
- "i=round(e*new,4); #current(ampere)\n",
- "B=mew0*i/(2*R); #magnetic field at the centre(weber/m**2)\n",
- "A=math.pi*R**2;\n",
- "d=i*A; #dipole moment(ampere/m**2)\n",
- "\n",
- "#Result\n",
- "print \"magnetic field at the centre is\",round(B),\"weber/m**2\"\n",
- "print \"dipole moment is\",round(d*10**24),\"*10**-24 ampere/m**2\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.3, Page number 5.65"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "intensity of magnetisation is 5.0 ampere/m\n",
- "flux density in material is 1.257 weber/m**2\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "chi=0.5*10**-5; #magnetic susceptibility\n",
- "H=10**6; #field strength(ampere/m)\n",
- "mew0=4*math.pi*10**-7;\n",
- "\n",
- "#Calculation\n",
- "I=chi*H; #intensity of magnetisation(ampere/m)\n",
- "B=mew0*(I+H); #flux density in material(weber/m**2)\n",
- "\n",
- "#Result\n",
- "print \"intensity of magnetisation is\",I,\"ampere/m\"\n",
- "print \"flux density in material is\",round(B,3),\"weber/m**2\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.4, Page number 5.65"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "number of Bohr magnetons is 2.22 bohr magneon/atom\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "B=9.27*10**-24; #bohr magneton(ampere m**2)\n",
- "a=2.86*10**-10; #edge(m)\n",
- "Is=1.76*10**6; #saturation value of magnetisation(ampere/m)\n",
- "\n",
- "#Calculation\n",
- "N=2/a**3;\n",
- "mew_bar=Is/N; #number of Bohr magnetons(ampere m**2)\n",
- "mew_bar=mew_bar/B; #number of Bohr magnetons(bohr magneon/atom)\n",
- "\n",
- "#Result\n",
- "print \"number of Bohr magnetons is\",round(mew_bar,2),\"bohr magneon/atom\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.5, Page number 5.66"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "average magnetic moment is 2.79 *10**-3 bohr magneton/spin\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "mew0=4*math.pi*10**-7;\n",
- "H=9.27*10**-24; #bohr magneton(ampere m**2)\n",
- "beta=10**6; #field(ampere/m)\n",
- "k=1.38*10**-23; #boltzmann constant\n",
- "T=303; #temperature(K)\n",
- "\n",
- "#Calculation\n",
- "mm=mew0*H*beta/(k*T); #average magnetic moment(bohr magneton/spin)\n",
- "\n",
- "#Result\n",
- "print \"average magnetic moment is\",round(mm*10**3,2),\"*10**-3 bohr magneton/spin\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 5.6, Page number 5.66"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "hysteresis loss per cycle is 188.0 J/m**3\n",
- "hysteresis loss per second is 9400.0 watt/m**3\n",
- "power loss is 1.23 watt/kg\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "A=94; #area(m**2)\n",
- "vy=0.1; #value of length(weber/m**2)\n",
- "vx=20; #value of unit length\n",
- "n=50; #number of magnetization cycles\n",
- "d=7650; #density(kg/m**3)\n",
- "\n",
- "#Calculation\n",
- "h=A*vy*vx; #hysteresis loss per cycle(J/m**3)\n",
- "hs=h*n; #hysteresis loss per second(watt/m**3)\n",
- "pl=hs/d; #power loss(watt/kg)\n",
- "\n",
- "#Result\n",
- "print \"hysteresis loss per cycle is\",h,\"J/m**3\"\n",
- "print \"hysteresis loss per second is\",hs,\"watt/m**3\"\n",
- "print \"power loss is\",round(pl,2),\"watt/kg\""
- ]
- }
- ],
- "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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb index 0ada6386..0ada6386 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb deleted file mode 100755 index ad04957e..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb +++ /dev/null @@ -1,774 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#6(A): Semiconductors"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.1, Page number 6.21"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 39,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "number of electron hole pairs is 2.32 *10**16 per cubic metre\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",
- "ni1=2.5*10**19; #number of electron hole pairs\n",
- "T1=300; #temperature(K)\n",
- "Eg1=0.72*1.6*10**-19; #energy gap(J)\n",
- "k=1.38*10**-23; #boltzmann constant\n",
- "T2=310; #temperature(K)\n",
- "Eg2=1.12*1.6*10**-19; #energy gap(J)\n",
- "\n",
- "#Calculation\n",
- "x1=-Eg1/(2*k*T1);\n",
- "y1=(T1**(3/2))*math.exp(x1);\n",
- "x2=-Eg2/(2*k*T2);\n",
- "y2=(T2**(3/2))*math.exp(x2);\n",
- "ni=ni1*(y2/y1); #number of electron hole pairs\n",
- "\n",
- "#Result\n",
- "print \"number of electron hole pairs is\",round(ni/10**16,2),\"*10**16 per cubic metre\"\n",
- "print \"answer varies due to rounding off errors\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.2, Page number 6.22"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 41,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "intrinsic conductivity is 1.434 *10**4 ohm-1 m-1\n",
- "intrinsic resistivity is 0.697 *10**-4 ohm m\n",
- "answer varies due to rounding off errors\n",
- "number of germanium atoms per m**3 is 4.5 *10**28\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "w=72.6; #atomic weight\n",
- "d=5400; #density(kg/m**3)\n",
- "Na=6.025*10**26; #avagadro number\n",
- "mew_e=0.4; #mobility of electron(m**2/Vs)\n",
- "mew_h=0.2; #mobility of holes(m**2/Vs)\n",
- "e=1.6*10**-19;\n",
- "m=9.108*10**-31; #mass(kg)\n",
- "ni=2.1*10**19; #number of electron hole pairs\n",
- "Eg=0.7; #band gap(eV)\n",
- "k=1.38*10**-23; #boltzmann constant\n",
- "h=6.625*10**-34; #plancks constant\n",
- "T=300; #temperature(K)\n",
- "\n",
- "#Calculation\n",
- "sigmab=ni*e*(mew_e+mew_h); #intrinsic conductivity(ohm-1 m-1)\n",
- "rhob=1/sigmab; #resistivity(ohm m)\n",
- "n=Na*d/w; #number of germanium atoms per m**3\n",
- "p=n/10**5; #boron density\n",
- "sigma=p*e*mew_h;\n",
- "rho=1/sigma;\n",
- "\n",
- "#Result\n",
- "print \"intrinsic conductivity is\",round(sigma/10**4,3),\"*10**4 ohm-1 m-1\"\n",
- "print \"intrinsic resistivity is\",round(rho*10**4,3),\"*10**-4 ohm m\"\n",
- "print \"answer varies due to rounding off errors\"\n",
- "print \"number of germanium atoms per m**3 is\",round(n/10**28,1),\"*10**28\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.3, Page number 6.23"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 44,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "charge carrier density is 2 *10**22 per m**3\n",
- "electron mobility is 0.035 m**2/Vs\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "e=1.6*10**-19;\n",
- "RH=3.66*10**-4; #hall coefficient(m**3/coulomb)\n",
- "sigma=112; #conductivity(ohm-1 m-1)\n",
- "\n",
- "#Calculation\n",
- "ne=3*math.pi/(8*RH*e); #charge carrier density(per m**3)\n",
- "mew_e=sigma/(e*ne); #electron mobility(m**2/Vs)\n",
- "\n",
- "#Result\n",
- "print \"charge carrier density is\",int(ne/10**22),\"*10**22 per m**3\"\n",
- "print \"electron mobility is\",round(mew_e,3),\"m**2/Vs\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.4, Page number 6.24"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 45,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "intrinsic conductivity is 0.432 *10**-3 ohm-1 m-1 10.4\n",
- "conductivity during donor impurity is 10.4 ohm-1 m-1\n",
- "conductivity during acceptor impurity is 4 ohm-1 m-1\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "mew_e=0.13; #mobility of electron(m**2/Vs)\n",
- "mew_h=0.05; #mobility of holes(m**2/Vs)\n",
- "e=1.6*10**-19;\n",
- "ni=1.5*10**16; #number of electron hole pairs\n",
- "N=5*10**28;\n",
- "\n",
- "#Calculation\n",
- "sigma1=ni*e*(mew_e+mew_h); #intrinsic conductivity(ohm-1 m-1)\n",
- "ND=N/10**8;\n",
- "n=ni**2/ND;\n",
- "sigma2=ND*e*mew_e; #conductivity(ohm-1 m-1)\n",
- "sigma3=ND*e*mew_h; #conductivity(ohm-1 m-1)\n",
- "\n",
- "#Result\n",
- "print \"intrinsic conductivity is\",round(sigma1*10**3,3),\"*10**-3 ohm-1 m-1\",sigma2\n",
- "print \"conductivity during donor impurity is\",sigma2,\"ohm-1 m-1\"\n",
- "print \"conductivity during acceptor impurity is\",int(sigma3),\"ohm-1 m-1\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.5, Page number 6.24"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 50,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "conductivity is 4.97 mho m-1\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "e=1.6*10**-19;\n",
- "Eg=0.72; #band gap(eV)\n",
- "k=1.38*10**-23; #boltzmann constant\n",
- "T1=293; #temperature(K)\n",
- "T2=313; #temperature(K)\n",
- "sigma1=2; #conductivity(mho m-1)\n",
- "\n",
- "#Calculation\n",
- "x=(Eg*e/(2*k))*((1/T1)-(1/T2));\n",
- "y=round(x/2.303,3);\n",
- "z=round(math.log10(sigma1),3);\n",
- "log_sigma2=y+z;\n",
- "sigma2=10**log_sigma2; #conductivity(mho m-1)\n",
- "\n",
- "#Result\n",
- "print \"conductivity is\",round(sigma2,2),\"mho m-1\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.6, Page number 6.25"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a)Concentration in N-type\n",
- "n = 1.442 *10**24 m**-3\n",
- "Hence p = 1.56 *10**8 m**-3\n",
- "b)Concentration in P-type\n",
- "p = 3.75 *10**24 m**-3\n",
- "Hence n = 0.6 *10**8 m**-3\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "ni=1.5*10**16\n",
- "mu_n=1300*10**-4\n",
- "mu_p=500*10**-4\n",
- "e=1.6*10**-19\n",
- "sigma=3*10**4\n",
- "\n",
- "#Calculations\n",
- "#Concentration in N-type\n",
- "n1=sigma/(e*mu_n)\n",
- "p1=ni**2/n1\n",
- "#Concentration in P-type\n",
- "p=sigma/(e*mu_p)\n",
- "n2=(ni**2)/p\n",
- "\n",
- "#Result\n",
- "print\"a)Concentration in N-type\"\n",
- "print\"n =\",round(n1*10**-24,3),\"*10**24 m**-3\"\n",
- "print\"Hence p =\",round(p1/10**8,2),\"*10**8 m**-3\"\n",
- "print\"b)Concentration in P-type\"\n",
- "print\"p =\",round(p/10**24,2),\"*10**24 m**-3\"\n",
- "print\"Hence n =\",round(n2/10**8,1),\"*10**8 m**-3\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.7, Page number 6.26"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Jx = 1000.0 ampere/m**2\n",
- "Ey = 0.183 V/m\n",
- "Vy = 1.83 mV\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "i=10**-2\n",
- "A=0.01*0.001\n",
- "RH=3.66*10**-4\n",
- "Bz=0.5\n",
- "\n",
- "#Calculations\n",
- "Jx=i/A\n",
- "Ey=RH*(Bz*Jx)\n",
- "Vy=Ey*0.01\n",
- "\n",
- "#Result\n",
- "print\"Jx =\",Jx,\"ampere/m**2\"\n",
- "print\"Ey =\",round(Ey,3),\"V/m\"\n",
- "print\"Vy =\",round(Vy*10**3,2),\"mV\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.8, Page number 6.26"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Position of fermi level = 0.5764 eV\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "Ev=0\n",
- "Ec=1.12\n",
- "k=1.38*10**-23\n",
- "T=300\n",
- "mh=0.28\n",
- "mc=0.12\n",
- "e=1.6*10**-19\n",
- "#Calculations\n",
- "Ef=((Ec+Ev)/2)+((3*k*T)/(4*e))*math.log(mh/mc)\n",
- "\n",
- "#Result\n",
- "print\"Position of fermi level =\",round(Ef,4),\"eV\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.9, Page number 6.26"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Conductivity of intrinsic germanium at 300K = 2.24 ohm**-1 m**-1\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "ni=2.5*10**19\n",
- "mu_e=0.38\n",
- "mu_h=0.18\n",
- "e=1.6*10**-19\n",
- "\n",
- "#Calculations\n",
- "sigmai=ni*e*(mu_e+mu_h)\n",
- "\n",
- "#Result\n",
- "print\"Conductivity of intrinsic germanium at 300K =\",round(sigmai,2),\"ohm**-1 m**-1\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.10, Page number 6.27"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 39,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Conductivity = 1.1593 *10**-3 ohm**-1 m**-1\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "m=9.1*10**-31\n",
- "k=1.38*10**-23\n",
- "T=300\n",
- "h=6.626*10**-34\n",
- "Eg=1.1\n",
- "e=1.6*10**-19\n",
- "mu_e=0.48\n",
- "mu_h=0.013\n",
- "#Calculations\n",
- "ni=2*((2*math.pi*m*k*T)/h**2)**(3/2)*math.exp(-(Eg*e)/(2*k*T))\n",
- "sigma=ni*e*(mu_e+mu_h)\n",
- " \n",
- "#Result\n",
- "print\"Conductivity =\",round(sigma*10**3,4),\"*10**-3 ohm**-1 m**-1\" "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.11, Page number 6.27"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "p = 2.0 *10**23 m**-3\n",
- "The electron concentration is given by n = 2.0 *10**9 m**-3\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "Na=5*10**23\n",
- "Nd=3*10**23\n",
- "ni=2*10**16\n",
- "#Calculations\n",
- "p=((Na-Nd)+(Na-Nd))/2\n",
- "\n",
- "#Result\n",
- "print\"p =\",p*10**-23,\"*10**23 m**-3\"\n",
- "print\"The electron concentration is given by n =\",ni**2/p*10**-9,\"*10**9 m**-3\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.12, Page number 6.28"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 43,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Rh = 3.7 *10**-6 C**-1 m**3\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "Vh=37*10**-6\n",
- "thick=1*10**-3\n",
- "width=5\n",
- "Iy=20*10**-3\n",
- "Bz=0.5\n",
- "\n",
- "#Calculations\n",
- "Rh=(Vh*width*thick)/(width*Iy*Bz)\n",
- "\n",
- "#Result\n",
- "print\"Rh =\",round(Rh*10**6,1),\"*10**-6 C**-1 m**3\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.13, Page number 6.28"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 46,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Dn = 33.54 cm**2 s**-1\n",
- "Dp = 12.9 cm**2 s**-1\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "Vt=0.0258\n",
- "mu_n=1300\n",
- "mu_p=500\n",
- "\n",
- "#Calculations\n",
- "Dn=Vt*mu_n\n",
- "Dp=Vt*mu_p\n",
- "\n",
- "#Result\n",
- "print\"Dn =\",Dn,\"cm**2 s**-1\"\n",
- "print\"Dp =\",Dp,\"cm**2 s**-1\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.14, Page number 6.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 63,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "The hole concentration 'p' = 1.125 *10**13 /m**3\n",
- "'n'= Nd = 2.0 *10**19\n",
- "Electrical Conductivity = 0.384 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\n",
- "Nd=2*10**19\n",
- "e=1.602*100**-19\n",
- "mu_n=0.12\n",
- "\n",
- "#Calculations\n",
- "p=ni**2/Nd\n",
- "E_c=e*Nd*mu_n\n",
- "\n",
- "#Result\n",
- "print\"The hole concentration 'p' =\",round(p*10**-13,3),\"*10**13 /m**3\"\n",
- "print\"'n'= Nd =\",round(Nd*10**-19),\"*10**19\"\n",
- "print\"Electrical Conductivity =\",round(E_c*10**19,3),\"ohm**-1 m**-1\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.15, Page number 6.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 37,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "mu_p= 1389.0 cm**2/V-s\n",
- "n= 6.0355 *10**13/cm**3\n",
- "p= 1.0355 *10**13/cm**3\n",
- "J= 582.5 A/m**2\n",
- "#Answer varies due to rounding of numbers\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "N=1/60\n",
- "e=1.6*10**-19\n",
- "ni=2.5*10**13\n",
- "b=5*10**13\n",
- "E=2\n",
- "\n",
- "#Calculations\n",
- "n=(b+math.sqrt(2*b**2))/2\n",
- "mu_p=N/(3*e*ni)\n",
- "mu_i=2*mu_p\n",
- "np=ni**2\n",
- "p=(ni**2)/n\n",
- "e=1.6*10**-19\n",
- "E=2\n",
- "J=(e*E)*((n*mu_i)+(p*mu_p))\n",
- "#Result\n",
- "print\"mu_p=\",round(mu_p),\"cm**2/V-s\"\n",
- "print\"n=\",round(n/10**13,4),\"*10**13/cm**3\"\n",
- "print\"p=\",round(p*10**-13,4),\"*10**13/cm**3\"\n",
- "print\"J=\",round(J*10**4,1),\"A/m**2\"\n",
- "print\"#Answer varies due to rounding of numbers\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example number 6.16, Page number 6.30"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "ni = 2.293 *10**19 /m**3\n",
- "Drift velocity of holes 1900.0 ms**-1\n",
- "Drift velocity of electrons= 3900.0 ms**-1\n"
- ]
- }
- ],
- "source": [
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "rho=47*10**-2\n",
- "e=1.6*10**-19\n",
- "mu_n=0.39\n",
- "mu_p=0.19\n",
- "E=10**4\n",
- "\n",
- "#Calculations\n",
- "ni=1/(rho*e*(mu_n+mu_p))\n",
- "Dh=mu_p*E\n",
- "De=mu_n*E\n",
- "\n",
- "#Results\n",
- "print\"ni =\",round(ni/10**19,3),\"*10**19 /m**3\"\n",
- "print\"Drift velocity of holes\",Dh,\"ms**-1\"\n",
- "print\"Drift velocity of electrons=\",De,\"ms**-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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb index ad04957e..ad04957e 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb index ac079778..ac079778 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb deleted file mode 100755 index 48386845..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb +++ /dev/null @@ -1,236 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 7:LASERS "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 7.1, Page number 7.32"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Divergence = -2.0 *10**-3 radian\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "r1 = 7; #in radians\n",
- "r2 = 3; #in radians\n",
- "d1 = 4; #Converting from mm to radians\n",
- "d2 = 6; #Converting from mm to radians\n",
- "\n",
- "#calculations\n",
- "D = (r2-r1)/(d2*10**3-d1*10**3) #Divergence\n",
- "\n",
- "#Result\n",
- "print \"Divergence =\",round(D*10**3,3),\"*10**-3 radian\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 7.2, Page number 7.32"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Frequency (V) = 4.32 *10**14 Hz\n",
- "Relative Population= 1.081 *10**30\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "C=3*10**8 #The speed of light\n",
- "Lamda=6943 #Wavelength\n",
- "T=300 #Temperature in Kelvin\n",
- "h=6.626*10**-34 #Planck constant \n",
- "k=1.38*10**-23 #Boltzmann's constant\n",
- "\n",
- "#Calculations\n",
- "\n",
- "V=(C)/(Lamda*10**-10) #Frequency\n",
- "R=math.exp(h*V/(k*T)) #Relative population\n",
- "\n",
- "#Result\n",
- "print \"Frequency (V) =\",round(V/10**14,2),\"*10**14 Hz\"\n",
- "print \"Relative Population=\",round(R/10**30,3),\"*10**30\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 7.3, Page number 7.32"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " Frequency= 4.74 *10**14 Hz\n",
- "no.of photons emitted= 7.322 *10**15 photons/sec\n",
- "Power density = 2.3 kWm**-2\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "C=3*10**8 #Velocity of light\n",
- "W=632.8*10**-9 #wavelength\n",
- "P=2.3\n",
- "t=1\n",
- "h=6.626*10**-34 #Planck constant \n",
- "S=1*10**-6\n",
- "\n",
- "#Calculations\n",
- "V=C/W #Frequency\n",
- "n=((P*10**-3)*t)/(h*V) #no.of photons emitted\n",
- "PD=P*10**-3/S #Power density\n",
- "\n",
- "#Result\n",
- "print \"Frequency=\",round(V/10**14,2),\"*10**14 Hz\"\n",
- "print \"no.of photons emitted=\",round(n/10**15,3),\"*10**15 photons/sec\"\n",
- "print \"Power density =\",round(PD/1000,1),\"kWm**-2\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 7.4, Page number 7.33"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Wavelenght = 8628.0 Angstrom\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "h=6.626*10**-34 #Planck constant \n",
- "C=3*10**8 #Velocity of light\n",
- "E_g=1.44 #bandgap \n",
- "\n",
- "#calculations\n",
- "lamda=(h*C)*10**10/(E_g*1.6*10**-19) #Wavelenght\n",
- "\n",
- "#Result\n",
- "print \"Wavelenght =\",round(lamda),\"Angstrom\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 7.5, Page number 7.33"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 25,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Band gap = 0.8 eV\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "W=1.55 #wavelength\n",
- "\n",
- "#Calculations\n",
- "E_g=(1.24)/W #Bandgap in eV \n",
- "\n",
- "#Result\n",
- "print \"Band gap =\",E_g,\"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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb index 48386845..48386845 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb deleted file mode 100755 index 4ab9cd1c..00000000 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb +++ /dev/null @@ -1,651 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#Chapter 8:Fiber Optics"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.1, Page number 8.28"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 125,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "The Critical angle = 78.5 degrees\n",
- "The numerical aperture = 0.3\n",
- "The acceptance angle = 17.4 degrees\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "n1=1.50 #Core refractive index\n",
- "n2=1.47 #Cladding refractive index\n",
- "\n",
- "#Calculations\n",
- "C_a=math.asin(n2/n1) #Critical angle \n",
- "N_a=(n1**2-n2**2)**(1/2)\n",
- "A_a=math.asin(N_a)\n",
- "\n",
- "#Results\n",
- "print \"The Critical angle =\",round(C_a*180/math.pi,1),\"degrees\"\n",
- "print \"The numerical aperture =\",round(N_a,2)\n",
- "print \"The acceptance angle =\",round(A_a*180/math.pi,1),\"degrees\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.2, Page number 8.28"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 126,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "N = 490.0\n",
- "Fiber can support 490.0 guided modes\n",
- "In graded index fiber, No.of modes propogated inside the fiber = 245.0 only\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "d=50 #diameter\n",
- "N_a=0.2 #Numerical aperture\n",
- "lamda=1 #wavelength\n",
- "\n",
- "#Calculations\n",
- "N=4.9*(((d*10**-6*N_a)/(lamda*10**-6))**2)\n",
- "\n",
- "#Result\n",
- "print \"N =\",N\n",
- "print \"Fiber can support\",N,\"guided modes\"\n",
- "print \"In graded index fiber, No.of modes propogated inside the fiber =\",N/2,\"only\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.3, Page number 8.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Numerical aperture = 0.008691\n",
- "No. of modes that can be propogated = 1.0\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "d=50 #diameter\n",
- "n1=1.450\n",
- "n2=1.447\n",
- "lamda=1 #wavelength\n",
- "\n",
- "#Calculations\n",
- "N_a=(n1**2-n2**2) #Numerical aperture\n",
- "N=4.9*(((d*10**-6*N_a)/(lamda*10**-6))**2)\n",
- "\n",
- "#Results\n",
- "print \"Numerical aperture =\",N_a\n",
- "print \"No. of modes that can be propogated =\",round(N)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.4, Page number 8.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 34,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Numerical aperture = 0.46\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "delta=0.05 \n",
- "n1=1.46\n",
- "\n",
- "#Calculation\n",
- "N_a=n1*(2*delta)**(1/2) #Numerical aperture\n",
- "\n",
- "#Result\n",
- "print \"Numerical aperture =\",round(N_a,2)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.5, Page number 8.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 40,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "V number = 94.72\n",
- "maximum no.of modes propogating through fiber = 4486.0\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "a=50\n",
- "n1=1.53\n",
- "n2=1.50\n",
- "lamda=1 #wavelength\n",
- "\n",
- "#Calculations\n",
- "N_a=(n1**2-n2**2) #Numerical aperture\n",
- "V=((2*math.pi*a)/lamda)*N_a**(1/2)\n",
- "\n",
- "#Result\n",
- "print \"V number =\",round(V,2)\n",
- "print \"maximum no.of modes propogating through fiber =\",round(N)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.6, Page number 8.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 64,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Number of modes = 24589.0 modes\n",
- "No.of modes is doubled to account for the two possible polarisations\n",
- "Total No.of modes = 49178.0\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "a=100\n",
- "N_a=0.3 #Numerical aperture\n",
- "lamda=850 #wavelength\n",
- "\n",
- "#Calculations\n",
- "V_n=(2*(math.pi)**2*a**2*10**-12*N_a**2)/lamda**2*10**-18\n",
- "#Result\n",
- "print \"Number of modes =\",round(V_n/10**-36),\"modes\"\n",
- "print \"No.of modes is doubled to account for the two possible polarisations\"\n",
- "print \"Total No.of modes =\",round(V_n/10**-36)*2\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.7, Page number 8.29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 88,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Cutoff Wavellength = 1.315 micro m.\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "\n",
- "#variable declaration\n",
- "a=5;\n",
- "n1=1.48;\n",
- "delta=0.01;\n",
- "V=25;\n",
- "\n",
- "#Calculation\n",
- "lamda=(math.pi*(a*10**-6)*n1*math.sqrt(2*delta))/V # Cutoff Wavelength\n",
- "\n",
- "#Result\n",
- "print \"Cutoff Wavellength =\",round(lamda*10**7,3),\"micro m.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.8, Page number 8.30"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 87,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Maximum core radius= 9.95 micro m\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "\n",
- "#variable declaration\n",
- "V=2.405\n",
- "lamda=1.3\n",
- "N_a=0.05\n",
- "\n",
- "#Calculations\n",
- "a_max=(V*lamda)/(2*math.pi*N_a)\n",
- "\n",
- "#Result\n",
- "print \"Maximum core radius=\",round(a_max,2),\"micro m\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.9, Page number 8.30"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Acceptance angle, theta_a = 17.46 degrees\n",
- "For skew rays,theta_as 34.83 degrees\n",
- "#Answer given in the textbook is wrong\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "N_a=0.3\n",
- "gamma=45\n",
- "\n",
- "#Calculations\n",
- "theta_a=math.asin(N_a)\n",
- "theta_as=math.asin((N_a)/math.cos(gamma))\n",
- "\n",
- "#Results\n",
- "print \"Acceptance angle, theta_a =\",round(theta_a*180/math.pi,2),\"degrees\"\n",
- "print \"For skew rays,theta_as \",round(theta_as*180/math.pi,2),\"degrees\"\n",
- "print\"#Answer given in the textbook is wrong\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.10, Page number 8.30"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 115,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Numerical aperture = 0.303\n",
- "Acceptance angle = 17.63 degrees\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "n1=1.53\n",
- "delta=0.0196\n",
- "\n",
- "#Calculations\n",
- "N_a=n1*(2*delta)**(1/2)\n",
- "A_a=math.asin(N_a)\n",
- "#Result\n",
- "print \"Numerical aperture =\",round(N_a,3)\n",
- "print \"Acceptance angle =\",round(A_a*180/math.pi,2),\"degrees\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.11, Page number 8.30"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "delta = 0.01\n",
- "Core radius,a = 1.55 micro m\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "n1=1.480\n",
- "n2=1.465\n",
- "V=2.405\n",
- "lamda=850*10**-9\n",
- "\n",
- "#Calculations\n",
- "delta=(n1**2-n2**2)/(2*n1**2)\n",
- "a=(V*lamda*10**-9)/(2*math.pi*n1*math.sqrt(2*delta))\n",
- "\n",
- "#Results\n",
- "print \"delta =\",round(delta,2)\n",
- "print \"Core radius,a =\",round(a*10**15,2),\"micro m\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.12, Page number 8.31"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 147,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " Critical angle= 83.38 degrees\n",
- "Fiber length covered in one reflection= 430.84 micro m\n",
- "Total no.of reflections per metre= 2321.0\n",
- "Since L=1m, Total dist. travelled by light over one metre of fiber = 1.0067 m\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "n1=1.5\n",
- "n2=1.49\n",
- "a=25\n",
- "\n",
- "#Calculations\n",
- "C_a=math.asin(n2/n1) #Critical angle\n",
- "L=2*a*math.tan(C_a) \n",
- "N_r=10**6/L \n",
- "\n",
- "#Result\n",
- "print \"Critical angle=\",round(C_a*180/math.pi,2),\"degrees\"\n",
- "print \"Fiber length covered in one reflection=\",round(L,2),\"micro m\"\n",
- "print \"Total no.of reflections per metre=\",round(N_r)\n",
- "print \"Since L=1m, Total dist. travelled by light over one metre of fiber =\",round(1/math.sin(C_a),4),\"m\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.13, Page number 8.31"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 155,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "No.of modes = 154.69 =155(approx)\n",
- "Taking the two possible polarizations, Total No.of nodes = 309.0\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "alpha=1.85\n",
- "lamda=1.3*10**-6\n",
- "a=25*10**-6\n",
- "N_a=0.21\n",
- "\n",
- "#Calculations\n",
- "V_n=((2*math.pi**2)*a**2*N_a**2)/lamda**2\n",
- "N_m=(alpha/(alpha+2))*V_n\n",
- "\n",
- "print \"No.of modes =\",round(N_m,2),\"=155(approx)\"\n",
- "print \"Taking the two possible polarizations, Total No.of nodes =\",round(N_m*2)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.14, Page number 8.32"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "a)Signal attention per unit length = 3.9 dB km**-1\n",
- "b)Overall signal attenuation = 39.0 dB\n",
- "#Answer given in the textbook is wrong\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "P_i=100\n",
- "P_o=2\n",
- "L=10\n",
- "\n",
- "#Calculations\n",
- "S=(10/L)*math.log(P_i/P_o)\n",
- "O=S*L\n",
- "\n",
- "#Result\n",
- "print \"a)Signal attention per unit length =\",round(S,1),\"dB km**-1\"\n",
- "print \"b)Overall signal attenuation =\",round(O),\"dB\"\n",
- "print \"#Answer given in the textbook is wrong\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##Example 8.15, Page number 8.32"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Total dispersion = 1343.3 ns\n",
- "Bandwidth length product = 37.22 Hz-km\n",
- "#Answer given in the text book is wrong\n"
- ]
- }
- ],
- "source": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#variable declaration\n",
- "L=10\n",
- "n1=1.55\n",
- "delta=0.026\n",
- "C=3*10**5\n",
- "\n",
- "#Calculations\n",
- "delta_T=(L*n1*delta)/C\n",
- "B_W=10/(2*delta_T)\n",
- "\n",
- "#Result\n",
- "print \"Total dispersion =\",round(delta_T/10**-9,1),\"ns\"\n",
- "print \"Bandwidth length product =\",round(B_W/10**5,2),\"Hz-km\"\n",
- "print \"#Answer given in the text 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/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb index 4ab9cd1c..4ab9cd1c 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt b/APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt index 8d70456e..8d70456e 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png Binary files differindex ff796297..ff796297 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png Binary files differindex 7624a700..7624a700 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png Binary files differindex 976df4e2..976df4e2 100644..100755 --- a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch2.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch2.ipynb new file mode 100755 index 00000000..11572a64 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch2.ipynb @@ -0,0 +1,1106 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3c32f4c771b7aa90d25f7c7a71e72b94eccb8c650a9b70156e8a9a1623dc111e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Static Characteristics of Instruments and Measurement systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating static error and static correction\n", + "# Variables\n", + "Am = 127.50;\n", + "At = 127.43;\n", + "\n", + "# Calculations and Results\n", + "e = Am-At;\n", + "print \"Static error(V) = \", e\n", + "\n", + "Sc = -e;\n", + "print \"Static Correction(V) = \", Sc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Static error(V) = 0.07\n", + "Static Correction(V) = -0.07\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating true value of the temperature\n", + "\n", + "# Variables\n", + "Am = 95.45;\n", + "Sc = -0.08;\n", + "\n", + "# Calculations\n", + "At = Am+Sc;\n", + "\n", + "# Results\n", + "print \"True Temperature(Degree C) = \", At\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "True Temperature(Degree C) = 95.37\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating Relative error (expressed as a percentage of f.s.d)\n", + "\n", + "# Variables\n", + "Am = 1.46;\n", + "At = 1.50;\n", + "\n", + "# Calculations and Results\n", + "e = Am-At;\n", + "print \"Absolute error(V) = \", e\n", + "Sc = -e;\n", + "print \"Absolute Correction(V) = \", Sc\n", + "RE = (e/At)*100;\n", + "print \"Relative Error in terms of true value(in percentage) = \", RE\n", + "REF = (e/2.5)*100;\n", + "print \"Relative Error in terms of true value(in percentage) = \", REF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute error(V) = -0.04\n", + "Absolute Correction(V) = 0.04\n", + "Relative Error in terms of true value(in percentage) = -2.66666666667\n", + "Relative Error in terms of true value(in percentage) = -1.6\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating static error and static correction\n", + "\n", + "# Variables\n", + "Am = 0.000161;\n", + "At = 0.159*10**-3;\n", + "\n", + "# Calculations and Results\n", + "e = Am-At;\n", + "print \"Static error(m3/s) = \", e\n", + "\n", + "Sc = -e;\n", + "print \"Static Correction(m3/s) = \", Sc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Static error(m3/s) = 2e-06\n", + "Static Correction(m3/s) = -2e-06\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating maximum static error \n", + "\n", + "# Variables\n", + "#Span of the thermometer(degree C)\n", + "S = 200.-150;\n", + "#Accuracy of the thermometer(in terms of percentage of span)\n", + "A = 0.0025;\n", + "\n", + "# Calculations\n", + "e = A*S;\n", + "\n", + "# Results\n", + "print \"Maximum Static error(degree C) = \", e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Static error(degree C) = 0.125\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating the pressure for a dial reading of 100\n", + "\n", + "# Calculations\n", + "P = ((27.58-6.895)/150)*100+6.895;\n", + "\n", + "# Results\n", + "print \"pressure for a dial reading of 100(kN/m2) = \", P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure for a dial reading of 100(kN/m2) = 20.685\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating the noise output voltage of the amplifier\n", + "\n", + "# Variables\n", + "Bw = 100.*10**3;\n", + "Sn = 7.*10**-21;\n", + "R = 50.*10**3;\n", + "\n", + "# Calculations and Results\n", + "A = (Sn*R*Bw)**0.5;\n", + "En = 2*A;\n", + "print \"Noise voltage at input(V) = \", En\n", + "\n", + "Ga = 100;\n", + "Eno = En*Ga;\n", + "print \"Noise voltage at output(V) = \", Eno\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise voltage at input(V) = 1.18321595662e-05\n", + "Noise voltage at output(V) = 0.00118321595662\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating the noise voltage\n", + "\n", + "# Variables\n", + "Sn = 20.;\n", + "Vs = 3;\n", + "\n", + "# Calculations\n", + "Vn = Vs/(Sn)**0.5;\n", + "\n", + "# Results\n", + "print \"noise Voltage(mV) = \", Vn" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "noise Voltage(mV) = 0.67082039325\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# calculating the signal to noise ratio at input\n", + "# calculating the signal to noise ratio at output\n", + "#calculating the noise factor and noise figure\n", + "\n", + "# Calculations and Results\n", + "print \"signal to noise ratio at input\"\n", + "Sni = (3.*10**-6/(1*10**-6))**2;\n", + "print \"signal to noise ratio at input = \", Sni\n", + "print \"signal to noise ratio at output\"\n", + "Sno = (60.*10**-6/(20*10**-6))**2;\n", + "print \"signal to noise ratio at output = \", Sno\n", + "print \"New signal to noise ratio at output\"\n", + "Snno = (60.*10**-6/(25*10**-6))**2;\n", + "print \"signal to noise ratio at output = \", Snno\n", + "\n", + "F = Sni/Snno;\n", + "print \"noise Factor = \", F\n", + "\n", + "nf = 10*math.log10(F);\n", + "print \"noise Figure(dB) = \", nf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "signal to noise ratio at input\n", + "signal to noise ratio at input = 9.0\n", + "signal to noise ratio at output\n", + "signal to noise ratio at output = 9.0\n", + "New signal to noise ratio at output\n", + "signal to noise ratio at output = 5.76\n", + "noise Factor = 1.5625\n", + "noise Figure(dB) = 1.93820026016\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating the ratio of output signal to noise signal \n", + "\n", + "# Variables\n", + "Bw = 100.*10**3;\n", + "K = 1.38*10**-23;\n", + "T = 300.;\n", + "R = 120.;\n", + "\n", + "# Calculations and Results\n", + "A = (K*T*R*Bw)**0.5;\n", + "En = 2*A;\n", + "print \"Noise voltage (V) = \", En\n", + "Eno = 0.12*10**-3;\n", + "print \"Noise voltage at output(V) = \", Eno\n", + "Ra = Eno/En;\n", + "print \"Ratio of signal votage to Noise voltage = \", Ra\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise voltage (V) = 4.45780214904e-07\n", + "Noise voltage at output(V) = 0.00012\n", + "Ratio of signal votage to Noise voltage = 269.190951029\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#calculating the average force and range of error\n", + "F1 = 10.03;\n", + "F2 = 10.10;\n", + "F3 = 10.11;\n", + "F4 = 10.08;\n", + "\n", + "# Calculations and Results\n", + "Fav = (F1+F2+F3+F4)/4;\n", + "print \"Average Force(N) = \", Fav\n", + "Fmax = F3;\n", + "MaxR = Fmax-Fav;\n", + "Fmin = F1;\n", + "MinR = Fav-Fmin;\n", + "AvgR = (MaxR+MinR)/2;\n", + "print \"Average range of error (N) = \", AvgR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average Force(N) = 10.08\n", + "Average range of error (N) = 0.04\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#calculating the sum of resistances connected in series with uncertainity of one unit\n", + "R1 = 72.3;\n", + "R2 = 2.73;\n", + "R3 = 0.612;\n", + "\n", + "# Calculations\n", + "R = (R1+R2+R3);\n", + "\n", + "# Results\n", + "print \"sum of resistances(ohm) = \", R\n", + "\n", + "print \"the resultant resistance is 75.6 ohm with 6 as first doutful figure\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sum of resistances(ohm) = 75.642\n", + "the resultant resistance is 75.6 ohm with 6 as first doutful figure\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#calculating the power with uncertainity of one unit in voltage and current\n", + "\n", + "# Variables\n", + "V = 12.16;\n", + "I = 1.34;\n", + "\n", + "# Calculations\n", + "P = V*I;\n", + "\n", + "# Results\n", + "print \"Power(W) = \", P\n", + "\n", + "print \"the resultant is 16.2 W with 2 as first doutful figure\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power(W) = 16.2944\n", + "the resultant is 16.2 W with 2 as first doutful figure\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the sum of resistances connected in series with appropriate number of significant figure\n", + "\n", + "# Variables\n", + "R1 = 28.7;\n", + "R2 = 3.624;\n", + "\n", + "# Calculations\n", + "R = (R1+R2);\n", + "\n", + "# Results\n", + "print \"sum of resistances(ohm) = \", R\n", + "\n", + "print \"the resultant resistance is 32.3 ohm as one of the resistance is accurate to three significant figure\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sum of resistances(ohm) = 32.324\n", + "the resultant resistance is 32.3 ohm as one of the resistance is accurate to three significant figure\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page No : 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the voltage drop with appropriate number of significant figure\n", + "\n", + "# Variables\n", + "R = 31.27;\n", + "I = 4.37;\n", + "\n", + "# Calculations\n", + "E = I*R;\n", + "\n", + "# Results\n", + "print \"voltage drop(V) = \", E\n", + "\n", + "print \"the voltage drop is 137 V as one of the resistance is accurate to three significant figure\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage drop(V) = 136.6499\n", + "the voltage drop is 137 V as one of the resistance is accurate to three significant figure\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page No : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the sensitivity and deflection factor of wheatstone bridge\n", + "\n", + "# Variables\n", + "Mo = 3.;\n", + "Mi = 7;\n", + "\n", + "# Calculations and Results\n", + "Sen = Mo/Mi;\n", + "print \"sensitivity(mm per ohm) = \", Sen\n", + "Df = Mi/Mo;\n", + "print \"deflection factor( ohm per mm) = \", Df\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sensitivity(mm per ohm) = 0.428571428571\n", + "deflection factor( ohm per mm) = 2.33333333333\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the volume of the mercury thermometer\n", + "\n", + "# Calculations and Results\n", + "Ac = (math.pi/4)*0.25**2;\n", + "print \"Area of mercury thermometer\", Ac\n", + "Lc = 13.8*10**3;\n", + "Vc = Ac*Lc;\n", + "print \"Volume of mercury thermometer(mm3)\", Vc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of mercury thermometer 0.0490873852123\n", + "Volume of mercury thermometer(mm3) 677.40591593\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the maximum position deviation, resistance deviation \n", + "\n", + "# Variables\n", + "Pl = 0.001;\n", + "FSD = 320;\n", + "R = 10000;\n", + "\n", + "# Calculations and Results\n", + "MDD = (Pl*FSD);\n", + "print \"Maximum lacement deviation(degree) =\",MDD\n", + "MRD = Pl*R;\n", + "print \"Maximum lacement deviation(ohm) = \",MRD\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum lacement deviation(degree) = 0.32\n", + "Maximum lacement deviation(ohm) = 10.0\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 Page No : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the dead zone\n", + "\n", + "# Variables\n", + "s = 600;\n", + "\n", + "# Calculations\n", + "Dz = 0.00125*s;\n", + "\n", + "# Results\n", + "print \"Dead zone(degree C) = \", Dz\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dead zone(degree C) = 0.75\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the Resolution\n", + "\n", + "# Variables\n", + "Fs = 200.;\n", + "D = 100.;\n", + "\n", + "# Calculations\n", + "SD = Fs/D;\n", + "R = SD/10;\n", + "\n", + "# Results\n", + "print \"resolution (V) = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resolution (V) = 0.2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23 Page No : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the Resolution\n", + "\n", + "# Variables\n", + "Fs = 9.999;\n", + "D = 9999;\n", + "\n", + "# Calculations\n", + "SD = Fs/D;\n", + "R = SD;\n", + "\n", + "# Results\n", + "print \"resolution (V) = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resolution (V) = 0.001\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24 Page No : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the reading of the multimeter and percentage error\n", + "\n", + "# Variables\n", + "Zl = 20000.;\n", + "Zo = 10000.;\n", + "Eo = 6.;\n", + "\n", + "# Calculations and Results\n", + "El = Eo/(1+Zo/Zl);\n", + "print \"Reading of the multimeter (V) = \", El\n", + "PE = ((El-Eo)/Eo)*100;\n", + "print \"Percentage error = \", PE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of the multimeter (V) = 4.0\n", + "Percentage error = -33.3333333333\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25 Page No : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the reading of the multimeter and percentage error\n", + "\n", + "# Variables\n", + "Zl = 20000.;\n", + "Zo = 1000.;\n", + "Eo = 6;\n", + "\n", + "# Calculations and Results\n", + "El = Eo/(1+Zo/Zl);\n", + "print \"Reading of the multimeter (V) = \", El\n", + "PE = ((El-Eo)/Eo)*100;\n", + "print \"Percentage error = \", PE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of the multimeter (V) = 5.71428571429\n", + "Percentage error = -4.7619047619\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the loading error\n", + "\n", + "# Variables\n", + "Zl = 1000.;\n", + "Zo = 200*200./400;\n", + "Eo = 100*200./400;\n", + "\n", + "# Calculations and Results\n", + "El = Eo/(1+Zo/Zl);\n", + "print \"Reading of the multimeter (V) = \", El\n", + "PE = ((El-Eo)/Eo)*100;\n", + "print \"Percentage loading error = \", PE\n", + "Ac = 100+PE;\n", + "print \"Accuracy = \", Ac\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of the multimeter (V) = 45.4545454545\n", + "Percentage loading error = -9.09090909091\n", + "Accuracy = 90.9090909091\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.27 Page No : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#calculating the voltage across the oscilloscope\n", + "\n", + "# Variables\n", + "C = 50*10.**-6;\n", + "\n", + "# Calculations and Results\n", + "f = 100000.;\n", + "print \"frequency = \", f\n", + "Xc = 1./(2*math.pi*f*C);\n", + "R = 10.**6;\n", + "Zl = (R*-1j*Xc)/(R-1j*Xc);\n", + "Eo = 1.;\n", + "Zo = 10.*10**3;\n", + "\n", + "El = Eo/(1+Zo/Zl);\n", + "print \"Reading of the multimeter (V) = \", El\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency = 100000.0\n", + "Reading of the multimeter (V) = (1.02334395478e-11-3.18309886181e-06j)\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.28 Page No : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the actual value of current, measured value of current and percentage error\n", + "\n", + "# Variables\n", + "Eo = 10.-((10.*1000)/(1000+1000));\n", + "Zo = ((1000.*1000)/(1000+1000))+500;\n", + "\n", + "# Calculations and Results\n", + "Io = Eo/Zo;\n", + "print \"Actual value of current (A) = \", Io\n", + "Zl = 100.;\n", + "Il = Eo/(Zo+Zl);\n", + "print \"Measured value of current (A) = \", Il\n", + "PE = ((Il-Io)/Io)*100;\n", + "print \"Percentage loading error = \", PE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual value of current (A) = 0.005\n", + "Measured value of current (A) = 0.00454545454545\n", + "Percentage loading error = -9.09090909091\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.29 Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculating the maximum available power\n", + "\n", + "# Variables\n", + "Eo = 80.*10**-3;\n", + "Il = 5.*10**-9;\n", + "Rl = 6.*10**6;\n", + "\n", + "# Calculations\n", + "Ro = (Eo/Il)-Rl;\n", + "Pmax = (Eo**2)/(4*Ro);\n", + "\n", + "# Results\n", + "print \"Maximum available Power(W) = \", Pmax\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum available Power(W) = 1.6e-10\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch3.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch3.ipynb new file mode 100755 index 00000000..21e7112d --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch3.ipynb @@ -0,0 +1,1812 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2ffa422208323473e7fa809c26d007c1a4e73e5340d80167d553ec696ed3e811" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Errors in Measurements and Their Statistical Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating guarantee value of capacitance\n", + "\n", + "# Variables\n", + "As = 1;\n", + "Er = 0.05;\n", + "\n", + "# Calculations and Results\n", + "Aau = As*(1+Er);\n", + "print \"Upper limit(micro F) = \", Aau\n", + "Aal = As*(1-Er);\n", + "print \"Lower limit(micro F) = \", Aal\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Upper limit(micro F) = 1.05\n", + "Lower limit(micro F) = 0.95\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculating percentage limiting error\n", + "\n", + "# Variables\n", + "As = 150.;\n", + "Er = 0.01;\n", + "\n", + "# Calculations\n", + "dA = As*Er;\n", + "As1 = 75.;\n", + "Er = (dA/As1)*100;\n", + "\n", + "# Results\n", + "print \"Percentage limiting error = \", Er\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage limiting error = 2.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the range of readings\n", + "\n", + "# Variables\n", + "fsd = 1000.;\n", + "TP = 100.;\n", + "\n", + "# Calculations and Results\n", + "Efsd = (1./100)*1000;\n", + "print \"magnitude of Error when specified in terms of full scale deflection (w) = \", Efsd\n", + "print \"Thus the meter will read between 90W and 110W\"\n", + "\n", + "Etv = (1./100)*100;\n", + "print \"magnitude of Error when specified in terms of true value (w) = \", Etv\n", + "print \"Thus the meter will read between 99W and 101W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnitude of Error when specified in terms of full scale deflection (w) = 10.0\n", + "Thus the meter will read between 90W and 110W\n", + "magnitude of Error when specified in terms of true value (w) = 1.0\n", + "Thus the meter will read between 99W and 101W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the limiting error in percent\n", + "\n", + "# Variables\n", + "dA = 0.05*5*10**-6;\n", + "As = 2.5*10**-6;\n", + "\n", + "# Calculations\n", + "Er = (dA/As)*100;\n", + "\n", + "# Results\n", + "print \"percemtage limiting error = +/-\", Er\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percemtage limiting error = +/- 10.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the range of readings specified interms of f.s.d. and true value\n", + "\n", + "print \"Range when specified interms of f.s.d.\"\n", + "\n", + "# Calculations and Results\n", + "Error_fsd = 1.*1000./100\n", + "Range_lower_value = 100-Error_fsd;\n", + "print \"Lower value of range (kN/m2)\", Range_lower_value\n", + "Range_upper_value = 100+Error_fsd;\n", + "print \"Upper value of range (kN/m2)\", Range_upper_value\n", + "print \"Range when specified interms of True value\",\n", + "Error_true = 1*100/100.\n", + "Range_lower_value = 100-Error_true;\n", + "print \"Lower value of range (kN/m2)\", Range_lower_value\n", + "Range_upper_value = 100+Error_true;\n", + "print \"Upper value of range (kN/m2)\", Range_upper_value\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Range when specified interms of f.s.d.\n", + "Lower value of range (kN/m2) 90.0\n", + "Upper value of range (kN/m2) 110.0\n", + "Range when specified interms of True value Lower value of range (kN/m2) 99.0\n", + "Upper value of range (kN/m2) 101.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the magnitude and limiting error in ohm and in percentage of the resistance\n", + "\n", + "# Variables\n", + "R1 = 37.;\n", + "R1_le = 5.*R1/100;\n", + "R2 = 75.;\n", + "R2_le = 5.*R2/100;\n", + "R3 = 50.;\n", + "R3_le = 5.*R3/100;\n", + "\n", + "# Calculations and Results\n", + "R = R1+R2+R3;\n", + "print \"Value of resistance (ohm) = \", R\n", + "\n", + "R_le = R1_le+R2_le+R3_le;\n", + "print \"Limiting Value of resistance (ohm) = \", R_le\n", + "\n", + "Limiting_error_percentage = R_le*100/R;\n", + "print \"Limiting Value of resistance (percentage) = +/-\", Limiting_error_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance (ohm) = 162.0\n", + "Limiting Value of resistance (ohm) = 8.1\n", + "Limiting Value of resistance (percentage) = +/- 5.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the value of relative limiting error in resistance\n", + "\n", + "# Variables\n", + "Re_P = 1.5;\n", + "Re_I = 1;\n", + "\n", + "# Calculations\n", + "Re_resistance = (Re_P+2*Re_I);\n", + "\n", + "# Results\n", + "print \"the value of relative limiting error of resistance in percentage(+/-) = \", Re_resistance" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of relative limiting error of resistance in percentage(+/-) = 3.5\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the guaranteed values of the resistance\n", + "\n", + "# Variables\n", + "R1 = 100.;\n", + "R1_le_perunit = 0.5; # R1_le_perunit indicates dR1/R1 = 0.5%\n", + "R2 = 1000.;\n", + "R2_le_perunit = 0.5;\n", + "R3 = 842.;\n", + "R3_le_perunit = 0.5;\n", + "\n", + "# Calculations and Results\n", + "Rx = R2*R3/R1;\n", + "print \"Value of resistance (ohm) = \", Rx\n", + "Rx_le_perunit = R1_le_perunit+R2_le_perunit+R3_le_perunit;\n", + "\n", + "print \"Limiting Value of resistance per unit (dRx/Rx) = \", Rx_le_perunit\n", + "Er_Le = Rx_le_perunit*Rx/100;\n", + "print \"Limiting Value of resistance (ohm) = +/-\", Er_Le\n", + "print \"Guarantee value of the resistance (ohm) = \",\n", + "G1 = Rx+Er_Le;\n", + "G2 = Rx-Er_Le;\n", + "print G1,G2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance (ohm) = 8420.0\n", + "Limiting Value of resistance per unit (dRx/Rx) = 1.5\n", + "Limiting Value of resistance (ohm) = +/- 126.3\n", + "Guarantee value of the resistance (ohm) = 8546.3 8293.7\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the percentage limiting error and range of resistance values\n", + "print \"error in decade a = so, decade a is set at 4000 ohm\",\n", + "Er_a = 4000.*0.1/100;\n", + "print Er_a\n", + "print \"error in decade b = so, decade b is set at 600 ohm\",\n", + "Er_b = 600*0.1/100.;\n", + "print Er_b\n", + "print \"error in decade c = so, decade c is set at 30 ohm\",\n", + "Er_c = 30*0.1/100.;\n", + "print Er_c\n", + "print \"error in decade d = so, decade d is set at 9 ohm\",\n", + "Er_d = 9*0.1/100;\n", + "print Er_d\n", + "Er_total = Er_a+Er_b+Er_c+Er_d;\n", + "Re_le_percentage = Er_total*100./4639;\n", + "print \"Percentage Relative limiting error = \", Re_le_percentage\n", + "Range_lower = 4639-Er_total;\n", + "print \"Lower value of range (ohm) = \", Range_lower\n", + "Range_upper = 4639+Er_total;\n", + "print \"upper value of range (ohm) = \", Range_upper\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "error in decade a = so, decade a is set at 4000 ohm 4.0\n", + "error in decade b = so, decade b is set at 600 ohm 0.6\n", + "error in decade c = so, decade c is set at 30 ohm 0.03\n", + "error in decade d = so, decade d is set at 9 ohm 0.009\n", + "Percentage Relative limiting error = 0.1\n", + "Lower value of range (ohm) = 4634.361\n", + "upper value of range (ohm) = 4643.639\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the magnitude of power and limiting error\n", + "\n", + "# Variables\n", + "F = 4.58;\n", + "L = 397.;\n", + "R = 1202.*10**-9;\n", + "t = 60.;\n", + "\n", + "# Calculations and Results\n", + "P = (2*math.pi*9.81*F*L*R)/(t*10**6);\n", + "print \"Magnitude of power (W) = \", P\n", + "dF_pu = 0.02/F; # per unit error in force\n", + "dL_pu = 1.3/L; # per unit error in Length\n", + "dR_pu = 1/R; # per unit error in revolution\n", + "dt_pu = 0.5/t; # per unit error in time\n", + "dP_pu = dF_pu+dL_pu+dR_pu+dt_pu;\n", + "dP_le = dP_pu*P;\n", + "print \"Magnitude of limiting error in power (W)\", dP_le\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of power (W) = 2.24521573806e-09\n", + "Magnitude of limiting error in power (W) 0.00186789998434\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the magnitude of Force and limiting error\n", + "\n", + "# Variables\n", + "E = 200.*10**9;\n", + "L = 25.*10**-3;\n", + "b = 4.75*10**-3;\n", + "d = 0.9*10**-3;\n", + "\n", + "# Calculations and Results\n", + "I = (b*d**3)/12;\n", + "x = 2.5*10**-3;\n", + "F = (3*E*I*x)/(L**3);\n", + "print \"Magnitude of Force (N) = \", F\n", + "\n", + "dE_pu = 0./E; # per unit error in E\n", + "db_pu = 0.0075/b; \n", + "dd_pu = 0.0075/d; \n", + "dx_pu = 0.025/x; \n", + "dL_pu = 0.025/L;\n", + "dF_pu = (dE_pu+db_pu+3*dd_pu+dx_pu+3*dL_pu)*10**-3;\n", + "\n", + "print \"limiting error in force (N) = +/-\", dF_pu\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of Force (N) = 27.702\n", + "limiting error in force (N) = +/- 0.0395789473684\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the power loss and relative error \n", + "\n", + "# Variables\n", + "I = 64.*10**-3;\n", + "R = 3200.;\n", + "\n", + "# Calculations and Results\n", + "P = (I**2)*R;\n", + "print \"Power(W) = \", P\n", + "Re = 2*0.75+0.2;\n", + "print \"Relative error (%) = \", Re\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power(W) = 13.1072\n", + "Relative error (%) = 1.7\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate the true power as a percentage of measured power\n", + "\n", + "# Variables\n", + "I = 30.4;\n", + "R = 0.015;\n", + "\n", + "# Calculations\n", + "I_true = I*(1+0.012);\n", + "R_true = R*(1-0.003);\n", + "P_true = (I_true**2)*R_true;\n", + "P_measured = (I**2)*R;\n", + "R = P_true*100/P_measured;\n", + "\n", + "# Results\n", + "print \"true power as a percentage of measured power(%) = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "true power as a percentage of measured power(%) = 102.1071568\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the total resistance, error of each register and fractional error of total resistance\n", + "\n", + "# Variables\n", + "R1 = 250.;\n", + "R2 = 500.;\n", + "R3 = 375.;\n", + "\n", + "# Calculations and Results\n", + "R_true = 1/((1/R1)+(1/R2)+(1/R3));\n", + "print \" True value of resistance(ohm) = \", R_true\n", + "\n", + "dR1 = 0.025*R1;\n", + "dR2 = -0.36*R2;\n", + "dR3 = 0.014*R3;\n", + "R1_effective = R1+dR1;\n", + "R2_effective = R2+dR2;\n", + "R3_effective = R3+dR3;\n", + "R_effective = 1/((1/R1_effective)+(1/R2_effective)+(1/R3_effective));\n", + "print \" Effective value of resistance(ohm) = \", R_effective\n", + "\n", + "Fractional_error = (R_true-R_effective)/R_true;\n", + "print \"Fractional_error\", Fractional_error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " True value of resistance(ohm) = 115.384615385\n", + " Effective value of resistance(ohm) = 103.548741621\n", + "Fractional_error 0.102577572617\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#\n", + "print \"When all the components have 0% error then resonant frequency (Hz)\",\n", + "\n", + "# Variables\n", + "L = 160.*10**-6;\n", + "C = 160.*10**-12;\n", + "fr = (1./(2*math.pi))*(1/(L*C))**0.5;\n", + "print fr\n", + "\n", + "# Calculations and Results\n", + "print \"When all the components have +10% error then resonant frequency (Hz)\",\n", + "L_new = (160.*10**-6)+0.1*L;\n", + "C_new = (160.*10**-12)+0.1*C;\n", + "fr_new = (1./(2*math.pi))*(1/(L_new*C_new))**0.5;\n", + "print fr_new\n", + "\n", + "error = (fr_new-fr)/fr;\n", + "print \"error = \", error\n", + "\n", + "print \"When all the components have -10% error then resonant frequency (Hz)\",\n", + "L_new = (160.*10**-6)-0.1*L;\n", + "C_new = (160.*10**-12)-0.1*C;\n", + "fr_new = (1./(2*math.pi))*(1/(L_new*C_new))**0.5;\n", + "print fr_new\n", + "\n", + "error = (fr_new-fr)/fr;\n", + "print \"error = \", error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When all the components have 0% error then resonant frequency (Hz) 994718.394324\n", + "When all the components have +10% error then resonant frequency (Hz) 904289.449386\n", + "error = -0.0909090909091\n", + "When all the components have -10% error then resonant frequency (Hz) 1105242.66036\n", + "error = 0.111111111111\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 Page No : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# calculate the Volume and relative error \n", + "\n", + "# Variables\n", + "L = 250.;\n", + "d = 50.;\n", + "\n", + "# Calculations and Results\n", + "V = ((math.pi/4)*d**2)*L;\n", + "print \"Volume(mm3) = \", V\n", + "Re = 2*0.2-0.5;\n", + "print \"Relative error (%) = \", Re\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume(mm3) = 490873.852123\n", + "Relative error (%) = -0.1\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the per unit change in the value of spring for different temperature ranges\n", + "\n", + "# Variables\n", + "dG_pu = -240*10**-6;\n", + "dD_pu = 11.8*10**-6;\n", + "\n", + "# Calculations and Results\n", + "print \"for temperature change of 20 degree C to 50 degree C (%) = \",\n", + "d_th = 30;\n", + "dK_pu = (dG_pu+dD_pu)*d_th*100;\n", + "print dK_pu\n", + "\n", + "print \"for temperature change of 20 degree C to -50 degree C (%) = \",\n", + "d_th = -70;\n", + "dK_pu = (dG_pu+dD_pu)*d_th*100;\n", + "print dK_pu\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for temperature change of 20 degree C to 50 degree C (%) = -0.6846\n", + "for temperature change of 20 degree C to -50 degree C (%) = 1.5974\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 Page No : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate apparent resistance, actual resistance and error\n", + "\n", + "# Variables\n", + "Et = 100.;\n", + "It = 5.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Rt = Et/It;\n", + "print \"apparent value of resistance (ohm) = \", Rt\n", + "Rv = 1000.*150;\n", + "\n", + "Rx = Rt*Rv/(Rv-Rt);\n", + "print \"true value of resistance(ohm)\", Rx\n", + "\n", + "Er_percentage = (Rt-Rx)/Rx*100;\n", + "print \"percentage error = \", Er_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "apparent value of resistance (ohm) = 20000.0\n", + "true value of resistance(ohm) 23076.9230769\n", + "percentage error = -13.3333333333\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculate apparent resistance, actual resistance and error\n", + "\n", + "# Variables\n", + "Et = 40.;\n", + "It = 800.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Rt = Et/It;\n", + "print \"apparent value of resistance (ohm) = \", Rt\n", + "Rv = 1000.*150;\n", + "Rx = Rt*Rv/(Rv-Rt);\n", + "print \"true value of resistance(ohm)\", Rx\n", + "Er_percentage = ((Rt-Rx)/Rx)*100;\n", + "print \"percentage error = \", Er_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "apparent value of resistance (ohm) = 50.0\n", + "true value of resistance(ohm) 50.0166722241\n", + "percentage error = -0.0333333333333\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the error and percentage error in the measurement of deflection\n", + "\n", + "# Variables\n", + "l = 0.2;\n", + "E = 200*10**9;\n", + "b = 20.*10**-3;\n", + "d = 5.*10**-3;\n", + "D = (4.*l**3)/(E*b*d**3);\n", + "F = 1*9.81;\n", + "\n", + "# Calculations and Results\n", + "x_true = D*F;\n", + "print \"True value of deflection\", x_true\n", + "x_indicated = D*10.31/(1+.1*D);\n", + "print \"Indicated value of deflection\", x_indicated\n", + "Er = x_indicated-x_true;\n", + "print \"error = \", Er\n", + "Er_percentage = Er*100/x_true;\n", + "print \"Percentage error = \", Er_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "True value of deflection 0.00062784\n", + "Indicated value of deflection 0.000659835777051\n", + "error = 3.1995777051e-05\n", + "Percentage error = 5.09616734375\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 Page No : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#to find the mean,deviations from the mean, Average deviation, standard deviation and variance\n", + "\n", + "x = [532. ,548, 543, 535, 546, 531, 543, 536];\n", + "X = sum(x);\n", + "n = 8; \n", + "a = 0.;\n", + "\n", + "# Calculations and Results\n", + "Mean = X/n;\n", + "print \"mean (kHZ)\", X/n\n", + "d = []\n", + "for i in range(n):\n", + " d.append(x[i]-Mean)\n", + " print \"deviations = \", d[i]\n", + " a = a+(abs(d[i]))\n", + " \n", + "d_average = a/n;\n", + "print \"Average deviation (kHz) = \", d_average\n", + "d_2 = sum(array(d)**2);\n", + "s = math.sqrt(d_2/(n-1))\n", + "print \"standard deviation(kHz)\", s\n", + "V = s**2;\n", + "print \"varaince (kHZ)2 = \", V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean (kHZ) 539.25\n", + "deviations = -7.25\n", + "deviations = 8.75\n", + "deviations = 3.75\n", + "deviations = -4.25\n", + "deviations = 6.75\n", + "deviations = -8.25\n", + "deviations = 3.75\n", + "deviations = -3.25\n", + "Average deviation (kHz) = 5.75\n", + "standard deviation(kHz) 6.54107898482\n", + "varaince (kHZ)2 = 42.7857142857\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 Page No : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import array\n", + "#to find the mean,standard deviation, probable error and range\n", + "\n", + "# Variables\n", + "x = [41.7, 42, 41.8, 42, 42.1, 41.9, 42, 41.9, 42.5, 41.8];\n", + "X = sum(x) \n", + "print X\n", + "d = [-.27, .03, -.17, .03, .13, -.07, .03, -.07, .53, -.17];\n", + "\n", + "# Calculations and Results\n", + "d_2 = sum(array(d)**2);\n", + "n = 10.;\n", + "print \"mean length(deg C)\", X/n\n", + "print \"standard deviation(if data is infinite)(deg C)\", math.sqrt(d_2/n)\n", + "print \"standard deviation(deg C)\", math.sqrt(d_2/(n-1))\n", + "r1 = .6745*math.sqrt(d_2/(n-1));\n", + "print \"probable error of 1 reading(deg C)\", r1\n", + "print \"probable error of mean(deg C)\", r1/math.sqrt(n-1)\n", + "print \"range(deg C)\", max(x)-min(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "419.7\n", + "mean length(deg C) 41.97\n", + "standard deviation(if data is infinite)(deg C) 0.21\n", + "standard deviation(deg C) 0.221359436212\n", + "probable error of 1 reading(deg C) 0.149306939725\n", + "probable error of mean(deg C) 0.0497689799083\n", + "range(deg C) 0.8\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 Page No : 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#to find the arithematic mean, maen deviation,standard deviation, prpobable error of 1 reading, standard deviation and probable error of mean, standard deviation of standard deviation\n", + "\n", + "# Variables\n", + "T = [397, 398, 399, 400, 401, 402, 403, 404, 405];\n", + "f = [1, 3, 12, 23, 37, 16, 4, 2, 2];\n", + "\n", + "# Calculations and Results\n", + "Tf = sum(abs(array(T).transpose()*f));\n", + "print \"mean temp(deg C)\", Tf/sum(f)\n", + "d = [-3.78, -2.78, -1.78, -.78, .22, 1.22, 2.22, 3.22, 4.22];\n", + "d = array(d)\n", + "print \"mean deviation(deg C)\", sum(array(f).transpose()*d)/sum(f)\n", + "print \"standard deviation(deg C)\", math.sqrt(sum(array(f).transpose()*d**2)/sum(f))\n", + "print \"probable error of 1 reading(deg C)\", .6745*math.sqrt(sum(array(f).transpose()*d**2)/sum(f))\n", + "print \"probable error of mean(deg C)\", (.6745*math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f))\n", + "print \"standard deviation of mean(deg C)\", (math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f))\n", + "print \"standard deviation of standard deviation(deg C)\", (math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f)*2)\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " mean temp(deg C) 400\n", + "mean deviation(deg C) -1.7763568394e-17\n", + "standard deviation(deg C) 1.38260623462\n", + "probable error of 1 reading(deg C) 0.932567905249\n", + "probable error of mean(deg C) 0.0932567905249\n", + "standard deviation of mean(deg C) 0.138260623462\n", + "standard deviation of standard deviation(deg C) 0.0977650244208\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#to find probable no of resistors\n", + "\n", + "# Variables\n", + "x = .15; #deviation \n", + "o = .1; #standard deviation\n", + "t = x/o;\n", + "A = .4432 #area under gaussian curve corresponding to t\n", + "\n", + "# Calculations\n", + "n = 2*A*1000;\n", + "\n", + "# Results\n", + "print \"no of resistors\", math.floor(n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of resistors 886.0\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.25 Page No : 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find no of 100 rsding exceed 30mm\n", + "\n", + "# Variables\n", + "x = 30-26.3; #mean value 26.3\n", + "r = 2.5;\n", + "o = r/.6745;\n", + "t = x/o;\n", + "A = .3413;#area under gaussian curve corresponding to t\n", + "\n", + "# Calculations\n", + "n = 2*A*100;\n", + "nn = 100-math.floor(n);\n", + "\n", + "# Results\n", + "print \"no of readings exceed\", nn/2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of readings exceed 16.0\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 Page No : 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find no of rods of desired length\n", + "\n", + "# Variables\n", + "n = 25000.; #no of rods\n", + "n1 = 12500.; #length>10mm\n", + "n2 = 2000.; #length>10.25\n", + "a = n1-n2; #10<length<10.25\n", + "p = a/n;\n", + "t = 1.41; #umath.sing p\n", + "\n", + "# Calculations\n", + "t1 = t*2;\n", + "p1 = .4975;\n", + "b = p1*n; #9.5<length<10\n", + "\n", + "# Results\n", + "print \"total no of rods\", a+math.floor(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total no of rods 22937.0\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.27 Page No : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find standard deviation and probability of error\n", + "\n", + "# Variables\n", + "p = .2;\n", + "x = .8;\n", + "t = .5025;\n", + "\n", + "# Calculations and Results\n", + "sd = x/t;\n", + "print \"stndard deviation\", sd\n", + "x = 1.2;\n", + "t = x/sd;\n", + "p = 2*.2743;\n", + "print \"probability of error\", p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stndard deviation 1.592039801\n", + "probability of error 0.5486\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.28 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find no of expected readings\n", + "\n", + "# Variables\n", + "x = 20;\n", + "h = 0.04;\n", + "\n", + "# Calculations\n", + "sd = 1/(math.sqrt(2)*h);\n", + "t = x/sd;\n", + "P = .3708;\n", + "\n", + "# Results\n", + "print \"no of expected readings\", math.ceil(2*P*x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of expected readings 15.0\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.29 Page No : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to calculate precision index of instrument\n", + "\n", + "# Variables\n", + "t = .675;\n", + "x = 2.4;\n", + "\n", + "# Calculations and Results\n", + "sd = x/t;\n", + "h = 1/(math.sqrt(2)*sd);\n", + "print \"precision index\", h\n", + "t = (50-44)/sd;\n", + "p = .45;\n", + "n = 8*30; #sept month no of measurements\n", + "a = ((.5-p)*n);\n", + "print \"no of false alarms\", a\n", + "\n", + "rn = a/2; #reduced no of false alarms\n", + "p1 = rn/n;\n", + "P = .5-p1;\n", + "t = 1.96;\n", + "sd = (50-44)/t;\n", + "h = 1/(math.sqrt(2)*sd);\n", + "print \"precision index\", h\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precision index 0.198873782209\n", + "no of false alarms 12.0\n", + "precision index 0.230988215188\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.30 Page No : 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#to find confidence interval for given confidence levels\n", + "\n", + "# Variables\n", + "cl = [.5, .9, .95, .99];\n", + "s = .22;\n", + "d = [.7, 1.83, 2.26, 3.25];\n", + "def ci(b):\n", + " return s*b;\n", + "\n", + "# Calculations\n", + "CI = [0,0,0,0]\n", + "CI[0] = ci(d[0]);\n", + "CI[1] = ci(d[1]);\n", + "CI[2] = ci(d[2]);\n", + "CI[3] = ci(d[3]);\n", + "\n", + "# Results\n", + "print \"confidence interval\", CI\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "confidence interval [0.154, 0.4026, 0.4972, 0.715]\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.31 Page No : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#to point out the reading that can be rejected by chavenets criterion\n", + "\n", + "# Variables\n", + "x = array([5.3, 5.73, 6.77, 5.26, 4.33, 5.45, 6.09, 5.64, 5.81, 5.75])*10**-3;\n", + "d = array([-.313, .117, 1.157, -.353, -1.283, -.163, .477, .027, .197, .137])*10**-3;\n", + "n = 10.;\n", + "\n", + "# Calculations\n", + "X = sum(x)/n;\n", + "s = math.sqrt(sum(d**2)/(n-1));\n", + "a = abs(d)/s\n", + "print a\n", + "\n", + "\n", + "for i in range(10):\n", + " if a[i]>1.96:\n", + " print \"rejected value\", x[i]\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 0.49953805 0.18672828 1.84653522 0.56337678 2.04762722 0.26014282\n", + " 0.76127684 0.04309114 0.31440574 0.21864765]\n", + "rejected value 0.00433\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.32 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#calculate standard deviation\n", + "\n", + "# Variables\n", + "x = array([.9 ,2.3, 3.3, 4.5, 5.7, 6.7]);\n", + "y = array([1.1, 1.6, 2.6, 3.2, 4 ,5]);\n", + "n = 6.;\n", + "\n", + "# Calculations\n", + "a = ((n*sum(x*y)-(sum(x)*sum(y)))/((sum(x**2)*n)-sum(x)**2));\n", + "b = ((sum(y)*sum(x**2)-(sum(x)*sum(x*y)))/((sum(x**2)*n)-sum(x)**2));\n", + "\n", + "sdy = math.sqrt((1/n)*sum((a*x+b-y)**2));\n", + "sdx = sdy/a;\n", + "\n", + "sa = math.sqrt(n/(n*sum(x**2)-sum(x)**2))*sdy;\n", + "sb = math.sqrt(sum(x**2)/(n*sum(x**2)-sum(x)**2))*sdy;\n", + "\n", + "# Results\n", + "print \"s_a\", sa\n", + "print \"s_b\", sb\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "s_a 0.0354898238647\n", + "s_b 0.155116651415\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.34 Page No : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#determine value of total current considering errors as limiting errors ans as smath.radians(numpy.arcmath.tan(rd deviations\n", + "\n", + "# Variables\n", + "I1 = 200.;\n", + "I2 = 100.;\n", + "dI1 = 2.;\n", + "dI2 = 5.;\n", + "\n", + "# Calculations and Results\n", + "I = I1+I2;\n", + "dI = ((I1/I)*(dI1/I1)+(I2/I)*(dI2/I2));\n", + "print \"error considered as limiting errors\"\n", + "print \"I\", I\n", + "print \"dI\", dI*I\n", + "sdI = math.sqrt(dI1**2+dI2**2);\n", + "print \"error considered as standard deviations\"\n", + "print \"I\", I\n", + "print \"sdI\", sdI\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "error considered as limiting errors\n", + "I 300.0\n", + "dI 7.0\n", + "error considered as standard deviations\n", + "I 300.0\n", + "sdI 5.38516480713\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.35 Page No : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#determine probable error in the computed value of resistnce\n", + "\n", + "# Variables\n", + "r_V = 12.;\n", + "I = 10.;\n", + "r_Rv = r_V/I;\n", + "V = 100.;\n", + "r1 = 2.;\n", + "\n", + "# Calculations\n", + "r_Ri = V*r1/I**2;\n", + "r_R = math.sqrt(r_Rv**2+r_Ri**2);\n", + "\n", + "# Results\n", + "print \"r_R\", r_R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "r_R 2.33238075794\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.37 Page No : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find Cq and its possible errors\n", + "\n", + "# Variables\n", + "d = 12.5;\n", + "A = (math.pi/4)*d**2*10**-6;\n", + "W = 392.;\n", + "t = 600.;\n", + "p = 1000.;\n", + "g = 9.81;\n", + "h = 3.66;\n", + "\n", + "# Calculations and Results\n", + "Cq = W/(t*p*A*math.sqrt(2*g*h));\n", + "print \"Cq\", Cq\n", + "dW = .23/W;\n", + "dt = 2/t;\n", + "dp = .1/100;\n", + "dA = 2*.002;\n", + "dg = .1/100;\n", + "dh = .003/h;\n", + "dd = .002;\n", + "dCq = Cq*(dW+dt+dp+dA+dg/2+dh/2);\n", + "print \"%age absolute error\", dCq*100/Cq\n", + "\n", + "sdCq = Cq*math.sqrt(dW**2+dt**2+dp**2+4*dd**2+.25*(dg**2+dh**2));\n", + "print \"%age standard deviation error\", sdCq*100/Cq\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cq 0.628253425224\n", + "%age absolute error 0.982990409278\n", + "%age standard deviation error 0.537339132325\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.38 Page No : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 110.2;\n", + "I = 5.3;\n", + "\n", + "# Calculations and Results\n", + "P = V*I\n", + "print \"power(W) dissipated\", P\n", + "w_v = .2;\n", + "w_i = 0.06;\n", + "dp = math.sqrt((w_v*I)**2+(w_i*V)**2);\n", + "print \"uncertainity in power(%)\", dp*100/P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power(W) dissipated 584.06\n", + "uncertainity in power(%) 1.14653078526\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.39 Page No : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to find uncertainity in combined resistance in both series and in parrallel\n", + "\n", + "# Variables\n", + "R1 = 100.;\n", + "R2 = 50.;\n", + "wR1 = .1;\n", + "wR2 = 0.03;\n", + "\n", + "# Calculations and Results\n", + "print \"series conn\"\n", + "R = R1+R2\n", + "print \"resistance(ohm)\", R\n", + "dR1 = 1;\n", + "dR2 = 1;\n", + "wR = math.sqrt((dR1*wR1)**2+(dR2*wR2)**2)\n", + "print \"uncertainity in resistance(ohm)\", wR\n", + "\n", + "print \"parrallel conn\"\n", + "R = R1*R2*(R1+R2)**-1\n", + "print \"resistance(ohm)\", R\n", + "dR1 = (R2/(R1+R2))-((R1*R2)/(R1+R2)**2);\n", + "dR2 = (R1/(R1+R2))-((R1*R2)/(R1+R2)**2);\n", + "wR = math.sqrt((dR1*wR1)**2+(dR2*wR2)**2)\n", + "print \"uncertainity in resistance(ohm)\", wR\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "series conn\n", + "resistance(ohm) 150.0\n", + "uncertainity in resistance(ohm) 0.104403065089\n", + "parrallel conn\n", + "resistance(ohm) 33.3333333333\n", + "uncertainity in resistance(ohm) 0.0173561103909\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.40 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to calculate uncertainity in measurement\n", + "\n", + "# Variables\n", + "l = 150;\n", + "dl = 0.01;\n", + "b = 50;\n", + "\n", + "# Calculations and Results\n", + "wA = l*dl;\n", + "print \"when no uncertainity in measurement of length\"\n", + "print \"uncertainity in measurement of area(m*m)\", wA\n", + "\n", + "print \"when no certainity in measurement of length\"\n", + "wA = 1.5*1.5;\n", + "wB = 0.01;\n", + "wL = math.sqrt((wA**2-(l*wB)**2)/b**2);\n", + "print \"uncertainity in measurement of length(m)\", wL\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when no uncertainity in measurement of length\n", + "uncertainity in measurement of area(m*m) 1.5\n", + "when no certainity in measurement of length\n", + "uncertainity in measurement of length(m) 0.0335410196625\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.41 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#to calculate uncertainity in power\n", + "\n", + "# Variables\n", + "E = 100.;\n", + "dE = .01;\n", + "I = 10.;\n", + "dI = 0.01;\n", + "R = 10.;\n", + "dR = .01;\n", + "\n", + "# Calculations and Results\n", + "dP = math.sqrt(4*dE**2+dR**2)*100; #P = E**2/R\n", + "print \"%age uncertainity in power measurement\", dP\n", + "\n", + "dP = math.sqrt(dE**2+dI**2)*100; #P = E*I\n", + "print \"%age uncertainity in power measurement\", dP\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "%age uncertainity in power measurement 2.2360679775\n", + "%age uncertainity in power measurement 1.41421356237\n" + ] + } + ], + "prompt_number": 53 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch4.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch4.ipynb new file mode 100755 index 00000000..fd3f3073 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch4.ipynb @@ -0,0 +1,940 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4dacb9cd40c034de14bd116989b8eaf4736b7fcde46866cbd61e09de312f6cad" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Dynamic Characteristics of Instruments and Measurement systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# calculating the temperature after 1.5 s\n", + "\n", + "# Variables\n", + "th0 = 100.;\n", + "t = 1.5;\n", + "tc = 3.5;\n", + "\n", + "# Calculations\n", + "th = th0*(1-math.exp(-t/tc));\n", + "\n", + "# Results\n", + "print \"temperature after 1.5 s (degree C)\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature after 1.5 s (degree C) 34.8560942469\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# calculate time to read half of the temperature difference\n", + "# Variables\n", + "tc = 10./5;\n", + "th = 1.;\n", + "th0 = 2.;\n", + "\n", + "# Calculations\n", + "t = -tc*math.log(1-(th/th0));\n", + "\n", + "# Results\n", + "print \"Time to read half of the temperature difference (s)\", t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time to read half of the temperature difference (s) 1.38629436112\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the temperature after 10s\n", + "\n", + "# Variables\n", + "th0 = 25;\n", + "thi = 150;\n", + "t = 10.;\n", + "tc = 6;\n", + "\n", + "# Calculations\n", + "th = th0+(thi-th0)*(math.exp(-t/tc));\n", + "\n", + "# Results\n", + "print \"the temperature after 10s (degree C)\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the temperature after 10s (degree C) 48.6094503547\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the value of resistance after 15s\n", + "\n", + "# Variables\n", + "R0 = 29.44;\n", + "Rs = 100.;\n", + "t = 15.;\n", + "tc = 5.5;\n", + "\n", + "# Calculations\n", + "R_15 = Rs+R0*(1-math.exp(-t/tc));\n", + "\n", + "# Results\n", + "print \"value of resistance after 15s(ohm)\", R_15\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of resistance after 15s(ohm) 127.514700449\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the depth after one hour\n", + "\n", + "# Variables\n", + "Qm = 0.16*10**-3;\n", + "Hin = 1.2;\n", + "K1 = Qm/(Hin)**0.5;\n", + "Qo = 0.2*10**-3;\n", + "Ho = (Qo/K1)**2;\n", + "R = Hin/Qm;\n", + "C = 0.1;\n", + "tc = R*C;\n", + "t = 3600;\n", + "\n", + "# Calculations\n", + "H = Ho+(Hin-Ho)*math.exp(-t/tc);\n", + "\n", + "# Results\n", + "print \"the depth after one hour(m)\", H\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the depth after one hour(m) 1.86944492074\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Calculate time constant\n", + "\n", + "# Variables\n", + "S = 3.5;\n", + "Ac = (math.pi/4)*(0.25)**2;\n", + "alpha = 0.18*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Vb = S*Ac/alpha;\n", + "print \"volume of bulb(mm2)\", Vb\n", + "\n", + "Rb = ((Vb/math.pi)*(3/.4))**(1./3);\n", + "Ab = 4*math.pi*Rb**2;\n", + "D = 13.56*10**3;\n", + "s = 139;\n", + "H = 12;\n", + "tc = (D*s*Vb*10**-9)/(H*Ab*10**-6);\n", + "print \"time constant (s)\", tc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "volume of bulb(mm2) 954.476934684\n", + "time constant (s) 68.8965695836\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "ess = 5;\n", + "A = 0.1;\n", + "\n", + "# Calculations\n", + "tc = ess/A;\n", + "\n", + "# Results\n", + "print \"time constant(s)\", tc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time constant(s) 50.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the temperature at a depth of 1000 m\n", + "\n", + "# Variables\n", + "th0 = 20.;\n", + "t = 2000.;\n", + "\n", + "# Calculations\n", + "thr = th0-0.005*(t-50)-0.25*math.exp(-t/50);\n", + "\n", + "# Results\n", + "print \"temperature at a depth of 1000 m (degree C)\", thr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature at a depth of 1000 m (degree C) 10.25\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the value of resistance at different values of time\n", + "\n", + "# Variables\n", + "Gain = 0.3925;\n", + "T = 75.;\n", + "p_duration = Gain*T;\n", + "tc = 5.5;\n", + "Rin = 100.;\n", + "t = 1;\n", + "\n", + "# Calculations and Results\n", + "Rt = p_duration*(1-math.exp(-t/tc))+Rin;\n", + "print \"Value of resistance after 1s(ohm) = \", Rt\n", + "t = 2;\n", + "Rt = p_duration*(1-math.exp(-t/tc))+Rin;\n", + "print \"Value of resistance after 2s(ohm) = \", Rt\n", + "t = 3;\n", + "Rt = p_duration*(1-math.exp(-t/tc))+Rin;\n", + "print \"Value of resistance after 3s(ohm) = \", Rt\n", + "R_inc = Rt-Rin;\n", + "t = 5;\n", + "Rt = (R_inc)*(math.exp(-(t-3)/(5.5)))+Rin;\n", + "print \"Value of resistance after 5s(ohm) = \", Rt\n", + "t = 10;\n", + "Rt = (R_inc)*(math.exp(-(t-3)/(5.5)))+Rin;\n", + "print \"Value of resistance after 10s(ohm) = \", Rt\n", + "t = 20;\n", + "Rt = (R_inc)*(math.exp(-(t-3)/(5.5)))+Rin;\n", + "print \"Value of resistance after 20s(ohm) = \", Rt\n", + "t = 30;\n", + "Rt = (R_inc)*(math.exp(-(t-3)/(5.5)))+Rin;\n", + "print \"Value of resistance after 30s(ohm) = \", Rt" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance after 1s(ohm) = 104.893898474\n", + "Value of resistance after 2s(ohm) = 108.974200608\n", + "Value of resistance after 3s(ohm) = 112.376164418\n", + "Value of resistance after 5s(ohm) = 108.603215552\n", + "Value of resistance after 10s(ohm) = 103.46615228\n", + "Value of resistance after 20s(ohm) = 100.562627957\n", + "Value of resistance after 30s(ohm) = 100.091326114\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "M = 8*10**-3;\n", + "K = 1000.;\n", + "\n", + "# Calculations and Results\n", + "wn = (K/M)**0.5;\n", + "print \"for critically damped system eta = 1\",\n", + "B = 2*(K*M);\n", + "print \"Damping constant for critically damped system (N/ms-1) = \", B\n", + "eta = 0.6;\n", + "wd = wn*(1-eta**2)**0.5;\n", + "print \"frequency of damped oscillations (rad/s) = \", wd\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for critically damped system eta = 1 Damping constant for critically damped system (N/ms-1) = 16.0\n", + "frequency of damped oscillations (rad/s) = 282.842712475\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "K = (40.*10**-6)/(math.pi/2);\n", + "J = 0.5*10**-6;\n", + "B = 5.*10**-6;\n", + "\n", + "# Calculations and Results\n", + "eta = B/(2*(K*J)**0.5);\n", + "print \"damping ratio = \", eta\n", + "wn = (K/J)**0.5;\n", + "print \"natural frequency (rad/sec)\", wn\n", + "wd = wn*(1-(eta)**2)**0.5;\n", + "print \"frequency of damped oscillations (rad/s)\", wd\n", + "tc = 1/wn;\n", + "print \"time constant (s)\", tc\n", + "ess = 2*eta/wn;\n", + "print \" steady state error (V) = \", \"for a ramp input of 5V\"\n", + "ess = 5*2*eta/wn;\n", + "print \"\", ess\n", + "T_lag = 2*eta*tc;\n", + "print \"Time lag (s)\", T_lag\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "damping ratio = 0.70062390205\n", + "natural frequency (rad/sec) 7.13649646461\n", + "frequency of damped oscillations (rad/s) 5.09210975819\n", + "time constant (s) 0.14012478041\n", + " steady state error (V) = for a ramp input of 5V\n", + " 0.981747704247\n", + "Time lag (s) 0.196349540849\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the natural frequency \n", + "\n", + "# Variables\n", + "wn = 2*math.pi*30;\n", + "print \" for a frequency of 30 Hz wn = (K/M+5*10**-3)**0.5.........(i)\",\n", + "print \"But wn = (K/M)**0.5.........(ii)\",\n", + "print \"for a frequency of 25 Hz wn = (K/M+5*10**-3+5*10**-3)**0.5.........(iii) \",\n", + "print \" (ii) and (iii)\", \"on solving (i)\"\n", + "\n", + "# Calculations and Results\n", + "M = 6.36*10**-3;\n", + "K = 403.6;\n", + "print \"M = \", M\n", + "print \"K = \", K\n", + "wn = (K/M)**0.5;\n", + "f = wn/(2*math.pi);\n", + "print \"natural frequency (Hz)\", f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " for a frequency of 30 Hz wn = (K/M+5*10**-3)**0.5.........(i) But wn = (K/M)**0.5.........(ii) for a frequency of 25 Hz wn = (K/M+5*10**-3+5*10**-3)**0.5.........(iii) (ii) and (iii) on solving (i)\n", + "M = 0.00636\n", + "K = 403.6\n", + "natural frequency (Hz) 40.0928706266\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "K = 60.*10**3;\n", + "M = 30.;\n", + "\n", + "# Calculations and Results\n", + "wn = (K/M)**0.5;\n", + "print \"natural frequency (rad/sec)\", wn\n", + "eta = 0.7;\n", + "ts = 4/(eta*wn);\n", + "print \"setteling time (s)\", ts\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "natural frequency (rad/sec) 44.72135955\n", + "setteling time (s) 0.127775313\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate time lag and ratio of output and input\n", + "\n", + "# Variables\n", + "print \"when time period is 600s\"\n", + "w = 2*math.pi/600;\n", + "tc = 60.;\n", + "\n", + "# Calculations and Results\n", + "T_lag = (1/w)*math.atan(w*tc);\n", + "print \"time lag (s) = \", T_lag\n", + "M = 1/((1+(w*tc)**2)**0.5);\n", + "print \"ratio of output and input = \", M\n", + "print \"when time period is 120s\",\n", + "w = 2*math.pi/120;\n", + "tc = 60;\n", + "T_lag = (1/w)*math.atan(w*tc);\n", + "print \"time lag (s) = \", T_lag\n", + "M = 1/((1+(w*tc)**2)**0.5);\n", + "print \"ratio of output and input = \", M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when time period is 600s\n", + "time lag (s) = 53.5698460589\n", + "ratio of output and input = 0.846733015965\n", + "when time period is 120s time lag (s) = 24.1144042829\n", + "ratio of output and input = 0.303314471053\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 Page No : 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the maximum allowable time constant and phase shift\n", + "\n", + "# Variables\n", + "M = 1-0.05;\n", + "w = 2*math.pi*100;\n", + "\n", + "# Calculations and Results\n", + "tc = (((1/M**2)-1)/(w**2))**0.5;\n", + "print \"maximum allowable time constant (s)\", tc\n", + "print \"phase shift at 50 Hz (degree) = \",\n", + "ph = (-math.atan(2*math.pi*50*tc))*(180/math.pi);\n", + "print ph\n", + "print \"phase shift at 100 Hz (degree) = \",\n", + "ph = (-math.atan(2*math.pi*100*tc))*(180/math.pi);\n", + "print ph\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum allowable time constant (s) 0.00052311700055\n", + "phase shift at 50 Hz (degree) = -9.33268272936\n", + "phase shift at 100 Hz (degree) = -18.1948723388\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate maximum value of indicated temperature and delay time\n", + "\n", + "# Variables\n", + "T = 120.;\n", + "w = 2*math.pi/T;\n", + "tc1 = 40.;\n", + "tc2 = 20.;\n", + "\n", + "# Calculations and Results\n", + "M = (1/((1+(w*tc1)**2)**0.5))*(1/((1+(w*tc2)**2)**0.5));\n", + "M_temp = M*10;\n", + "print \"maximum value of indicated temperature (degree C)\", M_temp\n", + "ph = ((math.atan(w*tc1)+math.atan(w*tc2)));\n", + "T_lag = ph/w;\n", + "print \"Time lag (s)\", T_lag\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum value of indicated temperature (degree C) 2.975684577\n", + "Time lag (s) 36.9326231389\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Find the output \n", + "print \"when tc = 0.2\",\n", + "print \"output = 1/(1+(2*0.2)**2)**0.5]math.sin[2t-math.atan(2*0.2)]+3/(1+(2*0.2)**2)**0.5]math.sin[20t-math.atan(20*0.2)]\",\n", + "print \"on solving output = 0.93 math.sin(2t-21.8)+0.073 math.sin(20t-76)\",\n", + "print \"when tc = 0.002\",\n", + "print \"output = 1/(1+(2*0.002)**2)**0.5]math.sin[2t-math.atan(2*0.002)]+3/(1+(2*0.002)**2)**0.5]math.sin[20t-math.atan(20*0.002)]\",\n", + "print \"on solving output = 1math.sin(2t-0.23)+0.3 math.sin(20t-2.3)\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when tc = 0.2 output = 1/(1+(2*0.2)**2)**0.5]math.sin[2t-math.atan(2*0.2)]+3/(1+(2*0.2)**2)**0.5]math.sin[20t-math.atan(20*0.2)] on solving output = 0.93 math.sin(2t-21.8)+0.073 math.sin(20t-76) when tc = 0.002 output = 1/(1+(2*0.002)**2)**0.5]math.sin[2t-math.atan(2*0.002)]+3/(1+(2*0.002)**2)**0.5]math.sin[20t-math.atan(20*0.002)] on solving output = 1math.sin(2t-0.23)+0.3 math.sin(20t-2.3)\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Calculate maximum and minimum value of indicated temperature, phase shift, time lag \n", + "\n", + "# Variables\n", + "T_max = 640.;\n", + "T_min = 600.;\n", + "T_mean = (T_max+T_min)/2;\n", + "Ai = T_mean-T_min;\n", + "w = 2*math.pi/80;\n", + "tc = 10;\n", + "\n", + "# Calculations and Results\n", + "Ao = Ai/((1+(w*tc)**2))**0.5;\n", + "T_max_indicated = T_mean+Ao;\n", + "print \"Maximum value of indicated temperature(degree C) = \", T_max_indicated\n", + "T_min_indicated = T_mean-Ao;\n", + "print \"Minimum value of indicated temperature(degree C) = \", T_min_indicated\n", + "ph = -math.atan(w*tc);\n", + "Time_lag = -ph/w;\n", + "print \"Time lag (s)\", Time_lag\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of indicated temperature(degree C) = 635.728782002\n", + "Minimum value of indicated temperature(degree C) = 604.271217998\n", + "Time lag (s) 8.47689466383\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 Page No : 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# determine damping ratio\n", + "\n", + "\n", + "# Variables\n", + "w = 2.;\n", + "K = 1.5;\n", + "J = 200.*10**-3;\n", + "wn = (K/J)**0.5;\n", + "u = w/wn;\n", + "M = 1.1;\n", + "\n", + "# Calculations and Results\n", + "eta = (((1/(M**2))-((1-u**2)**2))/(2*u)**2)**0.5;\n", + "print \"damping ratio = \", eta\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "damping ratio = 0.534147321328\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 Page No : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Calculate the frequency range\n", + "\n", + "# Variables\n", + "eta = 0.6;\n", + "fn = 1000;\n", + "M = 1.1;\n", + "print \"M = 1/[[(1-u**2)**2]+(2*u*eta)**2]**0.5 ..........(i)\",\n", + "print \"on solving u**4-0.5u**2+0.173 = 0\",\n", + "print \"the above equation gives imaginary values for frequency so for eta = 0.6 the output is not 1.1\",\n", + "print \" on solving equation (i) we have\", \"Now let M = 0.9\"\n", + "print \"u**4-0.56u**2-0.234 = 0\",\n", + "print \"on solving u = 0.916\",\n", + "\n", + "# Calculations and Results\n", + "u = 0.916;\n", + "f = u*fn;\n", + "print \"maximum value of range (Hz) = \", f\n", + "print \" the range of the frequency is from 0 to 916 Hz\", \"So\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "M = 1/[[(1-u**2)**2]+(2*u*eta)**2]**0.5 ..........(i) on solving u**4-0.5u**2+0.173 = 0 the above equation gives imaginary values for frequency so for eta = 0.6 the output is not 1.1 on solving equation (i) we have Now let M = 0.9\n", + "u**4-0.56u**2-0.234 = 0 on solving u = 0.916 maximum value of range (Hz) = 916.0\n", + " the range of the frequency is from 0 to 916 Hz So\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 Page No : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# determine the error\n", + "\n", + "# Variables\n", + "w = 6.;\n", + "wn = 4.;\n", + "u = w/wn;\n", + "eta = 0.66;\n", + "\n", + "# Calculations\n", + "M = 1/(((1-u**2)**2)+(2*eta*u)**2)**0.5;\n", + "Error = (M-1)*100;\n", + "\n", + "# Results\n", + "print \"error (%) = \", Error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "error (%) = -57.2934157194\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch5.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch5.ipynb new file mode 100755 index 00000000..6eb31891 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch5.ipynb @@ -0,0 +1,2140 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:dcab5285f135b4dffae4292e0eb7017128ede4af1f4e78fe0491e5a728481399" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Primary Sensing Elements and Transducers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "D = 15.*10**-3;\n", + "P = 300.*10**3;\n", + "sm = 300.*10**6;\n", + "\n", + "# Calculations and Results\n", + "t = (3*D**2*P/(16*sm))**0.5;\n", + "print \" thickness(m) = \", t\n", + "P = 150*10**3;\n", + "v = 0.28;\n", + "E = 200*10**9;\n", + "dm = 3*(1-v**2)*D**4*P/(256*E*t**3);\n", + "print \" deflection at center for Pressure of 150 kN/m2(m) = \", dm\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " thickness(m) = 0.000205395959064\n", + " deflection at center for Pressure of 150 kN/m2(m) = 4.73232289684e-05\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "T = 100.;\n", + "G = 80.*10**9;\n", + "d = 2.*15*10**-3;\n", + "\n", + "# Calculations\n", + "th = 16*T/(math.pi*G*d**3)\n", + "\n", + "# Results\n", + "print \" angle of twist(rad) = \", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " angle of twist(rad) = 0.000235785100877\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "E = 110*10**9;\n", + "t = 0.073*10**-3;\n", + "b = 0.51*10**-3;\n", + "l = 370*10**-3;\n", + "\n", + "# Calculations\n", + "th = math.pi/2;\n", + "T = (E*b*t**3)*th/(12*l);\n", + "\n", + "# Results\n", + "print \" Controlling torque(Nm) = \", T\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Controlling torque(Nm) = 7.72090748389e-06\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Rnormal = 10000./2;\n", + "Rpl = 10000./50;\n", + "Rc1 = Rnormal-3850;\n", + "\n", + "# Calculations and Results\n", + "Dnormal = Rc1/Rpl;\n", + "print \"Displacement(mm) = \", Dnormal\n", + "Rc2 = Rnormal-7560;\n", + "Dnormal = Rc2/Rpl;\n", + "print \"Displacement(mm) = \", Dnormal\n", + "print \"since one lacement is positive and other is negative so two lacements are in the opposite direction\"\n", + "Re = 10*1./200;\n", + "print \"Resolution (mm) = \", Re\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Displacement(mm) = 5.75\n", + "Displacement(mm) = -12.8\n", + "since one lacement is positive and other is negative so two lacements are in the opposite direction\n", + "Resolution (mm) = 0.05\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pyplot import plot\n", + "\n", + "# Variables\n", + "# plot the graph of error versus K\n", + "K = [0, 0.25, 0.5, 0.75, 1];\n", + "V = [0, -0.174, -0.454, -0.524, 0];\n", + "\n", + "# Results\n", + "plot(K,V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 8, + "text": [ + "[<matplotlib.lines.Line2D at 0x103fd9ad0>]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG6pJREFUeJzt3XmUFOXVx/HvCCLyGiGIsoooi4ArLqBRoAWMuAQTPagk\nUYyamKCRY2KiaIxjfBVZh0WBERSXGCXGRAXcQGg0iuhERBB5FZQTQAYRxBHEBHTeP2630zQ9M91d\n3bX+Puf0mW6mpupSDLdvP89T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Br7sVnMuy\nORenUjM0NpBwnotszkNyuwXY4oAL3QrOZdmci2bYPFm7xOsWbgXnsmzORSkwMvG8BbAFZ/OWftYb\nS+a1Jf6c8qbbvXp6Yv+Ya4FdwOPA+WnbpF4YtgT7Rc90jUDQZXMuFlNzwdsSav6zh0k25wHg11jr\nj82uRea+bM7Fj4EngfWJ15+6FZzLsjkXG4EDE88PxBL/bpfic9srwGd1fD+nvOl24m+LrfJJWp/4\ns/q2CWPCy+ZcpLqSmnf0MMn2d+J8YGridbULcXkhm3PRGVtYsRCoAC51JzTXZXMupgNHAR9jwxvD\n3QnNl3LKm25/LMr2P2xJnj8XJLn8nc4ArgBOK1IsXsrmPEzALvyrxn430n8/wiKbc7EvdjFkf+wq\n+MXYx/oPihiXF7I5FzdjQ0AxoCN2welxwBfFC8vXss6bbif+DcChKa8PpeYja23btEv8Wdhkcy7A\nJnSnY2P8dX3UC6pszsOJ2Ed9sLHcs7GP/88UPTp3ZXMu1mHDOzsTj5exZBe2xJ/NufgecGfi+Rrs\nYtEjsU9CUePrvNkQ+wfqADSi/sndUwjnhCZkdy7aY+OcYW5lnc15SDWT8K7qyeZcdMWun2mAVfzL\nge7uheiabM7FeOC2xPOW2BtDc5fi80IHspvc9WXePBv4PyyhjUj82dWJR9I9ie8vwz7WhlV952IG\nNmG1NPF4w+0AXZLN70RSmBM/ZHcubsBW9iwHrnM1OnfVdy5aALOxPLEcm/gOq8ewuYz/Yp/6riC6\neVNERERERERERERERERERERERERERERERERExL/+H8kNkIiUDlrEAAAAAElFTkSuQmCC\n", + "text": [ + "<matplotlib.figure.Figure at 0x1038299d0>" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "RAB = 125.;\n", + "Rtotal = 5000.;\n", + "R2 = 75/125.*Rtotal;\n", + "R4 = 2500.;\n", + "ei = 5.;\n", + "\n", + "# Calculations\n", + "eo = ((R2/Rtotal)-(R4/Rtotal))*ei;\n", + "\n", + "# Results\n", + "print \"output voltage (V) = \", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage (V) = 0.5\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Rm = 10000.;\n", + "Rp = Rm/15.;\n", + "R = 600.;\n", + "P = 5.;\n", + "\n", + "# Calculations and Results\n", + "ei = (P*R)**0.5;\n", + "print \"Maximum excitation voltage (V) = \", ei\n", + "S = ei/360;\n", + "print \"Sensitivity (V/degree) = \", S\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum excitation voltage (V) = 54.7722557505\n", + "Sensitivity (V/degree) = 0.152145154863\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Rwga = 1./400;\n", + "\n", + "# Calculations\n", + "Re = Rwga/5;\n", + "\n", + "# Results\n", + "print \"Resolution (mm) = \", Re\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution (mm) = 0.0005\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "mo = 0.8;\n", + "sr = 250;\n", + "sm = sr/mo;\n", + "\n", + "# Calculations and Results\n", + "R = sm*1;\n", + "print \"resolution of 1mm movement\", R\n", + "Rq = 300/1000;\n", + "print \"resolution required = \", Rq\n", + "print \"since the resolution of potentiometer is higher than the resolution required so it is suitable for the application\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resolution of 1mm movement 312.5\n", + "resolution required = 0\n", + "since the resolution of potentiometer is higher than the resolution required so it is suitable for the application\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations and Results\n", + "Pd = (10.**2)/150;\n", + "print \"Power dissipation (W) = \", Pd\n", + "th_pot = 80.+Pd*30*10**-3;\n", + "PDa = 1-(10*10**-3)*(th_pot-35);\n", + "print \"Power dissipation allowed(W) = \", PDa\n", + "print \"Since power dissipation is higher than the dissipation allowed so potentiometer is not suitable\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power dissipation (W) = 0.666666666667\n", + "Power dissipation allowed(W) = 0.5498\n", + "Since power dissipation is higher than the dissipation allowed so potentiometer is not suitable\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Gf = 4.2;\n", + "\n", + "# Calculations\n", + "v = (Gf-1)/2;\n", + "\n", + "# Results\n", + "print \"Possion s ratio = \", v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Possion s ratio = 1.6\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "strain = -5.*10**-6;\n", + "Gf = -12.1;\n", + "R = 120.;\n", + "\n", + "# Calculations and Results\n", + "dR_nickel = Gf*R*strain;\n", + "print \"change in resistance of nickel(ohm) = \", dR_nickel\n", + "Gf = 2;\n", + "R = 120;\n", + "dR_nicrome = Gf*R*strain;\n", + "print \"change in resistance of nicrome(ohm) = \", dR_nicrome\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in resistance of nickel(ohm) = 0.00726\n", + "change in resistance of nicrome(ohm) = -0.0012\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "s = 100.*10**6;\n", + "E = 200.*10**9;\n", + "\n", + "# Calculations\n", + "strain = s/E;\n", + "Gf = 2;\n", + "r_perunit = Gf*strain*100;\n", + "\n", + "# Results\n", + "print \"Percentage change in resistance = \", r_perunit\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage change in resistance = 0.1\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "b = 0.02;\n", + "d = 0.003;\n", + "I = (b*d**3)/12;\n", + "E = 200*10**9;\n", + "x = 12.7*10**-3;\n", + "l = 0.25;\n", + "F = 3*E*I*x/l**3;\n", + "x = 0.15;\n", + "M = F*x;\n", + "t = 0.003;\n", + "\n", + "# Calculations\n", + "s = (M*t)/(I*2);\n", + "strain = s/E;\n", + "dR = 0.152;\n", + "R = 120;\n", + "Gf = (dR/R)/strain;\n", + "\n", + "# Results\n", + "print \"Gauge factor = \", Gf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gauge factor = 2.30873918538\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "dR = 0.013;\n", + "R = 240;\n", + "l = 0.1;\n", + "Gf = 2.2;\n", + "\n", + "# Calculations and Results\n", + "dl = (dR/R)*l/Gf;\n", + "print \"change in length(m) = \", dl\n", + "strain = dl/l;\n", + "E = 207*10**9;\n", + "s = E*strain;\n", + "A = 4*10**-4;\n", + "F = s*A;\n", + "print \"Force(N)\", F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in length(m) = 2.46212121212e-06\n", + "Force(N) 2038.63636364\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "th1 = 30.;\n", + "th2 = 60.;\n", + "th0 = th1+th2/2;\n", + "Rth1 = 4.8;\n", + "Rth2 = 6.2;\n", + "Rth0 = 5.5;\n", + "\n", + "# Calculations\n", + "ath0 = (1/Rth0)*(Rth2-Rth1)/(th2-th1);\n", + "\n", + "# Results\n", + "print \"alpha at o degree(/degree C) = \", ath0\n", + "print \"5.5[1+0.0085(th-45)]\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha at o degree(/degree C) = 0.00848484848485\n", + "5.5[1+0.0085(th-45)]\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "th1 = 100.;\n", + "th2 = 130.;\n", + "\n", + "# Calculations\n", + "th0 = th1+th2/2;\n", + "Rth1 = 573.40;\n", + "Rth2 = 605.52;\n", + "Rth0 = 589.48;\n", + "ath0 = (1/Rth0)*(Rth2-Rth1)/(th2-th1);\n", + "\n", + "# Results\n", + "print \"alpha at o degree(/degree C) = \", ath0\n", + "print \"Linear approximation is: Rth = 589.48[1+0.00182(th-115)]\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha at o degree(/degree C) = 0.00181629006356\n", + "Linear approximation is: Rth = 589.48[1+0.00182(th-115)]\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rth0 = 100.;\n", + "ath0 = 0.00392;\n", + "dth = 65.-25;\n", + "\n", + "# Calculations and Results\n", + "R65 = Rth0*(1+ath0*dth);\n", + "print \"resistance at 65 degree C(ohm) = \", R65\n", + "\n", + "th = (((150./100)-1)/ath0)+25;\n", + "print \"Temperature (degree C)\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance at 65 degree C(ohm) = 115.68\n", + "Temperature (degree C) 152.551020408\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rth0 = 10;\n", + "ath0 = 0.00393;\n", + "dth = 150-20;\n", + "\n", + "# Calculations\n", + "R150 = Rth0*(1+ath0*dth);\n", + "\n", + "# Results\n", + "print \"resistance at 150 degree C(ohm) = \", R150\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance at 150 degree C(ohm) = 15.109\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Page No : 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "th = 30.;\n", + "th0 = 50.;\n", + "tc = 120.;\n", + "\n", + "# Calculations\n", + "t = -120*(math.log(1-(th/th0)));\n", + "\n", + "# Results\n", + "print \"time(s) = \", t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time(s) = 109.954887825\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R25 = 100;\n", + "ath = -0.05;\n", + "dth = 35-25;\n", + "\n", + "# Calculations\n", + "R35 = R25*(1+ath*dth);\n", + "\n", + "# Results\n", + "print \"resistance at 35 degree C(ohm) = \", R35\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance at 35 degree C(ohm) = 50.0\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 Page No : 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Ro = 3980.;\n", + "Ta = 273.;\n", + "\n", + "# Calculations and Results\n", + "print \"3980 = a*3980*math.exp(b/273)\",\n", + "Rt50 = 794;\n", + "Ta50 = 273+50;\n", + "print \"794 = a*3980*math.exp(b/323)\",\n", + "print \"on solving\",\n", + "print \" b = 2843\", \"a = 30*10**-6\"\n", + "Ta40 = 273+40;\n", + "Rt40 = (30*10**-6)*3980*math.exp(2843./313);\n", + "print \"resistance at 40 degree C (ohm)\", Rt40\n", + "Rt100 = (30*10**-6)*3980*math.exp(2843./373);\n", + "print \"resistance at 100 degree C (ohm)\", Rt100\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3980 = a*3980*math.exp(b/273) 794 = a*3980*math.exp(b/323) on solving b = 2843 a = 30*10**-6\n", + "resistance at 40 degree C (ohm) 1051.3086649\n", + "resistance at 100 degree C (ohm) 243.887690913\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 Page No : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "th = ((1-1800./2000)/0.05)+70;\n", + "dth = th-70;\n", + "\n", + "# Results\n", + "print \"change in temperature (degree C)\", dth\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in temperature (degree C) 2.0\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 Page No : 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "C = 500.*10**-12;\n", + "R20 = 10000.*(1-0.05*(20-25));\n", + "\n", + "# Calculations and Results\n", + "f20 = 1/(2*math.pi*R20*C);\n", + "print \"Frequency of oscillation at 20 degree C (Hz)\", f20\n", + "R25 = 10000*(1-0.05*(25-25));\n", + "f25 = 1./(2*math.pi*R25*C);\n", + "print \"Frequency of oscillation at 25 degree C (Hz)\", f25\n", + "R30 = 10000*(1-0.05*(30-25));\n", + "f30 = 1./(2*math.pi*R30*C);\n", + "print \"Frequency of oscillation at 30 degree C (Hz)\", f30\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillation at 20 degree C (Hz) 25464.7908947\n", + "Frequency of oscillation at 25 degree C (Hz) 31830.9886184\n", + "Frequency of oscillation at 30 degree C (Hz) 42441.3181578\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 Page No : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations and Results\n", + "Se_thermocouple = 500-(-72);\n", + "print \"Sensitivity of thermocouple (micro V/degree C) = \", Se_thermocouple\n", + "Vo = Se_thermocouple*100*10**-6;\n", + "print \"maximum output voltage(V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sensitivity of thermocouple (micro V/degree C) = 572\n", + "maximum output voltage(V) = 0.0572\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 Page No : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculations and results\n", + "ET = 27.07+0.8;\n", + "print 'Required e.m.f.(mV)',ET\n", + "print \"temperature corresponding to 27.87 mV is 620 degree C\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required e.m.f.(mV) 27.87\n", + "temperature corresponding to 27.87 mV is 620 degree C\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rm = 50;\n", + "Re = 12;\n", + "\n", + "# Calculations and Results\n", + "E = 33.3*10**-3;\n", + "i = 0.1*10**-3;\n", + "Rs = (E/i)-Rm-Re;\n", + "print \"series resistance (ohm) = \", Rs\n", + "Re = 13;\n", + "i1 = E/(Rs+Re+Rm);\n", + "AE = ((i1-i)/i)*800;\n", + "print \"approximate error due to rise in resistance of 1 ohm in Re (degree C) = \", AE\n", + "R_change = 50*0.00426*10;\n", + "i1 = E/(Rs+Re+Rm+R_change);\n", + "AE = ((i1-i)/i)*800;\n", + "print \"approximate error due to rise in Temp. of 10 (degree C) = \", AE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "series resistance (ohm) = 271.0\n", + "approximate error due to rise in resistance of 1 ohm in Re (degree C) = -2.39520958084\n", + "approximate error due to rise in Temp. of 10 (degree C) = -7.44949870586\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "E_20 = 0.112*10**-3;# emf at 20degree C\n", + "E_900 = 8.446*10**-3;\n", + "E_1200 = 11.946*10**-3;\n", + "\n", + "# Calculations and Results\n", + "E1 = E_900-E_20;\n", + "E2 = E_1200-E_20;\n", + "print \"E1 = 1.08*R1/(R1+2.5+R2) (i)\",\n", + "print \"E2 = 1.08*(R1+2.5)/(R1+2.5+R2) (ii)\",\n", + "print \"on solving (i) and (ii)\",\n", + "R1 = 5.95;\n", + "R2 = 762.6;\n", + "print \"value of resistance R1 (ohm) = \", R1\n", + "print \"value of resistance R2 (ohm) = \", R2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E1 = 1.08*R1/(R1+2.5+R2) (i) E2 = 1.08*(R1+2.5)/(R1+2.5+R2) (ii) on solving (i) and (ii) value of resistance R1 (ohm) = 5.95\n", + "value of resistance R2 (ohm) = 762.6\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "linearity_percentage = (0.003/1.5)*100;\n", + "\n", + "# Results\n", + "print \"percentage linearity = \", linearity_percentage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage linearity = 0.2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30 Page No : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "print \"lacement = 0.5\"\n", + "Vo = 2.*10**-3;\n", + "Se_LVDT = Vo\n", + "print \"lacement \"\n", + "print \"senstivity of the LVDT (V/mm)\", Se_LVDT\n", + "\n", + "# Calculations and Results\n", + "Af = 250.;\n", + "Se_instrument = Se_LVDT*Af;\n", + "print \"senstivity of instrument (V/mm)\", Se_instrument\n", + "sd = 5./100;\n", + "Vo_min = 50./5;\n", + "Re_instrument = 1*1/1000;\n", + "print \"resolution of instrument in mm\", Re_instrument\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lacement = 0.5\n", + "lacement \n", + "senstivity of the LVDT (V/mm) 0.002\n", + "senstivity of instrument (V/mm) 0.5\n", + "resolution of instrument in mm 0\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31 Page No : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "b = 0.02;\n", + "t = 0.004;\n", + "I = (1./12)*b*t**3;\n", + "F = 25.;\n", + "l = 0.25;\n", + "E = 200.*10**9;\n", + "\n", + "# Calculations and Results\n", + "x = (F*l**3)/(3*E*I);\n", + "print \"deflection (m)\", x\n", + "DpF = x/F;\n", + "Se = DpF*0.5*1000;\n", + "Re = (10./1000)*(2./10);\n", + "F_min = Re/Se;\n", + "F_max = 10/Se;\n", + "print \"minimum force (N)\", F_min\n", + "print \"maximum force (N)\", F_max\n", + "print \"\", Se\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "deflection (m) 0.006103515625\n", + "minimum force (N) 0.016384\n", + "maximum force (N) 81.92\n", + " 0.1220703125\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"permittivity of the air e0 = 8.85*10**-12\"\n", + "# Variables\n", + "e0 = 8.85*10**-12;\n", + "w = 25*10**-3;\n", + "\n", + "# Calculations\n", + "d = 0.25*10**-3;\n", + "Se = -4*e0*w/d;\n", + "\n", + "# Results\n", + "print \"sensitivity of the transducer (F/m) = \", Se\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "permittivity of the air e0 = 8.85*10**-12\n", + "sensitivity of the transducer (F/m) = -3.54e-09\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33 Page No : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "C1 = 370*10**-12;\n", + "d1 = 3.5*10**-3;\n", + "\n", + "# Calculations\n", + "d2 = 2.9*10**-3;\n", + "C2 = C1*d1/d2;\n", + "\n", + "# Results\n", + "print \"the value of the capacitance afte the application of pressure (F) = \", C2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of the capacitance afte the application of pressure (F) = 4.46551724138e-10\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.34 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "fo1 = 100.*10**3;\n", + "d1 = 4.;\n", + "d2 = 3.7;\n", + "\n", + "# Calculations\n", + "fo2 = ((d2/d1)**0.5)*fo1;\n", + "dfo = fo1-fo2;\n", + "\n", + "# Results\n", + "print \"change in frequency of the oscillator (Hz)\", dfo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in frequency of the oscillator (Hz) 3823.07969164\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "L_air = (3.1-3)/2;\n", + "D_stress = 100/L_air;\n", + "e0 = 8.85*10**-12;\n", + "l = 20.*10**-3;\n", + "D2 = 3.1;\n", + "D1 = 3;\n", + "\n", + "# Calculations and Results\n", + "C = (2*math.pi)*e0*l/(math.log(D2/D1));\n", + "print \"capacitance(F) = \", C\n", + "l = (20*10**-3)-(2*10**-3);\n", + "C_new = (2*math.pi)*e0*l/(math.log(D2/D1));\n", + "C_change = C-C_new;\n", + "print \"change in capacitance(F) = \", C_change\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitance(F) = 3.39167370734e-11\n", + "change in capacitance(F) = 3.39167370734e-12\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36 Page No : 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "M = 0.95;\n", + "w = 2.*math.pi*20;\n", + "\n", + "# Calculations and Results\n", + "tc = (1/w)*((M**2)/(1-M**2))**0.5;\n", + "print \"time constant (s)\", tc\n", + "ph = ((math.pi/2)-(math.atan(w*tc)))*(180/math.pi);\n", + "print \"phase shift(deg)\", ph\n", + "C = (8.85*10**-12*300*10**-6)/(0.125*10**-3);\n", + "R = tc/C;\n", + "print \"series resistance (ohm)\", R\n", + "M = 1./(1+(1./(2*math.pi*5*tc)**2))**0.5;\n", + "print \"amplitude ratio = \", M\n", + "Eb = 100;\n", + "x = 0.125*10**-3;\n", + "Vs = Eb/x;\n", + "print \"voltage sensitivity (V/m)\", Vs\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time constant (s) 0.0242109278459\n", + "phase shift(deg) 18.1948723388\n", + "series resistance (ohm) 1139874192.37\n", + "amplitude ratio = 0.605390338483\n", + "voltage sensitivity (V/m) 800000.0\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37 Page No : 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "e0 = 8.85*10**-12;\n", + "A = 500*10**-6;\n", + "d = 0.2*10**-3;\n", + "C = e0*A/d;\n", + "d1 = 0.18*10**-3;\n", + "C_new = e0*A/d1;\n", + "\n", + "# Calculations and Results\n", + "C_change = C_new-C;\n", + "Ratio = (C_change/C)/(0.02/0.2);\n", + "print \"ratio of per unit change of capacitance to per unit change of diaplacement\", Ratio\n", + "d1 = 0.19*10**-3;\n", + "e1 = 1;\n", + "d2 = 0.01*10**-3;\n", + "e2 = 8;\n", + "C = (e0*A)/((d1/e1)+(d2/e2));\n", + "d1_new = 0.17*10**-3;\n", + "C_new = (e0*A)/((d1_new/e1)+(d2/e2));\n", + "C_change = C_new-C;\n", + "Ratio = (C_change/C)/(0.02/0.2);\n", + "print \"ratio of per unit change of capacitance to per unit change of diaplacement\", Ratio\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of per unit change of capacitance to per unit change of diaplacement 1.11111111111\n", + "ratio of per unit change of capacitance to per unit change of diaplacement 1.16788321168\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40 Page No : 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "g = 0.055;\n", + "t = 2*10**-3;\n", + "P = 1.5*10**6;\n", + "\n", + "# Calculations and Results\n", + "Eo = g*t*P;\n", + "print \"output voltage(V) = \", Eo\n", + "e = 40.6*10**-12;\n", + "d = e*g;\n", + "print \"charge sensitivity (C/N) = \", d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage(V) = 165.0\n", + "charge sensitivity (C/N) = 2.233e-12\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.41 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "g = 0.055;\n", + "t = 1.5*10**-3;\n", + "Eo = 100;\n", + "\n", + "# Calculations\n", + "P = Eo/(g*t);\n", + "A = 25.*10**-6;\n", + "F = P*A;\n", + "\n", + "# Results\n", + "print \"Force(N) = \", F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force(N) = 30.303030303\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.42 Page No : 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 25.*10**-6;\n", + "F = 5.;\n", + "P = F/A;\n", + "d = 150*10**-12;\n", + "e = 12.5*10**-9;\n", + "g = d/(e);\n", + "t = 1.25*10**-3;\n", + "\n", + "# Calculations\n", + "Eo = (g*t*P);\n", + "strain = P/(12*10**6);\n", + "Q = d*F;\n", + "C = Q/Eo;\n", + "\n", + "# Results\n", + "print \"strain = \", strain\n", + "print \"charge(C) = \", Q\n", + "print \"capacitance(F) = \", C\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strain = 0.0166666666667\n", + "charge(C) = 7.5e-10\n", + "capacitance(F) = 2.5e-10\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.43 Page No : 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "d = 2.*10**-12;\n", + "t = 1.*10**-3;\n", + "Fmax = 0.01;\n", + "e0 = 8.85*10**-12;\n", + "er = 5.;\n", + "\n", + "# Calculations and Results\n", + "A = 100*10**-6;\n", + "Eo_peak_to_peak = 2*d*t*Fmax/(e0*er*A);\n", + "print \"peak voltage swing under open conditions\", Eo_peak_to_peak\n", + "Rl = 100*10**6;\n", + "Cl = 20*10**-12;\n", + "d1 = 1*10**-3;\n", + "Cp = e0*er*A/d1;\n", + "C = Cp+Cl;\n", + "w = 1000;\n", + "m = (w*Cp*Rl/(1+(w*C*Rl)**2)**0.5);\n", + "El_peak_to_peak = (2*d*t*Fmax/(e0*er*A))*m;\n", + "\n", + "print \"peak voltage swing under loaded conditions\", El_peak_to_peak\n", + "E = 90*10**9;\n", + "dt = 2*Fmax*t/(A*E);\n", + "print \"maximum change in crystal thickness (m)\", dt\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak voltage swing under open conditions 0.0090395480226\n", + "peak voltage swing under loaded conditions 0.00151556405344\n", + "maximum change in crystal thickness (m) 2.22222222222e-12\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.44 Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "M = 0.95;\n", + "tc = 1.5*10**-3;\n", + "\n", + "# Calculations and Results\n", + "w = (1/tc)*((M**2)/(1-M**2))**0.5;\n", + "print \"minimum frequency (rad/s)\", w\n", + "ph = ((math.pi/2)-(math.atan(w*tc)))*(180/math.pi);\n", + "print \"phase shift(deg)\", ph\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum frequency (rad/s) 2028.2899482\n", + "phase shift(deg) 18.1948723388\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.45 Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Kq = 40.*10**-3;\n", + "Cp = 1000.*10**-12;\n", + "\n", + "# Calculations and Results\n", + "K = Kq/Cp;\n", + "print \"sensitivity of the transducer(V/m)\", K\n", + "Cc = 300*10**-12;\n", + "Ca = 50*10**-12;\n", + "C = Cp+Cc+Ca;\n", + "Hf = Kq/C;\n", + "print \"high frequency sensitivity (V/m)\", Hf\n", + "R = 1*10**6;\n", + "tc = R*C;\n", + "M = 0.95;\n", + "w = (1/tc)*((M**2)/(1-M**2))**0.5;\n", + "f = w/(2*math.pi);\n", + "print \"minimum frequency (s)\", w\n", + "print \"now f = 10Hz\",\n", + "f = 10;\n", + "w = 2*math.pi*f;\n", + "tc = (1/w)*((M**2)/(1-M**2))**0.5;\n", + "C_new = tc/R;\n", + "Ce = C_new-C;\n", + "print \"external shunt capacitance(F)\", Ce\n", + "Hf_new = Kq/C_new;\n", + "print \"new value of high frequency sensitivity (V/m)\", Hf_new\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sensitivity of the transducer(V/m) 40000000.0\n", + "high frequency sensitivity (V/m) 29629629.6296\n", + "minimum frequency (s) 2253.655498\n", + "now f = 10Hz external shunt capacitance(F) 4.70718556919e-08\n", + "new value of high frequency sensitivity (V/m) 826073.256145\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.46 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#\n", + "\n", + "# Variables\n", + "R = 10.**6;\n", + "C = 2500.*10**-12;\n", + "tc = R*C;\n", + "t = 2.*10**-3;\n", + "d = 100.*10**-12;\n", + "\n", + "# Calculations and Results\n", + "F = 0.1;\n", + "el = 10.**3*(d*F*(math.exp(-t/tc))/C);\n", + "print \"voltage just before t = 2ms (mV)\", el\n", + "el_after = 10.**3*(d*F*(math.exp(-t/tc)-1)/C);\n", + "print \"voltage just after t = 2ms (mV)\", el_after\n", + "print \"when t = 10ms\",\n", + "t = 10.*10**-3;\n", + "T = 2.*10\n", + "e_10 = 10.**3*(d*F*(math.exp((-T/tc)-1))*(math.exp(-(t-T))/tc)/C)\n", + "print \"output voltage 10 ms after the application of impulse(mV) \", e_10\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage just before t = 2ms (mV) 1.79731585647\n", + "voltage just after t = 2ms (mV) -2.20268414353\n", + "when t = 10ms output voltage 10 ms after the application of impulse(mV) 0.0\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.47 Page No : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# to prove time constant should be approximately 20T to keep undershoot within 5%\n", + "# Variables\n", + "print \"Let T = 1\",\n", + "T = 1.;\n", + "el = 0.95;\n", + "\n", + "# Calculations\n", + "tc = -T/math.log(el);\n", + "\n", + "# Results\n", + "print \"time constant\", tc\n", + "print \"as T = 1 so time constant should be approximately equal to 20T\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Let T = 1 time constant 19.4957257462\n", + "as T = 1 so time constant should be approximately equal to 20T\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.48 Page No : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Kh = -1*10**-6;\n", + "I = 3;\n", + "B = 0.5;\n", + "\n", + "# Calculations\n", + "t = 2.*10**-3;\n", + "Eh = Kh*I*B/t;\n", + "\n", + "# Results\n", + "print \"output voltage (V)\", Eh\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage (V) -0.00075\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.49 Page No : 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations\n", + "Th_wavelength = 1.24*10**-6/1.8\n", + "\n", + "# Results\n", + "print \"Threshold wavelength (m)\", Th_wavelength\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold wavelength (m) 6.88888888889e-07\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.50 Page No : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E_imparted = (1.24*10**-6)/(0.2537*10**-6);\n", + "B_energy = E_imparted-4.30;\n", + "em_ratio = 0.176*10**12;\n", + "\n", + "# Calculations\n", + "v = (2*B_energy*em_ratio)**0.5;\n", + "\n", + "# Results\n", + "print \"maximum velocity of emitted photo electrons (m/s)\", v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum velocity of emitted photo electrons (m/s) 454815.603242\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.51 Page No : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Ri = 30;\n", + "Rf = 100;\n", + "t = 10.;\n", + "tc = 72.;\n", + "\n", + "# Calculations\n", + "Rt = Ri+(Rf-Ri)*(1-math.exp(-t/tc));\n", + "\n", + "# Results\n", + "print \"resistance of the cell (K ohm)\", Rt\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance of the cell (K ohm) 39.0772691917\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.52 Page No : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Calculations and Results\n", + "I_power = 250*0.2*10**-6;\n", + "print \"incident power (W)\", I_power\n", + "\n", + "Rl = 10.*10**3;\n", + "C = 2.*10**-12;\n", + "fc = 1./(2*math.pi*Rl*C);\n", + "print \"cut off frequency (Hz)\", fc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "incident power (W) 5e-05\n", + "cut off frequency (Hz) 7957747.15459\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.53 Page No : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "I = 2.2*10**-3;\n", + "Eo = 0.33;\n", + "Rl = 100.;\n", + "\n", + "# Calculations and Results\n", + "Ri = (Eo/I)-100;\n", + "print \"internal resistance of cell (ohm)\", Ri\n", + "Vo = 0.33*(math.log(25)/math.log(10));\n", + "print \"open circuit voltage for a radiant incidence of 25 W/m2 (V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "internal resistance of cell (ohm) 50.0\n", + "open circuit voltage for a radiant incidence of 25 W/m2 (V) = 0.461320202862\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.54 Page No : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "A = 1935*10**-6;\n", + "r = 0.914;\n", + "S_angle = A/r**2;\n", + "I = 180.;\n", + "\n", + "# Calculations\n", + "L_flux = I*S_angle;\n", + "\n", + "# Results\n", + "print \"lumnious flux = \", L_flux\n", + "print \"Corresponding to lumnious flux o.417 lm and a load resistance of 800 ohm the current is 120 micro Ampere\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lumnious flux = 0.416928019765\n", + "Corresponding to lumnious flux o.417 lm and a load resistance of 800 ohm the current is 120 micro Ampere\n" + ] + } + ], + "prompt_number": 63 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch6.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch6.ipynb new file mode 100755 index 00000000..2166ed92 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch6.ipynb @@ -0,0 +1,1358 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:918235f4b2bfd4a24a1f3adb5ce3a07d29dd6848cf00df31612a375f1aec5802" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Signal Conditioning" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 100.;\n", + "R1 = 1.*10**3;\n", + "\n", + "# Calculations\n", + "Rf = -A*R1;\n", + "\n", + "# Results\n", + "print \"feedback resistance (ohm) = \", Rf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "feedback resistance (ohm) = -100000.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rf = 10.;\n", + "R1 = 1.;\n", + "Avol = 200000.;\n", + "\n", + "# Calculations\n", + "A = -(Rf/R1)*(1./(1.+(1./Avol)*((R1+Rf)/R1)));\n", + "\n", + "# Results\n", + "print \"closed loop gain = \", A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "closed loop gain = -9.99945003025\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations and Results\n", + "Sa = 10;\n", + "print \" saturation voltage = \", Sa\n", + "Vom = Sa;\n", + "print \"maximum output voltage\", Vom\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " saturation voltage = 10\n", + "maximum output voltage 10\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vos = 5.*10**-3;\n", + "Rf = 10.;\n", + "R1 = 1.;\n", + "\n", + "# Calculations\n", + "Vo = -Vos*(1+Rf/R1);\n", + "\n", + "# Results\n", + "print \"output voltage due to offset voltage (V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage due to offset voltage (V) = -0.055\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Rf = 10.;\n", + "R1 = 1;\n", + "\n", + "# Calculations\n", + "A = Rf/R1;\n", + "\n", + "# Results\n", + "print \"Amplification Factor = \", A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplification Factor = 10.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V1 = 1.;\n", + "V2 = -2.;\n", + "Rf = 500.;\n", + "R1 = 250.;\n", + "R2 = 100.;\n", + "\n", + "# Calculations\n", + "Vo = -(((Rf/R1)*V1)+((Rf/R2)*V2));\n", + "\n", + "# Results\n", + "print \"output voltage(V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage(V) = 8.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rf = 100.*10**3;\n", + "R1 = 1*10**3;\n", + "\n", + "# Calculations and Results\n", + "A = Rf/R1;\n", + "print \"Gain = \", A\n", + "print \"If multiplier is 10\",\n", + "A = 10;\n", + "Rf = A*R1;\n", + "print \" feedback resistance (Ohm) = \", Rf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain = 100.0\n", + "If multiplier is 10 feedback resistance (Ohm) = 10000\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "g = 10.;\n", + "Rf = 10.;\n", + "\n", + "# Calculations and Results\n", + "R1 = Rf/g;\n", + "print \"resistance R1(Kilo-ohms) = \", R1\n", + "R2 = Rf/(0.5*g);\n", + "print \"resistance R1(Kilo-ohms) = \", R2\n", + "R3 = Rf/(0.333*g);\n", + "print \"resistance R1(Kilo-ohms) = \", R3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance R1(Kilo-ohms) = 1.0\n", + "resistance R1(Kilo-ohms) = 2.0\n", + "resistance R1(Kilo-ohms) = 3.003003003\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Voramp = -10;\n", + "print \"if voltage source is 10V then RC = 1 ms and if C = 1 micro-F\"\n", + "\n", + "# Calculations\n", + "C = 1;\n", + "R = 1*10**-3*10**6;\n", + "\n", + "# Results\n", + "print \"value of resistance (ohm) = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "if voltage source is 10V then RC = 1 ms and if C = 1 micro-F\n", + "value of resistance (ohm) = 1000.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V2 = 5.*10**-3;\n", + "V1 = 3.*10**-3;\n", + "Vo = 300.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Vd = V2-V1;\n", + "Ad = Vo/Vd;\n", + "print \"difference mode gain = \", Ad\n", + "V2 = 155*10**-3;\n", + "V1 = 153*10**-3;\n", + "Vo = Ad*(V2-V1);\n", + "print \"output voltage (V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "difference mode gain = 150.0\n", + "output voltage (V) = 0.3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vo = 3.;\n", + "Vd = 30.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "Ad = Vo/Vd;\n", + "print \"difference mode gain = \", Ad\n", + "Vo = 5.*10**-3;\n", + "Vc = 500.*10**-3;\n", + "Ac = Vo/Vc;\n", + "print \"Common mode gain = \", Ac\n", + "CMRR = Ad/Ac;\n", + "print \"Common mode rejection ratio = \", CMRR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "difference mode gain = 100.0\n", + "Common mode gain = 0.01\n", + "Common mode rejection ratio = 10000.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V2 = 30.*10**-3;\n", + "V1 = -30.*10**-3;\n", + "Vd = V2-V1;\n", + "Ad = 150.;\n", + "Vos = Ad*Vd;\n", + "Ac = 0.04;\n", + "Vc = 600.*10**-3;\n", + "\n", + "# Calculations\n", + "Von = Ac*Vc;\n", + "SNR = Vos/Von;\n", + "CMRR = Ad/Ac;\n", + "\n", + "# Results\n", + "print \"Signal to Noise Ratio = \", SNR\n", + "\n", + "print \"CMRR = \", CMRR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal to Noise Ratio = 375.0\n", + "CMRR = 3750.0\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13 Page No : 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ci = 10.*10**-12;\n", + "Vi = 10.;\n", + "Eo = 8.85*10**-12;\n", + "\n", + "# Calculations and Results\n", + "A = 200.*10**-6;\n", + "K = -Ci*Vi/(Eo*A);\n", + "print \"sensitivity (V/mm) = \", K\n", + "d = 1*10**-6;\n", + "Vo = K*d;\n", + "print \"output voltage (V) = \", Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sensitivity (V/mm) = -56497.1751412\n", + "output voltage (V) = -0.0564971751412\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page No : 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations and Results\n", + "MXtc = 10.**10*1000*10**-12;\n", + "print \"Maximum time constant (s)\", MXtc\n", + "MNtc = 10.**8*10*10**-12;\n", + "print \"Minimum time constant (s)\", MNtc\n", + "AR = 0.95;\n", + "fmin = (AR)/(2*math.pi*MXtc*(1-AR**2)**0.5);\n", + "print \"minimum frequency (Hz)\", fmin\n", + "fmax = (AR)/(2*math.pi*MNtc*(1-AR**2)**0.5);\n", + "print \"Maximum frequency (Hz)\", fmax\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum time constant (s) 10.0\n", + "Minimum time constant (s) 0.001\n", + "minimum frequency (Hz) 0.0484218556919\n", + "Maximum frequency (Hz) 484.218556919\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page No : 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "g = 0.501;\n", + "f = 50;\n", + "\n", + "# Calculations and Results\n", + "w = 2*math.pi*f;\n", + "tc = (1-g**2)**0.5/(w*g);\n", + "print \"time constant (s)\", tc\n", + "R = 10000;\n", + "C = (tc/R)*10**6;\n", + "print \"capacitance (micro-F)\", C\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time constant (s) 0.00549861130167\n", + "capacitance (micro-F) 0.549861130167\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16 Page No : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R1 = 10.*10**3;\n", + "R2 = 1.*10**6;\n", + "\n", + "# Calculations and Results\n", + "A = R2/(R1+R2);\n", + "print \"gain = \", A\n", + "C2 = (0.01)*10**-6;\n", + "C1 = 100.*10**-12;\n", + "fcl = 1./(2*math.pi*C2*R2);\n", + "print \"lower cut off frequency (Hz)\", fcl\n", + "fcu = 1./(2*math.pi*R1*C1);\n", + "print \"upper cut off frequency (Hz)\", fcu\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "gain = 0.990099009901\n", + "lower cut off frequency (Hz) 15.9154943092\n", + "upper cut off frequency (Hz) 159154.943092\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page No : 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R = 1.*10**6;\n", + "fo = 10.*10**3;\n", + "\n", + "# Calculations\n", + "C = 1/(2*math.pi*fo*R);\n", + "\n", + "# Results\n", + "print \"the value of C (F)\", C\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of C (F) 1.59154943092e-11\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19 Page No : 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Rt = 100.;\n", + "K = 1.;\n", + "\n", + "# Calculations and Results\n", + "Rb = K*Rt;\n", + "ei = 10;\n", + "print \"When K = 1\"\n", + "eo = ((K*Rt/Rb)/(1+(K*Rt/Rb)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "Se = (ei*Rb)/((Rb+K*Rt)**2);\n", + "print \"sensitivity (V/ohm) = \", Se\n", + "K = 0.95;\n", + "print \"When K = 0.95\",\n", + "eo = ((K*Rt/Rb)/(1+(K*Rt/Rb)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "Se = (ei*Rb)/((Rb+K*Rt)**2);\n", + "print \"sensitivity (V/ohm) = \", Se\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When K = 1\n", + "output voltage (V) = 5.0\n", + "sensitivity (V/ohm) = 0.025\n", + "When K = 0.95 output voltage (V) = 4.87179487179\n", + "sensitivity (V/ohm) = 0.0262984878369\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20 Page No : 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "ei = 100.;\n", + "K = 0.25;\n", + "print \"When K = 0.25\"\n", + "\n", + "# Calculations and Results\n", + "eo = ((K/6)/(1+(K/6)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "K = 0.5;\n", + "print \"When K = 0.5\",\n", + "eo = ((K/6)/(1+(K/6)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "K = 0.6;\n", + "print \"When K = 0.6\",\n", + "eo = ((K/6)/(1+(K/6)))*ei;\n", + "print \"output voltage (V) = \", eo\n", + "K = 0.8;\n", + "print \"When K = 0.8\",\n", + "eo = ((K/6)/(1+(K/6)))*ei;\n", + "print \"output voltage (V) = \", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When K = 0.25\n", + "output voltage (V) = 4.0\n", + "When K = 0.5 output voltage (V) = 7.69230769231\n", + "When K = 0.6 output voltage (V) = 9.09090909091\n", + "When K = 0.8 output voltage (V) = 11.7647058824\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21 Page No : 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R2 = 119;\n", + "R3 = 119.7;\n", + "R1 = 120.4;\n", + "R4 = R2*R3/R1;\n", + "R4 = 121.2;\n", + "ei = 12;\n", + "\n", + "# Calculations\n", + "eo = ((R1*R4-R2*R3)/((R1+R3)*(R2+R4)))*ei;\n", + "\n", + "# Results\n", + "print \" output voltage (V) = \", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " output voltage (V) = 0.0724469161996\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 Page No : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "ei = 6.;\n", + "R = 10000.;\n", + "print \"if dR = 0.05R\"\n", + "\n", + "# Calculations and Results\n", + "dR = 0.05*R;\n", + "eo = ((dR/R)/(4+2*(dR/R)))*ei;\n", + "print \"output voltage (V)\", eo\n", + "print \"if dR = -0.05R\"\n", + "dR = -0.05*R;\n", + "eo = ((dR/R)/(4+2*(dR/R)))*ei;\n", + "print \"output voltage (V)\", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "if dR = 0.05R\n", + "output voltage (V) 0.0731707317073\n", + "if dR = -0.05R\n", + "output voltage (V) -0.0769230769231\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.23 Page No : 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "R2 = 800;\n", + "R3 = 800;\n", + "R4 = 800;\n", + "Rm = 100;\n", + "R = 800.;\n", + "ei = 4;\n", + "\n", + "# Calculations\n", + "im = 0.8*10**-6;\n", + "dR = (im*R**2)*(4*(1+Rm/R))/ei;\n", + "R1 = R+dR;\n", + "\n", + "# Results\n", + "print \"resistance of unknown resistor (ohm) = \", R1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance of unknown resistor (ohm) = 800.576\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24 Page No : 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R2 = 1000.;\n", + "R3 = 1000.;\n", + "R1 = 1010.;\n", + "R4 = 1000.;\n", + "ei = 100.;\n", + "\n", + "# Calculations and Results\n", + "eo = ((R1*R4-R2*R3)/((R1+R3)*(R2+R4)))*ei;\n", + "print \" open circuit voltage (V) = \", eo\n", + "Ro = (R1*R4/(R1+R4))+(R2*R3/(R2+R3));\n", + "Rm = 4000;\n", + "im = eo/(Ro+Rm);\n", + "print \"current (A) = \", im\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " open circuit voltage (V) = 0.248756218905\n", + "current (A) = 4.97265042268e-05\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.25 Page No : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 100.;\n", + "P = 250.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "i = (P/R)**0.5;\n", + "print \"maximum permissible current (A) = \", i\n", + "ei = 2*i*R;\n", + "print \"maximum supply voltage (V) = \", ei\n", + "Rs = 100.;\n", + "Ps = 10.**2/Rs;\n", + "print \"Power dissipation in series resistance (W)\", Ps\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum permissible current (A) = 0.05\n", + "maximum supply voltage (V) = 10.0\n", + "Power dissipation in series resistance (W) 1.0\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26 Page No : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = (0.1/0.2)*10**-3;\n", + "R = 1000.;\n", + "eim = 2*(P*R)**0.5;\n", + "dth = 0.1;\n", + "\n", + "# Calculations\n", + "dR = (4.5/100)*dth*R;\n", + "eom = (dR/(4*R))*eim;\n", + "Sem = eom/dth;\n", + "\n", + "# Results\n", + "print \"maximum voltage sensitivity of the bridge (V) = \", Sem\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum voltage sensitivity of the bridge (V) = 0.0159099025767\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.27 Page No : 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations and Results\n", + "Reso = 10.*10**-3/10;\n", + "print \"resolution of the instrument = \", Reso\n", + "n = 10.;\n", + "Q = 10/2**n;\n", + "Eq = Q/(2*3**0.5);\n", + "print \"quantization error = \", Eq\n", + "D = (2**n)-1;\n", + "print \"decesion levels = \", D\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resolution of the instrument = 0.001\n", + "quantization error = 0.00281909311128\n", + "decesion levels = 1023.0\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.28 Page No : 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ra = 10.;\n", + "b = 5.;\n", + "\n", + "# Calculations and Results\n", + "Wmsb = Ra/2;\n", + "print \"weight of MSB (V) = \", Wmsb\n", + "Wlsb = Ra/2**b;\n", + "print \"weight of LSB (V) = \", Wlsb\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "weight of MSB (V) = 5.0\n", + "weight of LSB (V) = 0.3125\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.29 Page No : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E = 10.;\n", + "\n", + "# Calculations and Results\n", + "ER = E*256/255;\n", + "print \"Reference voltage (V) = \", ER\n", + "n = 8.;\n", + "CVlsb = (2**-n)*ER;\n", + "PC = CVlsb*100/E;\n", + "print \"Percentage change = \", PC\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference voltage (V) = 10.0392156863\n", + "Percentage change = 0.392156862745\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.30 Page No : 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Calculations and Results\n", + "n = 14.;\n", + "print \"number of bits = \", n\n", + "E = 10.;\n", + "Q = 10.;\n", + "LSB = E/2**n;\n", + "print \"Value of LSB (V) = \", LSB\n", + "Eq = Q/(2*(3**0.5));\n", + "print \"Quantization error (V) = \", Eq\n", + "fh = 1000.;\n", + "fs = 5*fh;\n", + "print \"minimum sampling rate (Hz) = \", fs\n", + "a = 1./16384;\n", + "ta = 1./(2*math.pi*fh)*a;\n", + "print \"Aperature time (s) = \", ta\n", + "Dr = 6*n;\n", + "print \"dynamic range (db) = \", Dr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of bits = 14.0\n", + "Value of LSB (V) = 0.0006103515625\n", + "Quantization error (V) = 2.88675134595\n", + "minimum sampling rate (Hz) = 5000.0\n", + "Aperature time (s) = 9.71404681957e-09\n", + "dynamic range (db) = 84.0\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.31 Page No : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "ER = 10.;\n", + "n = 6.;\n", + "\n", + "# Calculations and Results\n", + "Imax = 10*10**-3;\n", + "R = ER*((2**n)-1)/((2**(n-2))*Imax);\n", + "print \"resistance (ohm) = \", R\n", + "LSB = ER/((2**(n-1))*R);\n", + "print \"smallest output current (A)\", LSB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance (ohm) = 3937.5\n", + "smallest output current (A) 7.93650793651e-05\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.32 Page No : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "n = 6.;\n", + "R = 10000.;\n", + "Io = (10./10*10**3)*(1*1+1*0.5+1*0.25+0*0.125+1*0.0625)*10**-6;\n", + "Rf = 5000;\n", + "\n", + "# Calculations\n", + "Eo = -Io*Rf;\n", + "\n", + "# Results\n", + "print \"Output voltage (V) = \", Eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage (V) = -9.0625\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.33 Page No : 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations and Results\n", + "print \"Set d3 = 1\"\n", + "Output = 5./2**1;\n", + "print \"since 3.217>2.5 so d3 = 1\"\n", + "print \"Set d2 = 1\"\n", + "Output = (5./2**1)+(5./2**2);\n", + "print \"since 3.217< 3.75 so d2 = 0\"\n", + "print \"Set d1 = 1\",\n", + "Output = (5./2**1)+(5./2**3);\n", + "print \"since 3.217>3.125 so d1 = 1\",\n", + "print \"Set d0 = 1\",\n", + "Output = (5./2**1)+(5./2**3)+(5./2**4);\n", + "print \"since 3.217<3.4375 so d0 = 0\",\n", + "print \"Output of successive approximation A/D = 1010\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Set d3 = 1\n", + "since 3.217>2.5 so d3 = 1\n", + "Set d2 = 1\n", + "since 3.217< 3.75 so d2 = 0\n", + "Set d1 = 1 since 3.217>3.125 so d1 = 1 Set d0 = 1 since 3.217<3.4375 so d0 = 0 Output of successive approximation A/D = 1010\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.34 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t = 400.;\n", + "T = t/4;\n", + "C = 1.*10**-6;\n", + "v = 20;\n", + "i = C*100*v/(T);\n", + "R = 1*10**3;\n", + "\n", + "# Calculations\n", + "e_o = i*R;\n", + "\n", + "# Results\n", + "print \"output voltage(V)\", e_o\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage(V) 0.02\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch7.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch7.ipynb new file mode 100755 index 00000000..b7ea5d39 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch7.ipynb @@ -0,0 +1,443 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f0558a3d67a6c58d34e0e0a67cd439be2d1883ea7cc3c2cdd41f8e1ab303c0ee" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Display Devices and recorders" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N = 4.;\n", + "\n", + "# Calculations and Results\n", + "R = 1./10**N;\n", + "print \"Resolution of the meter = \", R\n", + "VR = 1;\n", + "R1 = VR*R;\n", + "print \"Resolution of the meter for voltage range 1V = \", R1\n", + "VR1 = 10;\n", + "R2 = VR1*R;\n", + "print \"Resolution of the meter for voltage range 10V = \", R2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution of the meter = 0.0001\n", + "Resolution of the meter for voltage range 1V = 0.0001\n", + "Resolution of the meter for voltage range 10V = 0.001\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "N = 3.;\n", + "\n", + "# Calculations and Results\n", + "R = 1./10**N;\n", + "print \"Resolution of the meter = \", R\n", + "print \"12.98 will be layed as 12.980 on 10V scale\"\n", + "VR = 1.;\n", + "R1 = VR*R;\n", + "print \"Resolution of the meter for voltage range 1V = \", R1\n", + "print \"0.6973 will be layed as 0.6973 on 1V scale\"\n", + "VR1 = 10;\n", + "R2 = VR1*R;\n", + "print \"Resolution of the meter for voltage range 10V = \", R2\n", + "print \"0.6973 will be layed as 00.697 on 10V scale\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution of the meter = 0.001\n", + "12.98 will be layed as 12.980 on 10V scale\n", + "Resolution of the meter for voltage range 1V = 0.001\n", + "0.6973 will be layed as 0.6973 on 1V scale\n", + "Resolution of the meter for voltage range 10V = 0.01\n", + "0.6973 will be layed as 00.697 on 10V scale\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 5.;\n", + "\n", + "# Calculations and Results\n", + "V = 0.005*R;\n", + "print \"0.5 percent of the reading\", V\n", + "TPE = V+0.01;\n", + "print \"Total possible error (V) = \", TPE\n", + "R1 = 0.10;\n", + "V1 = 0.005*R1;\n", + "TPE1 = V1+0.01;\n", + "print \"Total possible error (V) = \", TPE1\n", + "PE = (TPE1/0.1)*100;\n", + "print \"Percentage error = \", PE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.5 percent of the reading 0.025\n", + "Total possible error (V) = 0.035\n", + "Total possible error (V) = 0.0105\n", + "Percentage error = 10.5\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "N = 034;\n", + "t = 10.*10**-3;\n", + "\n", + "# Calculations\n", + "f = N/t;\n", + "\n", + "# Results\n", + "print \"frequency(Hz) = \", f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency(Hz) = 2800.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 5*10**6;\n", + "\n", + "# Calculations and Results\n", + "V = 0.00005*R;\n", + "print \"0.005 percent of the reading(micro sec) = \", V\n", + "LSD = 1;\n", + "ME = V+1;\n", + "print \"Maximum error (micro sec) = \", ME\n", + "R = 500;\n", + "V = 0.00005*R;\n", + "print \"0.005 percent of the reading(sec) = \", V\n", + "LSD = 1;\n", + "ME = V+1;\n", + "print \"Maximum error (sec) = \", ME\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.005 percent of the reading(micro sec) = 250.0\n", + "Maximum error (micro sec) = 251.0\n", + "0.005 percent of the reading(sec) = 0.025\n", + "Maximum error (sec) = 1.025\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "D = 8.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "A = D**2;\n", + "print \"A = \", A\n", + "J = 8*10**-3;\n", + "K = 16*10**-3;\n", + "B = 4*J*K;\n", + "print \"B = \", B\n", + "print \"since A<B so the instrument is underdanped\",\n", + "th = (100*math.pi)/180;\n", + "i = 10*10**-3;\n", + "F = 0.2*10**-6;\n", + "G = (K*th+F)/i;\n", + "l = 65*10**-3;\n", + "d = 25*10**-3;\n", + "N = G/(B*l*d);\n", + "print \"number of turns = \", N\n", + "i = F/G;\n", + "print \"current required to overcome friction (A)\", i\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " A = 6.4e-05\n", + "B = 0.000512\n", + "since A<B so the instrument is underdanped number of turns = 3356426.44614\n", + "current required to overcome friction (A) 7.16192114565e-08\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Lam = 2.5*6.25;\n", + "f = 50000;\n", + "\n", + "# Calculations\n", + "S = Lam*10**-6*f;\n", + "\n", + "# Results\n", + "print \"speed(m/s) = \", S\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed(m/s) = 0.78125\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "ND = 12000/1.5;\n", + "\n", + "# Results\n", + "print \"Number density (numbers/mm)\", ND\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number density (numbers/mm) 8000.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Y1 = 1.25;\n", + "Y2 = 2.5;\n", + "\n", + "# Calculations\n", + "PA = math.asin(Y1/Y2);\n", + "\n", + "# Results\n", + "print \"phase angle (degree)\", PA\n", + "print \"possible angle are 30 degree and 330 degree\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "phase angle (degree) 0.523598775598\n", + "possible angle are 30 degree and 330 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations and Results\n", + "print \"if spot generating pattern moves in the clockwise direction\"\n", + "Y1 = 0;\n", + "Y2 = 5;\n", + "PA = math.asin(Y1/Y2);\n", + "print \"phase angle (degree)\", PA\n", + "Y1 = 2.5;\n", + "Y2 = 5;\n", + "PA = math.asin(Y1/Y2);\n", + "print \"phase angle (degree)\", PA\n", + "Y1 = 3.5;\n", + "Y2 = 5;\n", + "PA = math.asin(Y1/Y2);\n", + "print \"phase angle (degree)\", PA\n", + "Y1 = 2.5;\n", + "Y2 = 5;\n", + "PA = 180-(math.asin(Y1/Y2));\n", + "print \"phase angle (degree)\", PA\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "if spot generating pattern moves in the clockwise direction\n", + "phase angle (degree) 0.0\n", + "phase angle (degree) 0.523598775598\n", + "phase angle (degree) 0.775397496611\n", + "phase angle (degree) 179.476401224\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch8.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch8.ipynb new file mode 100755 index 00000000..a31428ca --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch8.ipynb @@ -0,0 +1,338 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:94ad83571615597b6a84f943391994f2595055abbe147d494a554f5f30f9f17e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Metrology" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations and Results\n", + "Dd = 52.215;\n", + "print \"desired value = \", Dd\n", + "Pb = 4;\n", + "print \"Protected block = \", Pb\n", + "R = Dd-Pb;\n", + "print \"Reminder = \", R\n", + "Tp = 1.005;\n", + "print \"thousand block = \", Tp\n", + "R = R-Tp;\n", + "print \"Reminder = \", R\n", + "Hp = 1.010;\n", + "print \"Hunderths block = \", Hp\n", + "R = R-Hp;\n", + "print \"Reminder = \", R\n", + "Ttp = 2.20;\n", + "print \"tenths block = \", Ttp\n", + "R = R-Ttp;\n", + "print \"Reminder = \", R\n", + "Up = 4;\n", + "print \"unit block = \", Up\n", + "R = R-Up;\n", + "print \"Reminder = \", R\n", + "Tp = 40;\n", + "print \"Tens block = \", Tp\n", + "R = R-Tp;\n", + "print \"Reminder = \", R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "desired value = 52.215\n", + "Protected block = 4\n", + "Reminder = 48.215\n", + "thousand block = 1.005\n", + "Reminder = 47.21\n", + "Hunderths block = 1.01\n", + "Reminder = 46.2\n", + "tenths block = 2.2\n", + "Reminder = 44.0\n", + "unit block = 4\n", + "Reminder = 40.0\n", + "Tens block = 40\n", + "Reminder = 0.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ps = 200.*10**3;\n", + "r = 0.6;\n", + "d2 = 0.5;\n", + "d1 = 0.5;\n", + "\n", + "# Calculations and Results\n", + "a = (d2/d1**2);\n", + "x1 = (1.1-r)/(2*a);\n", + "print \"x1 = \", x1\n", + "r = 0.8;\n", + "d2 = 0.5;\n", + "d1 = 0.5;\n", + "a = (d2/d1**2);\n", + "x2 = (1.1-r)/(2*a);\n", + "print \"x2 = \", x2\n", + "x = x1-x2;\n", + "print \"so the range is x (mm)\", x\n", + "hS = math.pi*d2*10**-3;\n", + "A2 = math.pi*d2*10**-6*(x1+x2)/2;\n", + "pS = -0.4*Ps/A2;\n", + "pgS = 25*10**-3/1000;\n", + "S = hS*pS*pgS;\n", + "print \"sensitivity = \", S\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x1 = 0.125\n", + "x2 = 0.075\n", + "so the range is x (mm) 0.05\n", + "sensitivity = -20000.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pi = 70.*10**3;\n", + "r = 0.4;\n", + "d2 = 1.6;\n", + "d1 = 0.75;\n", + "\n", + "# Calculations and Results\n", + "a = (d2/d1**2);\n", + "x1 = (1.1-r)/(2*a);\n", + "print \"x1 = \", x1\n", + "r = 0.9;\n", + "x2 = (1.1-r)/(2*a);\n", + "print \"x2 = \", x2\n", + "x = x1-x2;\n", + "print \"so the range is x (mm)\", x\n", + "d = -2*a;\n", + "Wr = 12.5/Pi;\n", + "Wx = Wr/d;\n", + "print \"uncertainity in lacement (mm)\",Wx\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x1 = 0.123046875\n", + "x2 = 0.03515625\n", + "so the range is x (mm) 0.087890625\n", + "uncertainity in lacement (mm) -3.13895089286e-05\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N = 12.;\n", + "lem = 0.644;\n", + "\n", + "# Calculations\n", + "d = N*lem/2;\n", + "\n", + "# Results\n", + "print \"difference between height of workpieces and pile of slip gauges (micro-meter)\", d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "difference between height of workpieces and pile of slip gauges (micro-meter) 3.864\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N = 5.;\n", + "lem = 546.*10**-9;\n", + "\n", + "# Calculations and Results\n", + "d = ((2*N-1)*lem*10**6)/4;\n", + "print \"seperation distance between two surfaces(micro-meter)\", d\n", + "x = 75;\n", + "th = math.atan(d/x);\n", + "print \"angle of tilt\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "seperation distance between two surfaces(micro-meter) 1.2285\n", + "angle of tilt 0.0163785352938\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No : 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "x = 20./12;\n", + "L = 50-10;\n", + "lem = 0.6;\n", + "\n", + "# Calculations\n", + "d = (L*lem)/(2*x);\n", + "\n", + "# Results\n", + "print \"difference in diameters of the rollers(micro-meter)\", d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "difference in diameters of the rollers(micro-meter) 7.2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No : 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "d = 4.5-2.5;\n", + "\n", + "# Calculations\n", + "Tg = 2*(0.5)*0.509;\n", + "\n", + "# Results\n", + "print \"change in thickness along its length(micro-meter)\", Tg\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in thickness along its length(micro-meter) 0.509\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch9.ipynb b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch9.ipynb new file mode 100755 index 00000000..0bd1bdf2 --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/ch9.ipynb @@ -0,0 +1,863 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d5da213085937afdb48d7dfa573f842c4dd8a61f494a1ba421365a0cebd5fe2e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Pressure Measurements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T = 273+20;\n", + "P = 101.3*10**3;\n", + "\n", + "# Calculations and Results\n", + "mfp = 22.7*10**-6*T/P;\n", + "print \"length of mean free path when pressure is one atmospheric pressure(m)\", mfp\n", + "P = 133;\n", + "mfp = 22.7*10**-6*T/P;\n", + "print \"length of mean free path when pressure is one torr(m)\", mfp\n", + "P = 133*10**-3;\n", + "mfp = 22.7*10**-6*T/P;\n", + "print \"length of mean free path when pressure is one micrometer of Hg(m)\", mfp\n", + "P = 249.1;\n", + "mfp = 22.7*10**-6*T/P;\n", + "print \"length of mean free path when pressure is one inch of water(m)\", mfp\n", + "P = 133*10**-6;\n", + "mfp = 22.7*10**-6*T/P;\n", + "print \"length of mean free path when pressure is 10**-3 micrometer of Hg(m)\", mfp\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length of mean free path when pressure is one atmospheric pressure(m) 6.56574531096e-08\n", + "length of mean free path when pressure is one torr(m) 5.00082706767e-05\n", + "length of mean free path when pressure is one micrometer of Hg(m) 0.0500082706767\n", + "length of mean free path when pressure is one inch of water(m) 2.67005218788e-05\n", + "length of mean free path when pressure is 10**-3 micrometer of Hg(m) 50.0082706767\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T = 273.+25;\n", + "P = 99.22*10**3;\n", + "R = 288.;\n", + "df = P/(R*T);\n", + "dm = 0.82*996;\n", + "g = 9.81;\n", + "h = 200*10**-6;\n", + "\n", + "# Calculations\n", + "P1 = g*h*(dm-df)*10**3;\n", + "Pa = P+P1;\n", + "\n", + "# Results\n", + "print \"Pressure of air source(N/m2)\", Pa\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure of air source(N/m2) 100820.136398\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "df = 1.*10**3;\n", + "dm = 13.56*10**3;\n", + "g = 9.81;\n", + "h = 130.*10**-3;\n", + "\n", + "# Calculations\n", + "P = g*h*(dm-df);\n", + "Ph = P/9.81;\n", + "\n", + "# Results\n", + "print \"Pressure head(mm of water)\", Ph\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure head(mm of water) 1632.8\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "hn = 250.;\n", + "d = 5.;\n", + "D = 25.;\n", + "\n", + "# Calculations\n", + "h = hn*(1+(d/D)**2);\n", + "\n", + "# Results\n", + "print \"height\", h\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "height 260.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "P = 8.*133;\n", + "h = P/(800*9.81);\n", + "d = 2.;\n", + "D = 50.;\n", + "\n", + "# Calculations\n", + "hn = h/(1+(d/D)**2);\n", + "e = (hn-h)/h*100;\n", + "eP = 0.8*1000*9.81*(hn-h);\n", + "\n", + "# Results\n", + "print \"error interms of pressure(N/m2)\", eP\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "error interms of pressure(N/m2) -1.69968051118\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "P = 133.;\n", + "g = 9.81;\n", + "dm = 13.56*10**3;\n", + "R = 10.**-3;\n", + "d = 4.;\n", + "D = 20.;\n", + "\n", + "# Calculations\n", + "th = math.asin(P/(g*dm*R*(1+(d/D)**2)));\n", + "thV = 90-th;\n", + "\n", + "# Results\n", + "print \"angle to which tube is incliend to vertical(degree)\", thV\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angle to which tube is incliend to vertical(degree) 88.708070889\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8 Page No : 395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "# Variables\n", + "P = 9.81;\n", + "g = 9.81;\n", + "dm = 0.864*10**3;\n", + "R = 4.*10**-3;\n", + "d = 2.;\n", + "D = 20.;\n", + "\n", + "# Calculations\n", + "th = math.asin(P/(g*dm*R*(1+(d/D)**2)));\n", + "\n", + "# Results\n", + "print \"angle to which tube is incliend to horizontal(degree)\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angle to which tube is incliend to horizontal(degree) 0.290558105825\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page No : 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 500.*9.81;\n", + "g = 9.81;\n", + "d = 8.;\n", + "a = (math.pi/4)*d**2;\n", + "A = 1200.;\n", + "\n", + "# Calculations and Results\n", + "dm = 0.8*10**3;\n", + "hn = P/(g*dm*(1+(a/A)));\n", + "print \"Length of scale(m)\", hn\n", + "R = 0.6;\n", + "P1 = 50*9.81;\n", + "th = math.asin(P1/(g*dm*R*(1+(a/A))));\n", + "print \"angle to which tube is incliend to horizontal(degree)\", th\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of scale(m) 0.599872595479\n", + "angle to which tube is incliend to horizontal(degree) 0.100146080124\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page No : 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 100.*10**3;\n", + "g = 9.81;\n", + "di = 10.*10**-3;\n", + "D = 40.*10**-3;\n", + "\n", + "# Calculations\n", + "A = (math.pi/4)*D**2;\n", + "dm = 13.6*10**3;\n", + "a = A/(P/(dm*g*di)-1);\n", + "d = (4*a/math.pi)**0.5*10**3;\n", + "\n", + "# Results\n", + "print \"diameter of the tube(mm)\", d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of the tube(mm) 4.65136628261\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 Page No : 401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Calculations and Results\n", + "AR = 1./(0.83-0.8);\n", + "print \"Amplification ratio\", AR\n", + "D = 50.*10**-3;\n", + "A = (math.pi/4)*D**2;\n", + "d = 6.*10**-3;\n", + "a = (math.pi/4)*d**2;\n", + "PR = (a/A)*100;\n", + "print \"percentage error\", PR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplification ratio 33.3333333333\n", + "percentage error 1.44\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12 Page No : 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 981;\n", + "g = 9.81;\n", + "d = 500.*10**-3;\n", + "\n", + "# Calculations\n", + "A = (math.pi/4)*(10*10**-3)**2;\n", + "R = 275*10**-3;\n", + "th = 30;\n", + "W = A*d*P/(2*g*R*math.sin(math.radians(th)));\n", + "\n", + "# Results\n", + "print \"value of counter weight required(kg)\", W\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of counter weight required(kg) 0.0142799666072\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13 Page No : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Mp1 = 20./40;\n", + "Mp2 = 10./40;\n", + "Mp3 = 5./40;\n", + "\n", + "# Calculations and Results\n", + "Eta = 0.225;\n", + "print \"damping factor\", Eta\n", + "Td = 1.2;\n", + "wd = 2*math.pi/Td;\n", + "wn = wd/((1-Eta**2)**0.5);\n", + "tc = 1/wn;\n", + "print \"time constant(s)\", tc\n", + "ess = 2*Eta/wn;\n", + "ess5 = 5*ess;\n", + "print \"error for 5mm/s ramp(mm)\", ess5\n", + "Tlag = 2*Eta*tc;\n", + "print \"time lag(s)\", Tlag\n", + "Eta1 = Eta*(0.5)**0.5;\n", + "print \"New damping factor\", Eta1\n", + "Td = 1.2;\n", + "wn1 = wn*(0.5)**0.5;\n", + "print \"New natural frequency(rad/s)\", wn1\n", + "tc1 = 1/wn;\n", + "print \"New time constant(s)\", tc1\n", + "ess51 = ess5;\n", + "print \"new error for 5mm/s ramp(mm)\", ess51\n", + "Tlag1 = Tlag;\n", + "print \"new time lag(s)\", Tlag1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "damping factor 0.225\n", + "time constant(s) 0.186088816266\n", + "error for 5mm/s ramp(mm) 0.418699836599\n", + "time lag(s) 0.0837399673198\n", + "New damping factor 0.159099025767\n", + "New natural frequency(rad/s) 3.79983491418\n", + "New time constant(s) 0.186088816266\n", + "new error for 5mm/s ramp(mm) 0.418699836599\n", + "new time lag(s) 0.0837399673198\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.14 Page No : 407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 7.*10**6;\n", + "R = 6.25*10**-3;\n", + "v = 0.28;\n", + "E = 200.*10**9;\n", + "\n", + "# Calculations and Results\n", + "t = ((9*P*R**4*(1-v**2)/(16*E))**0.25)*10**3;\n", + "print \"thickness of diaphram(mm)\", t\n", + "ds = 7800;\n", + "fn = (2.5*t/(math.pi*R**2))*(E/(3*ds*(1-v**2)))**0.5;\n", + "print \"natural frequency(Hz)\", fn\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness of diaphram(mm) 0.407908989726\n", + "natural frequency(Hz) 25306332.7381\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.15 Page No : 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 100.*10**3;\n", + "A = 1500.*10**-6;\n", + "F = P*A;\n", + "Cs = F/3;\n", + "\n", + "# Calculations and Results\n", + "Ls = Cs+40;\n", + "print \"natural length of spring(mm)\", Ls\n", + "P1 = 10*10**3;\n", + "F1 = P1*A;\n", + "Ss = 3+2*.5;\n", + "D = F1/Ss;\n", + "print \"lacement (mm)\",D\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "natural length of spring(mm) 90.0\n", + "lacement (mm) 3.75\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.16 Page No : 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 200*10**3;\n", + "R = 70*10**-3;\n", + "v = 0.25;\n", + "t = 1*10**-3;\n", + "r = 60*10**-3;\n", + "E = 200*10**9;\n", + "\n", + "# Calculations\n", + "Sr = (3*P*R**2*v/(8*t**2))*((1/v+1)-(3/v+1)*(r/R)**2);\n", + "St = (3*P*R**2*v/(8*t**2))*((1/v+1)-(1/v+3)*(r/R)**2);\n", + "Sta2 = (Sr-v*St)/E;\n", + "Sta3 = (Sr-v*St)/E;\n", + "r0 = 10*10**-3;\n", + "Sr1 = (3*P*R**2*v/(8*t**2))*((1/v+1)-(3/v+1)*(r0/R)**2);\n", + "St1 = (3*P*R**2*v/(8*t**2))*((1/v+1)-(1/v+3)*(r0/R)**2);\n", + "Sta1 = (Sr1-v*St1)/E;\n", + "Sta4 = (Sr1-v*St1)/E;\n", + "Gf = 1.8;\n", + "ei = 12;\n", + "eo = (Sta1+Sta4-Sta2-Sta3)*Gf*ei/4;\n", + "\n", + "# Results\n", + "print \"output voltage (V)\", eo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage (V) 0.0398671875\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.17 Page No : 413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Aou = 700.*25*1/100;\n", + "Aol = 100.*25*1/100;\n", + "AouPtP = 2*Aou;\n", + "AolPtP = 2*Aol;\n", + "Se1 = 1.;\n", + "\n", + "# Calculations and Results\n", + "D1 = AouPtP/Se1;\n", + "print \"deflection of screen corresponding to maximum pressure for sensitivity of 1mV/mm (mm)\", D1\n", + "print \"since the length of the screen is 100mm so waveform is out of range and hence sensitivity setting of 1mV/mm should not be used\",\n", + "Se2 = 5;\n", + "D2 = AouPtP/Se2;\n", + "print \"deflection of screen corresponding to maximum pressure for sensitivity of 5mV/mm (mm)\", D2\n", + "print \"delection is within the range\",\n", + "Se3 = 20;\n", + "D3 = AouPtP/Se3;\n", + "print \"deflection of screen corresponding to maximum pressure for sensitivity of 20mV/mm (mm)\", D3\n", + "print \"delection is within the range\",\n", + "Se4 = 100;\n", + "D4 = AouPtP/Se4;\n", + "print \"deflection of screen corresponding to maximum pressure for sensitivity of 100mV/mm (mm)\", D4\n", + "print \"delection is within the range\",\n", + "Se5 = 500;\n", + "D5 = AouPtP/Se5;\n", + "print \"deflection of screen corresponding to maximum pressure for sensitivity of 500mV/mm (mm)\", D5\n", + "print \"delection is within the range\",\n", + "print \"since the sensitivity of 5mV/mm gives higher deflection so it is the optimum sensitivity\",\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "deflection of screen corresponding to maximum pressure for sensitivity of 1mV/mm (mm) 350.0\n", + "since the length of the screen is 100mm so waveform is out of range and hence sensitivity setting of 1mV/mm should not be used deflection of screen corresponding to maximum pressure for sensitivity of 5mV/mm (mm) 70.0\n", + "delection is within the range deflection of screen corresponding to maximum pressure for sensitivity of 20mV/mm (mm) 17.5\n", + "delection is within the range deflection of screen corresponding to maximum pressure for sensitivity of 100mV/mm (mm) 3.5\n", + "delection is within the range deflection of screen corresponding to maximum pressure for sensitivity of 500mV/mm (mm) 0.7\n", + "delection is within the range since the sensitivity of 5mV/mm gives higher deflection so it is the optimum sensitivity\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.18 Page No : 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "dP = (7000*10**3)-(100*10**3);\n", + "b = 25*10**-12;\n", + "R1 = 100;\n", + "dR = R1*b*dP;\n", + "ei = 5.;\n", + "\n", + "# Calculations\n", + "deo = dR*ei/(4*R1)\n", + "\n", + "# Results\n", + "print \"output voltage of bridge(V)\", deo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage of bridge(V) 0.000215625\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.19 Page No : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "T = 273+20;\n", + "P = 101.3*10**3;\n", + "R = 287;\n", + "de = P/(R*T);\n", + "C = 20.04*T**0.5;\n", + "r = 6.25*10**-3;\n", + "L = 0.6;\n", + "\n", + "# Calculations\n", + "V = math.pi*((12.5*10**-3)**2)*(12.5*10**-3);\n", + "wn = C*r*(math.pi/(V*(L+0.5*math.pi*r)))**0.5;\n", + "fn = wn/(2*math.pi);\n", + "f = 1000;\n", + "u = f/fn;\n", + "mu = 19.1*10**-6;\n", + "eta = (2*mu/(de*C*r**3))*(3*L*V/math.pi)**0.5;\n", + "M = 1/(((1-u**2)**2)+((2*eta*u)**2))**0.5;\n", + "M = M*100;\n", + "\n", + "# Results\n", + "print \"attenuation = \", M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "attenuation = 10.834485951\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.20 Page No : 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "d = 1;\n", + "At = (math.pi*d**2)*10**-6/4;\n", + "V = 100*10**-6;\n", + "h = 30*10**-3;\n", + "\n", + "# Calculations\n", + "P1 = (At*h**2)/V;\n", + "P2 = (At*h**2)/(V-At*h);\n", + "e = P2-P1;\n", + "\n", + "# Results\n", + "print \"error = \", e\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "error = 1.66588825836e-09\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch2.png b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch2.png Binary files differnew file mode 100755 index 00000000..67bbe82f --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch2.png diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch5.png b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch5.png Binary files differnew file mode 100755 index 00000000..1b8ef69f --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch5.png diff --git a/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch7.png b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch7.png Binary files differnew file mode 100755 index 00000000..a08f3f3f --- /dev/null +++ b/A_Course_In_Mechanical_Measurements_And_Instrumentation_by_A._K._Sawhney_And_P._Sawhney/screenshots/ch7.png diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/README.txt b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/README.txt new file mode 100755 index 00000000..54bee6ce --- /dev/null +++ b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/README.txt @@ -0,0 +1,10 @@ +Contributed By: Jai Mathur +Course: mca +College/Institute/Organization: IIT +Department/Designation: System Admin +Book Title: A Textbook of Electrical and Electronics Engineering Materials +Author: P. l. Kapoor +Publisher: Khanna Publishers, New Delhi +Year of publication: 2010 +Isbn: 81-7409-131-9 +Edition: 8
\ No newline at end of file diff --git a/Advance_Semiconductor_Devices/ChapterNo1.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb index 4d1dc38d..4d1dc38d 100755 --- a/Advance_Semiconductor_Devices/ChapterNo1.ipynb +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb diff --git a/Advance_Semiconductor_Devices/ChapterNo2.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo2.ipynb index 9bc8cffb..9bc8cffb 100755 --- a/Advance_Semiconductor_Devices/ChapterNo2.ipynb +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo2.ipynb diff --git a/Advance_Semiconductor_Devices/ChapterNo3.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo3.ipynb index bc717890..bc717890 100755 --- a/Advance_Semiconductor_Devices/ChapterNo3.ipynb +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo3.ipynb diff --git a/Advance_Semiconductor_Devices/ChapterNo4.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo4.ipynb index e76421ad..e76421ad 100755 --- a/Advance_Semiconductor_Devices/ChapterNo4.ipynb +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo4.ipynb diff --git a/Advance_Semiconductor_Devices/ChapterNo6.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo6.ipynb index 44239148..44239148 100755 --- a/Advance_Semiconductor_Devices/ChapterNo6.ipynb +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo6.ipynb diff --git a/Advance_Semiconductor_Devices/ChapterNo7.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo7.ipynb index 431c4340..431c4340 100755 --- a/Advance_Semiconductor_Devices/ChapterNo7.ipynb +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo7.ipynb diff --git a/Advance_Semiconductor_Devices/ChapterNo8.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo8.ipynb index 47137bb2..47137bb2 100755 --- a/Advance_Semiconductor_Devices/ChapterNo8.ipynb +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo8.ipynb diff --git a/Advance_Semiconductor_Devices/ChapterNo9.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo9.ipynb index d2b16e2d..d2b16e2d 100755 --- a/Advance_Semiconductor_Devices/ChapterNo9.ipynb +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo9.ipynb diff --git a/Advance_Semiconductor_Devices/README.txt b/Advance_Semiconductor_Devices_by_S._Sharma/README.txt index eec99ae9..eec99ae9 100755 --- a/Advance_Semiconductor_Devices/README.txt +++ b/Advance_Semiconductor_Devices_by_S._Sharma/README.txt diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter1.png Binary files differindex 510483a4..510483a4 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter1.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter1.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter3.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter3.png Binary files differindex 2409666c..2409666c 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter3.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter3.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter7.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter7.png Binary files differindex 1f5c8c08..1f5c8c08 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter7.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter7.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1.png Binary files differindex 63da4ae4..63da4ae4 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_1.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_1_1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_1.png Binary files differindex 61672f6e..61672f6e 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_1_1.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_1.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_1_2.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_2.png Binary files differindex 61672f6e..61672f6e 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_1_2.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_1_2.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_2.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2.png Binary files differindex 882e620f..882e620f 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_2.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_2_1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_1.png Binary files differindex 61ce28c6..61ce28c6 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_2_1.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_1.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_2_2.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_2.png Binary files differindex 61ce28c6..61ce28c6 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_2_2.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_2_2.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_3.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3.png Binary files differindex c132e867..c132e867 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_3.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_3_1.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_1.png Binary files differindex 93ff3b44..93ff3b44 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_3_1.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_1.png diff --git a/Advance_Semiconductor_Devices/screenshots/Chapter_3_2.png b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_2.png Binary files differindex 93ff3b44..93ff3b44 100755 --- a/Advance_Semiconductor_Devices/screenshots/Chapter_3_2.png +++ b/Advance_Semiconductor_Devices_by_S._Sharma/screenshots/Chapter_3_2.png diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/1.png b/Aircraft_Structures_for_Engineering_Students/screenshots/1.png Binary files differdeleted file mode 100755 index 5a7eb163..00000000 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/1.png +++ /dev/null diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/2.png b/Aircraft_Structures_for_Engineering_Students/screenshots/2.png Binary files differdeleted file mode 100755 index 39f6cc69..00000000 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/2.png +++ /dev/null diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/3.png b/Aircraft_Structures_for_Engineering_Students/screenshots/3.png Binary files differdeleted file mode 100755 index ea04181a..00000000 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/3.png +++ /dev/null diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/a_1.png b/Aircraft_Structures_for_Engineering_Students/screenshots/a_1.png Binary files differdeleted file mode 100755 index 7aa51791..00000000 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/a_1.png +++ /dev/null diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/b_1.png b/Aircraft_Structures_for_Engineering_Students/screenshots/b_1.png Binary files differdeleted file mode 100755 index 0f230abf..00000000 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/b_1.png +++ /dev/null diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/c_1.png b/Aircraft_Structures_for_Engineering_Students/screenshots/c_1.png Binary files differdeleted file mode 100755 index ae3f4f00..00000000 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/c_1.png +++ /dev/null diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter01.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter01.ipynb index 7760d8e3..7760d8e3 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter01.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter01.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter04.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter04.ipynb index 365fa5fb..365fa5fb 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter04.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter04.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter05.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter05.ipynb index 80ef0fbb..80ef0fbb 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter05.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter05.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter06.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter06.ipynb index 5195a30b..5195a30b 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter06.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter06.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter08.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter08.ipynb index 65ccbf76..65ccbf76 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter08.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter08.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter09.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter09.ipynb index 119bd5b2..119bd5b2 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter09.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter09.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter12.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter12.ipynb index 63daef6d..63daef6d 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter12.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter12.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter14.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter14.ipynb index f9eb3f9d..f9eb3f9d 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter14.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter14.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter15.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter15.ipynb index a849c8c6..a849c8c6 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter15.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter15.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter16.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter16.ipynb index 72ff7ec3..72ff7ec3 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter16.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter16.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter18.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter18.ipynb index b0550214..b0550214 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter18.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter18.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter19.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter19.ipynb index c6a6c12b..c6a6c12b 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter19.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter19.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter20.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter20.ipynb index 4595d055..4595d055 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter20.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter20.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter21.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter21.ipynb index 1195a6a9..1195a6a9 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter21.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter21.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter22.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter22.ipynb index 15f86e3c..15f86e3c 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter22.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter22.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter23.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter23.ipynb index a5e90903..a5e90903 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter23.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter23.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter24.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter24.ipynb index b305a12a..b305a12a 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter24.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter24.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter25.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter25.ipynb index 369a648f..369a648f 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter25.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter25.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter26.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter26.ipynb index 994182d0..994182d0 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter26.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter26.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/Chapter27.ipynb b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter27.ipynb index bf9485c9..bf9485c9 100755 --- a/Aircraft_Structures_for_Engineering_Students/Chapter27.ipynb +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/Chapter27.ipynb diff --git a/Aircraft_Structures_for_Engineering_Students/README.txt b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/README.txt index 230418be..230418be 100755 --- a/Aircraft_Structures_for_Engineering_Students/README.txt +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/README.txt diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/a.png b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/a.png Binary files differindex 7aa51791..7aa51791 100755 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/a.png +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/a.png diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/b.png b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/b.png Binary files differindex 0f230abf..0f230abf 100755 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/b.png +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/b.png diff --git a/Aircraft_Structures_for_Engineering_Students/screenshots/c.png b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/c.png Binary files differindex ae3f4f00..ae3f4f00 100755 --- a/Aircraft_Structures_for_Engineering_Students/screenshots/c.png +++ b/Aircraft_Structures_for_Engineering_Students_by_T_H_G_Megson/screenshots/c.png diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb index 4a493638..4a493638 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb index 44480b54..44480b54 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb index b929e40c..b929e40c 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb index 4c444f56..4c444f56 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb index 5f93df8e..5f93df8e 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb index b50fdfd2..b50fdfd2 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb index deb1f097..deb1f097 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb index bae4f285..bae4f285 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb index 7a540883..7a540883 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb index 11fd1fca..11fd1fca 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb index d91cdb4d..d91cdb4d 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb index 25e3990d..25e3990d 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb index 8cac638d..8cac638d 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb index 17f510de..17f510de 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb index 7bfe08a4..7bfe08a4 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb index d07fb6df..d07fb6df 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb index 922d0030..922d0030 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png Binary files differindex b965bd13..b965bd13 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png Binary files differindex dfa9a8f3..dfa9a8f3 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png diff --git a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png Binary files differindex 6ad3b6c4..6ad3b6c4 100644..100755 --- a/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper01.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper01.ipynb index d7194670..d7194670 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper01.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper01.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper02.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper02.ipynb index 91b1146e..91b1146e 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper02.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper02.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper03.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper03.ipynb index 93af7d63..93af7d63 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper03.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper03.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper04.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper04.ipynb index df79509a..df79509a 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper04.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper04.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb index 3dccad74..3dccad74 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb index 9e3c7e2e..9e3c7e2e 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb index 5d533560..5d533560 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb index f81cf886..f81cf886 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb index 863e14a7..863e14a7 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png Binary files differindex c7893e00..c7893e00 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png Binary files differindex 101a5c15..101a5c15 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png Binary files differindex 03b1cdb0..03b1cdb0 100644..100755 --- a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb index b8295615..b8295615 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb index 7eaf93ee..7eaf93ee 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter11.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter11.ipynb index d4c2c36c..d4c2c36c 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter11.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter11.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter12.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter12.ipynb index 794bdecd..794bdecd 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter12.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter12.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter13.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter13.ipynb index 0e837c9f..0e837c9f 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter13.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter13.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter14.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter14.ipynb index 1b3a9c64..1b3a9c64 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter14.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter14.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter15.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter15.ipynb index 9281ffe2..9281ffe2 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter15.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter15.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter3.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter3.ipynb index 79b1eca0..79b1eca0 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter3.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter3.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter4.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter4.ipynb index d64c52dd..d64c52dd 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter4.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter4.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter6.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter6.ipynb index 0debea51..0debea51 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter6.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter6.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter7.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter7.ipynb index 38d43a85..38d43a85 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter7.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter7.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb index 8916d228..8916d228 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb index fa219e98..fa219e98 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png Binary files differindex 7cc2a53b..7cc2a53b 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png +++ b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png Binary files differindex a6b73083..a6b73083 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png +++ b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png Binary files differindex 73fe7580..73fe7580 100644..100755 --- a/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png +++ b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt b/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt index 62f55e2a..62f55e2a 100644..100755 --- a/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt diff --git a/Applied_Physics-II/chapter1.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb index c4b1a860..c4b1a860 100755 --- a/Applied_Physics-II/chapter1.ipynb +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter1.ipynb diff --git a/Applied_Physics-II/chapter2.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter2.ipynb index 6af9170f..6af9170f 100755 --- a/Applied_Physics-II/chapter2.ipynb +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter2.ipynb diff --git a/Applied_Physics-II/chapter3.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter3.ipynb index 714dfad3..714dfad3 100755 --- a/Applied_Physics-II/chapter3.ipynb +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter3.ipynb diff --git a/Applied_Physics-II/chapter4.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter4.ipynb index 11b66b2f..11b66b2f 100755 --- a/Applied_Physics-II/chapter4.ipynb +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter4.ipynb diff --git a/Applied_Physics-II/chapter5.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter5.ipynb index e9d81103..e9d81103 100755 --- a/Applied_Physics-II/chapter5.ipynb +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter5.ipynb diff --git a/Applied_Physics-II/chapter6.ipynb b/Applied_Physics-II_by_I_A_Shaikh/chapter6.ipynb index dec8353e..dec8353e 100755 --- a/Applied_Physics-II/chapter6.ipynb +++ b/Applied_Physics-II_by_I_A_Shaikh/chapter6.ipynb diff --git a/Applied_Physics-II/screenshots/Ex2_2.png b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2.png Binary files differindex 1d450952..1d450952 100755 --- a/Applied_Physics-II/screenshots/Ex2_2.png +++ b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2.png diff --git a/Applied_Physics-II/screenshots/Ex2_2_1.png b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_1.png Binary files differindex 1d450952..1d450952 100755 --- a/Applied_Physics-II/screenshots/Ex2_2_1.png +++ b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_1.png diff --git a/Applied_Physics-II/screenshots/Ex2_2_2.png b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_2.png Binary files differindex 1d450952..1d450952 100755 --- a/Applied_Physics-II/screenshots/Ex2_2_2.png +++ b/Applied_Physics-II_by_I_A_Shaikh/screenshots/Ex2_2_2.png diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb index 7111a9da..7111a9da 100644..100755 --- a/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb index ded2d042..ded2d042 100644..100755 --- a/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb diff --git a/Applied_Physics-I_by_I_A_Shaikh/README.txt b/Applied_Physics-I_by_I_A_Shaikh/README.txt index 525c6847..525c6847 100644..100755 --- a/Applied_Physics-I_by_I_A_Shaikh/README.txt +++ b/Applied_Physics-I_by_I_A_Shaikh/README.txt diff --git a/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb b/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb index b2a76d3e..b2a76d3e 100644..100755 --- a/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb +++ b/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb diff --git a/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb index 17fcfe26..17fcfe26 100644..100755 --- a/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb +++ b/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb diff --git a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png Binary files differindex c1b1d679..c1b1d679 100644..100755 --- a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png +++ b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png diff --git a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png Binary files differindex 7c472fe2..7c472fe2 100644..100755 --- a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png +++ b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png diff --git a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png Binary files differindex a7775a6b..a7775a6b 100644..100755 --- a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png +++ b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png diff --git a/Applied_Physics/Chapter_01_Bonding_in_Solids_.ipynb b/Applied_Physics/Chapter_01_Bonding_in_Solids_.ipynb deleted file mode 100755 index e7e0fc16..00000000 --- a/Applied_Physics/Chapter_01_Bonding_in_Solids_.ipynb +++ /dev/null @@ -1,248 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:7b7dfd33b7ab2e69421d0f26bfbfaa20f35bc1084164b445bbbc400215113c08"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 1:Bonding in Solids"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 1.3 , Page no:15"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#given\n",
- "r=2; #in angstrom(distance)\n",
- "e=1.6E-19; # in C (charge of electron)\n",
- "E_o= 8.85E-12;# absolute premittivity\n",
- "\n",
- "#calculate\n",
- "r=2*1*10**-10; # since r is in angstrom\n",
- "V=-e**2/(4*3.14*E_o*r); # calculate potential\n",
- "V1=V/e; # changing to eV\n",
- "\n",
- "#result\n",
- "print \"\\nThe potential energy is V = \",V,\"J\";\n",
- "print \"In electron-Volt V = \",round(V1,3),\"eV\"; \n",
- "print \"Note: the answer in the book is wrong due to calculation mistake\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "The potential energy is V = -1.15153477995e-18 J\n",
- "In electron-Volt V = -7.197 eV\n",
- "Note: the answer in the book is wrong due to calculation mistake\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 1.4 , Page no:15"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "#given\n",
- "r0=0.236; #in nanometer(interionic distance)\n",
- "e=1.6E-19; # in C (charge of electron)\n",
- "E_o= 8.85E-12;# absolute premittivity\n",
- "N=8; # Born constant\n",
- "IE=5.14;# in eV (ionisation energy of sodium)\n",
- "EA=3.65;# in eV (electron affinity of Chlorine)\n",
- "pi=3.14; # value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "r0=r0*1E-9; # since r is in nanometer\n",
- "PE=(e**2/(4*pi*E_o*r0))*(1-1/N); # calculate potential energy\n",
- "PE=PE/e; #changing unit from J to eV\n",
- "NE=IE-EA;# calculation of Net energy\n",
- "BE=PE-NE;# calculation of Bond Energy\n",
- "\n",
- "#result\n",
- "print\"The potential energy is PE= \",round(PE,2),\"eV\";\n",
- "print\"The net energy is NE= \",round(NE,2),\"eV\";\n",
- "print\"The bond energy is BE= \",round(BE,2),\"eV\";\n",
- "# Note: (1)-In order to make the answer prcatically feasible and avoid the unusual answer, I have used r_0=0.236 nm instead of 236 nm. because using this value will give very much irrelevant answer.\n",
- "# Note: (2) There is slight variation in the answer due to round off."
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The potential energy is PE= 5.34 eV\n",
- "The net energy is NE= 1.49 eV\n",
- "The bond energy is BE= 3.85 eV\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 1.5 , Page no:16"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#given\n",
- "r_0=.41; #in mm(lattice constant)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "E_o= 8.85E-12; #absolute premittivity\n",
- "n=0.5; #repulsive exponent value\n",
- "alpha=1.76; #Madelung constant\n",
- "pi=3.14; # value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "r=.41*1E-3; #since r is in mm\n",
- "Beta=72*pi*E_o*r**4/(alpha*e**2*(n-1)); #calculation compressibility\n",
- "\n",
- "#result\n",
- "print\"The compressibility is\tBeta=\",round(Beta);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The compressibility is\tBeta= -2.50967916144e+15\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 1.6 , Page no:16"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#given\n",
- "r_0=3.56; #in Angstrom\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "IE=3.89; #in eV (ionisation energy of Cs)\n",
- "EA=-3.61; #in eV (electron affinity of Cl)\n",
- "n=10.5; #Born constant\n",
- "E_o= 8.85E-12; #absolute premittivity\n",
- "alpha=1.763; #Madelung constant\n",
- "pi=3.14; #value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "r_0=r_0*1E-10; #since r is in nanometer\n",
- "U=-alpha*(e**2/(4*pi*E_o*r_0))*(1-1/n); #calculate potential energy\n",
- "U=U/e; #changing unit from J to eV\n",
- "ACE=U+EA+IE; #calculation of atomic cohesive energy\n",
- "\n",
- "#result\n",
- "print\"The ionic cohesive energy is \",round(U),\"eV\";\n",
- "print\"The atomic cohesive energy is\",round(ACE),\"eV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The ionic cohesive energy is -6.0 eV\n",
- "The atomic cohesive energy is -6.0 eV\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 1.7 , Page no:17"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#given\n",
- "r_0=2.81; #in Angstrom\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "n=9; #Born constant\n",
- "E_o= 8.85E-12; #absolute premittivity\n",
- "alpha=1.748; #Madelung constant\n",
- "pi=3.14; #value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "r_0=r_0*1E-10; #since r is in nanometer\n",
- "V=-alpha*(e**2/(4*pi*E_o*r_0))*(1-1/n); #calculate potential energy\n",
- "V=V/e; #changing unit from J to eV\n",
- "V_1=V/2; #Since only half of the energy contribute per ion to the cohecive energy therfore\n",
- "\n",
- "#result\n",
- "print\"The potential energy is V=\",round(V,2),\"eV\";\n",
- "print\"The energy contributing per ions to the cohesive energy is \",round(V_1,2),\"eV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The potential energy is V= -7.96 eV\n",
- "The energy contributing per ions to the cohesive energy is -3.98 eV\n"
- ]
- }
- ],
- "prompt_number": 5
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_02_Crystal_Structure.ipynb b/Applied_Physics/Chapter_02_Crystal_Structure.ipynb deleted file mode 100755 index 2d0b7a14..00000000 --- a/Applied_Physics/Chapter_02_Crystal_Structure.ipynb +++ /dev/null @@ -1,291 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:f14517ab3de72640bce8c38f7d46947caa54ae7067bb37477a81849b7b917982"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 2:Crystal Structure"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.1 , Page no:40"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#given\n",
- "N=6.02*10**26; #in /Kg-molecule (Avogadro's number)\n",
- "n=4; #number of molecules per unit cell ofr NaCl\n",
- "M=58.5; #in Kg/Kg-molecule (molecular weight of NaCl)\n",
- "p=2189; #in Kg/m^3 (density)\n",
- "\n",
- "#calculate\n",
- "a=pow(((n*M)/(N*p)),0.3333333);\n",
- "a1=a*10**10; #changing unit to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The lattice constant is a=\",a,\"m\";\n",
- "print\"\\t\\t\\ta=\",a1,\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The lattice constant is a= 5.62072226997e-10 m\n",
- "\t\t\ta= 5.62072226997 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.2 , Page no:41"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "N=6.02*10**23; #in /gram-atom (Avogadro's number)\n",
- "n=4; #number of atom per unit cell for fcc structure\n",
- "M=63.5; #in gram/gram-atom (atomic weight of Cu)\n",
- "p=8.96; #in g/cm^3 (density)\n",
- "\n",
- "#calculate\n",
- "a=pow((n*M/(N*p)),0.3333333);\n",
- "a=a*1E8; #changing unit from cm to Angstrom\n",
- "d=a/math.sqrt(2); #distance infcc lattice\n",
- "\n",
- "#result\n",
- "print\"lattice constant is a=\",a,\"E-08 cm\";\n",
- "print\"\\t\\t a=\",round(a,4),\"Angstrom\";\n",
- "print\"distance between two nearest Cu atoms is d=\",round(d,2),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "lattice constant is a= 3.61113576149 E-08 cm\n",
- "\t\t a= 3.6111 Angstrom\n",
- "distance between two nearest Cu atoms is d= 2.55 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.3 , Page no:41"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "N=6.02E26; #in /Kg-atom (Avogadro's number)\n",
- "n=2; #number of molecules per unit cell for bcc lattice\n",
- "M=55.85; #in Kg/Kg-atom (atomic weight of Iron)\n",
- "p=7860; #in Kg/m^3 (density)\n",
- "\n",
- "#calculate\n",
- "a=pow((n*M/(N*p)),0.33333);\n",
- "a1=a*1E10; #changing unit to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The lattice constant is a=\",a,\"m\";\n",
- "print\"\\t\\t\\ta=\",round(a1,3),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The lattice constant is a= 2.86928355016e-10 m\n",
- "\t\t\ta= 2.869 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.4 , Page no:42"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "N=6.02*10**26; #in /Kg-atom (Avogadro's number)\n",
- "n=2; #number of molecules per unit cell for bcc lattice\n",
- "M=6.94; #in Kg/Kg-atom (atomic weight of Iron)\n",
- "p=530; #in Kg/m^3 (density)\n",
- "\n",
- "#calculate\n",
- "a=pow((n*M/(N*p)),0.33333);\n",
- "a1=a*1E10; #changing unit to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The lattice constant is a=\",a,\"m\";\n",
- "print\"\\t\\t\\ta=\",round(a1,3),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The lattice constant is a= 3.51776567326e-10 m\n",
- "\t\t\ta= 3.518 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.5 , Page no:42"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "N=6.02*10**23; #in /gram-molecule (Avogadro's number)\n",
- "M=58.5; #in gram/gram-molecule (atomic weight of NaCl)\n",
- "p=2.17; #in g/cm^3 (density)\n",
- "\n",
- "#calculate\n",
- "#since V=M/p\n",
- "#(1/d)^-3=2N/V=2Np/M\n",
- "#therefore d= (M/2Np)^-3\n",
- "d=pow((M/(2*N*p)),0.33333333);\n",
- "d1=d*1*10**8; #changing unit from cm to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The distance between two adjacent atoms of NaCl is d=\",d,\"m\";\n",
- "print\"\\t\\t\\t\\t\\t\\t d=\",round(d1,3),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The distance between two adjacent atoms of NaCl is d= 2.81853408124e-08 m\n",
- "\t\t\t\t\t\t d= 2.819 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.6 , Page no:43"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "r_Na=0.98; #in Angstrom (radius of sodium ion)\n",
- "r_Cl=1.81; #in Angstrom (radius of chloride ion)\n",
- "M_Na=22.99; #in amu (atomic mass of sodium)\n",
- "M_Cl=35.45; #in amu (atomic mass of chlorine)\n",
- "\n",
- "#calculate\n",
- "a=2*(r_Na+r_Cl); #lattice parameter\n",
- "#PF=volume of ions present in the unit cell/volume of unit cell\n",
- "PF=((4*(4/3)*3.14)*r_Na**3+(4*(4/3)*3.14)*r_Cl**3)/a**3;\n",
- "#Density=mass of unit cell/volume of unit cell\n",
- "p=4*(M_Na+M_Cl)*1.66E-27/(a*1E-10)**3;\n",
- "p1=p*1E-3; #changing unit to gm/cm^-3\n",
- "\n",
- "#result\n",
- "print\"Lattice constant is a=\",round(a,3),\"Angstrom\";\n",
- "print\"Packing fraction is =\",round(PF,3); \n",
- "print\"Density is p=\",round(p),\"Kg/m^3\";\n",
- "print\"Density is p=\",round(p1,2),\"g/cm^3\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Lattice constant is a= 5.58 Angstrom\n",
- "Packing fraction is = 0.662\n",
- "Density is p= 2233.0 Kg/m^3\n",
- "Density is p= 2.23 g/cm^3\n"
- ]
- }
- ],
- "prompt_number": 6
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb b/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb deleted file mode 100755 index 763a53c2..00000000 --- a/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb +++ /dev/null @@ -1,144 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:1ec2372be7a9974010a31557c9658c85707025e7a87f82e6ef26be63dbcfb0e7"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 3:Planes in Crystals"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.11 , Page no:61"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "h=3;\n",
- "k=2;\n",
- "l=1; #miller indices\n",
- "a=4.2E-8; #in cm (lattice constant)\n",
- "\n",
- "#calculate\n",
- "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n",
- "d=d*1E8; #changing unit from cm to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The interplanar spacing is d=\",round(d,2),\"cm\";\n",
- "print\"\\t\\t\\t d=\",round(d,2),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The interplanar spacing is d= 1.12 cm\n",
- "\t\t\t d= 1.12 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.12 , Page no:61"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "h=1;k=1;l=1; #miller indices\n",
- "a=2.5;b=2.5;c=1.8; #in Angstrom (lattice constants for tetragonal lattice )\n",
- "\n",
- "#calculate\n",
- "d=1/math.sqrt((h/a)**2+(k/b)**2+(l/c)**2); #calculation for interplanar spacing\n",
- "\n",
- "#result\n",
- "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The lattice spacing is d= 1.26 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.15 , Page no:63"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "h=1;k=0;l=0; #miller indices\n",
- "a=2.5; #in Angstrom (lattice constant)\n",
- "\n",
- "#calculate\n",
- "a=a*1E-10; #hence a is in Angstrom\n",
- "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n",
- "p=d/a**3;\n",
- "\n",
- "#result\n",
- "print\"The density is p=\",round(p),\"lattice points/m^2\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The density is p= 1.6e+19 lattice points/m^2\n"
- ]
- }
- ],
- "prompt_number": 3
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_04_Crystal_Diffraction.ipynb b/Applied_Physics/Chapter_04_Crystal_Diffraction.ipynb deleted file mode 100755 index 6c9c83eb..00000000 --- a/Applied_Physics/Chapter_04_Crystal_Diffraction.ipynb +++ /dev/null @@ -1,494 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:177e44357417b2cfb0b476ada5b36a934225ade51d50763b09586ba8679f08fc"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 4:Crystal Diffraction"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.1 , Page no:75"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "lambda1=2.6; #in Angstrom (wavelength)\n",
- "theta=20; #in Degree (angle)\n",
- "n=2;\n",
- "\n",
- "#calculate\n",
- "lambda1=lambda1*1E-10; #since lambda is in Angstrom\n",
- "#Since 2dsin(theta)=n(lambda)\n",
- "#therefore d=n(lambda)/2sin(theta)\n",
- "d=n*lambda1/(2*math.sin(math.radians(theta)));\n",
- "\n",
- "#result\n",
- "print\"The spacing constant is d=\",d,\"m\";\n",
- "print\"\\t\\t\\td=\",d*10**10,\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The spacing constant is d= 7.60189144042e-10 m\n",
- "\t\t\td= 7.60189144042 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.2 , Page no:75"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "h=1;k=1;l=0; #miller indices\n",
- "a=0.26; #in nanometer (lattice constant)\n",
- "lambda1=0.065; #in nanometer (wavelength)\n",
- "n=2; #order\n",
- "\n",
- "#calculate\n",
- "d=a/math.sqrt(h**2+k**2+l**2); #calculation of interlattice spacing\n",
- "#Since 2dsin(theta)=n(lambda)\n",
- "#therefore we have\n",
- "theta=math.asin(n*lambda1/(2*d));\n",
- "theta1=theta*180/3.14;\n",
- "\n",
- "#result\n",
- "print\"The glancing angle is =\",round(theta1,2),\"degree\";\n",
- "print \"Note: there is slight variation in the answer due to round off error\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The glancing angle is = 20.72 degree\n",
- "Note: there is slight variation in the answer due to round off error\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.3 , Page no:75"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "d=3.04E-10; #in mm (spacing constant)\n",
- "lambda1=0.79; #in Angstrom (wavelength)\n",
- "n=3; #order\n",
- "\n",
- "#calculate\n",
- "#Since 2dsin(theta)=n(lambda)\n",
- "#therefore we have\n",
- "lambda2=lambda1*1E-10; #since lambda is in angstrom\n",
- "theta=math.asin(n*lambda2/(2*d));\n",
- "theta1=theta*180/3.14;\n",
- "\n",
- "#result\n",
- "print\"The glancing angle is\",round(theta1,3),\"degree\";\n",
- "print \"Note: In question the value of d=3.04E-9 cm but in solution is using d=3.04E-10 m. So I have used d=3.04E-10 cm as used in the solution\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The glancing angle is 22.954 degree\n",
- "Note: In question the value of d=3.04E-9 cm but in solution is using d=3.04E-10 m. So I have used d=3.04E-10 cm as used in the solution\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.4 , Page no:76"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "d=0.282; #in nanometer (spacing constant)\n",
- "n=1; #order\n",
- "theta=8.35; #in degree (glancing angle)\n",
- "\n",
- "#calculate\n",
- "d=d*1E-9; #since d is in nanometer\n",
- "#Since 2dsin(theta)=n(lambda)\n",
- "#therefore we have\n",
- "lambda1=2*d*math.sin(math.radians(theta))/n; \n",
- "lambda_1=lambda1*1E10; #changing unit from m to Angstrom\n",
- "theta_1=90; #in degree (for maximum order theta=90)\n",
- "n_max=2*d*math.sin(math.radians(theta_1))/lambda1; #calculation of maximum order. \n",
- "\n",
- "#result\n",
- "print\"The wavelength =\",lambda1,\"m\";\n",
- "print\"\\t\\t=\" ,round(lambda_1,3),\"Angstrom\";\n",
- "print\"The maximum order possible is n=\",round(n_max);\n",
- "print \"Note: In question value of theta=8 degree and 35 minutes but solution uses theta=8.35 degree.So I am using theta=8.35 degree\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength = 8.19038939236e-11 m\n",
- "\t\t= 0.819 Angstrom\n",
- "The maximum order possible is n= 7.0\n",
- "Note: In question value of theta=8 degree and 35 minutes but solution uses theta=8.35 degree.So I am using theta=8.35 degree\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.5 , Page no:76"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "theta=6; #in degree (glancing angle)\n",
- "p=2170; #in Kg/m^3 (density)\n",
- "M=58.46; #Molecular weight of NaCl\n",
- "N=6.02E26; #in Kg-molecule (Avogadro's number)\n",
- "n=1; #order\n",
- "XU=1E-12; #since 1X.U.= 1E-12m\n",
- "\n",
- "#calculate\n",
- "d=(M/(2*N*p))**(1/3); #calclation of lattice constant\n",
- "#Since 2dsin(theta)=n(lambda)\n",
- "#therefore we have\n",
- "lambda1=2*d*math.sin(math.radians(theta))/n; #calculation of wavelength\n",
- "lambda2=lambda1/XU;\n",
- "\n",
- "#result\n",
- "print\"The spacing constant is d=\",d,\"m\";\n",
- "print\"The wavelength is =\",lambda1,\"m\";\n",
- "print\"\\t\\t =\",lambda2,\"X.U\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The spacing constant is d= 2.81789104396e-10 m\n",
- "The wavelength is = 5.89099640962e-11 m\n",
- "\t\t = 58.9099640962 X.U\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.6 , Page no:77"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "h=1;k=1;l=1; #miller indices\n",
- "a=5.63; #in Angstrom (lattice constant)\n",
- "theta=27.5; #in degree (Glancing angle)\n",
- "n=1; #order\n",
- "H=6.625E-34; #in J-s (Plank's constant)\n",
- "c=3E8; #in m/s (velocity of light)\n",
- "e=1.6E-19; #charge of electron\n",
- "\n",
- "#calculate\n",
- "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n",
- "#Since 2dsin(theta)=n(lambda)\n",
- "#therefore we have\n",
- "lambda1=2*d*math.sin(math.radians(theta))/n; #calculation for wavelength\n",
- "E=H*c/(lambda1*1E-10); #calculation of Energy\n",
- "E1=E/e; #changing unit from J to eV\n",
- "\n",
- "#result\n",
- "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";\n",
- "print\"The wavelength is =\",round(lambda1),\"Angstrom\";\n",
- "print\"The energy of X-rays is E=\",E,\"J\";\n",
- "print\"\\t\\t\\tE=\",E1,\"eV\";\n",
- "print \"Note: c=3E8 m/s but in solution c=3E10 m/s \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The lattice spacing is d= 3.25 Angstrom\n",
- "The wavelength is = 3.0 Angstrom\n",
- "The energy of X-rays is E= 6.62100284311e-16 J\n",
- "\t\t\tE= 4138.12677695 eV\n",
- "Note: c=3E8 m/s but in solution c=3E10 m/s \n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.7 , Page no:77"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "V=344; #in V (accelerating voltage)\n",
- "theta=60; #in degree (glancing angle)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "h=6.625e-34; #in J-s (Plank's constant)\n",
- "n=1; #order\n",
- "e=1.6E-19; #charge on electron\n",
- "\n",
- "#calculate\n",
- "#Since K=m*v^2/2=e*V\n",
- "#therefore v=sqrt(2*e*V/m)\n",
- "#since lambda=h/(m*v)\n",
- "#therefore we have lambda=h/sqrt(2*m*e*V)\n",
- "lambda1=h/math.sqrt(2*m*e*V); #calculation of lambda\n",
- "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n",
- "#Since 2dsin(theta)=n(lambda)\n",
- "#therefore we have\n",
- "d=n*lambda2/(2*math.sin(math.radians(theta)));\n",
- "\n",
- "#result\n",
- "print\"The wavelength is =\",lambda1,\"m\";\n",
- "print\"\\t\\t =\",round(lambda2,2),\"Angstrom\";\n",
- "print\"The interplanar spacing is d=\",round(d,2),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 6.61928340764e-11 m\n",
- "\t\t = 0.66 Angstrom\n",
- "The interplanar spacing is d= 0.38 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.8 , Page no:78"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "K=0.02; #in eV (kinetic energy)\n",
- "d=2.0; #in Angstrom (Bragg's spacing)\n",
- "m=1.00898; #in amu (mass of neutron)\n",
- "amu=1.66E-27; #in Kg (1amu=1.66E-27 Kg)\n",
- "h=6.625e-34; #in J-s (Plank's constant)\n",
- "n=1; #order\n",
- "e=1.6E-19; #charge on electron\n",
- "\n",
- "#calculate\n",
- "#Since K=m*v^2/2\n",
- "#therefore v=sqrt(2*K/m)\n",
- "#since lambda=h/(m*v)\n",
- "#therefore we have lambda=h/sqrt(2*m*K)\n",
- "m=m*amu; #changing unit from amu to Kg\n",
- "K=K*e; #changing unit to J from eV\n",
- "lambda1=h/math.sqrt(2*m*K); #calculation of lambda\n",
- "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n",
- "theta=math.asin(n*lambda2/(2*d)); #calculation of angle of first order diffraction maximum\n",
- "theta1=theta*180/3.14;\n",
- "#result\n",
- "print\"The wavelength is =\",lambda1,\"m\";\n",
- "print\"\\t \\t =\",round(lambda2),\"Angstrom\";\n",
- "print\"The angle of first order diffraction maximum is \",round(theta1),\"Degree\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 2.02348771817e-10 m\n",
- "\t \t = 2.0 Angstrom\n",
- "The angle of first order diffraction maximum is 30.0 Degree\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.9 , Page no:79"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#given\n",
- "lambda1=0.586; #in Angstrom (wavelength of X-rays)\n",
- "n1=1; n2=2; n3=3; #orders of diffraction\n",
- "theta1=5+(58/60); #in degree (Glancing angle for first order of diffraction)\n",
- "theta2=12+(01/60); #in degree (Glancing angle for second order of diffraction)\n",
- "theta3=18+(12/60); #in degree (Glancing angle for third order of diffraction)\n",
- "\n",
- "#calculate\n",
- "K1=math.sin(math.radians(theta1));\n",
- "K2=math.sin(math.radians(theta2));\n",
- "K3=math.sin(math.radians(theta3));\n",
- "#Since 2dsin(theta)=n(lambda)\n",
- "#therefore we have\n",
- "d1=n1*lambda1/(2*K1);\n",
- "d2=n2*lambda1/(2*K2);\n",
- "d3=n3*lambda1/(2*K3);\n",
- "d1=d1*1E-10; #changing unit from Angstrom to m\n",
- "d2=d2*1E-10; #changing unit from Angstrom to m\n",
- "d3=d3*1E-10; #changing unit from Angstrom to m\n",
- "d=(d1+d2+d3)/3;\n",
- "\n",
- "#result\n",
- "print\"The value of sine of different angle of diffraction is \\nK1=\",K1;\n",
- "print\"K2=\",K2;\n",
- "print\"K3=\",K3;\n",
- "#Taking the ratios of K1:K2:K3\n",
- "#We get K1:K2:K3=1:2:3\n",
- "#Therefore we have\n",
- "print\"Or we have K1:K2:K3=1:2:3\";\n",
- "print\"Hence these angles of incidence are for Ist, 2nd and 3rd order reflections respectively\";\n",
- "print\"The spacing constants are \\nd1=\",d1;\n",
- "print\"d2=\",d2;\n",
- "print\"d3=\",d3;\n",
- "print\"The mean value of crystal spacing is d=\",d,\"m\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The value of sine of different angle of diffraction is \n",
- "K1= 0.103949856225\n",
- "K2= 0.208196213621\n",
- "K3= 0.312334918512\n",
- "Or we have K1:K2:K3=1:2:3\n",
- "Hence these angles of incidence are for Ist, 2nd and 3rd order reflections respectively\n",
- "The spacing constants are \n",
- "d1= 2.81866671719e-10\n",
- "d2= 2.81465253286e-10\n",
- "d3= 2.81428667722e-10\n",
- "The mean value of crystal spacing is d= 2.81586864243e-10 m\n"
- ]
- }
- ],
- "prompt_number": 9
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics.ipynb b/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics.ipynb deleted file mode 100755 index cf16b683..00000000 --- a/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics.ipynb +++ /dev/null @@ -1,1258 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:17ded29a54411f524d1901cc530f956cb4706c517e993f5acba4014789eca0bd"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 5:Principles of Quantum Mechanics"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.1 , Page no:102"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "lambda1=1; #in Angstrom (wavelength)\n",
- "m=1.67E-27; #in Kg (mass of neutron)\n",
- "h=6.625E-34; #in J-s (Planck's constant)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "lambda2=lambda1*1E-10; #since lambda is in Angstrom\n",
- "#Since lambda=h/(m*v)\n",
- "#Therefore we have\n",
- "v=h/(m*lambda2); #calculation of velocity\n",
- "K=m*v**2/2; #calculation of kinetic energy\n",
- "K1=K/e; #changing unit fro J to eV\n",
- "\n",
- "#result\n",
- "print\"The velocity is v=\",v,\"m/s\";\n",
- "print\"The kinetic energy is K=\",K,\"J\";\n",
- "print\"\\t\\t =\",K1,\"eV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The velocity is v= 3967.06586826 m/s\n",
- "The kinetic energy is K= 1.31409056886e-20 J\n",
- "\t\t = 0.0821306605539 eV\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.2 , Page no:103"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "K=50; #in eV (Kinetic energy)\n",
- "m0=9.1E-31; #in Kg (mass of electron)\n",
- "h=6.625E-34; #in J-s (Planck's constant)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "K=K*e; #changing unit from eV to J\n",
- "#Since K=m*v^2/2\n",
- "#Therefore v=sqrt(2*K/m)\n",
- "#Since lambda=h/(m*v)\n",
- "#Therefore we have\n",
- "lambda1=h/math.sqrt(2*m0*K); #calculation of wavelength\n",
- "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The wavelength is =\",lambda1,\"m\";\n",
- "print\"\\t\\t =\",round(lambda2,3),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 1.73622176082e-10 m\n",
- "\t\t = 1.736 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.3 , Page no:104"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "E=2000; #in eV (Kinetic energy)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "h=6.625E-34; #in J-s (Planck's constant)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "E=E*e; #changing unit from eV to J\n",
- "#Since E=m*v^2/2\n",
- "#Therefore v=sqrt(2*E/m)\n",
- "#Since lambda=h/(m*v)\n",
- "#Therefore we have\n",
- "lambda1=h/math.sqrt(2*m*E); #calculation of wavelength\n",
- "lambda2=lambda1*1E9; #changing unit from m to nanometer\n",
- "\n",
- "#result\n",
- "print\"The wavelength is =\",lambda1,\"m\";\n",
- "print\"\\t\\t =\",round(lambda2,4),\"nm\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 2.74520764367e-11 m\n",
- "\t\t = 0.0275 nm\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.4 , Page no:104"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "m_e=9.1E-31; #in Kg (mass of electron)\n",
- "m_n=1.676E-27; #in Kg (mass of neutron)\n",
- "h=6.625E-34; #in J-s (Planck's constant)\n",
- "c=3E8; #in m/s (velocity of light)\n",
- "\n",
- "#calculate\n",
- "E_e=m_e*c**2; #rest mass energy of electron\n",
- "E_n=2*E_e; #given (kinetic energy of neutron)\n",
- "#Since K=m*v^2/2\n",
- "#Therefore v=sqrt(2*K/m)\n",
- "#Since lambda=h/(m*v)\n",
- "#Therefore we have\n",
- "lambda1=h/math.sqrt(2*m_n*E_n); #calculation of wavelength\n",
- "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The wavelength is =\",lambda1,\"m\";\n",
- "print\"\\t\\t =\",lambda2,\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 2.82733278331e-14 m\n",
- "\t\t = 0.000282733278331 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.5 , Page no:104"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "V=1600; #in V (Potential)\n",
- "\n",
- "#calculate\n",
- "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n",
- "\n",
- "#result\n",
- "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n",
- "print \"Note : The answer in the book is wrong \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 0.307 Angstrom\n",
- "Note : The answer in the book is wrong \n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.6 , Page no:105"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "E=1000; #in eV (Kinetic energy of photon)\n",
- "K=1000; #in eV (Kinetic energy of electron)\n",
- "m0=9.1E-31; #in Kg (mass of electron)\n",
- "h=6.6E-34; #in J-s (Planck's constant)\n",
- "c=3E8; #in m/s (velocity of light)\n",
- "e=1.6E-19; #in C (charge on electron)\n",
- "\n",
- "#calculate\n",
- "E=E*e; #changing unit from eV to J\n",
- "lambda_p=h*c/E; #For photon E=hc/lambda\n",
- "lambda_p1=lambda_p*1E10; #changing unit from m to Angstrom\n",
- "#Since K=m*v^2/2\n",
- "#Therefore v=sqrt(2*K/m)\n",
- "#Since lambda=h/(m*v)\n",
- "#Therefore we have\n",
- "K=K*e; #changing unit from eV to J\n",
- "lambda_e=h/math.sqrt(2*m0*K); #calculation of wavelength\n",
- "lambda_e1=lambda_e*1E10; #changing unit from m to Angstrom\n",
- "\n",
- "#result\n",
- "print\"For photon,the wavelength is =\",lambda_p,\"m\";\n",
- "print\"\\t\\t\\t =\",round(lambda_p1,1),\"Angstrom\";\n",
- "print\"For electron,the wavelength is =\",lambda_e,\"m\";\n",
- "print\"\\t\\t\\t =\",round(lambda_e1,2),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "For photon,the wavelength is = 1.2375e-09 m\n",
- "\t\t\t = 12.4 Angstrom\n",
- "For electron,the wavelength is = 3.86765965524e-11 m\n",
- "\t\t\t = 0.39 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.7 , Page no:105"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "lambda1=1.66*10**-10; #in m (wavelength)\n",
- "m=9.1*10**-31; #in Kg (mass of electron)\n",
- "h=6.626*10**-34; #in J-s (Planck's constant)\n",
- "e=1.6E-19; #in C (charge on electron)\n",
- "\n",
- "#calculate\n",
- "#Since lambda=h/(m*v)\n",
- "#Therefore we have\n",
- "v=h/(m*lambda1); #calculation of velocity\n",
- "K=m*v**2/2; #calculation of kinetic energy\n",
- "K1=K/e; #changing unit from J to eV\n",
- "\n",
- "#result\n",
- "print\"The velocity of electron is v=\",v,\"m/s\";\n",
- "print\"The kinetic energy is K=\",K,\"J\";\n",
- "print\"\\t\\t =\",round(K1,3),\"eV\";\n",
- "print \"Note: The answer in the book for kinetic energy is wrong \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The velocity of electron is v= 4386336.55501 m/s\n",
- "The kinetic energy is K= 8.75417651009e-18 J\n",
- "\t\t = 54.714 eV\n",
- "Note: The answer in the book for kinetic energy is wrong \n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.8 , Page no:106"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "T=400; #in K (temperature)\n",
- "m=6.7E-27; #in Kg (mass of He-atom)\n",
- "h=6.6E-34; #in J-s (Planck's constant)\n",
- "k=1.376E-23; #in J/degree (Boltzmann constant)\n",
- "\n",
- "#calculate\n",
- "#Since lambda=h/(m*v)\n",
- "#E=mv^2/2;\n",
- "#Therefore lambda=h/sqrt(2*m*E)\n",
- "#E=kT\n",
- "#Therefore lambda=h/sqrt(2*m*k*T)\n",
- "lambda1=h/math.sqrt(2*m*k*T)\n",
- "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The de-Broglie wavelength of He-atom is =\",lambda1,\"m\";\n",
- "print\"\\t\\t\\t\\t =\",round(lambda2,4),\"Angstrom\"; "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The de-Broglie wavelength of He-atom is = 7.6851495611e-11 m\n",
- "\t\t\t\t = 0.7685 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.9 , Page no:106"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "m_e=9.1E-31; #in Kg (mass of electron)\n",
- "m_p=1.6E-27; #in Kg (mass of proton)\n",
- "h=6.626E-34; #in J-s (Planck's constant)\n",
- "c=3E8; #in m/s (velocity of light)\n",
- "\n",
- "#calculate\n",
- "E=m_e*c**2; #in J (rest energy of electron)\n",
- "#Since lambda=h/(m*v)\n",
- "#E=mv^2/2;\n",
- "#herefore lambda=h/sqrt(2*m*E)\n",
- "#Also E=m_e*c^2;\n",
- "#therefore lambda=h/sqrt(2*m_p*m_e*c^2)\n",
- "lambda1=h/math.sqrt(2*m_p*m_e*c**2); #calculation of wavelength\n",
- "lambda2=lambda1*1*10**10; #changing unit from m to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The de-Broglie wavelength of proton is =\",lambda1,\"m\";\n",
- "print\"\\t\\t\\t\\t =\",lambda2,\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The de-Broglie wavelength of proton is = 4.0929316435e-14 m\n",
- "\t\t\t\t = 0.00040929316435 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.10 , Page no:106"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "V=10000; #in V (Potential)\n",
- "\n",
- "#calculate\n",
- "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n",
- "\n",
- "#result\n",
- "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 0.123 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.11 , Page no:107"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "V=100; #in V (Potential)\n",
- "n=1; #order of diffraction\n",
- "d=2.15; #in Angstrom (lattice spacing)\n",
- "\n",
- "#calculate\n",
- "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n",
- "#Since 2*d*sind(theta)=n*lambda\n",
- "#therefore we have\n",
- "theta=math.asin(n*lambda1/(2*d)); #calculation of glancing angle\n",
- "theta1=theta*180/3.14;\n",
- "\n",
- "#result\n",
- "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n",
- "print\"The glancing angle is =\",round(theta1,1),\"degree\";\n",
- "print \"Note: In question V=100 eV but the solution is using V=100V \"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 1.227 Angstrom\n",
- "The glancing angle is = 16.6 degree\n",
- "Note: In question V=100 eV but the solution is using V=100V \n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.12 , Page no:107"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "V=344; #in V (Potential)\n",
- "n=1; #order of diffraction\n",
- "theta=60; #in degree (glancing angle)\n",
- "\n",
- "#calculate\n",
- "lambda1=12.27/math.sqrt(V); #calculation of wavelength in Angstrom\n",
- "#Since 2*d*sind(theta)=n*lambda\n",
- "#therefore we have\n",
- "d=n*lambda1/(2*math.sin(math.radians(theta))); #calculation of spacing constant\n",
- "\n",
- "#result\n",
- "print\"The wavelength is =\",round(lambda1,3),\"Angstrom\";\n",
- "print\"The spacing of the crystal is =\",round(d,4),\"Angstrom\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The wavelength is = 0.662 Angstrom\n",
- "The spacing of the crystal is = 0.3819 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.13 , Page no:107"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "r=0.53*10**-10; #in m (radius of first Bohr orbit)\n",
- "h=6.6*10**-34; #in J-s (Planck's constant)\n",
- "m=9.1*10**-31; #in Kg (mass of electron)\n",
- "n=1; #First Bohr orbit\n",
- "pi=3.14; #value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "#Since 2*pi*r=n*lambda and lambda=h/(m*v)\n",
- "#Threfore we have v=h*n/(2*pi*r*m)\n",
- "v=h*n/(2*pi*r*m); #calculation of velocity\n",
- "\n",
- "#result\n",
- "print\"The velocity of electron is =\",v,\"m/s\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The velocity of electron is = 2179049.16859 m/s\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.14 , Page no:108"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "dx=0.2; #in Angstrom (uncertainty in the position)\n",
- "h=6.6E-34; #in J-s (Planck's constant)\n",
- "m0=9.1E-31; #in Kg (mass of electron)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "dx=dx*1E-10; #since dx is in Angstrom\n",
- "#Since dx*dp=h/4*pi (uncertainty relation)\n",
- "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n",
- "#since dp=m*dv\n",
- "dv=dp/m0; #calculation of uncertainty in the velocity\n",
- "\n",
- "#result\n",
- "print\"The uncertainty in the momentum is dp=\",dp,\"Kg-m/\";\n",
- "print\"The uncertainty in the velocity is dv=\",dv,\"m/s\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The uncertainty in the momentum is dp= 2.62738853503e-24 Kg-m/\n",
- "The uncertainty in the velocity is dv= 2887240.14839 m/s\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.15 , Page no:108"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "m_e=9.1E-31; #in Kg (mass of electron)\n",
- "m_p=1.67E-27; #in Kg (mass of proton)\n",
- "dx_p=1; #in nanometer (uncertainty in position of electron)\n",
- "dx_n=1; #in nanometer (uncertainty in position of proton)\n",
- "\n",
- "#calculate\n",
- "#since dp=h/(4*pi*dx)\n",
- "#since h/(4*pi) is constant and dx is same for electron and proton \n",
- "#therefor both electron and proton have same uncertainty in the momentum\n",
- "#since dv=dp/m and dp is same for both\n",
- "#therefore dv_e/dv_p=m_p/m_e\n",
- "#therefore\n",
- "K=m_p/m_e; #ratio of uncertainty in the velocity of electron and proton\n",
- "\n",
- "#result\n",
- "print\"The ratio of uncertainty in the velocity of electron to that of proton is =\",round(K);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The ratio of uncertainty in the velocity of electron to that of proton is = 1835.0\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.16 , Page no:108"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "dx=5*10**-15; #in m (radius of nucleus or uncertainty in the position)\n",
- "h=6.6*10**-34; #in J-s (Planck's constant)\n",
- "m=1.67E-27; #in Kg (mass of proton)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#Since dx*dp=h/4*pi (uncertainty relation)\n",
- "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n",
- "p=dp; #minimum value of momentum to calculate mimimum kinetic energy\n",
- "K=(p**2)/(2*m); #calculation of minimum kinetic energy of proton\n",
- "K1=K/e; #changing unit from J to eV\n",
- "K2=K1/1E6; #changing unit from eV to MeV\n",
- "\n",
- "#result\n",
- "print\"The minimum uncertainty in the momentum of proton is dp =\",dp,\"Kg-m/s\";\n",
- "print\"The minimum kinetic energy of proton is K=\",K,\"J\";\n",
- "print\"\\t\\t\\t\\t \\t =\",K1,\"eV\";\n",
- "print\"\\t\\t\\t\\t\\t =\",K2,\"MeV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The minimum uncertainty in the momentum of proton is dp = 1.05095541401e-20 Kg-m/s\n",
- "The minimum kinetic energy of proton is K= 3.30690803067e-14 J\n",
- "\t\t\t\t \t = 206681.751917 eV\n",
- "\t\t\t\t\t = 0.206681751917 MeV\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.17 , Page no:109"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "K=1; #in KeV (kinetic energy of electron)\n",
- "dx=1; #in Angstrom (uncertainty in the position)\n",
- "h=6.63E-34; #in J-s (Planck's constant)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "dx=dx*1E-10; #since dx is in Angstrom\n",
- "#Since dx*dp=h/4*pi (uncertainty relation)\n",
- "dp=h/(4*pi*dx); #calculation of uncertainty in the momentum\n",
- "K=K*1E3*1.6E-19; #changing unit from KeV to J\n",
- "p=math.sqrt(2*m*K); #calculation of momentum \n",
- "poc=(dp/p)*100; #calculation of percentage of uncertainty\n",
- "\n",
- "#result\n",
- "print\"The uncertainty in the momentum of electron is dp=\",dp,\"Kg-m/s\";\n",
- "print\"The momentum of electron is p=\",p,\"Kg-m/s\";\n",
- "print\"The percentage of uncertainty in the momentum is =\",round(poc,1);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The uncertainty in the momentum of electron is dp= 5.27866242038e-25 Kg-m/s\n",
- "The momentum of electron is p= 1.70645832062e-23 Kg-m/s\n",
- "The percentage of uncertainty in the momentum is = 3.1\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.18 , Page no:109"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "v=6.6E4; #m/s (speed of electron)\n",
- "poc=0.01; #percentage of uncertainty\n",
- "h=6.63E-34; #in J-s (Planck's constant)\n",
- "m=9E-31; #in Kg (mass of electron)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "p=m*v; #calculation of momentum\n",
- "dp=(poc/100)*p; #calculation of uncertainty in the momentum\n",
- "#Since dx*dp=h/4*pi (uncertainty relation)\n",
- "dx=h/(4*pi*dp); #calculation of uncertainty in the position\n",
- "\n",
- "#result\n",
- "print\"The momentum of electron is p=\",p,\"Kg-m/s\";\n",
- "print\"The uncertainty in the momentum of electron is dp=\",dp,\"Kg-m/s\";\n",
- "print\"The uncertainty in the position of electron is dx=\",dx,\"Kg-m/s\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The momentum of electron is p= 5.94e-26 Kg-m/s\n",
- "The uncertainty in the momentum of electron is dp= 5.94e-30 Kg-m/s\n",
- "The uncertainty in the position of electron is dx= 8.88663707135e-06 Kg-m/s\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.19 , Page no:111"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "lambda1=1; #in Angstrom (wavelength)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "dlambda=1E-6; #uncertainty in wavelength\n",
- "\n",
- "#calculate\n",
- "lambda2=lambda1*1E-10; #sinc lambda is in Angstrom\n",
- "#By uncertainty principle, dx*dp>=h/(4*pi) --(1)\n",
- "#since p=h/lambda -----(2)\n",
- "#Or p*lambda=h \n",
- "#diffrentiting this equation\n",
- "#p*dlambda+lambda*dp=0\n",
- "#dp=-p*dlambda/lambda ----(3)\n",
- "#from (2) and (3) dp=-h*dlambda/lambda^2 ---(4)\n",
- "#from (1) and(4) dx*dlambda>=lambda^2/4*pi\n",
- "#Or dx=lambda^2/(4*pi*dlambda)\n",
- "dx=lambda2**2/(4*pi*dlambda); #calculation of uncertainty in the position\n",
- "\n",
- "#result\n",
- "print\"The uncertainty in the position of X-ray photon is dx=\",dx,\"m\";\n",
- "print \"Note: wavelength accuracy is given as 1 in 1E8 but in book solution has used 1 in 1E6 \"\n",
- "print \" ANSWEER IS WRONG IN THE TEXTBOOK\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The uncertainty in the position of X-ray photon is dx= 7.96178343949e-16 m\n",
- "Note: wavelength accuracy is given as 1 in 1E8 but in book solution has used 1 in 1E6 \n",
- " ANSWEER IS WRONG IN THE TEXTBOOK\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.20 , Page no:111"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "dt=1*10**-8; #in sec (average life time)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n",
- "#and E=h*v v is the frequency\n",
- "#therefore we have dv>=1/(4*pi*dt)\n",
- "dv=1/(4*pi*dt); #calculation of minimum uncertainty in the frequency\n",
- "\n",
- "#result\n",
- "print\"The minimum uncertainty in the frequency of the photon is dv=\",dv,\"sec^-1\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The minimum uncertainty in the frequency of the photon is dv= 7961783.43949 sec^-1\n"
- ]
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.21 , Page no:111"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "dt=1E-12; #in sec (average life time)\n",
- "h=6.63E-34; #in J-s (Planck'c constant)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "e=1.6*1E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n",
- "dE=h/(4*pi*dt); #calculation of minimum uncertainty in the energy\n",
- "dE1=dE/e; #changing unit from J to eV\n",
- "\n",
- "#result\n",
- "print\"The uncertainty in the energy of the photon is dE=\",dE,\"J\";\n",
- "print\"\\t\\t\\t\\t\\t =\",dE1,\"eV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The uncertainty in the energy of the photon is dE= 5.27866242038e-23 J\n",
- "\t\t\t\t\t = 0.000329916401274 eV\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.22 , Page no:111"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "dT=2.5E-14; #in sec (average life time)\n",
- "h=6.63E-34; #in J-s (Planck'c constant)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "e=1.6*1E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#Since dE*dt>=h/(4*pi) (uncertainty relation for energy)\n",
- "dE=h/(4*pi*dT); #calculation of minimum uncertainty in the energy\n",
- "dE1=dE/e; #changing unit from J to eV\n",
- "\n",
- "#result\n",
- "print\"The uncertainty in the energy of the photon is dE=\",dE,\"J\";\n",
- "print\"\\t\\t\\t\\t\\t =\",dE1,\"eV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The uncertainty in the energy of the photon is dE= 2.11146496815e-21 J\n",
- "\t\t\t\t\t = 0.013196656051 eV\n"
- ]
- }
- ],
- "prompt_number": 22
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.23 , Page no:112"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "a=2; #in Angstrom (length of the box)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "h=6.626E-34; #in J-s (Planck'c constant)\n",
- "n2=2; n4=4; #two quantum states\n",
- "e=1.6*1E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "a=a*1E-10; #since a is in Angstrom \n",
- "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n",
- "E2=n2**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 2nd quantum state\n",
- "E21=E2/e; #changing unit from J to eV\n",
- "E4=n4**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 4nd quantum state\n",
- "E41=E4/e; #changing unit from J to eV\n",
- "\n",
- "#result\n",
- "print\"The energy corresponding to the 2nd quantum state is E2=\",E2,\"J\";\n",
- "print\"\\t\\t\\t\\t\\t\\t =\",E21,\"eV\";\n",
- "print\"The energy corresponding to the 4nd quantum state is E4=\",E4,\"J\";\n",
- "print\"\\t\\t\\t\\t\\t\\t =\",E41,\"eV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The energy corresponding to the 2nd quantum state is E2= 6.0307521978e-18 J\n",
- "\t\t\t\t\t\t = 37.6922012363 eV\n",
- "The energy corresponding to the 4nd quantum state is E4= 2.41230087912e-17 J\n",
- "\t\t\t\t\t\t = 150.768804945 eV\n"
- ]
- }
- ],
- "prompt_number": 23
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.24 , Page no:113"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "a=1E-10; #in m (width of the well)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "h=6.626E-34; #in J-s (Planck'c constant)\n",
- "n1=1; n2=2; n3=3; #ground and first two excited states\n",
- "e=1.6*1E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n",
- "E1=n1**2*h**2/(8*m*a**2); #calculation of energy corresponding to the Ground state\n",
- "E11=E1/e; #changing unit from J to eV\n",
- "E2=n2**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 1st excited state\n",
- "E21=E2/e; #changing unit from J to eV\n",
- "E3=n3**2*h**2/(8*m*a**2); #calculation of energy corresponding to the 2nd excited state\n",
- "E31=E3/e; #changing unit from J to eV\n",
- "\n",
- "#result\n",
- "print\"The energy corresponding to the ground state is E1=\",E1,\"J\";\n",
- "print\"\\t\\t\\t\\t\\t =\",E11,\"eV\";\n",
- "print\"The energy corresponding to the 1st excited state is E2=\",E2,\"\";\n",
- "print\"\\t\\t\\t\\t\\t =\",E21,\"eV\";\n",
- "print\"The energy corresponding to the 2nd excited state is E3=\",E3,\"J\";\n",
- "print\"\\t\\t\\t\\t\\t =\",E31,\"eV\";\n",
- "print \" There is slight variation in the answer due to round off error\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The energy corresponding to the ground state is E1= 6.0307521978e-18 J\n",
- "\t\t\t\t\t = 37.6922012363 eV\n",
- "The energy corresponding to the 1st excited state is E2= 2.41230087912e-17 \n",
- "\t\t\t\t\t = 150.768804945 eV\n",
- "The energy corresponding to the 2nd excited state is E3= 5.42767697802e-17 J\n",
- "\t\t\t\t\t = 339.229811126 eV\n",
- " There is slight variation in the answer due to round off error\n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.25 , Page no:113"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "dx=1E-8; #in m (length of box or uncertainty in the position)\n",
- "h=6.626E-34; #in J-s (Planck'c constant)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "\n",
- "#calculate\n",
- "#From uncertainty principle dx*dp=h and dp=m*dv\n",
- "#therefore we have\n",
- "dv=h/(m*dx); #calculation of minimum uncertainty in the velocity\n",
- "dv1=dv*1E-3; #changing unit from m/s to Km/s\n",
- "\n",
- "#result\n",
- "print\"The minimum uncertainty in the velocity of electron i dv=\",dv,\"m/s\";\n",
- "print\"\\t\\t\\t\\t\\t\\t =\",round(dv1,2),\"Km/s\";\n",
- "print \"Note: There is slight variation in the answer due to round off error\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The minimum uncertainty in the velocity of electron i dv= 72813.1868132 m/s\n",
- "\t\t\t\t\t\t = 72.81 Km/s\n",
- "Note: There is slight variation in the answer due to round off error\n"
- ]
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.26 , Page no:113"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "a=4E-10; #in m (length of the box)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "h=6.626E-34; #in J-s (Planck'c constant)\n",
- "n1=1; #ground state\n",
- "e=1.6*1E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#Since E_n=n^2*h^2/(8*m*a^2) (Energy corresponding to nth quantum state)\n",
- "E1=n1**2*h**2/(8*m*a**2); #calculation of energy corresponding to the ground state\n",
- "E11=E1/e; #changing unit from J to eV\n",
- "\n",
- "#result\n",
- "print\"The minimum energy of electron is E1=\",E1,\"J (Note: The answer in the book is wrong due to printing error)\";\n",
- "print\"\\t\\t\\t\\t =\",round(E11,3),\"eV\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The minimum energy of electron is E1= 3.76922012363e-19 J (Note: The answer in the book is wrong due to printing error)\n",
- "\t\t\t\t = 2.356 eV\n"
- ]
- }
- ],
- "prompt_number": 26
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals.ipynb b/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals.ipynb deleted file mode 100755 index ff063bb6..00000000 --- a/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals.ipynb +++ /dev/null @@ -1,561 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:0c3d2d354976eaba7e5a0f2e0cf4b1fd72cd55b3826ca7e7cd6acde8afff2cdf"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 6:Electron Theory and Band Theory of Metals"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.1 , Page no:146"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "n=8.5E28; #in 1/m^3 (density of electron)\n",
- "m_e=9.11E-31; #in Kg (mass of electron)\n",
- "k=1.38E-23; #in J/K (Boltzmann's constant)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "T=300; #in K (temperature)\n",
- "p=1.69E-8; #in ohm-m (resistivity)\n",
- "\n",
- "#calculate\n",
- "lambda1=math.sqrt(3*k*m_e*T)/(n*e**2*p); #calculation of mean free path\n",
- "lambda2=lambda1*1E9; #changing unit from m to nanometer\n",
- "\n",
- "#result\n",
- "print\"The mean free path of electron is =\",lambda1,\"m\";\n",
- "print\"\\t\\t\\t\\t =\",round(lambda2,2),\"nm\";\n",
- "#Note: answer in the book is wrong due to printing mistake"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The mean free path of electron is = 2.89250681437e-09 m\n",
- "\t\t\t\t = 2.89 nm\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.2 , Page no:146"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "k=1.38E-23; #in J/K (Boltzmann's constant)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "P_E=1; #in percentage (probability that a state with an energy 0.5 eV above Fermi energy will be occupied)\n",
- "E=0.5; #in eV (energy above Fermi level)\n",
- "\n",
- "#calculate\n",
- "P_E=1/100; #changing percentage into ratio\n",
- "E=E*e; #changing unit from eV to J\n",
- "#P_E=1/(1+exp((E-E_F)/k*T))\n",
- "#Rearranging this equation, we get\n",
- "#T=(E-E_F)/k*log((1/P_E)-1)\n",
- "#Since E-E_F has been denoted by E therefore\n",
- "T=E/(k*math.log((1/P_E)-1));\n",
- "\n",
- "#result\n",
- "print\"The temperature is T=\",round(T),\"K\";\n",
- "# Note: There is slight variation in the answer due to logarithm function"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The temperature is T= 1262.0 K\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.3 , Page no:147"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "n=5.8E28; #in 1/m^3 (density of electron)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "p=1.54E-8; #in ohm-m (resistivity)\n",
- "\n",
- "#calculate\n",
- "t=m/(n*e**2*p); #calculation of relaxation time\n",
- "\n",
- "#result\n",
- "print\"The relaxation time of conduction electrons is =\",t,\"sec\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The relaxation time of conduction electrons is = 3.97972178683e-14 sec\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.4 , Page no:147"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "n=8.5E28; #in 1/m^3 (density of electron)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "sigma=6E7; #in 1/ohm-m (conductivity)\n",
- "E_F=7; #in E=eV (Fermi energy of Copper)\n",
- "\n",
- "#calculate\n",
- "E_F=E_F*e; #changing unit from eV to J\n",
- "v_F=math.sqrt(2*E_F/m); #calculation of velocity of electrons\n",
- "#Since sigma=n*e^2*lambda/(2*m*v_F)\n",
- "#Therefore we have\n",
- "lambda1=2*m*v_F*sigma/(n*e**2); #calculation of mean free path\n",
- "lambda2=lambda1*1E10; #changing unit from m to Angstrom\n",
- "\n",
- "#result\n",
- "print\"The velocity of the electrons is v_F=\",v_F,\"m/s (roundoff error)\";\n",
- "print\"The mean free path traveled by the electrons is=\",round(lambda2),\"Angstrom\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The velocity of the electrons is v_F= 1568929.08111 m/s (roundoff error)\n",
- "The mean free path traveled by the electrons is= 787.0 Angstrom\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.5 , Page no:147"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "n=6.5E28; #in 1/m^3 (density of electron)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "p=1.43E-8; #in ohm-m (resistivity)\n",
- "\n",
- "#calculate\n",
- "t=m/(n*e**2*p); #calculation of relaxation time\n",
- "\n",
- "#result\n",
- "print\"The relaxation time of conduction electrons is =\",t,\"sec\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The relaxation time of conduction electrons is = 3.8243006993e-14 sec\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.6 , Page no:148"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "T=30; #in Celcius (temperature)\n",
- "k=1.38E-23; #in J/K (Boltzmann's constant)\n",
- "m_p=1.67E-27; #in Kg (mass of proton)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "T=T+273; #changing temperature from Celcius to Kelvin\n",
- "KE=(3/2)*k*T; #calculation of average kinetic energy\n",
- "KE1=KE/e; #changing unit from J to eV\n",
- "m=1.008*2*m_p; #calculating mass of hydrogen gas molecule\n",
- "c=math.sqrt(3*k*T/m); #calculation of velocity\n",
- "\n",
- "#result\n",
- "print\"The average kinetic energy of gas ,molecules is KE=\",KE,\"J\";\n",
- "print\"\\t\\t\\t\\t\\t\\t =\",KE1,\"eV (Answer is wrong in textbook)\";\n",
- "print\"The velocity of molecules is c=\",round(c,2),\"m/s\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The average kinetic energy of gas ,molecules is KE= 6.2721e-21 J\n",
- "\t\t\t\t\t\t = 0.039200625 eV (Answer is wrong in textbook)\n",
- "The velocity of molecules is c= 1930.27 m/s\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.7 , Page no:148"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "E=10; #in eV (kinetic energy for each electron and proton)\n",
- "m_e=9.1E-31; #in Kg (mass of electron)\n",
- "m_p=1.67E-27; #in Kg (mass of proton)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "E=E*e; #changing unit from eV to J\n",
- "#since E=m*v^2/2\n",
- "#therefore v=sqrt(2E/m)\n",
- "v_e=math.sqrt(2*E/m_e); #calculation of kinetic energy of electron\n",
- "v_p=math.sqrt(2*E/m_p); #calculation of kinetic energy of proton\n",
- "\n",
- "#result\n",
- "print\"The kinetic energy of electron is v_e=\",v_e,\"m/s\";\n",
- "print\"The kinetic energy of proton is v_p=\",v_p,\"m/s\";\n",
- "print \"Note: Answer is wrong in textbook\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The kinetic energy of electron is v_e= 1875228.92375 m/s\n",
- "The kinetic energy of proton is v_p= 43774.0524132 m/s\n",
- "Note: Answer is wrong in textbook\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.8 , Page no:149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "I=100; #in A (current in the wire)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "A=10; #in mm^2 (cross-sectional area)\n",
- "n=8.5E28; #in 1/m^3 (density of electron)\n",
- "\n",
- "#calculate\n",
- "A=A*1E-6; #changing unit from mm^2 to m^2\n",
- "v_d=I/(n*A*e);\n",
- "\n",
- "#result\n",
- "print\"The drift velocity of free electrons is v_d=\",v_d,\"m/s\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The drift velocity of free electrons is v_d= 0.000735294117647 m/s\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.9 , Page no:149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "I=4;#in A (current in the conductor)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "A=1E-6; #in m^2 (cross-sectional area)\n",
- "N_A=6.02E23; #in atoms/gram-atom (Avogadro's number)\n",
- "p=8.9; #in g/cm^3 (density)\n",
- "M=63.6; #atomic mass of copper\n",
- "\n",
- "#calculate\n",
- "n=N_A*p/M; #Calculation of density of electrons in g/cm^3\n",
- "n1=n*1E6; #changing unit from g/cm^3 to g/m^3\n",
- "v_d=I/(n1*A*e);\n",
- "\n",
- "#result\n",
- "print\"The density of copper atoms is n=\",n,\"atoms/m^3\";\n",
- "print\"\\t\\t\\t =\",n1,\"atoms/m^3\";\n",
- "print\"The average drift velocity of free electrons is v_d=\",v_d,\"m/s\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The density of copper atoms is n= 8.42421383648e+22 atoms/m^3\n",
- "\t\t\t = 8.42421383648e+28 atoms/m^3\n",
- "The average drift velocity of free electrons is v_d= 0.000296763596999 m/s\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.10 , Page no:149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "n=9E28; #in 1/m^3 (density of valence electrons)\n",
- "sigma=6E7; #in mho/m (conductivity of copper)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#Since sigma=n*e*mu therefore\n",
- "mu=sigma/(n*e); #calculation of mobility of electron\n",
- "\n",
- "#result\n",
- "print\"The mobility of electrons is =\",mu,\"m^2/V-s\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The mobility of electrons is = 0.00416666666667 m^2/V-s\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.11 , Page no:150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "E_F=5.51; #in eV (Fermi energy in Silver)\n",
- "k=1.38E-23; #in J/K (Boltzmann's constant)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#part-(a)\n",
- "Eo=(3/5)*E_F; #calculation of average energy of free electron at 0K\n",
- "#part-(b)\n",
- "Eo1=Eo*e; #changing unit from eV to J\n",
- "#Since for a classical particle E=(3/2)*k*T\n",
- "#therefroe we have\n",
- "T=(2/3)*Eo1/k; #calculation of temperature for a classical particle (an ideal gas)\n",
- "\n",
- "#result\n",
- "print\"The average energy of free electron at 0K is Eo=\",Eo,\"eV\";\n",
- "print\"The temperature at which a classical particle have this much energy is T=\",T,\"K\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The average energy of free electron at 0K is Eo= 3.306 eV\n",
- "The temperature at which a classical particle have this much energy is T= 25553.6231884 K\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.12 , Page no:150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "E_F_L=4.7; #in eV (Fermi energy in Lithium)\n",
- "E_F_M=2.35; #in eV (Fermi energy in a metal)\n",
- "n_L=4.6E28; #in 1/m^3 (density of electron in Lithium)\n",
- "\n",
- "#calculate\n",
- "#Since n=((2*m/h)^3/2)*E_F^(3/2)*(8*pi/3) and all things except E_F are constant\n",
- "# Therefore we have n=C*E_F^(3/2) where C is proportionality constant\n",
- "#n1/n2=(E_F_1/E_F_2)^(3/2)\n",
- "#Therefore we have\n",
- "n_M=n_L*(E_F_M/E_F_L); #calculation of electron density for a metal\n",
- "\n",
- "#result\n",
- "print\"The lectron density for a metal is =\",n_M,\"1/m^3\";\n",
- "print \"Note: Answer in the book is wrong \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The lectron density for a metal is = 2.3e+28 1/m^3\n",
- "Note: Answer in the book is wrong \n"
- ]
- }
- ],
- "prompt_number": 12
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_07_Dielectric_Properties.ipynb b/Applied_Physics/Chapter_07_Dielectric_Properties.ipynb deleted file mode 100755 index 7280033d..00000000 --- a/Applied_Physics/Chapter_07_Dielectric_Properties.ipynb +++ /dev/null @@ -1,488 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:5117f9d565431f3f25738652845b14f8a6fa036b5c0992b0b2e5d69631937306"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 7:Dielectric Properties"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.1 , Page no:187"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "A=100; #in cm^2 (cross-sectional area)\n",
- "d=1; #in cm (seperation between plates)\n",
- "Eo=8.85E-12; #in F/m (absolute permittivity)\n",
- "V=100; #in V (potential difference)\n",
- "\n",
- "#calculate\n",
- "A1=A*1E-4; #changing unit from cm^2 to m^2\n",
- "d1=d*1E-2; #changing unit from cm to m\n",
- "C=Eo*A1/d1; #calculation of capacitance\n",
- "Q=C*V; #calculation of charge\n",
- "C1=C*1E12; #changing unit of capacitance from F to pF\n",
- "\n",
- "#result\n",
- "print\"The capacitance of capacitor is C=\",C,\"C\";\n",
- "print\"\\t\\t\\t\\t =\",C1,\"C\";\n",
- "print\"The charge on the plates is Q=\",Q,\"C\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The capacitance of capacitor is C= 8.85e-12 C\n",
- "\t\t\t\t = 8.85 C\n",
- "The charge on the plates is Q= 8.85e-10 C\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.2 , Page no:187"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "A=650; #in mm^2 (cross-sectional area)\n",
- "d=4; #in mm (seperation between plates)\n",
- "Eo=8.85E-12; #in F/m (absolute permittivity)\n",
- "Er=3.5; #di-electric constant of the material\n",
- "Q=2E-10; #in C (charge on plates)\n",
- "\n",
- "#calculate\n",
- "A1=A*1E-6; #changing unit from mm^2 to m^2\n",
- "d1=d*1E-3; #changing unit from mm to m\n",
- "C=Er*Eo*A1/d1; #calculation of capacitance\n",
- "V=Q/C; #calculation of charge\n",
- "C1=C*1E12; #changing unit of capacitance from F to pF\n",
- "\n",
- "#result\n",
- "print\"The capacitance of capacitor is C=\",C,\"C\",\n",
- "print\"\\n\\t\\t\\t =\",C1,\"pF\";\n",
- "print\"The resultant voltage across the capacitor is V=\",round(V,3),\"V\";\n",
- "print \"NOTE: The answer in the textbook is wrong\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The capacitance of capacitor is C= 5.0334375e-12 C \n",
- "\t\t\t = 5.0334375 pF\n",
- "The resultant voltage across the capacitor is V= 39.734 V\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.3 , Page no:188"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "N=2.7E25; #in 1/m^3 (density of atoms)\n",
- "E=1E6; #in V/m (electric field)\n",
- "Z=2; #atomic number of Helium \n",
- "Eo=8.85E-12; #in F/m (absolute permittivity)\n",
- "Er=1.0000684; #(dielectric constant of the material)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "#since alpha=Eo*(Er-1)/N=4*pi*Eo*r_0^3 \n",
- "#Therefore we have r_0^3=(Er-1)/(4*pi*N)\n",
- "r_0=((Er-1)/(4*pi*N))**(1/3); #calculation of radius of electron cloud\n",
- "x=4*pi*Eo*E*r_0/(Z*e); #calculation of dispalcement\n",
- "\n",
- "#result\n",
- "print\"The radius of electron cloud is r_0=\",r_0,\"m\";\n",
- "print\"The displacement is x=\",x,\"m\";\n",
- "print \"NOTE: The answer in the textbook is wrong\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The radius of electron cloud is r_0= 5.86454377988e-11 m\n",
- "The displacement is x= 20371.2258874 m\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.4 , Page no:188"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "K=1.000134; #di-elecrtic constant of the neon gas at NTP\n",
- "E=90000; #in V/m (electric field)\n",
- "Eo=8.85E-12; #in C/N-m^2 (absolute premittivity)\n",
- "N_A=6.023E26; #in atoms/Kg-mole (Avogadro's number)\n",
- "V=22.4; #in m^3 (volume of gas at NTP\n",
- "\n",
- "#calculate\n",
- "n=N_A/V; #calculaton of density of atoms\n",
- "#Since P=n*p=(k-1)*Eo*E\n",
- "#therefore we have\n",
- "p=(K-1)*Eo*E/n; #calculation of dipole moment induced\n",
- "alpha=p/E; #calculation of atomic polarisability\n",
- "\n",
- "#result\n",
- "print\"The dipole moment induced in each atom is p=\",p,\"C-m\";\n",
- "print\"The atomic polarisability of neon is =\",alpha,\"c-m^2/V\";\n",
- "print \"NOTE: The answer in the textbook is wrong\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The dipole moment induced in each atom is p= 3.96940793625e-36 C-m\n",
- "The atomic polarisability of neon is = 4.4104532625e-41 c-m^2/V\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.5 , Page no:189"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "Er=3.75; #di-elecrtic constant of sulphur at 27 degree Celcius\n",
- "gama=1/3; #internal field constant\n",
- "p=2050; #in Kg/m^3 (density)\n",
- "M_A=32; #in amu (atomic weight of sulphur)\n",
- "Eo=8.85E-12; #in F/m (absolute permittivity)\n",
- "N=6.022E23; #Avogadro's number\n",
- "\n",
- "#calculate\n",
- "#Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e\n",
- "#therefore we have\n",
- "alpha_e=((Er-1)/(Er+2))*(M_A/p)*(3*Eo/N); #calculation of electronic polarisability of sulphur\n",
- "\n",
- "#result\n",
- "print\"The electronic polarisability of sulphur is =\",alpha_e,\"Fm^2 (roundoff error)\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The electronic polarisability of sulphur is = 3.29143088985e-37 Fm^2 (roundoff error)\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.6 , Page no:189"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "Er=1.0000684; #di-elecrtic constant of Helium gas at NTP\n",
- "Eo=8.85E-12; #in F/m (absolute permittivity)\n",
- "N=2.7E25; #number of atomsper unit volume\n",
- "\n",
- "#calculate\n",
- "#Since Er-1=(N/Eo)*alpha_e\n",
- "#therefore we have\n",
- "alpha_e=Eo*(Er-1)/N; #calculation of electronic polarisability of Helium\n",
- "\n",
- "#result\n",
- "print\"The electronic polarisability of Helium gas is =\",alpha_e,\"Fm^2 (roundoff error)\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The electronic polarisability of Helium gas is = 2.242e-41 Fm^2 (roundoff error)\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.7 , Page no:190"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "N=3E28; #in atoms/m^3 (density of atoms)\n",
- "alpha_e=1E-40; #in F-m^2 (electronic polarisability)\n",
- "Eo=8.85E-12; #in F/m (absolute permittivity)\n",
- "\n",
- "#calculate\n",
- "#Since (Er-1)/(Er+2)=N*alpha_e/(3*Eo)\n",
- "#therefore we have\n",
- "Er=(2*(N*alpha_e/(3*Eo))+1)/(1-(N*alpha_e/(3*Eo)));\n",
- "#calculation of dielectric constant of the material\n",
- "\n",
- "#result\n",
- "print\"The dielectric constant of the material is Er=\",Er,\"F/m\",\n",
- "print \"NOTE: The answer in the book is wrong \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The dielectric constant of the material is Er= 1.3821656051 F/m NOTE: The answer in the book is wrong \n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.8 , Page no:190"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "Er=4; #relative permittivity of sulphur\n",
- "Eo=8.85E-12; #in F/m (absolute permittivity)\n",
- "NA=2.08E3; #in Kg/m^3 (density of atoms in sulphur)\n",
- "\n",
- "#calculate\n",
- "#Since ((Er-1)/(Er+2))*(M_A/p)=(N/(3*Eo))*alpha_e\n",
- "#therefore we have\n",
- "alpha_e=((Er-1)/(Er+2))*(3*Eo/NA); #calculation of electronic polarisability of sulphur\n",
- "\n",
- "#result\n",
- "print\"The electronic polarisability of sulphur is =\",alpha_e,\"Fm^2\";\n",
- "print \"NOTE: The answer in the book is wrong and they used the wrong formula \" \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The electronic polarisability of sulphur is = 6.38221153846e-15 Fm^2\n",
- "NOTE: The answer in the book is wrong and they used the wrong formula \n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.9 , Page no:190"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "alpha1=2.5E-39; #in C^2-m/N (dielectric constant at 300K)\n",
- "alpha2=2.0E-39; #in C^2-m/N (dielectric constant at 400K)\n",
- "T1=300; #in K(first temperature)\n",
- "T2=400; #in K(second temperature)\n",
- "\n",
- "#calculate\n",
- "#since alpha=alpha_d+alpha0 and alpha0=Beta/T\n",
- "#therefore alpha=alpha_d+(Beta/T)\n",
- "#since alpha1=alpha_d+(Beta/T1) and alpha2=alpha_d+(Beta/T2)\n",
- "#therefore alpha1-apha2=Beta*((1/T1)-(1/T2))\n",
- "#or Beta= (alpha1-apha2)/ ((1/T1)-(1/T2))\n",
- "Beta= (alpha1-alpha2)/ ((1/T1)-(1/T2)); #calculation of Beta\n",
- "alpha_d=alpha1-(Beta/T1); #calculation of polarisability due to defromation\n",
- "alpha0_1=Beta/T1; #calculation of polarisability due to permanent dipole moment at 300K\n",
- "alpha0_2=Beta/T2; #calculation of polarisability due to permanent dipole moment at 400K\n",
- "\n",
- "#result\n",
- "print\"The polarisability due to permanent dipole moment at 300K is =\",alpha0_1,\"C^2-m/N\";\n",
- "print\"The polarisability due to permanent dipole moment at 400K is =\",alpha0_2,\"C^2-m/N\";\n",
- "print\"The polarisability due to deformation of the molecules is =\",alpha_d,\"C^2-m/N\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The polarisability due to permanent dipole moment at 300K is = 2e-39 C^2-m/N\n",
- "The polarisability due to permanent dipole moment at 400K is = 1.5e-39 C^2-m/N\n",
- "The polarisability due to deformation of the molecules is = 5e-40 C^2-m/N\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.10 , Page no:191"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "n=1.5; #refractive index\n",
- "Er=5.6; #dielectric constant\n",
- "\n",
- "#calculate\n",
- "#since (Er-1)/(Er+2)=N*(alpha_e+alpha_i)/(3*E0) Clausius-Mossotti equation\n",
- "#and (n^2-1)/(n^2+2)=N*alpha_e/(3*E0) \n",
- "#from above two equations, we get ((n^2-1)/(n^2+2))*((Er+2)/(Er-1))=alpha_e/(alpha_e+alpha_i)\n",
- "#or alpha_i/ (alpha_e+alpha_i)= 1-((n^2-1)/(n^2+2))*((Er+2)/(Er-1))= (say P)\n",
- "#where P is fractional ionisational polarisability\n",
- "P=1-((n**2-1)/(n**2+2))*((Er+2)/(Er-1)); #calculation of fractional ionisational polarisability\n",
- "P1=P*100; #calculation of percentage of ionisational polarisability\n",
- "\n",
- "#result\n",
- "print\"The percentage of ionisational polarisability is =\",P1,\"percent\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The percentage of ionisational polarisability is = 51.4066496164 percent\n"
- ]
- }
- ],
- "prompt_number": 10
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_08_Magnetic_Properties.ipynb b/Applied_Physics/Chapter_08_Magnetic_Properties.ipynb deleted file mode 100755 index 353fc099..00000000 --- a/Applied_Physics/Chapter_08_Magnetic_Properties.ipynb +++ /dev/null @@ -1,323 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:aecad4e644a378cab0352aa29e9045a53c52646739e4f4bd6cdff80f1d0741e6"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 8:Magnetic Properties"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.1 , Page no:236"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "X=-0.5E-5; #magnetic susceptibility of silicon\n",
- "H=0.9E4; #in A/m (magnetic field intensity)\n",
- "mu0=4*3.14*1E-7; #in H/m (absolute permeability)\n",
- "\n",
- "#calculate\n",
- "I=X*H; #calculation of intensity of magnetism\n",
- "B=mu0*H*(1+X); #calculation of magnetic flux density\n",
- "\n",
- "#result\n",
- "print\"The intensity of magnetism is I=\",I,\"A/m\";\n",
- "print\"The magnetic flux density is B=\",round(B,3),\"Wb/m^2\";\n",
- "print \"NOTE: The answer in the textbook is wrong\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The intensity of magnetism is I= -0.045 A/m\n",
- "The magnetic flux density is B= 0.011 Wb/m^2\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.2 , Page no:236"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "r=0.052; #in nm (radius of orbit)\n",
- "B=1; #in Wb/m^2 (magnetic field of induction)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "\n",
- "#calculate\n",
- "r=0.052*1E-9; #changing unit from nm to m\n",
- "d_mu=(e**2*r**2*B)/(4*m); #calculation of change in magnetic moment\n",
- "\n",
- "#result\n",
- "print\"The change in magnetic moment is =\",d_mu,\"Am^2\";\n",
- "print \"NOTE: The answer in the textbook is wrong\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The change in magnetic moment is = 1.90171428571e-29 Am^2\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.3 , Page no:236"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "H=220; #in A/m (magnetic field intensity)\n",
- "I=3300; #in A/m (intensity of magnetisation)\n",
- "\n",
- "#calculate\n",
- "mu_r=1+(I/H); #calculation of relative permeability\n",
- "\n",
- "#result\n",
- "print\"The relative permeability of a ferromagentic material is =\",mu_r;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The relative permeability of a ferromagentic material is = 16.0\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.4 , Page no:236"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "I=3000; #in A/m (intensity of magnetisation)\n",
- "B=0.005; #in Wb/m^2 (magnetic flus intensity)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "mu0=4*pi*1E-7; #in H/m (absolute permeability)\n",
- "\n",
- "#calculate\n",
- "H=(B/mu0)-I; #calculation of magnetic force\n",
- "mu_r=(I/H)+1; #calculation of relative permeability\n",
- "\n",
- "#result\n",
- "print\"The magnetic force is H=\",H;\n",
- "print\"The relative permeability is =\",mu_r;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The magnetic force is H= 980.891719745\n",
- "The relative permeability is = 4.05844155844\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.5 , Page no:237"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "H=4E3; #in A/m (magnetic field intensity)\n",
- "N=60; #number of turns\n",
- "l=12; #in cm (length of solenoid)\n",
- "\n",
- "#calculate\n",
- "n=N/(l*1E-2); #calculation of number of turns per unit metre\n",
- "#Snice H=n*i;\n",
- "i=H/n; #calculation of current through the solenoid\n",
- "\n",
- "#result\n",
- "print\"The current through the solenoid is i=\",i,\"A\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The current through the solenoid is i= 8.0 A\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.6 , Page no:237"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "l=30; #in cm (length of solenoid)\n",
- "A=1; #in cm^2 (cross-sectional area)\n",
- "N=300; #number of turns\n",
- "i=0.032; #in A (current through the winding)\n",
- "phi_B=2E-6; #in Wb (magnetic flux)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "mu0=4*pi*1E-7; #in H/m (absolute permeability)\n",
- "\n",
- "#calculate\n",
- "l=l*1E-2; #changing unit from cm to m\n",
- "A=A*1E-4; #changing unit from cm^2 to m^2\n",
- "B=phi_B/A; #calculation of flux density\n",
- "H=N*i/l; #calculation of magnetic intensity\n",
- "mu=B/H; #calcluation of absolute permeability of iron\n",
- "mu_r=mu/mu0; #calcluation of relative permeability of iron\n",
- "\n",
- "#result\n",
- "print\"The flux density is B=\",B,\"Wb/m^2\";\n",
- "print\"The magnetic intensity is H=\",H,\"A-turns/m\";\n",
- "print\"The relative permeability of iron is =\",round(mu_r),\" (roundoff error)\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The flux density is B= 0.02 Wb/m^2\n",
- "The magnetic intensity is H= 32.0 A-turns/m\n",
- "The relative permeability of iron is = 498.0 (roundoff error)\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.7 , Page no:238"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "A=100; #in m^2 (area of Hysteresis loop)\n",
- "B=0.01; #in Wb/m^2 (unit space along vertical axis or magnetic flux density)\n",
- "H=40; #in A/m (unit space along horizontal axis or magnetic fild ntensity)\n",
- "\n",
- "#calculate\n",
- "H_L=A*B*H; #calculation of magnetic intensity\n",
- "\n",
- "#result\n",
- "print\"The Hystersis loss per cycle is =\",round(H_L),\"J/m^2\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Hystersis loss per cycle is = 40.0 J/m^2\n"
- ]
- }
- ],
- "prompt_number": 7
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_09_Semiconductors.ipynb b/Applied_Physics/Chapter_09_Semiconductors.ipynb deleted file mode 100755 index f3c26825..00000000 --- a/Applied_Physics/Chapter_09_Semiconductors.ipynb +++ /dev/null @@ -1,782 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:eb4f284d8d12c103b674cc454947abe9c7a1a76e2d11836f2841ba55d4adeef7"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 9:Semiconductors"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.2 , Page no:272"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "Eg=0.67; #in eV (Energy band gap)\n",
- "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n",
- "T1=298; #in K (room temperature)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "K=10; #ratio of number of electrons at different temperature\n",
- "\n",
- "#calculate\n",
- "Eg=Eg*e; #changing unit from eV to Joule\n",
- "#since ne=Ke*exp(-Eg/(2*k*T))\n",
- "#and ne/ne1=exp(-Eg/(2*k*T))/exp(-Eg/(2*k*T1)) and ne/ne1=K=10\n",
- "#therefore we have 10=exp(-Eg/(2*k*T))/exp(-Eg/(2*k*T1))\n",
- "#re-arranging the equation for T, we get T2=1/((1/T1)-((2*k*log(10))/Eg))\n",
- "T=1/((1/T1)-((2*k*math.log(10))/Eg)); #calculation of the temperature\n",
- "\n",
- "#result\n",
- "print\"The temperature at which number of electrons in the conduction band of a semiconductor increases by a factor of 10 is T=\",round(T),\"K (roundoff error)\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The temperature at which number of electrons in the conduction band of a semiconductor increases by a factor of 10 is T= 362.0 K (roundoff error)\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.3 , Page no:272"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "ni=2.5E13; #in /cm^3 (intrinsic carrier density)\n",
- "ue=3900; #in cm^2/(V-s) (electron mobilities)\n",
- "uh=1900; #in cm^2/(V-s) (hole mobilities)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "l=1; #in cm (lenght of the box)\n",
- "b=1;h=1; #in mm (dimensions of germanium rod )\n",
- "\n",
- "#calculate\n",
- "ni=ni*1E6; #changing unit from 1/cm^3 to 1/m^3\n",
- "ue=ue*1E-4; #changing unit from cm^2 to m^2\n",
- "uh=uh*1E-4; #changing unit from cm^2 to m^2\n",
- "sigma=ni*e*(ue+uh); #calculation of conductivity\n",
- "rho=1/sigma; #calculation of resistivity\n",
- "l=l*1E-2; #changing unit from mm to m for length\n",
- "A=(b*1E-3)*(h*1E-3); #changing unit from mm to m for width and height and calculation of cross-sectional area\n",
- "R=rho*l/A; #calculation of resistance\n",
- "\n",
- "#result\n",
- "print\"The resistance of intrinsic germanium is R=\",R,\"ohm\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The resistance of intrinsic germanium is R= 4310.34482759 ohm\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.4 , Page no:273"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "ne=2.5E19; #in /m^3 (electron density)\n",
- "nh=2.5E19; #in /m^3 (hole density)\n",
- "ue=0.36; #in m^2/(V-s) (electron mobilities)\n",
- "uh=0.17; #in m^2/(V-s) (hole mobilities)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#since ne=nh=ni, therefore we have \n",
- "ni=nh;\n",
- "sigma=ni*e*(ue+uh); #calculation of conductivity\n",
- "rho=1/sigma; #calculation of resistivity\n",
- "\n",
- "#result\n",
- "print\"The conductivity of germanium is =\",round(sigma,2),\"/ohm-m\";\n",
- "print\"The resistivity of germanium is =\",round(rho,2),\"ohm-m\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The conductivity of germanium is = 2.12 /ohm-m\n",
- "The resistivity of germanium is = 0.47 ohm-m\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.5 , Page no:273"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "ni=1.5E16; #in /m^3 (intrinsic carrier density)\n",
- "ue=0.135; #in m^2/(V-s) (electron mobilities)\n",
- "uh=0.048; #in m^2/(V-s) (hole mobilities)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "ND=1E23; #in atom/m^3 (doping concentration)\n",
- "\n",
- "#calculate\n",
- "sigma_i=ni*e*(ue+uh); #calculation of intrinsic conductivity\n",
- "sigma=ND*ue*e; #calculation of conductivity after doping\n",
- "rho=ni**2/ND; #calculation of equilibrium hole concentration\n",
- "\n",
- "#result\n",
- "print\"The intrinsic conductivity for silicon is =\",sigma_i,\"S\";\n",
- "print\"The conductivity after doping with phosphorus atoms is =\",sigma,\"S\";\n",
- "print\"The equilibrium hole concentration is =\",rho,\"/m^3\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The intrinsic conductivity for silicon is = 0.0004392 S\n",
- "The conductivity after doping with phosphorus atoms is = 2160.0 S\n",
- "The equilibrium hole concentration is = 2250000000.0 /m^3\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.6 , Page no:274"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "ni=1.5E16; #in /m^3 (intrinsic carrier density)\n",
- "ue=0.13; #in m^2/(V-s) (electron mobilities)\n",
- "uh=0.05; #in m^2/(V-s) (hole mobilities)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "ne=5E20; #in /m^3 (concentration of donor type impurity)\n",
- "nh=5E20; #in /m^3 (concentration of acceptor type impurity)\n",
- "\n",
- "#calculate\n",
- "#part-i\n",
- "sigma=ni*e*(ue+uh); #calculation of intrinsic conductivity\n",
- "#part-ii\n",
- "#since 1 donor atom is in 1E8 Si atoms, hence holes concentration can be neglected\n",
- "sigma1=ne*e*ue; #calculation of conductivity after doping with donor type impurity\n",
- "#part-iii\n",
- "#since 1 acceptor atom is in 1E8 Si atoms, hence electron concentration can be neglected\n",
- "sigma2=nh*e*uh; #calculation of conductivity after doping with acceptor type impurity\n",
- "\n",
- "#result\n",
- "print\"The intrinsic conductivity for silicon is =\",sigma,\"(ohm-m)^-1\";\n",
- "print\"The conductivity after doping with donor type impurity is =\",sigma1,\"(ohm-m)^-1\";\n",
- "print\"The conductivity after doping with acceptor type impurity is =\",sigma2,\"(ohm-m)^-1\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The intrinsic conductivity for silicon is = 0.000432 (ohm-m)^-1\n",
- "The conductivity after doping with donor type impurity is = 10.4 (ohm-m)^-1\n",
- "The conductivity after doping with acceptor type impurity is = 4.0 (ohm-m)^-1\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.7 , Page no:274"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "ni=1E20; #in /m^3 (intrinsic carrier density)\n",
- "ND=1E21; #in /m^3 (donor impurity concentration)\n",
- "\n",
- "#calculate\n",
- "nh=ni**2/ND; #calculation of density of hole carriers at room temperature\n",
- "\n",
- "#result\n",
- "print\"The density of hole carriers at room temperature is nh=\",nh,\"/m^3\";\n",
- "#Note: answer in the book is wrong due to printing mistake"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The density of hole carriers at room temperature is nh= 1e+19 /m^3\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.8 , Page no:275"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "M=72.6; #atomic mass of germanium\n",
- "P=5400; #in Kg/m^3 (density)\n",
- "ue=0.4; #in m^2/V-s (mobility of electrons)\n",
- "uh=0.2; #in m^2/V-s (mobility of holes)\n",
- "Eg=0.7; #in eV (Band gap)\n",
- "m=9.1E-31; #in Kg (mass of electron)\n",
- "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n",
- "T=300; #in K (temperature)\n",
- "h=6.63E-34; #in J/s (Planck\u2019s constant)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "e=1.6E-19; #in C(charge of electron)\n",
- "\n",
- "#calculate\n",
- "Eg=Eg*e; #changing unit from eV to J\n",
- "ni=2*(2*pi*m*k*T/h**2)**(3/2)*math.exp(-Eg/(2*k*T));\n",
- "sigma=ni*e*(ue+uh);\n",
- "\n",
- "#result\n",
- "print\"The intrinsic carrier density for germanium at 300K is ni=\",ni,\"/m^3\";\n",
- "print\"The conductivity of germanium is=\",round(sigma,3),\"(ohm-m)^-1\";\n",
- "print \"NOTE: The answer in the textbook is wrong\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The intrinsic carrier density for germanium at 300K is ni= 3.33408559508e+19 /m^3\n",
- "The conductivity of germanium is= 3.201 (ohm-m)^-1\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.9 , Page no:275"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "rho1=4.5; #in ohm-m (resistivity at 20 degree Celcius)\n",
- "rho2=2.0; #in ohm-m (resistivity at 32 degree Celcius)\n",
- "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n",
- "T1=20; T2=32; #in degree Celcius (two temperatures)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "T1=T1+273; #changing unit from degree Celius to K\n",
- "T2=T2+273; #changing unit from degree Celius to K\n",
- "#since sigma=e*u*C*T^(3/2)*exp(-Eg/(2*k*T))\n",
- "#therefore sigma1/sigma2=(T1/T2)^3/2*exp((-Eg/(2*k)*((1/T1)-(1/T2))\n",
- "#and sigma=1/rho \n",
- "#therefore we have rho2/rho1=(T1/T2)^3/2*exp((-Eg/(2*k)*((1/T1)-(1/T2))\n",
- "#re-arranging above equation for Eg, we get Eg=(2*k/((1/T1)-(1/T2)))*((3/2)*log(T1/T2)-log(rho2/rho1))\n",
- "Eg=(2*k/((1/T1)-(1/T2)))*((3/2)*math.log(T1/T2)-math.log(rho2/rho1));\n",
- "Eg1=Eg/e;#changing unit from J to eV\n",
- "\n",
- "#result\n",
- "print\"The energy band gap is Eg=\",Eg,\"J\";\n",
- "print\"\\t\\t\\t =\",round(Eg1,3),\"eV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The energy band gap is Eg= 1.54302914521e-19 J\n",
- "\t\t\t = 0.964 eV\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.10 , Page no:276"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "rho=2300; #in ohm-m (resistivity of pure silicon)\n",
- "ue=0.135; #in m^2/V-s (mobility of electron)\n",
- "uh=0.048; #in m^2/V-s (mobility of electron)\n",
- "Nd=1E19; #in /m^3 (doping concentration)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "#since sigma=ni*e*(ue+uh) and sigma=1/rho\n",
- "#therefore ni=1/(rho*e*(ue+uh))\n",
- "ni=1/(rho*e*(ue+uh)); #calculation of intrinsic concentration\n",
- "ne=Nd; #calculation of electron concentration\n",
- "nh=ni**2/Nd; #calculation of hole concentration\n",
- "sigma=ne*ue*e+nh*uh*e; #calculation of conductivity\n",
- "rho=1/sigma; #calculation of resistivity\n",
- "\n",
- "#result\n",
- "print\"The electron concentration is ne=\",ne,\"/m^3\";\n",
- "print\"The hole concentration is nh=\",nh,\"/m^3\";\n",
- "print\"The resistivity of the specimen is =\",round(rho,3),\"ohm-m\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The electron concentration is ne= 1e+19 /m^3\n",
- "The hole concentration is nh= 2.20496745228e+13 /m^3\n",
- "The resistivity of the specimen is = 4.63 ohm-m\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.11 , Page no:276"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "uh=1900; #in cm^2/V-s (mobility of electron)\n",
- "Na=2E17; #in /m^3 (acceptor doping concentration)\n",
- "e=1.6E-19; #in C(charge of electron)\n",
- "\n",
- "#calculate\n",
- "uh=uh*1E-4; #changing unit from cm^2/V-s to m^2/V-s\n",
- "Na=Na*1E6; #changing unit from 1/cm^3 to 1/m^3\n",
- "nh=Na; #hole concentration \n",
- "#since sigma=ne*ue*e+nh*uh*e and nh>>ne\n",
- "#therefore sigma=nh*uh*e\n",
- "sigma=nh*uh*e; #calculation of conductivity\n",
- "\n",
- "#result\n",
- "print\"The conductivity of p-type Ge crystal is =\",sigma,\"/ohm-m (roundoff error)\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The conductivity of p-type Ge crystal is = 6080.0 /ohm-m (roundoff error)\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.12 , Page no:277"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "ue=0.19; #in m^2/V-s (mobility of electron)\n",
- "T=300; #in K (temperature)\n",
- "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n",
- "e=1.6E-19; #in C(charge of electron)\n",
- "\n",
- "#calculate\n",
- "Dn=ue*k*T/e; #calculation of diffusion co-efficient\n",
- "\n",
- "#result\n",
- "print\"The diffusion co-efficient of electron in silicon is Dn=\",Dn,\"m^2/s\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The diffusion co-efficient of electron in silicon is Dn= 0.00491625 m^2/s\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.13 , Page no:277"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "Eg=0.4; #in eV (Band gap of semiconductor)\n",
- "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n",
- "T1=0; #in degree Celcius (first temperature)\n",
- "T2=50; #in degree Celcius (second temperature)\n",
- "T3=100; #in degree Celcius (third temperature)\n",
- "e=1.602E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "T1=T1+273; #changing temperature form Celcius to Kelvin\n",
- "T2=T2+273; #changing temperature form Celcius to Kelvin\n",
- "T3=T3+273; #changing temperature form Celcius to Kelvin\n",
- "Eg=Eg*e; #changing unit from eV to Joule\n",
- "#Using F_E=1/(1+exp(Eg/2*k*T))\n",
- "F_E1=1/(1+math.exp(Eg/(2*k*T1))); #calculation of probability of occupation of lowest level at 0 degree Celcius\n",
- "F_E2=1/(1+math.exp(Eg/(2*k*T2))); #calculation of probability of occupation of lowest level at 50 degree Celcius\n",
- "F_E3=1/(1+math.exp(Eg/(2*k*T3))); #calculation of probability of occupation of lowest level at 100 degree Celcius\n",
- "\n",
- "#result\n",
- "print\"The probability of occupation of lowest level in conduction band is\";\n",
- "print\"\\t at 0 degree Celcius, F_E=\",F_E1,\"eV\";\n",
- "print\"\\t at 50 degree Celcius, F_E=\",F_E2,\"eV\";\n",
- "print\"\\t at 100 degree Celcius, F_E=\",F_E3,\"eV\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The probability of occupation of lowest level in conduction band is\n",
- "\t at 0 degree Celcius, F_E= 0.000202505914236 eV\n",
- "\t at 50 degree Celcius, F_E= 0.000754992968827 eV\n",
- "\t at 100 degree Celcius, F_E= 0.00197639649915 eV\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.14 , Page no:278"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "Eg=1.2; #in eV (Energy band gap)\n",
- "k=1.38E-23; #in J/K (Boltzmann\u2019s constant)\n",
- "T1=600; T2=300; #in K (two temperatures)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "Eg=Eg*e; #changing unit from eV to Joule\n",
- "#since sigma is proportional to exp(-Eg/(2*k*T))\n",
- "#therefore ratio=sigma1/sigma2=exp(-Eg/(2*k*((1/T1)-(1/T2))));\n",
- "ratio= math.exp((-Eg/(2*k))*((1/T1)-(1/T2))); #calculation of ratio of conductivity at 600K and at 300K\n",
- "\n",
- "#result\n",
- "print\"The ratio of conductivity at 600K and at 300K is =\",ratio;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The ratio of conductivity at 600K and at 300K is = 108467.17792\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.15 , Page no:278"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "ue=0.39; #in m^2/V-s (mobility of electron)\n",
- "n=5E13; #number of donor atoms\n",
- "ni=2.4E19; #in atoms/m^3 (intrinsic carrier density)\n",
- "l=10; #in mm (length of rod)\n",
- "a=1; #in mm (side of square cross-section)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "l=l*1E-3; #changing unit from mm to m\n",
- "a=a*1E-3; #changing unit from mm to m\n",
- "A=a**2; #calculation of cross-section area\n",
- "Nd=n/(l*A); #calculation of donor concentration\n",
- "ne=Nd; #calculation of electron density\n",
- "nh=ni**2/Nd; #calculation of hole density\n",
- "#since sigma=ne*e*ue+nh*e*ue and since ne>>nh\n",
- "#therefore sigma=ne*e*ue\n",
- "sigma=ne*e*ue; #calculation of conductivity\n",
- "rho=1/sigma; #calculation of resistivity\n",
- "R=rho*l/A; #calculation of resistance \n",
- "\n",
- "#result\n",
- "print\"The electron density is ne=\",ne,\"/m^3\";\n",
- "print\"The hole density is nh=\",nh,\"/m^3\";\n",
- "print\"The conductivity is =\",sigma,\"/ohm-m\";\n",
- "print\"The resistance is R=\",round(R),\"ohm\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The electron density is ne= 5e+21 /m^3\n",
- "The hole density is nh= 1.152e+17 /m^3\n",
- "The conductivity is = 312.0 /ohm-m\n",
- "The resistance is R= 32.0 ohm\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.16 , Page no:279"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "RH=3.66E-4; #in m^3/C (Hall coefficient)\n",
- "rho=8.93E-3; #in ohm-m (resistivity)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "u=RH/rho; #calculation of mobility\n",
- "n=1/(RH*e); #calculation of density\n",
- "\n",
- "#result\n",
- "print\"The mobility is u=\",u,\"m^2/(V-s)\";\n",
- "print\"The density is n=\",n,\"/m^3\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The mobility is u= 0.0409854423292 m^2/(V-s)\n",
- "The density is n= 1.70765027322e+22 /m^3\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.17 , Page no:279"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "RH=3.66E-4; #in m^3/C (Hall coefficient)\n",
- "rho=8.93E-3; #in ohm-m (resistivity)\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "\n",
- "#calculate\n",
- "nh=1/(RH*e); #calculation of density of charge carrier\n",
- "uh=1/(rho*nh*e); #calculation of mobility of charge carrier\n",
- "\n",
- "#result\n",
- "print\"The density of charge carrier is nh=\",nh,\"/m^3\";\n",
- "print\"The mobility of charge carrier is uh=\",uh,\"m^2/(V-s)\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The density of charge carrier is nh= 1.70765027322e+22 /m^3\n",
- "The mobility of charge carrier is uh= 0.0409854423292 m^2/(V-s)\n"
- ]
- }
- ],
- "prompt_number": 16
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_10_Superconductivity.ipynb b/Applied_Physics/Chapter_10_Superconductivity.ipynb deleted file mode 100755 index 7b7470a8..00000000 --- a/Applied_Physics/Chapter_10_Superconductivity.ipynb +++ /dev/null @@ -1,316 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:03ee5374207ea96e9a4f31e16f771d187a11f07daf287d94fc54e352b5db8bff"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 10:Superconductivity"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.1 , Page no:313"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "Tc=7.2; #in K (critical temperature)\n",
- "T=5; #in K (given temperature)\n",
- "H0=6.5E3; #in A/m (critical magnetic field at 0K)\n",
- "\n",
- "#calculate\n",
- "Hc=H0*(1-(T/Tc)**2); #calculation of magnitude of critical magnetic field\n",
- "\n",
- "#result\n",
- "print\"The magnitude of critical magnetic field is Hc=\",round(Hc,2),\"A/m\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The magnitude of critical magnetic field is Hc= 3365.35 A/m\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.2 , Page no:313"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "r=0.02; #in m (radius of ring)\n",
- "Hc=2E3; #in A/m (critical magnetic field at 5K)\n",
- "pi=3.14; #value of pi used in the solutiion\n",
- "\n",
- "#calculate\n",
- "Ic=2*pi*r*Hc; #calculation of critical current value\n",
- "\n",
- "#result\n",
- "print\"The critical current value is Ic=\",Ic,\"A\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The critical current value is Ic= 251.2 A\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.3 , Page no:313"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "M1=199.5; #in amu (isotropic mass at 5K)\n",
- "T1=5; #in K (first critical temperature)\n",
- "T2=5.1; #in K (second critical temperature)\n",
- "#calculate\n",
- "#since Tc=C*(1/sqrt(M)\n",
- "#therefore T1*sqrt(M1)=T2*sqrt(M2)\n",
- "#therefore we have M2=(T1/T2)^2*M1\n",
- "M2=(T1/T2)**2*M1; #calculation of isotropic mass at 5.1K\n",
- "\n",
- "#result\n",
- "print\"The isotropic mass at 5.1K is M2=\",round(M2,3),\"a.m.u.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The isotropic mass at 5.1K is M2= 191.753 a.m.u.\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.4 , Page no:314"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "T=6; #in K (given temperature)\n",
- "Hc=5E3; #in A/m (critical magnetic field at 5K)\n",
- "H0=2E4; #in A/m (critical magnetic field at 0K)\n",
- "\n",
- "#calculate\n",
- "#since Hc=H0*(1-(T/Tc)^2)\n",
- "#therefor we have Tc=T/sqrt(1-(Hc/H)^2)\n",
- "Tc=T/math.sqrt(1-(Hc/H0)); #calculation of transition temperature\n",
- "\n",
- "#result\n",
- "print\"The transition temperature is Tc=\",round(Tc,3),\"K\";\n",
- "print \"NOTE: The answer in the textbook is wrong\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The transition temperature is Tc= 6.928 K\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.5 , Page no:314"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "T=5; #in K (given temperature)\n",
- "d=3; #in mm (diameter of the wire)\n",
- "Tc=8; #in K (critical temperature for Pb)\n",
- "H0=5E4; #in A/m (critical magnetic field at 0K)\n",
- "pi=3.14; #value of pi used in the solution\n",
- "\n",
- "#calculate\n",
- "Hc=H0*(1-(T/Tc)**2); #calculation of critical magnetic field at 5K\n",
- "r=(d*1E-3)/2; #calculation of radius in m\n",
- "Ic=2*pi*r*Hc; #calculation of critical current at 5K\n",
- "\n",
- "#result\n",
- "print\"The critical magnetic field at 5K is Hc=\",Hc,\"A/m\";\n",
- "print\"The critical current at 5K is Ic=\",Ic,\"A\";\n",
- "print \" (roundoff error)\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The critical magnetic field at 5K is Hc= 30468.75 A/m\n",
- "The critical current at 5K is Ic= 287.015625 A\n",
- " (roundoff error)\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.6 , Page no:314"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "V=8.50; #in micro V (voltage across Josephson junction )\n",
- "e=1.6E-19; #in C (charge of electron)\n",
- "h=6.626E-34; #in J/s (Planck\u2019s constant)\n",
- "\n",
- "#calculate\n",
- "V=V*1E-6; #changing unit from V to microVolt\n",
- "v1=2*e*V/h; #calculation of frequency of EM waves\n",
- "\n",
- "#result\n",
- "print\"The frequency of EM waves is v=\",v1,\"Hz\";\n",
- "print \"NOTE: The answer in the textbook is wrong\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The frequency of EM waves is v= 4105040748.57 Hz\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.7 , Page no:315"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "M1=200.59; #in amu (average atomic mass at 4.153K)\n",
- "Tc1=4.153; #in K (first critical temperature)\n",
- "M2=204; #in amu (average atomic mass of isotopes)\n",
- "\n",
- "#calculate\n",
- "#since Tc=C*(1/sqrt(M)\n",
- "#therefore T1*sqrt(M1)=T2*sqrt(M2)\n",
- "#therefore we have Tc2=Tc1*sqrt(M1/M2)\n",
- "Tc2=Tc1*math.sqrt(M1/M2); #calculation of transition temperature of the isotopes\n",
- "\n",
- "#result\n",
- "print\"The transition temperature of the isotopes is Tc2=\",round(Tc2,3),\"K\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The transition temperature of the isotopes is Tc2= 4.118 K\n"
- ]
- }
- ],
- "prompt_number": 7
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics/Chapter_12Fibre_Optics.ipynb b/Applied_Physics/Chapter_12Fibre_Optics.ipynb deleted file mode 100755 index 95067254..00000000 --- a/Applied_Physics/Chapter_12Fibre_Optics.ipynb +++ /dev/null @@ -1,365 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:13927a6aa5f4b8929243c9ca2c470f4da4ee5b45564e616337e68523dd18d625"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 12:Fibre Optics"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12.1 , Page no:360"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "u1=1.563; #refractive index of core\n",
- "u2=1.498; #refractive index of cladding\n",
- "\n",
- "#calculate\n",
- "d=(u1-u2)/u1; #calculation of fractional index change\n",
- "\n",
- "#result\n",
- "print\"The fractional index change for a given optical fibre is =\",round(d,4);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The fractional index change for a given optical fibre is = 0.0416\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12.2 , Page no:360"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "u1=1.55; #refractive index of core\n",
- "u2=1.50; #refractive index of cladding\n",
- "\n",
- "#calculate\n",
- "d=(u1-u2)/u1; #calculation of fractional index change\n",
- "NA=u1*math.sqrt(2*d); #calculation of numerical aperture\n",
- "theta=math.asin(NA); #calculation of acceptance angle\n",
- "theta1=theta*180/3.14;\n",
- "\n",
- "#result\n",
- "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n",
- "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The numerical aperture of the fibre is NA= 0.394\n",
- "The acceptance angle of the optical fibre is = 23.2 degree\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12.3 , Page no:360"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "u1=1.563; #refractive index of core\n",
- "u2=1.498; #refractive index of cladding\n",
- "\n",
- "#calculate\n",
- "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n",
- "theta=math.asin(NA); #calculation of acceptance angle\n",
- "theta1=theta*180/3.14;\n",
- "#result\n",
- "print\"The numerical aperture of the fibre is NA=\",round(NA,4);\n",
- "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The numerical aperture of the fibre is NA= 0.4461\n",
- "The acceptance angle of the optical fibre is = 26.5 degree\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12.4 , Page no:360"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "NA=0.39; #numerical aperture of the optical fibre\n",
- "d=0.05; #difference in the refractive index of the material of the core and cladding\n",
- "\n",
- "#calculate\n",
- "#since NA=u1*sqrt(2*d)\n",
- "#we have u1=NA/sqrt(2*d)\n",
- "u1= NA/math.sqrt(2*d); #calculation of refractive index of material of the core\n",
- "\n",
- "#result\n",
- "print\"The refractive index of material of the core is u1=\",round(u1,3);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The refractive index of material of the core is u1= 1.233\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12.5 , Page no:361"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "u1=1.50; #refractive index of core\n",
- "u2=1.45; #refractive index of cladding\n",
- "\n",
- "#calculate\n",
- "d=(u1-u2)/u1; #calculation of fractional index change\n",
- "NA=u1*math.sqrt(2*d); #calculation of numerical aperture\n",
- "theta_0=math.asin(NA); #calculation of acceptance angle\n",
- "theta_01=theta_0*180/3.14;\n",
- "theta_c=math.asin(u2/u1); #calculation of critical angle\n",
- "theta_c1=theta_c*180/3.14;\n",
- "\n",
- "#result\n",
- "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n",
- "print\"The acceptance angle of the optical fibre is =\",round(theta_01,2),\"degree\";\n",
- "print\"The critical angle of the optical fibre is =\",round(theta_c1,2),\"degree\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The numerical aperture of the fibre is NA= 0.387\n",
- "The acceptance angle of the optical fibre is = 22.8 degree\n",
- "The critical angle of the optical fibre is = 75.2 degree\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12.6 , Page no:361"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "NA=0.33; #numerical aperture\n",
- "d=0.02; #difference in the refractive index of the core and cladding of the material\n",
- "\n",
- "#calculate\n",
- "#since NA=u1*sqrt(2*d)\n",
- "#therefore we have\n",
- "u1=NA/math.sqrt(2*d); #calculation of refractive index of the core\n",
- "#since d=(u1-u2)/u2\n",
- "#therefore we have\n",
- "u2=(1-d)*u1; #calculation of refractive index of the cladding\n",
- "\n",
- "#result\n",
- "print\"The refractive index of the core is u1=\",round(u1,2);\n",
- "print\"The refractive index of the cladding is u2=\",round(u2,3);\n",
- "print \"NOTE: The answer in the textbook is wrong\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The refractive index of the core is u1= 1.65\n",
- "The refractive index of the cladding is u2= 1.617\n",
- "NOTE: The answer in the textbook is wrong\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12.7 , Page no:361"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "u1=3.5; #refractive index of core\n",
- "u2=3.45; #refractive index of cladding\n",
- "u0=1; #refractive index of the air\n",
- "\n",
- "#calculate\n",
- "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n",
- "NA1=NA/u0;\n",
- "alpha=math.asin(NA); #calculation of acceptance angle\n",
- "alpha1=alpha*180/3.14;\n",
- "#result\n",
- "print\"The numerical aperture of the fibre is NA=\",round(NA1,2);\n",
- "print\"The acceptance angle of the optical fibre is =\",round(alpha1,2),\"degree\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The numerical aperture of the fibre is NA= 0.59\n",
- "The acceptance angle of the optical fibre is = 36.14 degree\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12.8 , Page no:361"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#given\n",
- "u1=1.48; #refractive index of core\n",
- "u2=1.45; #refractive index of cladding\n",
- "\n",
- "#calculate\n",
- "NA=math.sqrt(u1**2-u2**2); #calculation of numerical aperture\n",
- "theta=math.asin(NA); #calculation of acceptance angle\n",
- "theta1=theta*180/3.14;\n",
- "#result\n",
- "print\"The numerical aperture of the fibre is NA=\",round(NA,3);\n",
- "print\"The acceptance angle of the optical fibre is =\",round(theta1,2),\"degree\";\n",
- "print \" (roundoff error)\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The numerical aperture of the fibre is NA= 0.296\n",
- "The acceptance angle of the optical fibre is = 17.26 degree\n",
- " (roundoff error)\n"
- ]
- }
- ],
- "prompt_number": 8
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Applied_Physics_II/Chapter_1.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_1.ipynb index c6e00369..c6e00369 100755 --- a/Applied_Physics_II/Chapter_1.ipynb +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_1.ipynb diff --git a/Applied_Physics_II/Chapter_2.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_2.ipynb index ae487344..ae487344 100755 --- a/Applied_Physics_II/Chapter_2.ipynb +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_2.ipynb diff --git a/Applied_Physics_II/Chapter_3.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_3.ipynb index 61c99435..61c99435 100755 --- a/Applied_Physics_II/Chapter_3.ipynb +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_3.ipynb diff --git a/Applied_Physics_II/Chapter_4.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_4.ipynb index f94b4b09..f94b4b09 100755 --- a/Applied_Physics_II/Chapter_4.ipynb +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_4.ipynb diff --git a/Applied_Physics_II/Chapter_5.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_5.ipynb index 2ad76975..2ad76975 100755 --- a/Applied_Physics_II/Chapter_5.ipynb +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_5.ipynb diff --git a/Applied_Physics_II/Chapter_6.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_6.ipynb index cc609a3f..cc609a3f 100755 --- a/Applied_Physics_II/Chapter_6.ipynb +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_6.ipynb diff --git a/Applied_Physics_II/Chapter_7.ipynb b/Applied_Physics_II_by_H_J_Sawant/Chapter_7.ipynb index 3425e831..3425e831 100755 --- a/Applied_Physics_II/Chapter_7.ipynb +++ b/Applied_Physics_II_by_H_J_Sawant/Chapter_7.ipynb diff --git a/Applied_Physics_II/README.txt b/Applied_Physics_II_by_H_J_Sawant/README.txt index 717d1591..717d1591 100755 --- a/Applied_Physics_II/README.txt +++ b/Applied_Physics_II_by_H_J_Sawant/README.txt diff --git a/Applied_Physics_II/screenshots/halfangular.png b/Applied_Physics_II_by_H_J_Sawant/screenshots/halfangular.png Binary files differindex 6c38e8b8..6c38e8b8 100755 --- a/Applied_Physics_II/screenshots/halfangular.png +++ b/Applied_Physics_II_by_H_J_Sawant/screenshots/halfangular.png diff --git a/Applied_Physics_II/screenshots/probability.png b/Applied_Physics_II_by_H_J_Sawant/screenshots/probability.png Binary files differindex f8d2ba6f..f8d2ba6f 100755 --- a/Applied_Physics_II/screenshots/probability.png +++ b/Applied_Physics_II_by_H_J_Sawant/screenshots/probability.png diff --git a/Applied_Physics_II/screenshots/visiblerange.png b/Applied_Physics_II_by_H_J_Sawant/screenshots/visiblerange.png Binary files differindex c4d798f7..c4d798f7 100755 --- a/Applied_Physics_II/screenshots/visiblerange.png +++ b/Applied_Physics_II_by_H_J_Sawant/screenshots/visiblerange.png diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb index d22b0652..d22b0652 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb index 8cceaf30..8cceaf30 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb index ab9df13e..ab9df13e 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb index ee510033..ee510033 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb index 932802eb..932802eb 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb index 296cc228..296cc228 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb index 1fa2a887..1fa2a887 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb index aee8cc8e..aee8cc8e 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb index 65bfb32c..65bfb32c 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb index 75da7597..75da7597 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb index 499ce19f..499ce19f 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb index 0ed7bb65..0ed7bb65 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png Binary files differindex fd8c4d66..fd8c4d66 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png Binary files differindex 4e931e38..4e931e38 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png Binary files differindex 6122ce51..6122ce51 100644..100755 --- a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png +++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter11.ipynb b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter11.ipynb new file mode 100755 index 00000000..d0036604 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter11.ipynb @@ -0,0 +1,608 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#11: Lasers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.1, Page number 11.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "intensity of laser beam is 1.5 *10**4 watt/m**2\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",
+ "P=20*10**-3; #power(watt)\n",
+ "r=1.3/2; #radius(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "r=r*10**-3; #radius(m)\n",
+ "I=P/(math.pi*r**2); #intensity of laser beam(watt/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"intensity of laser beam is\",round(I/10**4,1),\"*10**4 watt/m**2\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.2, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mode seperation in frequency is 2.5 *10**8 Hz\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/sec)\n",
+ "L=0.6; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_v=c/(2*L); #mode seperation in frequency(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"mode seperation in frequency is\",delta_v/10**8,\"*10**8 Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.3, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "coherence length is 1.5 *10**-2 m\n",
+ "band width is 2.0 *10**10 Hz\n",
+ "line width is 0.026 nm\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/sec)\n",
+ "delta_t=0.05*10**-9; #time(s)\n",
+ "lamda=623.8*10**-9; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "cl=c*delta_t; #coherence length(m)\n",
+ "delta_v=1/delta_t; #band width(Hz)\n",
+ "delta_lamda=lamda**2*delta_v/c; #line width(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"coherence length is\",cl*10**2,\"*10**-2 m\"\n",
+ "print \"band width is\",delta_v/10**10,\"*10**10 Hz\"\n",
+ "print \"line width is\",round(delta_lamda*10**9,3),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.4, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy difference is 1.96 eV\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/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=632.8*10**-9; #wavelength(m)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "E=c*h/(lamda*e); #energy difference(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy difference is\",round(E,2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.5, Page number 11.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of population is 8.95 *10**-32\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",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6928*10**-10; #wavelength(m)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=291; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_E=c*h/lamda;\n",
+ "N=math.exp(-delta_E/(Kb*T)); #ratio of population\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of population is\",round(N*10**32,2),\"*10**-32\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.6, Page number 11.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 632 *10**-9 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=330; #temperature(K)\n",
+ "delta_E=3.147*10**-19; #energy(J)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=c*h/delta_E; #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",int(lamda*10**9),\"*10**-9 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.7, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "laser beam divergence is 0.5 *10**-3 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=2*10**-3; #radius(m)\n",
+ "r2=3*10**-3; #radius(m)\n",
+ "d1=2; #distance(m)\n",
+ "d2=4; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_theta=(r2-r1)/(d2-d1); #laser beam divergence(radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"laser beam divergence is\",delta_theta*10**3,\"*10**-3 radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.8, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of population is 1.127 *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",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6943*10**-10; #wavelength(m)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "new=c/lamda;\n",
+ "N=math.exp(h*new/(Kb*T)); #ratio of population\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of population is\",round(N*10**-30,3),\"*10**30\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.9, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 8632.8 angstrom\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",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "Eg=1.44*1.6*10**-19; #band gap(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=c*h/Eg; #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**10,1),\"angstrom\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.10, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy gap is 0.8 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.55; #wavelength(micro m)\n",
+ "\n",
+ "#Calculation\n",
+ "Eg=1.24/lamda; #energy gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy gap is\",Eg,\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.11, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "coherence length is 12 *10**3 m\n",
+ "spectral half width is 4.56 *10**-17 m\n",
+ "purity factor is 1.6 *10**10\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/sec)\n",
+ "tow=4*10**-5; #time(sec)\n",
+ "lamda=740*10**-9; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "L=tow*c; #coherence length(m)\n",
+ "delta_lamda=lamda**2/L; #spectral half width(m)\n",
+ "Q=lamda/delta_lamda; #purity factor\n",
+ "\n",
+ "#Result\n",
+ "print \"coherence length is\",int(L/10**3),\"*10**3 m\"\n",
+ "print \"spectral half width is\",round(delta_lamda*10**17,2),\"*10**-17 m\"\n",
+ "print \"purity factor is\",round(Q/10**10,1),\"*10**10\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.12, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of emissions is 8.4 *10**4\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",
+ "new=5.9*10**14; #frequency(Hz)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=2500; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "R=math.exp(h*new/(Kb*T))-1; #ratio of emissions\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of emissions is\",round(R/10**4,1),\"*10**4\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.13, Page number 11.60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beam divergence is 1.02 *10**-4 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.06*10**-6; #wavelength(m)\n",
+ "d=2.54*10**-2; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=2.44*lamda/d; #beam divergence(radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"beam divergence is\",round(theta*10**4,2),\"*10**-4 radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.14, Page number 11.60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of photons/minute is 4.39 *10**17\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "P=2.3*10**-3; #power(W)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6328*10**-10; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "n=P*lamda*60/(c*h); #number of photons/min\n",
+ "\n",
+ "#Result\n",
+ "print \"number of photons/minute is\",round(n/10**17,2),\"*10**17\""
+ ]
+ }
+ ],
+ "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/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter12.ipynb b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter12.ipynb new file mode 100755 index 00000000..09a71a18 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter12.ipynb @@ -0,0 +1,665 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#12: Fiber Optics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.1, Page number 12.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "acceptance angle is 20.41 degrees\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",
+ "n1=1.54; #Core refractive index\n",
+ "n2=1.50; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "alpha_m=math.asin(NA); #acceptance angle(radian)\n",
+ "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"acceptance angle is\",round(alpha_m,2),\"degrees\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.2, Page number 12.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.387\n",
+ "acceptance angle is 22.8 degrees\n",
+ "critical angle is 75 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.5; #Core refractive index\n",
+ "n2=1.45; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "delta=(n1-n2)/n1; #fractional index change\n",
+ "NA=n1*math.sqrt(2*delta); #numerical aperture\n",
+ "alpha_m=math.asin(NA); #acceptance angle(radian)\n",
+ "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n",
+ "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,3)\n",
+ "print \"acceptance angle is\",round(alpha_m,1),\"degrees\"\n",
+ "print \"critical angle is\",int(thetac),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.3, Page number 12.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical angle is 77.16 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.53; #Core refractive index\n",
+ "p=2.5; #percentage(%)\n",
+ "\n",
+ "#Calculation\n",
+ "n2=n1*(100-p)/100; #Cladding refractive index\n",
+ "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical angle is\",round(thetac,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.4, Page number 12.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.28\n",
+ "acceptance angle is 16.26 degrees\n",
+ "critical angle is 79.1 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta=0.018; #fractional difference\n",
+ "n1=1.50; #Core refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=round(n1*math.sqrt(2*delta),2); #numerical aperture\n",
+ "alpha_m=math.asin(NA); #acceptance angle(radian)\n",
+ "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n",
+ "n2=n1-(delta*n1); #Cladding refractive index\n",
+ "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",NA\n",
+ "print \"acceptance angle is\",round(alpha_m,2),\"degrees\"\n",
+ "print \"critical angle is\",round(thetac,1),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.5, Page number 12.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total number of guided modes is 490.0\n",
+ "number of modes of graded index fibre is 245.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=50*10**-6; #diameter(m)\n",
+ "lamda=1*10**-6; #wavelength(m)\n",
+ "NA=0.2; #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "NSI=4.9*(d*NA/lamda)**2; #total number of guided modes\n",
+ "NGI=NSI/2; #number of modes of graded index fibre\n",
+ "\n",
+ "#Result\n",
+ "print \"total number of guided modes is\",NSI\n",
+ "print \"number of modes of graded index fibre is\",NGI"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.6, Page number 12.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.47\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta=0.05; #fractional difference\n",
+ "n1=1.5; #Core refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=n1*math.sqrt(2*delta); #numerical aperture\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.7, Page number 12.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of modes that can be propagated is 1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=5*10**-6; #diameter(m)\n",
+ "lamda=1*10**-6; #wavelength(m)\n",
+ "NA=0.092; #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "N=4.9*(d*NA/lamda)**2; #number of modes that can be propagated\n",
+ "\n",
+ "#Result\n",
+ "print \"number of modes that can be propagated is\",int(N)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.8, Page number 12.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V number is 94.7\n",
+ "maximum number of modes is 4485.7\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",
+ "n1=1.53; #Core refractive index\n",
+ "n2=1.50; #Cladding refractive index\n",
+ "a=50*10**-6; #radius(m)\n",
+ "lamda=1*10**-6; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "Vn=2*math.pi*a*NA/lamda; #V number\n",
+ "N=Vn**2/2; #maximum number of modes\n",
+ "\n",
+ "#Result\n",
+ "print \"V number is\",round(Vn,1)\n",
+ "print \"maximum number of modes is\",round(N,1)\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.9, Page number 12.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of propagating modes is 49177\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=100*10**-6; #radius(m)\n",
+ "lamda=0.85*10**-6; #wavelength(m)\n",
+ "NA=0.3; #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "N=4*math.pi**2*a**2*NA**2/lamda**2; #number of propagating modes\n",
+ "\n",
+ "#Result\n",
+ "print \"number of propagating modes is\",int(N)\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.10, Page number 12.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Core refractive index is 1.6025\n",
+ "acceptance angle is 8.638 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA=0.2; #numerical aperture\n",
+ "n2=1.59; #Cladding refractive index\n",
+ "n0=1.33; #refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "n1=round(math.sqrt(NA**2+n2**2),4); #Core refractive index\n",
+ "NA1=math.sqrt(n1**2-n2**2)/n0; #numerical aperture\n",
+ "alpha_m=math.asin(NA1); #acceptance angle(radian)\n",
+ "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"Core refractive index is\",n1\n",
+ "print \"acceptance angle is\",round(alpha_m,3),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.11, Page number 12.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of photons is 13.675 *10**15\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/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=680*10**-9; #wavelength(m)\n",
+ "P=4*10**-3; #power(W)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_E=c*h/lamda; #energy(J)\n",
+ "N=P/delta_E; #number of photons\n",
+ "\n",
+ "#Result\n",
+ "print \"number of photons is\",round(N/10**15,3),\"*10**15\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.12, Page number 12.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cladding refractive index is 1.49925\n",
+ "numerical aperture is 0.0474\n",
+ "critical angle is 88.2 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta=0.0005; #fractional difference\n",
+ "n1=1.5; #Core refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "n2=n1-(delta*n1); #Cladding refractive index\n",
+ "NA=n1*math.sqrt(2*delta); #numerical aperture\n",
+ "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"Cladding refractive index is\",n2\n",
+ "print \"numerical aperture is\",round(NA,4)\n",
+ "print \"critical angle is\",round(thetac,1),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.13, Page number 12.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fraction of initial intensity after 2km is 0.363\n",
+ "fraction of initial intensity after 5km is 0.048\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "alpha=2.2; #attenuation coefficient(dB/km)\n",
+ "L1=2; #distance(km)\n",
+ "L2=6; #distance(km)\n",
+ "\n",
+ "#Calculation\n",
+ "x1=-alpha*L1/10; \n",
+ "x2=-alpha*L2/10;\n",
+ "P1=10**x1; #fraction of initial intensity after 2km\n",
+ "P2=10**x2; #fraction of initial intensity after 5km\n",
+ "\n",
+ "#Result\n",
+ "print \"fraction of initial intensity after 2km is\",round(P1,3)\n",
+ "print \"fraction of initial intensity after 5km is\",round(P2,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.14, Page number 12.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "attenuation coefficient is 1.41 dB/km\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=0.5; #distance(km)\n",
+ "Pout=1; #output power(W)\n",
+ "Pin=85/100; #input power(W)\n",
+ "\n",
+ "#Calculation\n",
+ "alpha=10*math.log10(Pout/Pin)/L; #attenuation coefficient(dB/km)\n",
+ "\n",
+ "#Result\n",
+ "print \"attenuation coefficient is\",round(alpha,2),\"dB/km\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.15, Page number 12.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "attenuation coefficient is 1.7 dB/km\n",
+ "overall signal attenuation is 17 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=10; #distance(km)\n",
+ "Pout=2; #output power(W)\n",
+ "Pin=100; #input power(W)\n",
+ "\n",
+ "#Calculation\n",
+ "alpha=10*math.log10(Pin/Pout)/L; #attenuation coefficient(dB/km)\n",
+ "o_alpha=round(alpha,1)*L; #overall signal attenuation\n",
+ "\n",
+ "#Result\n",
+ "print \"attenuation coefficient is\",round(alpha,1),\"dB/km\"\n",
+ "print \"overall signal attenuation is\",int(o_alpha),\"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/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter2.ipynb b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter2.ipynb new file mode 100755 index 00000000..601cae27 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter2.ipynb @@ -0,0 +1,441 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#2: Crystal Structures"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.1, Page number 2.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 4.0 *10**-10 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=60.2; #molecular weight\n",
+ "Na=6.023*10**26; #avagadro number(kg/mole)\n",
+ "n=4; \n",
+ "rho=6250; #density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a*10**10),\"*10**-10 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.2, Page number 2.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density is 8.93 gm/cm**3\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",
+ "M=63.5; #molecular weight\n",
+ "Na=6.023*10**26; #avagadro number(kg/mole)\n",
+ "n=4; \n",
+ "r=1.278*10**-8; #atomic radius(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "a=2*math.sqrt(2)*r; #lattice constant(m)\n",
+ "rho=n*M/(a**3*Na); #density(kg/cm**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"density is\",round(rho*10**3,2),\"gm/cm**3\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.3, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of densities is 0.92\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "pf_BCC=math.pi*math.sqrt(3)/8; #packing factor for BCC\n",
+ "pf_FCC=math.pi/(3*math.sqrt(2)); #packing factor of FCC\n",
+ "\n",
+ "#Calculation\n",
+ "r=pf_BCC/pf_FCC; #ratio of densities\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of densities is\",round(r,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.4, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 2.8687 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=55.85; #molecular weight\n",
+ "Na=6.02*10**26; #avagadro number(kg/mole)\n",
+ "n=2; \n",
+ "rho=7860; #density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a*10**10,4),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.5, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 5.6 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=58.5; #molecular weight\n",
+ "Na=6.02*10**26; #avagadro number(kg/mole)\n",
+ "n=4; \n",
+ "rho=2189; #density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a*10**10,1),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.6, Page number 2.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 3.517 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=6.94; #molecular weight\n",
+ "Na=6.02*10**26; #avagadro number(kg/mole)\n",
+ "n=2; \n",
+ "rho=530; #density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a*10**10,3),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.7, Page number 2.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percent volume change is 0.493 %\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",
+ "r1=1.258*10**-10; #radius(m)\n",
+ "r2=1.292*10**-10; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "a_bcc=4*r1/math.sqrt(3);\n",
+ "v=a_bcc**3;\n",
+ "V1=v/2;\n",
+ "a_fcc=2*math.sqrt(2)*r2;\n",
+ "V2=a_fcc**3/4;\n",
+ "V=(V1-V2)*100/V1; #percent volume change is\",V,\"%\"\n",
+ "\n",
+ "#Result\n",
+ "print \"percent volume change is\",round(V,3),\"%\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.8, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of atoms/m**3 is 1.77 *10**29\n",
+ "density of diamond is 3534.47 kg/m**3\n",
+ "answer in the book is wrong\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",
+ "w=12; #atomic weight\n",
+ "Na=6.02*10**26; #avagadro number(kg/mole)\n",
+ "\n",
+ "#Calculation\n",
+ "n=8/(a**3); #number of atoms/m**3\n",
+ "m=w/Na; #mass(kg)\n",
+ "rho=m*n; #density of diamond(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms/m**3 is\",round(n/10**29,2),\"*10**29\"\n",
+ "print \"density of diamond is\",round(rho,2),\"kg/m**3\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.9, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum radius of sphere is 0.414 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=Symbol('r')\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(2);\n",
+ "R=(4*r/(2*math.sqrt(2)))-r; #maximum radius of sphere\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum radius of sphere is\",round(R/r,3),\"r\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.10, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "radius of largest sphere is 0.155 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=Symbol('r')\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(3);\n",
+ "R=(a/2)-r; #radius of largest sphere\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of largest sphere is\",round(R/r,3),\"r\""
+ ]
+ }
+ ],
+ "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/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter3.ipynb b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter3.ipynb new file mode 100755 index 00000000..a0d72f81 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/Chapter3.ipynb @@ -0,0 +1,1601 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#3: Crystal Planes and X-ray Diffraction"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.1, Page number 3.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are ( 1 2 2 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=4;\n",
+ "b=2;\n",
+ "c=2; #intercepts\n",
+ "\n",
+ "#Calculation\n",
+ "h=int(a/a);\n",
+ "k=int(a/b);\n",
+ "l=int(a/c); #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.2, Page number 3.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are ( 1 3 3 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=6;\n",
+ "b=2;\n",
+ "c=2; #intercepts\n",
+ "\n",
+ "#Calculation\n",
+ "h=int(a/a);\n",
+ "k=int(a/b);\n",
+ "l=int(a/c); #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.3, Page number 3.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are ( 1 1 1 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=3;\n",
+ "b=3;\n",
+ "c=3; #intercepts\n",
+ "\n",
+ "#Calculation\n",
+ "h=int(c/a);\n",
+ "k=int(c/b);\n",
+ "l=int(c/c); #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.4, Page number 3.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are ( 3 2 1 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=2;\n",
+ "b=3;\n",
+ "c=6; #intercepts\n",
+ "\n",
+ "#Calculation\n",
+ "h=int(c/a);\n",
+ "k=int(c/b);\n",
+ "l=int(c/c); #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.5, Page number 3.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are ( 2 1 2 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.212;\n",
+ "b=1;\n",
+ "c=0.183; #intercepts\n",
+ "ac=0.424;\n",
+ "bc=1;\n",
+ "cc=0.366; #axial units\n",
+ "\n",
+ "#Calculation\n",
+ "h=int(ac/a);\n",
+ "k=int(bc/b);\n",
+ "l=int(cc/c); #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.6, Page number 3.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "intercepts along x,y,z directions are 1.2 angstrom 1.2 angstrom 4.0 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=2;\n",
+ "k=3;\n",
+ "l=1; #intercepts\n",
+ "a=1.2;\n",
+ "b=1.8;\n",
+ "c=2; #primitives(angstrom)\n",
+ "p=1.2; #intercept along X-direction\n",
+ "\n",
+ "#Calculation\n",
+ "q=b/k;\n",
+ "r=2*p/q;\n",
+ "\n",
+ "#Result\n",
+ "print \"intercepts along x,y,z directions are\",p,\"angstrom\",2*q,\"angstrom\",r,\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.7, Page number 3.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar separation for 1st plane is 1.0*a\n",
+ "interplanar separation for 2nd plane is 0.707 *a\n",
+ "interplanar separation for 3rd plane is 0.577 *a\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=Symbol('a');\n",
+ "h1=1;\n",
+ "k1=0;\n",
+ "l1=0; #intercepts of 1st plane\n",
+ "h2=1;\n",
+ "k2=1;\n",
+ "l2=0; #intercepts of 2nd plane\n",
+ "h3=1;\n",
+ "k3=1;\n",
+ "l3=1; #intercepts of 3rd plane\n",
+ "\n",
+ "#Calculation\n",
+ "d100=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar separation for 1st plane\n",
+ "d110=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar separation for 2nd plane\n",
+ "d111=a/math.sqrt(h3**2+k3**2+l3**2); #interplanar separation for 3rd plane\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar separation for 1st plane is\",d100\n",
+ "print \"interplanar separation for 2nd plane is\",round(d110/a,3),\"*a\"\n",
+ "print \"interplanar separation for 3rd plane is\",round(d111/a,3),\"*a\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.8, Page number 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar separation is 0.179 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=3;\n",
+ "k=4;\n",
+ "l=5; #miller indices\n",
+ "a=2;\n",
+ "b=2;\n",
+ "c=1; #parameters\n",
+ "\n",
+ "#Calculation\n",
+ "d=1/math.sqrt((h**2/a**2)+(k**2/b**2)+(l**2/c**2)); #interplanar separation(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar separation is\",round(d,3),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.9, Page number 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar distance is 3.464 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=6; #lattice parameter(angstrom)\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1; #miller indices\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar distance is\",round(d,3),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.10, Page number 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar distance is 2.1 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=6.3; #lattice parameter(angstrom)\n",
+ "h=2;\n",
+ "k=2;\n",
+ "l=1; #miller indices\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar distance is\",round(d,1),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.11, Page number 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar distance is 1 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=5; #lattice parameter(angstrom)\n",
+ "h=4;\n",
+ "k=3;\n",
+ "l=0; #miller indices\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar distance is\",int(d),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.12, Page number 3.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of intercepts on axes is 6 : 3 : 2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=1;\n",
+ "k=2;\n",
+ "l=3; #miller indices\n",
+ "\n",
+ "#Calculation\n",
+ "p=int(k*l/h);\n",
+ "q=int(k*l/k);\n",
+ "r=int(k*l/l); #ratio of intercepts on axes\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of intercepts on axes is\",p,\":\",q,\":\",r"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.13, Page number 3.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar distance is 1.12 *10**-10 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=4.2*10**-10; #lattice parameter(m)\n",
+ "h=3;\n",
+ "k=2;\n",
+ "l=1; #miller indices\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar distance is\",round(d*10**10,2),\"*10**-10 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.14, Page number 3.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar separation is 1.26 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1; #miller indices\n",
+ "a=2.5;\n",
+ "b=2.5;\n",
+ "c=1.8; #parameters\n",
+ "\n",
+ "#Calculation\n",
+ "d=1/math.sqrt((h**2/a**2)+(k**2/b**2)+(l**2/c**2)); #interplanar separation(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar separation is\",round(d,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.15, Page number 3.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar separation for 1st plane is 2.466 angstrom\n",
+ "interplanar separation for 2nd plane is 1.74 angstrom\n",
+ "interplanar separation for 3rd plane is 2.85 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=1.744; #atomic radius(angstrom)\n",
+ "h1=2;\n",
+ "k1=0;\n",
+ "l1=0; #intercepts of 1st plane\n",
+ "h2=2;\n",
+ "k2=2;\n",
+ "l2=0; #intercepts of 2nd plane\n",
+ "h3=1;\n",
+ "k3=1;\n",
+ "l3=1; #intercepts of 3rd plane\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(2);\n",
+ "d200=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar separation for 1st plane(angstrom)\n",
+ "d220=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar separation for 2nd plane(angstrom)\n",
+ "d111=a/math.sqrt(h3**2+k3**2+l3**2); #interplanar separation for 3rd plane(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar separation for 1st plane is\",round(d200,3),\"angstrom\"\n",
+ "print \"interplanar separation for 2nd plane is\",round(d220,2),\"angstrom\"\n",
+ "print \"interplanar separation for 3rd plane is\",round(d111,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.16, Page number 3.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of densities is 1.414 : 1.732\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h1=1;\n",
+ "k1=1;\n",
+ "l1=1; #intercepts of 1st plane\n",
+ "h2=1;\n",
+ "k2=1;\n",
+ "l2=0; #intercepts of 2nd plane\n",
+ "a=1;\n",
+ "\n",
+ "#Calculation\n",
+ "d111=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar separation for 1st plane(angstrom)\n",
+ "d110=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar separation for 2nd plane(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of densities is\",round(1/d110,3),\":\",round(1/d111,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "##Example number 3.17, Page number 3.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 14.61 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=2.814; #lattice parameter(m)\n",
+ "h=1;\n",
+ "lamda=0.71; #wavelength(angstrom)\n",
+ "k=0;\n",
+ "l=0; #miller indices\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n",
+ "theta=math.asin(lamda/d); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",round(theta,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.18, Page number 3.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 1.5 angstrom\n",
+ "glancing angle is 90.0 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=4.5; #lattice parameter(m)\n",
+ "h=2;\n",
+ "k=2;\n",
+ "theta=30*math.pi/180; #angle(radian)\n",
+ "l=1; #miller indices\n",
+ "n=2;\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n",
+ "lamda=2*d*math.sin(theta); #wavelength(angstrom)\n",
+ "theta=math.asin(lamda/d); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",lamda,\"angstrom\"\n",
+ "print \"glancing angle is\",round(theta,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.19, Page number 3.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 0.842 *10**-10 m\n",
+ "glancing angle for second order is 17.37 degrees\n",
+ "glancing angle for third order is 26.6 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta=(8+(35/60))*math.pi/180; #angle(radian)\n",
+ "n2=2;\n",
+ "n3=3;\n",
+ "d=2.82*10**-10; #lattice spacing(m)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=2*d*math.sin(theta); #wavelength(m)\n",
+ "theta2=math.asin(n2*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta2=theta2*180/math.pi; #glancing angle(degrees)\n",
+ "theta3=math.asin(n3*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta3=theta3*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**10,3),\"*10**-10 m\"\n",
+ "print \"glancing angle for second order is\",round(theta2,2),\"degrees\"\n",
+ "print \"glancing angle for third order is\",round(theta3,1),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.20, Page number 3.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle for 1st order is 14.48 degrees\n",
+ "glancing angle for 1st order is 30.0 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=5; #lattice parameter(angstrom)\n",
+ "h=3;\n",
+ "lamda=0.5; #wavelength(angstrom)\n",
+ "k=4;\n",
+ "n=2;\n",
+ "l=0; #miller indices\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n",
+ "theta1=math.asin(lamda/(2*d)); #glancing angle(radian)\n",
+ "theta1=theta1*180/math.pi; #glancing angle(degrees)\n",
+ "theta2=math.asin(2*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta2=theta2*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle for 1st order is\",round(theta1,2),\"degrees\"\n",
+ "print \"glancing angle for 1st order is\",theta2,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.21, Page number 3.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 2.45 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=3; #lattice parameter(angstrom)\n",
+ "h=1;\n",
+ "k=1;\n",
+ "n=1;\n",
+ "l=1; #miller indices\n",
+ "theta=45*math.pi/180; #angle(radian)\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n",
+ "lamda=2*d*math.sin(theta); #wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.22, Page number 3.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle for 1st order is 22.02 degrees\n",
+ "glancing angle for 2nd order is 48.59 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.5; #wavelength(angstrom)\n",
+ "d=2; #seperation(angstrom)\n",
+ "n=2;\n",
+ "\n",
+ "#Calculation\n",
+ "theta1=math.asin(lamda/(2*d)); #glancing angle(radian)\n",
+ "theta1=theta1*180/math.pi; #glancing angle(degrees)\n",
+ "theta2=math.asin(n*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta2=theta2*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle for 1st order is\",round(theta1,2),\"degrees\"\n",
+ "print \"glancing angle for 2nd order is\",round(theta2,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.23, Page number 3.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar separation is 0.88 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.25; #wavelength(angstrom)\n",
+ "theta=45*math.pi/180; #angle(radian)\n",
+ "n=1;\n",
+ "\n",
+ "#Calculation\n",
+ "d=n*lamda/(2*math.sin(theta)); #interplanar separation(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar separation is\",round(d,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.24, Page number 3.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle for 1st order is 5.74 degrees\n",
+ "glancing angle for 2nd order is 11.54 degrees\n",
+ "glancing angle for 1st order is 17.46 degrees\n",
+ "glancing angle for 2nd order is 23.58 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1; #wavelength(angstrom)\n",
+ "d=5; #seperation(angstrom)\n",
+ "n1=1;\n",
+ "n2=2;\n",
+ "n3=3;\n",
+ "n4=4; #order\n",
+ "\n",
+ "#Calculation\n",
+ "theta1=math.asin(n1*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta1=theta1*180/math.pi; #glancing angle(degrees)\n",
+ "theta2=math.asin(n2*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta2=theta2*180/math.pi; #glancing angle(degrees)\n",
+ "theta3=math.asin(n3*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta3=theta3*180/math.pi; #glancing angle(degrees)\n",
+ "theta4=math.asin(n4*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta4=theta4*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle for 1st order is\",round(theta1,2),\"degrees\"\n",
+ "print \"glancing angle for 2nd order is\",round(theta2,2),\"degrees\"\n",
+ "print \"glancing angle for 1st order is\",round(theta3,2),\"degrees\"\n",
+ "print \"glancing angle for 2nd order is\",round(theta4,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.25, Page number 3.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1st bragg reflection angle is 7.18 degrees\n",
+ "2nd bragg reflection angle is 14.48 degrees\n",
+ "3rd bragg reflection angle is 22.02 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta=30*math.pi/180; #angle(radian)\n",
+ "#assume that sin(theta)=x\n",
+ "x1=1;\n",
+ "x2=2;\n",
+ "x3=3;\n",
+ "x4=4;\n",
+ "\n",
+ "#Calculation\n",
+ "theta1=math.asin(x1*math.sin(theta)/x4); #1st bragg reflection angle(radian)\n",
+ "theta1=theta1*180/math.pi; #1st bragg reflection angle(degrees)\n",
+ "theta2=math.asin(x2*math.sin(theta)/x4); #1st bragg reflection angle(radian)\n",
+ "theta2=theta2*180/math.pi; #1st bragg reflection angle(degrees)\n",
+ "theta3=math.asin(x3*math.sin(theta)/x4); #1st bragg reflection angle(radian)\n",
+ "theta3=theta3*180/math.pi; #1st bragg reflection angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"1st bragg reflection angle is\",round(theta1,2),\"degrees\"\n",
+ "print \"2nd bragg reflection angle is\",round(theta2,2),\"degrees\"\n",
+ "print \"3rd bragg reflection angle is\",round(theta3,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.26, Page number 3.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum order of bragg reflection is 4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.25; #wavelength(angstrom)\n",
+ "d=2.5; #seperation(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "n=2*d/lamda; #maximum order of bragg reflection\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum order of bragg reflection is\",int(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.27, Page number 3.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum order of bragg reflection is 3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.5; #wavelength(angstrom)\n",
+ "d=2.8; #seperation(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "n=2*d/lamda; #maximum order of bragg reflection\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum order of bragg reflection is\",int(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.28, Page number 3.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength for 1st angle is 1.45 angstrom\n",
+ "wavelength for 2nd angleis 1.544 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta1=15*math.pi/180; #angle(radian)\n",
+ "theta2=16*math.pi/180; #angle(radian)\n",
+ "d=2.8; #lattice spacing(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda1=2*d*math.sin(theta1); #wavelength for 1st angle(angstrom)\n",
+ "lamda2=2*d*math.sin(theta2); #wavelength for 2nd angle(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength for 1st angle is\",round(lamda1,2),\"angstrom\"\n",
+ "print \"wavelength for 2nd angleis\",round(lamda2,3),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.29, Page number 3.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are ( 6 2 3 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "x=1;\n",
+ "y=3;\n",
+ "z=-2;\n",
+ "\n",
+ "#Calculation\n",
+ "h=-y*z/x;\n",
+ "k=-y*z/y;\n",
+ "l=y*z/z; #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are (\",int(h),int(k),int(l),\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.30, Page number 3.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar separation is 1.26 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1; #miller indices\n",
+ "a=2.5;\n",
+ "b=2.5;\n",
+ "c=1.8; #parameters\n",
+ "\n",
+ "#Calculation\n",
+ "d=1/math.sqrt((h**2/a**2)+(k**2/b**2)+(l**2/c**2)); #interplanar separation(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar separation is\",round(d,2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.31, Page number 3.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 16.1 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=2.814; #lattice parameter(m)\n",
+ "h=1;\n",
+ "lamda=0.78; #wavelength(angstrom)\n",
+ "k=0;\n",
+ "l=0; #miller indices\n",
+ "\n",
+ "#Calculation\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #interplanar distance(angstrom)\n",
+ "theta=math.asin(lamda/d); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",round(theta,1),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.32, Page number 3.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "longest wavelength in 1st order is 5.64 angstrom\n",
+ "longest wavelength in 2nd order is 2.82 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1;\n",
+ "n2=2;\n",
+ "d=2.82; #seperation(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_max1=2*d/n1; #longest wavelength in 1st order(angstrom)\n",
+ "lamda_max2=2*d/n2; #longest wavelength in 2nd order(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"longest wavelength in 1st order is\",lamda_max1,\"angstrom\"\n",
+ "print \"longest wavelength in 2nd order is\",lamda_max2,\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.33, Page number 3.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 0.842 angstrom\n",
+ "glancing angle for second order is 17 degrees 22 minutes\n",
+ "glancing angle for third order is 26 degrees 36.0 minutes\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta=(8+(35/60))*math.pi/180; #angle(radian)\n",
+ "n1=1;\n",
+ "n2=2;\n",
+ "n3=3;\n",
+ "d=2.82*10**-10; #lattice spacing(m)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=2*d*math.sin(theta)/n1; #wavelength(m)\n",
+ "theta2=math.asin(n2*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta2=theta2*180/math.pi; #glancing angle(degrees)\n",
+ "theta2_m=60*(theta2-int(theta2));\n",
+ "theta3=math.asin(n3*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta3=theta3*180/math.pi; #glancing angle(degrees)\n",
+ "theta3_m=60*(theta3-int(theta3));\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**10,3),\"angstrom\"\n",
+ "print \"glancing angle for second order is\",int(theta2),\"degrees\",int(theta2_m),\"minutes\"\n",
+ "print \"glancing angle for third order is\",int(theta3),\"degrees\",round(theta3_m),\"minutes\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.34, Page number 3.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "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",
+ "lamda=0.071*10**-9; #wavelength(angstrom)\n",
+ "d100=0.28*10**-9; #seperation(angstrom)\n",
+ "n=2;\n",
+ "\n",
+ "#Calculation\n",
+ "d110=d100/math.sqrt(2); \n",
+ "theta=math.asin(n*lamda/(2*d110))*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.35, Page number 3.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 0.0842 nm\n",
+ "maximum order of diffraction is 6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta=(8+(35/60))*math.pi/180; #angle(radian)\n",
+ "n=1;\n",
+ "d=0.282; #lattice spacing(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=2*d*math.sin(theta)/n; #wavelength(nm)\n",
+ "n_max=2*d/lamda; #maximum order of diffraction\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda,4),\"nm\"\n",
+ "print \"maximum order of diffraction is\",int(n_max)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.36, Page number 3.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interatomic spacing is 2.67 *10**-10 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.5418*10**-10; #wavelength(m)\n",
+ "theta=30*math.pi/180; #angle(radian)\n",
+ "n=1;\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1;\n",
+ "\n",
+ "#Calculation\n",
+ "d=n*lamda/(2*math.sin(theta)); #interplanar separation(m)\n",
+ "a=d*math.sqrt(h**2+k**2+l**2); #interatomic spacing(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"interatomic spacing is\",round(a*10**10,2),\"*10**-10 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/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/1.png b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/1.png Binary files differnew file mode 100755 index 00000000..46e78e4e --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/1.png diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/2.png b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/2.png Binary files differnew file mode 100755 index 00000000..2b21df4b --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/2.png diff --git a/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/3.png b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/3.png Binary files differnew file mode 100755 index 00000000..77af72a0 --- /dev/null +++ b/Applied_Physics_by_M._Chandra_Shekar,_P._Appala_Naidu/screenshots/3.png diff --git a/Applied_Physics/Chapter_01_Bonding_in_Solids__1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_01_Bonding_in_Solids__1.ipynb index db06e802..db06e802 100755 --- a/Applied_Physics/Chapter_01_Bonding_in_Solids__1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_01_Bonding_in_Solids__1.ipynb diff --git a/Applied_Physics/Chapter_02_Crystal_Structure_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_02_Crystal_Structure_1.ipynb index b6038072..b6038072 100755 --- a/Applied_Physics/Chapter_02_Crystal_Structure_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_02_Crystal_Structure_1.ipynb diff --git a/Applied_Physics/Chapter_03_Planes_in_Crystals_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_03_Planes_in_Crystals_1.ipynb index 92dba19b..92dba19b 100755 --- a/Applied_Physics/Chapter_03_Planes_in_Crystals_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_03_Planes_in_Crystals_1.ipynb diff --git a/Applied_Physics/Chapter_04_Crystal_Diffraction_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_04_Crystal_Diffraction_1.ipynb index fef74a69..fef74a69 100755 --- a/Applied_Physics/Chapter_04_Crystal_Diffraction_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_04_Crystal_Diffraction_1.ipynb diff --git a/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb index 66041c45..66041c45 100755 --- a/Applied_Physics/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_05_Principles_of_Quantum_Mechanics_1.ipynb diff --git a/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb index d52f3a45..d52f3a45 100755 --- a/Applied_Physics/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_06_Electron_Theory_and_Band_Theory_of_Metals_1.ipynb diff --git a/Applied_Physics/Chapter_07_Dielectric_Properties_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_07_Dielectric_Properties_1.ipynb index 85a277ef..85a277ef 100755 --- a/Applied_Physics/Chapter_07_Dielectric_Properties_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_07_Dielectric_Properties_1.ipynb diff --git a/Applied_Physics/Chapter_08_Magnetic_Properties_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_08_Magnetic_Properties_1.ipynb index b2a8def3..b2a8def3 100755 --- a/Applied_Physics/Chapter_08_Magnetic_Properties_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_08_Magnetic_Properties_1.ipynb diff --git a/Applied_Physics/Chapter_09_Semiconductors_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_09_Semiconductors_1.ipynb index 9ce2ea83..9ce2ea83 100755 --- a/Applied_Physics/Chapter_09_Semiconductors_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_09_Semiconductors_1.ipynb diff --git a/Applied_Physics/Chapter_10_Superconductivity_1.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_10_Superconductivity_1.ipynb index 9b11ce44..9b11ce44 100755 --- a/Applied_Physics/Chapter_10_Superconductivity_1.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_10_Superconductivity_1.ipynb diff --git a/Applied_Physics/Chapter_12_Fibre_Optics.ipynb b/Applied_Physics_by_P_K_Mittal/Chapter_12_Fibre_Optics.ipynb index f573b0a2..f573b0a2 100755 --- a/Applied_Physics/Chapter_12_Fibre_Optics.ipynb +++ b/Applied_Physics_by_P_K_Mittal/Chapter_12_Fibre_Optics.ipynb diff --git a/Applied_Physics/screenshots/Calculation_of__mean_free_path_of_electron_1.png b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__mean_free_path_of_electron_1.png Binary files differindex 37995b76..37995b76 100755 --- a/Applied_Physics/screenshots/Calculation_of__mean_free_path_of_electron_1.png +++ b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__mean_free_path_of_electron_1.png diff --git a/Applied_Physics/screenshots/Calculation_of__potential_energy_1.png b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__potential_energy_1.png Binary files differindex f6086db3..f6086db3 100755 --- a/Applied_Physics/screenshots/Calculation_of__potential_energy_1.png +++ b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of__potential_energy_1.png diff --git a/Applied_Physics/screenshots/Calculation_of_lattice_constant_1.png b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of_lattice_constant_1.png Binary files differindex cf42154d..cf42154d 100755 --- a/Applied_Physics/screenshots/Calculation_of_lattice_constant_1.png +++ b/Applied_Physics_by_P_K_Mittal/screenshots/Calculation_of_lattice_constant_1.png diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb new file mode 100755 index 00000000..4ad21f3b --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb @@ -0,0 +1,167 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:04df0fd624434d43d67fac6cabd770a44e2109835e3a6832f168a8a4e92f27c9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "10: Lasers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 10.1, Page number 10.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8 #speed of light(m/sec)\n",
+ "h = 6.6*10**-34 #planck's constant\n",
+ "e = 1.6*10**-19\n",
+ "T = 300 #temperature(K)\n",
+ "K = 8.61*10**-5\n",
+ "lamda = 6943 #wavelength, angstrom\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10 #wavelength(m)\n",
+ "#let E2 - E1 be E\n",
+ "E = h*c/lamda #energy(J)\n",
+ "E = E/e #energy(eV)\n",
+ "#let population ratio N2/N1 be N\n",
+ "N = math.exp(-E/(K*T));\n",
+ "\n",
+ "#Result\n",
+ "print \"relative population of 2 states is\",round(N/1e-30,3),\"*10^-30\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative population of 2 states is 1.076 *10^-30\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 10.2, Page number 10.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a2 = 6 #spot diameter(mm)\n",
+ "a1 = 4 #spot diameter(mm)\n",
+ "d2 = 2 #distance from laser(m)\n",
+ "d1 = 1 #distance from laser(m)\n",
+ "\n",
+ "#Calculation\n",
+ "a2 = a2*10**-3 #spot diameter(m)\n",
+ "a1 = a1*10**-3 #spot diameter(m)\n",
+ "theta = (a2-a1)/(2*(d2-d1)) #divergence(radian)\n",
+ "theta = theta*10**3 #divergence(milli radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"divergence is\",theta,\"milli radian\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "divergence is 1.0 milli radian\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 10.3, Page number 10.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1 #for air\n",
+ "lamda = 650 #wavelength(nm)\n",
+ "bs = 1 #beam size(mm)\n",
+ "fl = 1 #focal length of lens(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-9 #wavelength(m)\n",
+ "bs = bs*10**-3 #beam size(m)\n",
+ "fl = fl*10**-3 #focal length of lens(m)\n",
+ "tan_theta = fl/(2*bs) #value of tan_theta\n",
+ "theta = math.atan(tan_theta)\n",
+ "NA = n*math.sin(theta)\n",
+ "NA = math.ceil(NA*10**2)/10**2; #rounding off to 2 decimals\n",
+ "ss = 0.6*lamda/NA #spot size(m)\n",
+ "ss = ss*10**6; #spot size(micro metre)\n",
+ "ss = math.ceil(ss*10**3)/10**3; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"spot size is\",ss,\"micro metre\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "spot size is 0.867 micro metre\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb new file mode 100755 index 00000000..04367b22 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb @@ -0,0 +1,277 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:99fe784c923b9389b1b34d49f0a0fc6c7079e6fd55741e762bc73de0fe21384b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "11: Fibre Optics and Holography"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.1, Page number 11.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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)\n",
+ "NA = math.ceil(NA*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",NA"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "numerical aperture is 0.391\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.2, Page number 11.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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",
+ "NA = math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n",
+ "alpha_i = math.asin(NA) #angle of acceptance(radians)\n",
+ "alpha_i = alpha_i*180/math.pi #angle(degrees)\n",
+ "deg = int(alpha_i)\n",
+ "t = 60*(alpha_i-deg)\n",
+ "mint = int(t) #angle(minutes)\n",
+ "\n",
+ "#Result\n",
+ "print \"the angle of acceptance is\",deg,\"degrees and\",mint,\"minutes\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the angle of acceptance is 26 degrees and 29 minutes\n",
+ "answer given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.3, Page number 11.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta = 0.05 #difference in refractive indices of core and cladding\n",
+ "NA = 0.39 #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "n1 = NA/math.sqrt(2*delta) #refractive index of core\n",
+ "n1 = math.ceil(n1*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"refractive index of the core is\",n1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "refractive index of the core is 1.2333\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.4, Page number 11.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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",
+ "delta = math.ceil(delta*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"fractional index change is\",delta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fractional index change is 0.0416\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.5, Page number 11.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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",
+ "NA = math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n",
+ "alpha_i = math.asin(NA) #angle of acceptance(radian)\n",
+ "alpha_i = alpha_i*180/math.pi #angle(degrees)\n",
+ "deg = int(alpha_i)\n",
+ "t = 60*(alpha_i-deg)\n",
+ "mint = round(t) #angle(minutes)\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",NA\n",
+ "print \"the angle of acceptance is\",deg,\"degrees and\",mint,\"minutes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "numerical aperture is 0.2965\n",
+ "the angle of acceptance is 17 degrees and 15.0 minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.6, Page number 11.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pin = 100 #power of signal(mW)\n",
+ "Pout = 40 #outcoming signal power(mW)\n",
+ "\n",
+ "#Calculation\n",
+ "l = -10*math.log10(Pout/Pin) #attenuation loss(dB)\n",
+ "l = math.ceil(l*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the attenuation loss is\",l,\"dB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the attenuation loss is 3.98 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb new file mode 100755 index 00000000..49ab34ca --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb @@ -0,0 +1,214 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:358f4a01b294025154ed5b68aa4867e70b7293d6e35ba5318010f0ecabaea268"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "1: Bonding in Solids"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.1, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "IE_1 = 502 #first ionisation energy(kJ/mol)\n",
+ "EA_B = -335 #electron affinity for B atom(kJ/mol)\n",
+ "e = 1.602*10**-19\n",
+ "r = 0.3 #inter ionic seperation(nm)\n",
+ "epsilon0 = 8.85*10**-12 #permittivity of free space(C/N-m)\n",
+ "\n",
+ "#Calculation\n",
+ "r = r*10**-9 #inter ionic seperation(m)\n",
+ "N = 6.022*10**23*10**-3\n",
+ "E = (-e**2*N)/(4*math.pi*epsilon0*r) #electrostatic attraction energy(kJ/mol)\n",
+ "dE = IE_1+EA_B+E; #net change in energy per mole\n",
+ "\n",
+ "#Result\n",
+ "print \"electrostatic attraction energy is\",int(E),\"kJ/mol\"\n",
+ "print \"net change in energy is\",int(dE),\"kJ/mol\"\n",
+ "print \"A+B- molecule will be stable\"\n",
+ "print \"answer for net change,dE given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electrostatic attraction energy is -463 kJ/mol\n",
+ "net change in energy is -296 kJ/mol\n",
+ "A+B- molecule will be stable\n",
+ "answer for net change,dE given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.2, Page number 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "IP_K = 4.1 #IP of K(eV)\n",
+ "EA_Cl = 3.6 #EA of Cl(eV)\n",
+ "e = 1.602*10**-19\n",
+ "epsilon0 = 8.85*10**-12 \n",
+ "\n",
+ "#Calculation\n",
+ "delta_E = IP_K - EA_Cl #energy required(eV)\n",
+ "#if their total energy is 0, delta_E = Ec\n",
+ "Ec = delta_E\n",
+ "R = e/(4*math.pi*epsilon0*Ec) #seperation between ion pair(m)\n",
+ "R = R*10**9 #seperation between ion pair(nm)\n",
+ "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy required to form K+Cl- ion pair is\",delta_E,\"eV\"\n",
+ "print \"seperation between ion pair is\",R,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy required to form K+Cl- ion pair is 0.5 eV\n",
+ "seperation between ion pair is 2.881 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.3, Page number 1.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e = 1.602*10**-19\n",
+ "EA = 3.65 #electron affinity of Cl(eV)\n",
+ "IP = 5.14 #ionisation energy of Na(eV)\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "r0 = 236 #equilibrium distance(pm)\n",
+ "\n",
+ "#Calculation\n",
+ "r0 = r0*10**-12 #equilibrium distance(m)\n",
+ "V = (-e**2)/(4*math.pi*epsilon0*r0) ##potential energy(J)\n",
+ "V = V/e #potential energy(eV)\n",
+ "Ue = V\n",
+ "BE = -Ue - IP + EA #bond energy(eV)\n",
+ "BE = math.ceil(BE*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"bond energy for NaCl molecule is\",BE,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bond energy for NaCl molecule is 4.614 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.4, Page number 1.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e = 1.602*(10**-19)\n",
+ "epsilon0 = 8.85*(10**-12)\n",
+ "r0 = 0.281 #equilibrium seperation(nm)\n",
+ "A = 1.748 #Madelung constant\n",
+ "n = 9 #born repulsive exponent\n",
+ "\n",
+ "#Calculation\n",
+ "r0 = r0*10**-9 #equilibrium seperation(m)\n",
+ "CE = (A*e**2)*(1-(1/n))/(4*math.pi*epsilon0*r0) #cohesive energy(J)\n",
+ "CE = CE/e #cohesive energy(eV)\n",
+ "CE = math.ceil(CE*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"cohesive energy of NaCl is\",CE,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cohesive energy of NaCl is 7.966 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb new file mode 100755 index 00000000..85f9fd71 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb @@ -0,0 +1,1031 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:dc7951185c6d2c2020409b6a4f6420009478010f311e90b1a30732a0039ca5cf"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ " 2: Crystal Structures and X-ray Diffraction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.1, Page number 2.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 1; #assume value of r as 1\n",
+ " \n",
+ "#Calculation\n",
+ "#since 4*r = math.sqrt(3)*a\n",
+ "a = 4*r/math.sqrt(3); \n",
+ "R = (a-(2*r))/2; #since 2*r+2*R = a\n",
+ "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of interstitial sphere is\",R,\"r\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radius of interstitial sphere is 0.155 r\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.2, Page number 2.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r_BCC = 1.258; #atomic radius(Angstrom)\n",
+ "r_FCC = 1.292; #atomic radius(Angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "a_BCC = (4*r_BCC)/math.sqrt(3); #In BCC(Angstrom)\n",
+ "a_BCCm = a_BCC*10**-10; #converting a from Angstrom to m\n",
+ "V_BCC = a_BCCm**3; #volume of unit cell(m^3)\n",
+ "n_BCC = ((1/8)*8)+1; #number of atoms per unit cell\n",
+ "V1_BCC = V_BCC/n_BCC; #volume occupied by 1 atom(m^3)\n",
+ "a_FCC = 2*math.sqrt(2)*r_FCC; #In FCC(Angstrom)\n",
+ "a_FCCm = a_FCC*10**-10; #converting a from Angstrom to m\n",
+ "V_FCC = a_FCCm**3; #volume of unit cell(m^3)\n",
+ "n_FCC = ((1/2)*6) + ((1/8)*8); #number of atoms per unit cell\n",
+ "V1_FCC = V_FCC/n_FCC; #volume occupied by 1 atom(m^3)\n",
+ "delta_V = (V1_BCC - V1_FCC)*100/V1_BCC; #change in volume in %\n",
+ "delta_V = math.ceil(delta_V*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"decrease of volume during conversion from BCC to FCC is\",delta_V,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decrease of volume during conversion from BCC to FCC is 0.5 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.3, Page number 2.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.27; #nearest neighbour distance(nm)\n",
+ "c = 0.494; #height of unit cell(nm)\n",
+ "N = 6.023*10**26; #avagadro number(k/mol)\n",
+ "M = 65.37; #atomic weight(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "a_m = a*10**-9; #nearest neighbour distance(m)\n",
+ "c_m = c*10**-9; #height of unit cell(m)\n",
+ "V = 3*math.sqrt(3)*(a_m**2)*c_m/2; #volume of unit cell(m^3)\n",
+ "#if rho is density then mass = V*rho\n",
+ "#V*rho = 6*M/N\n",
+ "rho = (6*M)/(N*V); #density(kg/m^3)\n",
+ "\n",
+ "#Result\n",
+ "print \"Volume of the unit cell is\",round(V/1e-29,2),\"*10^-29 m^3\"\n",
+ "print \"density of Zinc is\",round(rho),\"kg/m^3\"\n",
+ "print \"answer for density given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume of the unit cell is 9.36 *10^-29 m^3\n",
+ "density of Zinc is 6960.0 kg/m^3\n",
+ "answer for density given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.4, Page number 2.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 1; #assume value of r as 1\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*r/math.sqrt(2); #for FCC structure\n",
+ "R = (a/2)-r; #since 2*r+2*R = a\n",
+ "R = math.ceil(R*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum radius of the sphere that can fit into the void is\",R,\"r\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum radius of the sphere that can fit into the void is 0.4143 r\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.5, Page number 2.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.356; #cube edge of diamond(nm)\n",
+ "aw = 12.01; #atomic weight of carbon(kg)\n",
+ "N = 6.023*10**26; #avagadro's number\n",
+ "\n",
+ "#Calculation\n",
+ "a_m = a*10**-9; #cube edge of diamond(m)\n",
+ "n = 8/(a_m**3); #number of atoms(per m^3)\n",
+ "n = n/10**29;\n",
+ "n = math.ceil(n*10**3)/10**3; #rounding off to 3 decimals\n",
+ "n = n*10**29;\n",
+ "M = aw/N; #mass of 1 carbon atom(kg)\n",
+ "rho = M*n;\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms per m^3 is\",n\n",
+ "print \"density of diamond is\",int(rho),\"kg/m^3\"\n",
+ "print \"answer for density given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of atoms per m^3 is 1.774e+29\n",
+ "density of diamond is 3537 kg/m^3\n",
+ "answer for density given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.6, Page number 2.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "MW = 23+35.5; #molecular weight of NaCl(gm)\n",
+ "N = 6.023*10**23; #avagadro number(mol-1)\n",
+ "rho = 2.18; #density of NaCl(gm/cm^3)\n",
+ "V = 1; #volume of unit cube(cm^3)\n",
+ "\n",
+ "#Calculation\n",
+ "M = MW/N; #mass of NaCl molecule(gm)\n",
+ "n = rho/M; #number of molecules per unit volume\n",
+ "n = 2*n; #since NaCl is diatomic(atoms/cm^3)\n",
+ "#length of edge of unit cube is n*a\n",
+ "#volume V = n^3*a^3 = 1 cm^3 \n",
+ "a = (V/n)**(1/3); #distance between two adjacent atoms(cm)\n",
+ "a = a*10**8; #distance between two adjacent atoms(A)\n",
+ "a = math.ceil(a*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between two adjacent atoms is\",a,\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "distance between two adjacent atoms is 2.814 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.7, Page number 2.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "AW = 63.5; #atomic weight of Cu(gm/mol)\n",
+ "N = 6.023*10**23; #avagadro's number(mol-1)\n",
+ "r = 1.278; #atomic radius(A)\n",
+ "n = 4; #number of atoms in unit cell\n",
+ "\n",
+ "#Calculation\n",
+ "r = r*10**-8; #atomic radius(cm)\n",
+ "M = AW/N; #mass of each Copper atom(gm)\n",
+ "a = 4*r/math.sqrt(2); #lattice constant(cm)\n",
+ "m = n*M; #mass of unit cell(gm)\n",
+ "rho = m/a**3; #density of copper crystal(gm/cm^3)\n",
+ "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"density of Copper crystal is\",rho,\"gm/cm^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "density of Copper crystal is 8.929 gm/cm^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.8, Page number 2.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 0.1249; #atomic radius(nm)\n",
+ "PF = 0.68; #packing factor for BCC\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*r/math.sqrt(3); #lattice constant(nm)\n",
+ "a_m = a*10**-9; #lattice constant(m)\n",
+ "V = a_m**3; #volume of unit cell(m^3)\n",
+ "FV = 1-PF; #free volume\n",
+ "FV1 = FV*V; #free volume per unit cell(m^3)\n",
+ "\n",
+ "#Result\n",
+ "print \"free volume per unit cell is\",round(FV1/1e-30,4),\"*10^-30 m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "free volume per unit cell is 7.6795 *10^-30 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.11, Page number 2.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "#in (100) plane the total number of atoms are n\n",
+ "n = (1/4)*4;\n",
+ "\n",
+ "#Calculation\n",
+ "#in (111) plane, area = (1/2)*base*height = (1/2)*a*sqrt(2)*a*sqrt(2)*cosd(30)\n",
+ "x = math.cos(30);\n",
+ "#area = (1/2)*a*sqrt(2)*a*sqrt(2)*x = 0.866*a^2 = 0.58/a^2\n",
+ "n1 = (1/360)*60*3;\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms in (100) plane are\",n;\n",
+ "#A = a^2. number of atoms per mm^2 is n/a^2\n",
+ "print \"number of atoms per mm^2 is 1/a^2\";\n",
+ "print \"number of atoms in (110) plane is 1\";\n",
+ "#in (110) plane, area is sqrt(2)*a*a = sqrt(2)*a^2\n",
+ "print \"unit area contains 1/(sqrt(2)*a^2) = 0.707/a^2 atoms/mm^2\";\n",
+ "print \"total number of atoms in (111) plane is\",n1\n",
+ "#number of atoms per unit area is 0.5/(0.866*a^2)\n",
+ "print \"number of atoms per unit area is 0.58/a^2 atoms/mm^2\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of atoms in (100) plane are 1.0\n",
+ "number of atoms per mm^2 is 1/a^2\n",
+ "number of atoms in (110) plane is 1\n",
+ "unit area contains 1/(sqrt(2)*a^2) = 0.707/a^2 atoms/mm^2\n",
+ "total number of atoms in (111) plane is 0.5\n",
+ "number of atoms per unit area is 0.58/a^2 atoms/mm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.12, Page number 2.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h1 = 1;\n",
+ "k1 = 1;\n",
+ "l1 = 0; #for (110) plane\n",
+ "h2 = 2;\n",
+ "k2 = 1;\n",
+ "l2 = 2; #for (212) plane\n",
+ "r = 0.1278; #atomic radius(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "r = r*10**-9; #atomic radius(m) \n",
+ "x1 = math.sqrt(h1**2+k1**2+l1**2);\n",
+ "a = 4*r/x1; #nearest neighbouring distance(m)\n",
+ "a = a*10**9; #nearest neighbouring distance(nm)\n",
+ "d_110 = a/x1; #interplanar spacing for (110),(nm)\n",
+ "x2 = math.sqrt(h2**2+k2**2+l2**2);\n",
+ "d_212 = a/x2; #interplanar spacing for (212),(nm)\n",
+ "d_212 = math.ceil(d_212*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar spacing for (110) is\",d_110,\"nm\"\n",
+ "print \"interplanar spacing for (212) is\",d_212,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "interplanar spacing for (110) is 0.2556 nm\n",
+ "interplanar spacing for (212) is 0.1205 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.13, Page number 2.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h1 = 1;\n",
+ "k1 = 0;\n",
+ "l1 = 0; #for (100) plane\n",
+ "h2 = 1;\n",
+ "k2 = 1;\n",
+ "l2 = 0; #for (110) plane \n",
+ "h3 = 1;\n",
+ "k3 = 1;\n",
+ "l3 = 1; #for (111) plane\n",
+ "\n",
+ "#Calculation\n",
+ "x1 = math.sqrt(1/(h1**2+k1**2+l1**2)); #for (100) plane\n",
+ "x2 = math.sqrt(1/(h2**2+k2**2+l2**2)); #for (110) plane \n",
+ "x3 = math.sqrt(1/(h3**2+k3**2+l3**2)); #for (111) plane\n",
+ "x2 = math.ceil(x2*10**2)/10**2; #rounding off to 2 decimals\n",
+ "x3 = math.ceil(x3*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of the seperation between successive lattice planes is %d:%.2f:%.2f\"%(x1,x2,x3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ratio of the seperation between successive lattice planes is 1:0.71:0.58\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.14, Page number 2.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Calculation\n",
+ "#plane intercepts at a,b/2,3*c\n",
+ "#therefore intercepts are (1 1/2 3)\n",
+ "x = 1;\n",
+ "y = 1/2;\n",
+ "z = 3;\n",
+ "def lcm(x, y):\n",
+ " if y > z:\n",
+ " greater = y\n",
+ " else:\n",
+ " greater = z\n",
+ "\n",
+ " while(True):\n",
+ " if((greater % y == 0) and (greater % z == 0)):\n",
+ " lcm = greater\n",
+ " break\n",
+ " greater += 1\n",
+ "\n",
+ " return lcm\n",
+ "\n",
+ "lcm = lcm(y,z); \n",
+ "x_dash = (1/x)*lcm; #miller index of x plane\n",
+ "y_dash = (1/y)*lcm; #miller index of y plane \n",
+ "z_dash = (1/z)*lcm; #miller index of z plane\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices of the plane are (\",x_dash,y_dash,z_dash,\")\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "miller indices of the plane are ( 3.0 6.0 1.0 )\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.15, Page number 2.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 0.282; #lattice spacing(nm)\n",
+ "n = 1; #first order\n",
+ "theta = (8+(35/60))*(math.pi/180); #glancing angle(radian)\n",
+ "theeta = 90; #maximum value possible(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theeta = theeta*math.pi/180; #maximum value possible(radian) \n",
+ "d = d*10**-9; #lattice spacing(m)\n",
+ "lamda = 2*d*math.sin(theta)/n; #wavelength of X-rays(m)\n",
+ "lamda_nm = lamda*10**9; #wavelength of X-rays(nm)\n",
+ "lamda_nm = math.ceil(lamda_nm*10**4)/10**4; #rounding off to 4 decimals\n",
+ "n1 = 2*d*math.sin(theeta)/lamda; #maximum order of diffraction possible\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of X-rays is\",lamda_nm,\"nm\"\n",
+ "print \"maximum order of diffraction possible is\",int(n1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of X-rays is 0.0842 nm\n",
+ "maximum order of diffraction possible is 6\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.16, Page number 2.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1.5; #wavelength(A.U)\n",
+ "d = 1.6; #interplanar spacing(A.U)\n",
+ "theta = 90; #maximum glancing angle possible(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theta = theta*math.pi/180; #maximum glancing angle possible(radian)\n",
+ "n = 2*d*math.sin(theta)/lamda; #maximum possible diffraction order\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum possible diffraction order is\",int(n)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum possible diffraction order is 2\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.17, Page number 2.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 1; #for (111) plane\n",
+ "theta = 30; #glancing angle(degrees)\n",
+ "n = 1; #first order\n",
+ "lamda = 1.5418; #wavelength of X-rays(A)\n",
+ "\n",
+ "#Calculation\n",
+ "theta = theta*math.pi/180; #glancing angle(radian)\n",
+ "x = math.sqrt(h**2+k**2+l**2);\n",
+ "lamda = lamda*10**-10; #wavelength of X-rays(m)\n",
+ "d = lamda/(2*math.sin(theta));\n",
+ "a = d*x; #interatomic spacing(m)\n",
+ "a = a*10**10; #interatomic spacing(A)\n",
+ "a = math.ceil(a*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the interatomic spacing is\",a,\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the interatomic spacing is 2.6705 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.18, Page number 2.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d100 = 0.28; #lattice constant(nm)\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 0; #for (110) plane\n",
+ "n = 2; #second order\n",
+ "lamda = 0.071; #wavelength of X-rays(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_m = lamda*10**-9; #wavelength of X-rays(m)\n",
+ "d110 = d100/math.sqrt(h**2+k**2+l**2); #interatomic spacing(nm)\n",
+ "d110 = d110*10**-9; #interatomic spacing(m)\n",
+ "theta = math.asin(n*lamda_m/(2*d110)); #glancing angle(radian)\n",
+ "theta = theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"the glancing angle is\",int(theta),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the glancing angle is 21 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.19, Page number 2.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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; #for (110) plane\n",
+ "\n",
+ "#Calculation\n",
+ "d = a/math.sqrt(h**2+k**2+l**2);\n",
+ "d = math.ceil(d*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the distance between (110) planes is\",d,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the distance between (110) planes is 0.27 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.20, Page number 2.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "#area of (110) plane is a*sqrt(2)*a = sqrt(2)*a^2\n",
+ "theta = 30; #glancing angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theta = theta*math.pi/180; #glancing angle(radian)\n",
+ "n = (1/4)*4; #number of atoms\n",
+ "x = math.cos(theta);\n",
+ "#area of (111) plane is (a/sqrt(2))*x*a*sqrt(2)\n",
+ "#hence area is (sqrt(3)/2)*a^2\n",
+ "n1 = 3*(1/6); #number of atoms\n",
+ "\n",
+ "#Result\n",
+ "print \"area of (110) plane contains\",n,\"atom\"\n",
+ "print \"density of lattice points is 1/(sqrt(2)*a^2)\"\n",
+ "print \"area of (111) plane contains\",n1,\"atom\"\n",
+ "#density of lattice points is (1/2)/(sqrt(3)*a^2/2)\n",
+ "print \"density of lattice points is 1/(sqrt(3)*a^2)\"\n",
+ "#density of lattice points (111) plane : (110) plane is 1/(sqrt(3)*a^2) : 1/(sqrt(2)*a^2) = sqrt(2):sqrt(3)\n",
+ "print \"density of lattice points (111) plane : (110) plane is sqrt(2):sqrt(3)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "area of (110) plane contains 1.0 atom\n",
+ "density of lattice points is 1/(sqrt(2)*a^2)\n",
+ "area of (111) plane contains 0.5 atom\n",
+ "density of lattice points is 1/(sqrt(3)*a^2)\n",
+ "density of lattice points (111) plane : (110) plane is sqrt(2):sqrt(3)\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.21, Page number 2.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 2; #second order\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 0; #plane (110)\n",
+ "lamda = 0.065; #wavelength of X-rays(nm)\n",
+ "a = 0.26; #axial length(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_m = lamda*10**-9; #wavelength of X-rays(m)\n",
+ "a_m = a*10**-9; #axial length(m)\n",
+ "x = math.sqrt(h**2+k**2+l**2);\n",
+ "theta = math.asin(n*lamda_m*x/(2*a_m)); #glancing angle(radian)\n",
+ "theta = theta*180/math.pi; #glancing angle(degrees)\n",
+ "deg = int(theta); #glancing angle(degrees)\n",
+ "t = 60*(theta-deg);\n",
+ "mint = int(t); #glancing angle(minutes)\n",
+ "\n",
+ "#Result\n",
+ "print \"the glancing angle is\",deg,\"degrees\",mint,\"minutes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the glancing angle is 20 degrees 42 minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.22, Page number 2.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1; #first order\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 1; #for (111) plane\n",
+ "lamda = 1.54; #wavelength(A.U)\n",
+ "theta = 19.2; #Bragg's angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_m = lamda*10**-10; #wavelength(m)\n",
+ "theta = theta*math.pi/180; #Bragg's angle(radian)\n",
+ "d = n*lamda_m/(2*math.sin(theta)); #interplanar spacing(m)\n",
+ "a = d*math.sqrt(h**2+k**2+l**2); #cube edge(m)\n",
+ "a_AU = a*10**10; #cube edge(A.U)\n",
+ "a_AU = math.ceil(a_AU*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the cube edge is\",a_AU,\"A.U\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the cube edge is 4.0554 A.U\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.23, Page number 2.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1; #first order\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 1; #for (111) plane\n",
+ "lamda = 1.54; #wavelength(A.U)\n",
+ "theta = 19.2; #Bragg's angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_m = lamda*10**-10; #wavelength(m)\n",
+ "theta = theta*math.pi/180; #Bragg's angle(radian)\n",
+ "d = n*lamda_m/(2*math.sin(theta)); #interplanar spacing(m)\n",
+ "a = d*math.sqrt(h**2+k**2+l**2); #cube edge(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"the cube edge is\",round(a/1e-10,3),\"*10^-10 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the cube edge is 4.055 *10^-10 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb new file mode 100755 index 00000000..afe7637e --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb @@ -0,0 +1,586 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:50d61ee8fa972cdf457beff8302930b51b8d1018696b3dbcc148db2d3f471c34"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "3: Principles of Quantum Mechanics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.1, Page number 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8 #velocity of light(m/sec)\n",
+ "m = 1.67*10**-27 #mass of proton(kg)\n",
+ "h = 6.626*10**-34 #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "v = (1/10)*c #velocity of proton(m/sec)\n",
+ "lamda = h/(m*v) #de Broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength of proton is\",round(lamda/1e-14,3),\"*10^-14 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength of proton is 1.323 *10^-14 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.2, Page number 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 400 #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength of electron is\",lamda,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength of electron is 0.613 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.3, Page number 3.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 1.674*10**-27 #mass of neutron(kg)\n",
+ "h = 6.626*10**-34 #planck's constant\n",
+ "e = 1.6*10**-19\n",
+ "KE = 0.025 #kinetic energy(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "E = KE*e #kinetic energy(J)\n",
+ "lamda = h/math.sqrt(2*m*E) #de Broglie wavelength(m)\n",
+ "lamda_nm = lamda*10**9 #de Broglie wavelength(nm)\n",
+ "lamda_nm = math.ceil(lamda_nm*10**4)/10**4 #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength is\",lamda_nm,\"nm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength is 0.1811 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.4, Page number 3.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 1600 #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength of electron is\",lamda,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength of electron is 0.3065 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.5, Page number 3.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_x = 0.2 #electron distance(angstrom)\n",
+ "h = 6.626*10**-34 #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "delta_x = delta_x*10**-10 #electron distance(m)\n",
+ "delta_p = h/(2*math.pi*delta_x) #uncertainity in momentum(kg.m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"uncertainity in momentum is\",round(delta_p/1e-24,3),\"*10^-24 kg m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " uncertainity in momentum is 5.273 *10^-24 kg m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.6, Page number 3.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1\n",
+ "n2 = 1\n",
+ "n3 = 1 #for lowest energy\n",
+ "e = 1.6*10**-19\n",
+ "h = 6.62*10**-34 #planck's constant\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 0.1 #side of box(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "L = L*10**-9 #side of box(m)\n",
+ "E1 = h**2*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n",
+ "E1 = E1/e #lowest energy(eV)\n",
+ "E1 = math.ceil(E1*10)/10 #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",E1,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lowest energy of electron is 112.9 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.7, Page number 3.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1\n",
+ "n2 = 1\n",
+ "n3 = 2 #for level next to the lowest\n",
+ "e = 1.6*10**-19\n",
+ "h = 6.62*10**-34 #planck's constant\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 0.1 #side of box(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "L = L*10**-9 #side of box(m)\n",
+ "E1 = h**2*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n",
+ "E1 = E1/e #lowest energy(eV)\n",
+ "E1 = math.ceil(E1*10**2)/10**2 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy of electron is\",E1,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy of electron is 225.75 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.8, Page number 3.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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 = 1.6*10**-19\n",
+ "E = 2000 #energy(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "E = E*e #energy(J)\n",
+ "lamda = h/math.sqrt(2*m*E) #wavelength(m)\n",
+ "lamda_nm = lamda*10**9 #velength(nm)\n",
+ "lamda_nm = math.ceil(lamda_nm*10**4)/10**4 #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",lamda_nm,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength is 0.0275 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.9, Page number 3.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1 #for minimum energy\n",
+ "h = 6.626*10**-34 #planck's constant(J sec)\n",
+ "m = 9.91*10**-31 #mass of electron(kg)\n",
+ "L = 4*10**-10 #side of box(m)\n",
+ "\n",
+ "#Calculation\n",
+ "E1 = ((h**2)*(n**2))/(8*m*(L**2)) #lowest energy(J)\n",
+ "E1 = E1*10**18;\n",
+ "E1 = math.ceil(E1*10**4)/10**4 #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy of electron is\",E1,\"*10**-18 J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy of electron is 0.3462 *10**-18 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.10, Page number 3.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1 #for ground state\n",
+ "n2 = 2 #for 1st excited state\n",
+ "n3 = 3 #for 2nd excited state\n",
+ "h = 6.626*10**-34 #planck's constant(J sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 1*10**-10 #width(m)\n",
+ "\n",
+ "#Calculation\n",
+ "E1 = h**2*n1**2/(8*m*L**2) #energy in ground state(J)\n",
+ "E2 = n2**2*E1 #energy in 1st excited state(J)\n",
+ "E3 = n3**2*E1 #energy in 2nd excited state(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy in ground state is\",round(E1/1e-18,3),\"*10^-18 J\"\n",
+ "print \"energy in 1st excited state is\",round(E2/1e-17,3),\"*10^-17 J\"\n",
+ "print \"energy in 2nd excited state is\",round(E3/1e-17,3),\"*10^-17 J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy in ground state is 6.031 *10^-18 J\n",
+ "energy in 1st excited state is 2.412 *10^-17 J\n",
+ "energy in 2nd excited state is 5.428 *10^-17 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.11, Page number 3.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.626*10**-34 #planck's constant(J sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "e = 1.6*10**-19\n",
+ "lamda = 1.66*10**-10 #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "v = h/(m*lamda) #velocity of electron(m/sec)\n",
+ "v_km = v*10**-3 #velocity of electron(km/sec)\n",
+ "KE = (1/2)*m*v**2 #kinetic energy(J)\n",
+ "KE_eV = KE/e #kinetic energy(eV)\n",
+ "KE_eV = math.ceil(KE_eV*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity of electron is\",int(v_km),\"km/sec\"\n",
+ "print \"kinetic energy of electron is\",KE_eV,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of electron is 4386 km/sec\n",
+ "kinetic energy of electron is 54.714 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.12, Page number 3.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 15 #potential(kV)\n",
+ "\n",
+ "#Calculation\n",
+ "V = V*10**3 #potential(V)\n",
+ "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n",
+ "lamda = math.ceil(lamda*100)/100 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of electron waves is\",lamda,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of electron waves is 0.11 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.13, Page number 3.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 344 #potential(V)\n",
+ "n = 1 #for 1st reflection maximum\n",
+ "theta = 60 #glancing angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n",
+ "lamda_m = lamda*10**-10 #de Broglie wavelength(m)\n",
+ "theta = theta*math.pi/180 ##glancing angle(radians)\n",
+ "d = n*lamda_m/(2*math.sin(theta)) #interatomic spacing(m)\n",
+ "d = d*10**10 #interatomic spacing(angstrom)\n",
+ "d = math.ceil(d*10**5)/10**5 #rounding off to 5 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"interatomic spacing of crystal is\",d,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "interatomic spacing of crystal is 0.38164 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb new file mode 100755 index 00000000..d55516d5 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb @@ -0,0 +1,390 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7ccac901d3d7a8c9dde630e169f5e7e52a039a9eb5d4b37586cb97d5a7fe1fca"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "4: Electron Theory of Metals"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.1, Page number 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho_s = 10.5*10**3 #density of silver(kg/m^3)\n",
+ "NA = 6.02*10**26 #avagadro number(per k-mol)\n",
+ "MA = 107.9 #atomic weight of silver\n",
+ "sigma = 6.8*10**7; #conductivity of silver(ohm-1 m-1)\n",
+ "e = 1.6*10**-19\n",
+ "\n",
+ "#Calculation\n",
+ "n = rho_s*NA/MA #molar volume of silver\n",
+ "mew = sigma/(n*e) #mobility of electrons(m^2/Vs)\n",
+ "mew = mew*10**2\n",
+ "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"density of electrons in silver is\",round(n/1e28,2),\"*10^28\"\n",
+ "print \"mobility of electrons is\",mew,\"*10**-2 m**2/Vs\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "density of electrons in silver is 5.86 *10^28\n",
+ "mobility of electrons is 0.7255 *10**-2 m**2/Vs\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.2, Page number 4.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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",
+ "e = 1.6*10**-19\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "N = 6.02*10**26 #avagadro's number(per k-mol)\n",
+ "AW = 63.5 #atomic weight\n",
+ "rho = 1.73*10**-8 #resistivity of copper, ohm-m\n",
+ "\n",
+ "#Calculation\n",
+ "n = d*N/AW #number of cu atoms(per m^3)\n",
+ "mew = 1/(rho*n*e) #mobility of electrons(m/Vs)\n",
+ "mew = mew*10**2\n",
+ "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n",
+ "tow = m/(n*e**2*rho) #relaxation time(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"mobility of electrons is\",round(mew,3),\"*10**-2 m/Vs\"\n",
+ "print \"relaxation time is\",round(tow/1e-14,3),\"*10^-14 sec\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mobility of electrons is 0.427 *10**-2 m/Vs\n",
+ "relaxation time is 2.43 *10^-14 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.3, Page number 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho = 1.54*10**-8 #resistivity(ohm-m)\n",
+ "n = 5.8*10**28 #conduction electrons(per m^3)\n",
+ "m = 9.108*10**-31 #mass of electron(kg)\n",
+ "e = 1.602*10**-19\n",
+ "\n",
+ "#Calculation\n",
+ "tow = m/(n*(e**2)*rho) #relaxation time(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"relaxation time of conduction electrons is\",round(tow/1e-14,2),\"*10^-14 sec\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relaxation time of conduction electrons is 3.97 *10^-14 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.4, Page number 4.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R = 0.06 #resistance(ohm)\n",
+ "D = 5 #length of Al wire(m)\n",
+ "e = 1.602*10**-19\n",
+ "rho = 2.7*10**-8 #resistivity of Al(ohm-m)\n",
+ "MA = 26.98 #atomic weight\n",
+ "NA = 6.025*10**26 #avagadro number(k/mol)\n",
+ "rho_s = 2.7*10**3 #density(kg/m^3)\n",
+ "I = 15 #current(A)\n",
+ "\n",
+ "#Calculation\n",
+ "n = 3*rho_s*NA/MA #free electron concentration(electrons/m^3)\n",
+ "mew = 1/(n*e*rho) #mobility(m/Vs)\n",
+ "E = I*R/D #electric field(V/m)\n",
+ "vd = mew*E #drift velocity(m/s)\n",
+ "vd = vd*10**3\n",
+ "mew = mew*10**3\n",
+ "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n",
+ "vd = math.ceil(vd*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"free electron concentration is\",round(n/1e29,4),\"*10^29 electrons/m^2\"\n",
+ "print \"mobility is\",round(mew,3),\"*10^-3 m/Vs\"\n",
+ "print \"drift velocity is\",round(vd,2),\"*10^-3 m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "free electron concentration is 1.8088 *10^29 electrons/m^2\n",
+ "mobility is 1.278 *10^-3 m/Vs\n",
+ "drift velocity is 0.23 *10^-3 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.5, Page number 4.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1\n",
+ "n2 = 1\n",
+ "n3 = 1 #for lowest energy\n",
+ "h = 6.62*10**-34 #planck's constant(Js)\n",
+ "e = 1.6*10**-19\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 0.1 #side of box(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "L = L*10**-9 #side of box(m)\n",
+ "E1 = (h**2)*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n",
+ "E1 = E1/e #lowest energy(eV)\n",
+ "E1 = math.ceil(E1*10)/10 #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",E1,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lowest energy of electron is 112.9 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.6, Page number 4.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "#Fermi function F(E) = 1/(1+exp((E-Ef)/(kT)))\n",
+ "#given E-Ef = kT. therefore F(E) = 1/(1+exp(1))\n",
+ "F_E = 1/(1+math.exp(1))\n",
+ "F_E = math.ceil(F_E*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"fermi function is\",F_E"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fermi function is 0.269\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.7, Page number 4.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "F_E = 10 #probability in percent\n",
+ "k = 1.38*10**-23\n",
+ "EF = 5.5 #fermi energy(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "E = EF+(EF/100) #energy(eV)\n",
+ "X = E-EF #E-EF(eV)\n",
+ "X = X*e #E-EF(J)\n",
+ "T = X/(k*math.log(F_E-1)) #temperature(K)\n",
+ "T = math.ceil(T*10**2)/10**2 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T,1),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 290.2 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.8, Page number 4.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "F_E = 0.01 #probability in percent\n",
+ "k = 1.38*10**-23\n",
+ "e = 1.6*10**-19\n",
+ "#let E-EF be X\n",
+ "X = 0.5 #E-EF(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "kT = X/(2.303*math.log10((1-F_E)*100)) #value of kT(eV)\n",
+ "T = kT*e/k #temperature(K)\n",
+ "T = math.ceil(T*10)/10 #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",T,\"K\"\n",
+ "print \"answer given in the book is wrong by a decimal point\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 1261.4 K\n",
+ "answer given in the book is wrong by a decimal point\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb new file mode 100755 index 00000000..a6f7f46a --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb @@ -0,0 +1,429 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d8c62a33cdb998cb212b402408ceb0e19f54a33922b51cf1b80232d50d8d2341"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "6: Dielectric Properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.1, Page number 6.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "C = 2 #capacitance(micro-farad)\n",
+ "V = 1000 #voltage applied(V)\n",
+ "epsilon_r = 100 #permitivity\n",
+ "\n",
+ "#Calculation\n",
+ "C = C*10**-6 #capacitance(farad)\n",
+ "W = (C*V**2)/2 #energy stored in capacitor(J)\n",
+ "C0 = C/epsilon_r #capacitance removing the dielectric\n",
+ "W0 = C0*(V**2)/2 #energy stored without dielectric(J)\n",
+ "E = 1-W0 #energy stored in dielectric(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy stored in capacitor is\",W,\"J\"\n",
+ "print \"energy stored in the dielectric is\",E,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy stored in capacitor is 1.0 J\n",
+ "energy stored in the dielectric is 0.99 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.2, Page number 6.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon_r = 4.94\n",
+ "n_2 = 2.69 #square of index of refraction\n",
+ "alpha_i = 0 #at optical frequencies\n",
+ "\n",
+ "#Calculation\n",
+ "#(epsilon_r-1)/(epsilon_r+2) = N*(alpha_e+alpha_i)/(3*epsilon0)\n",
+ "X = (epsilon_r-1)/(epsilon_r+2)\n",
+ "#epsilon_r = n**2. therefore (n**2-1)/(n**2+2) = N*alpha_e/(3*epsilon0)\n",
+ "Y = (n_2-1)/(n_2+2)\n",
+ "#N*(alpha_e+alpha_i)/N*alpha_e = X/Y\n",
+ "#let alpha = alpha_i/alpha_e\n",
+ "alphai_e = (X/Y)-1 #ratio between electronic ionic and electronic polarizability\n",
+ "alphai_e = math.ceil(alphai_e*10**4)/10**4 #rounding off to 4 decimals\n",
+ "alphae_i = 1/alphai_e #ratio between electronic and ionic polarizability\n",
+ "alphae_i = math.ceil(alphae_i*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio between electronic ionic and electronic polarizability is\",alphai_e\n",
+ "print \"ratio between electronic and ionic polarizability is\",alphae_i"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ratio between electronic ionic and electronic polarizability is 0.5756\n",
+ "ratio between electronic and ionic polarizability is 1.738\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.3, Page number 6.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon_r = 2.56\n",
+ "tan_delta = 0.7*10**-4\n",
+ "f = 1 #frequency(MHz)\n",
+ "A = 8 #area(cm**2)\n",
+ "d = 0.08 #diameter(mm)\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "A = A*10**-4 #area(m**2)\n",
+ "d = d*10**-3 #diameter(m)\n",
+ "epsilon_rdash = epsilon_r*tan_delta\n",
+ "omega = 2*math.pi*10**6\n",
+ "Rp = d/(omega*epsilon0*epsilon_rdash*A) #parallel loss resistance(ohm)\n",
+ "Rp = Rp*10**-6 #parallel loss resistance(Mega ohm)\n",
+ "Rp = math.ceil(Rp*10**3)/10**3 #rounding off to 3 decimals\n",
+ "Cp = A*epsilon0*epsilon_r/d #capacitance(farad)\n",
+ "\n",
+ "#Result\n",
+ "print \"parallel loss resistance is\",Rp,\"ohm\"\n",
+ "print \"capacitance in Farad is\",Cp,\"Farad\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "parallel loss resistance is 10.036 ohm\n",
+ "capacitance in Farad is 2.2656e-10 Farad\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.4, Page number 6.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N = 3*10**28 #density(atoms/m**3)\n",
+ "alpha_e = 10**-40 #electronic polarizability(Farad-m**2)\n",
+ "epsilon0 = 8.854*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "epsilon_r = 1+(N*alpha_e/epsilon0) #dielectric constant of material\n",
+ "epsilon_r = math.ceil(epsilon_r*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric constant of material is\",epsilon_r "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dielectric constant of material is 1.339\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.5, Page number 6.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon0 = 8.854*10**-12\n",
+ "epsilon_r = 1.0000684 #dielectric constant\n",
+ "N = 2.7*10**25 #density(atoms/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "alpha_e = epsilon0*(epsilon_r-1)/N #electronic polarizability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarizability is\",round(alpha_e/1e-41,3),\"*10^-41 Fm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electronic polarizability is 2.243 *10^-41 Fm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.6, Page number 6.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "V = 100 #potential(V)\n",
+ "A = 100 #area(cm**2)\n",
+ "d = 1 #plate seperation(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "A = A*10**-4 #area(m**2)\n",
+ "d = d*10**-2 #plate seperation(m)\n",
+ "C = epsilon0*A/d #capacitance(farad)\n",
+ "Q = C*V #charge on plates\n",
+ "\n",
+ "#Result\n",
+ "print \"capacitance of capacitor is\",C,\"F\"\n",
+ "print \"charge on plates in coulomb is\",Q,\"coulomb\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "capacitance of capacitor is 8.85e-12 F\n",
+ "charge on plates in coulomb is 8.85e-10 coulomb\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.7, Page number 6.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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",
+ "AW = 32 #atomic weight of sulphur\n",
+ "epsilon_r = 3.75 #relative dielectric constant\n",
+ "epsilon0 = 8.55*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "n = N*d/AW #number of atoms(per m**3)\n",
+ "alpha_e = ((epsilon_r-1)/(epsilon_r+2))*3*epsilon0/n #electronic polarizability(Fm**2) \n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarizability is\",round(alpha_e/1e-40,3),\"*10^-40 Fm**2\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electronic polarizability is 3.181 *10^-40 Fm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.8, Page number 6.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Q = 2*10**-10 #charge(coulomb)\n",
+ "d = 4 #plate seperation(mm)\n",
+ "epsilon_r = 3.5 #dielectric constant\n",
+ "A = 650 #area(mm**2)\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "d = d*10**-3 #plate seperation(m)\n",
+ "A = A*10**-6 #area(m**2)\n",
+ "V = Q*d/(epsilon0*epsilon_r*A) #voltage across capacitors(V)\n",
+ "V = math.ceil(V*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"resultant voltage across capacitors is\",V,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resultant voltage across capacitors is 39.735 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.9, Page number 6.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 10 #potential(V)\n",
+ "d = 2*10**-3 #plate seperation(m)\n",
+ "epsilon_r = 6\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "E = V/d #electric field(V/m)\n",
+ "D = epsilon0*epsilon_r*E #dielectric displacement(C/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric displacement is\",D,\"Cm^-2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dielectric displacement is 2.655e-07 Cm^-2\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb new file mode 100755 index 00000000..e3eb080f --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb @@ -0,0 +1,465 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1ba9d8e44f464fdd4be85263413cd33050741f89efba47984e88555948ca8361"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "7: Magnetic Properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.1, Page number 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M = 1.4 #field(T)\n",
+ "H = 6.5*10**-4 #magnetic field(T)\n",
+ "\n",
+ "#Calculation\n",
+ "chi = M/H #susceptibility\n",
+ "mew_r = 1+chi #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability of iron is\",round(mew_r)\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative permeability of iron is 2155.0\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.2, Page number 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M = 3300 #magnetisation(amp/m)\n",
+ "H = 220 #field strength(amp/m)\n",
+ "\n",
+ "#Calculation\n",
+ "mew_r = (M/H)+1 #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability of material is\",mew_r"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative permeability of material is 16.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.3, Page number 7.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 10**6 #magnetic field intensity(amp/m)\n",
+ "chi = 1.5*10**-3 #susceptibility\n",
+ "\n",
+ "#Calculation\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "M = chi*H #magnetisation(A/m)\n",
+ "B = mew0*(M+H) #flux density(T)\n",
+ "M = M*10**-3\n",
+ "B = math.ceil(B*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M,\"*10**3 A/m\"\n",
+ "print \"flux density is\",B,\"T\"\n",
+ "print \"answer for flux density B given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetisation of material is 1.5 *10**3 A/m\n",
+ "flux density is 1.259 T\n",
+ "answer for flux density B given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.4, Page number 7.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 10**4 #magnetic field intensity(amp/m)\n",
+ "chi = 3.7*10**-3 #susceptibility\n",
+ "\n",
+ "#Calculation\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "M = chi*H #magnetisation(A/m)\n",
+ "B = mew0*(M+H) #flux density(Wb/m**2)\n",
+ "B = math.ceil(B*10**5)/10**5 #rounding off to 5 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M,\"A/m\"\n",
+ "print \"flux density is\",B,\"Wb/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetisation of material is 37.0 A/m\n",
+ "flux density is 0.01262 Wb/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.5, Page number 7.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I = 500 #current(mA)\n",
+ "d = 10 #diameter(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "I = I*10**-3 #current(A)\n",
+ "r = d/2 #radius(cm)\n",
+ "r = r*10**-2 #radius(m)\n",
+ "A = 2*math.pi*r**2 #area(m**2)\n",
+ "mew_m = I*A #magnetic moment(Am**2)\n",
+ "mew_m = mew_m*10**3\n",
+ "mew_m = math.ceil(mew_m*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment associated with the loop is\",mew_m,\"*10**-3 Am**2\"\n",
+ "print \"answer given in the book is wrong in the 3rd decimal\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetic moment associated with the loop is 7.854 *10**-3 Am**2\n",
+ "answer given in the book is wrong in the 3rd decimal\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.6, Page number 7.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 5.29*10**-11 #radius of orbit(m)\n",
+ "B = 2 #field applied(T)\n",
+ "e = 1.602*10**-19 #charge of electron(coulomb)\n",
+ "m = 9.108*10**-31 #mass of electron(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/1e-29,3),\"*10^-29 Am**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in magnetic moment is 3.943 *10^-29 Am**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.7, Page number 7.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "chi_1 = 2.8*10**-4 #susceptibility\n",
+ "T1 = 350 #temperature(K)\n",
+ "T2 = 300 #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "#chi = C/T where C is curie constant\n",
+ "chi_2 = chi_1*T1/T2 #susceptibility at 300 K\n",
+ "chi_2 = chi_2*10**4\n",
+ "chi_2 = math.ceil(chi_2*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"susceptibility at 300 K is\",chi_2,\"*10**-4\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "susceptibility at 300 K is 3.267 *10**-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.8, Page number 7.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 8906 #density(kg/m**3)\n",
+ "n = 6.025*10**26 #avagadro number\n",
+ "AW = 58.7 #atomic weight\n",
+ "Bs = 0.65 #magnetic induction(Wb/m**2)\n",
+ "mewB = 9.27*10**-24 \n",
+ "\n",
+ "#Calculation\n",
+ "N = d*n/AW #number of atoms(per m**3)\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "mew_m = Bs/(N*mew0) #magnetic moment(Am**2)\n",
+ "mew_m = mew_m/mewB #magnetic moment(mewB)\n",
+ "mew_m = math.ceil(mew_m*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the magnetic moment of Ni is\",mew_m,\"mewB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the magnetic moment of Ni is 0.611 mewB\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.9, Page number 7.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 2 #magnetic field(Wb/m**2)\n",
+ "mew = 9.4*10**-24\n",
+ "k = 1.38*10**-23\n",
+ "\n",
+ "#Calculation\n",
+ "#np = C*n0*math.exp(mew*H/(k*T))\n",
+ "#na = C*n0*math.exp(-mew*H/(k*T))\n",
+ "#np/na = exp(mew*H/(k*T))/exp(-mew*H/(k*T)) = exp(2*mew*H/(k*T))\n",
+ "#given np/na = 2. therefore exp(2*mew*H/(k*T)) = 2\n",
+ "T = 2*mew*H/(k*math.log(2)) #temperature(K)\n",
+ "T = math.ceil(T*10**2)/10**2 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",T,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 3.94 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.10, Page number 7.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "AW = 157.26 #atomic weight\n",
+ "d = 7.8*10**3 #density(kg/m**3)\n",
+ "A = 6.025*10**26 #avagadro number\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "N = d*A/AW #number of atoms 1 kg contains\n",
+ "g = N/10**3 #number of atoms 1 g contains\n",
+ "mew_B = 7.1 #bohr magneton\n",
+ "mew_m = 9.27*10**-24\n",
+ "mew_mg = g*mew_B*mew_m #magnetic moment per gram(Am**2)\n",
+ "mew_mg = math.ceil(mew_mg*10**3)/10**3 #rounding off to 3 decimals\n",
+ "print \"magnetic moment per gram is\",mew_mg,\"Am**2\"\n",
+ "Bs = N*mew0*mew_m #saturation magnetisation(Wb/m**2)\n",
+ "Bs = math.ceil(Bs*10**4)/10**4 #rounding off to 4 decimals\n",
+ "print \"saturation magnetisation is\",Bs,\"Wb/m**2\"\n",
+ "print \"answers given in the book are wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetic moment per gram is 1966.852 Am**2\n",
+ "saturation magnetisation is 0.3482 Wb/m**2\n",
+ "answers given in the book are wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb new file mode 100755 index 00000000..403a2566 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb @@ -0,0 +1,931 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:56ac13dd16475ea277515219c6087df27ecfe535e7f6298ab44a9065695ca2d8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ " 8: Semiconductors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.1, Page number 8.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.37*10**19; #intrinsic 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); #conductivity(ohm-1 m-1)\n",
+ "rho = 1/sigma_i; #resistivity(ohm m)\n",
+ "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",rho,\"ohm m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistivity is 0.471 ohm m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.2, Page number 8.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg = 1.12; #band gap(eV)\n",
+ "k = 1.38*10**-23;\n",
+ "T = 300; #temperature(K)\n",
+ "e = 1.6*10**-19;\n",
+ "m0 = 1; #for simplicity assume value of m0 to be unity\n",
+ "\n",
+ "#Calculation\n",
+ "mh = 0.28*m0;\n",
+ "me = 0.12*m0;\n",
+ "EF = (Eg/2)+(3*k*T*np.log(mh/me)/(4*e)); #position of Fermi level(eV)\n",
+ "EF = math.ceil(EF*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"position of Fermi level is\",EF,\"eV from the top of valence band\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "position of Fermi level is 0.5765 eV from the top of valence band\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.3, Page number 8.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T = 300; #temperature(K)\n",
+ "e = 1.6*10**-19;\n",
+ "m = 9.109*10**-31; #mass of electron(kg)\n",
+ "k = 1.38*10**-23; #boltzmann's constant\n",
+ "h = 6.626*10**-34; #planck's constant\n",
+ "Eg = 0.7; #band gap(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "Eg = Eg*e; #band gap(J)\n",
+ "A = (2*math.pi*m*k*T/h**2)**(3/2);\n",
+ "B = math.exp(-Eg/(2*k*T));\n",
+ "ni = 2*A*B; #concentration of intrinsic charge carriers per m^3\n",
+ "\n",
+ "#Result\n",
+ "print \"concentration of intrinsic charge carriers is\",round(ni/1e+19,3),\"*10^19 per m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "concentration of intrinsic charge carriers is 3.348 *10^19 per m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.4, Page number 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.4*10**19; #intrinsic 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); #conductivity(ohm-1 m-1)\n",
+ "rho = 1/sigma_i; #resistivity(ohm m)\n",
+ "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",rho,\"ohm m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistivity is 0.449 ohm m\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.5, Page number 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.5*10**19; #intrinsic 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",
+ "w = 1; #width(mm)\n",
+ "t = 1; #thickness(mm)\n",
+ "l = 1; #length(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "w = w*10**-3; #width(m)\n",
+ "t = t*10**-3; #thickness(m)\n",
+ "A = w*t; #area(m^2)\n",
+ "l = l*10**-2; #length(m)\n",
+ "R = l/(sigma_i*A); #resistivity(ohm m)\n",
+ "R = R/10**3;\n",
+ "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"resistance of intrinsic Ge rod is\",R,\"*10^3 ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance of intrinsic Ge rod is 4.311 *10^3 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.6, Page number 8.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 9.109*10**-31; #mass of electron(kg)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "h = 6.626*10**-34; #planck's constant\n",
+ "T = 300; #temperature(K)\n",
+ "kT = 0.026;\n",
+ "e = 1.6*10**-19;\n",
+ "Eg = 1.1; #energy gap(eV)\n",
+ "mew_e = 0.48; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.013; #hole mobility(m^2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "C = 2*(2*math.pi*m*k/h**2)**(3/2);\n",
+ "ni = C*(T**(3/2))*math.exp(-Eg/(2*kT)); #intrinsic carrier density per m^3\n",
+ "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "sigma_i = sigma_i*10**3;\n",
+ "sigma_i = math.ceil(sigma_i*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma_i,\"*10**-3 ohm-1 m-1\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conductivity is 1.286 *10**-3 ohm-1 m-1\n",
+ "answer given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.7, Page number 8.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 9.109*10**-31; #mass of electron(kg)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "h = 6.626*10**-34; #planck's constant\n",
+ "T = 300; #temperature(K)\n",
+ "e = 1.6*10**-19;\n",
+ "Eg = 0.7; #energy gap(eV)\n",
+ "mew_e = 0.4; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.2; #hole mobility(m^2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "ni = 2*(2*math.pi*m*k*T/h**2)**(3/2)*math.exp(-Eg*e/(2*k*T)); #intrinsic carrier density per m^3\n",
+ "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "sigma = math.ceil(sigma*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"intrinsic carrier density is\",round(ni/1e+19,2),\"*10^19 per m^3\"\n",
+ "print \"conductivity is\",sigma,\"ohm-1 m-1\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "intrinsic carrier density is 3.35 *10^19 per m^3\n",
+ "conductivity is 3.22 ohm-1 m-1\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.8, Page number 8.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho = 2.12; #resistivity(ohm m)\n",
+ "e = 1.6*10**-19;\n",
+ "m = 9.109*10**-31; #mass of electron(kg)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "h = 6.626*10**-34; #planck's constant\n",
+ "mew_e = 0.36; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.17; #hole mobility(m^2/Vs)\n",
+ "T = 300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma = 1/rho; #conductivity(ohm-1 m-1)\n",
+ "ni = sigma/(e*(mew_e+mew_h)); #intrinsic carrier density per m^3\n",
+ "C = 2*(2*math.pi*m*k/h**2)**(3/2);\n",
+ "#let exp(Eg/(2*k*T)) be a\n",
+ "a = (C*T**(3/2))/ni;\n",
+ "#Eg/(2*k*T) = log(a) and Eg = 2*k*T*log(a)\n",
+ "Eg = 2*k*T*np.log(a)/e; #forbidden energy gap(eV)\n",
+ "Eg = math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"forbidden energy gap is\",Eg,\"eV\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "forbidden energy gap is 0.793 eV\n",
+ "answer given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.9, Page number 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho_2 = 4.5; #resistivity at 20C\n",
+ "rho_1 = 2; #resistivity at 32C\n",
+ "T1 = 20; #temperature(C)\n",
+ "T2 = 32; #temperature(C)\n",
+ "k = 8.616*10**-5;\n",
+ "\n",
+ "#Calculation\n",
+ "T1 = T1+273; #temperature(K)\n",
+ "T2 = T2+273; #temperature(K)\n",
+ "dy = np.log10(rho_2)-np.log10(rho_1);\n",
+ "dx = (1/T1)-(1/T2);\n",
+ "Eg = 2*k*dy/dx; #energy band gap(eV)\n",
+ "Eg = math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy band gap is\",Eg,\"eV\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy band gap is 0.452 eV\n",
+ "answer given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.10, Page number 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg = 1; #band gap(eV)\n",
+ "e = 1.602*10**-19;\n",
+ "me = 1; #for simplicity assume me to be unity\n",
+ "E_Ef = 10/100; #fermi level shift(eV)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "Eg = Eg*e; #band gap(J)\n",
+ "mh = 4*me; #effective mass of holes is 4 times of electrons\n",
+ "E_Ef = E_Ef*e; #fermi level shift(J)\n",
+ "#E_Ef = 3*k*T*np.log(mh/me)/4\n",
+ "T = 4*E_Ef/(3*k*np.log(mh/me)); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",int(T),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 1116 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.11, Page number 8.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Na = 5*10**23; #atoms of boron\n",
+ "Nd = 3*10**23; #arsenic 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 = n/10**9;\n",
+ "\n",
+ "#Result\n",
+ "print \"electron concentration is\",int(n),\"*10**9 per m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electron concentration is 2 *10**9 per m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.12, Page number 8.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 1.5*10**16; #intrinsic charge carriers per m^3\n",
+ "e = 1.6*10**-19;\n",
+ "mew_e = 0.13; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.05; #hole mobility(m^2/Vs)\n",
+ "AW = 28.1; #atomic weight of Si(kg)\n",
+ "d = 2.33*10**3; #density of Si(kg/m^3)\n",
+ "N = 6.02*10**26; #avagadro number\n",
+ "\n",
+ "#Calculation\n",
+ "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "sigma = sigma*10**3;\n",
+ "Nd = d*N/AW; #impurity atoms per m^3\n",
+ "Nd = Nd/10**8; #extent of 10^8 Si atoms\n",
+ "p = ni**2/Nd; #hole concentration per m^3\n",
+ "sigma_ex = Nd*e*mew_e; #conductivity(ohm-1 m-1)\n",
+ "sigma_ex = math.ceil(sigma_ex*10**3)/10**3; #rounding off to 3 decimals\n",
+ "Na = Nd;\n",
+ "n = ni**2/Na; #electron concentration per m^3\n",
+ "sigma_EX = Na*e*mew_h; #conductivity(ohm-1 m-1)\n",
+ "sigma_EX = math.ceil(sigma_EX*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma,\"*10^-3 ohm-1 m-1\"\n",
+ "print \"conductivity if donor type impurity is added is\",sigma_ex,\"ohm-1 m-1\"\n",
+ "print \"conductivity if acceptor type impurity is added is\",sigma_EX,\"ohm-1 m-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conductivity is 0.432 *10^-3 ohm-1 m-1\n",
+ "conductivity if donor type impurity is added is 10.383 ohm-1 m-1\n",
+ "conductivity if acceptor type impurity is added is 3.994 ohm-1 m-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.13, Page number 8.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 1.5*10**16; #intrinsic charge carriers per m^3\n",
+ "e = 1.6*10**-19;\n",
+ "mew_e = 0.135; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.048; #hole mobility(m^2/Vs)\n",
+ "Nd = 10**23; #phosphorus atoms per m^3\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "T = 300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "sigma = sigma*10**3;\n",
+ "p = (ni**2)/Nd; #hole concentration per m^3\n",
+ "p = p/10**9;\n",
+ "sigma_ex = Nd*e*mew_e; #conductivity(ohm-1 m-1)\n",
+ "#EF = (Eg/2)+(3*k*T*log(mew_e/mew_h)/4)\n",
+ "X = 3*k*T*np.log(mew_e/mew_h)/(4*e);\n",
+ "X = math.ceil(X*10**3)/10**3; #rounding off to 3 decimals\n",
+ "#EF = (Eg/2)+X\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma,\"*10^-3 ohm-1 m-1\"\n",
+ "print \"hole concentration is\",p,\"*10**9 per m^3\"\n",
+ "print \"answer for hole concentration given in the book is wrong\"\n",
+ "print \"EF = Eg/2 + \",X\n",
+ "print \"Fermi level will be positioned at \",X,\"eV above intrinsic level\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conductivity is 0.4392 *10^-3 ohm-1 m-1\n",
+ "hole concentration is 2.25 *10**9 per m^3\n",
+ "answer for hole concentration given in the book is wrong\n",
+ "EF = Eg/2 + 0.021\n",
+ "Fermi level will be positioned at 0.021 eV above intrinsic level\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.14, Page number 8.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "T = 300; #temperature(K)\n",
+ "e = 1.6*10**-19;\n",
+ "\n",
+ "#Calculation\n",
+ "Dn = mew_e*k*T/e; #diffusion coefficient(m^2/s)\n",
+ "Dn = Dn*10**4;\n",
+ "Dn = math.ceil(Dn*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"diffusion coefficient of electrons is\",Dn,\"*10^-4 m^2/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diffusion coefficient of electrons is 49.17 *10^-4 m^2/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.15, Page number 8.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#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; #thickness(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "t = t*10**-3; #thickness(m)\n",
+ "VH = RH*I*B/t; #Hall voltage(V)\n",
+ "VH = VH*10**3; #Hall voltage(mV)\n",
+ "\n",
+ "#Result\n",
+ "print \"Hall voltage developed is\",VH,\"mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hall voltage developed is 1.83 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.16, Page number 8.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vy = 37; #voltage(micro-V)\n",
+ "t = 1; #thickness(mm)\n",
+ "Bz = 0.5; #flux density(Wb/m^2)\n",
+ "Ix = 20; #current(mA)\n",
+ "\n",
+ "#Calculation\n",
+ "Vy = Vy*10**-6; #voltage(V)\n",
+ "t = t*10**-3; #thickness(m)\n",
+ "Ix = Ix*10**-3; #current(A)\n",
+ "RH = Vy*t/(Ix*Bz); #Hall coefficient(C-1 m^3)\n",
+ "\n",
+ "#Result\n",
+ "print \"Hall coefficient of semiconductor is\",RH,\"C-1 m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hall coefficient of semiconductor is 3.7e-06 C-1 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.17, Page number 8.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH = -7.35*10**-5; #Hall coefficient(m^3/C)\n",
+ "e = 1.6*10**-19;\n",
+ "sigma = 200; #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "#Calculation\n",
+ "n = -1/(RH*e); #density(m^3)\n",
+ "mew = sigma/(n*e); #mobility(m^2/Vs)\n",
+ "mew = mew*10**3;\n",
+ "\n",
+ "#Result\n",
+ "print \"density of charge carriers is\",round(n/1e+22,3),\"*10^22 m^3\"\n",
+ "print \"mobility of charge carriers is\",mew,\"*10^-3 m^2/Vs\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "density of charge carriers is 8.503 *10^22 m^3\n",
+ "mobility of charge carriers is 14.7 *10^-3 m^2/Vs\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.18, Page number 8.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I = 50; #current(A)\n",
+ "B = 1.5; #magnetic field(T)\n",
+ "e = 1.6*10**-19;\n",
+ "n = 8.4*10**28; #free electron concentration(electron/m^3)\n",
+ "t = 0.5; #thickness(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "t = t*10**-2; #thickness(m)\n",
+ "VH = I*B/(n*e*t); #hall voltage(V)\n",
+ "VH = VH*10**6; #hall voltage(micro-V)\n",
+ "VH = math.ceil(VH*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnitude of Hall voltage is\",VH,\"micro-V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnitude of Hall voltage is 1.1161 micro-V\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.19, Page number 8.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH = 3.66*10**-4; #Hall coefficient(m^3/C)\n",
+ "e = 1.6*10**-19;\n",
+ "rho_n = 8.93*10**-3; #resistivity(ohm m)\n",
+ "\n",
+ "#Calculation\n",
+ "n = 1/(RH*e);\n",
+ "mew_e = RH/rho_n;\n",
+ "mew_e = math.ceil(mew_e*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"value of n is\",round(n/1e+22,3),\"*10^22 per m^3\"\n",
+ "print \"value of mew_e is\",mew_e,\"m^2/Vs\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of n is 1.708 *10^22 per m^3\n",
+ "value of mew_e is 0.041 m^2/Vs\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb new file mode 100755 index 00000000..390fe9c5 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb @@ -0,0 +1,194 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c4f4158f2a13ac09e07abe135472c68abbdd09915f4866e5eedc3ddf9b9f42f5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "9: Superconductivity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.1, Page number 9.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tc = 3.7 #critical temperature(K)\n",
+ "Hc_0 = 0.0306 #critical field(T)\n",
+ "T = 2 #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc_2 = Hc_0*(1-(T/Tc)**2) #critical field(T)\n",
+ "Hc_2 = math.ceil(Hc_2*10**5)/10**5 #rounding off to 5 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical field at 2K is\",Hc_2,\"T\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical field at 2K is 0.02166 T\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.2, Page number 9.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T = 4.2 #temperature(K)\n",
+ "d = 1 #diameter(mm)\n",
+ "Tc = 7.18 #critical temperature(K)\n",
+ "H0 = 6.5*10**4 #critical field(A/m)\n",
+ "\n",
+ "#Calculation\n",
+ "d = d*10**-3 #diameter(m)\n",
+ "Hc = H0*(1-((T/Tc)**2)) #critical field at 2K(A/m)\n",
+ "ic = math.pi*d*round(Hc); #critical current(A)\n",
+ "ic = math.ceil(ic*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical current for lead is\",ic,\"A\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical current for lead is 134.34 A\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.3, Page number 9.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda_T = 750 #penetration depth of mercury(Armstrong)\n",
+ "T = 3.5 #temperature(K)\n",
+ "Tc = 4.12 #critical temperarure(K)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_0 = lamda_T*((1-(T/Tc)**4))**(1/2) #penetration depth(Armstrong)\n",
+ "\n",
+ "#Result\n",
+ "print \"penetration depth at 0K is\",int(lamda_0),\"armstrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "penetration depth at 0K is 519 armstrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.4, Page number 9.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1 = 3 #temperature(K)\n",
+ "T2 = 7.1 #temperature(K)\n",
+ "lamda_T1 = 396 #penetration depth(armstrong)\n",
+ "lamda_T2 = 1730 #penetration depth(armstrong)\n",
+ "\n",
+ "#Calculation\n",
+ "A = (((lamda_T2/lamda_T1)**2)*T2**4) - T1**4\n",
+ "B = ((lamda_T2/lamda_T1)**2)-1\n",
+ "Tc = (A/B)**(1/4) #critical temperature(K)\n",
+ "Tc = math.ceil(Tc*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical temperature for lead is\",Tc,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical temperature for lead is 7.1932 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png Binary files differnew file mode 100755 index 00000000..b6b640be --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png Binary files differnew file mode 100755 index 00000000..c7b40e60 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png Binary files differnew file mode 100755 index 00000000..0dad4227 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png Binary files differnew file mode 100755 index 00000000..4344b1fb --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png Binary files differnew file mode 100755 index 00000000..fb45c423 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png Binary files differnew file mode 100755 index 00000000..e9c7ee3a --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt index 21332dd0..21332dd0 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb index ae4a3c33..ae4a3c33 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb index 92a220e2..92a220e2 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb index 275a08df..275a08df 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb index e0ac0133..e0ac0133 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb index f162d031..f162d031 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb index a6e3bcf5..a6e3bcf5 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb index 3a3c9949..3a3c9949 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb index e487ef7e..e487ef7e 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb index 9150313f..9150313f 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb index 50d12f32..50d12f32 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb index cb64de0e..cb64de0e 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb index 65c5f331..65c5f331 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png Binary files differindex d7165aeb..d7165aeb 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png Binary files differindex 4257f446..4257f446 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png Binary files differindex 567b0e96..567b0e96 100644..100755 --- a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb index 492493b8..492493b8 100644..100755 --- a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb index c85407d0..c85407d0 100644..100755 --- a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb index 16142135..16142135 100644..100755 --- a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb index 43ee0636..43ee0636 100644..100755 --- a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png Binary files differindex e17d0fa1..e17d0fa1 100644..100755 --- a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png Binary files differindex 1dd6b0f6..1dd6b0f6 100644..100755 --- a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png diff --git a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png Binary files differindex 46a589d4..46a589d4 100644..100755 --- a/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb index 395bfd74..395bfd74 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb index 523319ac..523319ac 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb index 7d552178..7d552178 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb index b61bf252..b61bf252 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb index 9b327e23..9b327e23 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb index 79ba56c5..79ba56c5 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb index 109b7fda..109b7fda 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb index 432a216a..432a216a 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb index 189e1172..189e1172 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png Binary files differindex c03afe9e..c03afe9e 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png Binary files differindex e0be8441..e0be8441 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png diff --git a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png Binary files differindex 1f8a143b..1f8a143b 100644..100755 --- a/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb index 7830ad5f..7830ad5f 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb index 193ed341..193ed341 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb index fe888cfd..fe888cfd 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb index 3c4977fd..3c4977fd 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/README.txt b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/README.txt new file mode 100755 index 00000000..f81bf842 --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/README.txt @@ -0,0 +1,10 @@ +Contributed By: Vaibhav Shah +Course: mca +College/Institute/Organization: IIT +Department/Designation: Developer +Book Title: Basics of Electrical, Electronics and Communication Engineering +Author: N. Storey, E. Hughes and W. Tomasi +Publisher: Pearson, India +Year of publication: 2010 +Isbn: 978-81-317-3201-4 +Edition: 1
\ No newline at end of file diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb index dd3dc8fd..dd3dc8fd 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb index cc87af53..cc87af53 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb index f53c701f..f53c701f 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb index 3176c0e5..3176c0e5 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb index af4c67a6..af4c67a6 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb index fefbf834..fefbf834 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png Binary files differindex b15c34f5..b15c34f5 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png Binary files differindex fa94c1fa..fa94c1fa 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png diff --git a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png Binary files differindex 3d4ea867..3d4ea867 100644..100755 --- a/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter10.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter10_1.ipynb index c2e52854..c2e52854 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter10.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter10_1.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter11.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter11_1.ipynb index 239b6ca4..239b6ca4 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter11.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter11_1.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter12.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter12_1.ipynb index 76d70f5c..76d70f5c 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter12.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter12_1.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter5.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter5_1.ipynb index ac86dba8..ac86dba8 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter5.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter5_1.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter6.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter6_1.ipynb index bfb0065f..bfb0065f 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter6.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter6_1.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter7.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter7_1.ipynb index c1085a33..c1085a33 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter7.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter7_1.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter8.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter8_1.ipynb index bca914f3..bca914f3 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter8.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter8_1.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter9.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter9_1.ipynb index 583e1e8f..aab6433a 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter9.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter9_1.ipynb @@ -1,7 +1,7 @@ {
"metadata": {
"name": "",
- "signature": "sha256:c7a7a5fed3d237b23773c146200cb1c66c8b51b03326b1d931d288bf060c18a1"
+ "signature": "sha256:695fc05932ca1d30f19b3867fb7e2671008edb93009669dc709e27b0465efea9"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -501,46 +501,12 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "import random\n",
- "class dec:\n",
- " def __init__(self,type1,used,value):\n",
- " self.type1 = type1\n",
- " self.used = used\n",
- " self.value = value\n",
- "def shuffel(thisDeck):\n",
- " found = 0\n",
- " print \"\\nYour five cards are: \\n\\n\"\n",
- " while found < 5:\n",
- " #iRnd = random.randint(1, 100) % 51 when we use this it gives error out of range\n",
- " if thisDeck[iRnd].used == 'n':\n",
- " if thisDeck[iRnd].value == 12:\n",
- " print \"Ace of : \" + str(thisDeck[iRnd].type1) + \"\\n\"\n",
- " elif thisDeck[iRnd].value == 11:\n",
- " print \"King of : \" + str(thisDeck[iRnd].type1) + \"\\n\"\n",
- " elif thisDeck[iRnd].value == 10:\n",
- " print \"Queen of : \" + str(thisDeck[iRnd].type1) + \"\\n\"\n",
- " elif thisDeck[iRnd].value == 9:\n",
- " print \"Jack of : \" + str(thisDeck[iRnd].type1) + \"\\n\"\n",
- " else:\n",
- " print str(thisDeck[iRnd].value + 2) + \"of\"\n",
- " print str(thisDeck[iRnd].type1) + \"\\n\" \n",
- "if __name__ == '__main__':\n",
- " myDeck = []\n",
- " for x in range(3):\n",
- " for y in range(13):\n",
- " if x==0:\n",
- " myDeck.append(dec(\"dimonds\",\"y\",\"n\"))\n",
- " elif x==1:\n",
- " myDeck.append(dec(\"clubs\",\"y\",\"n\"))\n",
- " elif x==2:\n",
- " myDeck.append(dec(\"hearts\",\"y\",\"n\"))\n",
- " elif x==3:\n",
- " myDeck.append(dec(\"spades\",\"y\",\"n\"))\n",
- " shuffel(myDeck)"
+ "# This program is not possible in python."
],
"language": "python",
"metadata": {},
- "outputs": []
+ "outputs": [],
+ "prompt_number": 1
}
],
"metadata": {}
diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter1.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_1.ipynb index 5c25ef5d..5c25ef5d 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter1.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_1.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter2.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_2.ipynb index 2f3c44af..2f3c44af 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter2.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_2.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter3.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_3.ipynb index a87e263b..a87e263b 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter3.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_3.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/Chapter4.ipynb b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_4.ipynb index 218595de..218595de 100755 --- a/C_Programming_for_the_Absolute_Beginner/Chapter4.ipynb +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/Chapter_4.ipynb diff --git a/C_Programming_for_the_Absolute_Beginner/README.txt b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/README.txt index 9bf2614f..9bf2614f 100755 --- a/C_Programming_for_the_Absolute_Beginner/README.txt +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/README.txt diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/1.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1.png Binary files differindex 0fc6a70b..0fc6a70b 100755 --- a/C_Programming_for_the_Absolute_Beginner/screenshots/1.png +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1.png diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/1_1.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1_1.png Binary files differindex 0fc6a70b..0fc6a70b 100755 --- a/C_Programming_for_the_Absolute_Beginner/screenshots/1_1.png +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/1_1.png diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/2.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2.png Binary files differindex 6ceba6dc..6ceba6dc 100755 --- a/C_Programming_for_the_Absolute_Beginner/screenshots/2.png +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2.png diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/2_1.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2_1.png Binary files differindex 6ceba6dc..6ceba6dc 100755 --- a/C_Programming_for_the_Absolute_Beginner/screenshots/2_1.png +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/2_1.png diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/3.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3.png Binary files differindex 101cd93b..101cd93b 100755 --- a/C_Programming_for_the_Absolute_Beginner/screenshots/3.png +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3.png diff --git a/C_Programming_for_the_Absolute_Beginner/screenshots/3_1.png b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3_1.png Binary files differindex 101cd93b..101cd93b 100755 --- a/C_Programming_for_the_Absolute_Beginner/screenshots/3_1.png +++ b/C_Programming_for_the_Absolute_Beginner_by_Michael_Vine/screenshots/3_1.png diff --git a/Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf b/Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf Binary files differdeleted file mode 100755 index a01e3318..00000000 --- a/Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf +++ /dev/null diff --git a/Chemical_Engineering_Thermodynamics/screenshots/1.png b/Chemical_Engineering_Thermodynamics/screenshots/1.png Binary files differdeleted file mode 100755 index 2ec2e814..00000000 --- a/Chemical_Engineering_Thermodynamics/screenshots/1.png +++ /dev/null diff --git a/Chemical_Engineering_Thermodynamics/screenshots/2.png b/Chemical_Engineering_Thermodynamics/screenshots/2.png Binary files differdeleted file mode 100755 index 91cda60b..00000000 --- a/Chemical_Engineering_Thermodynamics/screenshots/2.png +++ /dev/null diff --git a/Chemical_Engineering_Thermodynamics/screenshots/3.png b/Chemical_Engineering_Thermodynamics/screenshots/3.png Binary files differdeleted file mode 100755 index 61ce8534..00000000 --- a/Chemical_Engineering_Thermodynamics/screenshots/3.png +++ /dev/null diff --git a/Chemical_Engineering_Thermodynamics/screenshots/ch1.png b/Chemical_Engineering_Thermodynamics/screenshots/ch1.png Binary files differdeleted file mode 100755 index ae25b279..00000000 --- a/Chemical_Engineering_Thermodynamics/screenshots/ch1.png +++ /dev/null diff --git a/Chemical_Engineering_Thermodynamics/screenshots/ch8.png b/Chemical_Engineering_Thermodynamics/screenshots/ch8.png Binary files differdeleted file mode 100755 index 29959197..00000000 --- a/Chemical_Engineering_Thermodynamics/screenshots/ch8.png +++ /dev/null diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/README.txt b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/README.txt new file mode 100755 index 00000000..d33ed50c --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/README.txt @@ -0,0 +1,10 @@ +Contributed By: pratik gandhi +Course: bca +College/Institute/Organization: Cybercom Creation +Department/Designation: Developer +Book Title: Chemical Engineering Thermodynamics +Author: P. Ahuja +Publisher: PHI Learning Private Limited, New Delhi +Year of publication: 2009 +Isbn: 9788120336377 +Edition: 1
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch10_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch10_1.ipynb new file mode 100755 index 00000000..3336e17e --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch10_1.ipynb @@ -0,0 +1,2536 @@ +{
+ "metadata": {
+ "name": "ch10_1",
+ "signature": "sha256:3b50ad151f89e9ea380ce80c8112ec5468586c82e236862a1e3d8e194fa15249"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Residual Properties by Equations of State"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.2 Page Number : 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "T = 40 + 273.15;\t\t\t#[C] - Temperature\n",
+ "P_1 = 0;\t\t\t#[bar]\n",
+ "P_2 = 10;\t\t\t#[bar]\n",
+ "V_liq = 90.45;\t\t\t#[cm**(3)/mol]\n",
+ "V_liq = V_liq*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "P_sat = 4.287;\t\t\t#[bar] \n",
+ "\n",
+ "# For butadiene\n",
+ "T_c = 425.0;\t\t\t#[K] - Critical temperature\n",
+ "P_c = 43.3;\t\t\t#[bar] - Critical pressure\n",
+ "P_c = P_c*10**(5);\t\t\t#[N/m**(2)]\n",
+ "w = 0.195;\t\t\t# Acentric factor\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# Let us calculate second virial coefficient at 40 C\n",
+ "Tr = T/T_c;\t\t\t# Reduced temperature\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6));\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2));\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B = ((B_0 + (w*B_1))*(R*T_c))/P_c;\t\t\t#[m**(3)/mol] - Second virial coefficient\n",
+ "\n",
+ "# math.log(f/P) = (B*P)/(R*T)\n",
+ "# f = P*exp((B*P)/(R*T))\n",
+ "\n",
+ "print \" The table is as follows\"\n",
+ "print \" Pbar \\t\\t fbar \\t\\t phi\";\n",
+ "from numpy import zeros\n",
+ "P = [1,2,3,4,4.287,5,6,8,10];\n",
+ "f = zeros(9);\n",
+ "phi = zeros(9);\n",
+ "for i in range(5):\n",
+ " f[i]=P[i]*(math.exp((B*P[i]*10**(5))/(R*T)));\t\t\t#[bar] # Pressure inside the exponential term has to be in N/m**(2)\n",
+ " phi[i]= (f[i]/P[i]);\n",
+ " print \" %f \\t %f \\t\\t\\t %f\"%(P[i],f[i],phi[i]) \n",
+ "\n",
+ "f_sat = f[4];\n",
+ "\n",
+ "# From pressure of 4.287 bar onwards the valid equation to compute fugacity of compressed liquid is given by\n",
+ "# f = f_sat*exp[V_liq*(P-P_sat)/(R*T)]\n",
+ "\n",
+ "for j in range(5,9):\n",
+ " f[j] = f_sat*math.exp((V_liq*(P[j]-P_sat)*10**(5))/(R*T));\t#[bar] # Pressure inside the exponential term has to be in N/m**(2)\n",
+ " phi[j] = f[j]/P[j]; \n",
+ " print \" %f \\t %f \\t\\t\\t %f\"%(P[j],f[j],phi[j]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The table is as follows\n",
+ " Pbar \t\t fbar \t\t phi\n",
+ " 1.000000 \t 0.978336 \t\t\t 0.978336\n",
+ " 2.000000 \t 1.914284 \t\t\t 0.957142\n",
+ " 3.000000 \t 2.809221 \t\t\t 0.936407\n",
+ " 4.000000 \t 3.664484 \t\t\t 0.916121\n",
+ " 4.287000 \t 3.902801 \t\t\t 0.910380\n",
+ " 5.000000 \t 3.912481 \t\t\t 0.782496\n",
+ " 6.000000 \t 3.926097 \t\t\t 0.654349\n",
+ " 8.000000 \t 3.953471 \t\t\t 0.494184\n",
+ " 10.000000 \t 3.981037 \t\t\t 0.398104\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.3 Page Number : 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "n = 100.;\t\t\t#[mol] - No of moles\n",
+ "T_1 = 600.;\t\t\t#[K] - Initial temperature\n",
+ "T_2 = 300.;\t\t\t#[K] - Final temperature\n",
+ "P_1 = 10.;\t\t\t#[atm] - Initial pressure\n",
+ "P_1 = P_1*101325;\t\t\t#[Pa]\n",
+ "P_2 = 5.;\t\t\t#[atm] - Final presssure\n",
+ "P_2 = P_2*101325;\t\t\t#[Pa]\n",
+ "Tc = 369.8;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 42.48;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "w = 0.152;\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "# At 600 K\n",
+ "Tr = T_1/Tc;\t\t\t# Reduced temperature\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6));\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2));\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n",
+ "dB0_dT = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT)\n",
+ "dB1_dT = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT)\n",
+ "dB_dT = ((R*Tc)/(Pc))*(dB0_dT + w*dB1_dT);\t\t\t# dB/dT\n",
+ "\n",
+ "# Now let us calculate B and dB/dT at 300 K\n",
+ "Tr_prime = T_2/Tc;\t\t\t# Reduced temperature\n",
+ "B_0_prime = 0.083-(0.422/(Tr_prime)**(1.6));\n",
+ "B_1_prime = 0.139-(0.172/(Tr_prime)**(4.2));\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ "B_prime = ((B_0_prime + (w*B_1_prime))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n",
+ "dB0_dT_prime = 0.422*1.6*Tc**(1.6)*T_2**(-2.6);\t\t\t# (dB_0/dT)\n",
+ "dB1_dT_prime = 0.172*4.2*Tc**(4.2)*T_2**(-5.2);\t\t\t# (dB_1/dT)\n",
+ "dB_dT_prime = ((R*Tc)/(Pc))*(dB0_dT_prime + w*dB1_dT_prime);\t\t\t# dB/dT\n",
+ "\n",
+ "# The change in enthalpy for ideal gas is given by\n",
+ "\n",
+ "def f16(T): \n",
+ " return -0.966+7.279*10**(-2)*T-3.755*10**(-5)*T**(2)+7.58*10**(-9)*T**(3)\n",
+ "\n",
+ "delta_H_ig = quad(f16,T_1,T_2)[0]\n",
+ "\n",
+ "delta_H_ig = delta_H_ig*4.184;\t\t\t#[J/mol]\n",
+ "\n",
+ "# We know that delta_H_ig = delta_U_ig + R*delta_T. Therefore change in internal energy is given by \n",
+ "delta_U_ig = delta_H_ig - R*(T_2 - T_1);\t\t\t#[J/mol]\n",
+ "\n",
+ "# The change in entropy of ideal gas is given by \n",
+ "\n",
+ "def f17(T): \n",
+ " return Cp_0/T\n",
+ "\n",
+ "#delta_S_ig = quad(f17,T_1,T_2) - R*math.log(P_2/P_1)[0]\n",
+ "\n",
+ "\n",
+ "def f18(T): \n",
+ " return (-0.966+7.279*10**(-2)*T-3.755*10**(-5)*T**(2)+7.58*10**(-9)*T**(3))/T\n",
+ "\n",
+ "delta_S_ig = quad(f18,T_1,T_2)[0]*4.184 - R*math.log(P_2/P_1)\n",
+ "\n",
+ "\n",
+ "# Now let us calculate the change in enthalpy of gas. We know that\n",
+ "# delta_H = delta_H_ig + delta_H_R\n",
+ "# delta_H_R = H_2_R - H_1_R\n",
+ "H_2_R = B_prime*P_2 - P_2*T_2*dB_dT_prime;\t\t\t# [J/mol]\n",
+ "H_1_R = B*P_1 - P_1*T_1*dB_dT;\t\t\t# [J/mol]\n",
+ "delta_H_R = H_2_R - H_1_R;\t\t\t# [J/mol]\n",
+ "delta_H = delta_H_ig + delta_H_R;\t\t\t# [J/mol]\n",
+ "\n",
+ "# Let us calculate the residual entropy of gas\n",
+ "S_2_R = -P_2*dB_dT_prime;\t\t\t#[J/mol-K]\n",
+ "S_1_R = -P_1*dB_dT;\t\t\t#[J/mol-K]\n",
+ "delta_S = delta_S_ig + (S_2_R - S_1_R);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# Let us calculate the residual internal energy of gas\n",
+ "U_2_R = -P_2*T_2*dB_dT_prime;\t\t\t#[J/mol-K]\n",
+ "U_1_R = -P_1*T_1*dB_dT;\t\t\t#[J/mol-K]\n",
+ "delta_U = delta_U_ig + (U_2_R - U_1_R);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# For 100 mol sample,\n",
+ "delta_H_ig = delta_H_ig*n*10**(-3);\t\t\t#[kJ/mol]\n",
+ "delta_H = delta_H*n*10**(-3);\t\t\t#[kJ/mol]\n",
+ "\n",
+ "delta_U_ig = delta_U_ig*n*10**(-3);\t\t\t#[kJ/mol]\n",
+ "delta_U = delta_U*n*10**(-3);\t\t\t#[kJ/mol]\n",
+ "\n",
+ "delta_S_ig = delta_S_ig*n*10**(-3);\t\t\t#[kJ/mol]\n",
+ "delta_S = delta_S*n*10**(-3);\t\t\t#[kJ/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" The value of delta_H = %f kJ/mol\"%(delta_H);\n",
+ "print \" The value of delta_H_ig ideal gas)= %f J/mol\"%(delta_H_ig);\n",
+ "print \" The value of delta_U = %f kJ/mol\"%(delta_U);\n",
+ "print \" The value of delta_U_ig ideal gas) = %f kJ/mol\"%(delta_U_ig);\n",
+ "print \" The value of delta_S = %f kJ/mol\"%(delta_S);\n",
+ "print \" The value of delta_S_ig ideal gas) = %f kJ/mol\"%(delta_S_ig);\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of delta_H = -3130.406247 kJ/mol\n",
+ " The value of delta_H_ig ideal gas)= -3096.763542 J/mol\n",
+ " The value of delta_U = -2867.753839 kJ/mol\n",
+ " The value of delta_U_ig ideal gas) = -2847.343542 kJ/mol\n",
+ " The value of delta_S = -6.466831 kJ/mol\n",
+ " The value of delta_S_ig ideal gas) = -6.358994 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.4 Page Number : 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 35 + 273.15;\t\t\t#[K] - Temperature\n",
+ "P = 10;\t\t\t#[atm] - Pressure\n",
+ "P = P*101325;\t\t\t#[Pa]\n",
+ "# Methane obeys the equation of state\n",
+ "# Z = 1 + (P*B)/(R*T)\n",
+ "\n",
+ "# Calculations\n",
+ "# At 35 C,\n",
+ "B = -50;\t\t\t#[cm**(3)/mol]\n",
+ "dB_dT = 1.0;\t\t\t#[cm**(3)/mol-K] - dB/dT\n",
+ "dB_dT = dB_dT*10**(-6);\t\t\t#[m**(3)/mol-K]\n",
+ "d2B_dT2 = -0.01;\t\t\t#[cm**(3)/mol-K**(2)] - d**2(B)/d(T**2)\n",
+ "d2B_dT2 = d2B_dT2*10**(-6);\t\t\t#[m**(3)/mol-K**(2)]\n",
+ "\n",
+ "# Ideal gas molar heat capacity of methane is given by\n",
+ "# Cp_0 = 4.75 + 1.2*10**(-2)*T + 0.303*10**(-5)*T**(2) - 2.63*10**(-9)*T**(3)\n",
+ "\n",
+ "# The molar heat capacity is given by\n",
+ "# Cp = Cp_0 + Cp_R\n",
+ "# For virial gas equation of state \n",
+ "Cp_R = -P*T*d2B_dT2;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# thus heat capacity is given by \n",
+ "# Cp = a + b*T + c*T**(2) + d*T**(3) - P*T*d2B_dT2\n",
+ "# Putting the values, we get\n",
+ "Cp = (4.75 + 1.2*10**(-2)*T + 0.303*10**(-5)*T**(2) - 2.63*10**(-9)*T**(3))*4.184 - P*T*d2B_dT2;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# Results\n",
+ "print \" The molar heat capacity of methane is %f J/mol-K\"%(Cp);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The molar heat capacity of methane is 39.349753 J/mol-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.5 Page Number : 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 360;\t\t\t#[K] - Initial temperature\n",
+ "P_1 = 10;\t\t\t#[bar] - Initial pressure\n",
+ "P_1 = P_1*10**(5);\t\t\t#[Pa]\n",
+ "Tc = 408.1;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 36.48;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "w = 0.181;\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "Cv_0 = 106.0;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# Calculations\n",
+ "# At 360 K\n",
+ "Tr = T_1/Tc;\t\t\t# Reduced temperature\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6));\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2));\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n",
+ "dB0_dT = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT)\n",
+ "dB1_dT = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT)\n",
+ "dB_dT = ((R*Tc)/(Pc))*(dB0_dT + w*dB1_dT);\t\t\t# dB/dT\n",
+ "\n",
+ "# At state 1\n",
+ "V_1 = B + (R*T_1)/P_1;\t\t\t#[m**(3)/mol] - Molar volume\n",
+ "# At state 1\n",
+ "V_2 = 10*V_1;\t\t\t#[m**(3)/mol] - Molar volume\n",
+ "\n",
+ "T_2 = -(P_1*T_1*(dB_dT))/Cv_0 + T_1;\t\t\t#[K]\n",
+ "\n",
+ "T = 350;\n",
+ "\n",
+ "fault = 10;\n",
+ "def f(T): \n",
+ " return 106*(T-T_1)+972.72-((R*T**(2))/(V_2-B_prime))*dB_dT_prime\n",
+ "while(fault>0.007):\n",
+ " Tr_prime = T/Tc;\t\t\t# Reduced temperature\n",
+ " B_0_prime = 0.083-(0.422/(Tr_prime)**(1.6));\n",
+ " B_1_prime = 0.139-(0.172/(Tr_prime)**(4.2));\n",
+ " #We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ " B_prime = ((B_0_prime + (w*B_1_prime))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n",
+ " dB0_dT_prime = 0.422*1.6*Tc**(1.6)*T_2**(-2.6);\t\t\t# (dB_0/dT)\n",
+ " dB1_dT_prime = 0.172*4.2*Tc**(4.2)*T_2**(-5.2);\t\t\t# (dB_1/dT)\n",
+ " dB_dT_prime = ((R*Tc)/(Pc))*(dB0_dT_prime + w*dB1_dT_prime);\t\t\t# dB/dT\n",
+ " T_prime = fsolve(f,0.15)\n",
+ " fault=abs(T-T_prime);\n",
+ " T = T + 0.001;\n",
+ "\n",
+ "# Results\n",
+ "print \" The final temperature is %f K\"%(T);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The final temperature is 351.910000 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.6 Page Number : 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 220 + 273.15;\t\t\t#[K] - Temperature\n",
+ "Tc = 562.2;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 48.98;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "w = 0.210;\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "P_sat = 1912.86;\t\t\t#[kPa] - Saturation pressure at 220 C\n",
+ "P_sat = P_sat*10**(3);\t\t\t#[Pa]\n",
+ "Mol_wt = 78.114;\t\t\t#[g/mol] - Molecular weight of benzene\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(1)\n",
+ "\n",
+ "# At 220 C\n",
+ "Tr = T/Tc;\t\t\t# Reduced temperature\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6));\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2));\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n",
+ "\n",
+ "# We know that math.log(f/P) = (B*P)/(R*T)\n",
+ "# Thus at saturated conditions\n",
+ "# math.log(f_sat/P_sat) = B*P_sat/(R*T)\n",
+ "f_sat = P_sat*(math.exp((B*P_sat)/(R*T)));\t\t\t#[Pa]\n",
+ "f_sat = f_sat*10**(-3);\t\t\t#[kPa]\n",
+ "\n",
+ "print \" 1).The fugacity of liquid benzene is %f kPa\"%(f_sat);\n",
+ "\n",
+ "#(2)\n",
+ "P = 2014.7;\t\t\t# [psia] - Total gauge pressure\n",
+ "P = 138.94;\t\t\t# [bar]\n",
+ "P = P*10**(5);\t\t\t# [Pa]\n",
+ "den = 0.63;\t\t\t# [g/cm**(3)] - density of benzene\n",
+ "den = den*10**(3);\t\t\t# [kg/m**(3)]\n",
+ "\n",
+ "# Therefore specific volume is \n",
+ "V = 1/den;\t\t\t#[m/**(3)/kg]\n",
+ "# Molar volume is given by\n",
+ "V = V*Mol_wt*10**(-3);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Thus fugacity at 220 C and pressure P is given by \n",
+ "f = f_sat*(math.exp((V*(P-P_sat))/(R*T)));\n",
+ "\n",
+ "print \" 2).The fugacity of liquid benzene is %f kPa\"%(f);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The fugacity of liquid benzene is 1551.083216 kPa\n",
+ " 2).The fugacity of liquid benzene is 2228.386532 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.7 Page Number : 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "# C = -0.067 + 30.7/T\n",
+ "# D = 0.0012 - 0.416/T\n",
+ "\n",
+ "T = 80 + 273.15;\t\t\t#[K]\n",
+ "P = 30;\t\t\t#[bar]\n",
+ "#P = P;\t\t\t#[N/m**(2)]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "# We have the relation derived in the book\n",
+ "# d(G/(R*T)) = (V/(R*T))dP - (H/(R*T**(2)))dT\n",
+ "# Writing the same equation for ideal gas and subtracting it from the above equation we get\n",
+ "# d(G_R/(R*T)) = (V_R/(R*T))dP - (H_R/(R*T**(2)))dT\n",
+ "# Therefore, H_R/(R*T**(2)) = -[del((G_R)/(R*T))/del(T)]_P\n",
+ "\n",
+ "# Substituting the relation G_R/(R*T) = math.log(f/P), we get\n",
+ "# H_R/(R*T**(2)) = -[del(math.log(f/P))/del(T)]_P = -[del(-C*P - D*P**(2))/del(T)]_P\n",
+ "# H_R/R = - 30.7*P + 0.416*P**(2)\n",
+ "\n",
+ "# Substituting the given conditions we get\n",
+ "H_R = R*(-30.7*P + 0.416*P**(2));\t\t\t#[J/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" The molar enthalpy of the gas relative to that of the ideal gas at 80 C and 30 bar pressure is H_R = %f J/mol\"%(H_R);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The molar enthalpy of the gas relative to that of the ideal gas at 80 C and 30 bar pressure is H_R = -4544.432400 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.8 Page Number : 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "# (1)\n",
+ "T = 311;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "# Pressure in 'bar' is given below\n",
+ "P = [0.690,1.380,2.760,5.520,8.280,11.034,13.800,16.550];\n",
+ "# Molar volume in 'm**(3)/mol' is given below\n",
+ "V = [0.0373,0.0186,0.00923,0.00455,0.00298,0.00220,0.00175,0.00144];\n",
+ "\n",
+ "# Z = 1 + (B/V) + (C/V**(2))\n",
+ "# (Z-1)*V = B + (C/V)\n",
+ "\n",
+ "from numpy import zeros\n",
+ "Z=zeros(8);\n",
+ "k=zeros(8);\n",
+ "t=zeros(8);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "for i in range(8):\n",
+ " Z[i]=(P[i]*10**(5)*V[i])/(R*T);\n",
+ " k[i]=(Z[i]-1)*V[i];\n",
+ " t[i]=1./V[i];\n",
+ "\n",
+ "from scipy.stats import linregress\n",
+ "from numpy import array\n",
+ "t = array(t)\n",
+ "k = array(k)\n",
+ "C,B,c,d,e = linregress(t.T,k.T)\n",
+ "#[C,B,sig]=reglin(t',k');\n",
+ "\n",
+ "#From the regression, we get intercept = B and slope = C,and thus,\n",
+ "\n",
+ "print \" 1).The second virial coefficient of CO2 is given by B = %e m**3)/mol\"%(B);\n",
+ "print \" The thied virial coefficient of CO2 is given by C = %e m**6)/mol**2)\"%(C);\n",
+ "\n",
+ "# (2)\n",
+ "P_final = 13.8;\t\t\t#[bar]\n",
+ "\n",
+ "def f40(P): \n",
+ "\t return V-(R*T)/P\n",
+ "\n",
+ "# We know that R*T*math.log(f/P) = quad(f40,0,P)[0]\n",
+ "\n",
+ "# Therefore we have to plot V - (R*T)/P versus P and calculate the area beneath the curve from 0 to 13.8 bar\n",
+ "# For this we need the value of the term V - (R*T)/P at P = 0. At low pressure the virial equation becomes\n",
+ "# Z = 1 + (B/V)\n",
+ "#and V - (R*T)/P = (Z*R*T)/P - (R*T)/P = (1 + (B/V))*((R*T)/P) - (R*T)/P = (B*R*T)/(P*V) = (B/Z)\n",
+ "# Thus lim P tending to zero (V - (R*T)/P) = B ( as P tend to zero, Z tend to 1 ) \n",
+ "\n",
+ "P_prime = [0.000,0.690,1.380,2.760,5.520,8.280,11.034,13.800];\n",
+ "V_prime = [0.000,0.0373,0.0186,0.00923,0.00455,0.00298,0.00220,0.00175];\n",
+ "summation = 0;\n",
+ "x=zeros(8);\n",
+ "y=zeros(8);\n",
+ "z=zeros(8);\n",
+ "for j in range(2,8):\n",
+ " x[j]=V_prime[j]-(R*T)/(P_prime[j]*10**(5));\t\t\t#[m**(3)/mol]\n",
+ " y[j]=(x[j] + x[j-1])/2;\n",
+ " z[j]=y[j]*((P_prime[j]-P_prime[j-1]))*10**(5);\n",
+ " summation = summation + z[j] ;\t\t\t#[J/mol]\n",
+ "\n",
+ "summation = summation + 2*z[1] - z[1];\t\t\t# Because in the above calculation,in order to calculate the average a summation of z(2) is not included,only half of it gets added\n",
+ "\n",
+ "\n",
+ "def f41(P): \n",
+ "\t return V - (R*T)/P\n",
+ "\n",
+ "\t\t\t# Now we have, area = quad(f41,0,13.8*10**(5))[0]\n",
+ "\n",
+ "\t\t\t# R*T*math.log(f/P) = summation\n",
+ "f = P_final*(math.exp(summation/(R*T)));\t\t\t#[bar]\n",
+ "\n",
+ "\n",
+ "print \" 2).The fugacity of steam at 311 K and 13.8 bar pressure is %f bar\"%(f);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The second virial coefficient of CO2 is given by B = -1.515264e-04 m**3)/mol\n",
+ " The thied virial coefficient of CO2 is given by C = 5.618543e-08 m**6)/mol**2)\n",
+ " 2).The fugacity of steam at 311 K and 13.8 bar pressure is 12.892780 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.9 Page Number : 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 0 + 273.15;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\t\t\t# Pressure in 'atm' is given below\n",
+ "P = [100,200,300,400,500,600,700,800,900,1000];\n",
+ "\t\t\t# The compressibility factor values are\n",
+ "Z = [1.069,1.138,1.209,1.283,1.356,1.431,1.504,1.577,1.649,1.720];\n",
+ "\n",
+ "# Z = 1 + (B/V) + (C/V**(2))\n",
+ "# (Z-1)*V = B + (C/V)\n",
+ "from numpy import zeros\n",
+ "\n",
+ "V = zeros(10);\n",
+ "k = zeros(10);\n",
+ "t = zeros(10);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "for i in range(10):\n",
+ " V[i]=Z[i]*R*T/(P[i]*101325);\t\t\t#[m**(3)/mol]\n",
+ " k[i]=(Z[i]-1)*V[i];\n",
+ " t[i]=1/V[i];\n",
+ "\n",
+ "from scipy.stats import linregress\n",
+ "C,B,c,d,e = linregress(t,k)\n",
+ "\t\t\t#[C,B,sig]=reglin(t,k);\n",
+ "\n",
+ "\t\t\t#From the regression, we get intercept = B and slope = C,and thus,\n",
+ "\n",
+ "print \" 1).The second virial coefficient of H2 is given by B = %e m**3)/mol\"%(B);\n",
+ "print \" The thied virial coefficient of H2 is given by C = %e m**6)/mol**2)\"%(C);\n",
+ "\n",
+ "\t\t\t# (2)\n",
+ "\t\t\t# We know that, limit P tending to zero (V-(R*T)/P) = B, therfore P = 0, V-(R*T)/P = B\n",
+ "\n",
+ "def f42(P): \n",
+ "\t return V-(R*T)/P \t\t\t#and determine the integral integrate((V-(R*T)/P)\n",
+ "\n",
+ "\t\t\t# Now let us tabulate V-(R*T)/P and determine the integral quad(f42,0,1000)[0]\n",
+ "\n",
+ "\n",
+ "P_prime = [0,100,200,300,400,500,600,700,800,900,1000];\n",
+ "Z_prime = [0,1.069,1.138,1.209,1.283,1.356,1.431,1.504,1.577,1.649,1.720];\n",
+ "\n",
+ "summation = 0;\n",
+ "V_prime = zeros(11);\n",
+ "x = zeros(11);\n",
+ "y = zeros(11);\n",
+ "z = zeros(11);\n",
+ "for j in range(1,11):\n",
+ " V_prime[j]=Z_prime[j]*R*T/(P_prime[j]*101325);\t\t\t#[m**(3)/mol]\n",
+ " x[j]=V_prime[j]-(R*T)/(P_prime[j]*101325);\n",
+ " y[j]=(x[j] + x[j-1])/2;\n",
+ " z[j]=y[j]*((P_prime[j]-P_prime[j-1]))*101325;\n",
+ " summation = summation + z[j] ;\t\t\t#[J/mol]\n",
+ "\n",
+ "summation = summation + 2*z[1] - z[1];\t\n",
+ "\n",
+ "\t\t\t# Now we have\n",
+ "\t\t\t# R*T*math.log(f/P) = summation\n",
+ "P_dash = 1000;\t\t\t#[atm] - Pressure at which fugacity is to be calculated\n",
+ "T_dash = 273.15;\t\t\t#[K] - Temperature at which fugacity is to be calculated\n",
+ "f = P_dash*math.exp(summation/(R*T_dash));\t\t\t#[atm] \n",
+ "\n",
+ "print \" 2).The fugacity of H2 at 0 C and 1000 atm pressure is f = %f atm\"%(f);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The second virial coefficient of H2 is given by B = 1.345242e-05 m**3)/mol\n",
+ " The thied virial coefficient of H2 is given by C = 5.286525e-10 m**6)/mol**2)\n",
+ " 2).The fugacity of H2 at 0 C and 1000 atm pressure is f = 2030.305169 atm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.10 Page Number : 345"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math\n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "P_1 = 1*10.**(6.);\t\t\t#[Pa] - Initial pressure\n",
+ "T_1 = 200. + 273.15;\t\t#[K] - Initial temperature\n",
+ "P_2 = 8*10.**(6);\t\t\t#[Pa] - Final pressure\n",
+ "Tc = 647.1;\t\t\t #[K] - Critical temperature of water\n",
+ "Pc = 220.55; \t\t\t#[bar] - Critical pressure of water\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "w = 0.345;\n",
+ "R = 8.314;\t\t \t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# For the virial gas the following are the relations for residual enthalpy and entropy\n",
+ "# H_R = B*P - P*T*(dB/dT) \n",
+ "# S_R = -P*(dB/dT)\n",
+ "# Where, (dB/dT) = ((R*Tc)/Pc)*((dB_0/dT) + w*(dB_1/dT))\n",
+ "# dB0_dT = 0.422*1.6*Tc**(1.6)*T**(-2.6);\t\t\t# (dB_0/dT)\n",
+ "# dB1_dT = 0.172*4.2*Tc**(4.2)*T**(-5.2);\t\t\t# (dB_1/dT)\n",
+ "\n",
+ "# (1)\n",
+ "Cp_0 = 29.114;\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n",
+ "# For the isentropic process entropy change is zero, thus\n",
+ "# delta_S = Cp_0*math.log(T_2/T_1) - P_2*(dB/dT)_2 + P_1*(dB/dT)_1 = 0\n",
+ "\n",
+ "# Calculations\n",
+ "# At state 1, \n",
+ "Tr_1 = T_1/Tc;\n",
+ "B0_1 = 0.083 - 0.422/(Tr_1**(1.6));\n",
+ "B1_1 = 0.139 - 0.172/(Tr_1**(4.2));\n",
+ "# (B*Pc)/(R*Tc) = B0 + w*B1\n",
+ "B_1 = ((B0_1 + w*B1_1)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 1\n",
+ "dB0_dT_1 = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT)\n",
+ "dB1_dT_1 = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT)\n",
+ "dB_dT_1 = ((R*Tc)/Pc)*((dB0_dT_1) + w*(dB1_dT_1));\t\t\t# (dB/dT)_1\n",
+ "\n",
+ "# Now let us assume the exit temperature to be 870 K, at this temperature\n",
+ "# T_2 = 870;\t\t\t#[K] - \n",
+ "# At this temperature\n",
+ "# delta_S = Cp_0*math.log(T_2/T_1) - P_2*(dB/dT)_2 + P_1*(dB/dT)_1 = \n",
+ "\n",
+ "\n",
+ "T_2 = 860.;\t\t\t#[K] - Exit temperature\n",
+ "# Therefore at state 2, we have\n",
+ "Tr_2 = T_2/Tc;\n",
+ "B0_2 = 0.083 - 0.422/(Tr_2**(1.6));\n",
+ "B1_2 = 0.139 - 0.172/(Tr_2**(4.2));\n",
+ "# (B*Pc)/(R*Tc) = B0 + w*B1\n",
+ "B_2 = ((B0_2 + w*B1_2)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 2\n",
+ "dB0_dT_2 = 0.422*1.6*Tc**(1.6)*T_2**(-2.6);\t\t\t# (dB_0/dT)\n",
+ "dB1_dT_2 = 0.172*4.2*Tc**(4.2)*T_2**(-5.2);\t\t\t# (dB_1/dT)\n",
+ "dB_dT_2 = ((R*Tc)/Pc)*((dB0_dT_2) + w*(dB1_dT_2));\t\t\t# (dB/dT)_2\n",
+ "\n",
+ "delta_H_s = Cp_0*(T_2 - T_1) + B_2*P_2 -P_2*T_2*(dB_dT_2) - B_1*P_1 + P_1*T_1*(dB_dT_1);\t\t\t#[J/mol] - Enthalpy change\n",
+ "\n",
+ "# As no heat exchange is assumed to take place with the surroundings,work transfer is given by\n",
+ "W_1 = - delta_H_s;\t\t\t# [J/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" 1).The exit temperature is %f K\"%(T_2);\n",
+ "print \" The required amount of work is %f J/mol\"%(W_1);\n",
+ "\n",
+ "\n",
+ "# (2)\n",
+ "eff = 0.8;\t\t\t# Adiabatic efficiency\n",
+ "delta_H_a = delta_H_s/0.8;\t\t\t# Actual enthalpy change\n",
+ "\n",
+ "# Now for calculating the value of T_exit\n",
+ "# delta_H_a = Cp_0*(T_exit - T_1) + B*P_2 -P_2*T_exit*(dB_dT) - B_1*P_1 + P_1*T_1*(dB_dT_1)\n",
+ "# On simplification we get\n",
+ "# 29.114*(T_2 - T_1)*B_2*8*10**(6)-8*10**(6)*T_2*(dB/dT)_2 = 12643.77 \n",
+ "\n",
+ "# Let us assume a temperature of say\n",
+ "T = 900.;\t\t\t#[K]\n",
+ "fault=10.;\n",
+ "\n",
+ "def f(T_exit): \n",
+ "\t return delta_H_a - Cp_0*(T_exit - T_1) + B*P_2 -P_2*T_exit*(dB_dT) - B_1*P_1 + P_1*T_1*(dB_dT_1)\n",
+ "\t \n",
+ "while(fault>0.3):\n",
+ " Tr = T/Tc;\n",
+ " B0 = 0.083 - 0.422/(Tr**(1.6));\n",
+ " B1 = 0.139 - 0.172/(Tr**(4.2));\n",
+ " \t\t\t# (B*Pc)/(R*Tc) = B0 + w*B1\n",
+ " B = ((B0 + w*B1)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 2\n",
+ " dB0_dT = 0.422*1.6*Tc**(1.6)*T**(-2.6);\t\t\t# (dB_0/dT)\n",
+ " dB1_dT = 0.172*4.2*Tc**(4.2)*T**(-5.2);\t\t\t# (dB_1/dT)\n",
+ " dB_dT = ((R*Tc)/Pc)*((dB0_dT) + w*(dB1_dT));\t\t\t# (dB/dT)_1\n",
+ "\n",
+ " T_exit = fsolve(f,900)\n",
+ " fault=abs(T-T_exit);\n",
+ " T = T + 0.2;\n",
+ "\n",
+ "Texit = T;\n",
+ "\n",
+ "\n",
+ "W_2 = - delta_H_a;\t\t\t# [J/mol]\n",
+ "\n",
+ "print \" 2).The exit temperature is %f K\"%(Texit);\n",
+ "print \" The required amount of work is %f J/mol\"%(W_2);\n",
+ "\n",
+ "\n",
+ "def f20(T): \n",
+ "\t return Cp_0/T\n",
+ "\n",
+ "T_prime = 700.;\t\t\t#[K]\n",
+ "fault1=10.;\n",
+ "\n",
+ "def f1(T_out): \n",
+ "\t return 32.2168*math.log(T_out) + 0.1922*10**(-2)*T_out + 0.5274*10**(-5) \\\n",
+ "\t *T_2**(2) - 1.1976*10**(-9)*T_out**(3)-8*10**(6)*dB_dT_prime -216.64\n",
+ "\n",
+ "while(fault1>0.5):\n",
+ " Tr_prime = T_prime/Tc;\n",
+ " B0_prime = 0.083 - 0.422/(Tr_prime**(1.6));\n",
+ " B1_prime = 0.139 - 0.172/(Tr_prime**(4.2));\n",
+ " B_prime = ((B0_prime + w*B1_prime)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 2\n",
+ " dB0_dT_prime = 0.422*1.6*Tc**(1.6)*T_prime**(-2.6);\t\t\t# (dB_0/dT)\n",
+ " dB1_dT_prime = 0.172*4.2*Tc**(4.2)*T_prime**(-5.2);\t\t\t# (dB_1/dT)\n",
+ " dB_dT_prime = ((R*Tc)/Pc)*((dB0_dT_prime) + w*(dB1_dT_prime));\t\t\t# (dB/dT)_1\n",
+ " T_out = fsolve(f1,10)\n",
+ " fault1=abs(T_prime-T_out);\n",
+ " T_prime = T_prime + 0.5;\n",
+ "\n",
+ "T_out = T_prime;\n",
+ "\n",
+ "# Now we have to calculate enthalpy change as W = -delta_H\n",
+ "\n",
+ "def f21(T): \n",
+ "\t return (7.7 + 0.04594*10**(-2.)*T + 0.2521*10**(-5.)*T**(2.) - 0.8587*10.**(-9.)*T**(3.))*4.184\n",
+ "\n",
+ "delta_H_3 = quad(f21,T_1,T_out)[0] + B_prime*P_2 - P_2*T_out*dB_dT_prime - B_1*P_1 + P_1*T_1*dB_dT_1\n",
+ "print T_1,T_out\n",
+ "\n",
+ "\n",
+ "W_3 = - delta_H_3;\t\t\t# [J/mol]\n",
+ "\n",
+ "print \" 3).The exit temperature is %f K\"%(T_out);\n",
+ "print \" The required amount of work is %f J/mol\"%(W_3);\n",
+ "\n",
+ "#(4)\n",
+ "n = 0.8;\t\t\t# Adiabatic efficiency\n",
+ "delta_H_a_4 = delta_H_3/n;\t\t\t#[J/mol]\n",
+ "W_4 = -delta_H_a_4;\t\t\t#[J/mol]\n",
+ "\n",
+ "\n",
+ "T_prime1 = 700.;\t\t\t#[K]\n",
+ "fault2=10.;\n",
+ "\n",
+ "def f2(T_2): \n",
+ "\t return 7.7*4.184*(T_2-T_1) + ((0.04594*4.184*10**(-2))/2)* \\\n",
+ "\t (T_2**(2)-T_1**(2)) + ((0.2521*4.184*10**(-5))/3)*(T_2**(3)-T_1**(3)) - \\\n",
+ "\t ((0.8587*4.184*10**(-9))/4)*(T_2**(4)-T_1**(4)) + B_prime1*8*10**(6) \\\n",
+ "\t - 8*10**(6)*T_2*dB_dT_prime1 + 191.7 + 496.81 - delta_H_a_4\n",
+ "\n",
+ "while(fault2>0.5):\n",
+ " Tr_prime1 = T_prime1/Tc;\n",
+ " B0_prime1 = 0.083 - 0.422/(Tr_prime1**(1.6));\n",
+ " B1_prime1 = 0.139 - 0.172/(Tr_prime1**(4.2));\n",
+ " \t\t\t# (B*Pc)/(R*Tc) = B0 + w*B1\n",
+ " B_prime1 = ((B0_prime1 + w*B1_prime1)*(R*Tc))/Pc;\t\t\t# [m**(3)/mol] - Second virial coefficient at state 2\n",
+ " dB0_dT_prime1 = 0.422*1.6*Tc**(1.6)*T_prime1**(-2.6);\t\t\t# (dB_0/dT)\n",
+ " dB1_dT_prime1 = 0.172*4.2*Tc**(4.2)*T_prime1**(-5.2);\t\t\t# (dB_1/dT)\n",
+ " dB_dT_prime1 = ((R*Tc)/Pc)*((dB0_dT_prime1) + w*(dB1_dT_prime1));\t\t\t# (dB/dT)_1\n",
+ " T_out1 = fsolve(f2,100)\n",
+ " fault2=abs(T_prime1-T_out1);\n",
+ " T_prime1 = T_prime1 + 0.5;\n",
+ "\n",
+ "T_out1 = T_prime1;\n",
+ "\n",
+ "print \" 4).The exit temperature is %f K\"%(T_out1);\n",
+ "print \" The required amount of work is %f J/mol\"%(W_4);\n",
+ "\n",
+ "\n",
+ "# answers are varies because of rounding error. please check it manually."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The exit temperature is 860.000000 K\n",
+ " The required amount of work is -10667.724150 J/mol\n",
+ " 2).The exit temperature is 916.600000 K\n",
+ " The required amount of work is -13334.655188 J/mol\n",
+ "473.15"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 755.5\n",
+ " 3).The exit temperature is 755.500000 K\n",
+ " The required amount of work is -9282.701079 J/mol\n",
+ " 4).The exit temperature is 809.500000 K"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The required amount of work is -11603.376349 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.11 Page Number : 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "Vol = 0.15;\t\t\t #[m**(3)] - Volume of the cylinder\n",
+ "P_1 = 100.;\t\t\t #[bar] - Initial pressure\n",
+ "P_1 = P_1*10**(5);\t\t#[Pa]\n",
+ "T_1 = 170.;\t\t\t #[K] - Initial temperature\n",
+ "n_withdrawn = 500.;\t\t#[mol] - Withdrawn number of moles\n",
+ "R = 8.314;\t\t \t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(1)\n",
+ "Y = 1.4;\t\t\t# Coefficient of adiabatic expansion\n",
+ "n_total = (P_1*Vol)/(R*T_1);\t\t\t#[mol] - Total number of moles\n",
+ "n_2 = n_total - n_withdrawn;\t\t\t#[mol] - Left number of moles\n",
+ "V_1 = Vol/n_total;\t\t\t#[m**(3)/mol] - Molar volume at initial state.\n",
+ "# At final state\n",
+ "V_2 = Vol/n_2;\t\t\t#[m**(3)/mol] - Molar volume at final state\n",
+ "\n",
+ "# During duscharging P_1*V_1**(Y) = P_2*V_2**(Y), therefore\n",
+ "P_2_1 = P_1*((V_1/V_2)**(Y));\t\t\t#[Pa] - Final pressure\n",
+ "P_2_1 = P_2_1*10**(-5);\t\t\t#[bar]\n",
+ "T_2_1 = ((P_2_1*10**(5))*V_2)/R;\t\t\t#[K] - Final temperature\n",
+ "\n",
+ "print \" 1).The final temperature %f K\"%(T_2_1);\n",
+ "print \" The final pressure %f bar\"%(P_2_1);\n",
+ "\n",
+ "\n",
+ "def f53(T): \n",
+ "\t return Cp_0/T\n",
+ "\n",
+ "T_prime = 150;\t\t\t#[K]\n",
+ "error = 10;\n",
+ "while(error>1):\n",
+ " f_T = 18.886*math.log(T_prime) + 4.2*10**(-3)*T_prime - 92.4;\n",
+ " f_T_dash = 18.886/T_prime + 4.2*10**(-3);\n",
+ " T_new = T_prime - (f_T/f_T_dash);\n",
+ " error=abs(T_prime - T_new);\n",
+ " T_prime = T_new;\n",
+ "\n",
+ "T_2_2 = T_prime;\t\t\t#[K] - Final temperature\n",
+ "P_2_2 = ((n_2*R*T_2_2)/Vol)*10**(-5);\t\t\t#[bar] - Final pressure\n",
+ "\n",
+ "print \" 2).The final temperature %f K\"%(T_2_2);\n",
+ "print \" The final pressure %f bar\"%(P_2_2);\n",
+ "\n",
+ "#(3)\n",
+ "Tc = 126.2;\t\t\t#[K] - Critical temperature of nitrogen\n",
+ "Pc = 34.0;\t\t\t#[bar] - Critical pressure of nitrogen\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "w = 0.038;\t\t\t# Acentric factor\n",
+ "\n",
+ "\n",
+ "dB0_dT = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT) at state 1\n",
+ "dB1_dT = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT) at state 1\n",
+ "dB_dT = ((R*Tc)/Pc)*((dB0_dT) + w*(dB1_dT));\t\t\t# (dB/dT) at state 1\n",
+ "# The residual entropy at the initial state is given by \n",
+ "S_R_1 = -P_1*(dB_dT);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# Now let us calculate molar volume at initial state\n",
+ "Tr = T_1/Tc;\t\t\t# Reduced temperature\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6));\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2));\n",
+ "\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "V_1_3 = B + (R*T_1)/P_1;\t\t\t#[m**(3)/mol]\n",
+ "# Therefore number of moles in the initial state is\n",
+ "n_1_3 = Vol/V_1_3;\t\t\t#[mol]\n",
+ "# Therefore final number of moles is\n",
+ "n_2_3 = n_1_3 - n_withdrawn;\n",
+ "\n",
+ "# Therefore molar volume at final state is\n",
+ "V_2_3 = Vol/n_2_3;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Now let us determine the relation between pressure and temperature in the final state\n",
+ "# P_2_3 = (R*T_2_3)/(V_2_3 - B_2)\n",
+ "#delta_S = 0, thus delta_S_ig + delta_S_R = 0\n",
+ "delta_S_R = - S_R_1;\n",
+ "\n",
+ "def f54(T): \n",
+ "\t return Cp_0/T\n",
+ "\n",
+ "\n",
+ "T_2_prime = 135;\t\t\t#[K]\n",
+ "delta = 0.1;\n",
+ "error = 10;\n",
+ "while(error>0.01):\n",
+ " T_r = T_2_prime/Tc;\t\t\t# Reduced temperature\n",
+ " B_0_3 = 0.083-(0.422/(T_r)**(1.6));\n",
+ " B_1_3 = 0.139-(0.172/(T_r)**(4.2));\n",
+ " B_3 = ((B_0_3+(w*B_1_3))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n",
+ " dB0_dT_3 = 0.422*1.6*Tc**(1.6)*T_2_prime**(-2.6);\t\t\t# (dB_0/dT)\n",
+ " dB1_dT_3 = 0.172*4.2*Tc**(4.2)*T_2_prime**(-5.2);\t\t\t# (dB_1/dT)\n",
+ " dB_dT_3 = ((R*Tc)/Pc)*((dB0_dT_3) + w*(dB1_dT_3));\t\t\t# (dB/dT)\n",
+ " P_2_3 = (R*T_2_prime)/(V_2_3 - B_3);\n",
+ " delta_S = 27.2*(math.log(T_2_prime/T_1)) + 4.2*10**(-3)*(T_2_prime - T_1) - R*(math.log(P_2_3/P_1)) - P_2_3*(dB_dT_3) + delta_S_R;\n",
+ " T_new = T_2_prime + delta;\n",
+ " error=abs(delta_S);\n",
+ " T_2_prime = T_new;\n",
+ "\n",
+ "T_2_3 = T_2_prime;\t\t\t#[K] - Final temperature\n",
+ "\t\t\t# Therefore at T_2_3\n",
+ "P_2_3 = P_2_3*10**(-5);\t\t\t#[bar] - Final pressure\n",
+ "\n",
+ "print \" 3).The final temperature %f K\"%(T_2_3);\n",
+ "print \" The final pressure %f bar\"%(P_2_3);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The final temperature 131.761821 K\n",
+ " The final pressure 40.991361 bar\n",
+ " 2).The final temperature 129.504151 K\n",
+ " The final pressure 40.288995 bar\n",
+ " 3).The final temperature 141.300000 K\n",
+ " The final pressure 57.079997 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.12 Page Number : 351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P_1 = 80.;\t\t\t #[bar] - Initial pressure\n",
+ "P_1 = P_1*10.**(5);\t\t\t#[Pa]\n",
+ "T_1 = 300. + 273.15;\t\t#[T] - Initial temperature\n",
+ "P_2 = 40.;\t\t\t #[bar] - Final pressure\n",
+ "P_2 = P_2*10**(5);\t\t\t#[Pa]\n",
+ "T_2 = 300. + 273.15;\t\t#[K] - Final temperature\n",
+ "T_0 = 25. + 273.15;\t\t\t#[K] - Surrounding temperature\n",
+ "P_0 = 1.;\t\t\t #[atm] - Surrounding pressure\n",
+ "P_0 = P_0*101325;\t\t\t#[Pa]\n",
+ "Tc = 647.1;\t\t\t #[K]\n",
+ "Pc = 220.55;\t\t\t #[bar]\n",
+ "Pc = Pc*10.**(5);\t\t\t#[Pa]\n",
+ "R = 8.314;\t\t\t #[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "# For van der Walls equation of state\n",
+ "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\n",
+ "def f(V): \n",
+ "\t return V**(3)-(b+(R*T_1)/P_1)*V**(2)+(a/P_1)*V-(a*b)/P_1\n",
+ "V_1_1=fsolve(f,0.1)\n",
+ "V_1_2=fsolve(f,10)\n",
+ "V_1_2=fsolve(f,100)\n",
+ "# The largest root is considered because of vapour\n",
+ "V_1 = V_1_1;\n",
+ "\n",
+ "U_R_1 = -a/V_1;\t\t\t#[J/mol] - Internal energy\n",
+ "H_R_1 = P_1*V_1 - R*T_1 - a/V_1;\t\t\t#[J/mol] - Enthalpy\n",
+ "S_R_1 = R*math.log((P_1*(V_1-b))/(R*T_1));\n",
+ "\n",
+ "def f1(V): \n",
+ "\t return V**(3)-(b+(R*T_2)/P_2)*V**(2)+(a/P_2)*V-(a*b)/P_2\n",
+ "V_2_1 = fsolve(f1,0.1)\n",
+ "V_2_2 = fsolve(f1,10)\n",
+ "V_2_3 = fsolve(f1,100)\n",
+ "V_2 = V_2_1;\n",
+ "\n",
+ "U_R_2 = -a/V_2;\t\t\t#[J/mol] - Internal energy\n",
+ "H_R_2 = P_2*V_2 - R*T_2 - a/V_2;\t\t\t#[J/mol] - Enthalpy\n",
+ "S_R_2 = R*math.log((P_2*(V_2-b))/(R*T_2));\n",
+ "\n",
+ "delta_U_R = U_R_2 - U_R_1;\t\t\t#\n",
+ "delta_H_R = H_R_2 - H_R_1;\t\t\t#\n",
+ "delta_S_R = S_R_2 - S_R_1;\t\t\t#\n",
+ "\n",
+ "delta_U_ig = 0;\t\t\t#[J/mol] - As temperature is constant\n",
+ "delta_H_ig = 0;\t\t\t#[J/mol] - As temperature is constant\n",
+ "delta_S_ig = - R*math.log(P_2/P_1);\t\t\t# [J/mol-K]\n",
+ "delta_U = delta_U_R + delta_U_ig;\t\t\t#[J/mol]\n",
+ "delta_H = delta_H_R + delta_H_ig;\t\t\t#[J/mol]\n",
+ "delta_S = delta_S_R + delta_S_ig;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "\t\t\t# Change in exergy is given by\n",
+ "\t\t\t# delta_phi = phi_1 - phi_2 = U_1 - U_2 + P_0*(V_1 - _V_2) - T_0*(S_1 - S_2)\n",
+ "delta_phi = - delta_U + P_0*(V_1 - V_2) - T_0*(-delta_S);\t\t\t#[J/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" The change in internal energy is %f J/mol\"%(delta_U);\n",
+ "print \" The change in enthalpy is %f J/mol\"%(delta_H);\n",
+ "print \" The change in entropy is %f J/mol-K\"%(delta_S);\n",
+ "print \" The change in exergy is %f J/mol\"%(delta_phi);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The change in internal energy is 615.070900 J/mol\n",
+ " The change in enthalpy is 1053.220316 J/mol\n",
+ " The change in entropy is 6.930264 J/mol-K\n",
+ " The change in exergy is 1389.940735 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.13 Page Number : 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T_1 = 500.;\t\t\t#[K] - Initial temperature\n",
+ "P_1 = 30.;\t\t\t#[atm] - Initial pressure\n",
+ "P_1 = P_1*101325;\t\t\t#[Pa]\n",
+ "P_2 = 1;\t\t\t#[atm] - Final pressure\n",
+ "P_2 = P_2*101325;\t\t\t#[Pa]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\t\t\t# For chlorine\n",
+ "Tc = 417.2;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 77.10;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "\n",
+ "#Redlich Kwong equation of state,\n",
+ "a = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t# [Pa*m**(6)*K**(1/2)/mol]\n",
+ "b = (0.08664*R*Tc)/Pc;\t\t\t# [m**(3)/mol]\n",
+ "\n",
+ "# Calculations\n",
+ "def f1(V): \n",
+ "\t return V**(3)-((R*T_1)/P_1)*V**(2)-((b**(2))+((b*R*T_1)/P_1)-(a/(T_1**(1./2)*P_1)))*V-(a*b)/(T_1**(1./2)*P_1)\n",
+ "V_1=fsolve(f1,1)\n",
+ "V_2=fsolve(f1,10)\n",
+ "V_3=fsolve(f1,100)\n",
+ "\n",
+ "V = V_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\n",
+ "Z = (P_1*V_1)/(R*T_1);\t\t\t#compressibility factor\n",
+ "\n",
+ "# The residual enthalpy at state 1 is given by\n",
+ "H_R_1 = (Z-1)*R*T_1 + ((3*a)/(2*b*T_1**(1./2)))*(math.log(V/(V+b)));\t\t\t#[J/mol]\n",
+ " \n",
+ "\n",
+ "H_R_2 = 0;\t\t\t# Residual enthalpy at state 2\n",
+ "delta_H_R = H_R_2 - H_R_1;\t\t\t#[J/mol] - Residual enthalpy change\n",
+ "# and since isothermal conditions are maintained, therfore\n",
+ "delta_H_ig = 0;\t\t\t# Enthalpy change under ideal condition\n",
+ "delta_H = delta_H_R + delta_H_ig;\t\t\t#[J/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" The change in enthalpy is given by delta_H = %f J/mol\"%(delta_H);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The change in enthalpy is given by delta_H = 1053.558471 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.14 Page Number : 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "Vol_1 = 0.1;\t\t\t#[m**(3)] - Initial volume of each compartment\n",
+ "n_1 = 400;\t\t\t#[mol] - Initial number of moles in compartment 1\n",
+ "V_1 = Vol_1/n_1;\t\t\t#[m**(3)/mol] - Molar volume at state 1\n",
+ "T_1 = 294;\t\t\t#[K]\n",
+ "Vol_2 = 0.2;\t\t\t#[m**(3)] - Final volume of the compartment after removing the partition.\n",
+ "n_2 = n_1;\t\t\t#[mol] - Number of moles remains the same\n",
+ "V_2 = Vol_2/n_2;\t\t\t#[m**(3)/mol] - Molar volume at state 2\n",
+ "\n",
+ "a = 0.1362;\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = 3.215*10**(-5);\t\t\t#[m**(3)/mol]\n",
+ "Cv_0 = 12.56;\t\t\t#[J/mol-K] - Heat capacity in ideal gas state\n",
+ "\n",
+ "# Calculations\n",
+ "# For overall system q = 0, and no work is done, therefore delta_U = 0\n",
+ "# Therfore from the relation proved in part (1), we have\n",
+ "T_2 = T_1 + (a/Cv_0)*(1/V_2 - 1/V_1);\t\t\t#[K]\n",
+ "\n",
+ "# Results\n",
+ "print \" 2).The final temperatutre is %f K\"%(T_2)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 2).The final temperatutre is 272.312102 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.17 Page Number : 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P_1 = 1*10**(6);\t\t\t#[Pa] - Initial pressure\n",
+ "T_1 = 200 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 8*10**(6);\t\t\t#[Pa]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "Y = 1.4;\t\t\t# Index of expansion\n",
+ "Cp_0 = 29.114;\t\t\t#[J/mol-K]\n",
+ "\t\n",
+ "a = 0.55366;\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = 3.049*10**(-5);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Calculations\n",
+ "V_1 = 3.816*10**(-3);\t\t\t#[m**(3)/mol]\n",
+ "Z_1 = (P_1*V_1)/(R*T_1);\n",
+ "\n",
+ "T_2 = T_1*(P_2/P_1)**((Y-1)/Y);\t\t\t#[K]\n",
+ "\n",
+ "# At 8 MPa and T_2,\n",
+ "# The molar volume of steam following van der Walls equation of state (as reported in the book) is\n",
+ "V_2 = 8.41*10**(-4);\t\t\t#[m**(3)/mol]\n",
+ "# And the compressibility factor is \n",
+ "Z_2 = (P_2*V_2)/(R*T_2);\n",
+ "\n",
+ "# For van der Walls equation of state we know that\n",
+ "# delta_S_R/R = math.log(Z_2/Z_1) + math.log((V_2 - b)/V_2) - math.log((V_1 - b)/V_1)\n",
+ "delta_S_R = R*(math.log(Z_2/Z_1) + math.log((V_2 - b)/V_2) - math.log((V_1 - b)/V_1));\t\t\t#[J/mol]\n",
+ "\n",
+ "# delta_S_ig = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1)\n",
+ "# The entropy change is therefore\n",
+ "# delta_S = delta_S_ig + delta_S_R\n",
+ "\n",
+ "\n",
+ "# Let us assume a temperature, say T = 870 K\n",
+ "# At 870 K the molar volume of steam following van der Walls equation of state (as reported in the book) is\n",
+ "# V_3 = 8.57*10**(-4);\t\t\t# [m**(3)/mol]\n",
+ "# Therefore\n",
+ "# Z_3 = (P_2*V_3)/(R*T_2);\n",
+ "# At this temperature,\n",
+ "# delta_S = Cp_0*math.log(T/T_1) - R*math.log(P_2/P_1) + R*(math.log(Z/Z_1) + R*math.log((V - b)/V) - R*math.log((V_1 - b)/V_1))\n",
+ "\n",
+ "T = 800;\t\t\t#[K]\n",
+ "fault=10;\n",
+ "\n",
+ "def f1(V): \n",
+ "\t return V**(3)-(b+(R*T)/P_2)*V**(2)+(a/P_2)*V-(a*b)/P_2\n",
+ "\t \n",
+ "def f2(T): \n",
+ "\t return Cp_0*math.log(T/T_1) - R*math.log(P_2/P_1) + R*(math.log(Z/Z_1) + R*(math.log((V - b)/V)) - R*(math.log((V_1 - b)/V_1)))\n",
+ "\n",
+ "\n",
+ "while(fault>0.3):\n",
+ " \t\t\t# At T and 8 MPa\n",
+ " V = fsolve(f1,1)\n",
+ " Z = (P_2*V)/(R*T);\n",
+ " \n",
+ " T_exit = fsolve(f2,0.1)\n",
+ " fault=abs(T-T_exit);\n",
+ " T = T + 0.5;\n",
+ "\n",
+ "Texit = T;\n",
+ "\n",
+ "\n",
+ "# W = - delta_H\n",
+ "\n",
+ "# For van der Walls gas the enthalpy change is given by\n",
+ "delta_H_s = Cp_0*(T_exit - T_1) + (Z - 1)*R*T_exit - a/V - (Z_1-1)*R*T_1 + a/V_1;\t\t\t#[J/mol]\n",
+ "W = - delta_H_s;\t\t\t#[J/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" 1).The exit temperature is %f K\"%(Texit);\n",
+ "print \" The work required is given by W = %f J/mol\"%(W);\n",
+ "\n",
+ "#(2)\n",
+ "eff = 0.8;\t\t\t# Adiabatic efficiency\n",
+ "delta_H_a = eff*delta_H_s;\t\t\t#[J/mol] - Actual enthalpy change\n",
+ "W_2 = - delta_H_a;\n",
+ "\n",
+ "\t\t\t# Let us assume a temperature, say\n",
+ "T_prime= 900;\t\t\t#[K]\n",
+ "fault1=10;\n",
+ "def f22(V): \n",
+ "\t return V**(3)-(b+(R*T_prime)/P_2)*V**(2)+(a/P_2)*V-(a*b)/P_2\n",
+ "\n",
+ "def f3(T_prime): \n",
+ "\t return Cp_0*(T_prime - T_1) + (Z_prime - 1)*R*T_prime - a/V_prime - 13230.49\n",
+ "\t \n",
+ "while(fault1>0.3):\n",
+ " \t\t\t# At T_prime and 8 MPa\n",
+ " V_prime=fsolve(f22,1)\n",
+ " Z_prime = (P_2*V_prime)/(R*T_prime);\n",
+ " T_exit1 = fsolve(f3,100)\n",
+ " fault1=abs(T_prime-T_exit1);\n",
+ " T_prime = T_prime + 0.2;\n",
+ "\n",
+ "Texit1 = T_prime;\n",
+ "\n",
+ "print \" 2).The exit temperature is %f K\"%(Texit1);\n",
+ "print \" The work required is given by W = %f J/mol\"%(W_2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The exit temperature is 916.500000 K\n",
+ " The work required is given by W = -12195.093996 J/mol\n",
+ " 2).The exit temperature is 958.400000 K"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The work required is given by W = -9756.075197 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.19 Page Number : 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 100 + 273.15;\t\t\t#[K] - Temperature\n",
+ "Tc = 647.1;\t\t\t#[K] - Critical temperature of water\n",
+ "Pc = 220.55;\t\t\t#[bar] - Critical pressure of water\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The cubic form of van der Walls equation of state is given by,\n",
+ "# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n",
+ "\n",
+ "# For water vapour at 100 C under saturated conditions pressure is 1 atm, therefore\n",
+ "P = 1;\t\t\t#[atm]\n",
+ "P = P*101325;\t\t\t#[Pa]\n",
+ "\n",
+ "# At 100 C and 1 atm \n",
+ "def f(V): \n",
+ "\t return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n",
+ "V_1 = fsolve(f,0.1)\n",
+ "V_1 = fsolve(f,10)\n",
+ "V_1 = fsolve(f,100)\n",
+ "V = V_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\n",
+ "f = P*(math.exp(math.log((R*T)/(P*(V-b))) + b/(V-b) - (2*a)/(R*T*V)));\t\t\t#[Pa]\n",
+ "f = f/101325;\t\t\t#[atm]\n",
+ "\n",
+ "# Results\n",
+ "print \" The molar volume is %f m**3)/mol\"%(V);\n",
+ "print \" The fugacity is %f atm\"%(f);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The molar volume is 0.030469 m**3)/mol\n",
+ " The fugacity is 0.995168 atm\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.20 Page Number : 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 6;\t\t\t#[bar] - Initial pressure\n",
+ "P_1 = P_1*10**(5);\t\t\t#[Pa]\n",
+ "T_1 = 100 + 273.15;\t\t\t#[T] - Initial temperature\n",
+ "P_2 = 12;\t\t\t#[bar] - Final pressure\n",
+ "P_2 = P_2*10**(5);\t\t\t#[Pa]\n",
+ "T_2 = 500 + 273.15;\t\t\t#[K] - Final temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "Y = 1.126;\t\t\t# Index of expansion\n",
+ "Cp_0 = (R*Y)/(Y-1);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# For propane\n",
+ "Tc = 369.8;\t\t\t#[K]\n",
+ "Pc = 42.48;\t\t\t#[bar]\n",
+ "Pc = Pc*10**(5);\n",
+ "w = 0.152;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(1)\n",
+ "# For van der Walls equation of state\n",
+ "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The cubic form of van der Walls equation of state is given by,\n",
+ "# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n",
+ "\n",
+ "# At state 1 (100 C and 6 bar) \n",
+ "def f(V): \n",
+ "\t return V**(3)-(b+(R*T_1)/P_1)*V**(2)+(a/P_1)*V-(a*b)/P_1\n",
+ "V_1_1 = fsolve(f,1)\n",
+ "V_1_2 = fsolve(f,10)\n",
+ "V_1_3 = fsolve(f,100)\n",
+ "\n",
+ "V_1 = V_1_1;\t\t\t#[m**(3)/mol]\n",
+ "# Thus compressibility factor is\n",
+ "Z_1 = (P_1*V_1)/(R*T_1);\t\t\t#compressibility factor\n",
+ "\n",
+ "H_R_1 = (Z_1 - 1)*R*T_1 - (a/V_1);\t\t\t# [J/mol]\n",
+ "S_R_1 = R*math.log((P_1*(V_1-b))/(R*T_1));\t\t\t# [J/mol-K]\n",
+ "\n",
+ "# At state 2 (500 C and 12 bar) \n",
+ "def f1(V): \n",
+ " return V**(3)-(b+(R*T_2)/P_2)*V**(2)+(a/P_2)*V-(a*b)/P_2\n",
+ "V_2_1 = fsolve(f1,1)\n",
+ "V_2_2 = fsolve(f1,10)\n",
+ "V_2_3 = fsolve(f1,100)\n",
+ "# The largest root is considered because of molar volume of vapour phase is to determined\n",
+ "V_2 = V_2_1;\t\t\t#[m**(3)/mol]\n",
+ "# Thus compressibility factor is\n",
+ "Z_2 = (P_2*V_2)/(R*T_2);\t\t\t#compressibility factor\n",
+ "\n",
+ "H_R_2 = (Z_2 - 1)*R*T_2 - (a/V_2);\t\t\t# [J/mol]\n",
+ "S_R_2 = R*math.log((P_2*(V_2-b))/(R*T_2));\t\t\t# [J/mol-K]\n",
+ "\n",
+ "# Ideal gas entropy change is given by\n",
+ "delta_S_ig = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n",
+ "# Entropy change is given by\n",
+ "delta_S = delta_S_ig + (S_R_2 - S_R_1);\t\t\t#[J/mol-k]\n",
+ "\n",
+ "# Ideal gas enthalpy change is given by\n",
+ "delta_H_ig = Cp_0*(T_2 - T_1);\t\t\t#[J/mol]\n",
+ "# Enthalpy change is given by\n",
+ "delta_H = delta_H_ig + (H_R_2 - H_R_1);\t\t\t#[J/mol]\n",
+ "\n",
+ "print \"1).The change in enthalpy is %f J/mol\"%(delta_H);\n",
+ "print \" The change in entropy is %f J/mol-K\"%(delta_S);\n",
+ "\n",
+ "#(2)\n",
+ "# Virial equation of state\n",
+ "\n",
+ "# At state 1 (372.15 K, 6 bar) let us calculate B and dB/dT\n",
+ "Tr = T_1/Tc;\t\t\t# Reduced temperature\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6));\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2));\n",
+ "\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n",
+ "dB0_dT = 0.422*1.6*Tc**(1.6)*T_1**(-2.6);\t\t\t# (dB_0/dT) at state 1\n",
+ "dB1_dT = 0.172*4.2*Tc**(4.2)*T_1**(-5.2);\t\t\t# (dB_1/dT) at state 1\n",
+ "dB_dT = ((R*Tc)/Pc)*((dB0_dT) + w*(dB1_dT));\t\t\t# (dB/dT) at state 1\n",
+ "\n",
+ "H_R_1_2 = B*P_1 - P_1*T_1*dB_dT;\t\t\t#[J/mol] - Residual enthalpy at state 1\n",
+ "S_R_1_2 = -P_1*(dB_dT);\t\t\t#[J/mol-K] - Residual entropy at state 1\n",
+ "\n",
+ "# At state 2 (773.15 K, 12 bar)\n",
+ "Tr_2 = T_2/Tc;\t\t\t# Reduced temperature\n",
+ "B_0_2 = 0.083-(0.422/(Tr_2)**(1.6));\n",
+ "B_1_2 = 0.139-(0.172/(Tr_2)**(4.2));\n",
+ "\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ "B_2 = ((B_0_2+(w*B_1_2))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n",
+ "dB0_dT_2 = 0.422*1.6*Tc**(1.6)*T_2**(-2.6);\t\t\t# (dB_0/dT) at state 1\n",
+ "dB1_dT_2 = 0.172*4.2*Tc**(4.2)*T_2**(-5.2);\t\t\t# (dB_1/dT) at state 1\n",
+ "dB_dT_2 = ((R*Tc)/Pc)*((dB0_dT_2) + w*(dB1_dT_2));\t\t\t# (dB/dT) at state 1\n",
+ "\n",
+ "H_R_2_2 = B_2*P_2 - P_2*T_2*dB_dT_2;\t\t\t#[J/mol] - Residual enthalpy at state 1\n",
+ "S_R_2_2 = -P_2*(dB_dT_2);\t\t\t#[J/mol-K] - Residual entropy at state 1\n",
+ "\n",
+ "delta_H_2 = delta_H_ig + (H_R_2_2 - H_R_1_2);\t\t\t#[J/mol]\n",
+ "delta_S_2 = delta_S_ig + (S_R_2_2 - S_R_1_2);\t\t\t#[J/mol]\n",
+ "\n",
+ "print \"2).The change in enthalpy is %f J/mol\"%(delta_H_2);\n",
+ "print \" The change in entropy is %f J/mol-K\"%(delta_S_2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1).The change in enthalpy is 29798.211799 J/mol\n",
+ " The change in entropy is 48.649067 J/mol-K\n",
+ "2).The change in enthalpy is 29992.807365 J/mol\n",
+ " The change in entropy is 49.021724 J/mol-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.21 Page Number : 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P = 2.76*10**(6);\t\t\t#[N/m**(2)] - Pressure\n",
+ "T = 310.93;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# For n-butane\n",
+ "Tc = 425.18;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 37.97;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "w = 0.193;\n",
+ "den = 0.61;\t\t\t#[g/cm**(3)]\n",
+ "mol_wt = 58;\t\t\t#[g/mol] - Molecular weight of butane\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# math.log(P_sat) = 15.7374 - 2151.63/(T-36.24)\n",
+ "P_sat = math.exp(15.7374 - 2151.63/(T-36.24));\t\t\t#[mm Hg]\n",
+ "P_sat = (P_sat/760)*101325;\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "#(1)\n",
+ "# Let us determine the second virial coefficient at 310.93 K\n",
+ "Tr = T/Tc;\t\t\t# Reduced temperature\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6));\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2));\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0 + (w*B_1)\n",
+ "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Fugacity under saturated conditions is given by\n",
+ "# math.log(f_sat/P_sat) = (B*P_sat)/(R*T)\n",
+ "f_sat = P_sat*(math.exp((B*P_sat)/(R*T)));\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "# The molar volume is given by\n",
+ "V_liq = (1/(den*1000))*(mol_wt/1000);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "f = f_sat*math.exp(V_liq*(P-P_sat)/(R*T));\n",
+ "\n",
+ "print \" 1).The fugacity of n-butane is %e N/m**2)\"%(f);\n",
+ "\n",
+ "#(2)\n",
+ "# For van der Walls equation of state\n",
+ "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The cubic form of van der Walls equation of state is given by,\n",
+ "# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n",
+ "\n",
+ "# At 100 C and 1 atm \n",
+ "def f(V): \n",
+ " return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n",
+ "V_1 = fsolve(f,0.1)\n",
+ "V_1 = fsolve(f,10)\n",
+ "V_1 = fsolve(f,100)\n",
+ "# The above equation has only 1 real root, other two roots are imaginary\n",
+ "V = V_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# math.log(f/P) = math.log((R*T)/(P*(V-b))) + b/(V-b) -(2*a)/(R*T*V)\n",
+ "f_2 = P*(math.exp(math.log((R*T)/(P*(V-b))) + b/(V-b) -(2*a)/(R*T*V)));\n",
+ "\n",
+ "print \" 2).The fugacity of n-butane is %e N/m**2)\"%(f_2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The fugacity of n-butane is 3.293476e+05 N/m**2)\n",
+ " 2).The fugacity of n-butane is 8.997352e+05 N/m**2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.22 Page Number : 363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 50+273.15;\t\t\t#[K] - Temperature\n",
+ "P = 25.*10**(3);\t\t\t#[Pa] - Pressure\n",
+ "y1 = 0.5;\t\t\t#[mol] - mole fraction of equimolar mixture\n",
+ "y2 = 0.5;\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "#For component 1 (methyl ethyl ketone)\n",
+ "Tc_1 = 535.5;\t\t\t#[K] - Critical temperature\n",
+ "Pc_1 = 41.5*10**(5);\t\t\t#[N/m**(2)] - Critical pressure\n",
+ "Vc_1 = 267.;\t\t\t#[cm**(3)/mol] - Critical volume\n",
+ "Zc_1 = 0.249;\t\t\t# Critical compressibility factor\n",
+ "w_1 = 0.323;\t\t\t# acentric factor\n",
+ "\n",
+ "#For component 2 (toluene)\n",
+ "Tc_2 = 591.8;\t\t\t#[K]\n",
+ "Pc_2 = 41.06*10**(5);\t\t\t#[N/m**(2)]\n",
+ "Vc_2 = 316.;\t\t\t#[cm**(3)/mol]\n",
+ "Zc_2 = 0.264;\n",
+ "w_2 = 0.262;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# For equation of state Z = 1 + B/V\n",
+ "#For component 1, let us calculate B and dB/dT\n",
+ "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n",
+ "#At reduced temperature\n",
+ "B1_0 = 0.083-(0.422/(Tr_1)**(1.6));\n",
+ "B1_1 = 0.139-(0.172/(Tr_1)**(4.2));\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t# [m**(3)/mol-K] \n",
+ "dB0_dT_1 = 0.422*1.6*Tc_1**(1.6)*T**(-2.6);\t\t\t# [m**(3)/mol-K] - (dB_0/dT)\n",
+ "dB1_dT_1 = 0.172*4.2*Tc_1**(4.2)*T**(-5.2);\t\t\t# [m**(3)/mol-K] - (dB_1/dT)\n",
+ "dB_dT_1 = ((R*Tc_1)/Pc_1)*((dB0_dT_1) + w_1*(dB1_dT_1));\t\t\t#[m**(3)/mol-K] - (dB/dT)_\n",
+ "\n",
+ "#Similarly for component 2\n",
+ "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n",
+ "#At reduced temperature Tr_2,\n",
+ "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6));\n",
+ "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2));\n",
+ "B_22 = ((B2_0+(w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n",
+ "dB0_dT_2 = 0.422*1.6*Tc_2**(1.6)*T**(-2.6);\t\t\t# [m**(3)/mol-K] - (dB_0/dT)\n",
+ "dB1_dT_2 = 0.172*4.2*Tc_2**(4.2)*T**(-5.2);\t\t\t# [m**(3)/mol-K] - (dB_1/dT)\n",
+ "dB_dT_2 = ((R*Tc_2)/Pc_2)*((dB0_dT_2) + w_2*(dB1_dT_2));\t\t\t#[m**(3)/mol-K] - (dB/dT)_\n",
+ "\n",
+ "#For cross coeffcient, let us calculate B and dB/dT\n",
+ "Tc_12 = (Tc_1*Tc_2)**(1./2);\t\t\t#[K]\n",
+ "w_12 = (w_1 + w_2)/2.;\n",
+ "Zc_12 = (Zc_1 + Zc_2)/2;\n",
+ "Vc_12 = (((Vc_1)**(1./3) + (Vc_2)**(1./3))/2)**(3);\t\t\t#[cm**(3)/mol]\n",
+ "Vc_12 = Vc_12*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "#Now we have,(B_12*Pc_12)/(R*Tc_12) = B_0+(w_12*B_1)\n",
+ "#where B_0 and B_1 are to be evaluated at Tr_12\n",
+ "Tr_12 = T/Tc_12;\n",
+ "#At reduced temperature Tr_12\n",
+ "B_0 = 0.083 - (0.422/(Tr_12)**(1.6));\n",
+ "B_1 = 0.139 - (0.172/(Tr_12)**(4.2));\n",
+ "B_12 = ((B_0 + (w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n",
+ "dB0_dT_12 = 0.422*1.6*Tc_12**(1.6)*T**(-2.6);\t\t\t# [m**(3)/mol-K] - (dB_0/dT)\n",
+ "dB1_dT_12 = 0.172*4.2*Tc_12**(4.2)*T**(-5.2);\t\t\t# [m**(3)/mol-K] - (dB_1/dT)\n",
+ "dB_dT_12 = ((R*Tc_12)/Pc_12)*((dB0_dT_12) + w_12*(dB1_dT_12));\t\t\t#[m**(3)/mol-K] - (dB/dT)_12\n",
+ "\n",
+ "#For the mixture\n",
+ "B = y1**(2)*B_11 + 2*y1*y2*B_12 + y2**(2)*B_22;\t\t\t#[m**(3)/moL]\n",
+ "\n",
+ "# The equation of state can be written as\n",
+ "# V**(2) - ((R*T)/P) - (B*R*T)/P = 0\n",
+ "# V**(2) - 0.1075*V + 1.737*10**(-4) = 0\n",
+ "def f(V): \n",
+ " return V**(2) - 0.1075*V + 1.737*10**(-4)\n",
+ "V1 = fsolve(f,0.1)\n",
+ "V2 = fsolve(f,1)\n",
+ "# We will consider the root which is near to R*T/P\n",
+ "V = V1;\n",
+ "# dB/dT = y_1**(2)*dB_11/dT + y_2**(2)*dB_22/dT + 2*y_1*y_2*dB_12/dT\n",
+ "dB_dT = y1**(2)*dB_dT_1 + y2**(2)*dB_dT_2 + 2*y1*y2*dB_dT_12;\t\t\t#[m**(3)/mol-K]\n",
+ "\n",
+ "# For equation of state Z = 1 + B/V\n",
+ "H_R = (B*R*T)/V - ((R*T**(2))/V)*dB_dT;\t\t\t#[J/mol]\n",
+ "\n",
+ "print \" 1).The value of H_R for the mixture using virial equation of state is %f J/mol\"%(H_R);\n",
+ "\n",
+ "#(2)\n",
+ "# For van der Walls equation of state \n",
+ "a_11 = (27*R**(2)*Tc_1**(2))/(64*Pc_1);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "a_22 = (27*R**(2)*Tc_2**(2))/(64*Pc_2);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "a_12 = (a_11*a_22)**(1./2);\n",
+ "b_1 = (R*Tc_1)/(8*Pc_1);\t\t\t#[m**(3)/mol]\n",
+ "b_2 = (R*Tc_2)/(8*Pc_2);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# For the mixture\n",
+ "a = y1**(2)*a_11 + y2**(2)*a_22 + 2*y1*y2*a_12;\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = y1*b_1 + y2*b_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# From the cubic form of van der Walls equation of state\n",
+ "def f1(V): \n",
+ " return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n",
+ "V2_1 = fsolve(f1,0.1)\n",
+ "V2_2 = fsolve(f1,10)\n",
+ "V2_3 = fsolve(f1,100)\n",
+ "# The largest root is considered\n",
+ "V_2 = V2_1;\n",
+ "\n",
+ "# The residual enthalpy is given by\n",
+ "H_R_2 = P*V_2 - R*T -a/V_2;\t\t\t#[J/mol]\n",
+ "\n",
+ "print \" 2).The value of H_R for the mixture using van der Walls equation of state is %f J/mol\"%(H_R_2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The value of H_R for the mixture using virial equation of state is -151.289795 J/mol\n",
+ " 2).The value of H_R for the mixture using van der Walls equation of state is -38.476127 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.23 Page Number : 366"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.optimize import fsolve \n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "T = 320 + 273.15;\t\t\t#[K]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# For water\n",
+ "Tc = 647.1;\t\t\t#[K]\n",
+ "Pc = 220.55;\t\t\t#[bar]\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "\n",
+ "# The cubic form of Redlich Kwong equation of state is given by,\n",
+ "# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n",
+ "\n",
+ "# At 320 C and 70 bar pressure\n",
+ "P_1 = 70;\t\t\t#[bar]\n",
+ "P_1 = P_1*10**(5);\t\t\t#[Pa]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "a = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "# Solving the cubic equation\n",
+ "def f1(V): \n",
+ " return V**(3)-((R*T)/P_1)*V**(2)-((b**(2))+((b*R*T)/P_1)-(a/(T**(1./2)*P_1)))*V-(a*b)/(T**(1./2)*P_1)\n",
+ "V1=fsolve(f1,1)\n",
+ "V2=fsolve(f1,10)\n",
+ "V3=fsolve(f1,100)\n",
+ "# The largest root is considered because at 320 C and 70 bar vapour phase exists.\n",
+ "V_1 = V1;\t\t\t#[m**(3)/mol]\n",
+ "# Thus compressibility factor is\n",
+ "Z_1 = (P_1*V_1)/(R*T);\n",
+ "\n",
+ "# For Redlich-Kwong equation of state\n",
+ "# math.log(f/P) = Z - 1 - math.log(V_1/(V_1-b)) + (a/(b*R*(T**(3/2))))*math.log(V/(V+b))\n",
+ "f_1 = P_1*(math.exp(Z_1-1-math.log(Z_1)+math.log(V_1/(V_1-b))+(a/(b*R*(T**(3./2))))*math.log(V_1/(V_1+b))));\t\t\t#[Pa]\n",
+ "f_1 = f_1*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "print \" The fugacity of water vapour at 320 C and 70 bar pressure is %f bar\"%(f_1);\n",
+ "\n",
+ "# At 320 C and 170 bar pressure, we have\n",
+ "P_2 = 170;\t\t\t#[bar]\n",
+ "P_2 = P_2*10**(5);\t\t\t#[Pa]\n",
+ "\n",
+ "# Solving the cubic equation\n",
+ "def f2(V): \n",
+ " return V**(3)-((R*T)/P_2)*V**(2)-((b**(2))+((b*R*T)/P_2)-(a/(T**(1./2)*P_2)))*V-(a*b)/(T**(1./2)*P_2)\n",
+ "V4 = fsolve(f2,1)\n",
+ "V5 = fsolve(f2,10)\n",
+ "V6 = fsolve(f2,100)\n",
+ "# The above equation has only 1 real root,other two roots are imaginary. Therefore,\n",
+ "V_2 = V6;\t\t\t#[m**(3)/mol]\n",
+ "# Thus compressibility factor is\n",
+ "Z_2 = (P_2*V_2)/(R*T);\n",
+ "\n",
+ "# For Redlich-Kwong equation of state\n",
+ "# math.log(f/P) = Z - 1 - math.log(V_1/(V_1-b)) + (a/(b*R*(T**(3/2))))*math.log(V/(V+b))\n",
+ "f_2 = P_2*(math.exp(Z_2-1-math.log(Z_2)+math.log(V_2/(V_2-b))+(a/(b*R*(T**(3./2))))*math.log(V_2/(V_2+b))));\t\t\t#[Pa]\n",
+ "f_2 = f_2*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "print \" The fugacity of water vapour at 320 C and 170 bar pressure is %f bar\"%(f_2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The fugacity of water vapour at 320 C and 70 bar pressure is 60.456239 bar\n",
+ " The fugacity of water vapour at 320 C and 170 bar pressure is 101.590989 bar\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "C:\\Anaconda\\lib\\site-packages\\scipy\\optimize\\minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
+ " improvement from the last ten iterations.\n",
+ " warnings.warn(msg, RuntimeWarning)\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.24 Page Number : 367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.optimize import fsolve \n",
+ "import math\n",
+ "# Variables\n",
+ "Vol = 0.057;\t\t\t#[m**(3)] - Volume of car tyre\n",
+ "P_1 = 300.;\t\t\t#[kPa] - Initial pressure\n",
+ "P_1 = P_1*10**(3);\t\t\t#[Pa]\n",
+ "T_1 = 300.;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 330.;\t\t\t#[kPa] - Finnal pressure\n",
+ "P_2 = P_2*10**(3);\t\t\t#[Pa]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "Cv_0 = 21.;\t\t\t#[J/mol-K] - Heat capacity for air \n",
+ "\n",
+ "# For oxygen\n",
+ "Tc_O2 = 154.6;\t\t\t#[K] - Critical temperature\n",
+ "Pc_O2 = 50.43;\t\t\t#[bar] - Critical pressure\n",
+ "Pc_O2 = Pc_O2*10**(5);\t\t\t#[Pa]\n",
+ "y1 = 0.21;\t\t\t# - Mole fraction of oxygen\n",
+ "# For nitrogen\n",
+ "Tc_N2 = 126.2;\t\t\t#[K] - Critical temperature\n",
+ "Pc_N2 = 34.00;\t\t\t#[bar] - Critical pressure\n",
+ "Pc_N2 = Pc_N2*10**(5);\t\t\t#[Pa]\n",
+ "y2 = 0.79;\t\t\t# - Mole fraction of nitrogen\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# (1)\n",
+ "# Assuming ideal gas behaviour. The volume remains the same,therefore,we get\n",
+ "# P_1/T_1 = P_2/T_2\n",
+ "T_2 = P_2*(T_1/P_1);\t\t\t#[K]\n",
+ "\n",
+ "n = (P_1*Vol)/(R*T_1);\t\t\t#[mol] - Number of moles\n",
+ "delta_U = n*Cv_0*(T_2-T_1);\t\t\t#[J]\n",
+ "\n",
+ "print \" 1).The change in internal energy for ideal gas behaviour) is %f J\"%(delta_U);\n",
+ "\n",
+ "#(2)\n",
+ "# For van der Walls equation of state \n",
+ "a_O2 = (27*R**(2)*Tc_O2**(2))/(64*Pc_O2);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "a_N2 = (27*R**(2)*Tc_N2**(2))/(64*Pc_N2);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "a_12 = (a_O2*a_N2)**(1./2);\n",
+ "b_O2 = (R*Tc_O2)/(8*Pc_O2);\t\t\t#[m**(3)/mol]\n",
+ "b_N2 = (R*Tc_N2)/(8*Pc_N2);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# For the mixture\n",
+ "a = y1**(2)*a_O2 + y2**(2)*a_N2 + 2*y1*y2*a_12;\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = y1*b_O2 + y2*b_N2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# From the cubic form of van der Walls equation of state\n",
+ "# At 300 K and 300 kPa,\n",
+ "def f1(V): \n",
+ " return V**(3)-(b+(R*T_1)/P_1)*V**(2)+(a/P_1)*V-(a*b)/P_1\n",
+ "V_1 = fsolve(f1,0.1)\n",
+ "V_2 = fsolve(f1,10)\n",
+ "V_3 = fsolve(f1,100)\n",
+ "# The above equation has only 1 real root, other two roots are imaginary\n",
+ "V = V_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Now at P = 330 kPa and at molar volume V\n",
+ "# The van der Walls equation of state is\n",
+ "# (P + a/V**(2))*(V - b) = R*T\n",
+ "T_2_prime = ((P_2 + a/V**(2))*(V - b))/R;\t\t\t#[K]\n",
+ "n_prime = Vol/V;\t\t\t#[mol]\n",
+ "\n",
+ "# Total change in internal energy is given by\n",
+ "# delta_U_prime = n_prime*delta_U_ig + n_prime*(U_R_2 - U_R_1)\n",
+ "# delta_U_prime = n_prime*Cv_0*(T_2_prime - T_1) + n_prime*a(1/V_2 - 1/V_1);\n",
+ "# Since V_1 = V_2 = V, therefore\n",
+ "delta_U_prime = n_prime*Cv_0*(T_2_prime - T_1);\n",
+ "\n",
+ "print \" 2).The change in internal energy for van der Walls equation of state) is %f J\"%(delta_U_prime);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The change in internal energy for ideal gas behaviour) is 4319.220592 J\n",
+ " 2).The change in internal energy for van der Walls equation of state) is 4299.872282 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.25 Page Number : 369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.optimize import fsolve \n",
+ "import math\n",
+ "# Variables\n",
+ "T_1 = 150 + 273.15;\t\t\t#[K] - Initial emperature\n",
+ "T_2 = T_1;\t\t\t# Isothermal process\n",
+ "P_1 = 100.*10**(3);\t\t\t#[Pa] - Initial pressure\n",
+ "P_2 = 450.*10**(3);\t\t\t#[Pa] - Final pressure\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "# For water\n",
+ "Tc = 647.1;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 220.55;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10.**(5);\n",
+ "w = 0.345;\n",
+ "Mol_wt = 18.015;\t\t\t#[g/mol] - Molecular weight of water\n",
+ "Cp_0 = 4.18;\t\t\t#[J/mol-K] - Smath.tan(math.radiansard heat capacity of water\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# In Peng-Robinson equation of state\n",
+ "m = 0.37464 + 1.54226*w - 0.26992*w**(2);\n",
+ "# At T_1 and P_1, we have\n",
+ "Tr = T_1/Tc;\n",
+ "alpha = (1 + m*(1 - Tr**(1./2)))**(2);\n",
+ "a = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Cubuc form of Peng-Robinson equation of stste is given by\n",
+ "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n",
+ "# Solving the cubic equation\n",
+ "def f(V): \n",
+ " return V**(3)+(b-(R*T_1)/P_1)*V**(2)-((3*b**(2))+((2*R*T_1*b)/P_1)-(a/P_1))*V+b**(3)+((R*T_1*(b**(2)))/P_1)-((a*b)/P_1)\n",
+ "V1 = fsolve(f,-1)\n",
+ "V2 = fsolve(f,0)\n",
+ "V3 = fsolve(f,1)\n",
+ "#The largest root is for vapour phase,\n",
+ "#The largest root is only considered as the systemis gas\n",
+ "V_1 = V3;\t\t\t#[m**(3)/mol]\n",
+ "# Thus compressibility factor is\n",
+ "Z_1 = (P_1*V_1)/(R*T_1);\n",
+ "\n",
+ "# At T_2 and P_2, we have\n",
+ "# Cubuc form of Peng-Robinson equation of stste is given by\n",
+ "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n",
+ "# Solving the cubic equation\n",
+ "def f1(V): \n",
+ " return V**(3)+(b-(R*T_2)/P_2)*V**(2)-((3*b**(2))+((2*R*T_2*b)/P_2)-(a/P_2))*V+b**(3)+((R*T_2*(b**(2)))/P_2)-((a*b)/P_2)\n",
+ "V4 = fsolve(f1,-1)\n",
+ "V5 = fsolve(f1,0)\n",
+ "V6 = fsolve(f1,1)\n",
+ "\n",
+ "V_2 = V6;\t\t\t#[m**(3)/mol]\n",
+ "# Thus compressibility factor is\n",
+ "Z_2 = (P_2*V_2)/(R*T_2);\n",
+ "\n",
+ "# In the Peng-Robinson equation of stste\n",
+ "# da/dT = -(a*m)/((alpha*T*Tc)**(1/2))\n",
+ "# The residual enthalpy is given by\n",
+ "# H_R = R*T*(Z-1) + (((T*(da_dT))-a)/(2*2**(1/2)*b))*math.log((Z+(1+2**(1/2)*((P*b)/(R*T))))/(Z+(1-2**(1/2)*((P*b)/(R*T)))))\n",
+ "\n",
+ "# At state 1\n",
+ "da_dT_1 = -(a*m)/((alpha*T_1*Tc)**(1./2));\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "H_R_1 = R*T_1*(Z_1-1) + (((T_1*(da_dT_1))-a)/(2*(2**(1./2))*b))* \\\n",
+ "math.log((Z_1+(1+2**(1./2))*((P_1*b)/(R*T_1)))/(Z_1+(1-2**(1./2))*((P_1*b)/(R*T_1))));\n",
+ "\n",
+ "# At state 2\n",
+ "da_dT_2 = -(a*m)/((alpha*T_2*Tc)**(1/2.));\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "H_R_2 = R*T_2*(Z_2-1) + (((T_2*(da_dT_2))-a)/(2*2**(1./2)* \\\n",
+ "b))*math.log((Z_2+(1+2**(1./2))*((P_2*b)/(R*T_1)))/(Z_2+(1-2**(1./2))*((P_2*b)/(R*T_1))));\n",
+ "\n",
+ "\n",
+ "delta_H = H_R_2 - H_R_1;\t\t\t#[J/mol]\n",
+ "delta_H = delta_H/Mol_wt;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "# The residual entropy relation for a substance following Peng - Robinson equation of state ia\n",
+ "# S_R = R*math.log(Z - (P*b)/(R*T)) + (da_dT/(2*2**(1/2)*b))*math.log((Z+(1+2**(1/2))*((P*b)/(R*T)))/(Z+(1-2**(1/2))*((P*b)/(R*T))))\n",
+ "\n",
+ "# The residual entropy at state 1 is\n",
+ "S_R_1 = R*math.log(Z_1 - (P_1*b)/(R*T_1)) + (da_dT_1/(2*2**(1./2)*b))* \\\n",
+ "math.log((Z_1+(1+2**(1./2))*((P_1*b)/(R*T_1)))/(Z_1+(1-2**(1./2))*((P_1*b)/(R*T_1))));\n",
+ "\n",
+ "# The residual entropy at state 2 is\n",
+ "S_R_2 = R*math.log(Z_2 - (P_2*b)/(R*T_2)) + (da_dT_2/(2*2**(1./2)*b)) \\\n",
+ "*math.log((Z_2+(1+2**(1./2))*((P_2*b)/(R*T_2)))/(Z_2+(1-2**(1./2))*((P_2*b)/(R*T_2))));\n",
+ "\n",
+ "delta_S_R = S_R_2 - S_R_1;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# The ideal gas change in entropy is\n",
+ "delta_S_ig = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# Therefore\n",
+ "delta_S = delta_S_R + delta_S_ig;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# Results\n",
+ "print \" The enthalpy change is given by delta_H = %f kJ/mol\"%(delta_H);\n",
+ "print \" The entropy change is given by delta_S = %f J/mol-K\"%(delta_S);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The enthalpy change is given by delta_H = -11.747722 kJ/mol\n",
+ " The entropy change is given by delta_S = -12.826050 J/mol-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.26 Page Number : 370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.optimize import fsolve \n",
+ "import math\n",
+ "# Variables\n",
+ "Vol = 0.15;\t\t\t#[m**(3)]\n",
+ "T_1 = 170;\t\t\t#[K] - Initial emperature\n",
+ "P_1 = 100;\t\t\t#[bar] - Initial pressure\n",
+ "P_1 = P_1*10**(5);\t\t\t#[Pa]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "# For nitrogen\n",
+ "Tc = 126.2;\t\t\t#[K] - Critical tempeature\n",
+ "Pc = 34;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "w = 0.038;\n",
+ "# Cp_0 = 27.2+4.2*10**(-3)*T\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(1)\n",
+ "# For van der Walls equation of state\n",
+ "a = (27*R**(2)*Tc**(2))/(64*Pc);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The cubic form of van der Walls equation of state is given by,\n",
+ "# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n",
+ "# On simplification the equation changes to\n",
+ "# V**(3) - 1.799*10**(4)*V**(2) + 1.366*10**(-8)*V - 5.269*10**(-13) = 0\n",
+ "\n",
+ "# Solving the cubic equation \n",
+ "def f(V): \n",
+ " return V**(3)-1.799*10**(-4)*V**(2) + 1.366*10**(-8)*V - 5.269*10**(-13)\n",
+ "V1 = fsolve(f,1)\n",
+ "V2 = fsolve(f,10)\n",
+ "V3 = fsolve(f,100)\n",
+ "# The above equation has only 1 real root, other two roots are imagimnary\n",
+ "V_1 = V1;\t\t\t#[m**(3)/mol]\n",
+ "# Thus total number of moles is given by\n",
+ "n_1 = Vol/V_1;\t\t\t#[mol]\n",
+ "\n",
+ "# After 500 mol are withdrawn, the final number of moles is given by\n",
+ "n_2 = n_1 - 500;\t\t\t#[mol]\n",
+ "# Thus molar volume at final state is \n",
+ "V_2 = Vol/n_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The ideal entropy change is guven by\n",
+ "\n",
+ "def f24(T): \n",
+ " return 27.2+4.2*10**(-3)*T\n",
+ "\n",
+ "# delta_S_ig = quad(f24,T_1,T_2) - R*math.log(P_2/P_1)[0]\n",
+ "\n",
+ "# The residual entropy change is given by\n",
+ "# delta_S_R = R*math.log((P_2*(V_2-b))/(R*T_2)) - R*math.log((P_1*(V_1-b))/(R*T_1)) \n",
+ "# delta_S = delta_S_ig = delta_S_R\n",
+ "\n",
+ "def f25(T): \n",
+ " return 27.2+4.2*10**(-3)*T\n",
+ "\n",
+ "# delta_S = quad(f25,T_1,T_2) + R*math.log((V_2-b)/(V_1-b))[0]\n",
+ "\n",
+ "# During discharging delta_S = 0, thus on simplification we get\n",
+ "# 18.886*math.log(T_2) + 4.2*10**(-3)*T_2 - 92.937 = 0\n",
+ "# Solving the above equation we get\n",
+ "def f1(T_2): \n",
+ " return 18.886*math.log(T_2) + 4.2*10**(-3)*T_2 - 92.937\n",
+ "T_2 = fsolve(f1,1)\n",
+ "\n",
+ "# Thus at T_2, \n",
+ "P_2 = (R*T_2)/(V_2-b) - a/V_2**(2);\t\t\t#[N/m**(2)]\n",
+ "P_2 = P_2*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "print \" 1).The final temperature is %f K\"%(T_2);\n",
+ "print \" The final pressure is %f bar\"%(P_2);\n",
+ "\n",
+ "#(2)\n",
+ "# In Peng-Robinson equation of state\n",
+ "m = 0.37464 + 1.54226*w - 0.26992*w**(2);\n",
+ "# At T_1 and P_1, we have\n",
+ "Tr = T_1/Tc;\n",
+ "alpha = (1 + m*(1 - Tr**(1./2)))**(2);\n",
+ "a_2 = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b_2 = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Cubuc form of Peng-Robinson equation of stste is given by\n",
+ "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n",
+ "# Solving the cubic equation\n",
+ "def f2(V): \n",
+ " return V**(3)+(b_2-(R*T_1)/P_1)*V**(2)-((3*b_2**(2))+((2*R*T_1*b_2)/P_1)-(a_2/P_1))*V+b_2**(3)+((R*T_1*(b_2**(2)))/P_1)-((a_2*b_2)/P_1)\n",
+ "V4 = fsolve(f2,-1)\n",
+ "V5 = fsolve(f2,0)\n",
+ "V6 = fsolve(f2,0.006)\n",
+ "#The above equation has only 1 real root,the other two roots are imaginary\n",
+ "V_1_2 = V6;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The number of moles in the initial state is given by\n",
+ "n_1_2 = Vol/V_1_2;\t\t\t#[mol]\n",
+ "# After 500 mol are withdrawn, the final number of moles is given by\n",
+ "n_2_2 = n_1_2 - 500;\t\t\t#[mol]\n",
+ "# Thus molar volume at final state is \n",
+ "V_2_2 = Vol/n_2_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# At the final state the relation between pressure and temperature is\n",
+ "# P_2_2 = (R*T_2_2)/(V_2_2-b_2) - a_2/V_2_2**(2)\n",
+ "# P_2_2 = 7.23*10**(4)*T_2 - 3.93*10**(7)*a_2\n",
+ "\n",
+ "# Now let us calculate the residual entropy at initial state\n",
+ "Z_1 = (P_1*V_1_2)/(R*T_1);\n",
+ "da_dT_1 = -(a*m)/((alpha*T_1*Tc)**(1./2));\t\t\t#[Pa*m**(6)/mol**(2)] - da/dT\n",
+ "\n",
+ "# The residual entropy change for Peng-Robinson equatiob of state is given by\n",
+ "# S_R = R*math.log(Z-(P*b)/(R*T)) + (da_dT/(2*2**(1/2)*b))*math.log((V+(1+2**(1/2))*b))/((V+(1-2**(1/2)*b))));\n",
+ "S_R_1 = R*(math.log(Z_1-(P_1*b_2)/(R*T_1))) + (da_dT_1/(2*2**(1.2)*b_2))*(math.log((V_1_2+(1+2**(1./2))*b_2)/(V_1_2+(1-2**(1./2))*b_2)));\n",
+ "\n",
+ "# The total entropy change is given by\n",
+ "# delta_S = delta_S_ig + delta_S_R\n",
+ "\n",
+ "def f26(T): \n",
+ " return 27.2+4.2*10**(-3)*T\n",
+ "\n",
+ "# where, delta_S_ig = quad(f26,T_1,T_2_2) - R*math.log(P_2_2/P_1)[0]\n",
+ "\n",
+ "# and, P_2_2 = (R*T_2_2)/(V_2_2-b_2) - a_2/V_2_2**(2)\n",
+ "# On simplification we get\n",
+ "# delta_S = 27.2*math.log(T_2_2-T_1) + 4.2*10**(-3)*(T_2_2-T_1) - R*math.log(P_2_2/P_1) + R*math.log(Z_2-(P_2_2*b)/(R*T_2_2)) + 6226*(da_dT_2) + 9.22\n",
+ "\n",
+ "# Now we have the determine the value of T_2_2 such that delta_S = 0\n",
+ "# Starting with a temperature of 150 K\n",
+ "T_prime = 100.;\t\t\t#[K]\n",
+ "error = 10.;\n",
+ "while(error>0.1):\n",
+ " Tr_prime = T_prime/Tc;\n",
+ " alpha_prime = (1 + m*(1 - Tr_prime**(1./2)))**(2);\n",
+ " a_prime = ((0.45724*(R*Tc)**(2))/Pc)*alpha_prime;\n",
+ " P_prime = 7.23*10**(4)*T_prime - 3.93*10**(7)*a_prime;\n",
+ " Z_prime = (P_prime*V_2_2)/(R*T_prime);\n",
+ " da_dT_prime = -(a_prime*m)/((alpha_prime*T_prime*Tc)**(1./2));\n",
+ " delta_S = 27.2*math.log(T_prime/T_1) + 4.2*10**(-3)*(T_prime-T_1) - R*math.log(P_prime/P_1) + R*math.log(Z_prime-((P_prime*b_2)/(R*T_prime))) + 6226*(da_dT_prime) + 9.22;\n",
+ " error=abs(delta_S);\n",
+ " T_prime = T_prime + 0.3;\n",
+ "\n",
+ "T_2_2 = T_prime;\t\t\t#[K] - Final temperature\n",
+ "P_2_2 = P_prime*10**(-5);\t\t\t#[bar] - Final pressure\n",
+ "\n",
+ "print \" 2).The final temperature is %f K\"%(T_2_2);\n",
+ "print \" The final pressure is %f bar\"%(P_2_2);\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The final temperature is 133.131844 K\n",
+ " The final pressure is 39.636659 bar\n",
+ " 2).The final temperature is 134.200000 K\n",
+ " The final pressure is 40.130674 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.27 Page Number : 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.optimize import fsolve \n",
+ "import math\n",
+ "# Variables\n",
+ "T = 373.15;\t\t\t#[K]\n",
+ "Tc = 562.16;\t\t\t#[K]\n",
+ "Pc = 48.98;\t\t\t#[bar]\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n",
+ "\n",
+ "# The cubic form of Redlich Kwong equation of state is given by,\n",
+ "# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n",
+ "\n",
+ "# Calculations\n",
+ "a = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# At 373.15 K, let us assume the pressure to be 2.5 bar and under these conditions \n",
+ "P_1 = 2.5;\t\t\t#[bar]\n",
+ "P_1 = P_1*10**(5);\t\t\t#[bar]\n",
+ "\n",
+ "# Putting the values in Redlich Kwong equation of state, the equation becomes\n",
+ "# V**(3) - 0.0124*V**(2) + 8.326*10**(-6)*V - 7.74*10**(-10) = 0\n",
+ "# Solving the cubic equation\n",
+ "\n",
+ "def f(V): \n",
+ " return V**(3) - 0.0124*V**(2) + 8.326*10**(-6)*V - 7.74*10**(-10)\n",
+ "V1=fsolve(f,-9)\n",
+ "V2=fsolve(f,10)\n",
+ "V3=fsolve(f,0.1)\n",
+ "# The largest root and the smallest root is considered for liquid phase and vapour phase respectively.\n",
+ "V_liq = V1;\t\t\t#[m**(3)/mol] - Molar volume in liquid phase\n",
+ "V_vap = V3;\t\t\t#[m**(3)/mol] - Molar volume in vapour phase\n",
+ "\n",
+ "# Let us calculate the fugacity of vapour phase\n",
+ "# math.log(f_vap/P) = b/(V-b) + math.log((R*T)/(P*(V-b))) - (a/(R*T**(1.5)))*(1/(V+b) - (1/b)*math.log(V/(V+b)))\n",
+ "f_vap = P_1*math.exp(b/(V_vap-b) + math.log((R*T)/(P_1*(V_vap-b))) - (a/(R*T**(1.5)))*(1/(V_vap+b) - (1/b)*math.log(V_vap/(V_vap+b))));\t\t\t#[Pa]\n",
+ "\n",
+ "# Let us calculate the fugacity of the liquid phase\n",
+ "f_liq = P_1*math.exp(b/(V_liq-b) + math.log((R*T)/(P_1*(V_liq-b))) - (a/(R*T**(1.5)))*(1/(V_liq+b) - (1/b)*math.log(V_liq/(V_liq+b))));\n",
+ "\n",
+ "\n",
+ "# The two fugacities are not same; therefore another pressure is to be assumed. The new pressure is\n",
+ "P_new = P_1*(f_liq/f_vap);\t\t\t#[Pa]\n",
+ "\n",
+ "# At P_new\n",
+ "def f1(V): \n",
+ " return V**(3) - ((R*T)/P_new)*V**(2) - (b**(2) + ((b*R*T)/P_new) - a/(T**(1/2)*P_new))*V - (a*b)/(T**(1/2)*P_new)\n",
+ "V4=fsolve(f1,-9)\n",
+ "V5=fsolve(f1,10)\n",
+ "V6=fsolve(f1,0.1)\n",
+ "# The largest root and the smallest root is considered for liquid phase and vapour phase respectively.\n",
+ "V_liq_2 = V4;\t\t\t#[m**(3)/mol] - Molar volume in liquid phase\n",
+ "V_vap_2 = V6;\t\t\t#[m**(3)/mol] - Molar volume in vapour phase\n",
+ "\n",
+ "f_vap_prime = P_new*math.exp(b/(V_vap_2-b) + math.log((R*T)/(P_new*(V_vap_2-b))) - (a/(R*T**(1.5)))*(1/(V_vap_2+b) - (1/b)*math.log(V_vap_2/(V_vap_2+b))));\t\t\t#[Pa]\n",
+ "f_liq_prime = P_new*math.exp(b/(V_liq_2-b) + math.log((R*T)/(P_new*(V_liq_2-b))) - (a/(R*T**(1.5)))*(1/(V_liq_2+b) - (1/b)*math.log(V_liq_2/(V_liq_2+b))));\n",
+ "\n",
+ "# Since the fugacities of liquid and vapour phasesare almost same the assumed pressure may be taken as vapour pressure at 373.15 K\n",
+ "P_new = P_new*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "# Results\n",
+ "print \" The vapour pressure of benzene using Redlich Kwong equation of state is %f bar\"%(P_new);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The vapour pressure of benzene using Redlich Kwong equation of state is 2.666995 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.28 Page Number : 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.optimize import fsolve \n",
+ "import math\n",
+ "# Variables\n",
+ "T = 150 + 273.15;\t\t\t#[K]\n",
+ "Tc = 647.1;\t\t\t#[K]\n",
+ "Pc = 220.55;\t\t\t#[bar]\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "w = 0.345;\n",
+ "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n",
+ "\n",
+ "# Let us assume a pressure of 100 kPa.\n",
+ "P_1 = 100.*10**(3);\t\t\t#[Pa]\n",
+ "\n",
+ "# Calculations\n",
+ "# At 100 kPa and 423.15 K, from Peng-Robinson equation of stste \n",
+ "m = 0.37464 + 1.54226*w - 0.26992*w**(2);\n",
+ "Tr = T/Tc;\n",
+ "alpha = (1 + m*(1 - Tr**(1./2)))**(2);\n",
+ "a = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "# Cubic form of Peng-Robinson equation of stste is given by\n",
+ "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n",
+ "# Solving the cubic equation\n",
+ "def f(V): \n",
+ " return V**(3)+(b-(R*T)/P_1)*V**(2)-((3*b**(2))+((2*R*T*b)/P_1)-(a/P_1))*V+b**(3)+((R*T*(b**(2)))/P_1)-((a*b)/P_1)\n",
+ "V1 = fsolve(f,-1)\n",
+ "V2 = fsolve(f,0)\n",
+ "V3 = fsolve(f,1)\n",
+ "# The largest root and the smallest root is considered for liquid phase and vapour phase respectively.\n",
+ "V_liq = V1;\t\t\t#[m**(3)/mol] - Molar volume in liquid phase\n",
+ "V_vap = V3;\t\t\t#[m**(3)/mol] - Molar volume in vapour phase\n",
+ "\n",
+ "# The compressibility factor is given by\n",
+ "Z_vap = (P_1*V_vap)/(R*T);\t\t\t# For liquid phase\n",
+ "Z_liq = (P_1*V_liq)/(R*T);\t\t\t# For vapour phase\n",
+ "\n",
+ "# The math.expression for fugacity of Peng Robinson equation is\n",
+ "# math.log(f/P) = (Z-1) - math.log(Z-((P*b)/(R*T))) - (a/(2*2**(1/2)*b*R*T))*math.log((Z+(1+2**(1/2))*((P*b)/(R*T)))/((Z+(1-2**(1/2))*((P*b)/(R*T)))\n",
+ "# For vapour phase\n",
+ "f_P_vap = math.exp((Z_vap-1) - math.log(Z_vap-((P_1*b)/(R*T))) - (a/(2*2**(1./2)*b*R*T))*math.log((Z_vap+(1+2**(1./2))*((P_1*b)/(R*T)))/(Z_vap+(1-2**(1./2))*((P_1*b)/(R*T)))));\n",
+ "# For liquid phase\n",
+ "f_P_liq = math.exp((Z_liq-1) - math.log(Z_liq-((P_1*b)/(R*T))) - (a/(2*2**(1./2)*b*R*T))*math.log((Z_liq+(1+2**(1./2))*((P_1*b)/(R*T)))/(Z_liq+(1-2**(1./2))*((P_1*b)/(R*T)))));\n",
+ "\n",
+ "# Therefore f_liq/f_vap can be calculated as\n",
+ "fL_fV = (f_P_liq/f_P_vap);\n",
+ "\n",
+ "# The two values (f/P)_vap and (f/P)_vap are not same [ (f_P_liq/f_P_vap) >1 ]; therefore another pressure is to be assumed. The new pressure be\n",
+ "P_new = P_1*(f_P_liq/f_P_vap);\t\t\t#[Pa]\n",
+ "\n",
+ "# At P_new and 423.15 K, from Peng-Robinson equation of stste \n",
+ "\n",
+ "# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n",
+ "# Solving the cubic equation\n",
+ "def f(V): \n",
+ " return V**(3)+(b-(R*T)/P_new)*V**(2)-((3*b**(2))+((2*R*T*b)/P_new)-(a/P_new))*V+b**(3)+((R*T*(b**(2)))/P_new)-((a*b)/P_new)\n",
+ "V4 = fsolve(f,-1)\n",
+ "V5 = fsolve(f,0)\n",
+ "V6 = fsolve(f,1)\n",
+ "# The largest root and the smallest root is considered for liquid phase and vapour phase respectively.\n",
+ "V_liq_2 = V4;\t\t\t#[m**(3)/mol] - Molar volume in liquid phase\n",
+ "V_vap_2 = V6;\t\t\t#[m**(3)/mol] - Molar volume in vapour phase\n",
+ "\n",
+ "# The compressibility factor is given by\n",
+ "Z_vap_2 = (P_new*V_vap_2)/(R*T);\t\t\t# For liquid phase\n",
+ "Z_liq_2 = (P_new*V_liq_2)/(R*T);\t\t\t# For vapour phase\n",
+ "\n",
+ "# For vapour phase\n",
+ "f_P_vap_2 = math.exp((Z_vap_2-1) - math.log(Z_vap_2-((P_new*b)/(R*T))) - (a/(2*2**(1./2)*b*R*T))*math.log((Z_vap_2+(1+2**(1./2))*((P_new*b)/(R*T)))/(Z_vap_2+(1-2**(1./2))*((P_new*b)/(R*T)))));\n",
+ "# For liquid phase\n",
+ "f_P_liq_2 = math.exp((Z_liq_2-1) - math.log(Z_liq_2-((P_new*b)/(R*T))) - (a/(2*2**(1./2)*b*R*T))*math.log((Z_liq_2+(1+2**(1./2))*((P_new*b)/(R*T)))/(Z_liq_2+(1-2**(1./2))*((P_new*b)/(R*T)))));\n",
+ "\n",
+ "# Therefore f_liq/f_vap can be calculated as\n",
+ "fL_fV_2 = (f_P_liq_2/f_P_vap_2);\n",
+ "\n",
+ "# And new pressure is given by\n",
+ "P_new_prime = P_new*(f_P_liq_2/f_P_vap_2);\t\t\t#[Pa]\n",
+ "P_new_prime = P_new_prime*10**(-5);\n",
+ "\n",
+ "# Since the change in pressure is small, so we can take this to be the vapour pressure at 150 C\n",
+ "\n",
+ "# Results\n",
+ "print \" The vapour pressure of water using Peng-Robinson equation of stste is %f bar\"%(P_new_prime);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The vapour pressure of water using Peng-Robinson equation of stste is 4.675976 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch11_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch11_1.ipynb new file mode 100755 index 00000000..0d56d5ca --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch11_1.ipynb @@ -0,0 +1,320 @@ +{
+ "metadata": {
+ "name": "ch11_1",
+ "signature": "sha256:ea5fa2ce45062851dc4892fcc5b621c33d72fa0443d476b1ef4133dade9e39b0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 : Properties of a Component in a Mixture"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page Number : 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "Vol_total = 3;\t\t\t#[m**(3)] - Total volume of solution\n",
+ "x_ethanol = 0.6;\t\t\t#Mole fraction of ethanol\n",
+ "x_water = 0.4;\t\t\t#Mole fraction of water\n",
+ "\n",
+ "# Calculations\n",
+ "#The partial molar volumes of the components in the mixture are\n",
+ "V_ethanol_bar = 57.5*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "V_water_bar = 16*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "#The molar volumes of the pure components are\n",
+ "V_ethanol = 57.9*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "V_water = 18*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "#The molar volume of the solution is\n",
+ "V_sol = x_ethanol*V_ethanol_bar + x_water*V_water_bar;\t\t\t#[m**(3)/mol]\n",
+ "#Total number of moles can be calculated as \n",
+ "n_total = Vol_total/V_sol;\t\t\t#[mol]\n",
+ "\n",
+ "#Moles of the components are\n",
+ "n_ethanol = n_total*x_ethanol;\t\t\t#[mol]\n",
+ "n_water = n_total*x_water;\t\t\t#[mol]\n",
+ "\n",
+ "#Finally the volume of the pure components required can be calculated as\n",
+ "Vol_ethanol = V_ethanol*n_ethanol;\n",
+ "Vol_water = V_water*n_water;\n",
+ "\n",
+ "# Results\n",
+ "print \"Required volume of ethanol is %f cubic metre\"%(Vol_ethanol);\n",
+ "print \"Required volume of water is %f cubic metre\"%(Vol_water);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required volume of ethanol is 2.548166 cubic metre\n",
+ "Required volume of water is 0.528117 cubic metre\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page Number : 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "# Variables\n",
+ "T = 25+273.15;\t\t\t#[K] - Temperature\n",
+ "P = 1;\t\t\t#[atm]\n",
+ "#Component 1 = water\n",
+ "#component 2 = methanol\n",
+ "a = -3.2;\t\t\t#[cm**(3)/mol] - A constant\n",
+ "V2 = 40.7;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2 (methanol)\n",
+ "#V1_bar = 18.1 + a*x_2**(2)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#From Gibbs-Duhem equation at constant temperature and pressure we have\n",
+ "#x_1*dV1_bar + x_2*dV2_bar = 0\n",
+ "#dV2_bar = -(x_1/x_2)*dV1_bar = -(x_1/x_2)*a*2*x_2*dx_2 = -2*a*x_1*dx_2 = 2*a*x_1*dx_1\n",
+ "\n",
+ "#At x_1 = 0: x_2 = 1 and thus V2_bar = V2\n",
+ "#Integrating the above equation from x_1 = 0 to x_1 in the RHS, and from V2_bar = V2 to V2 in the LHS, we get\n",
+ "#V2_bar = V2 + a*x_1**(2) - Molar volume of component 2(methanol) in the mixture \n",
+ "\n",
+ "print \"The expression for the partial molar volume of methanol2 isV2_bar = V2 + a*x_1**2 [cm**3/mol]\";\n",
+ "\n",
+ "#At infinite dilution, x_2 approach 0 and thus x_1 approach 1, therefore\n",
+ "x_1 = 1;\t\t\t# Mole fraction of component 1(water) at infinite dilution\n",
+ "V2_bar_infinite = V2 + a*(x_1**(2));\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "print \"The partial molar volume of methanol at infinite dilution is %f cm**3/mol\"%(V2_bar_infinite);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The expression for the partial molar volume of methanol2 isV2_bar = V2 + a*x_1**2 [cm**3/mol]\n",
+ "The partial molar volume of methanol at infinite dilution is 37.500000 cm**3/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page Number : 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "#H = a*x_1 + b*x_2 +c*x_1*x_2\n",
+ "\n",
+ "#The values of the constants are\n",
+ "a = 15000;\t\t\t#[J/mol]\n",
+ "b = 20000;\t\t\t#[J/mol]\n",
+ "c = -2000;\t\t\t#[J/mol]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(1)\n",
+ "#Enthalpy of pure component 1 = H1 is obtained at x_2 = 0, thus \n",
+ "x_2 = 0;\n",
+ "x_1 = 1;\n",
+ "H1 = a*x_1 + b*x_2 +c*x_1*x_2;\t\t\t#[J/mol]\n",
+ "print \"a).The enthalpy of pure component 1 is %f J/mol\"%(H1);\n",
+ "\n",
+ "#Similarly for component 2,\n",
+ "#Enthalpy of pure component 2 = H2 is obtained at x_1 = 0, thus \n",
+ "x_1_prime = 0;\n",
+ "x_2_prime = 1;\n",
+ "H2 = a*x_1_prime + b*x_2_prime +c*x_1_prime*x_2_prime;\t\t\t#[J/mol]\n",
+ "print \" The enthalpy of pure component 2 is %f J/mol\"%(H2);\n",
+ "\n",
+ "\n",
+ "#(c)\n",
+ "#From part (b), we have the relation\n",
+ "#H1_bar = a + c*(x_2**(2))\n",
+ "#H2_bar = b + c*(x_1**(2))\n",
+ "\n",
+ "#For enthalpy of component 1 at infinite dilution, x_1 approach 0 and thus x_2 approach 1, therefore\n",
+ "x_1_c = 0;\n",
+ "x_2_c = 1;\n",
+ "H1_infinite = a + c*(x_2_c**(2));\t\t\t#[cm**(3)/mol]\n",
+ "print \"C).The enthalpy of componenet 1 at infinite dilution at x_1 = 0) is %f J/mol\"%(H1_infinite);\n",
+ "\n",
+ "#At x_1 = 0.2\n",
+ "x_1_c1 = 0.2;\n",
+ "x_2_c1 = 0.8;\n",
+ "H1_bar_c1 = a + c*(x_2_c1**(2));\t\t\t#[J/mol]\n",
+ "print \" The enthalpy of componenet 1 at at x_1 = 0.2) is %f J/mol\"%(H1_bar_c1);\n",
+ "\n",
+ "#At x_1 = 0.8\n",
+ "x_1_c2 = 0.8;\n",
+ "x_2_c2 = 0.2;\n",
+ "H1_bar_c2 = a + c*(x_2_c2**(2));\t\t\t#[J/mol]\n",
+ "print \" The enthalpy of componenet 1 at at x_1 = 0.8) is %f J/mol\"%(H1_bar_c2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a).The enthalpy of pure component 1 is 15000.000000 J/mol\n",
+ " The enthalpy of pure component 2 is 20000.000000 J/mol\n",
+ "C).The enthalpy of componenet 1 at infinite dilution at x_1 = 0) is 13000.000000 J/mol\n",
+ " The enthalpy of componenet 1 at at x_1 = 0.2) is 13720.000000 J/mol\n",
+ " The enthalpy of componenet 1 at at x_1 = 0.8) is 14920.000000 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.9 Page Number : 395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "# Variables\n",
+ "n = 1*10**(3);\t\t\t#[mol] - No of moles\n",
+ "P = 0.1;\t\t\t#[MPa] - Pressure of the surrounding\n",
+ "T = 300;\t\t\t#[K] - Temperature of the surrounding\n",
+ "x_1 = 0.79;\t\t\t#Mole fraction of N2 in the air\n",
+ "x_2 = 0.21;\t\t\t#Mole fraction of O2 in the air\n",
+ "R=8.314;\t\t\t#[J/mol*K]\n",
+ "\n",
+ "# Calculations\n",
+ "#Change in availability when x_1 moles of component 1 goes from pure state to that in the mixture is\n",
+ "#x_1*(si_1 - si_2) = x_1*[H1 - H1_bar - T_0*(S1 - S1_bar)]\n",
+ "#Similarly change in availability of x_2 moles of component 2 is\n",
+ "#x_2*(si_1 - si_2) = x_2*[H2 - H2_bar - T_0*(S2 - S2_bar)]\n",
+ "\n",
+ "#and thus total availability change when 1 mol of mixture is formed from x_1 mol of component 1 and x_2 mol of component 2 is equal to reversible work\n",
+ "#W_rev = x_1*[H1 - H1_bar - T_0*(S1 - S1_bar)] + x_2*[H2 - H2_bar - T_0*(S2 - S2_bar)]\n",
+ "#W_rev = -[delta_H_mix] +T_0*[delta_S_mix]\n",
+ "\n",
+ "#If T = T_0 that is,temperature of mixing is same as that of surroundings, W_rev = -delta_G_mix.\n",
+ "#W_rev = -delta_G_mix = R*T*(x_1*math.log(x_1) + x_2*math.log(x_2))\n",
+ "W_rev = R*T*(x_1*math.log(x_1) + x_2*math.log(x_2));\t\t\t#[J/mol]\n",
+ "\n",
+ "#Therefore total work transfer is given by\n",
+ "W_min = (n*W_rev)/1000;\t\t\t#[kJ]\n",
+ "\n",
+ "# Results\n",
+ "print \"The minimum work required is %f kJ\"%(W_min);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum work required is -1281.910728 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.10 Page Number : 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "# Variables\n",
+ "x_A = 0.20;\t\t\t# Mole fraction of A\n",
+ "x_B = 0.35;\t\t\t# Mole fraction of B\n",
+ "x_C = 0.45;\t\t\t# Mole fraction of C\n",
+ "\n",
+ "phi_A = 0.7;\t\t\t# Fugacity coefficient of A\n",
+ "phi_B = 0.6;\t\t\t# Fugacity coefficient of B\n",
+ "phi_C = 0.9;\t\t\t# Fugacity coefficient of C\n",
+ "\n",
+ "P = 6.08;\t\t\t#[MPa] - Pressure\n",
+ "T = 384;\t\t\t#[K] - Temperature\n",
+ "\n",
+ "# Calculations\n",
+ "#We know that\n",
+ "#math.log(phi) = x_1*math.log(phi_) + x_2*math.log(phi_2) + x_3*math.log(phi_3)\n",
+ "math.log_phi = x_A*math.log(phi_A) + x_B*math.log(phi_B) + x_C*math.log(phi_C);\t\t\t# Fugacity coefficient\n",
+ "phi = math.exp(math.log_phi);\n",
+ "\n",
+ "#Thus fugacity is given by,\n",
+ "f_mixture = phi*P;\t\t\t#[MPa]\n",
+ "\n",
+ "# Results\n",
+ "print \"The fugacity of the mixture is %f MPa\"%(f_mixture);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fugacity of the mixture is 4.515286 MPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch12_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch12_1.ipynb new file mode 100755 index 00000000..2d5ee204 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch12_1.ipynb @@ -0,0 +1,503 @@ +{
+ "metadata": {
+ "name": "ch12_1",
+ "signature": "sha256:acb0234cca7ef04cf2e231ae1d04809101d746587fbd14cf847d456347c563ea"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12 : Partial Molar Volume and Enthalpy from Experimental Data "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.1 Page Number : 419"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "import math \n",
+ "from numpy import *\n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T = 0 + 273.15;\t\t\t#[K] - Temperature\n",
+ "P = 1;\t\t\t#[atm] - Pressure\n",
+ "x_methanol = 0.5;\t\t\t#Mole fraction of methanol at which molar volume is to be calculated\n",
+ "x_water = 0.5;\t\t\t#Mole fraction at which molar volume is to be calculated\n",
+ "\n",
+ "#V = V1 at x1 = 1 and V = V2 at x1 = 0, therefore\n",
+ "V1 = 40.7;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1\n",
+ "V2 = 18.1;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2\n",
+ "from numpy import zeros,linalg\n",
+ "x1=[0.114,0.197,0.249,0.495,0.692,0.785,0.892];\t\t\t# Values of mole fraction of component 1\n",
+ "V=[20.3,21.9,23.0,28.3,32.9,35.2,37.9];\t\t\t# Values of molar volume\n",
+ "x2=zeros(7);\t\t\t# Mole fraction of component 2\n",
+ "x_V=zeros(7);\t\t\t# x_V = x1*V_1 + x2*V_2\n",
+ "V_mix=zeros(7);\t\t\t# V_mix = V - x1*V_1 - x2*V_2\n",
+ "del_V=zeros(7);\t\t\t#del_V = V_mix/(x1*x2)\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(7):\n",
+ " x2[i]=1-x1[i];\n",
+ " x_V[i]=x1[i]*V1 + x2[i]*V2;\n",
+ " V_mix[i]=V[i]-x1[i]*V1- x2[i]*V2;\n",
+ " del_V[i]=V_mix[i]/(x1[i]*x2[i]);\n",
+ "\n",
+ "x1 = array(x1)\n",
+ "\t\t\t#From the matrix method to solve simultaneous linear equations, we have\n",
+ "a=array([[7, sum(x1), sum(x1**2)],[sum(x1), sum(x1**2), sum(x1**3)],[sum(x1**2), sum(x1**3), sum(x1**4)]])\n",
+ "b=array([sum(del_V),sum(x1*del_V),sum((x1**2)*del_V)])\n",
+ "\n",
+ "soln=linalg.solve(a,b);\n",
+ "\n",
+ "a0=soln[0]\n",
+ "a1=soln[1]\n",
+ "a2=soln[2]\n",
+ "#del_V = V_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2)\n",
+ "#V_mix = (a0 + a1*x1 + a2*x1**(2))*(x1*(1 - x1))\n",
+ "# For x1 = 0.5\n",
+ "x1 = 0.5;\n",
+ "V_mix_prime = (a0+(a1*x1)+(a2*x1**2))*(x1*(1-x1));\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "#Now differentiating the above equation with respect to x we get\n",
+ "#d/dx(V_mix) = (-4*a2*x1**3) + (3*(a2-a1)*x1**2) + (2*(a1-a0)*x1)+ a0\n",
+ "#Again for x1 = 0.5\n",
+ "x1_prime = 0.5;\n",
+ "del_V_mix_prime = (-4*a2*x1_prime**3)+(3*(a2-a1)*x1_prime**2)+(2*(a1-a0)*x1_prime)+a0;\n",
+ "\n",
+ "#Finally,calculating the partial molar volumes\n",
+ "V1_bar = V1 + V_mix_prime + x_water*del_V_mix_prime;\t\t\t#[cm**(3)/mol] \n",
+ "V2_bar = V2 + V_mix_prime - x_methanol*del_V_mix_prime;\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \"The partial molar volume of methanol component 1) is %f cm**3)/mol\"%(V1_bar);\n",
+ "print \"The partial molar volume of water component 2) is %f cm**3)/mol\"%(V2_bar);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The partial molar volume of methanol component 1) is 39.721188 cm**3)/mol\n",
+ "The partial molar volume of water component 2) is 17.079639 cm**3)/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.2 Page Number : 421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "#component 1 = water\n",
+ "#component 2 = methanol\n",
+ "T = 25 + 273.15;\t\t\t#[K] - Temperature\n",
+ "\n",
+ "#delta_V_mix = x_1*x_2*(-3.377 - 2.945*x_1 + 3.31*x_1**(2))\n",
+ "V1 = 18.0684;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1\n",
+ "V2 = 40.7221;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2\n",
+ "Vol_1 = 1000;\t\t\t#[cm**(3)] - Volume of pure component 1\n",
+ "Vol_2 = 1000;\t\t\t#[cm**(3)] - Volume of pure component 2\n",
+ "\n",
+ "# Calculations\n",
+ "#Moles of the componenets can be calculated as \n",
+ "n_1 = round(Vol_1/V1,4);\t\t\t#[mol]\n",
+ "n_2 = round(Vol_2/V2,4);\t\t\t#[mol]\n",
+ "\n",
+ "#Mole fraction of the components \n",
+ "x_1 = round(n_1/(n_1 + n_2),4);\n",
+ "x_2 = round(n_2/(n_1 + n_2),4);\n",
+ "\n",
+ "delta_V_mix = round(x_1*x_2*(-3.377 - 2.945*x_1 + 3.31*x_1**(2)),4);\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "#Differentiating the above equation, we get\n",
+ "#d/dx(delta_V_mix) = (1 - 2*x_1)*(-3.377 - 2.945*x_1 + 3.31*x_1**(2)) + (x_1 - x_1**(2))*(-2.945 + 6.62*x_1)\n",
+ "del_delta_V_mix = round((1 - 2*x_1)*(-3.377 - 2.945*x_1 + 3.31*x_1**(2)) + (x_1 - x_1**(2))*(-2.945 + 6.62*x_1),4);\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "#Now calculating the partial molar volumes\n",
+ "V1_bar = V1 + delta_V_mix + x_2*del_delta_V_mix;\t\t\t#[cm**(3)/mol] \n",
+ "V2_bar = V2 + delta_V_mix - x_1*del_delta_V_mix;\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "print del_delta_V_mix, V1_bar, V2_bar\n",
+ "#Finally molar volume of the solution is given by\n",
+ "V_sol = x_1*V1_bar + x_2*V2_bar;\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "# Total volume of the solution is given by\n",
+ "V_total = (n_1 + n_2)*V_sol;\t\t\t#[cm**(3)]\n",
+ "\n",
+ "# Results\n",
+ "print \"The molar volume of the solution is %.4f cm**3)/mol\"%(V_sol);\n",
+ "print \"The total volume of the solution is %.2f cm**3)\"%(V_total);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1.8248 17.81416104 38.64306104\n",
+ "The molar volume of the solution is 24.2149 cm**3)/mol\n",
+ "The total volume of the solution is 1934.82 cm**3)\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.3 Page Number : 422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ " \n",
+ "\n",
+ "Vol = 20;\t\t\t#[cm**(3)] - Volume of the solution\n",
+ "T = 22 + 273.15;\t\t\t#[K] - Temperature\n",
+ "W_bottle = 11.5485;\t\t\t#[g] - Weight of density bottle\n",
+ "Mol_meth = 32.04;\t\t\t#Molecular weight of methanol\n",
+ "Mol_water = 18.015;\t\t\t# Molecular weight of water\n",
+ "\n",
+ "#Density of pure components can be found out at 0% and 100% of volume percent.\n",
+ "den_meth = 0.7929;\t\t\t#[cm**(3)/mol] - Density of pure methanol\n",
+ "den_water = 0.9937;\t\t\t#[cm**(3)/mol] - Density of pure water\n",
+ "\n",
+ "\n",
+ "Vol_perc=[5,10,20,30,40,50,60,70,80,90,95];\t\t\t# Volumes percent of component 1 (methanol)\n",
+ "W_total=[31.2706,31.1468,30.8907,30.6346,30.3396,30.0053,29.5865,29.1453,28.5978,28.0325,27.7320];\t\t\t# Weight of solution + weight of density bottle\n",
+ "\n",
+ "W_sol=zeros(11);\t\t\t# Weight of 20 cm**(3) of solution\n",
+ "den=zeros(11);\t\t\t# density of the solution\n",
+ "x1=zeros(11);\t\t\t# Mole fraction of methanol\n",
+ "x2=zeros(11);\t\t\t# Mole fraction of water\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(11):\n",
+ " W_sol[i]=W_total[i]-W_bottle;\n",
+ " den[i]=W_sol[i]/Vol;\n",
+ " x1[i]=((Vol_perc[i]*den_meth)/Mol_meth)/(((Vol_perc[i]*den_meth)/Mol_meth)+(((100-Vol_perc[i])*den_water)/Mol_water));\n",
+ " x2[i]=1-x1[i];\n",
+ "\n",
+ "\n",
+ "#Again we have,\n",
+ "V_kg=zeros(11);\t\t\t#[cm**(3)] - Volume of 1 kg of solution\n",
+ "n_mol=zeros(11);\t\t\t#[mol] - Number of moles in 1 kg of solution\n",
+ "V_mol=zeros(11);\t\t\t#[cm**(3)/mol] - Volume of 1 mol of solution\n",
+ "x_V=zeros(11);\t\t\t#[cm**(3)/mol] - x_V = x1*V_meth + x2*V_water\n",
+ "V_mix=zeros(11);\t\t\t#[cm**(3)/mol] - V_mix = V_mol - x1*V_meth - x2*V_water\n",
+ "del_V=zeros(11);\t\t\t# [cm**(3)/mol] - del_V = V_mix/(x1*x2)\n",
+ "\n",
+ "#V_mol = V_meth at x1 = 1 and V_mol = V_water at x1 = 0, therefore\n",
+ "V_meth = 40.4114;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1 (methanol)\n",
+ "V_water = 18.1286;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2 (water)\n",
+ "\n",
+ "for i in range(11):\n",
+ " V_kg[i]=1000/den[i];\n",
+ " n_mol[i]=1000/(x1[i]*Mol_meth+x2[i]*Mol_water);\n",
+ " V_mol[i]=V_kg[i]/n_mol[i];\n",
+ " x_V[i]=V_meth*x1[i]+V_water*x2[i];\n",
+ " V_mix[i]=V_mol[i]-x1[i]*V_meth-x2[i]*V_water;\n",
+ " del_V[i]=V_mix[i]/(x1[i]*x2[i]);\n",
+ "\n",
+ "#Now employing the concept of quadratic regression of the data ( x1 , del_V ) to solve the equation of the type\n",
+ "#y = a0 + a1*x + a2*x**(2) \n",
+ "#Here the above equation is in the form of\n",
+ "#del_V = V_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2) \n",
+ "\n",
+ "#From the matrix method to solve simultaneous linear equations, we have\n",
+ "a = array([[11, sum(x1), sum(x1**2)],[sum(x1), sum(x1**2), sum(x1**3)],[sum(x1**2), sum(x1**3), sum(x1**4)]])\n",
+ "b = array([sum(del_V),sum(x1*del_V),sum((x1**2)*del_V)])\n",
+ "\n",
+ "soln=linalg.solve(a,b);\n",
+ "a0=soln[0]\n",
+ "a1=soln[1]\n",
+ "a2=soln[2]\n",
+ "\n",
+ "#del_V = V_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2)\n",
+ "#V_mix = (a0 + a1*x1 + a2*x1**(2))*(x1*(1 - x1))\n",
+ "#Solving the above equation for x1,\n",
+ "def f(x1): \n",
+ " return (a0+(a1*x1)+(a2*x1**2))*(x1*(1-x1))\n",
+ "\n",
+ "#Now differentiating the above equation with respect to x we get\n",
+ "#d/dx(V_mix) = (-4*a2*x1**3) + (3*(a2-a1)*x1**2) + (2*(a1-a0)*x1)+ a0\n",
+ "#Again solving it for x1\n",
+ "def f1(x1): \n",
+ " return (-4*a2*x1**3)+(3*(a2-a1)*x1**2)+(2*(a1-a0)*x1)+a0\n",
+ "\n",
+ "#Now \n",
+ "\n",
+ "x1_prime=[0,0.25,0.50,0.75,1.0];\n",
+ "V_mix_prime=zeros(5);\t\t\t#[cm**(3)/mol] - V_mix = V - x1*V_meth - x2*V_water\n",
+ "del_V_prime=zeros(5);\t\t\t#[cm**(3)/mol] - del_V = V_mix/(x1*x2)\n",
+ "V1_bar=zeros(5);\t\t\t#[cm**(3)/mol] - Partial molar volume of component 1\n",
+ "V2_bar=zeros(5);\t\t\t#[cm**(3)/mol] - Partial molar volume of component 1\n",
+ "\n",
+ "# Results\n",
+ "for j in range(5):\n",
+ " V_mix_prime[j]=f(x1_prime[j]);\n",
+ " del_V_prime[j]=f1(x1_prime[j]);\n",
+ " V1_bar[j]=V_meth+V_mix_prime[j]+(1-x1_prime[j])*del_V_prime[j];\n",
+ " V2_bar[j]=V_water+V_mix_prime[j]-x1_prime[j]*del_V_prime[j];\n",
+ " print \"For x1 = %f\"%(x1_prime[j]);\n",
+ " print \"The partial molar volume of methanol component 1) is %f cm**3)/mol\"%(V1_bar[j])\n",
+ " print \"The partial molar volume of water component 2) is %f cm**3)/mol\"%(V2_bar[j])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For x1 = 0.000000\n",
+ "The partial molar volume of methanol component 1) is 37.937941 cm**3)/mol\n",
+ "The partial molar volume of water component 2) is 18.128600 cm**3)/mol\n",
+ "For x1 = 0.250000\n",
+ "The partial molar volume of methanol component 1) is 38.124350 cm**3)/mol\n",
+ "The partial molar volume of water component 2) is 18.031910 cm**3)/mol\n",
+ "For x1 = 0.500000\n",
+ "The partial molar volume of methanol component 1) is 39.496329 cm**3)/mol\n",
+ "The partial molar volume of water component 2) is 17.177237 cm**3)/mol\n",
+ "For x1 = 0.750000\n",
+ "The partial molar volume of methanol component 1) is 40.332855 cm**3)/mol\n",
+ "The partial molar volume of water component 2) is 15.841550 cm**3)/mol\n",
+ "For x1 = 1.000000\n",
+ "The partial molar volume of methanol component 1) is 40.411400 cm**3)/mol\n",
+ "The partial molar volume of water component 2) is 15.800306 cm**3)/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.4 Page Number : 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from numpy import *\n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T = 20 + 273.15;\t\t\t#[K] - Temperature\n",
+ "Mol_form = 46.027;\t\t\t#Molecular weight of formic acid\n",
+ "Mol_water = 18.015;\t\t\t# Molecular weight of water\n",
+ "\n",
+ "Wt_perc=[10,18,30,50,72,78];\t\t\t#Weight percent of formic acid\n",
+ "den=[1.0246,1.0441,1.0729,1.1207,1.1702,1.1818];\t\t\t#[g/cm**(3)] - Density of solution\n",
+ "\n",
+ "V_g=zeros(6);\t\t\t#[cm**(3)/g] - Volume of 1 g of solution\n",
+ "x1=zeros(6);\t\t\t# Mole fraction of component 1\n",
+ "x2=zeros(6);\t\t\t# Mole fraction of component 2\n",
+ "n=zeros(6);\t\t\t# Number of moles in 1 g\n",
+ "V_mol=zeros(6);\t\t\t#[cm**(3)/mol] - Volume of 1 mol of solution\n",
+ "x_V=zeros(6);\t\t\t#[cm**(3)/mol] - x_V = x1*V_form + x2*V_water\n",
+ "V_mix=zeros(6);\t\t\t#[cm**(3)/mol] - V_mix = V - x1*V_form - x2*V_water\n",
+ "del_V=zeros(6);\t\t\t# [cm**(3)/mol] - del_V = V_mix/(x1*x2)\n",
+ "\n",
+ "#V_mol = V_form at x1 = 1 and V_mol = V_water at x1 = 0, therefore\n",
+ "V_form = 37.737;\t\t\t#[cm**(3)/mol] - Molar volume of pure formic acid (component 1)\n",
+ "V_water = 18.050;\t\t\t#[cm**(3)/mol] - Molar volume of pure water (component 2)\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(6):\n",
+ " V_g[i]=1/den[i];\n",
+ " x1[i]=(Wt_perc[i]/Mol_form)/((Wt_perc[i]/Mol_form)+((100-Wt_perc[i])/Mol_water));\n",
+ " x2[i]=1-x1[i];\n",
+ " n[i]=((Wt_perc[i]/100.)/Mol_form)+(((100-Wt_perc[i])/100.)/Mol_water);\n",
+ " V_mol[i]=V_g[i]/n[i];\n",
+ " x_V[i]=V_form*x1[i]+V_water*x2[i];\n",
+ " V_mix[i]=V_mol[i]-x1[i]*V_form-x2[i]*V_water;\n",
+ " del_V[i]=V_mix[i]/(x1[i]*x2[i]);\n",
+ "\n",
+ "\n",
+ "a = array([[11, sum(x1), sum(x1**2)],[sum(x1), sum(x1**2) ,sum(x1**3)],[sum(x1**2), sum(x1**3) ,sum(x1**4)]])\n",
+ "b = array([sum(del_V),sum(x1*del_V),sum((x1**2)*del_V)])\n",
+ "\n",
+ "soln = linalg.solve(a,b)\n",
+ "\n",
+ "a0=soln[0]\n",
+ "a1=soln[1]\n",
+ "a2=soln[2]\n",
+ "\n",
+ "def f(x1): \n",
+ "\t return (a0+(a1*x1)+(a2*x1**2))*(x1*(1-x1))\n",
+ "\n",
+ "def f1(x1): \n",
+ "\t return (-4*a2*x1**3)+(3*(a2-a1)*x1**2)+(2*(a1-a0)*x1)+a0\n",
+ "\n",
+ "#At 15 Wt% of formic acid, x1 is given by\n",
+ "x1_prime_1 = round((15/Mol_form)/((15/Mol_form)+((100-15)/Mol_water)),3); \n",
+ "#Similarly at 75 Wt% of formic acid, x1 is given by\n",
+ "x1_prime_2 = round((75/Mol_form)/((75/Mol_form)+((100-75)/Mol_water)),4); \n",
+ "\n",
+ "Wt_perc_prime=[15,75];\n",
+ "x1_prime=[x1_prime_1,x1_prime_2];\n",
+ "V_mix_prime=zeros(2);\t\t\t#[cm**(3)/mol] - V_mix = V - x1*V_meth - x2*V_water\n",
+ "del_V_prime=zeros(2);\t\t\t#[cm**(3)/mol] - del_V = V_mix/(x1*x2)\n",
+ "V1_bar=zeros(2);\t\t\t#[cm**(3)/mol] - Partial molar volume of component 1\n",
+ "V2_bar=zeros(2);\t\t\t#[cm**(3)/mol] - Partial molar volume of component 1\n",
+ "\n",
+ "# Results\n",
+ "for j in range(2):\n",
+ " V_mix_prime[j]=f(x1_prime[j]);\n",
+ " del_V_prime[j]=f1(x1_prime[j]);\n",
+ " V1_bar[j]=V_form+V_mix_prime[j]+(1-x1_prime[j])*del_V_prime[j];\n",
+ " V2_bar[j]=V_water+V_mix_prime[j]-x1_prime[j]*del_V_prime[j];\n",
+ " print \"For weight percent of formic acid = %f percent\"%(Wt_perc_prime[j]);\n",
+ " print \"The partial molar volume of formic acid component 1) is %f cm**3)/mol\"%(V1_bar[j]);\n",
+ " print \"The partial molar volume of water component 2) is %f cm**3)/mol\"%(V2_bar[j]);\n",
+ "\n",
+ "# answers are vary because of rounding error. Please review it manually. "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For weight percent of formic acid = 15.000000 percent\n",
+ "The partial molar volume of formic acid component 1) is 35.429311 cm**3)/mol\n",
+ "The partial molar volume of water component 2) is 18.102339 cm**3)/mol\n",
+ "For weight percent of formic acid = 75.000000 percent\n",
+ "The partial molar volume of formic acid component 1) is 38.853189 cm**3)/mol\n",
+ "The partial molar volume of water component 2) is 15.646974 cm**3)/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.5 Page Number : 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import *\n",
+ "# Variables\n",
+ "T = 40 + 273.15;\t\t\t#[K] - Temperature\n",
+ "\n",
+ "x1=array([0.083,0.176,0.268,0.353,0.428,0.720,0.780,0.850,0.900]) \t\t\t# Mole fraction of component 1\n",
+ "delta_H_mix=array([0.250,0.488,0.670,0.790,0.863,0.775,0.669,0.510,0.362])\t\t\t#[kJ/mol] - Enthalpy of the solution\n",
+ "\n",
+ "x2=zeros(9);\t\t\t# Mole fraction of component 2\n",
+ "del_H=zeros(9);\t\t\t#[kJ/mol] - del_H = delta_H_mix/(x1*x2)\n",
+ "\n",
+ "for i in range(9):\n",
+ " x2[i]=1-x1[i];\n",
+ " del_H[i]=delta_H_mix[i]/(x1[i]*x2[i]);\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#Now employing the concept of quadratic regression of the data ( x1 , del_H ) to solve the equation of the type\n",
+ "#y = a0 + a1*x + a2*x**(2) \n",
+ "#Here the above equation is in the form of\n",
+ "#del_H = delta_H_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2) \n",
+ "\n",
+ "#From the matrix method to solve simultaneous linear equations, we have\n",
+ "a = array([[9, sum(x1), sum(x1**2)],[sum(x1), sum(x1**2), sum(x1**3)],[sum(x1**2), sum(x1**3), sum(x1**4)]])\n",
+ "b = array([sum(del_H),sum(x1*del_H),sum((x1**2)*del_H)])\n",
+ "soln= linalg.solve(a,b)\n",
+ "a0=soln[0]\n",
+ "a1=soln[1]\n",
+ "a2=soln[2]\n",
+ "\n",
+ "#del_H = delta_H_mix/(x1*x2) = a0 + a1*x1 + a2*x1**(2)\n",
+ "#delta_H_mix = (a0 + a1*x1 + a2*x1**(2))*(x1*(1 - x1))\n",
+ "#At x1 = 0.25,\n",
+ "x_1 = 0.25;\t\t\t#[mol]\n",
+ "delta_H_mix = (a0+(a1*x_1)+(a2*x_1**2))*(x_1*(1-x_1));\t\t\t#[kJ/mol]\n",
+ "\n",
+ "#Now differentiating the above equation with respect to x we get\n",
+ "#d/dx(delta_H_mix) = del_delta_H_mix = (-4*a2*x1**3) + (3*(a2-a1)*x1**2) + (2*(a1-a0)*x1)+ a0\n",
+ "#Again for x1 = 0.25\n",
+ "x_1_prime = 0.25;\t\t\t#[mol]\n",
+ "del_delta_H_mix = (-4*a2*x_1_prime**3)+(3*(a2-a1)*x_1_prime**2)+(2*(a1-a0)*x_1_prime)+a0;\t\t\t#[kJ/mol]\n",
+ "\n",
+ "#We have the relation\n",
+ "# H1_bar - H1 = delta_H_mix + x2*del_delta_H_mix, and\n",
+ "# H2_bar - H2 = delta_H_mix - x1*del_delta_H_mix\n",
+ "\n",
+ "#Let us suppose\n",
+ "#k_1 = H1_bar - H1 , and\n",
+ "#k_2 = H2_bar - H2\n",
+ "\n",
+ "k_1 = delta_H_mix + (1-x_1_prime)*del_delta_H_mix;\t\t\t#[kJ/mol]\n",
+ "k_2 = delta_H_mix - x_1_prime*del_delta_H_mix;\t\t\t#[kJ/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \"The value of H1_bar - H1) at x1 = 0.25 is %f kJ/mol\"%(k_1);\n",
+ "print \"The value of H2_bar - H2) at x1 = 0.25 is %f kJ/mol\"%(k_2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of H1_bar - H1) at x1 = 0.25 is 2.010734 kJ/mol\n",
+ "The value of H2_bar - H2) at x1 = 0.25 is 0.179079 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch13_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch13_1.ipynb new file mode 100755 index 00000000..d2334255 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch13_1.ipynb @@ -0,0 +1,304 @@ +{
+ "metadata": {
+ "name": "ch13_1",
+ "signature": "sha256:894f18dec91baf4a10867e0d301a68220274d02a1e24c4e2bef1038061daa009"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Chapter 13 : Fugacity of a Component in a Mixture by Equations of State"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.2 Page Number : 433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T = 310.93;\t\t\t#[K] - Temperature\n",
+ "P = 2.76*10**(6);\t\t\t#[Pa] - Pressure\n",
+ "y1 = 0.8942;\t\t\t#[mol] - mole fraction of component 1\n",
+ "y2 = 1 - y1;\t\t\t#[mol] - mole fraction of component 2\n",
+ "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "#For component 1 (methane)\n",
+ "Tc_1 = 190.6;\t\t\t#[K] - Critical temperature\n",
+ "Pc_1 = 45.99*10**(5);\t\t\t#[N/m**(2)] - Critical pressure\n",
+ "Vc_1 = 98.6;\t\t\t#[cm**(3)/mol] - Critical molar volume\n",
+ "Zc_1 = 0.286;\t\t\t# - Critical compressibility factor\n",
+ "w_1 = 0.012;\t\t\t# - Critical acentric factor\n",
+ "#Similarly for component 2 (n-Butane)\n",
+ "Tc_2 = 425.1;\t\t\t#[K]\n",
+ "Pc_2 = 37.96*10**(5);\t\t\t#[N/m**(2)]\n",
+ "Vc_2 = 255;\t\t\t#[cm**(3)/mol]\n",
+ "Zc_2=0.274;\n",
+ "w_2=0.2;\n",
+ "\n",
+ "# Calculations\n",
+ "#For component 1\n",
+ "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n",
+ "#At reduced temperature\n",
+ "B1_0 = 0.083-(0.422/(Tr_1)**(1.6));\n",
+ "B1_1 = 0.139-(0.172/(Tr_1)**(4.2));\n",
+ "#We know,(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "#Similarly for component 2\n",
+ "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n",
+ "#At reduced temperature Tr_2,\n",
+ "B2_0 = 0.083-(0.422/(Tr_2)**(1.6));\n",
+ "B2_1 = 0.139-(0.172/(Tr_2)**(4.2));\n",
+ "B_22 = ((B2_0+(w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "#For cross coeffcient\n",
+ "Tc_12 = (Tc_1*Tc_2)**(1./2);\t\t\t#[K]\n",
+ "w_12 = (w_1+w_2)/2;\n",
+ "Zc_12 = (Zc_1+Zc_2)/2;\n",
+ "Vc_12 = (((Vc_1)**(1./3)+(Vc_2)**(1./3))/2)**(3);\t\t\t#[cm**(3)/mol]\n",
+ "Vc_12 = Vc_12*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "# Variables, Z = 1 + (B*P)/(R*T)\n",
+ "#Now we have,(B_12*Pc_12)/(R*Tc_12) = B_0 + (w_12*B_1)\n",
+ "#where B_0 and B_1 are to be evaluated at Tr_12\n",
+ "Tr_12 = T/Tc_12;\n",
+ "#At reduced temperature Tr_12\n",
+ "B_0 = 0.083-(0.422/(Tr_12)**(1.6));\n",
+ "B_1 = 0.139-(0.172/(Tr_12)**(4.2));\n",
+ "B_12 = ((B_0+(w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n",
+ "#For the mixture\n",
+ "B = y1**(2)*B_11+2*y1*y2*B_12+y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "#Now del_12 can be calculated as,\n",
+ "del_12 = 2*B_12 - B_11 - B_22;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "#We have the relation, math.log(phi_1) = (P/(R*T))*(B_11 + y2**(2)*del_12), therefore\n",
+ "phi_1 = math.exp((P/(R*T))*(B_11 + y2**(2)*del_12));\n",
+ "#Similarly for component 2\n",
+ "phi_2 = math.exp((P/(R*T))*(B_22 + y1**(2)*del_12));\n",
+ "\n",
+ "# Results\n",
+ "print \" The value of fugacity coefficient of component 1 phi_1) is %f\"%(phi_1);\n",
+ "print \" The value of fugacity coefficient of component 2 phi_2) is %f\"%(phi_2);\n",
+ "\n",
+ "#Finally fugacity coefficient of the mixture is given by\n",
+ "#math.log(phi) = y1*math.log(phi_1) + y2*math.log(phi_2);\n",
+ "phi = math.exp(y1*math.log(phi_1) + y2*math.log(phi_2));\n",
+ "\n",
+ "print \" The value of fugacity coefficient of the mixture phi) is %f \"%(phi);\n",
+ "#The fugacity coefficient of the mixture can also be obtained using\n",
+ "#math.log(phi) = (B*P)/(R*T)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of fugacity coefficient of component 1 phi_1) is 0.965152\n",
+ " The value of fugacity coefficient of component 2 phi_2) is 0.675374\n",
+ " The value of fugacity coefficient of the mixture phi) is 0.929376 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.7 Page Number : 447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T = 460.;\t\t\t#[K] - Temperature\n",
+ "P = 40.*10**(5);\t\t\t#[Pa] - Pressure\n",
+ "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "# component 1 = nitrogen\n",
+ "# component 2 = n-Butane\n",
+ "y1 = 0.4974;\t\t\t# Mole percent of nitrogen\n",
+ "y2 = 0.5026;\t\t\t# Mole percent of n-Butane\n",
+ "Tc_nit = 126.2;\t\t\t#[K]\n",
+ "Pc_nit = 34.00*10**(5);\t\t\t#[Pa]\n",
+ "Tc_but = 425.1;\t\t\t#[K]\n",
+ "Pc_but = 37.96*10**(5);\t\t\t#[Pa]\n",
+ "\n",
+ "# (1). van der Walls equation of state\n",
+ "\n",
+ "# The fugacity coefficient of component 1 in a binary mixture following van der Walls equation of state is given by,\n",
+ "# math.log(phi_1) = b_1/(V-b) - math.log(Z-B) -2*(y1*a_11 + y2*a_12)/(R*T*V)\n",
+ "# and for component 2 is given by,\n",
+ "# math.log(phi_2) = b_2/(V-b) - math.log(Z-B) -2*(y1*a_12 + y2*a_22)/(R*T*V)\n",
+ "# Where B = (P*b)/(R*T)\n",
+ "\n",
+ "# Calculations\n",
+ "# For componenet 1 (nitrogen)\n",
+ "a_1 = (27*R**(2)*Tc_nit**(2))/(64*Pc_nit);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b_1 = (R*Tc_nit)/(8*Pc_nit);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Similarly for componenet 2 (n-Butane)\n",
+ "a_2 = (27*R**(2)*Tc_but**(2))/(64*Pc_but);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b_2 = (R*Tc_but)/(8*Pc_but);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Here\n",
+ "a_11 = a_1;\n",
+ "a_22 = a_2;\n",
+ "# For cross coefficient\n",
+ "a_12 = (a_1*a_2)**(1./2);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "\n",
+ "# For the mixture \n",
+ "a = y1**(2)*a_11 + y2**(2)*a_22 + 2*y1*y2*a_12;\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = y1*b_1 + y2*b_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The cubic form of the van der Walls equation of state is given by,\n",
+ "# V**(3) - (b+(R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n",
+ "# Substituting the value and solving for V, we get\n",
+ "# Solving the cubic equation\n",
+ "def f(V): \n",
+ " return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n",
+ "V_1=fsolve(f,-1)\n",
+ "V_2=fsolve(f,0)\n",
+ "V_3=fsolve(f,1)\n",
+ "# The molar volume V = V_3, the other two roots are imaginary\n",
+ "V = V_3;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The comprssibility factor of the mixture is \n",
+ "Z = (P*V)/(R*T);\n",
+ "# And B can also be calculated as\n",
+ "B = (P*b)/(R*T);\n",
+ "\n",
+ "# The fugacity coefficient of component 1 in the mixture is\n",
+ "phi_1 = math.exp(b_1/(V-b) - math.log(Z-B) -2*(y1*a_11 + y2*a_12)/(R*T*V));\n",
+ "# Similarly fugacity coefficient of component 2 in the mixture is \n",
+ "phi_2 = math.exp(b_2/(V-b) - math.log(Z-B) -2*(y1*a_12 + y2*a_22)/(R*T*V));\n",
+ "\n",
+ "# The fugacity coefficient of the mixture is given by,\n",
+ "# math.log(phi) = y1*math.log(phi_1) + y2*math.log(phi_2)\n",
+ "phi = math.exp(y1*math.log(phi_1) + y2*math.log(phi_2));\n",
+ "\n",
+ "# Also the fugacity coefficient of the mixture following van der Walls equation of state is given by,\n",
+ "# math.log(phi) = b/(V-b) - math.log(Z-B) -2*a/(R*T*V)\n",
+ "phi_dash = math.exp(b/(V-b) - math.log(Z-B) -2*a/(R*T*V));\n",
+ "# The result is same as obtained above\n",
+ "\n",
+ "# Results\n",
+ "print \" 1van der Walls equation of state\";\n",
+ "print \" The value of fugacity coefficient of component 1 nitrogen) is %f\"%(phi_1);\n",
+ "print \" The value of fugacity coefficient of component 2 n-butane) is %f\"%(phi_2);\n",
+ "print \" The value of fugacity coefficient of the mixture is %f\"%(phi);\n",
+ "print \" Also the fugacity coefficient of the mixture from van der Walls equation of state is %f which is same as above)\"%(phi_dash);\n",
+ "\n",
+ "# (2). Redlich-Kwong equation of state\n",
+ "\n",
+ "# For component 1,\n",
+ "a_1_prime = (0.42748*R**(2)*Tc_nit**(2.5))/Pc_nit;\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b_1_prime = (0.08664*R*Tc_nit)/Pc_nit;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "#similarly for component 2,\n",
+ "a_2_prime = (0.42748*R**(2)*Tc_but**(2.5))/Pc_but;\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b_2_prime = (0.08664*R*Tc_but)/Pc_but;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# For cross coefficient\n",
+ "a_12_prime = (a_1_prime*a_2_prime)**(1./2);\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "# For the mixture\n",
+ "a_prime = y1**(2)*a_1_prime + y2**(2)*a_2_prime +2*y1*y2*a_12_prime;\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b_prime = y1*b_1_prime +y2*b_2_prime;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\n",
+ "#The cubic form of Redlich Kwong equation of state is given by,\n",
+ "# V**(3)-((R*T)/P)*V**(2)-((b**(2))+((b*R*T)/P)-(a/(T**(1/2)*P))*V-(a*b)/(T**(1/2)*P)=0\n",
+ "# Solving the cubic equation\n",
+ "def f1(V): \n",
+ " return V**(3)-((R*T)/P)*V**(2)-((b_prime**(2))+((b_prime*R*T)/P)-(a_prime/(T**(1./2)*P)))*V-(a_prime*b_prime)/(T**(1./2)*P)\n",
+ "V_4=fsolve(f1,1)\n",
+ "V_5=fsolve(f1,0)\n",
+ "V_6=fsolve(f1,-1)\n",
+ "# The molar volume V = V_4, the other two roots are imaginary\n",
+ "V_prime = V_4;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# The compressibility factor of the mixture is\n",
+ "Z_prime = (P*V_prime)/(R*T);\n",
+ "# And B can also be calculated as\n",
+ "B_prime = (P*b_prime)/(R*T);\n",
+ "\n",
+ "# The fugacity coefficient of component 1 in the binary mixture is given by\n",
+ "# math.log(phi_1) = b_1/(V-b) - math.log(Z-B) + ((a*b_1)/((b**(2)*R*T**(3/2))))*(math.log((V+b)/V)-(b/(V+b)))-(2*(y1*a_1+y2*a_12)/(R*T**(3/2)b))*(math.log(V+b)/b)\n",
+ "\n",
+ "phi_1_prime = math.exp((b_1_prime/(V_prime-b_prime))-math.log(Z_prime-B_prime)+((a_prime*b_1_prime)/((b_prime**(2))*R*(T**(3./2))))*(math.log((V_prime+b_prime)/V_prime)-(b_prime/(V_prime+b_prime)))-(2*(y1*a_1_prime+y2*a_12_prime)/(R*(T**(3./2))*b_prime))*(math.log((V_prime+b_prime)/V_prime)));\n",
+ "\n",
+ "\n",
+ "# Similarly fugacity coefficient of component 2 in the mixture is \n",
+ "phi_2_prime = math.exp((b_2_prime/(V_prime-b_prime))-math.log(Z_prime-B_prime)+((a_prime*b_2_prime)/((b_prime**(2))*R*(T**(3./2))))*(math.log((V_prime+b_prime)/V_prime)-(b_prime/(V_prime+b_prime)))-(2*(y1*a_12_prime+y2*a_2_prime)/(R*(T**(3./2))*b_prime))*(math.log((V_prime+b_prime)/V_prime)));\n",
+ "\n",
+ "# The fugacity coefficient of the mixture is given by,\n",
+ "# math.log(phi) = y1*math.log(phi_1) + y2*math.log(phi_2)\n",
+ "phi_prime = math.exp(y1*math.log(phi_1_prime) + y2*math.log(phi_2_prime));\n",
+ "\n",
+ "# Also the fugacity coefficient for the mixture following Redlich-kwong equation of state is also given by\n",
+ "# math.log(phi) = b/(V-b) - math.log(Z-B) - (a/(R*T**(3/2)))*(1/(V+b)+(1/b)*math.log((V+b)/V))\n",
+ "phi_prime_dash = math.exp(b_prime/(V_prime-b_prime) - math.log(Z_prime-B_prime) - (a_prime/(R*T**(3./2)))*(1/(V_prime+b_prime)+(1./b_prime)*math.log((V_prime+b_prime)/ V_prime)));\n",
+ "\n",
+ "print \" \\nRedlich-Kwong equation of state\";\n",
+ "print \" The value of fugacity coefficient of component 1 nitrogen) is %f\"%(phi_1_prime);\n",
+ "print \" The value of fugacity coefficient of component 2 n-butane) is %f\"%(phi_2_prime);\n",
+ "print \" The value of fugacity coefficient of the mixture is %f\"%(phi_prime);\n",
+ "print \" Also the fugacity coefficient for the mixture from Redlich-kwong equation of state is %f which is same as above)\"%(phi_prime_dash);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1van der Walls equation of state\n",
+ " The value of fugacity coefficient of component 1 nitrogen) is 1.057500\n",
+ " The value of fugacity coefficient of component 2 n-butane) is 0.801865\n",
+ " The value of fugacity coefficient of the mixture is 0.920192\n",
+ " Also the fugacity coefficient of the mixture from van der Walls equation of state is 0.920192 which is same as above)\n",
+ " \n",
+ "Redlich-Kwong equation of state\n",
+ " The value of fugacity coefficient of component 1 nitrogen) is 1.071129\n",
+ " The value of fugacity coefficient of component 2 n-butane) is 0.793063\n",
+ " The value of fugacity coefficient of the mixture is 0.920948\n",
+ " Also the fugacity coefficient for the mixture from Redlich-kwong equation of state is 0.920948 which is same as above)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch14_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch14_1.ipynb new file mode 100755 index 00000000..6e9336a9 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch14_1.ipynb @@ -0,0 +1,715 @@ +{
+ "metadata": {
+ "name": "ch14_1",
+ "signature": "sha256:98f2e1e0f1c561d3ee302fd629093b7572c8b263613f73036059e7020f90d8cc"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14 : Activity Coefficients Models for Liquid Mixtures"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.4 Page Number : 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "# Variables,\n",
+ "T = 300;\t\t\t#[K] - Temperature\n",
+ "b = 100;\t\t\t#[cal/mol]\n",
+ "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n",
+ "# R*T*math.log(Y_1) = b*x_2**(2)\n",
+ "# R*T*math.log(Y_2) = b*x_1**(2)\n",
+ "\n",
+ "#For equimolar mixture\n",
+ "x_1 = 0.5;\t\t\t#Mole fraction of component 1\n",
+ "x_2 = 0.5;\t\t\t#Mole fraction of component 2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#The excess Gibbs free energy is given by\n",
+ "# G_excess = R*T*(x_1*math.log(Y_1) + x_2*math.log(Y_2)) = b*x_1*x_2**(2) + b*x_2*x_1**(2) = b*x_1*(x_1 + x_2) = b*x_1*x_2\n",
+ "G_excess = b*x_1*x_2;\t\t\t#[cal/mol]\n",
+ "\n",
+ "#The ideal Gibbs free energy change of mixing is given by,\n",
+ "delta_G_id_mix = R*T*(x_1*math.log(x_1)+x_2*math.log(x_2));\t\t\t#[cal/mol]\n",
+ "\n",
+ "#The Gibbs free energy of mixing is given by\n",
+ "delta_G_mix = delta_G_id_mix + G_excess;\t\t\t#[cal/mol]\n",
+ "\n",
+ "\n",
+ "# delta_S_mix = delta_S_id_mix = - R*sum(x_i*math.log(x_i))\n",
+ "\n",
+ "#delta_G_mix = delta_H_mix - T*delta_S_mix = delta_H_mix + R*T*(x_1*math.log(x_1)+x_2*math.log(x_2))\n",
+ "delta_H_mix = b*x_1*x_2;\t\t\t#[cal/mol]\n",
+ "\n",
+ "print \"The value of Gibbs free energy change for equimolar mixture formation is %f cal/mol\"%(delta_G_mix);\n",
+ "print \"The value of enthalpy change for equimolar mixture formation is %f cal/mol\"%(delta_H_mix);\n",
+ "\n",
+ "#Work required for separation of mixture into pure components is\n",
+ "W = delta_G_mix;\n",
+ "print \"The least amount of work required for separation at 300 K is %f cal/mol\"%(W);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of Gibbs free energy change for equimolar mixture formation is -388.185034 cal/mol\n",
+ "The value of enthalpy change for equimolar mixture formation is 25.000000 cal/mol\n",
+ "The least amount of work required for separation at 300 K is -388.185034 cal/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.10 Page Number : 466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math \n",
+ "from numpy import zeros\n",
+ "from scipy.stats import linregress\n",
+ "\n",
+ "# Variables,\n",
+ "T = 25 +173.15;\t\t\t#[K] - Temperature\n",
+ "x_1=[0.0115,0.0160,0.0250,0.0300,0.0575,0.1125,0.1775,0.2330,0.4235,0.5760,0.6605,0.7390,0.8605,0.9250,0.9625];\n",
+ "y_1=[8.0640,7.6260,7.2780,7.2370,5.9770,4.5434,3.4019,2.8023,1.7694,1.3780,1.2302,1.1372,1.0478,1.0145,1.0070];\n",
+ "y_2=[1.0037,1.0099,1.0102,1.0047,1.0203,1.0399,1.1051,1.1695,1.4462,1.8520,2.2334,2.6886,3.7489,4.8960,5.6040];\n",
+ "\n",
+ "x_2 = zeros(15);\t\t\t# x_2 = (1 - x_1)\n",
+ "G_RT = zeros(15);\t\t\t# G_RT = G_excess/(R*T)\n",
+ "x1x2_G_RT = zeros(15);\t\t\t# x1x2_G_RT = (x_1*x_2/(G_excess/(R*T)))\n",
+ "G_RTx1x2 = zeros(15);\t\t\t# G_RTx1x1 = G_excess/(R*T*x_1*x_2)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "for i in range(15):\n",
+ " x_2[i]=(1-x_1[i]);\n",
+ " G_RT[i]=(x_1[i]*math.log(y_1[i]))+(x_2[i]*math.log(y_2[i]));\n",
+ " x1x2_G_RT[i]=(x_1[i]*x_2[i])/G_RT[i];\n",
+ " G_RTx1x2[i]=1/x1x2_G_RT[i];\n",
+ "\n",
+ "\n",
+ "slop,intr,sig,d,e=linregress(x_1,x1x2_G_RT);\n",
+ "\n",
+ "A = 1/intr;\n",
+ "B = 1/(slop+(1/A));\n",
+ "print \" The value of van Laar parameters are A = %f and B = %f\"%(A,B);\n",
+ "\n",
+ "# Now from Margules equation\n",
+ "# G_RTx1x2 = G_excess/(R*T*x_1*x_2) = B1*x_1 + A1*x_1 = A1 + (B1 - A1)*x_1\n",
+ "#slope = (B1 - A1) and intercept = A1\n",
+ "\n",
+ "# Again employing the concept of linear regression of the data ( x_1 , G_RTx1x2 ) to find the value of intercept and slope of the above equation\n",
+ "#Let slope = slop1 and intercept = intr1\n",
+ "\n",
+ "slop1,intr1,sig1,d,e=linregress(x_1,G_RTx1x2);\n",
+ "\n",
+ "A1 = intr1;\n",
+ "B1 = slop1 + A1;\n",
+ "print \" The value of Margules parameters are A = %f and B = %f\"%(A1,B1);\n",
+ "\n",
+ "print \" Because of the higher value of correlation factor for Van Laar model it fits the data better.\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of van Laar parameters are A = 2.271326 and B = 1.781420\n",
+ " The value of Margules parameters are A = 2.293274 and B = 1.746000\n",
+ " Because of the higher value of correlation factor for Van Laar model it fits the data better.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.11 Page Number : 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables,\n",
+ "T = 60 + 273.15;\t\t\t#[K] - Temperature\n",
+ "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n",
+ "#component 1 = acetone\n",
+ "#component 2 = water\n",
+ "x_1 = 0.3;\t\t\t# Mole fraction of component 1\n",
+ "x_2 = 1 - x_1;\t\t\t#Mole fraction of component 2\n",
+ "V_mol_1 = 74.05;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1\n",
+ "V_mol_2 = 18.07;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2\n",
+ "\n",
+ "#for Wilson equation\n",
+ "a_12 = 291.27;\t\t\t#[cal/mol]\n",
+ "a_21 = 1448.01;\t\t\t#[cal/mol]\n",
+ "\n",
+ "#For NRTL\n",
+ "b_12 = 631.05;\t\t\t#[cal/mol]\n",
+ "b_21 = 1197.41;\t\t\t#[cal/mol]\n",
+ "alpha = 0.5343;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Froom wilson equation\n",
+ "A_12=(V_mol_2/V_mol_1)*(math.exp(-a_12/(R*T)));\n",
+ "A_21 = (V_mol_1/V_mol_2)*(math.exp(-a_21/(R*T)));\n",
+ "Beta = A_12/(x_1+x_2*A_12) - A_21/(x_2+x_1*A_21);\n",
+ "#math.log(Y1) = -math.log(x_1 + x_2*A_12) + x_2*Beta; \n",
+ "Y1 = math.exp(-math.log(x_1+x_2*A_12)+x_2*Beta);\n",
+ "#similarly for Y2\n",
+ "Y2 = math.exp(-math.log(x_2+x_1*A_21)-x_1*Beta);\n",
+ "print \"The value of activity coefficients for Wilson equation are Y1 = %f \\t and \\t Y2 = %f\"%(Y1,Y2);\n",
+ "\n",
+ "#From NRTL equation,\n",
+ "t_12 = b_12/(R*T);\n",
+ "t_21 = b_21/(R*T);\n",
+ "G_12 = math.exp(-alpha*t_12);\n",
+ "G_21 = math.exp(-alpha*t_21);\n",
+ "\n",
+ "#math.log(Y1) = x_1**(2)*[t_12*(G_12/(x_1+x_2*G_12))**(2) + (G_12*t_12)/((G_12/(x_1+x_2*G_12))**(2))]\n",
+ "Y1_prime = math.exp(x_2**(2)*(t_21*(G_21/(x_1+x_2*G_21))**(2)+(G_12*t_12)/(((x_2+x_1*G_12))**(2))));\n",
+ "#Similarly for Y2\n",
+ "Y2_prime = math.exp(x_1**(2)*(t_12*(G_12/(x_2+x_1*G_12))**(2)+(G_21*t_21)/(((x_1+x_2*G_21))**(2))));\n",
+ "\n",
+ "print \"The value of activity coefficients for NRTL equation are Y1 = %f \\t and \\t Y2 = %f\"%(Y1_prime,Y2_prime);\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of activity coefficients for Wilson equation are Y1 = 2.172258 \t and \t Y2 = 1.254121\n",
+ "The value of activity coefficients for NRTL equation are Y1 = 2.143030 \t and \t Y2 = 1.262506\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.12 Page Number : 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables \n",
+ "T = 307;\t\t\t#[K]\n",
+ "x_1 = 0.047;\n",
+ "x_2 = 1 - x_1;\n",
+ "\n",
+ "# The subgroups in the two components are\n",
+ "# Acetone (1) : 1 CH3, 1 CH3CO\n",
+ "# n-pentane (2) : 2 CH3, 3 CH2\n",
+ "\n",
+ "#Group volume (Rk) and surface area (Qk) parameters of the subgroup are\n",
+ "k_CH3 = 1;\n",
+ "k_CH2 = 2;\n",
+ "k_CH3CO = 19;\n",
+ "Rk_CH3 = 0.9011;\n",
+ "Rk_CH2 = 0.6744;\n",
+ "Rk_CH3CO = 1.6724;\n",
+ "Qk_CH3 = 0.848;\n",
+ "Qk_CH2 = 0.540;\n",
+ "Qk_CH3CO = 1.4880;\n",
+ "\n",
+ "# Interaction parameters of the subgroups in kelvin (K) are\n",
+ "a_1_1 = 0;\n",
+ "a_1_2 = 0;\n",
+ "a_1_19 = 476.40;\n",
+ "a_2_1 = 0;\n",
+ "a_2_2 = 0;\n",
+ "a_2_19 = 476.40;\n",
+ "a_19_1 = 26.76;\n",
+ "a_19_2 = 26.76;\n",
+ "a_19_19 = 0;\n",
+ "\n",
+ "# Calculations\n",
+ "r_1 = 1*Rk_CH3 + 1*Rk_CH3CO;\n",
+ "r_2 = 2*Rk_CH3 + 3*Rk_CH2;\n",
+ "q_1 = 1*Qk_CH3 + 1*Qk_CH3CO;\n",
+ "q_2 = 2*Qk_CH3 + 3*Qk_CH2;\n",
+ "\n",
+ "J_1 = r_1/(r_1*x_1+r_2*x_2);\n",
+ "J_2 = r_2/(r_1*x_1+r_2*x_2);\n",
+ "L_1 = q_1/(q_1*x_1+q_2*x_2);\n",
+ "L_2 = q_2/(q_1*x_1+q_2*x_2);\n",
+ "t_1_1 = math.exp(-a_1_1/T);\n",
+ "t_1_2 = math.exp(-a_1_2/T);\n",
+ "t_1_19 = math.exp(-a_1_19/T);\n",
+ "t_2_1 = math.exp(-a_2_1/T);\n",
+ "t_2_2 = math.exp(-a_2_2/T);\n",
+ "t_2_19 = math.exp(-a_2_19/T);\n",
+ "t_19_1 = math.exp(-a_19_1/T);\n",
+ "t_19_2 = math.exp(-a_19_2/T);\n",
+ "t_19_19 = math.exp(-a_19_19/T);\n",
+ "\n",
+ "e_1_1 = 1*Qk_CH3/q_1;\n",
+ "e_2_1 = 0;\n",
+ "e_19_1 = (1*Qk_CH3CO/q_1);\n",
+ "e_1_2 = 2*Qk_CH3/q_2;\n",
+ "e_2_2 = 3*Qk_CH2/q_2;\n",
+ "e_19_2 = 0;\n",
+ "\n",
+ "B_1_1 = e_1_1*t_1_1 + e_2_1*t_2_1 + e_19_1*t_19_1;\n",
+ "B_1_2 = e_1_1*t_1_2 + e_2_1*t_2_2 + e_19_1*t_19_2;\n",
+ "B_1_19 = e_1_1*t_1_19 + e_2_1*t_2_19 + e_19_1*t_19_19;\n",
+ "B_2_1 = e_1_2*t_1_1 + e_2_2*t_2_1 + e_19_2*t_19_1;\n",
+ "B_2_2 = e_1_2*t_1_2 + e_2_2*t_2_2 + e_19_2*t_19_2;\n",
+ "B_2_19 = e_1_2*t_1_19 + e_2_2*t_2_19 + e_19_2*t_19_19;\n",
+ "\n",
+ "theta_1 = (x_1*q_1*e_1_1 + x_2*q_2*e_1_2)/(x_1*q_1 + x_2*q_2);\n",
+ "theta_2 = (x_1*q_1*e_2_1 + x_2*q_2*e_2_2)/(x_1*q_1 + x_2*q_2);\n",
+ "theta_19 = (x_1*q_1*e_19_1 + x_2*q_2*e_19_2)/(x_1*q_1 + x_2*q_2);\n",
+ "\n",
+ "s_1 = theta_1*t_1_1 + theta_2*t_2_1 + theta_19*t_19_1;\n",
+ "s_2 = theta_1*t_1_2 + theta_2*t_2_2 + theta_19*t_19_2;\n",
+ "s_19 = theta_1*t_1_19 + theta_2*t_2_19 + theta_19*t_19_19;\n",
+ "\n",
+ "# math.log(Y1_C) = 1 - J_1 + math.log(J_1) - 5*q_1*(1- (J_1/L_1) + math.log(J_1/L_1))\n",
+ "# math.log(Y2_C) = 1 - J_2 + math.log(J_2) - 5*q_2*(1- (J_2/L_2) + math.log(J_2/L_2))\n",
+ "Y1_C = math.exp(1 - J_1 + math.log(J_1) - 5*q_1*(1- (J_1/L_1) + math.log(J_1/L_1)));\n",
+ "Y2_C = math.exp(1 - J_2 + math.log(J_2) - 5*q_2*(1- (J_2/L_2) + math.log(J_2/L_2)));\n",
+ "\n",
+ "# For species 1\n",
+ "summation_theta_k_1 = theta_1*(B_1_1/s_1) + theta_2*(B_1_2/s_2) + theta_19*(B_1_19/s_19);\n",
+ "summation_e_ki_1 = e_1_1*math.log(B_1_1/s_1) + e_2_1*math.log(B_1_2/s_2) + e_19_1*math.log(B_1_19/s_19);\n",
+ "\n",
+ "# For species 2\n",
+ "summation_theta_k_2 = theta_1*(B_2_1/s_1) + theta_2*(B_2_2/s_2) + theta_19*(B_2_19/s_19);\n",
+ "summation_e_ki_2 = e_1_2*math.log(B_2_1/s_1) + e_2_2*math.log(B_2_2/s_2) + e_19_2*math.log(B_2_19/s_19);\n",
+ "\n",
+ "# math.log(Y1_R) = q_1(1 - summation_theta_k_1 + summation_e_ki_1)\n",
+ "# math.log(Y2_R) = q_2(1 - summation_theta_k_2 + summation_e_ki_2)\n",
+ "Y1_R = math.exp(q_1*(1 - summation_theta_k_1 + summation_e_ki_1));\n",
+ "Y2_R = math.exp(q_2*(1 - summation_theta_k_2 + summation_e_ki_2));\n",
+ "\n",
+ "# math.log(Y1) = math.log(Y1_C) + math.log(Y1_R)\n",
+ "# math.log(Y2) = math.log(Y2_C) + math.log(Y2_R)\n",
+ "Y1 = math.exp(math.log(Y1_C) + math.log(Y1_R));\n",
+ "Y2 = math.exp(math.log(Y2_C) + math.log(Y2_R));\n",
+ "\n",
+ "# Results\n",
+ "print \" The activity coefficients are Y1 = %f and Y2 = %f\"%(Y1,Y2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The activity coefficients are Y1 = 4.992034 and Y2 = 1.005260\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.13 Page Number : 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables,\n",
+ "T = 25 + 273.15;\t\t\t#[K] - Temperature\n",
+ "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n",
+ "#component 1 = chloroform\n",
+ "#component 2 = carbon tetrachloride\n",
+ "x_1 = 0.5;\t\t\t#Mole fraction of component 1 \t\t\t#Equimolar mixture\n",
+ "x_2 = 0.5;\t\t\t#Mole fraction of component 2\n",
+ "V_mol_1 = 81;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 1\n",
+ "V_mol_2 = 97;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2\n",
+ "del_1 = 9.2;\t\t\t#[(cal/cm**(3))**(1/2)] - Mole fraction of component 1\n",
+ "del_2 = 8.6;\t\t\t#[(cal/cm**(3))**(1/2)] - Mole fraction of component 2\n",
+ "\n",
+ "# Calculations\n",
+ "#Scatchard - Hilderbrand model\n",
+ "phi_1 = (x_1*V_mol_1)/(x_1*V_mol_1+x_2*V_mol_2);\n",
+ "phi_2 = (x_2*V_mol_2)/(x_1*V_mol_1+x_2*V_mol_2);\n",
+ "\n",
+ "#math.log(Y1) = (V_mol_1/(R*T))*phi_1**(2)*(del_1-del_2)**(2)\n",
+ "Y1 = math.exp((V_mol_1/(R*T))*(phi_1**(2))*((del_1-del_2)**(2)));\n",
+ "\n",
+ "#Similarly, for Y2\n",
+ "Y2 = math.exp((V_mol_2/(R*T))*(phi_2**(2))*((del_1-del_2)**(2)));\n",
+ "\n",
+ "# Results\n",
+ "print \"The value of activity coefficients for Scatchard-Hilderbrand model are Y1 = %f \\t and \\t Y2 = %f\"%(Y1,Y2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of activity coefficients for Scatchard-Hilderbrand model are Y1 = 1.010245 \t and \t Y2 = 1.017658\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.14 Page Number : 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables,\n",
+ "T = 25 + 273.15;\t\t\t#[K] - Temperature\n",
+ "mol_HCl = 0.001;\t\t\t#[mol/kg] - Molality of HCl\n",
+ "A = 0.510;\t\t\t#[(kg/mol)**(1/2)]\n",
+ "Z_positive = 1;\t\t\t#Stoichiometric coefficient of 'H' ion\n",
+ "Z_negative = -1;\t\t\t#Stoichiometric coefficient of 'Cl' ion\n",
+ "m_H_positive = mol_HCl;\t\t\t#\n",
+ "m_Cl_negative = mol_HCl;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# I = 1/2*[((Z_positive)**(2))*m_H_positive + ((Z_negative)**(2))*m_Cl_negative]\n",
+ "I = 1./2*(((Z_positive)**(2))*m_H_positive + ((Z_negative)**(2))*m_Cl_negative);\n",
+ "\n",
+ "#Using Debye-Huckel limiting law wee get,\n",
+ "# math.log(Y1) = -A*(abs(Z_positive*Z_negative))*(I**(1/2)))\n",
+ "Y = 10**(-A*(abs(Z_positive*Z_negative))*(I**(1./2)));\n",
+ "print \"The mean activity coefficient at 25 C using Debye-Huckel limiting law is Y = %f\"%(Y);\n",
+ "\n",
+ "#Using Debye-Huckel extended model we get\n",
+ "#math.log(Y_prime) = (-A*(abs(Z_positive*Z_negative))*(I**(1/2)))/(1 + (I**(1/2)));\n",
+ "Y_prime = 10**((-A*(abs(Z_positive*Z_negative))*(I**(1./2)))/(1 + (I**(1./2))));\n",
+ "print \"The mean activity coefficient at 25 C using Debye-Huckel extended model is Y = %f\"%(Y_prime);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean activity coefficient at 25 C using Debye-Huckel limiting law is Y = 0.963546\n",
+ "The mean activity coefficient at 25 C using Debye-Huckel extended model is Y = 0.964643\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.15 Page Number : 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables,\n",
+ "T = 25 + 273.15;\t\t\t#[K] - Temperature\n",
+ "mol_CaCl2 = 0.001;\t\t\t#[mol/kg] - Molality of HCl\n",
+ "A = 0.510;\t\t\t#[(kg/mol)**(1/2)]\n",
+ "Z_positive = 2;\t\t\t#Stoichiometric coefficient of 'Ca' ion\n",
+ "Z_negative = -1;\t\t\t#Stoichiometric coefficient of 'Cl' ion\n",
+ "m_Ca_positive = mol_CaCl2;\n",
+ "m_Cl_negative = 2*mol_CaCl2;\n",
+ "\n",
+ "# Calculations\n",
+ "# I = 1/2*[((Z_positive)**(2))*m_Ca_positive + ((Z_negative)**(2))*m_Cl_negative]\n",
+ "I = 1./2*(((Z_positive)**(2))*m_Ca_positive + ((Z_negative)**(2))*m_Cl_negative);\n",
+ "\n",
+ "#Using Debye-Huckel limiting law wee get,\n",
+ "# math.log(Y1) = -A*(abs(Z_positive*Z_negative))*(I**(1/2)))\n",
+ "Y = 10**(-A*(abs(Z_positive*Z_negative))*(I**(1./2)));\n",
+ "\n",
+ "# Results\n",
+ "print \"The mean activity coefficient at 25 C using Debye-Huckel limiting law is Y = %f\"%(Y);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean activity coefficient at 25 C using Debye-Huckel limiting law is Y = 0.879290\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.17 Page Number : 488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables,\n",
+ "T = 50 + 273.15;\t\t\t#[K] - Temperature\n",
+ "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "x_1 = 0.3;\t\t\t# Mole fraction of component 1\n",
+ "x_2 = (1-x_1);\t\t\t# Mole fraction of component 2\n",
+ "#Increment of 1% means Y2 = 1.01*Y1\n",
+ "\n",
+ "# Calculations\n",
+ "#Excess volume of the mixture is given by,\n",
+ "V_excess = 4*x_1*x_2;\t\t\t#[cm**(3)/mol]\n",
+ "#Amd threfore\n",
+ "V_1_excess = 4*x_2*x_2*10**(-6);\t\t\t#[m**(3)/mol] - Exces volume of component 1\n",
+ "V_2_excess = 4*x_1*x_1*10**(-6);\t\t\t#[m**(3)/mol] - Exces volume of component 2\n",
+ "\n",
+ "#We have from equation 14.89 of the book,\n",
+ "#V_i_excess/(R*T) = (del_math.log(Y_i)/del_P)_T,x\n",
+ "\n",
+ "#Rearranging above equation\n",
+ "#d(math.log(Y1)) = (V1_excess/(R*T))dP\n",
+ "#Integrating the above equation at constant 'T' and 'x' in the limit from 'Y1' to '1.01*Y1' in the LHS and from 'P' to 'P+delta_P' in the RHS\n",
+ "#On simplification we get\n",
+ "#math.log(1.01*Y1/Y1) = (V_1_exces/(R*T))*delta_P\n",
+ "delta_P = math.log(1.01)/(V_1_excess/(R*T));\t\t\t#[N/m**(2)]\n",
+ "delta_P = delta_P*10**(-6);\t\t\t#[MPa]\n",
+ "\n",
+ "# Results\n",
+ "print \"The required pressure to increase the activity coefficient by 1%% is %f MPa\"%(delta_P);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required pressure to increase the activity coefficient by 1% is 13.639411 MPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.21 Page Number : 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 293.15;\t\t\t#[K] - Temperature\n",
+ "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "A = 1280;\t\t\t#[J/mol]\n",
+ "\n",
+ "#(dA/dT)_P,x = del_A (say)\n",
+ "dA_dT = -7.0;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "#For equilomar mixture,\n",
+ "x_1 = 0.5;\t\t\t# Mole fraction of component 1\n",
+ "x_2 = 0.5;\t\t\t# Mole fraction of component 2\n",
+ "\n",
+ "# Calculations\n",
+ "#math.log(Y1) = (A/(R*T))*x_2**(2)\n",
+ "#math.log(Y2) = (A/(R*T))*x_1**(2)\n",
+ "Y1 = math.exp((A/(R*T))*x_2**(2));\n",
+ "Y2 = math.exp((A/(R*T))*x_1**(2));\n",
+ "\n",
+ "#G_excess/(R*T*) = x_1*math.log(Y1) + x_2*math.log(Y2) = (A/(R*T))*x_1*x_2\n",
+ "G_excess = A*x_1*x_2;\t\t\t#[J/mol] - Excess Gibbs free energy\n",
+ "\n",
+ "#H_excess/(R*T**(2)) = -[d/dT(G_excess/(R*T))]_P,x\n",
+ "#H_excess/(R*T**(2)) = -((x_1*x_2)/R)*[d/dT(A/T)]_P,x\n",
+ "#On simplification and putting the values we get\n",
+ "H_excess = A*x_1*x_2 - T*dA_dT*x_1*x_2;\t\t\t#[J/mol] - Excess enthalpy\n",
+ "\n",
+ "#Now excess entropy is given by\n",
+ "S_excess = (H_excess - G_excess)/T;\t\t\t#[J/mol-K] - Excess entropy\n",
+ "\n",
+ "# Results\n",
+ "print \"For equimolar mixture\";\n",
+ "print \"Excess Gibbs free energy G_excess) is %f J/mol\"%(G_excess);\n",
+ "print \"Excess enthalpy H_excess) is %f J/mol\"%(H_excess);\n",
+ "print \"Excess entropy S_excess) is %f J/mol\"%(S_excess);\n",
+ "print \"The value of activity coefficient Y1 is %f\"%(Y1);\n",
+ "print \"The value of activity coefficient Y2 is %f\"%(Y2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For equimolar mixture\n",
+ "Excess Gibbs free energy G_excess) is 320.000000 J/mol\n",
+ "Excess enthalpy H_excess) is 833.012500 J/mol\n",
+ "Excess entropy S_excess) is 1.750000 J/mol\n",
+ "The value of activity coefficient Y1 is 1.140305\n",
+ "The value of activity coefficient Y2 is 1.140305\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.22 Page Number : 491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Given\n",
+ "T = 60 + 273.15;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# math.log(Y1_inf) = math.log(Y2_inf) = 0.15 + 10/T\n",
+ "\n",
+ "\n",
+ "# From van L# Variablesr equation \n",
+ "# A = math.log(Y1_inf) and B = math.log(Y2_inf) and since it is given that math.log(Y1_inf) = math.log(Y2_inf), therefore A = B\n",
+ "#(x_1*x_2)/(G_excess/R*T) = x_1/B + x_2/A = X_1/A + x_2/A = 1/A\n",
+ "# G_excess/(R*T) = A*x_1*x_2\n",
+ "\n",
+ "# For equilomar mixture,\n",
+ "x_1 = 0.5;\t\t\t# Mole fraction of component 1\n",
+ "x_2 = 0.5;\t\t\t# Mole fraction of component 2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# Expression for A can be written as\n",
+ "# A = 0.15 + 10/T, where T is in C. Therefore\n",
+ "A = 0.15 + 10/(T - 273.15);\n",
+ "# Differentiating it with respect to temprature we get\n",
+ "dA_dT = - 10/((T-273.15)**(2));\n",
+ "\n",
+ "# The excess Gibbs free energy can be calculated as\n",
+ "G_excess = A*x_1*x_2*(R*T);\t\t\t#[J/mol]\n",
+ "\n",
+ "# The ideal Gibbs free energy change can be calculated as\n",
+ "delta_G_id_mix = R*T*(x_1*math.log(x_1) + x_2*math.log(x_2));\t\t\t#[J/mol]\n",
+ "\n",
+ "# Finally we have,\n",
+ "delta_G_mix = G_excess + delta_G_id_mix;\t\t\t#[J/mol]\n",
+ "\n",
+ "print \"The Gibbs free energy change of mixing for equimolar mixture is %f J/mol\"%(delta_G_mix);\n",
+ "\n",
+ "\n",
+ "# Now let us determine the excess enthalpy. We know that\n",
+ "# H_excess/(R*T**(2)) = -[d/dT(G_excess/R*T)]_P,x = - x_1*x_2*[d/dT(A)]_P,x\n",
+ "# Therefore at 'T' = 60 C the excess enthalpy is given by\n",
+ "H_excess = -R*(T**(2))*x_1*x_2*dA_dT;\t\t\t#[J/mol]\n",
+ "\n",
+ "delta_H_id_mix = 0;\t\t\t#[J/mol] - Enthalpy change of mixing for ideal solution is zero.\n",
+ "\n",
+ "#Thus enthalpy change of mixing for an equimolar mixture at 333.15 K is given by\n",
+ "delta_H_mix = delta_H_id_mix + H_excess;\t\t\t#[J/mol]\n",
+ "\n",
+ "\n",
+ "print \"The enthalpy change of mixing for equimolar mixture is %f J/mol\"%(delta_H_mix);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Gibbs free energy change of mixing for equimolar mixture is -1700.608815 J/mol\n",
+ "The enthalpy change of mixing for equimolar mixture is 640.806876 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch15_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch15_1.ipynb new file mode 100755 index 00000000..83aaf521 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch15_1.ipynb @@ -0,0 +1,2056 @@ +{
+ "metadata": {
+ "name": "ch15_1",
+ "signature": "sha256:aa6f699613cdf9bcba2dda4617212630ca1760d21939d5cd99d17e7e03b7e885"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15 : Vapour Liquid Equilibrium"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.1 Page Number : 503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 90+ 273.15;\t\t\t#[K] - Temperature\n",
+ "P = 1;\t\t\t#[atm] - Pressure\n",
+ "x_1 = 0.5748;\t\t\t# Equilibrium composition of liquid phase\n",
+ "y_1 = 0.7725;\t\t\t# Equilibrium composition of vapour phase\n",
+ "\n",
+ "\t\t\t# We start with 1 mol of mixture of composition z_1 = 0.6, from marterial balance we get\n",
+ "\t\t\t# (L + V)*z_1 = L*x_1 + V*y_1\n",
+ "\t\t\t# Since total number of moles is 1, we get\n",
+ "\t\t\t# z_1 = L*x_1 + (1-L)*y_1\n",
+ "\n",
+ "# Calculations and Results\n",
+ "z_1_1 = 0.6;\t\t\t# - Mole fraction of benzene\n",
+ "L_1 = (z_1_1 - y_1)/(x_1 - y_1);\n",
+ "V_1 = 1 - L_1;\n",
+ "\n",
+ "print \" For z_1 = 0.6\";\n",
+ "print \" The moles in the liquid phase is %f mol\"%(L_1);\n",
+ "print \" The moles in the vapour phase is %f mol\"%(V_1);\n",
+ "\n",
+ "z_1_2 = 0.7;\t\t\t# - Mole fraction of benzene\n",
+ "L_2 = (z_1_2 - y_1)/(x_1 - y_1);\n",
+ "V_2 = 1 - L_2;\n",
+ "\n",
+ "print \" For z_1 = 0.7\";\n",
+ "print \" The moles in the liquid phase is %f mol\"%(L_2);\n",
+ "print \" The moles in the vapour phase is %f mol\"%(V_2);\n",
+ "\n",
+ "\n",
+ "\t\t\t# For z = 0.8\n",
+ "\t\t\t# The feed remains vapour and the liquid is not formed at all as it is outside the two-phase region (x_1 = 0.5748 and y_1 = 0.7725).\n",
+ "print \" For z_1 = 0.8\";\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " For z_1 = 0.6\n",
+ " The moles in the liquid phase is 0.872534 mol\n",
+ " The moles in the vapour phase is 0.127466 mol\n",
+ " For z_1 = 0.7\n",
+ " The moles in the liquid phase is 0.366717 mol\n",
+ " The moles in the vapour phase is 0.633283 mol\n",
+ " For z_1 = 0.8\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.2 Page Number : 515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "\t\t\t# math.log(P_1_sat) = 14.39155 - 2795.817/(t + 230.002)\n",
+ "\t\t\t# math.log(P_2_sat) = 16.26205 - 3799.887/(t + 226.346)\n",
+ "\n",
+ "\t\t\t#(a)\n",
+ "x_1_a =0.43;\t\t\t# Equilibrium composition of liquid phase\n",
+ "t_a = 76;\t\t\t#[C] - Temperature\n",
+ "x_2_a = 1 - x_1_a;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# Since liquid phase composition is given we use the relation \n",
+ "\t\t\t# P = x_1*P_1_sat + x_2*P_2_sat\n",
+ "\t\t\t# At t = 76 C\n",
+ "P_1_sat_a = math.exp(14.39155 - 2795.817/(t_a + 230.002));\n",
+ "P_2_sat_a = math.exp(16.26205 - 3799.887/(t_a + 226.346));\n",
+ "\t\t\t# Therefore total pressure is\n",
+ "P_a = x_1_a*P_1_sat_a + x_2_a*P_2_sat_a;\t\t\t#[kPa]\n",
+ "y_1_a = (x_1_a*P_1_sat_a)/(P_a);\n",
+ "y_2_a = (x_2_a*P_2_sat_a)/(P_a);\n",
+ "\n",
+ "print \"a).The system pressure is = %f kPa\"%(P_a);\n",
+ "print \" The vapour phase composition is y_1 = %f\"%(y_1_a);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "y_1_b = 0.43;\t\t\t# Equilibrium composition of vapour phase\n",
+ "y_2_b = 1 - y_1_b;\n",
+ "t_b = 76;\t\t\t#[C] - Temperature\n",
+ "\n",
+ "P_1_sat_b = math.exp(14.39155 - 2795.817/(t_b + 230.002));\n",
+ "P_2_sat_b = math.exp(16.26205 - 3799.887/(t_b + 226.346));\n",
+ "\n",
+ "\t\t\t# Since vapour phase composition is given ,the system pressure is given by\n",
+ "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat\n",
+ "P_b = 1/(y_1_b/P_1_sat_b + y_2_b/P_2_sat_b);\n",
+ "\n",
+ "x_1_b = (y_1_b*P_b)/P_1_sat_b;\n",
+ "x_2_b = (y_2_b*P_b)/P_2_sat_b;\n",
+ "\n",
+ "print \"b).The system pressure is P = %f kPa\"%(P_b);\n",
+ "print \" The liquid phase composition is x_1 = %f\"%(x_1_b);\n",
+ "\n",
+ "\t\t\t#(c)\n",
+ "x_1_c = 0.32;\t\t\t# Equilibrium composition of liquid phase\n",
+ "x_2_c = 1 - x_1_c;\n",
+ "P_c = 101.33;\t\t\t#[kPa] - Pressure of the system\n",
+ "\n",
+ "\t\t\t# We have, P = x_1*P_1_sat + x_2*P_2_sat\n",
+ "t_1_sat = 2795.817/(14.39155 - math.log(P_c)) - 230.002;\n",
+ "t_2_sat = 3799.887/(16.26205 - math.log(P_c)) - 226.346;\n",
+ "t = x_1_c*t_1_sat + x_2_c*t_2_sat;\n",
+ "\n",
+ "error = 10;\n",
+ "while(error>0.1):\n",
+ " P_1_sat = math.exp(14.39155 - 2795.817/(t + 230.002));\n",
+ " P_2_sat = math.exp(16.26205 - 3799.887/(t + 226.346));\n",
+ " P = x_1_c*P_1_sat + x_2_c*P_2_sat;\n",
+ " error=abs(P - P_c);\n",
+ " t = t - 0.1;\n",
+ "\n",
+ "P_1_sat_c = math.exp(14.39155 - 2795.817/(t + 230.002));\n",
+ "P_2_sat_c = math.exp(16.26205 - 3799.887/(t + 226.346));\n",
+ "\n",
+ "y_1_c = (x_1_c*P_1_sat_c)/(P_c);\n",
+ "y_2_c = 1 - y_1_c;\n",
+ "\n",
+ "print \"c).The system temperature is t = %f C\"%(t);\n",
+ "print \" The vapour phase composition is y_1 = %f\"%(y_1_c);\n",
+ "\n",
+ "\t\t\t#(d)\n",
+ "y_1_d = 0.57;\t\t\t# Vapour phase composition\n",
+ "y_2_d = 1 - y_1_d;\n",
+ "P_d = 101.33;\t\t\t#[kPa] - Pressure of the system\n",
+ "\n",
+ "\t\t\t# Since vapour phase composition is given, we can use the relation\n",
+ "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat\n",
+ "t_1_sat_d = 2795.817/(14.39155 - math.log(P_d)) - 230.002;\n",
+ "t_2_sat_d = 3799.887/(16.26205 - math.log(P_d)) - 226.346;\n",
+ "t_d = y_1_d*t_1_sat_d + y_2_d*t_2_sat_d;\n",
+ "\n",
+ "fault = 10;\n",
+ "while(fault>0.1):\n",
+ " P_1_sat_prime = math.exp(14.39155 - 2795.817/(t_d + 230.002));\n",
+ " P_2_sat_prime = math.exp(16.26205 - 3799.887/(t_d + 226.346));\n",
+ " P_prime = 1/(y_1_d/P_1_sat_prime + y_2_d/P_2_sat_prime);\n",
+ " fault=abs(P_prime - P_d);\n",
+ " t_d = t_d + 0.01;\n",
+ "\n",
+ "P_1_sat_d = math.exp(14.39155 - 2795.817/(t_d + 230.002));\n",
+ "P_2_sat_d = math.exp(16.26205 - 3799.887/(t_d + 226.346));\n",
+ "\n",
+ "x_1_d = (y_1_d*P_d)/(P_1_sat_d);\n",
+ "x_2_d = 1 - x_1_d;\n",
+ "\n",
+ "print \"d).The system temperature is t = %f C\"%(t_d);\n",
+ "print \" The liquid phase composition is x_1 = %f\"%(x_1_d);\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a).The system pressure is = 105.268363 kPa\n",
+ " The vapour phase composition is y_1 = 0.782290\n",
+ "b).The system pressure is P = 60.894254 kPa\n",
+ " The liquid phase composition is x_1 = 0.136725\n",
+ "c).The system temperature is t = 79.943314 C\n",
+ " The vapour phase composition is y_1 = 0.679347\n",
+ "d).The system temperature is t = 84.600005 C\n",
+ " The liquid phase composition is x_1 = 0.234934\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.3 Page Number : 516"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "x_1_a = 0.25;\t\t\t# Equilibrium composition of liquid phase\n",
+ "x_2_a = 0.35;\n",
+ "x_3_a = 1 - x_1_a - x_2_a;\n",
+ "t_a = 80;\t\t\t#[C] - Temperature\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# At t = 80 C\n",
+ "P_1_sat_a = math.exp(14.3916 - 2795.82/(t_a + 230.00));\n",
+ "P_2_sat_a = math.exp(14.2724 - 2945.47/(t_a + 224.00));\n",
+ "P_3_sat_a = math.exp(14.2043 - 2972.64/(t_a + 209.00));\n",
+ "\n",
+ "\t\t\t# Since liquid phase composition is given we use the relation \n",
+ "P_a = x_1_a*P_1_sat_a + x_2_a*P_2_sat_a + x_3_a*P_3_sat_a;\t\t\t#[kPa]\n",
+ "\n",
+ "y_1_a = (x_1_a*P_1_sat_a)/(P_a);\n",
+ "y_2_a = (x_2_a*P_2_sat_a)/(P_a);\n",
+ "y_3_a = (x_3_a*P_3_sat_a)/(P_a);\n",
+ "\n",
+ "print \"a).The system pressure is P = %f kPa\"%(P_a);\n",
+ "print \" The vapour phase composition is given by y_1 = %f y_2 = %f and y_3 = %f \"%(y_1_a,y_2_a,y_3_a);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "y_1_b = 0.50;\t\t\t# Equilibrium composition of liquid phase\n",
+ "y_2_b = 0.30;\n",
+ "y_3_b = 1 - y_1_a - y_2_a;\n",
+ "t_b = 85;\t\t\t#[C] - Temperature\n",
+ "\n",
+ "\t\t\t# At t = 80 C\n",
+ "P_1_sat_b = math.exp(14.3916 - 2795.82/(t_b + 230.00));\n",
+ "P_2_sat_b = math.exp(14.2724 - 2945.47/(t_b + 224.00));\n",
+ "P_3_sat_b = math.exp(14.2043 - 2972.64/(t_b + 209.00));\n",
+ "\n",
+ "\t\t\t# Since vapour phase composition is given we use the relation \n",
+ "P_b = 1/(y_1_b/P_1_sat_b + y_2_b/P_2_sat_b + y_3_b/P_3_sat_b);\t\t\t#[kPa]\n",
+ "\n",
+ "\t\t\t# Therefore we have\n",
+ "x_1_b = (y_1_b*P_b)/P_1_sat_b;\n",
+ "x_2_b = (y_2_b*P_b)/P_2_sat_b;\n",
+ "x_3_b = (y_3_b*P_b)/P_3_sat_b;\n",
+ "\n",
+ "print \"b).The system pressure is P = %f kPa\"%(P_b);\n",
+ "print \" The liquid phase composition is given by x_1 = %f x_2 = %f and x_3 = %f \"%(x_1_b,x_2_b,x_3_b);\n",
+ "\n",
+ "\t\t\t#(c)\n",
+ "x_1_c = 0.30;\t\t\t# Equilibrium composition of liquid phase\n",
+ "x_2_c = 0.45;\n",
+ "x_3_c = 1 - x_1_c - x_2_c;\n",
+ "P_c = 80;\t\t\t#[kPa] - Pressure of the system\n",
+ "\n",
+ "\t\t\t# We have, P = x_1*P_1_sat + x_2*P_2_sat + x_3*P_3_sat\n",
+ "t_1_sat = 2795.82/(14.3916 - math.log(P_c)) - 230.00;\t\t\t#[C]\n",
+ "t_2_sat = 2945.47/(14.2724 - math.log(P_c)) - 224.00;\t\t\t#[C]\n",
+ "t_3_sat = 2972.64/(14.2043 - math.log(P_c)) - 209.00;\t\t\t#[C]\n",
+ "t = x_1_c*t_1_sat + x_2_c*t_2_sat + x_3_c*t_3_sat;\n",
+ "\n",
+ "error = 10;\n",
+ "while(error>0.5):\n",
+ " P_1_sat = math.exp(14.3916 - 2795.82/(t + 230.00));\n",
+ " P_2_sat = math.exp(14.2724 - 2945.47/(t + 224.00));\n",
+ " P_3_sat = math.exp(14.2043 - 2972.64/(t + 209.00));\n",
+ " P = x_1_c*P_1_sat + x_2_c*P_2_sat + x_3_c*P_3_sat;\n",
+ " error=abs(P - P_c);\n",
+ " t = t - 0.2;\n",
+ "\n",
+ "P_1_sat_c = math.exp(14.3916 - 2795.82/(t + 230.00));\n",
+ "P_2_sat_c = math.exp(14.2724 - 2945.47/(t + 224.00));\n",
+ "P_3_sat_c = math.exp(14.2043 - 2972.64/(t + 209.00));\n",
+ "\n",
+ "y_1_c = (x_1_c*P_1_sat_c)/(P_c);\n",
+ "y_2_c = (x_2_c*P_2_sat_c)/(P_c);\n",
+ "y_3_c = 1 - y_1_c - y_2_c;\n",
+ "\n",
+ "print \"c).The system temperature is t = %f C\"%(t);\n",
+ "print \" The vapour phase composition is y_1 = %f y_2 %f and y_3 = %f\"%(y_1_c,y_2_c,y_3_c);\n",
+ "\n",
+ "\t\t\t#(d)\n",
+ "y_1_d = 0.6;\t\t\t# Vapour phase composition\n",
+ "y_2_d = 0.2;\n",
+ "y_3_d = 1 - y_1_d - y_2_d;\n",
+ "P_d = 90;\t\t\t#[kPa] - Pressure of the system\n",
+ "\n",
+ "\t\t\t# Since vapour phase composition is given, we can use the relation\n",
+ "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat + y_3/P_3_sat\n",
+ "t_1_sat_d = 2795.82/(14.3916 - math.log(P_d)) - 230.00;\n",
+ "t_2_sat_d = 2945.47/(14.2724 - math.log(P_d)) - 224.00;\n",
+ "t_3_sat_d = 2972.64/(14.2043 - math.log(P_d)) - 209.00;\n",
+ "t_d = y_1_d*t_1_sat_d + y_2_d*t_2_sat_d + y_3_d*t_3_sat_d;\n",
+ "\n",
+ "fault = 10;\n",
+ "while(fault>0.5):\n",
+ " P_1_sat_prime = math.exp(14.3916 - 2795.82/(t_d + 230.00));\n",
+ " P_2_sat_prime = math.exp(14.2724 - 2945.47/(t_d + 224.00));\n",
+ " P_3_sat_prime = math.exp(14.2043 - 2972.64/(t_d + 209.00));\n",
+ " P_prime = 1/(y_1_d/P_1_sat_prime + y_2_d/P_2_sat_prime + y_3_d/P_3_sat_prime);\n",
+ " fault=abs(P_prime - P_d);\n",
+ " t_d = t_d + 0.2;\n",
+ "\n",
+ "P_1_sat_d = math.exp(14.3916 - 2795.82/(t_d + 230.00));\n",
+ "P_2_sat_d = math.exp(14.2724 - 2945.47/(t_d + 224.00));\n",
+ "P_3_sat_d = math.exp(14.2043 - 2972.64/(t_d + 209.00));\n",
+ "\n",
+ "x_1_d = (y_1_d*P_d)/(P_1_sat_d);\n",
+ "x_2_d = (y_2_d*P_d)/(P_2_sat_d);\n",
+ "x_3_d = 1 - x_1_d - x_2_d;\n",
+ "\n",
+ "print \"d).The system temperature is t = %f C\"%(t_d);\n",
+ "print \" The liquid phase composition is x_1 = %f x_2 = %f and x_3 = %f\"%(x_1_d,x_2_d,x_3_d);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a).The system pressure is P = 108.239332 kPa\n",
+ " The vapour phase composition is given by y_1 = 0.497672 y_2 = 0.316379 and y_3 = 0.185948 \n",
+ "b).The system pressure is P = 129.287998 kPa\n",
+ " The liquid phase composition is given by x_1 = 0.259997 x_2 = 0.338895 and x_3 = 0.401108 \n",
+ "c).The system temperature is t = 67.020387 C\n",
+ " The vapour phase composition is y_1 = 0.544826 y_2 0.357251 and y_3 = 0.097922\n",
+ "d).The system temperature is t = 73.127683 C\n",
+ " The liquid phase composition is x_1 = 0.307471 x_2 = 0.230183 and x_3 = 0.462346\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.4 Page Number : 519"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "T = 120;\t\t\t#[C] - Temperature\n",
+ "P_1 = 1;\t\t\t#[atm] - Initial pressure\n",
+ "P_1 = P_1*101.325;\t\t\t#[kPa]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "y_1 = 0.3;\t\t\t# Mole fraction of propane\n",
+ "y_2 = 0.5;\t\t\t# Mole fraction of butane\n",
+ "y_3 = 0.2;\t\t\t# Mole fraction of hexane\n",
+ "\n",
+ "\t\t\t# math.log(P_1_sat) = 13.7713 - 1892.47/(t + 248.82)\n",
+ "\t\t\t# math.log(P_2_sat) = 13.7224 - 2151.63/(t + 236.91)\n",
+ "\t\t\t# math.log(P_3_sat) = 13.8216 - 2697.55/(t + 224.37)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(a)\n",
+ "P_1_sat = math.exp(13.7713 - 1892.47/(T + 248.82));\n",
+ "P_2_sat = math.exp(13.7224 - 2151.63/(T + 236.91));\n",
+ "P_3_sat = math.exp(13.8216 - 2697.55/(T + 224.37));\n",
+ "\n",
+ "\t\t\t# Since vapour phase composition is given we can use the relation,\n",
+ "P_2 = 1/(y_1/P_1_sat + y_2/P_2_sat + y_3/P_3_sat);\t\t\t#[kPa]\n",
+ "\n",
+ "print \" a).The pressure of the mixture when first drop condenses is given by P = %f kPa\"%(P_2);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "x_1 = (y_1*P_2)/P_1_sat;\n",
+ "x_2 = (y_2*P_2)/P_2_sat;\n",
+ "x_3 = (y_3*P_2)/P_3_sat;\n",
+ "\n",
+ "print \" b).The liquid phase composition is given by x_1 propane = %f x_2 butane = %f and x_3 hexane = %f \"%(x_1,x_2,x_3);\n",
+ "\n",
+ "\t\t\t# (c)\n",
+ "\t\t\t# Work transfer per mol is given by\n",
+ "\t\t\t# W = integral(P*dV) = integral((R*T/V)*dV) = R*T*math.log(V_2/V_1) = R*T*math.log(P_1/P_2)\n",
+ "w = R*(T+273.15)*math.log(P_1/P_2);\t\t\t#[J/mol]\n",
+ "\t\t\t# For 100 mol\n",
+ "W = w*100;\t\t\t#[J]\n",
+ "W = W*10**(-3);\t\t\t#[kJ]\n",
+ "print \" c).The work required for 100 mol of mixture handeled is %f kJ\"%(W);\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The pressure of the mixture when first drop condenses is given by P = 1278.060855 kPa\n",
+ " b).The liquid phase composition is given by x_1 propane = 0.067811 x_2 butane = 0.291139 and x_3 hexane = 0.641049 \n",
+ " c).The work required for 100 mol of mixture handeled is -828.526086 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.5 Page Number : 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "# Variables\n",
+ "T = 27;\t\t\t#[C] - Temperature\n",
+ "\n",
+ "\t\t\t# math.log(P_1_sat) = 13.8216 - 2697.55/(t + 224.37)\n",
+ "\t\t\t# math.log(P_2_sat) = 13.8587 - 2911.32/(t + 216.64)\n",
+ "\n",
+ "\t\t\t#(a)\n",
+ "x_1_a = 0.2;\n",
+ "x_2_a = 1 - x_1_a;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# At t = 27 C\n",
+ "P_1_sat = math.exp(13.8216 - 2697.55/(T + 224.37));\t\t\t#[kPa]\n",
+ "P_2_sat = math.exp(13.8587 - 2911.32/(T + 216.64));\t\t\t#[kPa]\n",
+ "P_a = x_1_a*P_1_sat + x_2_a*P_2_sat;\t\t\t#[kPa]\n",
+ "\n",
+ "y_1_a = x_1_a*P_1_sat/P_a;\n",
+ "y_2_a = x_2_a*P_2_sat/P_a;\n",
+ "\n",
+ "print \"a).The total pressure is P = %f kPa\"%(P_a);\n",
+ "print \" The vapour phase composition is given by y_1 = %f and y_2 = %f\"%(y_1_a,y_2_a);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "y_1_b = 0.2;\n",
+ "y_2_b = 1 - y_1_b;\n",
+ "\t\t\t# Since vapour phase composition is given we can use the relation \n",
+ "P_b = 1/(y_1_b/P_1_sat + y_2_b/P_2_sat);\t\t\t#[kPa]\n",
+ "\n",
+ "\t\t\t# Therefore we have\n",
+ "x_1_b = (y_1_b*P_b)/P_1_sat;\n",
+ "x_2_b = (y_2_b*P_b)/P_2_sat;\n",
+ "\n",
+ "print \"b).The total pressure is, P = %f kPa\"%(P_b);\n",
+ "print \" The liquid phase composition is given by x_1 = %f and x_2 = %f\"%(x_1_b,x_2_b);\n",
+ "\n",
+ "\t\t\t#(c)\n",
+ "P_c = 30;\t\t\t#[kPa] - Total pressure\n",
+ "x_1_c = 0.2;\n",
+ "x_2_c = 1 - x_1_c;\n",
+ "\n",
+ "\t\t\t# We have, P = x_1*P_1_sat + x_2*P_2_sat\n",
+ "t_1_sat = 2697.55/(13.8216 - math.log(P_c)) - 224.37;\n",
+ "t_2_sat = 2911.32/(13.8587 - math.log(P_c)) - 216.64;\n",
+ "t = x_1_c*t_1_sat + x_2_c*t_2_sat;\n",
+ "\n",
+ "fault = 10;\n",
+ "while(fault>0.3):\n",
+ " P_1_sat = math.exp(13.8216 - 2697.55/(t + 224.37));\n",
+ " P_2_sat = math.exp(13.8587 - 2911.32/(t + 216.64));\n",
+ " P = x_1_c*P_1_sat + x_2_c*P_2_sat;\n",
+ " fault = abs(P - P_c);\n",
+ " t = t - 0.1;\n",
+ "\n",
+ "P_1_sat_c = math.exp(13.8216 - 2697.55/(t + 224.37));\n",
+ "P_2_sat_c = math.exp(13.8587 - 2911.32/(t + 216.64));\n",
+ "\n",
+ "y_1_c = (x_1_c*P_1_sat_c)/(P_c);\n",
+ "y_2_c = 1 - y_1_c;\n",
+ "\n",
+ "print \"c).The system temperature is t = %f C\"%(t);\n",
+ "print \" The vapour phase composition is y_1 = %f and y_2 = %f \"%(y_1_c,y_2_c);\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a).The total pressure is P = 9.795726 kPa\n",
+ " The vapour phase composition is given by y_1 = 0.448801 and y_2 = 0.551199\n",
+ "b).The total pressure is, P = 7.835131 kPa\n",
+ " The liquid phase composition is given by x_1 = 0.071288 and x_2 = 0.928712\n",
+ "c).The system temperature is t = 53.904663 C\n",
+ " The vapour phase composition is y_1 = 0.413592 and y_2 = 0.586408 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.6 Page Number : 521"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P = 90;\t\t\t#[kPa] - Pressure\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# math.log(P_sat) = A - B/(t + C)\n",
+ "\n",
+ "\t\t\t# For benzene\n",
+ "A_1 = 13.8594;\n",
+ "B_1 = 2773.78;\n",
+ "C_1 = 220.07;\n",
+ "\t\t\t# For ethyl benzene\n",
+ "A_2 = 14.0045;\n",
+ "B_2 = 3279.47;\n",
+ "C_2 = 213.20;\n",
+ "\n",
+ "x_1 = 0.5;\t\t\t# Equimolar mixture\n",
+ "x_2 = 0.5;\n",
+ "\n",
+ "\t\t\t# The bubble point temperature equation is\n",
+ "\t\t\t# P = x_1*P_1_sat + x_2*P_2_sat\n",
+ "\n",
+ "# Calculations and Results\n",
+ "t_1_sat = B_1/(A_1 - math.log(P)) - C_1;\n",
+ "t_2_sat = B_2/(A_2 - math.log(P)) - C_2;\n",
+ "t = x_1*t_1_sat + x_2*t_2_sat;\n",
+ "\n",
+ "fault = 10;\n",
+ "while(fault>0.3):\n",
+ " P_1_sat = math.exp(A_1 - B_1/(t + C_1));\n",
+ " P_2_sat = math.exp(A_2 - B_2/(t + C_2));\n",
+ " P_net = x_1*P_1_sat + x_2*P_2_sat;\n",
+ " fault=abs(P_net - P);\n",
+ " t = t - 0.1;\n",
+ "\n",
+ "print \" The bubble point temperature is %f C\"%(t);\n",
+ "\n",
+ "\t\t\t# Now let us determine dew point temperature for y_1 = 0.5, and P = 90 kPa\n",
+ "y_1 = 0.5;\t\t\t# Equimolar mixture\n",
+ "y_2 = 0.5;\n",
+ "\n",
+ "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat\n",
+ "\t\t\t# Let us statrt with t = 104.07\n",
+ "t_old = 104.07;\n",
+ "error = 10;\n",
+ "while(error>0.3):\n",
+ " P_1_sat_prime = math.exp(A_1 - B_1/(t_old + C_1));\n",
+ " P_2_sat_prime = math.exp(A_2 - B_2/(t_old + C_2));\n",
+ " P_net_prime = 1/(y_1/P_1_sat_prime + y_2/P_2_sat_prime);\n",
+ " error=abs(P_net_prime - P);\n",
+ " t_old = t_old + 0.1;\n",
+ "\n",
+ "print \" The dew point temperature is %f C\"%(t_old);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The bubble point temperature is 93.862003 C\n",
+ " The dew point temperature is 114.470000 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.7 Page Number : 522"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P = 1;\t\t\t#[bar] - Pressure\n",
+ "P = P*10**(2);\t\t\t#[kPa]\n",
+ "\n",
+ "\t\t\t# math.log(P_1_sat) = 13.8594 - 2773.78/(t + 220.07)\n",
+ "\t\t\t# math.log(P_2_sat) = 14.0098 - 3103.01/(t + 219.79)\n",
+ "\n",
+ "\t\t\t# The bubble point equation is\n",
+ "\t\t\t# P = x_1*P_1_sat + x_2*P_2_sat;\n",
+ "\n",
+ "t_1_sat = 2773.78/(13.8594 - math.log(P)) - 220.07;\n",
+ "t_2_sat = 3103.01/(14.0098 - math.log(P)) - 219.79;\n",
+ "\n",
+ "\t\t\t# For x_1 = 0.1\n",
+ "\t\t\t# t = x_1_1*t_1_sat + x_2_1*t_2_sat;\n",
+ "x_1 = [0.1,0.5,0.9];\n",
+ "x_2 = [0,0,0]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "for i in range(3):\n",
+ " x_2[i] = 1 - x_1[i];\n",
+ " t = x_1[i]*t_1_sat + x_2[i]*t_2_sat;\n",
+ " fault = 10;\n",
+ " while(fault>0.3):\n",
+ " P_1_sat = math.exp(13.8594 - 2773.78/(t + 220.07));\n",
+ " P_2_sat = math.exp(14.0098 - 3103.01/(t + 219.79));\n",
+ " P_net = x_1[i]*P_1_sat + x_2[i]*P_2_sat;\n",
+ " fault=abs(P_net - P);\n",
+ " t = t - 0.1;\n",
+ " print \" The bubble point temperature for x_1 = %f) is %f C\"%(x_1[i],t);\n",
+ "\n",
+ "\n",
+ "\n",
+ "\t\t\t# Now let us determine dew point temperature\n",
+ "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat\n",
+ "\n",
+ "y_1 = [0.1,0.5,0.9];\n",
+ "y_2 = [0,0,0]\n",
+ "for j in range(3):\n",
+ " y_2[j] = 1 - y_1[j];\n",
+ " t_prime = y_1[j]*t_1_sat + y_2[j]*t_2_sat;\n",
+ " error = 10;\n",
+ " while(error>0.3):\n",
+ " P_1_sat = math.exp(13.8594 - 2773.78/(t_prime + 220.07));\n",
+ " P_2_sat = math.exp(14.0098 - 3103.01/(t_prime + 219.79));\n",
+ " P_net = 1/(y_1[j]/P_1_sat + y_2[j]/P_2_sat);\n",
+ " error=abs(P_net - P);\n",
+ " t_prime = t_prime + 0.1;\n",
+ " \n",
+ " print \" The dew point temperature for y_1 = %f is %f C\"%(y_1[j],t_prime);\n",
+ "\n",
+ "\n",
+ "\t\t\t#Therefore\n",
+ "print \" The temperature range for z_1 = 0.1 which two phase exist is 105.61 C to 108.11 C\";\n",
+ "print \" The temperature range for z_1 = 0.5 which two phase exist is 91.61 C to 98.40 C\";\n",
+ "print \" The temperature range for z_1 = 0.9 which two phase exist is 81.71 C to 84.51 C\";\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The bubble point temperature for x_1 = 0.100000) is 105.605549 C\n",
+ " The bubble point temperature for x_1 = 0.500000) is 91.607993 C\n",
+ " The bubble point temperature for x_1 = 0.900000) is 81.710437 C\n",
+ " The dew point temperature for y_1 = 0.100000 is 108.105549 C\n",
+ " The dew point temperature for y_1 = 0.500000 is 98.407993 C\n",
+ " The dew point temperature for y_1 = 0.900000 is 84.510437 C\n",
+ " The temperature range for z_1 = 0.1 which two phase exist is 105.61 C to 108.11 C\n",
+ " The temperature range for z_1 = 0.5 which two phase exist is 91.61 C to 98.40 C\n",
+ " The temperature range for z_1 = 0.9 which two phase exist is 81.71 C to 84.51 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.8 Page Number : 524"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "x_1 = 0.20;\n",
+ "x_2 = 0.45;\n",
+ "x_3 = 0.35;\n",
+ "P = 10;\t\t\t#[atm]\n",
+ "P = P*101325*10**(-3);\t\t\t#[kPa]\n",
+ "\n",
+ "\t\t\t# math.log(P_1_sat) = 13.7713 - 1892.47/(t + 248.82)\n",
+ "\t\t\t# math.log(P_2_sat) = 13.7224 - 2151.63/(t + 236.91)\n",
+ "\t\t\t# math.log(P_3_sat) = 13.8183 - 2477.07/(t + 233.21)\n",
+ "\n",
+ "\t\t\t#(a)\n",
+ "\t\t\t# The bubble point equation is\n",
+ "\t\t\t# P = x_1*P_1_sat + x_2*P_2_sat + x_3*P_3_sat\n",
+ "\n",
+ "# Calculations and Results\n",
+ "t_1_sat = 1892.47/(13.7713 - math.log(P)) - 248.82;\n",
+ "t_2_sat = 2151.63/(13.7224 - math.log(P)) - 236.91;\n",
+ "t_3_sat = 2477.07/(13.8183 - math.log(P)) - 233.21;\n",
+ "t = x_1*t_1_sat + x_2*t_2_sat + x_3*t_3_sat;\n",
+ "\n",
+ "fault = 10;\n",
+ "while(fault>0.1):\n",
+ " P_1_sat = math.exp(13.7713 - 1892.47/(t + 248.82));\n",
+ " P_2_sat = math.exp(13.7224 - 2151.63/(t + 236.91));\n",
+ " P_3_sat = math.exp(13.8183 - 2477.07/(t + 233.21));\n",
+ " P_net = x_1*P_1_sat + x_2*P_2_sat + x_3*P_3_sat;\n",
+ " fault=abs(P_net - P);\n",
+ " t = t - 0.003;\n",
+ "\n",
+ "BPT = t;\n",
+ "print \" a).The bubble point temperature is %f C\"%(BPT);\n",
+ "\n",
+ "\t\t\t# (b)\n",
+ "\t\t\t# Now let us determine dew point temperature for y_1 = 0.5, and P = 90 kPa\n",
+ "y_1 = 0.20;\n",
+ "y_2 = 0.45;\n",
+ "y_3 = 0.35;\n",
+ "\n",
+ "\t\t\t# 1/P = y_1/P_1_sat + y_2/P_2_sat + y_3/P_3_sat\n",
+ "\n",
+ "t_old = 90;\t\t\t#[C]\n",
+ "error = 10;\n",
+ "while(error>0.1):\n",
+ " P_1_sat_prime = math.exp(13.7713 - 1892.47/(t_old + 248.82));\n",
+ " P_2_sat_prime = math.exp(13.7224 - 2151.63/(t_old + 236.91));\n",
+ " P_3_sat_prime = math.exp(13.8183 - 2477.07/(t_old + 233.21));\n",
+ " P_net_prime = 1/(y_1/P_1_sat_prime + y_2/P_2_sat_prime + y_3/P_3_sat_prime);\n",
+ " error=abs(P_net_prime - P);\n",
+ " t_old = t_old + 0.003;\n",
+ "\n",
+ "DPT = t_old;\n",
+ "print \" b).The dew point temperature is %f C\"%(DPT);\n",
+ "\n",
+ "\t\t\t# (c)\n",
+ "\t\t\t# Therefore at 82 C two phase exists\n",
+ "\t\t\t# At 82 C and P = 1013.25 kPa pressure\n",
+ "T_c = 82;\t\t\t#[C]\n",
+ "P_c = 1013.25;\t\t\t#[kPa]\n",
+ "z_1 = 0.20;\n",
+ "z_2 = 0.45;\n",
+ "z_3 = 0.35;\n",
+ "\n",
+ "P_1_sat_c = math.exp(13.7713 - 1892.47/(T_c + 248.82));\n",
+ "P_2_sat_c = math.exp(13.7224 - 2151.63/(T_c + 236.91));\n",
+ "P_3_sat_c = math.exp(13.8183 - 2477.07/(T_c + 233.21));\n",
+ "\n",
+ "K_1 = P_1_sat_c/P_c;\n",
+ "K_2 = P_2_sat_c/P_c;\n",
+ "K_3 = P_3_sat_c/P_c;\n",
+ "\n",
+ "\t\t\t# We have to find such a V that the following equation is satisfied.\n",
+ "\t\t\t# summation(y_i) = K_i*z_i/(1-V+V*K_i) = 1\n",
+ "\t\t\t# K_1*z_1/(1-V+V*K_1) + K_2*z_2/(1-V+V*K_2) + K_3*z_3/(1-V+V*K_3) = 1\n",
+ "\n",
+ "def f1(V): \n",
+ "\t return K_1*z_1/(1-V+V*K_1) + K_2*z_2/(1-V+V*K_2) + K_3*z_3/(1-V+V*K_3)-1\n",
+ "V = fsolve(f1,0.4)\n",
+ "\n",
+ "\t\t\t# Therefore now we have\n",
+ "y_1_c = K_1*z_1/(1-V+V*K_1);\n",
+ "y_2_c = K_2*z_2/(1-V+V*K_2);\n",
+ "y_3_c = K_3*z_3/(1-V+V*K_3);\n",
+ "x_1_c = y_1_c/K_1;\n",
+ "x_2_c = y_2_c/K_2;\n",
+ "x_3_c = y_3_c/K_3;\n",
+ "\n",
+ "print \" c).The proportion of vapour is given by V = %f\"%(V);\n",
+ "print \" The composition of vapour foemed is given by y_1 = %f y_2 = %f and y_3 = %f \"%(y_1_c,y_2_c,y_3_c);\n",
+ "print \" The composition of liquid formed is given by x_1 = %f x_2 = %f and x_3 = %f \"%(x_1_c,x_2_c,x_3_c);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The bubble point temperature is 71.833954 C\n",
+ " b).The dew point temperature is 97.254000 C\n",
+ " c).The proportion of vapour is given by V = 0.332143\n",
+ " The composition of vapour foemed is given by y_1 = 0.365018 y_2 = 0.466574 and y_3 = 0.168408 \n",
+ " The composition of liquid formed is given by x_1 = 0.117932 x_2 = 0.441757 and x_3 = 0.440311 \n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.9 Page Number : 526"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T = 27;\t\t\t#[C] - Temperature\n",
+ "z_1 = 0.4;\n",
+ "z_2 = 0.3;\n",
+ "z_3 = 0.3;\n",
+ "\n",
+ "\t\t\t# math.log(P_sat) = A - B/(t + C)\n",
+ "\n",
+ "\t\t\t# For propane\n",
+ "A_1 = 13.7713;\n",
+ "B_1 = 1892.47;\n",
+ "C_1 = 248.82;\n",
+ "\t\t\t# For i-butane\n",
+ "A_2 = 13.4331;\n",
+ "B_2 = 1989.35;\n",
+ "C_2 = 236.84;\n",
+ "\t\t\t# For n-butane\n",
+ "A_3 = 13.7224;\n",
+ "B_3 = 2151.63;\n",
+ "C_3 = 236.91;\n",
+ "\n",
+ "\t\t\t#(a)\n",
+ "\t\t\t\n",
+ "y_1 = z_1;\n",
+ "y_2 = z_2;\n",
+ "y_3 = z_3;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# At 27 C,\n",
+ "P_1_sat = math.exp(A_1 - B_1/(T + C_1));\n",
+ "P_2_sat = math.exp(A_2 - B_2/(T + C_2));\n",
+ "P_3_sat = math.exp(A_3 - B_3/(T + C_3));\n",
+ "\n",
+ "\t\t\t# The dew point pressure is given by\n",
+ "P_1 = 1/(y_1/P_1_sat + y_2/P_2_sat + y_3/P_3_sat); \n",
+ "\n",
+ "\n",
+ "x_1 = z_1;\n",
+ "x_2 = z_2;\n",
+ "x_3 = z_3;\n",
+ "\n",
+ "\t\t\t# The bubble point pressure is given by\n",
+ "P_2 = x_1*P_1_sat + x_2*P_2_sat + x_3*P_3_sat;\n",
+ "\n",
+ "print \" a).The two phase region exists between %f and %f kPa\"%(P_1,P_2);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "\t\t\t# The mean of the two-phase pressure range is given by\n",
+ "P_mean = (P_1 + P_2)/2;\n",
+ "\n",
+ "\t\t\t# Now let us calculate the K values of the components\n",
+ "K_1 = P_1_sat/P_mean;\n",
+ "K_2 = P_2_sat/P_mean;\n",
+ "K_3 = P_3_sat/P_mean;\n",
+ "\n",
+ "\t\t\t# summation of y_i = 1, gives\n",
+ "\t\t\t# (K_1*z_1)/(1-V-K_1*V) + (K_2*z_2)/(1-V-K_2*V) + (K_3*z_3)/(1-V-K_3*V) = 1\n",
+ "\t\t\t# Solving we get\n",
+ "def f(V): \n",
+ "\t return (K_1*z_1)/(1-V+K_1*V) + (K_2*z_2)/(1-V+K_2*V) + (K_3*z_3)/(1-V+K_3*V)-1\n",
+ "V = fsolve(f,0.1)\n",
+ "\n",
+ "y_1_prime = (z_1*K_1)/(1-V+K_1*V);\n",
+ "\n",
+ "print \" b).The mole fraction of propane in vapour phase is %f whereas in the feed is %f and fraction of vapour in the system is %f\"%(y_1_prime,z_1,V);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The two phase region exists between 421.886904 and 588.370027 kPa\n",
+ " b).The mole fraction of propane in vapour phase is 0.559489 whereas in the feed is 0.400000 and fraction of vapour in the system is 0.425313\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.10 Page Number : 527"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 50;\t\t\t#[C] - Temperature\n",
+ "P = 64;\t\t\t#[kPa] - Pressure\n",
+ "z_1 = 0.7;\n",
+ "z_2 = 0.3;\n",
+ "\n",
+ "# math.log(P_sat) = A - B/(t + C)\n",
+ "\n",
+ "# For acetone\n",
+ "A_1 = 14.37824;\n",
+ "B_1 = 2787.498;\n",
+ "C_1 = 229.664;\n",
+ "# For acetonitrile\n",
+ "A_2 = 14.88567;\n",
+ "B_2 = 3413.099;\n",
+ "C_2 = 250.523;\n",
+ "\n",
+ "# Calculations\n",
+ "# At 50 C,\n",
+ "P_1_sat = math.exp(A_1 - B_1/(T + C_1));\t\t\t#[kPa]\n",
+ "P_2_sat = math.exp(A_2 - B_2/(T + C_2));\t\t\t#[kPa]\n",
+ "\n",
+ "# Now let us calculate the K values of the components\n",
+ "K_1 = P_1_sat/P;\n",
+ "K_2 = P_2_sat/P;\n",
+ "\n",
+ "# summation of y_i = 1, gives\n",
+ "# (K_1*z_1)/(1-V-K_1*V) + (K_2*z_2)/(1-V-K_2*V) = 1\n",
+ "# Solving we get\n",
+ "def f(V): \n",
+ " return (K_1*z_1)/(1-V+K_1*V) + (K_2*z_2)/(1-V+K_2*V) -1\n",
+ "V = fsolve(f,0.1)\n",
+ "L = 1 - V;\n",
+ "# Therefore\n",
+ "y_1 = (K_1*z_1)/(1-V+K_1*V);\n",
+ "y_2 = (K_2*z_2)/(1-V+K_2*V);\n",
+ "\n",
+ "x_1 = y_1/K_1;\n",
+ "x_2 = y_2/K_2;\n",
+ "\n",
+ "# Results\n",
+ "print \" The value of V = %f\"%(V);\n",
+ "print \" The value of L = %f\"%(L);\n",
+ "print \" The liquid phase composition is x_1 = %f and x_2 = %f\"%(x_1,x_2);\n",
+ "print \" The vapour phase composition is y_1 = %f and y_2 = %f\"%(y_1,y_2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of V = 0.450368\n",
+ " The value of L = 0.549632\n",
+ " The liquid phase composition is x_1 = 0.619963 and x_2 = 0.380037\n",
+ " The vapour phase composition is y_1 = 0.797678 and y_2 = 0.202322\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.11 Page Number : 528"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P = 12.25*101325*10**(-3);\t\t\t#[kPa]\n",
+ "z_1 = 0.8;\n",
+ "z_2 = 1 - z_1;\n",
+ "V = 0.4;\n",
+ "# math.log(P_1_sat) = 13.7713 - 2892.47/(T + 248.82)\n",
+ "# math.log(P_2_sat) = 13.7224 - 2151.63/(T + 236.91)\n",
+ "\n",
+ "# P_1_sat = math.exp(13.7713 - 21892.47/(T + 248.82));\n",
+ "# P_2_sat = math.exp(13.7224 - 2151.63/(T + 236.91));\n",
+ "\n",
+ "# Let the total mixture be 1 mol\n",
+ "# We have to assume a temperature such that,\n",
+ "# y_1 + y_2 = (K_1*z_1)/(1-V-K_1*V) + (K_2*z_2)/(1-V-K_2*V) = 1\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "x_1 = z_1;\n",
+ "x_2 = z_2;\n",
+ "\n",
+ "# The bubble point pressure is given by\n",
+ "# P = x_1*(math.exp(13.7713 - 21892.47/(T + 248.82))) + x_2*(math.exp(13.7224 - 2151.63/(T + 236.91)));\n",
+ "\n",
+ "# Calculations\n",
+ "def f(T): \n",
+ "\t return x_1*(math.exp(13.7713 - 1892.47/(T + 248.82))) + x_2*(math.exp(13.7224 - 2151.63/(T + 236.91))) - P\n",
+ "T_1 = fsolve(f,0.1)\n",
+ "BPT = T_1;\n",
+ "\n",
+ "\n",
+ "y_1 = z_1;\n",
+ "y_2 = z_2;\n",
+ "\n",
+ "# The dew point equation is given by\n",
+ "# 1/P = y_1/P_1_sat + y_2/P_2_sat\n",
+ "def f1(T): \n",
+ "\t return 1/(y_1/(math.exp(13.7713 - 1892.47/(T + 248.82))) + y_2/(math.exp(13.7224 - 2151.63/(T + 236.91)))) - P\n",
+ "T_2 = fsolve(f1,0.1)\n",
+ "DPT = T_2;\n",
+ "\n",
+ "T = 47;\t\t\t#[C]\n",
+ "error = 10;\n",
+ "while(error>0.001):\n",
+ " P_1_sat = math.exp(13.7713 - 1892.47/(T + 248.82));\n",
+ " P_2_sat = math.exp(13.7224 - 2151.63/(T + 236.91));\n",
+ " K_1 = P_1_sat/P;\n",
+ " K_2 = P_2_sat/P;\n",
+ " y1 = (K_1*z_1)/(1-V+K_1*V);\n",
+ " y2 = (K_2*z_2)/(1-V+K_2*V);\n",
+ " y = y1 + y2;\n",
+ " error=abs(y - 1);\n",
+ " T = T - 0.0001;\n",
+ "\n",
+ "# Results\n",
+ "print \" The temperature when 40 mol of mixture is in the vapour is %f C\"%(T);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The temperature when 40 mol of mixture is in the vapour is 45.333000 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.12 Page Number : 529"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 105;\t\t\t#[C]\n",
+ "P = 1.5;\t\t\t#[atm]\n",
+ "P = P*101325*10**(-3);\t\t\t#[kPa]\n",
+ "z = [0.4,0.3667,0.2333];\t\t\t# Feed composition\n",
+ "x = [0.3,0.3,0.4];\t\t\t# Equilibrium liquid phase composition\n",
+ "y = [0.45,0.40,0.15];\t\t\t# Equilibrium vapour phase composition\n",
+ "\n",
+ "# From the material balance equation of component 1, we get\n",
+ "# (L + V)*z_1 = L*x_1 + V*y_1\n",
+ "\n",
+ "# Since total moles are one, therefore L + V = 1 and thus\n",
+ "# z_1 = L*x_1 + (1-L)*y_1\n",
+ "# Calculations and Results\n",
+ "for i in range(3):\n",
+ " L = (z[i] - y[i])/(x[i] - y[i]);\n",
+ " V = 1 - L;\n",
+ " print \" The number of moles in liquid phase z = %f is given by L = %f\"%(z[i],L);\n",
+ " print \" The number of moles in vapour phase z = %f is given by V = %f\"%(z[i],V);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The number of moles in liquid phase z = 0.400000 is given by L = 0.333333\n",
+ " The number of moles in vapour phase z = 0.400000 is given by V = 0.666667\n",
+ " The number of moles in liquid phase z = 0.366700 is given by L = 0.333000\n",
+ " The number of moles in vapour phase z = 0.366700 is given by V = 0.667000\n",
+ " The number of moles in liquid phase z = 0.233300 is given by L = 0.333200\n",
+ " The number of moles in vapour phase z = 0.233300 is given by V = 0.666800\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.13 Page Number : 530"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 90;\t\t\t#[C]\n",
+ "P = 1;\t\t\t#[atm]\n",
+ "P = P*101325*10**(-3);\t\t\t#[kPa]\n",
+ "z_1 = [0.1,0.5,0.8];\n",
+ "\n",
+ "# Calculations\n",
+ "# math.log(P_1_sat) = 13.8594 - 2773.78/(t + 220.07)\n",
+ "# math.log(P_2_sat) = 14.0098 - 3103.01/(t + 219.79)\n",
+ "\n",
+ "#At T = 90 C\n",
+ "P_1_sat = math.exp(13.8594 - 2773.78/(T + 220.07));\n",
+ "P_2_sat = math.exp(14.0098 - 3103.01/(T + 219.79));\n",
+ "K_1 = P_1_sat/P;\n",
+ "K_2 = P_2_sat/P;\n",
+ "\n",
+ "# For z_1 = 0.1\n",
+ "# y1 = (K_1*z_1(i))/(1-V+K_1*V);\n",
+ "# y2 = (K_2*z_2)/(1-V+K_2*V);\n",
+ "\n",
+ "x_1 = (P - P_2_sat)/(P_1_sat - P_2_sat);\n",
+ "y_1 = (x_1*P_1_sat)/(P);\n",
+ "\n",
+ "# For two phase region to exist at 90 C and 101.325 kPa,z_1 sholud lie between x_1 and y_1\n",
+ "\n",
+ "# Results\n",
+ "print \" For two phase region to exist at 90 C and 101.325 kPa, z_1 sholud lie between %f and %f\"%(x_1,y_1);\n",
+ "print \" For z_1 = 0.1 and z_1 = 0.5 only liquid phase exists V = 0.\"\n",
+ "print \" For z_1 = 0.8 only vapour exists V = 1.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " For two phase region to exist at 90 C and 101.325 kPa, z_1 sholud lie between 0.574884 and 0.772458\n",
+ " For z_1 = 0.1 and z_1 = 0.5 only liquid phase exists V = 0.\n",
+ " For z_1 = 0.8 only vapour exists V = 1.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.14 Page Number : 531"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from numpy import zeros\n",
+ "\n",
+ "# Variables\n",
+ "T = 90;\t\t\t#[C]\n",
+ "P = 1;\t\t\t#[atm]\n",
+ "P = P*101325*10**(-3);\t\t\t#[kPa]\n",
+ "z_1 = [0.1,0.5,0.8];\n",
+ "\n",
+ "# math.log(P_1_sat) = 13.8594 - 2773.78/(t + 220.07)\n",
+ "# math.log(P_2_sat) = 14.0098 - 3103.01/(t + 219.79)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a)\n",
+ "#At T = 90 C\n",
+ "P_1_sat = math.exp(13.8594 - 2773.78/(T + 220.07));\n",
+ "P_2_sat = math.exp(14.0098 - 3103.01/(T + 219.79));\n",
+ "K_1 = P_1_sat/P;\n",
+ "\n",
+ "x_1 = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0];\n",
+ "P_prime = zeros(11);\n",
+ "x_2 = zeros(11);\n",
+ "y_1 = zeros(11);\n",
+ "\n",
+ "print \" a.\";\n",
+ "print \" x_1 \\t\\t P \\t\\t y_1 \";\n",
+ "\n",
+ "for i in range(11):\n",
+ " x_2[i] = 1 - x_1[i];\n",
+ " P_prime[i] = x_1[i]*P_1_sat + x_2[i]*P_2_sat;\n",
+ " y_1[i] = (x_1[i]*P_1_sat)/P_prime[i];\n",
+ " print \" %f \\t %f \\t %f \"%(x_1[i],P_prime[i],y_1[i]);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "T_1_sat = 2773.78/(13.8594-math.log(P)) - 220.07;\t\t\t#[C]\n",
+ "T_2_sat = 3103.01/(14.0098-math.log(P)) - 219.79;\t\t\t#[C]\n",
+ "\n",
+ "T_prime = [110.62,107,104,101,98,95,92,89,86,83,80.09];\n",
+ "\n",
+ "P1_sat = zeros(11);\n",
+ "P2_sat = zeros(11);\n",
+ "x_1 = zeros(11);\n",
+ "y_1 = zeros(11);\n",
+ "\n",
+ "print \" b.\";\n",
+ "print \" TC \\t\\t P_1_sat kPa \\t\\t P_2_sat kPa \\t\\t x_1 \\t\\t y_1 \";\n",
+ "\n",
+ "for j in range(11):\n",
+ " P1_sat[j] = math.exp(13.8594 - 2773.78/(T_prime[j] + 220.07));\n",
+ " P2_sat[j] = math.exp(14.0098 - 3103.01/(T_prime[j] + 219.79));\n",
+ " x_1[j] = (P-P2_sat[j])/(P1_sat[j]-P2_sat[j]);\n",
+ " y_1[j] = (x_1[j]*P1_sat[j])/P;\n",
+ " print \" %f \\t %f \\t %f \\t %f \\t %f \"%(T_prime[j],P1_sat[j],P2_sat[j],x_1[j],y_1[j]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a.\n",
+ " x_1 \t\t P \t\t y_1 \n",
+ " 0.000000 \t 54.233834 \t 0.000000 \n",
+ " 0.100000 \t 62.425251 \t 0.218098 \n",
+ " 0.200000 \t 70.616668 \t 0.385597 \n",
+ " 0.300000 \t 78.808085 \t 0.518277 \n",
+ " 0.400000 \t 86.999502 \t 0.625971 \n",
+ " 0.500000 \t 95.190920 \t 0.715131 \n",
+ " 0.600000 \t 103.382337 \t 0.790162 \n",
+ " 0.700000 \t 111.573754 \t 0.854176 \n",
+ " 0.800000 \t 119.765171 \t 0.909433 \n",
+ " 0.900000 \t 127.956588 \t 0.957615 \n",
+ " 1.000000 \t 136.148005 \t 1.000000 \n",
+ " b.\n",
+ " TC \t\t P_1_sat kPa \t\t P_2_sat kPa \t\t x_1 \t\t y_1 \n",
+ " 110.620000 \t 237.827187 \t 101.332530 \t -0.000055 \t -0.000129 \n",
+ " 107.000000 \t 216.742019 \t 91.320455 \t 0.079767 \t 0.170629 \n",
+ " 104.000000 \t 200.376847 \t 83.629571 \t 0.151570 \t 0.299740 \n",
+ " 101.000000 \t 184.975751 \t 76.460482 \t 0.229134 \t 0.418300 \n",
+ " 98.000000 \t 170.500977 \t 69.787769 \t 0.313139 \t 0.526923 \n",
+ " 95.000000 \t 156.915208 \t 63.586616 \t 0.404360 \t 0.626206 \n",
+ " 92.000000 \t 144.181607 \t 57.832824 \t 0.503680 \t 0.716718 \n",
+ " 89.000000 \t 132.263848 \t 52.502830 \t 0.612106 \t 0.799008 \n",
+ " 86.000000 \t 121.126156 \t 47.573718 \t 0.730789 \t 0.873601 \n",
+ " 83.000000 \t 110.733338 \t 43.023234 \t 0.861050 \t 0.941001 \n",
+ " 80.090000 \t 101.331285 \t 38.950606 \t 0.999899 \t 0.999961 \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.15 Page Number : 533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P_1_sat = 79.80;\t\t\t#[kPa]\n",
+ "P_2_sat = 40.45;\t\t\t#[kPa]\n",
+ "\n",
+ "#(1)\n",
+ "T = 373.15;\t\t\t#[K]\n",
+ "x_1 = 0.05;\n",
+ "x_2 = 1 - x_1;\n",
+ "Y1 = math.exp(0.95*x_2**(2));\n",
+ "Y2 = math.exp(0.95*x_1**(2));\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# The total pressure of the system is given by\n",
+ "P = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\t\t\t#[kPa]\n",
+ "y_1 = x_1*Y1*P_1_sat/P;\n",
+ "y_2 = x_2*Y2*P_2_sat/P;\n",
+ "\n",
+ "print \" 1).The first bubble is formed at %f kPa and the composition y_1 = %f\"%(P,y_1);\n",
+ "\n",
+ "#(2)\n",
+ "T = 373.15;\t\t\t#[K]\n",
+ "y_1_prime = 0.05;\n",
+ "y_2_prime = 1 - y_1_prime;\n",
+ "\n",
+ "# Let us assume a value of x_1,\n",
+ "x_1_prime = 0.0001;\n",
+ "\n",
+ "error = 10;\n",
+ "while(error>0.001):\n",
+ " x_2_prime = 1 - x_1_prime;\n",
+ " Y1_prime = math.exp(0.95*x_2_prime**(2));\n",
+ " Y2_prime = math.exp(0.95*x_1_prime**(2));\n",
+ " P_prime = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\n",
+ " x_1 = (y_1_prime*P_prime)/(Y1_prime*P_1_sat);\n",
+ " error=abs(x_1_prime - x_1);\n",
+ " x_1_prime = x_1_prime + 0.00001;\n",
+ "\n",
+ "P_2 = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\n",
+ "\n",
+ "print \" 2).The first drop is formed at %f kPa and has the composition x_1 = %f\"%(P_2,x_1_prime);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The first bubble is formed at 47.923166 kPa and the composition y_1 = 0.196237\n",
+ " 2).The first drop is formed at 41.974204 kPa and has the composition x_1 = 0.009370\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.16 Page Number : 534"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T = 78.15;\t\t\t#[C]\n",
+ "P_1_sat = 755;\t\t\t#[mm Hg]\n",
+ "P_2_sat = 329;\t\t\t#[mm Hg]\n",
+ "\n",
+ "z_1 = 0.3;\n",
+ "V = 0.5;\n",
+ "\n",
+ "# math.log(Y1) = 0.845/(1 + 0.845*(x_1/x_2))**(2)\n",
+ "# math.log(Y2) = 1/(1 + 1.183*(x_2/x_1))**(2)\n",
+ "\n",
+ "# A value of x_1 is to determined for which V = 0.5\n",
+ "# Let us assume a value of x_1, say x_1 = 0.150\n",
+ "x_1 = 0.150;\n",
+ "\n",
+ "# Calculations\n",
+ "error = 10;\n",
+ "while(error>0.001):\n",
+ " x_2 = 1 - x_1;\n",
+ " Y1 = math.exp(0.845/(1 + 0.845*(x_1/x_2))**(2));\n",
+ " Y2 = math.exp(1/(1 + 1.183*(x_2/x_1))**(2));\n",
+ " P = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\n",
+ " y_1 = (x_1*Y1*P_1_sat)/P;\n",
+ " V_prime = (z_1 - x_1)/(y_1 - x_1);\n",
+ " error=abs(V_prime - V);\n",
+ " x_1 = x_1 + 0.00001;\n",
+ "\n",
+ "P_prime = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\t\t\t#[mm hg]\n",
+ "\n",
+ "# At x_1 , V = 0.5, \n",
+ "# Therefore when the mixture is 50 % vaporized at 78.15 C the mole fraction of component 1 in the liquid phase is x_1 and the system pressure is P_prime\n",
+ "\n",
+ "# Results\n",
+ "print \" The required pressure is %f mm Hg\"%(P_prime);\n",
+ "print \" and the mole fraction of component 1 in the liquid phase for this pressure is x_1 = %f\"%(x_1);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The required pressure is 505.838606 mm Hg\n",
+ " and the mole fraction of component 1 in the liquid phase for this pressure is x_1 = 0.157650\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.17 Page Number : 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.stats import linregress\n",
+ "\n",
+ "# Variables\n",
+ "T = 25;\t\t\t#[C] - Temperature\n",
+ "P = [118.05,124.95,137.90,145.00,172.90,207.70,227.70,237.85,253.90,259.40,261.10,262.00,258.70,252.00,243.80];\t\t\t#[mm Hg]\n",
+ "x_1 = [0.0115,0.0160,0.0250,0.0300,0.0575,0.1125,0.1775,0.2330,0.4235,0.5760,0.6605,0.7390,0.8605,0.9250,0.9625];\n",
+ "y_1 = [0.1810,0.2250,0.3040,0.3450,0.4580,0.5670,0.6110,0.6325,0.6800,0.7050,0.7170,0.7390,0.8030,0.8580,0.9160];\n",
+ "\n",
+ "# Pressure value for which x_1 = y_1 = 0, corresponds to P_2_sat,therefore\n",
+ "P_2_sat = 97.45;\t\t\t#[mm Hg]\n",
+ "# Pressure value for which x_1 = y_1 = 1, corresponds to P_1_sat,therefore\n",
+ "P_1_sat = 230.40;\t\t\t#[mm Hg]\n",
+ "\n",
+ "x_2 = zeros(15);\n",
+ "y_2 = zeros(15);\n",
+ "Y1 = zeros(15);\n",
+ "Y2 = zeros(15);\n",
+ "GE_RT = zeros(15);\n",
+ "x1x2_GE_RT = zeros(15);\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(15):\n",
+ " x_2[i] = 1 - x_1[i];\n",
+ " y_2[i] = 1 - y_1[i];\n",
+ " Y1[i] = (y_1[i]*P[i])/(x_1[i]*P_1_sat);\n",
+ " Y2[i] = (y_2[i]*P[i])/(x_2[i]*P_2_sat);\n",
+ " GE_RT[i] = x_1[i]*math.log(Y1[i]) + x_2[i]*math.log(Y2[i]);\t\t\t# G_E/(R*T)\n",
+ " x1x2_GE_RT[i] = (x_1[i]*x_2[i])/GE_RT[i];\n",
+ "\n",
+ "\n",
+ "#[M,N,sig]=reglin(x_1,x1x2_GE_RT);\n",
+ "M,N,sig,d,e = linregress(x_1,x1x2_GE_RT);\n",
+ "\n",
+ "# Linear regression between x_1 and x_1*x_2/(G_E/R*T) gives intercept = N and slope = M\n",
+ "\n",
+ "# van Laar equation is x_1*x_2/(G_E/R*T) = 1/A + (1/B - 1/A)\n",
+ "# 1/A = N\n",
+ "A = 1/N;\n",
+ "B = 1/(M + 1/A);\n",
+ "\n",
+ "# Results\n",
+ "print \" The value of Van Laar coefficient A = %f\"%(A);\n",
+ "print \" The value of Van Laar coefficient B = %f\"%(B);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of Van Laar coefficient A = 2.270624\n",
+ " The value of Van Laar coefficient B = 1.781821\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.18 Page Number : 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T = 343.15;\t\t\t#[K] - Temperature\n",
+ "# At 343.15 K\n",
+ "# math.log(Y1) = 0.95*x_2**(2)\n",
+ "# math.log(Y2) = 0.95*x_1**(2)\n",
+ "P_1_sat = 79.80;\t\t\t#[kPa]\n",
+ "P_2_sat = 40.50;\t\t\t#[kPa]\n",
+ "\n",
+ "# Calculations\n",
+ "# At x_1 = 0,\n",
+ "Y1_infinity = math.exp(0.95);\n",
+ "alpha_12_x0 = (Y1_infinity*P_1_sat)/(P_2_sat);\n",
+ "# At x_1 = 1,\n",
+ "Y2_infinity = math.exp(0.95);\n",
+ "alpha_12_x1 = (P_1_sat)/(Y2_infinity*P_2_sat);\n",
+ "\n",
+ "\n",
+ "# At azeotrope, Y1*P1_sat = Y2*P2_sat\n",
+ "# Y2/Y1 = P_1_sat/P_2_sat\n",
+ "# Taking math.logarithm of both sides we get\n",
+ "# math.log(Y2) - math.log(Y1) = math.log(P_1_sat/P_2_sat)\n",
+ "# 0.95*x_1**(2) - 0.95*x_2**(2) = math.log(P_1_sat/P_2_sat)\n",
+ "# Solving the above equation\n",
+ "def f(x_1): \n",
+ "\t return 0.95*x_1**(2) - 0.95*(1-x_1)**(2) - math.log(P_1_sat/P_2_sat)\n",
+ "x_1 = fsolve(f,0.1)\n",
+ "\n",
+ "# At x_1\n",
+ "x_2 = 1 - x_1;\n",
+ "Y1 = math.exp(0.95*x_2**(2));\n",
+ "Y2 = math.exp(0.95*x_1**(2));\n",
+ "P = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\t\t\t#[kPa] - Azeotrope pressure\n",
+ "y_1 = (x_1*Y1*P_1_sat)/P;\n",
+ "\n",
+ "# Since x_1 = y_1, (almost equal) ,the above condition is of azeotrope formation\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \" Since alpha_12_x=0 = %f and alpha_12_x=1 = %f \"%(alpha_12_x0,alpha_12_x1);\n",
+ "print \" and since alpha_12 is a continuous curve and in between a value of alpha_12 = 1, shall come and at this composition the azeotrope shall get formed.\"\n",
+ "print \" The azeotrope composition is x_1 = y_1 = %f\"%(x_1);\n",
+ "print \" The azeotrope presssure is %f kPa\"%(P);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Since alpha_12_x=0 = 5.094806 and alpha_12_x=1 = 0.762023 \n",
+ " and since alpha_12 is a continuous curve and in between a value of alpha_12 = 1, shall come and at this composition the azeotrope shall get formed.\n",
+ " The azeotrope composition is x_1 = y_1 = 0.856959\n",
+ " The azeotrope presssure is 81.366308 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.19 Page Number : 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 45;\t\t\t#[C] - Temperature\n",
+ "\n",
+ "x_1 = [0.0455,0.0940,0.1829,0.2909,0.3980,0.5069,0.5458,0.5946,0.7206,0.8145,0.8972,0.9573];\n",
+ "y_1 = [0.1056,0.1818,0.2783,0.3607,0.4274,0.4885,0.5098,0.5375,0.6157,0.6913,0.7869,0.8916];\n",
+ "P = [31.957,33.553,35.285,36.457,36.996,37.068,36.978,36.778,35.792,34.372,32.331,30.038];\n",
+ "\n",
+ "\t\t\t# Pressure value for which x_1 = y_1 = 0, corresponds to P_2_sat,therefore\n",
+ "P_2_sat = 29.819;\t\t\t#[kPa]\n",
+ "\t\t\t# Pressure value for which x_1 = y_1 = 1, corresponds to P_1_sat,therefore\n",
+ "P_1_sat = 27.778;\t\t\t#[kPa]\n",
+ "\n",
+ "x_2 = zeros(12);\n",
+ "y_2 = zeros(12);\n",
+ "Y1 = zeros(12);\n",
+ "Y2 = zeros(12);\n",
+ "alpha_12 = zeros(12);\n",
+ "GE_RT = zeros(12);\n",
+ "x1x2_GE_RT = zeros(12);\n",
+ "# Calculations and Results\n",
+ "print \" x_1 \\t\\t y_1 \\t P \\t\\t Y1 \\t\\tY2 \\t alpha_12 \\t G_E/RT \\t x1*x2/G_E/RT\";\n",
+ "\n",
+ "for i in range(12):\n",
+ " x_2[i] = 1 - x_1[i];\n",
+ " y_2[i] = 1 - y_1[i];\n",
+ " Y1[i] = (y_1[i]*P[i])/(x_1[i]*P_1_sat);\n",
+ " Y2[i] = (y_2[i]*P[i])/(x_2[i]*P_2_sat);\n",
+ " alpha_12[i] = (y_1[i]/x_1[i])/(y_2[i]/x_2[i]);\n",
+ " GE_RT[i] = x_1[i]*math.log(Y1[i]) + x_2[i]*math.log(Y2[i]);\t\t\t# G_E/(R*T)\n",
+ " x1x2_GE_RT[i] = (x_1[i]*x_2[i])/GE_RT[i];\n",
+ " print \" %f\\t %f\\t %f \\t %f \\t %f \\t %f\\t %f \\t%f\"%(x_1[i],y_1[i],P[i],Y1[i],Y2[i],alpha_12[i],GE_RT[i],x1x2_GE_RT[i]);\n",
+ "\n",
+ "\t\t\t#[M,N,sig]=reglin(x_1,x1x2_GE_RT);\n",
+ "M,N,sig,d,e=linregress(x_1,x1x2_GE_RT);\n",
+ "\n",
+ "\t\t\t# Linear regression between x_1 and x_1*x_2/(G_E/R*T) gives intercept = N and slope = M\n",
+ "\n",
+ "\t\t\t# Now let us assume the system to follow van Laar activity coefficient model. \n",
+ "\t\t\t# x_1*x_2/(G_E/(R*T)) = x_1/B + x_2/A = x_1/B + (1 - x_1)/A = 1/A + (1/B - 1/A)*x_1 = N + M*x_1\n",
+ "\n",
+ "\t\t\t# 1/A = N\n",
+ "A = 1/N;\n",
+ "\t\t\t# (1/B - 1/A) = M\n",
+ "B = 1/(M + 1/A);\n",
+ "\n",
+ "print \"\"\n",
+ "print \" The value of van Laar parameters are, A = %f and B = %f \"%(A,B);\n",
+ "\n",
+ "Y1_infinity = math.exp(A);\n",
+ "Y2_infinity = math.exp(B);\n",
+ "\n",
+ "\n",
+ "\t\t\t\n",
+ "\t\t\t# Now let us calculate the azeotrope composition.\n",
+ "\t\t\t# At azeotrope, Y1*P1_sat = Y2*P2_sat\n",
+ "\t\t\t# math.log(Y1/Y2) = math.log(P_2_sat/P_1_sat)\n",
+ "\t\t\t# From van Laar model we get\n",
+ "\t\t\t# math.log(P_2_sat/P_1_sat) = (A*B**(2)*2*x_2**(2))/(A*x_1 + B*x_2)**(2) + (B*A**(2)*2*x_1**(2))/(A*x_1 + B*x_2)**(2)\n",
+ "\t\t\t# Solving the above equation\n",
+ "def f(x_1): \n",
+ "\t return math.log(P_2_sat/P_1_sat) - (A*B**(2)*(1-x_1)**(2))/(A*x_1 + B*(1-x_1))**(2) + (B*A**(2)*x_1**(2))/(A*x_1 + B*(1-x_1))**(2)\n",
+ "x_1 = fsolve(f,0.1)\n",
+ "\n",
+ "print \" The azeotrope composition is given by x_1 = y_1 = %f\"%(x_1);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " x_1 \t\t y_1 \t P \t\t Y1 \t\tY2 \t alpha_12 \t G_E/RT \t x1*x2/G_E/RT\n",
+ " 0.045500\t 0.105600\t 31.957000 \t 2.670039 \t 1.004220 \t 2.476833\t 0.048705 \t0.891698\n",
+ " 0.094000\t 0.181800\t 33.553000 \t 2.336127 \t 1.016177 \t 2.141582\t 0.094298 \t0.903137\n",
+ " 0.182900\t 0.278300\t 35.285000 \t 1.932808 \t 1.045150 \t 1.722733\t 0.156610 \t0.954268\n",
+ " 0.290900\t 0.360700\t 36.457000 \t 1.627355 \t 1.102263 \t 1.375325\t 0.210697 \t0.979023\n",
+ " 0.398000\t 0.427400\t 36.996000 \t 1.430228 \t 1.180094 \t 1.129007\t 0.242105 \t0.989635\n",
+ " 0.506900\t 0.488500\t 37.068000 \t 1.285998 \t 1.289486 \t 0.929034\t 0.252871 \t0.988458\n",
+ " 0.545800\t 0.509800\t 36.978000 \t 1.243394 \t 1.338371 \t 0.865446\t 0.251278 \t0.986567\n",
+ " 0.594600\t 0.537500\t 36.778000 \t 1.196853 \t 1.407094 \t 0.792366\t 0.245302 \t0.982671\n",
+ " 0.720600\t 0.615700\t 35.792000 \t 1.100930 \t 1.650961 \t 0.621199\t 0.209369 \t0.961630\n",
+ " 0.814500\t 0.691300\t 34.372000 \t 1.050218 \t 1.918247 \t 0.510015\t 0.160745 \t0.939933\n",
+ " 0.897200\t 0.786900\t 32.331000 \t 1.020818 \t 2.247586 \t 0.423097\t 0.101740 \t0.906550\n",
+ " 0.957300\t 0.891600\t 30.038000 \t 1.007145 \t 2.557286 \t 0.366877\t 0.046909 \t0.871410\n",
+ "\n",
+ " The value of van Laar parameters are, A = 1.049085 and B = 1.064514 \n",
+ " The azeotrope composition is given by x_1 = y_1 = 0.468254\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.20 Page Number : 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 25;\t\t\t#[C] - Temperature\n",
+ "P_1_sat = 230.4;\t\t\t#[mm Hg]\n",
+ "P_2_sat = 97.45;\t\t\t#[mm Hg]\n",
+ "Y1_infinity = 8.6;\n",
+ "Y2_infinity = 6.6;\n",
+ "\n",
+ "\t\t\t# Assuming ideal vpour behaviour means that phi = 1 and since system pressure is low, therefore\n",
+ "\t\t\t# f_i = P_i_sat \n",
+ "\t\t\t# Assuming the activity coefficients to follow van Laar model we get\n",
+ "A = math.log(Y1_infinity);\n",
+ "B = math.log(Y2_infinity);\n",
+ "\n",
+ "\t\t\t#math.log(Y1) = A/(1+ (A*x_1)/(B*x_2))**(2)\n",
+ "\t\t\t# math.log(Y2) = B/(1+ (B*x_2)/(A*x_1))**(2)\n",
+ "\n",
+ "x_1 = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9];\n",
+ "\n",
+ "x_2 = zeros(9);\n",
+ "Y1 = zeros(9);\n",
+ "Y2 = zeros(9);\n",
+ "y1_P = zeros(9);\n",
+ "y2_P = zeros(9);\n",
+ "P = zeros(9);\n",
+ "y_1 = zeros(9);\n",
+ "\n",
+ "print \" a.\";\n",
+ "print \" x_1 \\t\\t Y1 \\t\\t Y2 \\t\\t y1*P \\t\\t y2*P \\t\\t P \\t\\t y_1 \";\n",
+ "# Calculations and Results\n",
+ "for i in range(9):\n",
+ " x_2[i] = 1 - x_1[i];\n",
+ " Y1[i] = math.exp(A/(1+ (A*x_1[i])/(B*x_2[i]))**(2));\n",
+ " Y2[i] = math.exp(B/(1+ (B*x_2[i])/(A*x_1[i]))**(2));\n",
+ " y1_P[i] = x_1[i]*Y1[i]*P_1_sat;\n",
+ " y2_P[i] = x_2[i]*Y2[i]*P_2_sat;\n",
+ " P[i] = x_1[i]*Y1[i]*P_1_sat + x_2[i]*Y2[i]*P_2_sat;\n",
+ " y_1[i] = (x_1[i]*Y1[i]*P_1_sat)/P[i];\n",
+ " print \" %f\\t\\t %f\\t\\t %f \\t\\t %f \\t\\t %f \\t\\t %f \\t %f\"%(x_1[i],Y1[i],Y2[i],y1_P[i],y2_P[i],P[i],y_1[i]);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "\t\t\t# The total system pressure versus x_1 shows a maxima and thus azeotrope is formed by the VLE system\n",
+ "\t\t\t# The maxima occurs in the range of x_1 = 0.6 to 0.8, so an azeotrope is formed in this composition range\n",
+ "\n",
+ "\t\t\t# At the azeotrope point, Y1*P1_sat = Y2*P2_sat\n",
+ "\t\t\t# math.log(Y1) - math.log(Y2) = math.log(P_2_sat/P_1_sat)\n",
+ "\t\t\t# On putting the values and then solving the above equation we get\n",
+ "def f(x_1): \n",
+ "\t return A/(1+1.14*x_1/(1-x_1))**(2)- B/(1+0.877*(1-x_1)/x_1)**(2) - math.log(P_2_sat/P_1_sat)\n",
+ "x_1_prime = fsolve(f,0.1)\n",
+ "\n",
+ "\t\t\t# At x_1\n",
+ "x_2_prime = 1 - x_1_prime;\n",
+ "Y1_prime = math.exp(A/(1+ (A*x_1_prime)/(B*x_2_prime))**(2));\n",
+ "Y2_prime = math.exp(B/(1+ (B*x_2_prime)/(A*x_1_prime))**(2));\n",
+ "P_prime = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\t\t\t#[kPa] - Azeotrope pressure\n",
+ "y_1_prime = (x_1_prime*Y1_prime*P_1_sat)/P_prime;\n",
+ "\n",
+ "\t\t\t# Since x_1 = y_1,azeotrope formation will take place\n",
+ "print \" b\";\n",
+ "print \" The total system pressure versus x_1 shows a maxima and thus azeotrope is formed by the VLE system\";\n",
+ "print \" The azeotrope composition is x_1 = y_1 = %f\"%(x_1_prime);\n",
+ "print \" The azeotrope presssure is %f mm Hg\"%(P_prime);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a.\n",
+ " x_1 \t\t Y1 \t\t Y2 \t\t y1*P \t\t y2*P \t\t P \t\t y_1 \n",
+ " 0.100000\t\t 5.446877\t\t 1.024149 \t\t 125.496041 \t\t 89.822961 \t\t 215.319002 \t 0.582838\n",
+ " 0.200000\t\t 3.680305\t\t 1.097308 \t\t 169.588473 \t\t 85.546152 \t\t 255.134625 \t 0.664702\n",
+ " 0.300000\t\t 2.640401\t\t 1.225500 \t\t 182.504521 \t\t 83.597451 \t\t 266.101972 \t 0.685844\n",
+ " 0.400000\t\t 2.002736\t\t 1.421865 \t\t 184.572186 \t\t 83.136461 \t\t 267.708646 \t 0.689452\n",
+ " 0.500000\t\t 1.599580\t\t 1.708524 \t\t 184.271623 \t\t 83.247849 \t\t 267.519472 \t 0.688816\n",
+ " 0.600000\t\t 1.340316\t\t 2.120132 \t\t 185.285311 \t\t 82.642744 \t\t 267.928055 \t 0.691549\n",
+ " 0.700000\t\t 1.174189\t\t 2.709824 \t\t 189.373156 \t\t 79.221704 \t\t 268.594861 \t 0.705051\n",
+ " 0.800000\t\t 1.072057\t\t 3.558780 \t\t 197.601501 \t\t 69.360613 \t\t 266.962114 \t 0.740186\n",
+ " 0.900000\t\t 1.017109\t\t 4.791470 \t\t 210.907696 \t\t 46.692876 \t\t 257.600573 \t 0.818739\n",
+ " b\n",
+ " The total system pressure versus x_1 shows a maxima and thus azeotrope is formed by the VLE system\n",
+ " The azeotrope composition is x_1 = y_1 = 0.706548\n",
+ " The azeotrope presssure is 268.599631 mm Hg\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.21 Page Number : 544"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 50;\t\t\t#[C]\n",
+ "\t\t\t# At 50 C\n",
+ "P_1_sat = 0.67;\t\t\t#[atm]\n",
+ "P_2_sat = 0.18;\t\t\t#[atm]\n",
+ "Y1_infinity = 2.5;\n",
+ "Y2_infinity = 7.2;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t# alpha_12 = (y_1/x_1)/(y_2/x_2) = (Y1*P_1_sat)/((Y2*P_2_sat))\n",
+ "\t\t\t# At x_1 tending to zero,\n",
+ "alpha_12_x0 = (Y1_infinity*P_1_sat)/(P_2_sat);\n",
+ "\t\t\t# At x_1 tending to 1,\n",
+ "alpha_12_x1 = (P_1_sat)/((Y2_infinity*P_2_sat));\n",
+ "\n",
+ "\n",
+ "print \" 1).Since alpha_12_x=0) = %f and alpha_12_x=1) = %f \"%(alpha_12_x0,alpha_12_x1);\n",
+ "print \" and since alpha_12 is a continuous curve and in between a value of alpha_12 = 1 shall come and at this composition azeotrope shall get formed.\"\n",
+ "\n",
+ "\t\t\t\n",
+ "print \" 2).Since the activity coefficient values are greater than 1 therefore the deviations from Roults law is positive\"\n",
+ "print \" and the azeotrope is maximum pressure or minimum boiling\";\n",
+ "\n",
+ "\t\t\t#(3)\n",
+ "\t\t\t# Let us assume the system to follow van Laar activity coefficient model\n",
+ "A = math.log(Y1_infinity);\n",
+ "B = math.log(Y2_infinity);\n",
+ "\n",
+ "\t\t\t# math.log(Y1) = A/(1+ (A*x_1)/(B*x_2))**(2)\n",
+ "\t\t\t# math.log(Y2) = B/(1+ (B*x_2)/(A*x_1))**(2)\n",
+ "\n",
+ "\t\t\t# At the azeotrope point, Y1*P1_sat = Y2*P2_sat\n",
+ "\t\t\t# math.log(Y1) - math.log(Y2) = math.log(P_2_sat/P_2_sat)\n",
+ "\t\t\t# On putting the values and then solving the above equation\n",
+ "def f(x_1): \n",
+ "\t return A/(1+ (A*x_1)/(B*(1-x_1)))**(2)- B/(1+ (B*(1-x_1))/(A*x_1))**(2) - math.log(P_2_sat/P_1_sat)\n",
+ "x_1 = fsolve(f,0.1)\n",
+ "\n",
+ "\t\t\t# At x_1\n",
+ "x_2 = 1 - x_1;\n",
+ "Y1 = math.exp(A/(1+ (A*x_1)/(B*x_2))**(2));\n",
+ "Y2 = math.exp(B/(1+ (B*x_2)/(A*x_1))**(2));\n",
+ "P = x_1*Y1*P_1_sat + x_2*Y2*P_2_sat;\t\t\t#[kPa] - Azeotrope pressure\n",
+ "y_1 = (x_1*Y1*P_1_sat)/P;\n",
+ "\n",
+ "\t\t\t# Since x_1 = y_1,the azeotrope formation will take place\n",
+ "\n",
+ "print \" 3).The azeotrope composition is x_1 = y_1 = %f\"%(x_1);\n",
+ "print \" The azeotrope presssure is %f atm\"%(P);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).Since alpha_12_x=0) = 9.305556 and alpha_12_x=1) = 0.516975 \n",
+ " and since alpha_12 is a continuous curve and in between a value of alpha_12 = 1 shall come and at this composition azeotrope shall get formed.\n",
+ " 2).Since the activity coefficient values are greater than 1 therefore the deviations from Roults law is positive\n",
+ " and the azeotrope is maximum pressure or minimum boiling\n",
+ " 3).The azeotrope composition is x_1 = y_1 = 0.910173\n",
+ " The azeotrope presssure is 0.689143 atm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.22 Page Number : 545"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 25;\t\t\t#[C]\n",
+ "\t\t\t# At 50 C\n",
+ "P_1_sat = 7.866;\t\t\t#[kPa]\n",
+ "P_2_sat = 3.140;\t\t\t#[kPa]\n",
+ "\n",
+ "\t\t\t# G_E/(R*T) = 1.4938*x_1*x_2/(1.54*x_1 + 0.97*x_2)\n",
+ "\n",
+ "\t\t\t# The excess Gibbs free energy math.expression can be written as\n",
+ "\t\t\t# x_1*x_2/(G_E/(R*T)) = 1.54*x_1/1.4938 + 0.97*x_2/1.4938 = x_1/0.97 + x_2/1.54\n",
+ "\n",
+ "\t\t\t# Comparing with the van Laar math.expression\n",
+ "\t\t\t# x_1*x_2/(G_E/(R*T)) = x_1/B + x_2/A, we get\n",
+ "A = 1.54;\n",
+ "B = 0.97;\n",
+ "\n",
+ "\t\t\t# The activity coefficients are thus given by\n",
+ "\t\t\t# math.log(Y1) = A/(1+ (A*x_1)/(B*x_2))**(2)\n",
+ "\t\t\t# math.log(Y2) = B/(1+ (B*x_2)/(A*x_1))**(2)\n",
+ "\n",
+ "x_1 = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.95];\n",
+ "\n",
+ "x_2 = zeros(10);\n",
+ "Y1 = zeros(10);\n",
+ "Y2 = zeros(10);\n",
+ "P = zeros(10);\n",
+ "y_1 = zeros(10);\n",
+ "\n",
+ "print \" x_1 \\t\\t Y1 \\t\\t Y2 \\t\\t P kPa \\t\\t y_1 \";\n",
+ "\n",
+ "# Calculations and Results\n",
+ "for i in range(10):\n",
+ " x_2[i] = 1 - x_1[i];\n",
+ " Y1[i] = math.exp(A/(1+ (A*x_1[i])/(B*x_2[i]))**(2));\n",
+ " Y2[i] = math.exp(B/(1+ (B*x_2[i])/(A*x_1[i]))**(2));\n",
+ " P[i] = x_1[i]*Y1[i]*P_1_sat + x_2[i]*Y2[i]*P_2_sat;\n",
+ " y_1[i] = (x_1[i]*Y1[i]*P_1_sat)/P[i];\n",
+ " print \" %f\\t\\t %f\\t\\t %f \\t\\t %f \\t\\t %f \"%(x_1[i],Y1[i],Y2[i],P[i],y_1[i]);\n",
+ "\n",
+ "\n",
+ "\t\t\t# The azeotrope is formed near x_1 = 0.95 as in this region a maxima in pressure is obtained.\n",
+ "\n",
+ "\t\t\t# At the azeotrope point, Y1*P1_sat = Y2*P2_sat\n",
+ "\t\t\t# math.log(Y1) - math.log(Y2) = math.log(P_2_sat/P_2_sat)\n",
+ "\t\t\t# On putting the values and then solving the above equation\n",
+ "def f(x_1): \n",
+ "\t return A/(1+ (A*x_1)/(B*(1-x_1)))**(2)- B/(1+ (B*(1-x_1))/(A*x_1))**(2) - math.log(P_2_sat/P_1_sat)\n",
+ "x_1_prime = fsolve(f,0.1)\n",
+ "\n",
+ "\t\t\t# At x_1\n",
+ "x_2_prime = 1 - x_1_prime;\n",
+ "Y1_prime = math.exp(A/(1+ (A*x_1_prime)/(B*x_2_prime))**(2));\n",
+ "Y2_prime = math.exp(B/(1+ (B*x_2_prime)/(A*x_1_prime))**(2));\n",
+ "P_prime = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\t\t\t#[kPa] - Azeotrope pressure\n",
+ "y_1_prime = (x_1_prime*Y1_prime*P_1_sat)/P_prime;\n",
+ "\n",
+ "\t\t\t# Since x_1_prime = y_1_prime,the azeotrope formation will take place\n",
+ "\n",
+ "print \" Part II \";\n",
+ "print \" The azeotrope composition is x_1 = y_1 = %f\"%(x_1_prime);\n",
+ "print \" The azeotrope presssure is %f kPa \"%(P_prime);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " x_1 \t\t Y1 \t\t Y2 \t\t P kPa \t\t y_1 \n",
+ " 0.100000\t\t 3.042798\t\t 1.022050 \t\t 5.281779 \t\t 0.453155 \n",
+ " 0.200000\t\t 2.201629\t\t 1.081457 \t\t 6.180223 \t\t 0.560433 \n",
+ " 0.300000\t\t 1.725242\t\t 1.172375 \t\t 6.648107 \t\t 0.612389 \n",
+ " 0.400000\t\t 1.438293\t\t 1.292347 \t\t 6.960227 \t\t 0.650186 \n",
+ " 0.500000\t\t 1.258593\t\t 1.440723 \t\t 7.211980 \t\t 0.686364 \n",
+ " 0.600000\t\t 1.144175\t\t 1.617876 \t\t 7.432102 \t\t 0.726584 \n",
+ " 0.700000\t\t 1.072060\t\t 1.824770 \t\t 7.621913 \t\t 0.774475 \n",
+ " 0.800000\t\t 1.028913\t\t 2.062721 \t\t 7.770131 \t\t 0.833286 \n",
+ " 0.900000\t\t 1.006610\t\t 2.333241 \t\t 7.858834 \t\t 0.906775 \n",
+ " 0.950000\t\t 1.001587\t\t 2.481217 \t\t 7.874109 \t\t 0.950528 \n",
+ " Part II \n",
+ " The azeotrope composition is x_1 = y_1 = 0.958680\n",
+ " The azeotrope presssure is 7.874467 kPa \n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.23 Page Number : 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 58.7;\t\t\t#[C]\n",
+ "P = 1;\t\t\t#[atm]\n",
+ "P = P*101325*10**(-3);\t\t\t#[kPa]\n",
+ "\n",
+ "\t\t\t# math.log(P_sat) = 16.6758 - 3674.49/(t + 226.45) - For ethyl alcohol\n",
+ "\t\t\t# math.log(P_sat) = 13.8216 - 2697.55/(t + 224.37) - For hexane\n",
+ "\n",
+ "\t\t\t# Let us take hexane as (1) and ethanol as (2)\n",
+ "\t\t\t# At 58.7 C\n",
+ "P_1_sat = math.exp(13.8216 - 2697.55/(T + 224.37));\t\t\t#[kPa]\n",
+ "P_2_sat = math.exp(16.6758 - 3674.49/(T + 226.45));\t\t\t#[kPa]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Y1 = P/P_1_sat;\n",
+ "Y2 = P/P_2_sat;\n",
+ "\n",
+ "x_2 = 0.332;\t\t\t# Mol % of ethanol (given)\n",
+ "x_1 = 1 - x_2;\t\t\t# Mol % of hehane\n",
+ "\n",
+ "\t\t\t# The van Laar parameters are given by\n",
+ "A = ((1 + (x_2*math.log(Y2))/(x_1*math.log(Y1)))**(2))*math.log(Y1);\n",
+ "B = ((1 + (x_1*math.log(Y1))/(x_2*math.log(Y2)))**(2))*math.log(Y2);\n",
+ "\n",
+ "print \" The value of van Laar parameters are A = %f and B = %f \"%(A,B);\n",
+ "\n",
+ "\t\t\t# Now let us calvulate the distribution coefficient K\n",
+ "x_1_prime = 0.5;\t\t\t#[given]\n",
+ "x_2_prime = 1 - x_1_prime;\n",
+ "\n",
+ "\t\t\t# The activity coefficients are thus given by\n",
+ "\t\t\t# math.log(Y1) = A/(1+ (A*x_1)/(B*x_2))**(2)\n",
+ "\t\t\t# math.log(Y2) = B/(1+ (B*x_2)/(A*x_1))**(2)\n",
+ "\n",
+ "Y1_prime = math.exp(A/(1+ (A*x_1_prime)/(B*x_2_prime))**(2));\n",
+ "Y2_prime = math.exp(B/(1+ (B*x_2_prime)/(A*x_1_prime))**(2));\n",
+ "P_prime = x_1_prime*Y1_prime*P_1_sat + x_2_prime*Y2_prime*P_2_sat;\n",
+ "\n",
+ "\t\t\t# We have, K_1 = y_1/x_1 = Y1*P_1_sat/P\n",
+ "K_1 = Y1_prime*P_1_sat/P_prime;\n",
+ "\n",
+ "print \" The distribution coefficient is given by K_1 = %f\"%(K_1)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of van Laar parameters are A = 1.669879 and B = 2.662289 \n",
+ " The distribution coefficient is given by K_1 = 1.352866\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch16_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch16_1.ipynb new file mode 100755 index 00000000..1053ca6c --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch16_1.ipynb @@ -0,0 +1,738 @@ +{
+ "metadata": {
+ "name": "ch16_1",
+ "signature": "sha256:a00a89ec39a5812cdf143d7f00f601a0bb401404f1638737e2689f71d07acb65"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16 : Other Phase Equilibria"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.1 Page Number : 564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math \n",
+ "\n",
+ "# Variables\t\t\t\n",
+ "T = 0 + 273.15;\t\t\t#[K] - Temperature\n",
+ "P = 20*10**(5);\t\t\t#[Pa] - Pressure\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t#componenet 1 : methane (1)\n",
+ "\t\t\t#componenet 2 : methanol (2)\n",
+ "\n",
+ "H_constant = 1022;\t\t\t#[bar] - Henry's law constant\n",
+ "H_constant = H_constant*10**(5);\t\t\t#[Pa]\n",
+ "\n",
+ "\t\t\t# The second virial coefficients are\n",
+ "B_11 = -53.9;\t\t\t#[cm**(3)/mol]\n",
+ "B_11 = B_11*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "B_12 = -166;\t\t\t#[cm**(3)/mol]\n",
+ "B_12 = B_12*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "B_22 = -4068;\t\t\t#[cm**(3)/mol]\n",
+ "B_22 = B_22*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "den_meth = 0.8102;\t\t\t#[g/cm**(3)] - Density of methanol at 0 C\n",
+ "Mol_wt_meth = 32.04;\t\t\t# Molecular weight of methanol\n",
+ "P_2_sat = 0.0401;\t\t\t#[bar] - Vapour pressure of methanol at 0 C\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#The molar volume of methanol can be calculated as\n",
+ "V_2_liq = (1/(den_meth/Mol_wt_meth))*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#The phase equilibrium equation of the components at high pressure\n",
+ "\t\t\t#y1*phi_1*P = x_1*H_1\n",
+ "\t\t\t#y2*phi_2*P = x_2*H_2\n",
+ "\n",
+ "\t\t\t#Since methane follows Henry's law therefore methanol follows the lewis-Rnadall rule\n",
+ "\t\t\t#f_2 is the fugacity of the compressed liquid which is calculated using\n",
+ "\t\t\t#f_2 = f_2_sat*math.exp[V_2_liq*(P - P_sat_2)/(R*T)]\n",
+ "\t\t\t#where f_2_sat can be calculated using virial equation \n",
+ "\t\t\t# math.log(phi_2_sat) = math.log(f_2_sat/P_2_sat) = (B_22*P_2_sat)/(R*T)\n",
+ "\n",
+ "f_2_sat = P_2_sat*math.exp((B_22*P_2_sat*10**(5))/(R*T));\t\t\t#[bar]\n",
+ "\n",
+ "\t\t\t#Putting the value of 'f_2_sat' in the math.expression of f_2 , we get\n",
+ "f_2 = f_2_sat*math.exp(V_2_liq*(P - P_2_sat*10**(5))/(R*T));\t\t\t#[bar]\n",
+ "\n",
+ "\t\t\t#Now let us calculate the fugacity coefficients of the species in the vapour mixture\n",
+ "del_12 = 2*B_12 - B_11 - B_22;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#math.log(phi_1) = (P/(R*T))*(B_11 + y2**(2)*del_12)\n",
+ "\t\t\t#math.log(phi_2) = (P/(R*T))*(B_22 + y1**(2)*del_12)\n",
+ "\n",
+ "\n",
+ "\t\t\t#The calculation procedure is to assume a value of y1, calculate 'phi_1' and 'phi_2' and calculate 'x_1' and 'x_2' from the phase equilibrium equations and see whether x_1 + x_2 = 1,if not then another value of y1 is assumed.\n",
+ "\n",
+ "y2 = 0.1;\n",
+ "error=10;\n",
+ "\n",
+ "while(error>0.001):\n",
+ " y1=1-y2;\n",
+ " phi_1 = math.exp((P/(R*T))*((B_11 + y2**(2)*del_12)));\n",
+ " phi_2 = math.exp((P/(R*T))*((B_22 + y1**(2)*del_12)));\n",
+ " x_1 = (y1*phi_1*P)/H_constant;\n",
+ " x_2 = (y2*phi_2*P)/(f_2*10**(5));\n",
+ " x = x_1 + x_2;\n",
+ " error=abs(1-x);\n",
+ " y2=y2 - 0.000001;\n",
+ "\n",
+ "# Results\n",
+ "print \" The solubility of methane in methanol is given by x1 = %f\"%(x_1);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The solubility of methane in methanol is given by x1 = 0.018614\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.2 Page Number : 566"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "x_C2H6_1 = 0.33*10**(-4);\t\t\t# Solubility of ethane in water at 25 C and 1 bar\n",
+ "\n",
+ "\t\t\t#componenet 1 : ethane (1)\n",
+ "\t\t\t#componenet 2 : water (2)\n",
+ "\n",
+ "\t\t\t# Z = 1 - 7.63*10**(3)*P - 7.22*10**(-5)*P**(2)\n",
+ "\n",
+ "\t\t\t#The phase equilibrium equation of ethane is\n",
+ "\t\t\t#f_1_V = x_1*H_1\n",
+ "\t\t\t#since vapour is pure gas, f_1_V = x_1*H_1 or, phi_1*P = x_1*H_1, where 'phi_1' is fugacity coefficient of pure ethane\n",
+ "\t\t\t# math.log(phi) = integral('Z-1)/P) from limit '0' to 'P'\n",
+ "\n",
+ "P1 = 0;\n",
+ "P2 = 1;\n",
+ "P3 = 35;\n",
+ "\n",
+ "# Calculations\n",
+ "def f51(P): \n",
+ "\t return (1-7.63*10**(-3)*P-7.22*10**(-5)*P**(2)-1)/P\n",
+ "\n",
+ "intgral = quad(f51,P1,P2)[0]\n",
+ "\n",
+ "phi_1_1 = math.exp(intgral);\t\t\t# - Fugacity coefficient of ethane at 1 bar\n",
+ "f_1_1 = phi_1_1*P2;\t\t\t#[bar] - Fugacity of ethane at 1 bar\n",
+ "\n",
+ "\t\t\t#Similarly\n",
+ "\n",
+ "def f52(P): \n",
+ "\t return (1-7.63*10**(-3)*P-7.22*10**(-5)*P**(2)-1)/P\n",
+ "\n",
+ "intgral_1 = quad(f52,P1,P3)[0]\n",
+ "\n",
+ "phi_1_35 = math.exp(intgral_1);\t\t\t# Fugacity coefficient of ethane at 35 bar\n",
+ "f_1_35 = phi_1_35*P3;\t\t\t#[bar] - Fugacity of ethane at 35 bar\n",
+ "\n",
+ "\t\t\t# At ethane pressure of 1 bar , x_C2H6_1*H_1 = phi_1_1\n",
+ "H_1 = phi_1_1/x_C2H6_1;\t\t\t#[bar] - Henry's constant\n",
+ "\n",
+ "\t\t\t# At ethane pressure of 35 bar , x_C2H6_35*H_1 = phi_1_35\n",
+ "x_C2H6_35 = f_1_35/H_1;\t\t\t# Solubility of ethane at 35 bar pressure\n",
+ "\n",
+ "# Results\n",
+ "print \"The solubility of ethane at 35 bar is given by x_C2H6 = %e \"%(x_C2H6_35);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The solubility of ethane at 35 bar is given by x_C2H6 = 8.525648e-04 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.4 Page Number : 571"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T = 200;\t\t\t#[K]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n",
+ "\t\t\t# G_E = A*x_1*x_2\n",
+ "A = 4000;\t\t\t#[J/mol]\n",
+ "x_1 = 0.6;\t\t\t# Mle fraction of feed composition\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# Since A is given to be independent of temperature\n",
+ "UCST = A/(2*R);\t\t\t#[K] - Upper critical solution temperature\n",
+ "print \" The UCST of the system is %f K\"%(UCST);\n",
+ "\n",
+ "\t\t\t# Since the given temperature is less than UCST therefore two phase can get formed at the given temperature.\n",
+ "\n",
+ "\t\t\t# x1_alpha = 1 - x1_beta\n",
+ "\t\t\t# We know that, x1_alpha*Y_1_alpha = x2_alpha*Y_2_alpha\n",
+ "\t\t\t# x1_alpha*math.exp[(A/(R*T))*(x2_alpha)**(2)] = (1 - x1_alpha)*math.exp[(A/(R*T))*(x1_alpha)**(2)]\n",
+ "\t\t\t# where use has beeen made of the fact that x1_alpha = 1 - x1_beta and x2_beta = 1 - x1_beta = x1_alpha .Taking math.logarithm of both side we get\n",
+ "\t\t\t# math.log(x1_alpha) + (A/(R*T))*(1 - x1_alpha)**(2) = math.log(1 - x1_alpha) + (A/(R*T))*x1_alpha**(2)\n",
+ "\t\t\t# math.log(x1_alpha/(1-x1_alpha)) = (A/(R*T))*(2*x1_alpha - 1)\n",
+ "\n",
+ "def f(x1_alpha): \n",
+ "\t return math.log(x1_alpha/(1-x1_alpha)) - (A/(R*T))*(2*x1_alpha - 1)\n",
+ "x1_alpha = fsolve(f,0.1)\n",
+ "x1_beta = fsolve(f,0.9)\n",
+ "\t\t\t# Because of symmetry 1 - x1_beta = x1_alpha\n",
+ "\n",
+ "\t\t\t# It can be seen that the equation, math.log(x1/(1-x1)) = (A/(R*T))*(2*x1 - 1) has two roots.\n",
+ "\t\t\t\n",
+ "print \" The composition of two liquid phases in equilibrium is given by x1_alpha = %f and x1_beta = %f\"%(x1_alpha,x1_beta);\n",
+ "\n",
+ "z1 = 0.6;\n",
+ "\t\t\t# z1 = x1_alpha*alpha + x1_beta*beta\n",
+ "\t\t\t# beta = 1 - alpha\n",
+ "alpha = (z1-x1_beta)/(x1_alpha-x1_beta);\t\t\t#[mol]\n",
+ "Beta = 1 - alpha;\t\t\t#[mol]\n",
+ "print \" The relative amount of phases is given by alpha = %f mol and beta = %f mol\"%(alpha,Beta);\n",
+ "\n",
+ "\t\t\t# the relative amounts of the phases changes with the feed composition \n",
+ "\n",
+ "\t\t\t#math.log(x1/(1-x1)) = (A/(R*T))*(2*x1 - 1)\n",
+ "\t\t\t\n",
+ "\n",
+ "print \" math.logx1/1-x1 = A/R*T*2*x1 - 1\";\n",
+ "print \" If the above equation has two real roots of x1 one for phase alpha and the other for phase beta then two liquid phases get formed\";\n",
+ "print \" and if it has no real roots then a homogeneous liquid mixture is obtained\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The UCST of the system is 240.558095 K\n",
+ " The composition of two liquid phases in equilibrium is given by x1_alpha = 0.169102 and x1_beta = 0.830898\n",
+ " The relative amount of phases is given by alpha = 0.348896 mol and beta = 0.651104 mol\n",
+ " math.logx1/1-x1 = A/R*T*2*x1 - 1\n",
+ " If the above equation has two real roots of x1 one for phase alpha and the other for phase beta then two liquid phases get formed\n",
+ " and if it has no real roots then a homogeneous liquid mixture is obtained\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.5 Page Number : 573"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 300;\t\t\t#[K]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n",
+ "A = 7000;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# math.log(x_1/(1-x_1)) = (A/(R*T))*(2*x_1-1)\n",
+ "\n",
+ "# Calculations\n",
+ "def f(x_1): \n",
+ "\t return math.log(x_1/(1-x_1))-((A/(R*T))*(2*x_1-1))\n",
+ "\n",
+ "x1_alpha=fsolve(f,0.1)\n",
+ "\n",
+ "x1_beta=1-x1_alpha;\n",
+ "\n",
+ "# Results\n",
+ "print \"The equilibrium compositin of the two liquid phase system is given by x1_alpha \\t = %f x1_beta \\t = %f\"%(x1_alpha,x1_beta);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equilibrium compositin of the two liquid phase system is given by x1_alpha \t = 0.091897 x1_beta \t = 0.908103\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.7 Page Number : 579"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "M_wt_meth = 32;\t\t\t# Molecular weight of methanol \n",
+ "M_wt_water = 18;\t\t\t# Molecular weight of water \n",
+ "m_meth = 0.01;\t\t\t#[g] - Mass of methanol added per cm**(3) of solution\n",
+ "\n",
+ "\n",
+ "den_sol = 1;\t\t\t#[g/cm**(3)]\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#The mole fraction of solute is given by\n",
+ "\t\t\t#x_2 = (moles of solute in cm**(3) of solution)/(moles of solute + moles of water) in 1 cm**(3) of solution\n",
+ "x_2 = (m_meth/M_wt_meth)/((m_meth/M_wt_meth)+((1-m_meth)/M_wt_water));\n",
+ "\n",
+ "\t\t\t#We know that heat of fusion of water is\n",
+ "H_fus = -80;\t\t\t#[cal/g] - Enthalpy change of fusion at 0 C\n",
+ "H_fus = H_fus*4.186*M_wt_water;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t#Therefore freezing point depression is given by\n",
+ "\t\t\t# T - T_m = (R*(T**(2))*x_2)/H_fus\n",
+ "T_f = 273.15;\t\t\t#[K] - Freezing point of water\n",
+ "delta_T_f = (R*(T_f**(2))*x_2)/H_fus;\t\t\t#[K]\n",
+ "\n",
+ "# Results\n",
+ "print \"The depression in freezing point is given by delta_T = %f K\"%(delta_T_f);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The depression in freezing point is given by delta_T = -0.581403 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.8 Page Number : 580"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n",
+ "T_f = 273.15;\t\t\t#[K] - Freezing point of water\n",
+ "m_water = 100;\t\t\t#[g] - Mass of water\n",
+ "m_NaCl = 3.5;\t\t\t#[g] - Mass of NaCl\n",
+ "M_wt_water = 18.015;\t\t\t# Molecular weight of water \n",
+ "M_wt_NaCl = 58.5;\t\t\t# Molecular weight of NaCl\n",
+ "mol_water = m_water/M_wt_water;\t\t\t#[mol] - Moles of water\n",
+ "mol_NaCl = m_NaCl/M_wt_NaCl;\t\t\t#[mol] - Moles of NaCl\n",
+ "\n",
+ "H_fus = -80;\t\t\t#[cal/g] - Enthalpy change of fusion at 0 C\n",
+ "H_fus = H_fus*4.186*M_wt_water;\t\t\t#[J/mol]\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#Mole fraction of the solute (NaCl) is given by\n",
+ "x_2 = mol_NaCl/(mol_NaCl+mol_water);\n",
+ "\n",
+ "\n",
+ "x_2_act = 2*x_2;\t\t\t# Actual mole fraction\n",
+ "\n",
+ "\t\t\t#Now depression in freezing point is given by\n",
+ "\t\t\t# T - T_m = (R*(T**(2))*x_2_act)/H_fus\n",
+ "delta_T_f = (R*(T_f**(2))*x_2_act)/H_fus;\t\t\t#[C]\n",
+ "\n",
+ "\t\t\t#Thus freezing point of seawater = depression in freezing point\n",
+ "\n",
+ "# Results\n",
+ "print \"The freezing point of seawater is %f C\"%(delta_T_f);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The freezing point of seawater is -2.192853 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.10 Page Number : 583"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n",
+ "T_b = 373.15;\t\t\t#[K] - Boiling point of water\n",
+ "m_water = 100.;\t\t\t#[g] - Mass of water\n",
+ "m_C12H22 = 5.;\t\t\t#[g] - Mass of glucise (C12H22)\n",
+ "M_wt_water = 18.015;\t\t\t# Molecular weight of water \n",
+ "M_wt_C12H22 = 342.30;\t\t\t# Molecular weight of C12H22\n",
+ "mol_water = m_water/M_wt_water;\t\t\t#[mol] - Moles of water\n",
+ "mol_C12H22 = m_C12H22/M_wt_C12H22;\t\t\t#[mol] - Moles of C12H22\n",
+ "\n",
+ "# Calculations\n",
+ "H_vap = 540.;\t\t\t#[cal/g] - Enthalpy change of vaporisation\n",
+ "H_vap = H_vap*4.186*M_wt_water;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t#Mole fraction of the solute (C12H22) is given by\n",
+ "x_2 = mol_C12H22/(mol_C12H22+mol_water);\n",
+ "\n",
+ "\t\t\t#The boiling point elevation is given by\n",
+ "\t\t\t# T - T_b = (R*T_b**(2)*x_2**(2))/H_vap**(2)\n",
+ "\n",
+ "delta_T_b = (R*T_b**(2)*x_2)/(H_vap);\n",
+ "\n",
+ "# Results\n",
+ "print \"The elevation in boiling point is given by delta_T = %f C\"%(delta_T_b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The elevation in boiling point is given by delta_T = 0.074611 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.11 Page Number : 584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "T = 25 + 273.15;\t\t\t#[K] - Surrounding temperature \n",
+ "den_water = 1000.;\t\t\t#[kg/m**(3)] - Density of water\n",
+ "m_water = 100.;\t\t\t#[g] - Mass of water\n",
+ "m_C12H22 = 5.;\t\t\t#[g] - Mass of glucise (C12H22)\n",
+ "M_wt_water = 18.015;\t\t\t# Molecular weight of water \n",
+ "M_wt_C12H22 = 342.30;\t\t\t# Molecular weight of C12H22\n",
+ "mol_water = m_water/M_wt_water;\t\t\t#[mol] - Moles of water\n",
+ "mol_C12H22 = m_C12H22/M_wt_C12H22;\t\t\t#[mol] - Moles of C12H22\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#Mole fraction of the water is given by\n",
+ "x_1 = mol_water/(mol_C12H22+mol_water);\n",
+ "\n",
+ "\t\t\t#Molar volume of water can be calculated as\n",
+ "V_l_water = (1./den_water)*M_wt_water*10**(-3);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#The osmotic pressure is given by\n",
+ "pi = -(R*T*math.log(x_1))/V_l_water;\t\t\t#[N/m**(2)]\n",
+ "pi = pi*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "# Results\n",
+ "print \"The osmotic pressure of the mixture is %f bar\"%(pi);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The osmotic pressure of the mixture is 3.616073 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.12 Page Number : 585"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n",
+ "T = 25 + 273.15;\t\t\t#[K] - Surrounding temperature\n",
+ "den_water = 1000.;\t\t\t#[kg/m**(3)] - Density of water\n",
+ "m_water = 100.;\t\t\t#[g] - Mass of water\n",
+ "m_NaCl = 3.5;\t\t\t#[g] - Mass of NaCl\n",
+ "M_wt_water = 18.015;\t\t\t# Molecular weight of water \n",
+ "M_wt_NaCl = 58.5;\t\t\t# Molecular weight of NaCl\n",
+ "mol_water = m_water/M_wt_water;\t\t\t#[mol] - Moles of water\n",
+ "mol_NaCl = m_NaCl/M_wt_NaCl;\t\t\t#[mol] - Moles of NaCl\n",
+ "\n",
+ "# Calculations\n",
+ "H_fus = -80.;\t\t\t#[cal/g] - Enthalpy change of fusion at 0 C\n",
+ "H_fus = H_fus*4.186*M_wt_water;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t#Mole fraction of the solute (NaCl) is given by\n",
+ "x_2 = mol_NaCl/(mol_NaCl+mol_water);\n",
+ "\n",
+ "\n",
+ "x_2_act = 2*x_2;\t\t\t# Actual mole fraction\n",
+ "\n",
+ "x_1 = 1 - x_2_act;\n",
+ "\n",
+ "\t\t\t#Molar volume of water can be calculated as\n",
+ "V_l_water = (1/den_water)*M_wt_water*10**(-3);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#The osmotic pressure is given by\n",
+ "pi = -(R*T*math.log(x_1))/V_l_water;\t\t\t#[N/m**(2)]\n",
+ "pi = pi*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"The minimum pressure to desalinate sea water is %f bar\"%(pi);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum pressure to desalinate sea water is 29.662232 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.13 Page Number : 586"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n",
+ "T = 173.15;\t\t\t#[K] - Surrounding temperature\n",
+ "P = 60;\t\t\t#[bar]\n",
+ "P = P*10**(5);\t\t\t#[Pa] \n",
+ "\n",
+ "\t\t\t#componenet 1 : CO2 (1)\n",
+ "\t\t\t#componenet 2 : H2 (2)\n",
+ "P_1_sat = 0.1392;\t\t\t#[bar] - Vapour pressre of pure solid CO2\n",
+ "P_1_sat = P_1_sat*10**(5);\t\t\t#[bar]\n",
+ "V_s_1 = 27.6;\t\t\t#[cm**(3)/mol] - Molar volume of solid CO2\n",
+ "V_s_1 = V_s_1*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "n_1 = 0.01;\t\t\t#[mol] - Initial number of moles of CO2\n",
+ "n_2 = 0.99;\t\t\t#[mol] - Initial number of moles of H2\n",
+ "\n",
+ "\t\t\t#Let us determine the fugacity of solid CO2 (1) at 60 C and 173.15 K\n",
+ "\t\t\t# f_1 = f_1_sat*math.exp(V_s_1*(P-P_1_sat)/(R*T))\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#Since vapour pressure of pure solid CO2 is very small, therefore\n",
+ "f_1_sat = P_1_sat;\n",
+ "f_1 = f_1_sat*math.exp(V_s_1*(P-P_1_sat)/(R*T));\n",
+ "\n",
+ "\t\t\t#Since gas phase is ideal therefore\n",
+ "\t\t\t# y1*P = f_1\n",
+ "y1 = f_1/P;\n",
+ "\n",
+ "\t\t\n",
+ "\t\t\t#Number of moles of CO2 in vapour phase at equilibrium can be calculated as\n",
+ "\t\t\t#y1 = (n_1_eq/(n_1_eq + n_2)). Therefore\n",
+ "n_1_eq = n_2*y1/(1-y1);\n",
+ "\n",
+ "\t\t\t#Therefore moles of CO2 precipitated is\n",
+ "n_ppt = n_1 - n_1_eq;\t\t\t#[mol]\n",
+ "\n",
+ "# Results\n",
+ "print \"The moles of CO2 precipitated is %f mol\"%(n_ppt);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The moles of CO2 precipitated is 0.007417 mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.14 Page Number : 586"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - universal gas constant\n",
+ "T = 350.;\t\t\t#[K] - Surrounding temperature\n",
+ "\n",
+ "\t\t\t#componenet 1 : organic solid (1)\n",
+ "\t\t\t#componenet 2 : CO2 (2)\n",
+ "\n",
+ "P_1_sat = 133.3;\t\t\t#[N/m**(2)] - Vapour pressre of organic solid\n",
+ "V_s_1 = 200.;\t\t\t#[cm**(3)/mol] - Molar volume of organic solid\n",
+ "V_s_1 = V_s_1*10.**(-6);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#/At 350 K, the values of the coefficients \n",
+ "B_11 = -500.;\t\t\t#[cm**(3)/mol]\n",
+ "B_22 = -85.;\t\t\t#[cm****(3)/mol]\n",
+ "B_12 = -430.;\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#From phase equilibrium equation of component 1, we get\n",
+ "\t\t\t# y1*P*phi_1 = f_1\n",
+ "\t\t\t# f_1 = f_1_sat*math.exp(V_s_1*(P-P_1_sat)/(R*T))\n",
+ "\n",
+ "\t\t\t#Since vapour pressure of organic solid is very small, therefore\n",
+ "f_1_sat = P_1_sat;\n",
+ "\n",
+ "\t\t\t# Now let us determine the fugacity coefficient of organic solid in the vapour mixture.\n",
+ "\t\t\t# math.log(phi_1) = (P/(R*T))*(B_11 + y2**(2)*del_12) \n",
+ "del_12 = (2*B_12 - B_11 - B_22)*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#It is given that the partial pressure of component 1 in the vapour mixture is 1333 N?m**(2)\n",
+ "\t\t\t# y1*P = 1333 N/m**(2) or, y1 = 1333/P\n",
+ "\t\t\t# y2 = 1- 1333/P\n",
+ "\t\t\t# math.log(phi_1) = (P/(R*T))*(B_11 + (1- 1333/P)**(2)*del_12)\n",
+ "\n",
+ "\t\t\t#The phase equilibrium equation becomes\n",
+ "\t\t\t# y1*P*phi_1 = f_1_sat*math.exp(V_s_1*(P-P_1_sat)/(R*T))\n",
+ "\t\t\t#Taking math.log on both side we have\n",
+ "\t\t\t# math.log(y1*P) + math.log(phi_1) = math.log(f_1_sat) + (V_s_1*(P-P_1_sat)/(R*T))\n",
+ "\t\t\t# (V_s_1*(P-P_1_sat)/(R*T)) - math.log(phi_1) = math.log(1333/133.3) = math.log(10)\n",
+ "\n",
+ "\t\t\t#substituting for math.log(phi_1) from previous into the above equation we get\n",
+ "\t\t\t# (V_s_1*(P-P_1_sat)/(R*T)) - (P/(R*T))*(B_11 + (1- 1333/P)**(2)*del_12) - math.log(10) = 0\n",
+ "\t\t\t# On simplification we get,\n",
+ "\t\t\t# 975*P**(2) - 6.7*10**(9)*P + 4.89*10**(8) = 0\n",
+ "\t\t\t# Solving the above qyadratic equation using shreedharcharya rule\n",
+ "\n",
+ "P3 = (6.7*10**(9) + ((-6.7*10**(9))**(2)-4*975*4.98*10**(8))**(1./2))/(2*975);\t\t\t#[Pa]\n",
+ "P4 = (6.7*10**(9) - ((-6.7*10**(9))**(2)-4*975*4.98*10**(8))**(1./2))/(2*975);\t\t\t#[Pa]\n",
+ "\t\t\t# The second value is not possible, therefore pressure of the system is P3\n",
+ "P3 = P3*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "# Results\n",
+ "print \" The total pressure of the system is %f bar\"%(P3);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The total pressure of the system is 68.717948 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch17_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch17_1.ipynb new file mode 100755 index 00000000..61fcd6b8 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch17_1.ipynb @@ -0,0 +1,2044 @@ +{
+ "metadata": {
+ "name": "ch17_1",
+ "signature": "sha256:e354b0525ce1aff27214eb76f8a2c9be56cfff2939a8a4b8688a7fe1cea4959c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17 : Chemical Reactions Equilibria"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.2 Page Number : 598"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "P = 1;\t\t\t#[atm] - Reactor pressure\n",
+ "T = 749;\t\t\t#[K] - Reactor temperature\n",
+ "K = 74;\t\t\t# Equlibrium constant\n",
+ "\n",
+ "\t\t\t# SO2 + (1/2)*O2 - SO3\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Kp = P**(1);\n",
+ "Ky = K/Kp;\n",
+ "\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "n_SO2_1_in = 12;\n",
+ "n_O2_1_in = 9;\n",
+ "n_SO3_1_in = 0;\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_SO2_1_eq = 12 - X\n",
+ "\t\t\t# n_O2_1_eq = 9 - 0.5*X\n",
+ "\t\t\t# n_SO3_1_eq = X\n",
+ "\t\t\t# Total moles = 21 - 0.5*X\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "\t\t\t# y_SO3 = X/(21-0.5*X)\n",
+ "\t\t\t# y_SO2 = (12-X)/(21-0.5*X)\n",
+ "\t\t\t# y_O2 = (9-0.5*X)/(21-0.5*X)\n",
+ "\n",
+ "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(2))\n",
+ "\t\t\t# Ky = (X*(21-0.5*X)**(1/2))/((12-X)*(9-0.5*X)**(1/2))\n",
+ "def f(X): \n",
+ "\t return Ky-(X*(21-0.5*X)**(1./2))/((12-X)*(9-0.5*X)**(1./2))\n",
+ "X_1 = fsolve(f,11)\n",
+ "\n",
+ "y_SO3_1 = X_1/(21-0.5*X_1);\n",
+ "y_SO2_1 = (12-X_1)/(21-0.5*X_1);\n",
+ "y_O2_1 = (9-0.5*X_1)/(21-0.5*X_1);\n",
+ "\n",
+ "print \" 1).The moles of SO3 formed = %f mol\"%(X_1);\n",
+ "print \" The mole fractions at equilibrium are y_S03 = %f y_SO2 = %f and y_O2 = %f\"%(y_SO3_1,y_SO2_1,y_O2_1);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "n_SO2_2_in = 24;\n",
+ "n_O2_2_in = 18;\n",
+ "n_SO3_2_in = 0;\n",
+ "\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_SO2_1_eq = 24 - X\n",
+ "\t\t\t# n_O2_1_eq = 18 - 0.5*X\n",
+ "\t\t\t# n_SO3_1_eq = X\n",
+ "\t\t\t# Total moles = 42 - 0.5*X\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "\t\t\t# y_SO3 = X/(42-0.5*X)\n",
+ "\t\t\t# y_SO2 = (24-X)/(42-0.5*X)\n",
+ "\t\t\t# y_O2 = (18-0.5*X)/(42-0.5*X)\n",
+ "\n",
+ "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(2))\n",
+ "\t\t\t# Ky = (X*(42-0.5*X)**(1/2))/((24-X)*(18-0.5*X)**(1/2))\n",
+ "def f1(X): \n",
+ "\t return Ky-(X*(42-0.5*X)**(1./2))/((24-X)*(18-0.5*X)**(1./2))\n",
+ "X_2 = fsolve(f1,22)\n",
+ "\n",
+ "y_SO3_2 = X_2/(42-0.5*X_2);\n",
+ "y_SO2_2 = (24-X_2)/(42-0.5*X_2);\n",
+ "y_O2_2 = (18-0.5*X_2)/(42-0.5*X_2);\n",
+ "print \" 2).The moles of SO3 formed = %f mol\"%(X_2);\n",
+ "print \" The mole fractions at equilibrium are y_S03 = %f, y_SO2 = %f and y_O2 = %f\"%(y_SO3_2,y_SO2_2,y_O2_2);\n",
+ "\n",
+ "\t\t\t#(3)\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "n_SO2_3_in = 12;\n",
+ "n_O2_3_in = 9;\n",
+ "n_SO3_3_in = 0;\n",
+ "n_N2 = 79;\n",
+ "\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_SO2_1_eq = 12 - X\n",
+ "\t\t\t# n_O2_1_eq = 9 - 0.5*X\n",
+ "\t\t\t# n_SO3_1_eq = X\n",
+ "\t\t\t# Total moles = 100 - 0.5*X\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "\t\t\t# y_SO3 = X/(100-0.5*X)\n",
+ "\t\t\t# y_SO2 = (12-X)/(100-0.5*X)\n",
+ "\t\t\t# y_O2 = (9-0.5*X)/(100-0.5*X)\n",
+ "\n",
+ "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(2))\n",
+ "\t\t\t# Ky = (X*(100-0.5*X)**(1/2))/((12-X)*(9-0.5*X)**(1/2))\n",
+ "def f2(X): \n",
+ "\t return Ky-(X*(100-0.5*X)**(1./2))/((12-X)*(9-0.5*X)**(1./2))\n",
+ "X_3 = fsolve(f2,10)\n",
+ "\n",
+ "y_SO3_3 = X_3/(100-0.5*X_3);\n",
+ "y_SO2_3 = (12-X_3)/(100-0.5*X_3);\n",
+ "y_O2_3 = (9-0.5*X_3)/(100-0.5*X_3);\n",
+ "\n",
+ "print \" 3).The moles of SO3 formed = %f mol\"%(X_3);\n",
+ "print \" The mole fractions at equilibrium are y_S03 = %f y_SO2 = %f and y_O2 = %f\"%(y_SO3_3,y_SO2_3,y_O2_3);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The moles of SO3 formed = 11.655537 mol\n",
+ " The mole fractions at equilibrium are y_S03 = 0.768215 y_SO2 = 0.022704 and y_O2 = 0.209081\n",
+ " 2).The moles of SO3 formed = 23.311074 mol\n",
+ " The mole fractions at equilibrium are y_S03 = 0.768215, y_SO2 = 0.022704 and y_O2 = 0.209081\n",
+ " 3).The moles of SO3 formed = 11.202213 mol\n",
+ " The mole fractions at equilibrium are y_S03 = 0.118669 y_SO2 = 0.008451 and y_O2 = 0.036006\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.3 Page Number : 599"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 600;\t\t\t#[K] - Reactor temperature\n",
+ "P = 300;\t\t\t#[atm] - Reactor pressure\n",
+ "K = 0.91*10**(-4);\t\t\t# Equilibrium constant\n",
+ "\n",
+ "\t\t\t# The fugacity coefficients of the components are\n",
+ "phi_CO = 1.0;\n",
+ "phi_H2 = 1.2;\n",
+ "phi_CH3OH = 0.47;\n",
+ "\n",
+ "\t\t\t# CO + 2*H2 - CH3OH \n",
+ "\n",
+ "\t\t\t# For gas phase reactions the standard state is pure ideal gas and thus fi_0 = 1 atm and thus\n",
+ "\t\t\t# ai_cap = fi_cap/fi_0 = yi*P*phi_i_cap/1\n",
+ "\t\t\t# Thus K = Ky*Kp*K_phi\n",
+ "# Calculations and Results \n",
+ "Kp = P**(1-3);\n",
+ "K_phi = phi_CH3OH/(phi_CO*phi_H2**(2));\n",
+ "Ky = K/(Kp*K_phi);\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium ,the moles of the components be \n",
+ "\t\t\t# n_CO = 1 - X\n",
+ "\t\t\t# n_H2 = 3 - 2*X\n",
+ "\t\t\t# n_CH3OH = X\n",
+ "\t\t\t# Total moles = 4 - 2*X\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "\t\t\t# y_CO = (1-X)/(4-2*X)\n",
+ "\t\t\t# y_H2 = (3-2*X)/(4-2*X)\n",
+ "\t\t\t# y_CH3OH = (X)/(4-2*X)\n",
+ "\n",
+ "\t\t\t# Ky = y_CH3OH/(y_CO*y_H2**(2)) = (X/(4-2*X))/(((1-X)/(4-2*X))*((3-2*X)/(4-2*X))**(2))\n",
+ "def f(X): \n",
+ "\t return Ky-(X/(4-2*X))/(((1-X)/(4-2*X))*((3-2*X)/(4-2*X))**(2))\n",
+ "X = fsolve(f,0.1)\n",
+ "\n",
+ "\t\t\t# Therefore at equilibrium \n",
+ "y_CO = (1-X)/(4-2*X);\n",
+ "y_H2 = (3-2*X)/(4-2*X);\n",
+ "y_CH3OH = (X)/(4-2*X);\n",
+ "\n",
+ "print \" The mole fractions at equilibrium are y_CO = %f y_H2 = %f and y_CH3OH = %f\"%(y_CO,y_H2,y_CH3OH);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The mole fractions at equilibrium are y_CO = 0.051857 y_H2 = 0.551857 and y_CH3OH = 0.396286\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.4 Page Number : 600"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\t\t\n",
+ "T = 600;\t\t\t#[K] - Reactor temperature\n",
+ "P = 4;\t\t\t#[atm] - Reactor pressure\n",
+ "K = 1.175;\t\t\t# Equilibrium constant\n",
+ "\n",
+ "\t\t\t# (1/2)*N2 + (3/2)*H_2 - NH3\n",
+ "\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "n_N2 = 1;\n",
+ "n_H2 = 3;\n",
+ "n_HN3 = 0;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X.\n",
+ "\t\t\t# At equilibrium ,the moles of the components be \n",
+ "\t\t\t# n_N2 = 1 - 0.5*X\n",
+ "\t\t\t# n_H2 = 3 - 1.5*X\n",
+ "\t\t\t# n_NH3 = X\n",
+ "\t\t\t# Total moles = 4 - X\n",
+ "\n",
+ "\t\t\t# We have, K = Ky*Kp\n",
+ "Kp = P**(1-2);\t\t\t#[atm**(-1)]\n",
+ "Ky = K/(Kp);\n",
+ "\n",
+ "\t\t\t# Ky = y_NH3/(y_N2**(1/2)*y_H2**(3/2)) = (X/(4-X))/(((1-0.5*X)/(4-X))**(1/2)*((3-1.5*X)/(4-X))**(3/2))\n",
+ "\t\t\t# Solving the above equation we get\n",
+ "def f(X): \n",
+ "\t return Ky - (X/(4-X))/(((1-0.5*X)/(4-X))**(1./2)*((3-1.5*X)/(4-X))**(3./2))\n",
+ "X = fsolve(f,0.1)\n",
+ "\n",
+ "y_NH3 = X/(4-X);\t\t\t# Mole fraction of NH3 at equilibrium\n",
+ "\n",
+ "print \" The value of Kp = %f and Ky = %f \"%(Kp,Ky);\n",
+ "print \" The mole fractions of NH3 at equilibrium is %f\"%(y_NH3);\n",
+ "\n",
+ "\t\t\t\n",
+ "\n",
+ "\t\t\t# We know that for ideal gas, P*V = n*R*T and thus P is directly proportional to n at constant V and T.\n",
+ "\t\t\t# Let P = k*n\n",
+ "\t\t\t# Initially P = 4 atm and n = 4 moles, thus K = 1 and we get p = n, where P is in atm. \n",
+ "\t\t\t# Thus at equilibrium P = 4 - X\n",
+ "\n",
+ "\t\t\t# Ky = K/Kp = 1.175*P = 1.175*(4 - X)\n",
+ "\t\t\t# (X/(4-X))/(((1-0.5*X)/(4-X))**(1/2)*((3-1.5*X)/(4-X))**(3/2)) = 1.175*(4 - X)\n",
+ "\t\t\t# Solving the above equation we get\n",
+ "def f1(X): \n",
+ "\t return (X/(4-X))/(((1-0.5*X)/(4-X))**(1./2)*((3-1.5*X)/(4-X))**(3./2))-1.175*(4-X)\n",
+ "X_prime = fsolve(f1,1)\n",
+ "\n",
+ "\t\t\t# Therefore at equilibrium \n",
+ "P_prime = 4 - X_prime;\n",
+ "y_NH3_prime = X_prime/(4-X_prime);\n",
+ "\n",
+ "print \" If reaction is carried out at constant temperature and volumethen\"\n",
+ "print \" The equilibrium pressure is %f atm\"%(P_prime);\n",
+ "print \" The equilibrium mole fractions of NH3 in the reactor is %f\"%(y_NH3_prime);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of Kp = 0.250000 and Ky = 4.700000 \n",
+ " The mole fractions of NH3 at equilibrium is 0.454388\n",
+ " If reaction is carried out at constant temperature and volumethen"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The equilibrium pressure is 2.863057 atm\n",
+ " The equilibrium mole fractions of NH3 in the reactor is 0.397108\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.5 Page Number : 601"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 400;\t\t\t#[K] - Reactor temperature\n",
+ "P = 1;\t\t\t#[atm] - Reactor pressure\n",
+ "K = 1.52;\t\t\t# Equilibrium constant\n",
+ "y_H2 = 0.4;\t\t\t# Equilibrium mole fraction of hydrogen\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# CO(g) + 2*H_2(g) - CH3OH(g)\n",
+ "\n",
+ "\t\t\t# K = y_CH3OH/(y_CO*y_H2**(2)*P**(2))\n",
+ "\t\t\t# Let total number of moles at equilibrium be 1\n",
+ "\t\t\t# y_CH3OH = 0.6 - y_CO;\n",
+ "\t\t\t# (0.6 - y_CO)/y_CO = K*P**(2)*y_H2**(2)\n",
+ "\n",
+ "y_CO = 0.6/(1 + K*P**(2)*y_H2**(2));\n",
+ "y_CH3OH = 0.6 - y_CO;\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \" The mole fractions are y_CO = %f and y_CH3OH = %f \"%(y_CO,y_CH3OH);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The mole fractions are y_CO = 0.482625 and y_CH3OH = 0.117375 \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.6 Page Number : 602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T = 749.;\t\t\t#[K] - Reactor temperature\n",
+ "P = 1.;\t\t\t#[atm] - Reactor pressure\n",
+ "K = 74.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Kp = P**(-1./2);\t\t\t#[atm**(-1/2)]\n",
+ "Ky = K/Kp;\n",
+ "\n",
+ "\t\t\t# SO2 + (1/2)*O2 - SO3\n",
+ "\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "n_SO2_1_in = 10;\n",
+ "n_O2_1_in = 8;\n",
+ "n_SO3_1_in = 0;\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_SO2_1_eq = 10 - X\n",
+ "\t\t\t# n_O2_1_eq = 8 - 0.5*X\n",
+ "\t\t\t# SO3_1_eq = X\n",
+ "\t\t\t# Total moles = 18 - 0.5*X\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "\t\t\t# y_SO3 = X/(18-0.5*X)\n",
+ "\t\t\t# y_SO2 = (10-X)/(18-0.5*X)\n",
+ "\t\t\t# y_O2 = (8-0.5*X)/(18-0.5*X)\n",
+ "\n",
+ "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(2))\n",
+ "\t\t\t# Ky = (X*(18-0.5*X)**(1/2))/((10-X)*(8-0.5*X)**(1/2))\n",
+ "def f(X): \n",
+ "\t return Ky-(X*(18-0.5*X)**(1./2))/((10-X)*(8-0.5*X)**(1./2))\n",
+ "X_1 = fsolve(f,11)\n",
+ "\n",
+ "n_SO3 = X_1;\n",
+ "n_SO2 = 10 - X_1;\n",
+ "n_O2 = 8 - 0.5*X_1;\n",
+ "\n",
+ "print \" 1).The moles of the components at equilibrium are n_SO3 = %f mol n_SO2 = %f mol and n_O2 = %f mol\"%(n_SO3,n_SO2,n_O2);\n",
+ "\n",
+ "\t\t\t# Now for the reaction\n",
+ "\t\t\t# 2*SO2 + O2 - 2*SO3\n",
+ "\n",
+ "\t\t\t# The equilibrium constant for this reaction is KP**(2)\n",
+ "Ky_prime = Ky**(2);\n",
+ "\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_SO2_1_eq = 10 - 2*X\n",
+ "\t\t\t# n_O2_1_eq = 8 - X\n",
+ "\t\t\t# SO3_1_eq = 2*X\n",
+ "\t\t\t# Total moles = 18 - X\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "\t\t\t# y_SO3 = 2*X/(18-X)\n",
+ "\t\t\t# y_SO2 = (10-2*X)/(18-X)\n",
+ "\t\t\t# y_O2 = (8- X)/(18-X)\n",
+ "\n",
+ "\t\t\t# Ky_prime = y_SO3**(2)/(y_SO2**(2)*y_O2)\n",
+ "\t\t\t# Ky_prime = ((2*X)**(2)*(18-X))/((10-2*X)**(2)*(8-X))\n",
+ "def f1(X): \n",
+ "\t return Ky_prime-((2*X)**(2)*(18-X))/(((10-2*X)**(2))*(8-X))\n",
+ "X_2 = fsolve(f1,6)\n",
+ "\n",
+ "n_SO3_prime = 2*X_2;\n",
+ "n_SO2_prime = 10 - 2*X_2;\n",
+ "n_O2_prime = 8 - X_2;\n",
+ "\n",
+ "print \" 2).The moles of the components at equilibrium are n_SO3 = %f mol n_SO2 = %f mol and n_O2 = %f mol\"%(n_SO3_prime,n_SO2_prime,n_O2_prime);\n",
+ "print \" Thus the number of moles remains the same irrespective of the stoichoimetry of the reaction\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The moles of the components at equilibrium are n_SO3 = 9.730824 mol n_SO2 = 0.269176 mol and n_O2 = 3.134588 mol\n",
+ " 2).The moles of the components at equilibrium are n_SO3 = 9.730824 mol n_SO2 = 0.269176 mol and n_O2 = 3.134588 mol\n",
+ " Thus the number of moles remains the same irrespective of the stoichoimetry of the reaction\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.7 Page Number : 603"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T = 500;\t\t\t#[K]\n",
+ "\t\t\t# For the reaction, 0.5*A2 + 0.5*B2 - AB\n",
+ "delta_G = -4200;\t\t\t#[J/mol]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t# A2 + B2 - 2*AB\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# We know delta_G_rkn_0 = -R*T*math.log(K) \n",
+ "delta_G_1 = 2*delta_G;\n",
+ "K_1 = math.exp(-delta_G_1/(R*T));\t\t\t# Equilibrium constant at 500 K for the above reaction\n",
+ "\t\t\t# As can be seen the reaction is not affected by pressure and therefore K = Ky as Kp = 1 \n",
+ "Ky = K_1;\n",
+ "\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "n_A2_1_in = 0.5;\n",
+ "n_B2_1_in = 0.5;\n",
+ "n_AB_1_in = 0;\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_A2_1_eq = 0.5 - X\n",
+ "\t\t\t# n_B2_1_eq = 0.5- X\n",
+ "\t\t\t# n_AB_1_eq = 2*X\n",
+ "\t\t\t# Total moles = 1\n",
+ "\n",
+ "\t\t\t# Ky = (2*X)**(2)/(0.5-X)**(2)\n",
+ "def f(X): \n",
+ "\t return Ky-(2*X)**(2)/(0.5-X)**(2)\n",
+ "X_1 = fsolve(f,0.2)\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "y_A2_1 = 0.5 - X_1;\n",
+ "y_B2_1 = 0.5- X_1;\n",
+ "y_AB_1 = 2*X_1;\n",
+ "\n",
+ "print \" 1).The mole fractions at equilibrium are y_A2 = %f y_B2 = %f and y_AB = %f\"%(y_A2_1,y_B2_1,y_AB_1);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# 0.5*A2 + 0.5*B2 - AB\n",
+ "\n",
+ "\t\t\t# We know delta_G_rkn_0 = -R*T*math.log(K) \n",
+ "delta_G_2 = delta_G;\n",
+ "K_2 = math.exp(-delta_G_2/(R*T));\t\t\t# Equilibrium constant at 500 K for the above reaction\n",
+ "\n",
+ "\t\t\t# As can be seen the reaction is not affected by pressure and therefore K = Ky as Kp = 1 \n",
+ "Ky_2 = K_2;\n",
+ "\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "n_A2_2_in = 0.5;\n",
+ "n_B2_2_in = 0.5;\n",
+ "n_AB_2_in = 0;\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_A2_2_eq = 0.5 - 0.5*X\n",
+ "\t\t\t# n_B2_2_eq = 0.5- 0.5*X\n",
+ "\t\t\t# n_AB_2_eq = X\n",
+ "\t\t\t# Total moles = 1\n",
+ "\n",
+ "\t\t\t# Ky = y_AB/(y_A2**(1/2)*y_B2**(1/2))\n",
+ "\t\t\t# Ky = X/(0.5 - 0.5*X)\n",
+ "X_2 = 0.5*Ky_2/(1+0.5*Ky_2);\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "y_A2_2 = 0.5 - 0.5*X_2;\n",
+ "y_B2_2 = 0.5- 0.5*X_2;\n",
+ "y_AB_2 = X_2;\n",
+ "\n",
+ "print \" 2).The mole fractions at equilibrium are y_A2 = %f y_B2 = %f and y_AB = %f\"%(y_A2_2,y_B2_2,y_AB_2);\n",
+ "\n",
+ "\t\t\t#(3)\n",
+ "\t\t\t# 2*AB - A2 + B2\n",
+ "\n",
+ "K_3 = 1/K_1;\t\t\t# Equilibrium constant at 500 K for the above reaction\n",
+ "\t\t\t# As can be seen the reaction is not affected by pressure and therefore K = Ky as Kp = 1 \n",
+ "Ky_3 = K_3;\n",
+ "\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "n_AB_3_in = 1;\n",
+ "n_A2_3_in = 0;\n",
+ "n_B2_3_in = 0;\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_AB_3_eq = 1 - X\n",
+ "\t\t\t# n_A2_3_eq = X/2\n",
+ "\t\t\t# n_B2_3_eq = X/2\n",
+ "\t\t\t# Total moles = 1\n",
+ "\n",
+ "\t\t\t# Ky = (X/2)**(2)/(1-X)**(2)\n",
+ "def f1(X): \n",
+ "\t return Ky_3-(X/2)**(2)/(1-X)**(2)\n",
+ "X_3 = fsolve(f1,0.4)\n",
+ "\n",
+ "\t\t\t# The mole fractions of the components at equilibrium are\n",
+ "y_A2_3 = X_3/2;\n",
+ "y_B2_3 = X_3/2;\n",
+ "y_AB_3 = 1-X_3;\n",
+ "\n",
+ "print \" 3).The mole fractions at equilibrium are y_A2 = %f y_B2 = %f and y_AB = %f\"%(y_A2_3,y_B2_3,y_AB_3);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The mole fractions at equilibrium are y_A2 = 0.210680 y_B2 = 0.210680 and y_AB = 0.578641\n",
+ " 2).The mole fractions at equilibrium are y_A2 = 0.210680 y_B2 = 0.210680 and y_AB = 0.578641\n",
+ " 3).The mole fractions at equilibrium are y_A2 = 0.210680 y_B2 = 0.210680 and y_AB = 0.578641\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.9 Page Number : 606"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\n",
+ "\n",
+ "# Variables\n",
+ "R = 1.987;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "delta_H_SO2_298 = -70.96;\t\t\t#[kcal/mol] - Enthalpy of formation of S02 at 298.15 K\n",
+ "delta_H_SO3_298 = -94.45;\t\t\t#[kcal/mol] - Enthalpy of formation of S03 at 298.15 K\n",
+ "delta_G_SO2_298 = -71.79;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K\n",
+ "delta_G_SO3_298 = -88.52;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of SO3 at 298.15 K\n",
+ "\n",
+ "\t\t\t# Cp_0 = a + b*T + c*T**(2) + d*T**(3)\n",
+ "\n",
+ "a_SO2 = 6.157;\n",
+ "a_SO3 = 3.918;\n",
+ "a_O2 = 6.085;\n",
+ "b_SO2 = 1.384*10**(-2);\n",
+ "b_SO3 = 3.483*10**(-2);\n",
+ "b_O2 = 0.3631*10**(-2);\n",
+ "c_SO2 = -0.9103*10**(-5);\n",
+ "c_SO3 = -2.675*10**(-5);\n",
+ "c_O2 = -0.1709*10**(-5);\n",
+ "d_SO2 = 2.057*10**(-9);\n",
+ "d_SO3 = 7.744*10**(-9);\n",
+ "d_O2 = 0.3133*10**(-9);\n",
+ "\n",
+ "\t\t\t#(1)\n",
+ "T_1 = 298.15;\t\t\t#[K]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "delta_H_rkn_298 = delta_H_SO3_298 - delta_H_SO2_298;\t\t\t#[kcal]\n",
+ "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "delta_G_rkn_298 = delta_G_SO3_298 - delta_G_SO2_298;\t\t\t#[kcal]\n",
+ "delta_G_rkn_298 = delta_G_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "\n",
+ "delta_a = a_SO3 - a_SO2 - (a_O2/2);\n",
+ "delta_b = b_SO3 - b_SO2 - (b_O2/2);\n",
+ "delta_c = c_SO3 - c_SO2 - (c_O2/2);\n",
+ "delta_d = d_SO3 - d_SO2 - (d_O2/2);\n",
+ "\n",
+ "\n",
+ "def f60(T): \n",
+ "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
+ "\n",
+ "\t\t\t# delta_H_rkn_T = delta_H_rkn_298 + quad(f60,T_1,T)[0]\n",
+ "\n",
+ "\t\t\t# On simplification we get\n",
+ "\t\t\t# delta_H_rkn_T = -22630.14 - 5.2815*T + 0.9587*10**(-2)*T**(2) - 0.5598*10**(-5)*T**(3) + 1.3826*10**(-9)*T**(4)\n",
+ "\n",
+ "print \" 1.The math.expression for delta_H_rkn_T as a function of T is given by\";\n",
+ "print \" delta_H_rkn_T = -22630.14 - 5.2815*T + 0.9587*10**-2*T**2 - 0.5598*10**-5*T**3 + 1.3826*10**-9*T**4\";\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\n",
+ "\n",
+ "\t\t\t#def f61(T): \n",
+ "\t\t\t#\t return K_T/K_298) = integrate(delta_H_rkn_T/T**(2)\n",
+ "\n",
+ "\t\t\t# R*math.log(K_T/K_298) = quad(f61,T_1,T)[0]\n",
+ "\n",
+ "\t\t\t# First let us calculate K_298.\n",
+ "\t\t\t# delta_G_rkn_T = - R*T*math.log(K)\n",
+ "K_298 = math.exp(-delta_G_rkn_298/(R*T_1));\n",
+ "\n",
+ "\t\t\t# On substituting the values and simplifying we get the math.expression\n",
+ "\t\t\t# math.log(K) = 3.87 + 11380.10/T - 2.6580*math.log(T) + 0.4825*10**(-2)*T - 0.1409*10**(-5)*T**(2) + 0.2320*10**(-9)*T**(3)\n",
+ "\n",
+ "print \" 2.The math.expression for math.logK as a function of T is given by\";\n",
+ "print \" math.logK = 3.87 + 11380.10/T - 2.6580*math.logT + 0.4825*10**-2*T - 0.1409*10**-5*T**2 + 0.2320*10**-9*T**3\";\n",
+ "\n",
+ "\t\t\t#(3)\n",
+ "P = 1;\t\t\t#[atm]\n",
+ "T = 880;\t\t\t#[K]\n",
+ "K = math.exp(3.87 + 11380.10/T - 2.6580*math.log(T) + 0.4825*10**(-2)*T - 0.1409*10**(-5)*T**(2) + 0.2320*10**(-9)*T**(3));\n",
+ "Kp = P**(-1./2);\t\t\t#[atm**(-1/2)]\n",
+ "Ky = K/Kp;\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_SO2_eq = 1 - X\n",
+ "\t\t\t# n_O2_eq = 0.5- 0.5*X\n",
+ "\t\t\t# n_SO3_1_eq = X\n",
+ "\t\t\t# Total moles = 1.5-0.5*X\n",
+ "\n",
+ "\t\t\t# Ky = (X*(1.5-0.5*X)**(1/2))/((1-X)*(0.5-0.5*X)**(1/2))\n",
+ "def f(X): \n",
+ "\t return Ky - (X*(1.5-0.5*X)**(1./2))/((1-X)*(0.5-0.5*X)**(1./2))\n",
+ "X = fsolve(f,0.8)\n",
+ "\n",
+ "\t\t\t# The mole fraction of SO3 at equilibrium is given by\n",
+ "y_SO3 = X/(1.5-0.5*X);\n",
+ "\n",
+ "print \" 3).The mole fraction of SO3 at equilibrium is given by y_SO3 = %f\"%(y_SO3);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1.The math.expression for delta_H_rkn_T as a function of T is given by\n",
+ " delta_H_rkn_T = -22630.14 - 5.2815*T + 0.9587*10**-2*T**2 - 0.5598*10**-5*T**3 + 1.3826*10**-9*T**4\n",
+ " 2.The math.expression for math.logK as a function of T is given by\n",
+ " math.logK = 3.87 + 11380.10/T - 2.6580*math.logT + 0.4825*10**-2*T - 0.1409*10**-5*T**2 + 0.2320*10**-9*T**3\n",
+ " 3).The mole fraction of SO3 at equilibrium is given by y_SO3 = 0.649167\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.10 Page Number : 609"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "from numpy import *\n",
+ "\n",
+ "# Variables\n",
+ "\t\t\t# (1/2)*N2 + (1/2)*O2 - NO\n",
+ "\n",
+ "R = 1.987;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "delta_H_NO_298 = 21.600;\t\t\t#[kcal/mol] - Enthalpy of formation of S02 at 298.15 K\n",
+ "delta_G_NO_298 = 20.719;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K\n",
+ "\n",
+ "\t\t\t# Cp_0 = a + b*T + c*T**(2) + d*T**(3)\n",
+ "\n",
+ "a_N2 = 6.157;\n",
+ "a_O2 = 6.085;\n",
+ "a_NO = 6.461;\n",
+ "b_N2 = -0.03753*10**(-2);\n",
+ "b_O2 = 0.3631*10**(-2);\n",
+ "b_NO = 0.2358*10**(-2);\n",
+ "c_N2 = 0.1930*10**(-5);\n",
+ "c_O2 = -0.1709*10**(-5);\n",
+ "c_NO = -0.07705*10**(-5);\n",
+ "d_N2 = -0.6861*10**(-9);\n",
+ "d_O2 = 0.3133*10**(-9);\n",
+ "d_NO = 0.08729*10**(-9);\n",
+ "\n",
+ "\t\t\t#(1)\n",
+ "T_1 = 298.15;\t\t\t#[K]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "delta_H_rkn_298 = delta_H_NO_298;\t\t\t#[kcal]\n",
+ "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "delta_G_rkn_298 = delta_G_NO_298;\t\t\t#[kcal]\n",
+ "delta_G_rkn_298 = delta_G_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "\n",
+ "delta_a = a_NO - (a_N2/2) - (a_O2/2);\n",
+ "delta_b = b_NO - (b_N2/2) - (b_O2/2);\n",
+ "delta_c = c_NO - (c_N2/2) - (c_O2/2);\n",
+ "delta_d = d_NO - (d_N2/2) - (d_O2/2);\n",
+ "\n",
+ "\n",
+ "def f49(T): \n",
+ "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
+ "\n",
+ "\t\t\t# delta_H_rkn_T = delta_H_rkn_298 + quad(f49,T_1,T)[0]\n",
+ "\n",
+ "\t\t\t# On simplification we get\n",
+ "\t\t\t# delta_H_rkn_T = 21584.63 - 0.033*T + 0.0365*10**(-2)*T**(2) - 0.0293*10**(-5)*T**(3) + 0.0685*10**(-9)*T**(4)\n",
+ "\n",
+ "print \" The math.expression for delta_H_rkn_T as a function of T is given by\";\n",
+ "print \" delta_H_rkn_T = 21584.63 - 0.033*T + 0.0365*10**-2*T**2 - 0.0293*10**-5*T**3 + 0.0685*10**-9*T**4\";\n",
+ "\n",
+ "\t\t\t# Now let us calculate K_298 (at 298 K)\n",
+ "\t\t\t# We know delta_G_rkn_298 = -R*T*math.log(K_298) \n",
+ "K_298 = math.exp(-delta_G_rkn_298/(R*T_1));\t\t\t# Equilibrium constant at 298.15 K\n",
+ "\n",
+ "\n",
+ "\t\t\t#def f50(T): \n",
+ "\t\t\t#\t return K_2/K_1) = integrate(delta_H_rkn_298/(R*T**(2))\n",
+ "\n",
+ "\t\t\t# math.log(K_2/K_1) = quad(f50,T_1,T)[0]\n",
+ "\n",
+ "\t\t\t# On substituting the values and simplifying we get the math.expression\n",
+ "\t\t\t# math.log(K) = 1.5103 - 10862.92/T - 0.0166*math.log(T) + 1.84*10**(-4)*T - 7.35*10**(-8)*T**(2) + 1.15*10**(-11)*T**(3)\n",
+ "\n",
+ "print \" The math.expression for math.logK as a function of T is given by\";\n",
+ "print \" math.logK = 1.5103 - 10862.92/T - 0.0166*math.logT + 1.84*10**-4*T - 7.35*10**-8*T**2 + 1.15*10**-11*T**3\"\n",
+ "\n",
+ "T = [500,1000,1500,2000,2500];\n",
+ "K = zeros(5);\n",
+ "\n",
+ "print \" T K \\t\\t\\t K \";\n",
+ "\n",
+ "for i in range(5):\n",
+ " K[i] = math.exp(1.5103-10862.92/T[i] - 0.0166*math.log(T[i]) + 1.84*10**(-4)*T[i] - 7.35*10**(-8)*T[i]**(2) + 1.15*10**(-11)*T[i]**(3));\n",
+ " \n",
+ " print \" %f \\t\\t %e \"%(T[i],K[i]);\n",
+ "\n",
+ "\n",
+ "\t\t\t# It can be seen that for endothermic reactions equilibrium constant increases with temperature.\n",
+ "print \" It can be seen that for endothermic reactions equilibrium constant increases with temperature\";\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The math.expression for delta_H_rkn_T as a function of T is given by\n",
+ " delta_H_rkn_T = 21584.63 - 0.033*T + 0.0365*10**-2*T**2 - 0.0293*10**-5*T**3 + 0.0685*10**-9*T**4\n",
+ " The math.expression for math.logK as a function of T is given by\n",
+ " math.logK = 1.5103 - 10862.92/T - 0.0166*math.logT + 1.84*10**-4*T - 7.35*10**-8*T**2 + 1.15*10**-11*T**3\n",
+ " T K \t\t\t K \n",
+ " 500.000000 \t\t 1.615470e-09 \n",
+ " 1000.000000 \t\t 8.737610e-05 \n",
+ " 1500.000000 \t\t 3.333913e-03 \n",
+ " 2000.000000 \t\t 2.062328e-02 \n",
+ " 2500.000000 \t\t 6.176400e-02 \n",
+ " It can be seen that for endothermic reactions equilibrium constant increases with temperature\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.11 Page Number : 611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "\t\t\t# SO2 + (1/2)*O2 - SO3\n",
+ "R = 8.314;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "K_800 = 0.0319;\t\t\t# Equilibrium constant at 800 K\n",
+ "K_900 = 0.153;\t\t\t# Equilibrium constant at 900 K\n",
+ "T_1 = 800.;\t\t\t#[K]\n",
+ "T_2 = 900.;\t\t\t#[K]\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# We have the relation \n",
+ "\t\t\t# math.log(K_2/K_1) = -(delta_H_rkn/R)*(1/T_2 - 1/T_1)\n",
+ "\t\t\t# math.log(K_900/K_800) = -(delta_H_rkn_850/R)*(1/T_2 - 1/T_1)\n",
+ "delta_H_rkn_850 = -R*math.log(K_900/K_800)/(1/T_2 - 1/T_1);\t\t\t#[J]\n",
+ "delta_H_rkn_850 = delta_H_rkn_850*10**(-3);\t\t\t#[kJ]\n",
+ "\n",
+ "# Results\n",
+ "print \" The mean standard enthalpy change of reaction in the region 800 t0 900 is given by delta_H_rkn_850 = %f KJ\"%(delta_H_rkn_850);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The mean standard enthalpy change of reaction in the region 800 t0 900 is given by delta_H_rkn_850 = 93.851672 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.13 Page Number : 611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 298.15;\t\t\t#[K]\n",
+ "T = 2600;\t\t\t#[K]\n",
+ "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# Cp_0 = a + b*T + c*T**(2) + d*T**(3)\n",
+ "delta_H_CO_298 = -26.416;\t\t\t#[kcal/mol] - Enthalpy of formation of CO at 298.15 K\n",
+ "delta_G_CO_298 = -32.808;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
+ "delta_H_CO2_298 = -94.052;\t\t\t#[kcal/mol] - Enthalpy of formation of C02 at 298.15 K\n",
+ "delta_G_CO2_298 = -94.260;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K\n",
+ "\n",
+ "\t\t\t# CO + (1/2)*O2 - CO2\n",
+ "\n",
+ "a_CO = 6.726;\n",
+ "a_O2 = 6.0685;\n",
+ "a_CO2 = 5.316;\n",
+ "b_CO = 0.04001*10**(-2);\n",
+ "b_O2 = 0.3631*10**(-2);\n",
+ "b_CO2 = 1.4285*10**(-2);\n",
+ "c_CO = 0.1283*10**(-5);\n",
+ "c_O2 = -0.1709*10**(-5);\n",
+ "c_CO2 = -0.8362*10**(-5);\n",
+ "d_CO = -0.5307*10**(-9);\n",
+ "d_O2 = 0.3133*10**(-9);\n",
+ "d_CO2 = 1.784*10**(-9);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "delta_H_rkn_298 = delta_H_CO2_298 - delta_H_CO_298;\t\t\t#[kcal]\n",
+ "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "delta_G_rkn_298 = delta_G_CO2_298 - delta_G_CO_298;\t\t\t#[kcal]\n",
+ "delta_G_rkn_298 = delta_G_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "\n",
+ "delta_a = a_CO2 - (a_CO) - (a_O2/2);\n",
+ "delta_b = b_CO2 - (b_CO) - (b_O2/2);\n",
+ "delta_c = c_CO2 - (c_CO) - (c_O2/2);\n",
+ "delta_d = d_CO2 - (d_CO) - (d_O2/2);\n",
+ "\n",
+ "\n",
+ "def f47(T): \n",
+ "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
+ "\n",
+ "\t\t\t# delta_H_rkn_T = delta_H_rkn_298 + quad(f47,T_1,T)[0]\n",
+ "\n",
+ "\t\t\t# On simplification we get\n",
+ "delta_H_rkn_T = -66773.56 - 4.45*T + 0.605*10**(-2)*T**(2) - 0.29*10**(-5)*T**(3) + 0.54*10**(-9)*T**(4);\n",
+ "\n",
+ "\n",
+ "\t\t\t#def f48(T): \n",
+ "\t\t\t#\t return K/K_298) = integrate(delta_H_rkn_T/(R*T**(2))\n",
+ "\n",
+ "\t\t\t# math.log(K/K_298) = quad(f48,T_1,T)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t# We know that delta_G_rkn_T = -R*T*math.log(K)\n",
+ "\t\t\t# At 298.15 K\n",
+ "K_298 = math.exp(-delta_G_rkn_298/(R*T_1) );\n",
+ "\n",
+ "\t\t\t# Therfore on simplification we get\n",
+ "\t\t\t#math.log(K) = 2.94 + 33605.2/T - 2.24*math.log(T) + 0.304*10(-2)*T - 0.073*10**(-5)*T**(2) + 0.09*10**(-9)*T**(3)\n",
+ "K = math.exp(2.94 + 33605.2/T - 2.24*math.log(T) + 0.304*10**(-2)*T - 0.073*10**(-5)*T**(2) + 0.09*10**(-9)*T**(3));\n",
+ "\n",
+ "print \" The value of equilibrium constant at 2600 K is given by K_298 = %f\"%(K);\n",
+ "\n",
+ "\n",
+ "\t\t\t#(a)\n",
+ "P_1 = 1;\t\t\t#[atm]\n",
+ "Kp_1 = P_1**(-1./2);\n",
+ "Ky_1 = K/Kp_1;\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_CO_1_eq = 1 - X\n",
+ "\t\t\t# n_02_1_eq = 0.5- 0.5X\n",
+ "\t\t\t# n_CO2_1_eq = X\n",
+ "\t\t\t# Total moles = 1.5 - 0.5*X\n",
+ "\n",
+ "\t\t\t# Ky = y_CO2/(y_CO**(1/2)*y_CO)\n",
+ "\t\t\t#ky = (X*(1.5-0.5*X)**(1/2))/((1-X)*(0.5-0.5*X)**(1/2))\n",
+ "\n",
+ "def f(X): \n",
+ "\t return Ky_1-(X*(1.5-0.5*X)**(1./2))/((1-X)*(0.5-0.5*X)**(1./2))\n",
+ "X_1 = fsolve(f,0.9)\n",
+ "\n",
+ "y_CO2_1 = X_1/(1.5-0.5*X_1);\n",
+ "y_CO_1 = (1-X_1)/(1.5-0.5*X_1);\n",
+ "y_O2_1 = (0.5-0.5*X_1)/(1.5-0.5*X_1);\n",
+ "\n",
+ "print \" a).The equilibrium composition at 1 atm) is given by y_CO2 = %f y_CO = %f and y_O2 = %f\"%(y_CO2_1,y_CO_1,y_O2_1);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "P_2 = 10;\t\t\t#[atm]\n",
+ "Kp_2 = P_2**(-1./2);\n",
+ "Ky_2 = K/Kp_2;\n",
+ "\n",
+ "\t\t\t# Ky = y_CO2/(y_CO**(1/2)*y_CO)\n",
+ "\t\t\t#ky = (X*(1.5-0.5*X)**(1/2))/((1-X)*(0.5-0.5*X)**(1/2))\n",
+ "\n",
+ "def f1(X): \n",
+ "\t return Ky_2-(X*(1.5-0.5*X)**(1./2))/((1-X)*(0.5-0.5*X)**(1./2))\n",
+ "X_2 = fsolve(f1,0.9)\n",
+ "\n",
+ "y_CO2_2 = X_2/(1.5-0.5*X_2);\n",
+ "y_CO_2 = (1-X_2)/(1.5-0.5*X_2);\n",
+ "y_O2_2 = (0.5-0.5*X_2)/(1.5-0.5*X_2);\n",
+ "\n",
+ "print \" b).The equilibrium composition at 10 atm) is given by y_CO2 = %f y_CO = %f and y_O2 = %f\"%(y_CO2_2,y_CO_2,y_O2_2);\n",
+ "\n",
+ "\t\t\t#(c)\n",
+ "P_3 = 1;\t\t\t#[atm]\n",
+ "Kp_3 = P_3**(-1./2);\n",
+ "Ky_3 = K/Kp_3;\n",
+ "\n",
+ "\t\t\t# Ky = y_CO2/(y_CO**(1/2)*y_CO)\n",
+ "\t\t\t#ky = (X*(1.5-0.5*X)**(1/2))/((1-X)*(0.5-0.5*X)**(1/2))\n",
+ "\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_CO_3_eq = 1 - X\n",
+ "\t\t\t# n_02_3_eq = 0.5- 0.5X\n",
+ "\t\t\t# n_CO2_3_eq = X\n",
+ "\t\t\t# n_N2_eq = 1;\n",
+ "\t\t\t# Total moles = 2.5 - 0.5*X\n",
+ "\n",
+ "def f2(X): \n",
+ "\t return Ky_3-(X*(2.5-0.5*X)**(1./2))/((1-X)*(0.5-0.5*X)**(1./2))\n",
+ "X_3 = fsolve(f2,0.9)\n",
+ "\n",
+ "y_CO2_3 = X_3/(2.5-0.5*X_3);\n",
+ "y_CO_3 = (1-X_3)/(2.5-0.5*X_3);\n",
+ "y_O2_3 = (0.5-0.5*X_3)/(2.5-0.5*X_3);\n",
+ "y_N2 = 1./(2.5-0.5*X_3);\n",
+ "\n",
+ "print \" c).The equilibrium composition at 1 atm and 1 mol N2) is given by y_CO2 = %f y_CO = %f y_O2 = %f and y_N2 = %f\"%(y_CO2_3,y_CO_3,y_O2_3,y_N2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of equilibrium constant at 2600 K is given by K_298 = 16.484152\n",
+ " a).The equilibrium composition at 1 atm) is given by y_CO2 = 0.757531 y_CO = 0.161646 and y_O2 = 0.080823\n",
+ " b).The equilibrium composition at 10 atm) is given by y_CO2 = 0.876008 y_CO = 0.082662 and y_O2 = 0.041331\n",
+ " c).The equilibrium composition at 1 atm and 1 mol N2) is given by y_CO2 = 0.373822 y_CO = 0.100943 y_O2 = 0.050471 and y_N2 = 0.474764\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.14 Page Number : 614"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T = 25 + 298.15;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol-K]\n",
+ "delta_G_298 = -1000;\t\t\t#[J] - Gibbs free energy change at 298 K\n",
+ "\n",
+ "\t\t\t# G_E/(R*T) = x_1*x_2\n",
+ "# Calculations and Results\n",
+ "\t\t\t# We know that delta_G_rkn = - R*T*math.log(K), therefore\n",
+ "K = math.exp(-delta_G_298/(R*T));\n",
+ "\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t# Let x_1 is the mole fraction of A and x_2 be the mole fraction of B\n",
+ "\t\t\t# If A and B form an ideal mixture then,\n",
+ "Ky = 1;\n",
+ "\t\t\t# and K = Kx = x_2/x_1\n",
+ "\t\t\t# and at equilibrium x_2/x_1 = K\n",
+ "\t\t\t# (1-x_1)/x_1 = K\n",
+ "x_1 = 1/(1+K);\n",
+ "\n",
+ "print \" 1).The equilibrium composition for ideal behaviour) is given by x_1 = %f\"%(x_1);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# The activity coefficients are given by\n",
+ "\t\t\t# math.log(Y1) = [del(n*G_E/(R*T))/del(n_1)]_T,P,n_2 = x_2**(2)\n",
+ "\t\t\t# similarly, math.log(Y2) = x_1**(2)\n",
+ "\n",
+ "\t\t\t# The equilibrium constant for the liquid phase reaction is given by\n",
+ "\t\t\t# K = Kx*Ky = (x_2*Y2)/(x_1*Y1) = (x_2*math.exp(x_1**(2)))/(x_1*math.exp(x_2**(2)))\n",
+ "\t\t\t# Solving the above equation we get\n",
+ "\n",
+ "def f2(x_1): \n",
+ "\t return K -((1-x_1)*math.exp(x_1**(2)))/(x_1*math.exp((1-x_1)**(2)))\n",
+ "x_1_prime = fsolve(f2,0.9)\n",
+ "\n",
+ "print \" 2).The equilibrium composition for non-ideal behaviour) is given by x_1 = %f\"%(x_1_prime);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The equilibrium composition for ideal behaviour) is given by x_1 = 0.408008\n",
+ " 2).The equilibrium composition for non-ideal behaviour) is given by x_1 = 0.328409\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.15 Page Number : 615"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\t\t\t\n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard reaction temperature\n",
+ "T_2 = 373.;\t\t\t#[K] - Reaction temperature\n",
+ "P = 1.;\t\t\t#[atm]\n",
+ "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# CH3COOH (l) + C2H5OH (l) - CH3COOC2H5 (l) + H2O (l)\n",
+ "\n",
+ "delta_H_CH3COOH_298 = -116.2*10**(3.);\t\t\t# [cal/mol]\n",
+ "delta_H_C2H5OH_298 = -66.35*10**(3.);\t\t\t# [cal/mol]\n",
+ "delta_H_CH3COOC2H5_298 = -110.72*10**(3.);\t\t\t# [cal/mol]\n",
+ "delta_H_H2O_298 = -68.3174*10**(3.);\t\t\t# [cal/mol]\n",
+ "\n",
+ "delta_G_CH3COOH_298 = -93.56*10**(3.);\t\t\t# [cal/mol]\n",
+ "delta_G_C2H5OH_298 = -41.76*10**(3.);\t\t\t# [cal/mol]\n",
+ "delta_G_CH3COOC2H5_298 = -76.11*10**(3.);\t\t\t# [cal/mol]\n",
+ "delta_G_H2O_298 = -56.6899*10**(3.);\t\t\t# [cal/mol]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "delta_H_rkn_298 = delta_H_CH3COOC2H5_298 + delta_H_H2O_298 - delta_H_CH3COOH_298 - delta_H_C2H5OH_298;\t\t\t#[cal/mol]\n",
+ "delta_G_rkn_298 = delta_G_CH3COOC2H5_298 + delta_G_H2O_298 - delta_G_CH3COOH_298 - delta_G_C2H5OH_298;\t\t\t#[cal/mol]\n",
+ "\n",
+ "\t\t\t# We know that delta_G_rkn_T = -R*T*math.log(K)\n",
+ "\t\t\t# At 298.15 K\n",
+ "K_298 = math.exp(-delta_G_rkn_298/(R*T_1) );\n",
+ "\n",
+ "\t\t\t# We know that dmath.log(K)/dT = delta_H_rkn/(R*T**(2))\n",
+ "\t\t\t# If delta_H_rkn is assumed constant we get\n",
+ "\t\t\t# math.log(K_2/K_1) = (-delta_H_rkn/R)*(1/T_2 - 1/T_1)\n",
+ "\t\t\t# math.log(K_373/K_298) = (-delta_H_rkn_298/R)*(1/T_2 - 1/T_1)\n",
+ "\n",
+ "K_373 = math.exp(math.log(K_298) + (-delta_H_rkn_298/R)*(1./T_2 - 1./T_1));\n",
+ "\t\t\t# Note that the equilibrium constant value rises becauses the reaction is endothermic\n",
+ "\n",
+ "print \" The value of equilibrium constant at 373 K is K_373 = %f\"%(K_373);\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_CH3COOH = 1 - X\n",
+ "\t\t\t# n_C2H5OH = 1 - X\n",
+ "\t\t\t# n_CH3COOC2H5 = X\n",
+ "\t\t\t# n_H20 = X\n",
+ "\t\t\t# Total moles = 2\n",
+ "\n",
+ "\t\t\t# Kx = (x_CH3COOH*x_C2H5OH)/(x_CH3COOC2H5*x_H2O)\n",
+ "\t\t\t# Assuming the liquid mixture to be ideal,that is Ky = 1, therefore K_x = K\n",
+ "K_x = K_373;\n",
+ "\t\t\t# X**(2)/(1-X)**(2) = K_x\n",
+ "X = (K_x)**(1./2)/(1+(K_x)**(1./2));\n",
+ "\n",
+ "\t\t\t# The mole fraction of ethyl acetate is given by\n",
+ "x_CH3COOC2H5 = X/2;\n",
+ "\n",
+ "print \" The mole fraction of ethyl acetate in the equilibrium reaction mixture is given by x_CH3COOC2H5 = %f\"%(x_CH3COOC2H5);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of equilibrium constant at 373 K is K_373 = 0.046697\n",
+ " The mole fraction of ethyl acetate in the equilibrium reaction mixture is given by x_CH3COOC2H5 = 0.088848\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.16 Page Number : 617"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "\t\t\t# CaCO3 (s1) - CaO (s2) + CO2 (g)\n",
+ "T_1 = 898 + 273.15;\t\t\t#[K]\n",
+ "T_2 = 700 + 273.15;\t\t\t#[K]\n",
+ "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n",
+ "\n",
+ "P_CO2_T_1 = 1;\t\t\t#[atm] - Decomposition pressure of CO2 over CaCO3 at 898 C\n",
+ "P_CO2_T_2 = 0.0333;\t\t\t#[atm] - Decomposition pressure of CO2 over CaCO3 at 700 C\n",
+ "\n",
+ "\t\t\t# The equilibrium constant of the reaction is given by\n",
+ "\t\t\t# K = (a_CO2*a_CaO)/a_CaCO3\n",
+ "\n",
+ "\t\t\t# Since the pressure is small therefore carbon dioxide can be assumed to behave as ideal gas and thus\n",
+ "\t\t\t# a_CO2 = y_CO2*P/1 = P_CO2\n",
+ "\n",
+ "\t\t\t# The activity of CaO is (CaO is pure)\n",
+ "\t\t\t# a_CaO = f_CaO/f_0_CaO = exp[V_CaO*(P - P_0)/(R*T)] = 1 (since pressure is low)\n",
+ "\n",
+ "\t\t\t# The activity of CaCO3 is (CaCO3 is pure)\n",
+ "\t\t\t# a_CaCO3 = f_CaCO3/f_0_CaCO3 = exp[V_CaCO3*(P - P_0)/(R*T)] = 1 (since pressure is low)\n",
+ "\n",
+ "\t\t\t#Since pressures are around 1 atm,therefore Poynting factors are also near 1, and thus activity of CaO and CaCO3 is unity and equilibrium constant is given by\n",
+ "\t\t\t#K = P_CO2 , therefore\n",
+ "# Calculations \n",
+ "\t\t\t# At 898 C\n",
+ "K_T_1 = P_CO2_T_1;\n",
+ "delta_G_T_1 = -R*T_1*math.log(K_T_1);\n",
+ "\n",
+ "\t\t\t# At 700 C\n",
+ "K_T_2 = P_CO2_T_2;\n",
+ "delta_G_T_2 = -R*T_2*math.log(K_T_2);\n",
+ "\n",
+ "# Results\n",
+ "print \" The value of delta_G_rkn at 700 C is %f J\"%(delta_G_T_1);\n",
+ "print \" The value of delta_G_rkn at 898 C is %f J\"%(delta_G_T_2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of delta_G_rkn at 700 C is -0.000000 J\n",
+ " The value of delta_G_rkn at 898 C is 27526.397496 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.17 Page Number : 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T = 700 + 273.15;\t\t\t#[K]\n",
+ "K = 7.403;\t\t\t# Equilibrium constant for the reaction at 700 C\n",
+ "\n",
+ "\t\t\t# CH4 - C (s) + 2*H2 \n",
+ "\n",
+ "\t\t\t# The equilibrium constant of the reaction is given by\n",
+ "\t\t\t# K = (a_C*a_H2**(2))/a_CH4\n",
+ "\n",
+ "\t\t\t# Since carbon is pure therefore its activity is given by\n",
+ "\t\t\t# a_C = f/f_0 = 1 as pressure is 1 atm.\n",
+ "\t\t\t# Since the pressure is low,therefore the gas phase can be taken to be ideal,therefore\n",
+ "\t\t\t# K = (y_H2**(2)*P**(2))/(y_CH4*P) = y_H2**(2)/y_CH4 (as P = 1 atm)\n",
+ "Ky = K;\t\t\t# (Kp = 1 atm)\n",
+ "\n",
+ "\t\t\t# Initial moles of the species are\n",
+ "n_CH4 = 1;\n",
+ "n_H2 = 0;\n",
+ "n_C = 0;\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the reaction be X\n",
+ "\t\t\t# Moles at equilibrium be\n",
+ "\t\t\t# n_CH4_eq = 1 -X\n",
+ "\t\t\t# n_H2_eq = 2*x\n",
+ "\t\t\t# n_C_eq = X\n",
+ "\n",
+ "\t\t\t# Moles present in gas phase\n",
+ "\t\t\t# n_CH4_gas = 1 -X\n",
+ "\t\t\t# n_H2_gas = 2*x\n",
+ "\t\t\t# Total moles = 1 + X\n",
+ "\n",
+ "\t\t\t# gas phase mole fraction \n",
+ "\t\t\t# y_CH4_gas = (1 -X)/(1+X)\n",
+ "\t\t\t# y_H2_gas = 2*x/(1+X)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# Ky = y_H2_gas**(2)/y_CH4_gaS\n",
+ "X = (K/(4+K))**(1./2);\n",
+ "\n",
+ "print \" The number of moles of carbon black formed from one mole of methane is %f mol\"%(X);\n",
+ "\n",
+ "\t\t\t# Therefore mole fraction of components in the gas phase at equilibrium is \n",
+ "y_CH4 = (1-X)/(1+X);\n",
+ "y_H2 = 2*X/(1+X);\n",
+ "\n",
+ "print \" The mole fraction of components in the gas phase at equilibrium is given by y_CH4 = %f and y_H2 = %f \"%(y_CH4,y_H2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The number of moles of carbon black formed from one mole of methane is 0.805739 mol\n",
+ " The mole fraction of components in the gas phase at equilibrium is given by y_CH4 = 0.107580 and y_H2 = 0.892420 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.18 Page Number : 619"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables \n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard reaction temperature\n",
+ "T_2 = 1042;\t\t\t#[K] - Reaction temperature\n",
+ "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# CaCO3 (s1) - CaO (s2) + CO2 (g)\n",
+ "\n",
+ "delta_H_CaCO3_298 = -289.5;\t\t\t#[kcal/mol] - Enthalpy of formation of CaCO3 at 298.15 K\n",
+ "delta_H_CaO_298 = -151.7;\t\t\t#[kcal/mol] - Enthalpy of formation of CaO at 298.15 K\n",
+ "delta_H_CO2_298 = -94.052;\t\t\t#[kcal/mol] - Enthalpy of formation of CO2 at 298.15 K\n",
+ "delta_G_CaCO3_298 = -270.8;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CaCO3 at 298.15 K\n",
+ "delta_G_CaO_298 = -144.3;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CaO at 298.15 K\n",
+ "delta_G_CO2_298 = -94.260;\t\t\t#[kcal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K\n",
+ "\n",
+ "\t\t\t# The standard heat capacity data as a function of temperature are given below\n",
+ "\t\t\t# Cp_CO2 = 5.316 + 1.4285*10**(2)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3)\n",
+ "\t\t\t# Cp_CaO = 12.129 + 0.88*10**(-3)*T - 2.08*10**(5)*T**(-2)\n",
+ "\t\t\t# Cp_CaCO3 = 24.98 + 5.240*10**(-3)*T - 6.199*10**(5)*T**(-2)\n",
+ "\t\t\t# Therefore Cp_0 is given by\n",
+ "\t\t\t# Cp_0 = Cp_CO2 + Cp_CaO - Cp_CaCO3\n",
+ "\t\t\t# Cp_0 = -7.535 + 9.925*10**(-3)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3) + 4.119*10**(5)*T**(-2)\n",
+ "# Calculations and Results\n",
+ "\t\t\t# The smath.tan(math.radiansard enthalpy change of the reaction at 298.15 K is given by\n",
+ "delta_H_rkn_298 = delta_H_CO2_298 + delta_H_CaO_298 - delta_H_CaCO3_298;\t\t\t#[kcal]\n",
+ "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "delta_G_rkn_298 = delta_G_CO2_298 + delta_G_CaO_298 - delta_G_CaCO3_298;\t\t\t#[kcal]\n",
+ "delta_G_rkn_298 = delta_G_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "\n",
+ "\t\t\t# The smath.tan(math.radiansard enthalpy change of the reaction at temperature T is given by\n",
+ "\n",
+ "def f7(T): \n",
+ "\t return -7.535 + 9.925*10**(-3)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3) + 4.119*10**(5)*T**(-2)\n",
+ "\n",
+ "\t\t\t# delta_H_rkn_T = delta_H_rkn_298 + quad(f7,T_1,T)[0]\n",
+ "\n",
+ "\t\t\t# On simplification we get\n",
+ "\t\t\t# delta_H_rkn_T = 47005.3 - 7.535*T + 4.9625*10**(-3)*T**(2) - 0.2787*10**(-5)*T**(3) + 0.446*10**(-9)*T**(4) - 4.119*10**(5)*T**(-1)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\t\t\t#def f8(T): \n",
+ "\t\t\t#\t return K_2/K_1) = integrate(delta_H_rkn_T/(R*T**(2))\n",
+ "\n",
+ "\t\t\t# math.log(K_2/K_1) = quad(f8,T_1,T)[0]\n",
+ "\n",
+ "\n",
+ "def f9(T): \n",
+ "\t return (47005.3-7.535*T+4.9625*10**(-3)*T**(2)-0.2787*10**(-5)*T**(3)+0.446*10**(-9)*T**(4) - 4.119*10**(5)*T**(-1))/T**(2)\n",
+ "\n",
+ "math.log_K2_K1 = quad(f9,T_1,T_2)[0];\t\t\t# math.log(K_2/K_1)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t# We know that delta_G_rkn_T = -R*T*math.log(K)\n",
+ "\t\t\t# At 298.15 K\n",
+ "K_298 = math.exp(-delta_G_rkn_298/(R*T_1) );\n",
+ "\n",
+ "\t\t\t# Putting the values in the above math.expression we get\n",
+ "\t\t\t# math.log(K_1042/K_298) = math.log_K2_K1/R\n",
+ "K_1042 = K_298*math.exp(math.log_K2_K1/R);\n",
+ "\n",
+ "print \" The value of equilibrium constant at 1042 K is K_1042 = %f\"%(K_1042);\n",
+ "\n",
+ "\t\t\t# Since for the given reaction K = P_CO2,where P is in atm, therefore,\n",
+ "P_CO2 = K_1042;\n",
+ "\t\t\t# and thus decomposition takes place till the partial pressure of CO2 reaches 0.095 atm\n",
+ "\t\t\t# After that the decomposition in the closed vessel stops as equilibrium is achieved.\n",
+ "\n",
+ "print \" The equilibrium pressure of CO2 is P_CO2 = %f atm \"%(P_CO2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of equilibrium constant at 1042 K is K_1042 = 0.095017\n",
+ " The equilibrium pressure of CO2 is P_CO2 = 0.095017 atm \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.19 Page Number : 620"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables \n",
+ "T_1 = 298.15;\t\t\t#[k] - Smath.tan(math.radiansard reaction temperature\n",
+ "T_2 = 1200;\t\t\t#[K] - Reaction temperature\n",
+ "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas consatnt\n",
+ "\n",
+ "\t\t\t# C (s) + CO2 (g) - 2*CO2 (g) \t\t\t# Reaction 1\n",
+ "\t\t\t# CO2 + H2 - CO + H2O \t\t\t# Reacction 2\n",
+ "\n",
+ "K_1 = 63;\t\t\t# Equilibrium constant for the first reaction\n",
+ "K_2 = 1.4;\t\t\t# Equilibrium constant for the secind reaction\n",
+ "\n",
+ "delta_G_H2O_298 = -54640;\t\t\t#[cal/mol] - Smath.tan(math.radiansard Gibbs free energy of formation of water vapour\n",
+ "delta_H_H2O_298 = -57800;\t\t\t#[cal/mol] - Smath.tan(math.radiansard enthalpy change of formation of water vapour\n",
+ "delta_G_rkn_298 = delta_G_H2O_298;\n",
+ "\n",
+ "\t\t\t# The smath.tan(math.radiansard heat capacity data of the components in cal/mol-K are given below\n",
+ "\t\t\t# Cp_H2 = 6.947 - 0.2*10**(-3)*T + 4.8*10**(-7)*T**(2)\n",
+ "\t\t\t# Cp_O2 = 6.148 + 3.1*10**(-3)*T - 9.2*10**(-7)*T**(2)\n",
+ "\t\t\t# Cp_H2O = 7.256 + 2.3*10**(-3)*T + 2.8*10**(-7)*T**(2)\n",
+ "\n",
+ "\t\t\t# Let us consider two more reactions\n",
+ "\t\t\t# C (s) + (1/2)*O2 - CO \t\t\t# Reaction 3\n",
+ "\t\t\t# H2 + (1/2)*O2 - H2O \t\t\t# Reaction 4\n",
+ "\n",
+ "\t\t\t# Considering the above 4 reactions, it can be shown that reaction (3) = reaction (1) + reaction (4) - reaction (2)\n",
+ "\t\t\t# Thus, delta_G_rkn_3 = delta_G_rkn_1 + delta_G_rkn_4 - delta_G_rkn_2\n",
+ "\t\t\t# or, -R*T*math.log(K_3) = -R*T*math.log(K_1) + -R*T*math.log(K_4) - -R*T*math.log(K_2)\n",
+ "\t\t\t# K_3 = (K_1*K_4/K_2)\n",
+ "\n",
+ "\t\t\t# Now we have to determine K_4 at 1200 K.\n",
+ "\t\t\t# The smath.tan(math.radiansard enthalpy change of reaction (4) as a fuction of temperature is given by\n",
+ "\t\t\t# delta_H_rkn_T = -57020 - 2.765*T + 0.475*10**(-3)*T**(2) + 8.67*10**(-8)*T**(3);\n",
+ "\n",
+ "\n",
+ "\t\t\t#def f2(T): \n",
+ "\t\t\t#\t return K_4_2/K_4_1) = integrate(delta_H_rkn_T/(R*T**(2))\n",
+ "\n",
+ "\t\t\t# math.log(K_4_2/K_4_1) = quad(f2,T_1,T)[0]\n",
+ "\n",
+ "# Calculations\n",
+ "def f3(T): \n",
+ "\t return (-57020-2.765*T+0.475*10**(-3)*T**(2)+8.67*10**(-8)*T**(3))/T**(2)\n",
+ "\n",
+ "math.log_K2_K1_4 = quad(f3,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t# We know that delta_G_rkn_T = -R*T*math.log(K)\n",
+ "\t\t\t# At 298.15 K\n",
+ "K_4_298 = math.exp(-delta_G_rkn_298/(R*T_1) );\n",
+ "\n",
+ "\t\t\t# Putting the values in the above math.expression we get\n",
+ "\t\t\t# math.log(K_4_1200/K_4_298) = math.log_K2_K1_R/R\n",
+ "K_4_1200 = K_4_298*math.exp(math.log_K2_K1_4/R);\n",
+ "K_4 = K_4_1200;\n",
+ "\n",
+ "\t\t\t# Therefore the equilibrium constant for reaction (3) at 1200 K is given by\n",
+ "K_3 = (K_1*K_4)/K_2;\n",
+ "\n",
+ "# Results\n",
+ "print \" The equilibrium constant at 1200 K for the given reaction is K = %e\"%(K_3);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The equilibrium constant at 1200 K for the given reaction is K = 3.622432e+09\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.20 Page Number : 622"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "delta_G_H2O_298 = -237.034;\t\t\t#[kJ/mol] - Smath.tan(math.radiansard Gibbs free energy of formation of H2O (l) at 298 K\n",
+ "F = 96485;\t\t\t#[C/mol] - Faraday constant\n",
+ "\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t# For the reaction\n",
+ "\t\t\t# H2 (g) + (1/2)*O2 (g) - H2O (l)\n",
+ "n = 2;\t\t\t# Number of electrons transferred in the reaction\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# The standard Gibbs free energy change of the reaction is given by\n",
+ "\t\t\t# delta_G_rkn = delta_G_for_H2O(l) - delta_G_for_H2(g) - (1/2/)*delta_G_for_O2(g)\n",
+ "\t\t\t# Since delta_G_for_H2 = 0 and delta_G_for_O2 = 0 (pure components)\n",
+ "delta_G_rkn = delta_G_H2O_298;\t\t\t#[kJ]\n",
+ "delta_G_rkn = delta_G_rkn*10**(3);\t\t\t#[J]\n",
+ "\n",
+ "\t\t\t# delta_G_rkn = -n*F*E_0\n",
+ "\t\t\t# Thus standard equilibrium cell voltage is given by\n",
+ "E_0 = - delta_G_rkn/(n*F);\t\t\t#/[V]\n",
+ "\n",
+ "print \" 1).The standard equilibrium cell voltage is %f V\"%(E_0);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# For the reaction\n",
+ "\t\t\t# 2*H2 (g) + O2 (g) - 2*H2O (l)\n",
+ "n_prime = 4;\t\t\t# Number of electrons transferred in the reaction\n",
+ "\n",
+ "\t\t\t# The standard Gibbs free energy change of the reaction is given by\n",
+ "\t\t\t# delta_G_rkn = 2*delta_G_for_H2O(l) - 2*delta_G_for_H2(g) - delta_G_for_O2(g)\n",
+ "\t\t\t# Since delta_G_for_H2 = 0 and delta_G_for_O2 = 0 (pure components)\n",
+ "delta_G_rkn_prime = 2*delta_G_H2O_298;\t\t\t#[kJ]\n",
+ "delta_G_rkn_prime = delta_G_rkn_prime*10**(3);\t\t\t#[J]\n",
+ "\n",
+ "\t\t\t# delta_G_rkn = -n*F*E_0\n",
+ "\t\t\t# Thus standard equilibrium cell voltage is given by\n",
+ "E_0_prime = - delta_G_rkn_prime/(n_prime*F);\t\t\t#/[V]\n",
+ "\n",
+ "print \" 2).The standard equilibrium cell voltage is %f V\"%(E_0_prime);\n",
+ "\n",
+ "\t\t\t# Thus the result obtained is same for both the reactions\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The standard equilibrium cell voltage is 1.228346 V\n",
+ " 2).The standard equilibrium cell voltage is 1.228346 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.21 Page Number : 624"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\t\t\t\n",
+ "P = 2;\t\t\t# Number of phases\n",
+ "C = 5;\t\t\t# Number of components\n",
+ "\n",
+ "# Calculations\t\n",
+ "\t\t\t# C + 2*H2 = CH4 \t\t\t# (reaction 1) \n",
+ "\t\t\t# H2 + (1/2)*O2 = H20 \t\t\t# (reaction 2)\n",
+ "\t\t\t# C + (1/2)*O2 = CO \t\t\t# (reaction 3)\n",
+ "\t\t\t# C + O2 = CO2 \t\t\t# (reaction 4)\n",
+ "\n",
+ "\t\t\t# We do not have C in the equilibrium reaction mixture, therefore we have to eliminate it.\n",
+ "\t\t\t# Substituting for C from reaction (1) into reactions (3) and (4) we get the following set of reactions\n",
+ "\t\t\t# H2 + (1/2)*O2 = H20\n",
+ "\t\t\t# CH4 - 2*H2 + (1/2)*O2 = CO\n",
+ "\t\t\t# CH4 - 2*H2 + O2 = CO2\n",
+ "\n",
+ "\t\t\t# We do not have O2 in the equilibrium reaction mixture,therefore we have to eliminateit\n",
+ "\t\t\t# Substituting for O2 from the first reaction of the above set into seecond and third reactions of the above set we get the following set of reactions.\n",
+ "\t\t\t# CH4 + H2O - H2 = CO + 2*H2\n",
+ "\t\t\t# CH4 + 2*H20 - 2*H2 = CO2 + 2*H2 \n",
+ "\n",
+ "\t\t\t# Therefore one set of independent reactions is\n",
+ "\t\t\t# CH4 + H20 = CO + 3*H2\n",
+ "\t\t\t# CH4 + 2*H2O = CO2 + 4*H2\n",
+ "\n",
+ "\t\t\t# Another set of independent reactions can be obtained by substituting for CH4 from the first reaction into second and we get\n",
+ "\t\t\t# CH4 + H2O = CO + 3*H2\n",
+ "\t\t\t# CO + 3*H2 - H2O + 2*H2O = CO2 4*H2\n",
+ "\n",
+ "\t\t\t# Or, \n",
+ "\t\t\t# CH4 + H2O = CO + 3*H2\n",
+ "\t\t\t# CO + H2O = CO2 + H2\n",
+ "\t\t\t\n",
+ "r = 2;\n",
+ "\n",
+ "\t\t\t# and the number of degree of freedom becomes,\n",
+ "F = r - P + C;\n",
+ "\n",
+ "# Results\n",
+ "print \" The number of independent chemical reactions are %f \"%(r);\n",
+ "\n",
+ "print \" The first set of independent reactions are given below\";\n",
+ "print \" CH4 + H20 = CO + 3*H2\";\n",
+ "print \" CH4 + 2*H2O = CO2 + 4*H2\";\n",
+ "\n",
+ "print \" The second set of independent reactions are given below\";\n",
+ "print \" CH4 + H20 = CO + 3*H2\";\n",
+ "print \" CO + H2O = CO2 + H2\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The number of independent chemical reactions are 2.000000 \n",
+ " The first set of independent reactions are given below\n",
+ " CH4 + H20 = CO + 3*H2\n",
+ " CH4 + 2*H2O = CO2 + 4*H2\n",
+ " The second set of independent reactions are given below\n",
+ " CH4 + H20 = CO + 3*H2\n",
+ " CO + H2O = CO2 + H2\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.22 Page Number : 626"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.optimize import fsolve \n",
+ "# Variables\t\t\t\n",
+ "T = 400.;\t\t\t#[K] - Temperature\n",
+ "P = 1.;\t\t\t#[atm] - Pressure\n",
+ "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas consatnt\n",
+ "\n",
+ "delta_G_n_pentane_400 = 9600.;\t\t\t#[cal/mol] - standard Gibbs free energy of formation of n-pentane at 400 K\n",
+ "delta_G_iso_pentane_400 = 8200.;\t\t\t#[cal/mol] - standard Gibbs free energy of formation of iso-pentane at 400 K\n",
+ "delta_G_neo_pentane_400 = 9000.;\t\t\t#[cal/mol] - standard Gibbs free energy of formation of neo-pentane at 400 K\n",
+ "\n",
+ "\t\t\t# The three reactions for the formation of these isomers can be written as follows\n",
+ "\t\t\t# 5*C + 6*H2 = n-pentane\n",
+ "\t\t\t# 5*C + 6*H2 = iso-pentane\n",
+ "\t\t\t# 5*C + 6*H2 = neo-pentane\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# Let us take the following set of independent reactions\n",
+ "\t\t\t# iso-pentane = n-pentane \t\t\t# (reaction 1)\n",
+ "delta_G_rkn_1 = delta_G_n_pentane_400 - delta_G_iso_pentane_400;\t\t\t#[cal]\n",
+ "K_1 = math.exp(-delta_G_rkn_1/(R*T));\n",
+ "\t\t\t# iso-pentane = neo-pentane \t\t\t# (reaction 2)\n",
+ "delta_G_rkn_2 = delta_G_neo_pentane_400 - delta_G_iso_pentane_400;\t\t\t#[cal]\n",
+ "K_2 = math.exp(-delta_G_rkn_2/(R*T));\n",
+ "\n",
+ "\t\t\t# Let the initial number of moles be\n",
+ "\t\t\t# n_iso_pentane = 1\n",
+ "\t\t\t# n_n_pentane = 0\n",
+ "\t\t\t# n_neo_pentane = 0\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the two reaction be X_1 and X_2 respectively\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_iso_pentane_eq = 1 - X_1 - X_2\n",
+ "\t\t\t# n_n_pentane_eq = X_1\n",
+ "\t\t\t# n_neo_pentane_eq = X_2\n",
+ "\t\t\t# Total moles = 1 \n",
+ "\n",
+ "\t\t\t# Pressure has no effect on these reactions ( P = 1 atm) and therefore\n",
+ "Ky_1 = K_1;\n",
+ "Ky_2 = K_2;\n",
+ "\n",
+ "\t\t\t# From reaction (1), we get\n",
+ "\t\t\t# Ky_1 = X_1/(1-X_1-X_2)\n",
+ "\n",
+ "\t\t\t# From reaction (2), we get\n",
+ "\t\t\t# Ky_2 = X_2/(1-X_1-X_2)\n",
+ "\n",
+ "\t\t\t# Putting the value of X_1 from first equation into the second we get\n",
+ "\t\t\t# X_1 = (Ky_1*(1-X_2))/(1+Ky_1)\n",
+ "\t\t\t# Now putting it into the second equation we grt\n",
+ "\t\t\t# Ky_2 = X_2/(1-((Ky_1*(1-X_2))/(1+Ky_1))-X_2)\n",
+ "\t\t\t# Now solving for X_2\n",
+ "def f(X_2): \n",
+ "\t return Ky_2 - X_2/(1-((Ky_1*(1-X_2))/(1+Ky_1))-X_2)\n",
+ "X_2 = fsolve(f,0.8)\n",
+ "\n",
+ "\t\t\t# Therefore X_1 can be calculated as\n",
+ "X_1 = (Ky_1*(1-X_2))/(1+Ky_1);\n",
+ "\n",
+ "\t\t\t# Finally the mole fractions of the components at equilibrium\n",
+ "y_n_pentane = X_1;\n",
+ "y_neo_pentane = X_2;\n",
+ "y_iso_pentane = 1 -X_1 - X_2;\n",
+ "\n",
+ "print \" The equilibrium composition is given by y_n_pentane = %f y_neo_pentane = %f and y_iso_pentane = %f\"%(y_n_pentane,y_neo_pentane,y_iso_pentane);\n",
+ "\n",
+ "\t\t\t# Let us consider another set of independent reactions\n",
+ "\n",
+ "\t\t\t# n-pentane = iso-pentane \t\t\t# (reaction 3)\n",
+ "delta_G_rkn_3 = delta_G_iso_pentane_400 - delta_G_n_pentane_400;\t\t\t#[cal]\n",
+ "K_3 = math.exp(-delta_G_rkn_3/(R*T));\n",
+ "\t\t\t# n-pentane = neo-pentane \t\t\t# (reaction 4)\n",
+ "delta_G_rkn_4 = delta_G_neo_pentane_400 - delta_G_n_pentane_400;\t\t\t#[cal]\n",
+ "K_4 = math.exp(-delta_G_rkn_4/(R*T));\n",
+ "\n",
+ "\t\t\t# Let the initial number of moles be\n",
+ "\t\t\t# n_n_pentane = 1\n",
+ "\t\t\t# n_iso_pentane = 0\n",
+ "\t\t\t# n_neo_pentane = 0\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the two reaction be X_3 and X_4 respectively\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_n_pentane_eq = 1 - X_3 - X_4\n",
+ "\t\t\t# n_iso_pentane_eq = X_4\n",
+ "\t\t\t# n_neo_pentane_eq = X_4\n",
+ "\t\t\t# Total moles = 1 \n",
+ "\n",
+ "\t\t\t# Pressure has no effect on these reactions (P = 1 atm) and therefore\n",
+ "Ky_3 = K_3;\n",
+ "Ky_4 = K_4;\n",
+ "\n",
+ "\t\t\t# From reaction (3), we get\n",
+ "\t\t\t# Ky_3 = X_3/(1-X_3-X_4)\n",
+ "\n",
+ "\t\t\t# From reaction (4), we get\n",
+ "\t\t\t# Ky_4 = X_4/(1-X_3-X_4)\n",
+ "\n",
+ "\t\t\t# Putting the value of X_3 from first equation into the second we get\n",
+ "\t\t\t# X_3 = (Ky_3*(1-X_4))/(1+Ky_3)\n",
+ "\t\t\t# Now putting it into the second equation we grt\n",
+ "\t\t\t# Ky_4 = X_4/(1-((Ky_1*(1-X_4))/(1+Ky_3))-X_4)\n",
+ "\t\t\t# Now solving for X_4\n",
+ "def f1(X_4): \n",
+ "\t return Ky_4 - X_4/(1-((Ky_3*(1-X_4))/(1+Ky_3))-X_4)\n",
+ "X_4 = fsolve(f1,0.8)\n",
+ "\n",
+ "\t\t\t# Therefore X_3 can be calculated as\n",
+ "X_3 = (Ky_3*(1-X_4))/(1+Ky_3);\n",
+ "\n",
+ "\t\t\t# Finally the mole fractions of the components at equilibrium\n",
+ "y_n_pentane1 = 1 - X_3 - X_4;\n",
+ "y_neo_pentane1 = X_4;\n",
+ "y_iso_pentane1 = X_3;\n",
+ "\n",
+ "\t\t\t# The final composition does not depend on the set of reactions considered. \n",
+ "\n",
+ "print \" For another set of independent reactions considered\";\n",
+ "print \" The equilibrium composition is given by y_n_pentane = %f y_neo_pentane = %f and y_iso_pentane = %f\"%(y_n_pentane1,y_neo_pentane1,y_iso_pentane1);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The equilibrium composition is given by y_n_pentane = 0.111753 y_neo_pentane = 0.237745 and y_iso_pentane = 0.650501\n",
+ " For another set of independent reactions considered\n",
+ " The equilibrium composition is given by y_n_pentane = 0.111753 y_neo_pentane = 0.237745 and y_iso_pentane = 0.650501\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.23 Page Number : 628"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 600;\t\t\t#[K] - Temperature\n",
+ "P = 1;\t\t\t#[atm] - Pressure\n",
+ "R = 1.987;\t\t\t#[cal/mol-K] - Universal gas consatnt\n",
+ "\n",
+ "\t\t\t# CH4 + H2O = CO + 3*H2 \t\t\t# (Reaction 1)\n",
+ "\t\t\t# CO + H2O = CO2 + H2 \t\t\t# (Reaction 2)\n",
+ "\n",
+ "K_1 = 0.574;\t\t\t# Equilibrium constant of first reaction\n",
+ "K_2 = 2.21;\t\t\t# Equilibrium constant of second reaction\n",
+ "\n",
+ "\t\t\t# Initial number of moles of the components are\n",
+ "\t\t\t# n_CH4 = 1\n",
+ "\t\t\t# n_H2O = 5\n",
+ "\t\t\t# n_CO = 0\n",
+ "\t\t\t# n_H2 = O\n",
+ "\t\t\t# n_CO2 = 0\n",
+ "\n",
+ "\t\t\t# Let the reaction coordinate at equilibrium for the two reaction be X_1 and X_2 respectively\n",
+ "\t\t\t# At equilibrium, the moles of the components be\n",
+ "\t\t\t# n_CH4_eq = 1 - X_1\n",
+ "\t\t\t# n_H20_eq = 5 - X_1 - X_2\n",
+ "\t\t\t# n_CO_eq = X_1 - X_2\n",
+ "\t\t\t# n_H2_eq = 3*X_1 + X_2\n",
+ "\t\t\t# n_CO2_eq = X_2\n",
+ "\t\t\t# Total moles = 6 + 2*X_1\n",
+ "\n",
+ "\t\t\t# Since the pressure is 1 atm, K = Kp, Ky = K\n",
+ "Ky_1 = K_1;\n",
+ "Ky_2 = K_2;\n",
+ "\n",
+ "\t\t\t# From reaction (1), we get\n",
+ "\t\t\t# Ky_1 = ((X_1-X_2)*(3*X_1+X_2)**(3))/((1-X_1)*(5-X_1-X_2)*(6+2*X_1)**(2))\n",
+ "\n",
+ "\t\t\t# From reaction (2), we get\n",
+ "\t\t\t# Ky_2 = (X_2*(3*X_1+X_2))/((X_1-X_2)*(5-X_1-X_2))\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# Let us assume a value of X_1\n",
+ "X_1 = 0.1;\n",
+ "def f(X_2): \n",
+ "\t return Ky_1-((X_1-X_2)*(3*X_1+X_2)**(3))/((1-X_1)*(5-X_1-X_2)*(6+2*X_1)**(2))\n",
+ "\n",
+ "def f1(X_1_prime): \n",
+ "\t return Ky_2-(X_2_prime*(3*X_1_prime+X_2_prime))/((X_1_prime-X_2_prime)*(5-X_1_prime-X_2_prime))\n",
+ "\n",
+ "fault = 10;\n",
+ "while(fault>0.05):\n",
+ " X_2 = fsolve(f,0.8)\n",
+ " X_2_prime = X_2;\n",
+ " X_1_prime = fsolve(f1,0.8)\n",
+ " fault=abs(X_1 - X_1_prime);\n",
+ " X_1 = X_1 + 0.001;\n",
+ "\n",
+ "n_CH4 = 1 - X_1;\n",
+ "n_H20 = 5 - X_1 - X_2;\n",
+ "n_CO = X_1 - X_2;\n",
+ "n_H2 = 3*X_1 + X_2;\n",
+ "n_CO2 = X_2;\n",
+ "Total_moles = 6 + 2*X_1;\n",
+ "\n",
+ "# Results\n",
+ "print \" The equilibrium composition of the resulting mixture is given by\";\n",
+ "print \" n_CH4 = % f mol n_H2O = %f mol n_CO = %f mol n_H2 = %f mol and n_CO2 = %f mol\"%(n_CH4,n_H20,n_CO,n_H2,n_CO2);\n",
+ "print \" The total number of moles is %f mol\"%(Total_moles);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The equilibrium composition of the resulting mixture is given by\n",
+ " n_CH4 = 0.089000 mol n_H2O = 3.471420 mol n_CO = 0.293420 mol n_H2 = 3.350580 mol and n_CO2 = 0.617580 mol\n",
+ " The total number of moles is 7.822000 mol\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "/home/jovina/virtualenvs/scipy/local/lib/python2.7/site-packages/scipy/optimize/minpack.py:236: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
+ " improvement from the last ten iterations.\n",
+ " warnings.warn(msg, RuntimeWarning)\n",
+ "/home/jovina/virtualenvs/scipy/local/lib/python2.7/site-packages/scipy/optimize/minpack.py:236: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
+ " improvement from the last five Jacobian evaluations.\n",
+ " warnings.warn(msg, RuntimeWarning)\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.24 Page Number : 631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 600 + 273.15;\t\t\t#[K] - Reaction temperature\n",
+ "P = 1;\t\t\t#[atm] - Reaction pressure\n",
+ "\n",
+ "\t\t\t# The Gibbs free energy of formation of various species at 873.15 K are\n",
+ "delta_G_CH4_RT = -2.82;\t\t\t# delta_G_CH4/(R*T)\n",
+ "delta_G_H2O_RT = -29.73;\t\t\t# delta_G_CH4/(R*T)\n",
+ "delta_G_CO_RT = -27.51;\t\t\t# delta_G_CH4/(R*T)\n",
+ "delta_G_H2_RT = -1.46;\t\t\t# delta_G_CH4/(R*T)\n",
+ "delta_G_CO2_RT = -56.68;\t\t\t# delta_G_CH4/(R*T)\n",
+ "\n",
+ "# Calculations\t\t\n",
+ " \t# Initial number of moles of the components are\n",
+ "\t\t\t# n_CH4 = 1\n",
+ "\t\t\t# n_H2O = 5\n",
+ "\t\t\t# n_CO = 0\n",
+ "\t\t\t# n_H2 = O\n",
+ "\t\t\t# n_CO2 = 0\n",
+ "\n",
+ "\t\t\t# The del(F)/del(n_i) = 0 equations for CH4 (1), H2O (2), CO (3), H2 (4) and CO2 (5) becomes\n",
+ "\t\t\t# delta_G_1_T + R*T*math.log((n_1*P)/n) + lambda_C + 4*lambda_H = 0\n",
+ "\t\t\t# delta_G_2_T + R*T*math.log((n_2*P)/n) + 2*lambda_C + lambda_O = 0\n",
+ "\t\t\t# delta_G_3_T + R*T*math.log((n_3*P)/n) + lambda_c + lambda_O = 0\n",
+ "\t\t\t# delta_G_4_T + R*T*math.log((n_4*P)/n) + 2*lambda_H = 0\n",
+ "\t\t\t# delta_G_5_T + R*T*math.log((n_5*P)/n) + lambda_C + 2*lambda_O = 0\n",
+ "\n",
+ "\t\t\t# Where n is the total number of moles in the equilibrium reaction mixture. Dividing the above equations by R*T we get\n",
+ " # delta_G_5_T/(R*T) + math.log((n_5*P)/n) + lambda_C/(R*T) + 2*lambda_O/(R*T) = 0\n",
+ "\n",
+ "\t\t\t# Substituting the values of delta_G_i_T/(R*T) in the above equations,the full set of equations (including elemental balance) becomes\n",
+ "\t\t\t# -56.68 + math.log(n_5/n) + lambda_C/(R*T) + 2*lambda_O/(R*T) = 0\n",
+ "\n",
+ "\t\t\t# The constraint equations are\n",
+ "\t\t\t# n_1 + n_3 + n_5 = 1 \t\t\t# (moles of C in the reaction mixture = 1)\n",
+ "\t\t\t# 4*n_1 + 2*n_2 + 2*n_4 = 14 \t\t\t# (moles of H in the reaction mixture = 14)\n",
+ "\t\t\t# n_2 + n_3 + 2*n_5 = 5 \t\t\t# (moles of O in the raection mixture = 5)\n",
+ "\n",
+ "\t\t\t# The total moles are given by\n",
+ "\t\t\t# n = n_1 + n_2 + n_3 + n_4 + n_5\n",
+ "\n",
+ "def solution(x):\n",
+ " f = [0,0,0,0,0,0,0,0,0]\n",
+ " f[0]= -2.82 + math.log(x[0]/x[5]) + x[6] + 4*x[7];\n",
+ " f[1] = -29.73 + math.log(x[1]/x[5]) + 2*x[7] + x[8];\n",
+ " f[2] = -27.51 + math.log(x[2]/x[5]) + x[6] + x[8];\n",
+ " f[3] = -1.46 + math.log(x[3]/x[5]) + 2*x[7];\n",
+ " f[4] = -56.68 + math.log(x[4]/x[5]) + x[6] + 2*x[8];\n",
+ " f[5] = x[0] + x[2] +x[4] - 1;\n",
+ " f[6] = 4*x[0] + 2*x[1] + 2*x[3] - 14;\n",
+ " f[7] = x[1] + x[2] +2*x[4] - 5;\n",
+ " f[8] = x[0]+ x[1] + x[2] + x[3] + x[4] - x[5]; \n",
+ " return f\n",
+ "\n",
+ "\n",
+ "x = [0.01,3.5,0.2,3.0,0.5,5.0,2.0,1.0,25.0];\n",
+ "y = fsolve(solution,x)\n",
+ "\n",
+ "# Results\n",
+ "print \" n_1 = %f mol\"%(y[0]);\n",
+ "print \" n_2 = %f mol\"%(y[1]);\n",
+ "print \" n_3 = %f mol\"%(y[2]);\n",
+ "print \" n_4 = %f mol\"%(y[3]);\n",
+ "print \" n_5 = %f mol\"%(y[4]);\n",
+ "print \" n = %f mol\"%(y[5]);\n",
+ "print \" lambda_C/RT = %f\"%(y[6]);\n",
+ "print \" lambda_H/RT = %f\"%(y[7]);\n",
+ "print \" lambda_O/RT = %f\"%(y[8]);\n",
+ "\n",
+ "print \" The Lagrange multiplier values do not have any physical significance\";\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " n_1 = 0.091556 mol\n",
+ " n_2 = 3.442034 mol\n",
+ " n_3 = 0.258922 mol\n",
+ " n_4 = 3.374855 mol\n",
+ " n_5 = 0.649522 mol\n",
+ " n = 7.816888 mol\n",
+ " lambda_C/RT = 2.667225\n",
+ " lambda_H/RT = 1.149967\n",
+ " lambda_O/RT = 28.250290\n",
+ " The Lagrange multiplier values do not have any physical significance\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch18_1.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch18_1.ipynb new file mode 100755 index 00000000..f07249a6 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch18_1.ipynb @@ -0,0 +1,587 @@ +{
+ "metadata": {
+ "name": "ch18_1",
+ "signature": "sha256:32121f42f5b148741ef15da1993d191234c228c3ab7dcf05f69114fbe323a883"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18 : Adiabatic Reaction Temperature"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 18.1 Page Number : 650"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 298.15;\t\t\t#[K] - standard reaction temperature\n",
+ "T_2 = 500;\t\t\t#[K] - Reaction temperature\n",
+ "P = 1;\t\t\t#[atm] - Pressure \n",
+ "\n",
+ "a_CO2 = 5.316;\n",
+ "a_O2 = 6.085;\n",
+ "a_N2 = 6.903;\n",
+ "a_H2O = 7.700;\n",
+ "a_C3H8 = -0.966;\n",
+ "b_CO2 = 1.4285*10**(-2);\n",
+ "b_O2 = 0.3631*10**(-2);\n",
+ "b_N2 = -0.03753*10**(-2);\n",
+ "b_H2O = 0.04594*10**(-2);\n",
+ "b_C3H8 = 7.279*10**(-2);\n",
+ "c_CO2 = -0.8362*10**(-5);\n",
+ "c_O2 = -0.1709*10**(-5);\n",
+ "c_N2 = 0.1930*10**(-5);\n",
+ "c_H2O = 0.2521*10**(-5);\n",
+ "c_C3H8 = -3.755*10**(-5);\n",
+ "d_CO2 = 1.784*10**(-9);\n",
+ "d_O2 = 0.3133*10**(-9);\n",
+ "d_N2 = -0.6861*10**(-9);\n",
+ "d_H2O = -0.8587*10**(-9);\n",
+ "d_C3H8 = 7.580*10**(-9);\n",
+ "\n",
+ "\t\t\t# The smath.tan(math.radiansard enthalpy of formation at 298.15 K is given by\n",
+ "delta_H_for_CO2 = -94.052;\t\t\t#[kcal/mol]\n",
+ "delta_H_for_C3H8 = -24.820;\t\t\t#[kcal/mol]\n",
+ "delta_H_for_H2O = -57.7979;\t\t\t#[kcal/mol]\n",
+ "\n",
+ "\t\t\t# The reaction with stoichiometric amount of air is\n",
+ "\t\t\t# C3H8 + 5(O2 + 3.7N2) - 3CO2 + 4H2O + 18.8N2\n",
+ "\n",
+ "\t\t\t# The reaction with 100% excess air is\n",
+ "\t\t\t# C3H8 + 10(O2 + 3.7N2) - 3CO2 + 4H2O + 5O2 + 37.6N2\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# The smath.tan(math.radiansard enthalpy change of reaction at 298.15 K\n",
+ "delta_H_rkn_298 = 3*delta_H_for_CO2 + 4*delta_H_for_H2O - delta_H_for_C3H8;\n",
+ "\n",
+ "\t\t\t# For exit stream\n",
+ "sum_ai_ni = 3*a_CO2 + 4*a_H2O + 5*a_O2 + 37.6*a_N2;\n",
+ "sum_bi_ni = 3*b_CO2 + 4*b_H2O + 5*b_O2 + 37.6*b_N2;\n",
+ "sum_ci_ni = 3*c_CO2 + 4*c_H2O + 5*c_O2 + 37.6*c_N2;\n",
+ "sum_di_ni = 3*d_CO2 + 4*d_H2O + 5*d_O2 + 37.6*d_N2;\n",
+ "\n",
+ "\n",
+ "\t\t\t# To raise the exit species from 298.15 to 500 K the enthalpy change is\n",
+ "\n",
+ "def f1(T): \n",
+ "\t return sum_ai_ni+sum_bi_ni*T+sum_ci_ni*T**(2)+sum_di_ni*T**(3)\n",
+ "\n",
+ "delta_H_rkn = quad(f1,T_1,T_2)[0]\n",
+ "\n",
+ "delta_H_rkn = delta_H_rkn*10**(-3);\t\t\t#[kcal]\n",
+ "\n",
+ "\t\t\t# Therefore per mole of fuel the heat exchange is\n",
+ "\t\t\t# Q = Heat exchange in step 1 + Heat exchange in step 2\n",
+ "Q = delta_H_rkn_298 + delta_H_rkn;\n",
+ "\n",
+ "# Results\n",
+ "print \" The heat transfer from the combustion chamber per mole of fuel is %f kcal (per mol of C3H8)\"%(Q);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The heat transfer from the combustion chamber per mole of fuel is -415.328732 kcal (per mol of C3H8)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 18.2 Page Number : 650"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "from scipy.optimize import fsolve \n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard reaction temperature\n",
+ "\n",
+ "a_CO2 = 5.316;\n",
+ "a_H2O = 7.700;\n",
+ "a_O2 = 6.085;\n",
+ "a_C2H6 = 1.648;\n",
+ "b_CO2 = 1.4285*10**(-2);\n",
+ "b_H2O = 0.04595*10**(-2);\n",
+ "b_O2 = 0.3631*10**(-2);\n",
+ "b_C2H6 = 4.124*10**(-2);\n",
+ "c_CO2 = -0.8362*10**(-5);\n",
+ "c_H2O = 0.2521*10**(-5);\n",
+ "c_O2 = -0.1709*10**(-5);\n",
+ "c_C2H6 = -1.530*10**(-5);\n",
+ "d_CO2 = 1.784*10**(-9);\n",
+ "d_H2O = -0.8587*10**(-9);\n",
+ "d_O2 = 0.3133*10**(-9);\n",
+ "d_C2H6 = 1.740*10**(-9);\n",
+ "\n",
+ "\t\t\t# The stabdard enthalpy of formation at 298.15 K is given by\n",
+ "delta_H_for_CO2 = -94.052;\t\t\t#[kcal/mol]\n",
+ "delta_H_for_C2H6 = -20.236;\t\t\t#[kcal/mol]\n",
+ "delta_H_for_H2O = -57.7979;\t\t\t#[kcal/mol]\n",
+ "\n",
+ "# Calculations\t\t\n",
+ " \t# The reaction with stoichiometric amount of air is\n",
+ "\t\t\t# C2H6 + (7/2)O2 - 2CO2 + 3H2O\n",
+ "\n",
+ "\t\t\t# The reaction with 4 mol of O2 and 10 mol CO2 is\n",
+ "\t\t\t# C2H6 + 4O2 + 10CO2 - 12H2O + 3H2O + 0.5O2\n",
+ "\t\t\t# The product consists of 12 mol of CO2, 3 mol of water vapour and 0.5 mol of oxygen\n",
+ "delta_H_rkn_298 = 2*delta_H_for_CO2 + 3*delta_H_for_H2O - delta_H_for_C2H6;\t\t\t#[kcal]\n",
+ "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "\n",
+ "\t\t\t# For exit stream\n",
+ "sum_ai_ni = 12*a_CO2 + 3*a_H2O + 0.5*a_O2;\n",
+ "sum_bi_ni = 12*b_CO2 + 3*b_H2O + 0.5*b_O2;\n",
+ "sum_ci_ni = 12*c_CO2 + 3*c_H2O + 0.5*c_O2;\n",
+ "sum_di_ni = 12*d_CO2 + 3*d_H2O + 0.5*d_O2;\n",
+ "\n",
+ "\t\t\t# From energy balance equation we get\n",
+ "\t\t\t# delta_H_rkn_298 + sum_ai_ni*(T_2 - T_1) + (sum_bi_ni/2)*(T_2**(2) - T_1**(2)) + (sum_ci_ni/3)*(T_2**(3) - T_1**(3)) + (sum_di_ni/4)*(T_2**(4) - T_1**(4))\n",
+ "\t\t\t# Solving above equation for T_2\n",
+ "def f(T_2): \n",
+ "\t return delta_H_rkn_298 +sum_ai_ni*(T_2-T_1)+(sum_bi_ni/2)*(T_2**(2)-T_1**(2))+(sum_ci_ni/3)*(T_2**(3)-T_1**(3))+(sum_di_ni/4)*(T_2**(4)-T_1**(4))\n",
+ "T_2 = fsolve(f,-1)\n",
+ "\n",
+ "# Results\n",
+ "print \" The adiabatic flame temperature is %f K\"%(T_2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The adiabatic flame temperature is 2090.385277 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 18.3 Page Number : 651"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T_1 = 298.15;\t\t\t#[K] - Standard reaction temperature\n",
+ "\n",
+ "\t\t\t# The reaction with theoritical air is\n",
+ "\t\t\t# CH4 + 2(O2 + 3.76N2) - CO2 + 2H20 + 7.52N2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "n_product = (1 + 2 + 7.52);\t\t\t# Total number of moles of product\n",
+ "\t\t\t# The mole fraction of water vapour is\n",
+ "y_H2O = 2/(n_product);\n",
+ "print \" 1).The mole fraction of water vapour is %f\"%(y_H2O);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "delta_H_rkn_298 = -730*10**(3);\t\t\t#[J/mol]\n",
+ "C = 40;\t\t\t#[J/mol-K] - Average molar heat capacity\n",
+ "\n",
+ "\t\t\t# From energy balance we have\n",
+ "\t\t\t# delta_H_rkn_298 + n_product*C(T_2 - T_1) = 0\n",
+ "T_2 = - delta_H_rkn_298/(n_product*C) + T_1;\t\t\t#[K]\n",
+ "T_max = T_2 - T_1;\n",
+ "\n",
+ "print \" 2).The maximum temperature rise of the exhaust gases is %f K\"%(T_max);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The mole fraction of water vapour is 0.190114\n",
+ " 2).The maximum temperature rise of the exhaust gases is 1734.790875 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 18.4 Page Number : 651"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 298.15;\t\t\t#[K] - Standiansard reaction temperature\n",
+ "\n",
+ "\t\t\t# The standard enthalpy of formation at 298.15 K is given by\n",
+ "delta_H_for_CO2 = -94.052;\t\t\t#[kcal/mol]\n",
+ "delta_H_for_C8H18 = -59.780;\t\t\t#[kcal/mol]\n",
+ "delta_H_for_H2O = -57.7979;\t\t\t#[kcal/mol]\n",
+ "\n",
+ "a_CO2 = 5.316;\n",
+ "a_H2O = 7.700;\n",
+ "a_N2 = 6.903;\n",
+ "b_CO2 = 1.4285*10**(-2);\n",
+ "b_H2O = 0.04595*10**(-2);\n",
+ "b_N2 = -0.03753*10**(-2);\n",
+ "c_CO2 = -0.8362*10**(-5);\n",
+ "c_H2O = 0.2521*10**(-5);\n",
+ "c_N2 = 0.1930*10**(-5);\n",
+ "d_CO2 = 1.784*10**(-9);\n",
+ "d_H2O = -0.8587*10**(-9);\n",
+ "d_N2 = -0.6861*10**(-9);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(a)\n",
+ "\t\t\t# The reaction with stoichiometric amount of air is\n",
+ "\t\t\t# C3H18 + 12.5(O2 + 3.76N2) - 8CO2 + 9H2O + 47N2\n",
+ "\n",
+ "\t\t\t# The standard enthalpy change of reaction at 298.15 K is\n",
+ "delta_H_rkn_298 = 8*delta_H_for_CO2 + 9*delta_H_for_H2O - delta_H_for_C8H18;\t\t\t#[kcal]\n",
+ "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "\n",
+ "\t\t\t# For exit stream\n",
+ "sum_ai_ni = 8*a_CO2 + 9*a_H2O + 47*a_N2;\n",
+ "sum_bi_ni = 8*b_CO2 + 9*b_H2O + 47*b_N2;\n",
+ "sum_ci_ni = 8*c_CO2 + 9*c_H2O + 47*c_N2;\n",
+ "sum_di_ni = 8*d_CO2 + 9*d_H2O + 47*d_N2;\n",
+ "\n",
+ "\t\t\t# From energy balance equation we get\n",
+ "\t\t\t# delta_H_rkn_298 + sum_ai_ni*(T_2 - T_1) + (sum_bi_ni/2)*(T_2**(2) - T_1**(2)) + (sum_ci_ni/3)*(T_2**(3) - T_1**(3)) + (sum_di_ni/4)*(T_2**(4) - T_1**(4))\n",
+ "\t\t\t# Solving above equation for T_2\n",
+ "def f(T_2): \n",
+ "\t return delta_H_rkn_298 +sum_ai_ni*(T_2-T_1)+(sum_bi_ni/2)*(T_2**(2)-T_1**(2))+(sum_ci_ni/3)*(T_2**(3)-T_1**(3))+(sum_di_ni/4)*(T_2**(4)-T_1**(4))\n",
+ "T_2 = fsolve(f,-1)\n",
+ "\n",
+ "print \" 1).The adiabatic flame temperature is %f K\"%(T_2);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# The mean standard heat capacity of various components over the temperature range from 25 to 3000 C is \n",
+ "Cp_CO2 = 13.91;\t\t\t#[cal/mol-K]\n",
+ "Cp_H2O = 10.16;\t\t\t#[cal/mol-K]\n",
+ "Cp_O2 = 7.88;\t\t\t#[cal/mol-K]\n",
+ "Cp_N2 = 7.45;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "\t\t\t# From energy balance equation we get\n",
+ "\t\t\t# delta_H_rkn_298 + (8*Cp_CO2 + 9*Cp_H2O + 47*Cp_N2)*(T_2_prime)\n",
+ "T_2_prime = - delta_H_rkn_298/(8*Cp_CO2 + 9*Cp_H2O + 47*Cp_N2);\t\t\t#[K]\n",
+ "print \" 2).The adiabatic flame temperature is %f K\"%(T_2_prime);\n",
+ "\n",
+ "# The answer is correct. Please calculate it manually. Wrong answer is given in book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The adiabatic flame temperature is 2415.861178 K\n",
+ " 2).The adiabatic flame temperature is 2193.675005 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 18.5 Page Number : 652"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "\t\t\t# N2 + 3H2 - 2NH3\n",
+ "T_1 = 700;\t\t\t#[K] - Reaction temperature\n",
+ "Max_adia_rise = 100;\t\t\t#/[K] - Maximum adiabatic rise in temperature\n",
+ "T_2 = T_1 + Max_adia_rise;\t\t\t#[K] - \n",
+ "\n",
+ "delta_H_rkn_700 = -94.2;\t\t\t#[kJ] - Smath.tan(math.radiansard enthalpy of reaction at 700 K\n",
+ "delta_H_rkn_700 = delta_H_rkn_700*10**(3);\t\t\t#[J]\n",
+ "\n",
+ "\t\t\t# The mean standard heat capacity of various components over the temperature range from 700 to 800 K is \n",
+ "Cp_N2 = 30.0;\t\t\t#[cal/mol-K]\n",
+ "Cp_H2 = 28.9;\t\t\t#[cal/mol-K]\n",
+ "Cp_NH3 = 49.2;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "# Calculations\t\t\t\n",
+ " # The energy balance equation is\n",
+ "\n",
+ "def f46(T): \n",
+ "\t return (sum_ni_Cpi_exit)*dT\n",
+ "\n",
+ "\t\t\t# X*delta_H_rkn_700 + quad(f46,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t#At exit, let moles of NH3 = (1-X), moles of H2 = (3-3X), moles of NH3 = 2X . Therefore we have,\n",
+ "\t\t\t# delta_H_rkn_700*X + {(1-X)*Cp_N2 + (3-3X)*Cp_H2 + (2X)*Cp_NH3}*(T_2 - T_1)\n",
+ "\t\t\t# On simplification we get, 960.3*X = 116.7\n",
+ "X = 116.7/960.3;\n",
+ "\n",
+ "# Results\n",
+ "print \" The maximum allowable conversion fraction in the reactor is given by X = %f \"%(X);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The maximum allowable conversion fraction in the reactor is given by X = 0.121525 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 18.6 Page Number : 653"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 298.15;\t\t\t#[K] - standard reaction temperature\n",
+ "V = 2.0*10**(-3);\t\t\t#[m**(3)] - Volume of calorimeter\n",
+ "m = 10.;\t\t\t#[g] - Mass of liquid octane\n",
+ "Mol_wt = 114.;\t\t\t#[g/mol] - Molecular weight of octane\n",
+ "n = m/Mol_wt;\t\t\t#[mol] - No of moles of octane\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# The standard enthalpy of formation at 298.15 K is given by\n",
+ "delta_H_for_CO2 = -94.052;\t\t\t#[kcal/mol]\n",
+ "delta_H_for_C8H18 = -59.780;\t\t\t#[kcal/mol]\n",
+ "delta_H_for_H2O = -57.7979;\t\t\t#[kcal/mol]\n",
+ "\n",
+ "\t\t\t# The standard molar heat capacity of various components in high temperature range from is given by \n",
+ "\t\t\t# Cp_H2O = 6.970 + 0.3464*10**(-2)*T - 0.04833*10**(-5)*T**(2);\n",
+ "\t\t\t# Cp_O2 = 6.732 + 0.1505*10**(-2)*T - 0.01791*10**(-5)*T**(2);\n",
+ "\t\t\t# Cp_CO2 = 18.036 - 4.474*10**(-5)*T - 158.08/(T**(1/2));\n",
+ "\t\t\t# Therefore we have\n",
+ "\t\t\t# Sum_ni_Cpi_exit = 249.09 + 0.04*T - 0.547*10**(-5)*T**(2) - 1264.64/(T**(1/2))\n",
+ "\n",
+ "\t\t\t# The reaction with stoichiometric amount of oxygen is\n",
+ "\t\t\t# C8H18 + 12.5O2 - 8CO2 + 9H2O\n",
+ "\n",
+ "\t\t\t# The reaction with 50% excess oxygen is\n",
+ "\t\t\t# C8H18 + 18.75O2 - 8CO2 +9H2O + 6.25O2\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# The standard enthalpy change of reaction at 298.15 K is\n",
+ "delta_H_rkn_298 = 8*delta_H_for_CO2 + 9*delta_H_for_H2O - delta_H_for_C8H18;\t\t\t#[kcal]\n",
+ "delta_H_rkn_298 = delta_H_rkn_298*10**(3);\t\t\t#[cal]\n",
+ "\n",
+ "\t\t\t# From the energy balance equation we get\n",
+ "\n",
+ "def f10(T): \n",
+ "\t return (sum_ni_Cpi_exit)*dT\n",
+ "\n",
+ "\t\t\t# delta_H_rkn_298 + quad(f10,T_1,T_2)[0]\n",
+ "\n",
+ "\t\t\t# delta_H_rkn_298 + 249.09*(T_2 - T_1) + (0.04/2)*(T_2**(2) - T_1**(2)) - ((0.547*10**(-5))/3)*(T_2**(3)-T_1**(3)) - (1264.64*2)*(T_2**(1/2)-T_1**(1/2))\n",
+ "\t\t\t# Solving above equation for T_2\n",
+ "def f(T_2): \n",
+ "\t return delta_H_rkn_298 + 249.09*(T_2 - T_1) + (0.04/2)*(T_2**(2)-T_1**(2)) - ((0.547*10**(-5))/3)*(T_2**(3)-T_1**(3)) - (1264.64*2)*(T_2**(1./2)-T_1**(1./2))\n",
+ "T_2 = fsolve(f,1000)\n",
+ "\n",
+ "\t\t\t# When 1 mol of octane reacts the final number of moles in the calorimeter is 23.25\n",
+ "\t\t\t# When n mol of octane reacts the final number of moles in the calorimeter is\n",
+ "n_total = n*23.25;\t\t\t#[mol]\n",
+ "\n",
+ "\t\t\n",
+ "\t\t\t# Thus maximum explosion pressure is given by\n",
+ "P = (n_total*R*T_2)/V;\t\t\t#[N/m**(2)]\n",
+ "P = P*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "# Results\n",
+ "print \" The maximum explosion pressure inside the bomb calorimeter is %f bar\"%(P);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The maximum explosion pressure inside the bomb calorimeter is 397.138166 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 18.7 Page Number : 656"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.optimize import fsolve\n",
+ "import math\n",
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 400 + 273.15;\t\t\t#[K]\n",
+ "\t\t\t# SO2(g) + 1./2*(O2) (g) - SO3 (g)\n",
+ "\n",
+ "a_SO2 = 6.157;\n",
+ "a_SO3 = 3.918;\n",
+ "a_O2 = 6.085;\n",
+ "a_N2 = 6.903;\n",
+ "b_SO2 = 1.384*10**(-2);\n",
+ "b_SO3 = 3.483*10**(-2);\n",
+ "b_O2 = 0.3631*10**(-2);\n",
+ "b_N2 = -0.03753*10**(-2);\n",
+ "c_SO2 = -0.9103*10**(-5);\n",
+ "c_SO3 = -2.675*10**(-5);\n",
+ "c_O2 = -0.01709*10**(-5);\n",
+ "c_N2 = 0.1930;\n",
+ "d_SO2 = 2.057*10**(-9);\n",
+ "d_SO3 = 7.744*10**(-9);\n",
+ "d_O2 = 0.3133*10**(-9);\n",
+ "d_N2 = -0.6861*10**(-9);\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# At 400 C, from the given math.expressions\n",
+ "delta_H_rkn_T_1 = -22630.14 - 5.2815*T_1 + 0.9587*10**(-2)*T_1**(2) - 0.5598*10**(-5)*T_1**(3) + 1.3826*10**(-9)*T_1**(4);\t\t\t#[cal]\n",
+ "\n",
+ "\t\t\t# delta_H_rkn_T_X (for X moles of SO2 reacted) = delta_H_rkn_T_1*X\n",
+ "\n",
+ "\t\t\t# Let the number of moles at equilibrium be\n",
+ "\t\t\t# n_O2 = 9-0.5*X\n",
+ "\t\t\t# n_SO2 = 12-X\n",
+ "\t\t\t# n_SO3 = X\n",
+ "\t\t\t# n_N2 = 79\n",
+ "\t\t\t# Total moles at equilibrium = 100-0.5X\n",
+ "\t\t\t# Ky = y_SO3/(y_SO2*y_O2**(1./2))\n",
+ "\t\t\t# Ky = (X*(100-0.5*X)**(1./2))/((12-X)*(9-0.5*X)**(1./2))\n",
+ "\t\t\t# We know that K = Ky*Kp. Since P = 1 atm, therefore Ky = K\n",
+ "\n",
+ "\t\t\t# Now we have to account for the heat required to raise 9-0.5*X mol of O2, 12-X mol of SO2, X mol of SO3 and 79 mol of N2 from T to ART\n",
+ "\t\t\t# sum_ni_Cp_i = (12-X)*(a + b*T + c*T**(2) + d*T**(3)) + (9-0.5*X)*(a + b*T + c*T**(2) + d*T**(3)) + X*(a + b*T + c*T**(2) + d*T**(3)) + 79*(a + b*T + c*T** (2) + d*T**(3))\n",
+ "\n",
+ "\t\t\t# From energy balance equation we get\n",
+ "\n",
+ "def f19(T): \n",
+ "\t return sum_ni_Cp_i\n",
+ "\n",
+ "\t\t\t# delta_H_rkn_T_1 + quad(f19,T_1,T)[0]\n",
+ "\n",
+ "\t\t\t# The above equation on simplification becomes\n",
+ "\t\t\t# (673.99-5.2815*X)*(T-T_1) + (16.91+1.9175*X)*(10**(-2)/2)*(T**(2)-T_1**(2)) + (2.79-1.6793*X)*(10**(-5)/3)*(T**(3)-T_1**(3)) + (-26.70+5.5304*X)*(10**(-9) /4)*(T**(4)-T_1**(4)) = delta_H_rkn_T_1*X\n",
+ "\n",
+ "\t\t\t# Let us assume a temperature, say\n",
+ "T = 800;\t\t\t#[K]\n",
+ "fault = 10;\n",
+ "def f(X): \n",
+ "\t return K - (X*(100-0.5*X)**(1./2))/((12-X)*(9-0.5*X)**(1./2))\n",
+ "\n",
+ "def f1(X): \n",
+ "\t return (673.99-5.2815*X)*(T-T_1)+(16.91+1.9175*X)*(10**(-2)/2)*(T**(2)-T_1**(2))+(2.79-1.6793*X)*(10**(-5)/3)*(T**(3)-T_1**(3))+(-26.70+5.5304*X)*(10**(-9)/4)*(T**(4)-T_1**(4))+delta_H_rkn_T_1*X\n",
+ "\n",
+ "while(fault>0.01):\n",
+ " K = math.exp(3.87 + (11389.10/T) - 2.6580*math.log(T) + 0.4825*10**(-2)*T - 0.1409*10**(-5)*T**(2) + 0.2320*10**(-9)*T**(3));\n",
+ " X1 = fsolve(f,0.1)\n",
+ " X2 = fsolve(f1,1)\n",
+ " fault = abs(X1-X2);\n",
+ " T = T + 0.01;\n",
+ "\n",
+ "# Results\n",
+ "print \" The moles of SO2 reacted are %f mol\"%(X1);\n",
+ "print \" The adiabatic reaction temperature is %f K\"%(T);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The moles of SO2 reacted are 7.594592 mol\n",
+ " The adiabatic reaction temperature is 886.860000 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch1_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch1_2.ipynb new file mode 100755 index 00000000..13ddc7dd --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch1_2.ipynb @@ -0,0 +1,770 @@ +{
+ "metadata": {
+ "name": "ch1_2",
+ "signature": "sha256:05ef5db2afef7232054abda0278780d1df8c92b807546fcd7648e8885fa4539f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Introduction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.1 Page number - 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# \n",
+ "# Variables\n",
+ "#(a)\n",
+ " \n",
+ "m = 50.;\t\t\t#[kg] - Mass of piston\n",
+ "A = 0.05;\t\t\t#[m**(2)] - Area of piston\n",
+ "g = 9.81;\t\t\t#[m/s**(2)] - Acceleration due to gravity\n",
+ "Po = 101325;\t\t\t#[N/m**(2)] - Atmospheric pressure\n",
+ "\n",
+ "# Calculations and Results\n",
+ "P = (m*g/A)+Po;\t\t\t#[N/m**(2)]\n",
+ "P = P/100000.;\t\t\t#[bar]\n",
+ "print \" (a).Pressure = %f bar\"%P\n",
+ "\n",
+ "#(b)\n",
+ "print \" (b).Since the piston weight and surroundings pressure are the same, \\\n",
+ "the gas pressure in the piston-cylinder assembly remains %f bar\"%P\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (a).Pressure = 1.111350 bar\n",
+ " (b).Since the piston weight and surroundings pressure are the same, the gas pressure in the piston-cylinder assembly remains 1.111350 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.2 Page number - 8\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "P = 1.;\t\t\t#[atm] - Atmospheric pressure\n",
+ "P = 101325.;\t\t\t#[N/m**(2)]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "T = 30.;\t\t\t#[C] - Temperature of air\n",
+ "T = 30.+273.15;\t\t\t#[K]\n",
+ "V = 5.*5*5;\t\t\t#[m**(3)] - Volume of the room\n",
+ "\n",
+ "# Calculations\n",
+ "#The number of moles of air is given by\n",
+ "n = (P*V)/(R*T)\t\t\t#[mol]\n",
+ "\n",
+ "#Molecular weight of air(21 vol% O2 and 79 vol% N2)=(0.21*32)+(0.79*28)= 28.84 g/mol\n",
+ "m = n*28.84;\t\t\t#[g]\n",
+ "m = m/1000.;\t\t\t#[kg]\n",
+ "\n",
+ "# Results\n",
+ "print \"The mass of air is, m = %f kg\"%m\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of air is, m = 144.928664 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.3 Page number - 13\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "P1 = 3.;\t\t\t# [bar] - initial pressure\n",
+ "V1 = 0.5;\t\t\t# [m**(3)] - initial volume\n",
+ "V2 = 1.0;\t\t\t# [m**(3)] - final volume\n",
+ "import math\n",
+ "#(a)\n",
+ "n = 1.5;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Let P*V**(n)=C \t\t\t# Variables relation\n",
+ "#W (work done per mole)= (integrate('P'%'V'%V1%V2))\n",
+ "#and thus W=((P2*V2)-(P1*V1))/(1-n)\n",
+ "#The above math.expression is valid for all values of n%except n=1.0\n",
+ "P2 = (P1*((V1/V2)**(n)))\t\t\t#[bar] \t\t\t#pressure at state 2\n",
+ "\n",
+ "#we have%(V1/V2)=(V1t/(V2t)%since the number of moles are constant.Thus\n",
+ "W = ((P2*V2)-(P1*V1))/(1-n)*10**(5)\t\t\t#[J]\n",
+ "W = W/1000.;\t\t\t#[kJ]\n",
+ "print \" (a).The work done (for n=1.5) is %f kJ\"%W\n",
+ "\n",
+ "#(b)\n",
+ "#For n=1.0%we have% PV=C.\n",
+ "# w(wok done per mol)= (integrate('P'%'V'%V1%V2)) = (integrate('C/V'%'V'%V1%V2)) = C*ln(V2/V1)=P1*V1*ln(V2/V1)\n",
+ "W1 = P1*V1*math.log(V2/V1)*10**(5)\t\t\t#[J]\n",
+ "W1 = W1/1000.;\t\t\t#[kJ]\n",
+ "print \" (b).The work done (for n=1.0) is %f kJ\"%W1\n",
+ "\n",
+ "#(c)\n",
+ "#For n=0%we get P=Constant and thus\n",
+ "P = P1;\t\t\t#[bar]\n",
+ "# w =(integrate('P'%'V'%V1%V2)) = P*(V2-V1)\n",
+ "W2 = P*(V2-V1)*10**(5)\t\t\t#[J]\n",
+ "W2 = W2/1000.;\t\t\t#[kJ]\n",
+ "print \" (c).The work done (for n=0) is %f kJ\"%W2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (a).The work done (for n=1.5) is 87.867966 kJ\n",
+ " (b).The work done (for n=1.0) is 103.972077 kJ\n",
+ " (c).The work done (for n=0) is 150.000000 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.4 Page number - 17\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "#(a)\n",
+ "# Variables\n",
+ "V = 9.;\t\t\t# [m/s] - velocity\n",
+ "d = 1.;\t\t\t#[m] - diameter\n",
+ "A = 3.14*(d/2)**(2)\t\t\t#[m**(2)] - area\n",
+ "P = 1.;\t\t\t#[atm] - pressure\n",
+ "P = 101325.;\t\t\t# [N/m**(2)]\n",
+ "T = 300.;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "E = (V**(2))/2.;\t\t\t#[J/kg]\n",
+ "print \" (a).The wind energy per unit mass of air is %f J/kg\"%E\n",
+ "\n",
+ "#(b)\n",
+ "# Molecular weight of air(21 vol% O2 and 79 vol% N2)=(0.21*32)+(0.79*28)= 28.84 g/mol\n",
+ "M = 28.84*10**(-3)\t\t\t#[kg/mol]\n",
+ "r = (P*M)/(R*T)\t\t\t#[kg/m**(3)] - density\n",
+ "m = r*V*A;\t\t\t# [kg/s] - mass flow rate of air\n",
+ "pi = m*E;\t\t\t#[Watt] - power input\n",
+ "print \" (b).The wind power input to the turbine is %f Watt\"%pi\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (a).The wind energy per unit mass of air is 40.500000 J/kg\n",
+ " (b).The wind power input to the turbine is 335.233787 Watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.5 Page number - 23\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Given\n",
+ "P = 1.;\t\t\t # [bar] - atospheric pressure\n",
+ "P1guz = 0.75;\t\t\t# [bar] - gauze pressure in 1st evaporator\n",
+ "P2Vguz = 0.25;\t\t\t# [bar] - vaccum gauze pressure in 2nd evaporator\n",
+ "\n",
+ "# Calculations\n",
+ "P1abs = P + P1guz;\t\t\t# [bar] - absolute pressure in 1st evaporator\n",
+ "P2abs = P - P2Vguz;\t\t\t# [bar] -absolute pressure in 2nd evaporator\n",
+ "\n",
+ "# Results\n",
+ "#From saturated steam table as reported in the book\n",
+ "print \" For P1abs (absolute pressure) = %f bar\"%P1abs\n",
+ "print \" The saturation temperature in first evaporator is 116.04 C\"\n",
+ "print \" For P2abs (absolute pressure) = %f bar\"%P2abs\n",
+ "print \" The saturation temperature in second evaporator is 91.76 C\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " For P1abs (absolute pressure) = 1.750000 bar\n",
+ " The saturation temperature in first evaporator is 116.04 C\n",
+ " For P2abs (absolute pressure) = 0.750000 bar\n",
+ " The saturation temperature in second evaporator is 91.76 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.6 Page number - 23\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "V = 1.;\t\t\t # [kg] - volume of tank\n",
+ "P = 10.;\t\t\t# [bar] - pressure\n",
+ "\n",
+ "#Here degree of freedom =1(C=1%P=2%threfore F=1)\n",
+ "#From steam table at 10 bar as reported in the book\n",
+ "V_liq = 0.001127;\t\t\t# [m**(3)/kg] - volume in liquid phase\n",
+ "V_vap = 0.19444;\t\t\t# [m**(3)/kg] - volume in vapour phase\n",
+ "\n",
+ "# Calculations\n",
+ "#x*Vv=(1-x)*Vl \t\t\t# since two volumes are equal\n",
+ "x = (V_liq/(V_liq+V_vap))\t\t\t# [kg]\n",
+ "y = (1-x)\t\t\t#[kg]\n",
+ "\n",
+ "# Results\n",
+ "print \" Mass of saturated vapour is %f kg\"%x\n",
+ "print \" Mass of saturated liquid is %f kg\"%y\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Mass of saturated vapour is 0.005763 kg\n",
+ " Mass of saturated liquid is 0.994237 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.7 Page number - 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "V = 1.;\t\t\t# [m**(3)] - volume of tank\n",
+ "M = 10.;\t\t\t# [m**(3)] - total mass\n",
+ "T = (90+273.15)\t\t\t#[K] - temperature\n",
+ "\n",
+ "#From steam table at 90 C as reported in the book\n",
+ "#vapour pressure(pressure of rigid tank) = 70.14[kPa] = 0.7014[bar]\n",
+ "print \" Pressure of tank = 0.7014 bar\"\n",
+ "\n",
+ "# Calculations and Results\n",
+ "V_liq_sat=0.001036;\t\t\t# [m**(3)/kg] - saturated liquid specific volume\n",
+ "V_vap_sat=2.36056;\t\t\t# [m**(3)/kg] - saturated vapour specific volume\n",
+ "\n",
+ "#1=(V_liq_sat*(10-x))+(V_vap_sat*x)\n",
+ "x = (1-(10*V_liq_sat))/(V_vap_sat-V_liq_sat)\t\t\t#[kg]\n",
+ "y = (10-x)\t\t\t#[kg]\n",
+ "\n",
+ "print \" The amount of saturated liquid is %f kg\"%y\n",
+ "print \" The amount of saturated vapour is %f kg \"%x\n",
+ "\n",
+ "z = y*V_liq_sat;\t\t\t#[m**(3)] - Volume of saturated liquid \n",
+ "w = x*V_vap_sat;\t\t\t#[m**(3)] - Volume of saturated vapour\n",
+ "\n",
+ "print \" Total volume of saturated liquid is %f m**(3)\"%z\n",
+ "print \" Total volume of saturated vapour is %f m**(3)\"%w\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Pressure of tank = 0.7014 bar\n",
+ " The amount of saturated liquid is 9.580576 kg\n",
+ " The amount of saturated vapour is 0.419424 kg \n",
+ " Total volume of saturated liquid is 0.009925 m**(3)\n",
+ " Total volume of saturated vapour is 0.990075 m**(3)\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.8 Page number - 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "V = 10.;\t\t\t# [m**(3)] - volume of vessel\n",
+ "P_1 = 1.;\t\t\t# [bar] - initial pressure\n",
+ "V_liq_sat = 0.05;\t\t\t# [m**(3)] - saturated liquid volume\n",
+ "V_gas_sat = 9.95;\t\t\t# [m**(3)] - saturated vapour volume\n",
+ "\n",
+ "#At 1 bar pressure\n",
+ "V_liq_1 = 0.001043;\t\t\t# [m**(3/kg)] - specific saturated liquid volume\n",
+ "U_liq_1 = 417.33;\t\t\t# [kJ/kg] - specific internal energy\n",
+ "V_gas_1 = 1.69400;\t\t\t# [m**(3/kg)] - specific saturated vapour volume\n",
+ "U_gas_1 = 2506.06;\t\t\t# [kJ/kg]\n",
+ "\n",
+ "# Calculations\n",
+ "M_liq_1 = V_liq_sat/V_liq_1;\t\t\t# [kg] - mass of saturated liqid\n",
+ "M_gas_1 = V_gas_sat/V_gas_1;\t\t\t# [kg] - mass of saturated vapour\n",
+ "M = (M_liq_1+M_gas_1)\t\t\t# [kg] - total mass\n",
+ "U_1t = (M_liq_1*U_liq_1)+(M_gas_1*U_gas_1)\t\t\t# [kJ] - initial internal energy\n",
+ "V_gas_2 = (V/M)\t\t\t#[m**(3/kg)]\n",
+ "\n",
+ "#from steam table at 10 bar pressure as reported in the book\n",
+ "V_vap_2 = 0.19444;\t\t\t# [m**(3/kg)]\n",
+ "U_vap_2 = 2583.64;\t\t\t# [kJ/kg]\n",
+ "\n",
+ "#from steam table at 11 bar pressure as reported in the book\n",
+ "V_vap_3 = 0.17753;\t\t\t#[m**(3/kg)]\n",
+ "U_vap_3 = 2586.40;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "#Now computing pressure when molar volume of saturated vapour=Vg_2\n",
+ "#By interpolation (P2-10)/(11-10)=(Vg_2-Vv_2)/(Vv_3-Vv_2)\n",
+ "P_2 = (((V_gas_2 - V_vap_2)/(V_vap_3 - V_vap_2)*1)+10)\t\t\t# [bar] - final pressure\n",
+ "\n",
+ "#By interpolation calculating internal energy at state 2\n",
+ "#(P2-10)/(11-10)=(U2-Uv_2)/(Uv_3-Uv_2)\n",
+ "U_2 = (((P_2-10)/(11-10))*(U_vap_3 - U_vap_2))+U_vap_2;\t\t\t#[kJ/kg]\n",
+ "U_2t = U_2*M;\t\t\t#[kJ]\n",
+ "H = U_2t - U_1t;\t\t\t#[kJ] - Heat supplied\n",
+ "H = H/1000;\t\t\t#[MJ]\n",
+ "\n",
+ "# Results\n",
+ "print \" Total heat supplied is %f MJ\"%H\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Total heat supplied is 104.381244 MJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.9 Page number - 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "#Antoine equation for water ln(Psat)=16.262-(3799.89/(T_sat + 226.35))\n",
+ "P = 2.;\t\t\t#[atm] - Pressure\n",
+ "P = (2.*101325)/1000;\t\t\t#[kPa]\n",
+ "\n",
+ "# Calculations\n",
+ "P_sat = P;\t\t\t# Saturation pressure\n",
+ "T_sat = (3799.89/(16.262-math.log(P_sat)))-226.35;\t\t\t#[C] - Saturation temperature\n",
+ "#Thus boiling at 2 atm occurs at Tsat = 120.66 C.\n",
+ "\n",
+ "#From steam tables%at 2 bar%Tsat = 120.23 C and at 2.25 bar%Tsat = 124.0 C\n",
+ "#From interpolation for T_sat = 120.66 C%P = 2.0265 bar\n",
+ "#For P_= 2.0265 bar%T_sat% from steam table by interpolation is given by\n",
+ "#((2.0265-2)/(2.25-2))=((Tsat-120.23)/(124.0-120.23))\n",
+ "T_sat_0 = (((2.0265-2)/(2.25-2))*(124.0-120.23))+120.23;\t\t\t#[C]\n",
+ "\n",
+ "# Results\n",
+ "print \" Saturation temperature (Tsat) = %f C which is close \\\n",
+ "to %f C as determined from Antoine equation\"%(T_sat_0,T_sat)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Saturation temperature (Tsat) = 120.629620 C which is close to 120.655450 C as determined from Antoine equation\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.10 Page number - 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "# math.log(P)=-(1640/T)+10.56 (solid)\n",
+ "# math.log(P)=-(1159/T)+7.769 (liquid)%where T is in K\n",
+ "# F+P=C+2% at triple point F+3=1+2 or%F=0 i.e%vapour pressure of liquid and solid at triple point are same%we get\n",
+ "# -(1640/T)+10.56 = -(1159/T)+7.769\n",
+ "\n",
+ "# Calculations\n",
+ "T = (1640-1159)/(10.56-7.769)\t\t\t#[K]\n",
+ "P = 10**((-1640/T)+10.56)\t\t\t#[torr]\n",
+ "\n",
+ "# Results\n",
+ "print \" The temperature is %f K\"%T\n",
+ "print \" The pressure is %f torr (or mm Hg)\"%P\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The temperature is 172.339663 K\n",
+ " The pressure is 11.063907 torr (or mm Hg)\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.11 Page number - 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "M_O2 = 31.999;\t\t\t#molecular weight of oxygen\n",
+ "M_N2 = 28.014;\t\t\t#molecular weight of nitrogen\n",
+ "Y = 1.4;\t\t\t#molar heat capacities ratio for air\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Molecular weight of air(21 vol% O2 and 79 vol% N2)is given by\n",
+ "M_air = (0.21*M_O2)+(0.79*M_N2)\t\t\t#(vol% = mol%)\n",
+ "\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "R = (R*1/M_air)\t\t\t#[kJ/kg*K]\n",
+ "\n",
+ "print \" The value of universal gas constant (R) = %f kJ/kg-K \"%R\n",
+ "\n",
+ "#Y=Cp0/Cv0 and Cp0-Cv0=R\n",
+ "Cv_0 = R/(Y-1)\t\t\t#[kJ/kg*K] \n",
+ "Cp_0 = Y*Cv_0;\t\t\t#[kJ/kg*K]\n",
+ "print \" The value of Cp_0 for air is %f kJ/kg-K\"%Cp_0\n",
+ "print \" The value of Cv_0 for air is %f kJ/kg-K\"%Cv_0\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of universal gas constant (R) = 0.288172 kJ/kg-K \n",
+ " The value of Cp_0 for air is 1.008601 kJ/kg-K\n",
+ " The value of Cv_0 for air is 0.720429 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.12 Page number - 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "Y = 1.4;\t\t\t#molar heat capacities ratio for air\n",
+ "R = 8.314;\t\t\t# [J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "Cv_0 = R/(Y-1)\t\t\t# [J/mol*K]\n",
+ "Cp_0 = Y*Cv_0;\t\t\t# [J/mol*K]\n",
+ "\n",
+ "# Results\n",
+ "print \" The molar heat capacity at constant volume (Cv_0) is %f J/mol-K\"%Cv_0\n",
+ "print \" The molar heat capacity at constant pressure (Cp_0) is %f J/mol-K\"%Cp_0\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The molar heat capacity at constant volume (Cv_0) is 20.785000 J/mol-K\n",
+ " The molar heat capacity at constant pressure (Cp_0) is 29.099000 J/mol-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.13 Page number - 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.integrate import quad\n",
+ "\n",
+ "# Variables\n",
+ "# Cp0=7.7+(0.04594*10**(-2)*T)+(0.2521*10**(-5)*T**(2))-(0.8587*10**(-9)*T**(3))\n",
+ "T_1 = 400.;\t\t\t#[K]\n",
+ "T_2 = 500.;\t\t\t#[K]\n",
+ "\n",
+ "# Calculations\n",
+ "def f(T):\n",
+ " return 7.7+(0.04594*10**(-2)*T)+(0.2521*10**(-5)*T**(2))-(0.8587*10**(-9)*T**(3))\n",
+ "#(C)avg = q/(T_2 - T_1) = 1/(T_2 - T_1)*{(integrate('C'%'T'%T_1%T_2))}\n",
+ "#(Cp0)avg = 1/(T_2 - T_1)*{(integrate('Cp0'%'T'%T_1%T_2))}\n",
+ "Cp0_avg = (1/(T_2 - T_1))*quad(f,T_1,T_2)[0]\n",
+ "\n",
+ "# Results\n",
+ "print \" The mean heat capacity (Cp0_avg) for temerature range of 400 to 500 K is %f cal/mol-K\"%Cp0_avg\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The mean heat capacity (Cp0_avg) for temerature range of 400 to 500 K is 8.340118 cal/mol-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 1.14 Page number - 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "#(a)\n",
+ "P_1 = 0.2;\t\t\t# [MPa] - pressure\n",
+ "x_1 = 0.59;\t\t\t# mole fraction\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#From saturated steam tables at 0.2 MPa\n",
+ "H_liq_1 = 504.7;\t\t\t# [kJ/kg] - Enthalpy of saturated liquid\n",
+ "H_vap_1 = 2706.7;\t\t\t# [kJ/kg]- Enthalpy of saturated vapour\n",
+ "H_1 = (H_liq_1*(1-x_1))+(x_1*H_vap_1)\t\t\t# [kJ/kg]\n",
+ "print \" (a).Enthalpy of 1 kg of water in tank is %f kJ/kg\"%H_1\n",
+ "\n",
+ "#(b)\n",
+ "T_2 = 120.23;\t\t\t# [C] - temperature\n",
+ "V_2 = 0.6;\t\t\t# [m**(3)/kg] - specific volume\n",
+ "\n",
+ "#From saturated steam tables at 120.23 C% as reported in the book\n",
+ "V_liq_2=0.001061;\t\t\t# [m**(3)/kg]\n",
+ "V_vap_2=0.8857;\t\t\t# [m**(3)/kg]\n",
+ "#since V_2 < Vv_2%dryness factor will be given by% V = ((1-x)*V_liq)+(x*V_vap)\n",
+ "x_2 = (V_2- V_liq_2)/(V_vap_2 - V_liq_2)\n",
+ "\n",
+ "#From steam table%at 120.2 C%the vapour pressure of water is 0.2 MPa.So%enthalpy is given by\n",
+ "H_2 = (H_liq_1*(1-x_2))+(H_vap_1*x_2)\t\t\t#kJ/kg]\n",
+ "print \" (b).Enthalpy of saturated steam is %f kJ/kg\"%H_2\n",
+ "\n",
+ "#(c)\n",
+ "P_3 = 2.5;\t\t\t#[MPa]\n",
+ "T_3 = 350;\t\t\t#[C]\n",
+ "#From steam tables at 2.5 MPa%T_sat = 223.99 C%as reported in the book\n",
+ "#since%T_3 > Tsat% steam is superheated\n",
+ "print \" (c).As steam is superheated%from steam table%enthalpy (H) is 3126.3 kJ/kg\"\n",
+ "\n",
+ "#(d)\n",
+ "T_4 = 350;\t\t\t#[C]\n",
+ "V_4 = 0.13857;\t\t\t#[m**(3)/kg]\n",
+ "#From steam table%at 350 C% V_liq = 0.001740 m**(3)/kg and V_vap = 0.008813 m**(3)/kg.Since%V > V_vap%therefore it is superheated.\n",
+ "#From steam table at 350 C and 1.6 MPa% V = 0.17456 m**(3)/kg\n",
+ "#At 350 C and 2.0 MPa% V = 0.13857 m**(3)/kg. So%\n",
+ "print \" (d).The enthalpy of superheated steam (H) is 3137.0 kJ/kg\"\n",
+ "\n",
+ "#(e)\n",
+ "P_4 = 2.0;\t\t\t#[MPa]\n",
+ "U_4 = 2900;\t\t\t# [kJ/kg] - internal energy\n",
+ "#From saturated table at 2.0 MPa% U_liq = 906.44kJ and U_vap = 2600.3 kJ/kg\n",
+ "#scince%U_4 > Uv% it is saturated.\n",
+ "#From superheated steam table at 2.0 MPa and 350 C% as reported in the book\n",
+ "U_1 = 2859.8;\t\t\t#[kJ/kg]\n",
+ "H_1 = 3137.0;\t\t\t#[kJ/kg]\n",
+ "#At 2.0 MPa and 400 C%\n",
+ "U_2 = 2945.2;\t\t\t#[kJ/kg]\n",
+ "H_2 = 3247.6;\t\t\t#[kJ/kg]\n",
+ "T = (((U_4 - U_1)/(U_2 - U_1))*(400 - 350)) + 350;\t\t\t#[C] - By interpolation\n",
+ "H = (((T - 350)/(400 - 350))*(H_2 - H_1)) + H_1;\t\t\t#[kJ/kg]\n",
+ "print \" (e).The enthalpy value (of superheated steam) obtained after interpolation is %f kJ/kg\"%H\n",
+ "\n",
+ "#(f)\n",
+ "P_5 = 2.5;\t\t\t#[MPa]\n",
+ "T_5 = 100;\t\t\t#[C]\n",
+ "#At 100 C%P_sat=101350 N/m**(2). Since P_5 > P_sat%it is compressed liquid\n",
+ "P_sat = 0.101350;\t\t\t#[MPa]\n",
+ "H_liq = 419.04;\t\t\t#[kJ/kg] - At 100 C and 0.10135 MPa\n",
+ "V_liq = 0.001044;\t\t\t#[m**(3)/kg] - At 100 C and 0.10135 MPa\n",
+ "H_0 = H_liq + (V_liq*(P_5 - P_sat))*1000;\t\t\t#kJ/kg]\n",
+ "print \" (f).The enthalpy of compressed liquid is %f kJ/kg\"%H_0\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (a).Enthalpy of 1 kg of water in tank is 1803.880000 kJ/kg\n",
+ " (b).Enthalpy of saturated steam is 1995.549576 kJ/kg\n",
+ " (c).As steam is superheated%from steam table%enthalpy (H) is 3126.3 kJ/kg\n",
+ " (d).The enthalpy of superheated steam (H) is 3137.0 kJ/kg\n",
+ " (e).The enthalpy value (of superheated steam) obtained after interpolation is 3189.062295 kJ/kg\n",
+ " (f).The enthalpy of compressed liquid is 421.544191 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch2_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch2_2.ipynb new file mode 100755 index 00000000..c009ac76 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch2_2.ipynb @@ -0,0 +1,1276 @@ +{
+ "metadata": {
+ "name": "ch2_2",
+ "signature": "sha256:6aa23fb1475338cf467e7afb5732b8b9e456bbb3ad63c14224d73232d920457e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Chapter 2 : Equations of state"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.2 Page number - 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "Tc = 647.1;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 220.55;\t\t#[bar] - Critical pressure\n",
+ "Tr = 0.7;\t\t\t# Reduced temperature\n",
+ "\n",
+ "# Calculations\n",
+ "T = Tr*Tc;\t\t\t#[K]\n",
+ "\t\t\t#From steam table%vapour pressure of H2O at T is 10.02 [bar]% as reported in the book\n",
+ "P = 10.02;\t\t\t#[bar]\n",
+ "w = -1-math.log10((P/Pc))\n",
+ "\n",
+ "# Results\n",
+ "print \" The acentric factor (w) of water at given condition is %f \"%w\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The acentric factor (w) of water at given condition is 0.342639 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.3 Page number - 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "\t\t\t#math.log10(Psat)=8.1122-(1592.864/(t+226.184))\t\t\t# 'Psat' in [mm Hg] and 't' in [c]\n",
+ "Tc = 513.9;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 61.48;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5)\t\t\t#[N/m**(2)]\n",
+ "Tr = 0.7;\t\t\t# Reduced temperature\n",
+ "\n",
+ "# Calculations\n",
+ "T = Tr*Tc;\t\t\t#[K] - Temperature\n",
+ "T = T - 273.15;\t\t\t#[C]\n",
+ "P_sat = 10**(8.1122 - (1592.864/(T + 226.184)))\t\t\t#[mm Hg]\n",
+ "P_sat = (P_sat/760)*101325;\t\t\t#[N/m**(2)]\n",
+ "Pr_sat = P_sat/Pc;\n",
+ "w = -1-math.log10(Pr_sat)\t\t\t# Acentric factor\n",
+ "\n",
+ "# Results\n",
+ "print \" The acentric factor (w) for ethanol at given condition is %f\"%w\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The acentric factor (w) for ethanol at given condition is 0.644493\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.4 Page number - 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 380;\t\t\t#[K] - Temperature\n",
+ "Tc = 562.1;\t\t\t#[K] - Critical temperature\n",
+ "P = 7;\t\t\t#[atm] - Pressure\n",
+ "P = P*101325;\t\t\t#[N/m**(2)]\n",
+ "Pc = 48.3;\t\t\t#[atm] - Critical pressure\n",
+ "Pc = Pc*101325;\t\t\t#[N/m**(2)]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "w = 0.212;\t\t\t# acentric factor\n",
+ "Tr = T/Tc;\t\t\t# Reduced temperature\n",
+ "\n",
+ "# Calculations and Results\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6))\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2))\n",
+ "\n",
+ "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n",
+ "print \" The second virial coefficient for benzene is %e m**(3)/mol\"%B\n",
+ "\n",
+ "\t\t\t#Compressibility factor is given by\n",
+ "Z = 1 + ((B*P)/(R*T))\n",
+ "print \" The compressibility factor at 380 K is %f\"%Z\n",
+ "\n",
+ "\t\t\t#We know thar Z=(P*V)/(R/*T)%therfore\n",
+ "V = (Z*R*T)/P;\t\t\t#[m**(3)/mol]\n",
+ "print \" The molar volume is %e m**(3)/mol\"%V\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The second virial coefficient for benzene is -8.267963e-04 m**(3)/mol\n",
+ " The compressibility factor at 380 K is 0.814382\n",
+ " The molar volume is 3.627499e-03 m**(3)/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.5 Page number - 46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "V_1 = 0.3;\t\t\t#[m**(3)]\t\t\t#volume of cylinder\n",
+ "T = 60+273.15;\t\t\t#[K] - Temperature\n",
+ "P = 130*10**(5)\t\t\t#[N/m**(2)] - Pressure\n",
+ "Tc = 305.3;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 48.72*10**(5)\t\t\t#[N/m**(2)] - Critical pressure\n",
+ "w = 0.100;\t\t\t#acentric factor\n",
+ "M = 30.07;\t\t\t#molecular weight of ethane\n",
+ "Tr = T/Tc;\t\t\t# Reduced temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6))\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2))\n",
+ "\n",
+ "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n",
+ "Z = 1 + ((B*P)/(R*T))\t\t\t#Compressibility factor\n",
+ "V = (Z*R*T)/P;\t\t\t#[m**(3)/mol] - Molar volume\n",
+ "\n",
+ "\t\t\t#No.of moles in 0.3 m**(3) cylinder is given by\n",
+ "n1 = V_1/V;\t\t\t#[mol]\n",
+ "\n",
+ "\t\t\t#Mass of gas in cylinder is given by \n",
+ "m1 = (n1*M)/1000.;\t\t\t#[kg]\n",
+ "print \" Under actual conditions, the mass of ethane is, %f kg\"%m1\n",
+ "\n",
+ "\t\t\t#Under ideal condition% taking Z = 1%\n",
+ "V_ideal = (R*T)/P;\t\t\t#[m**(3)/mol]\n",
+ "n2 = V_1/V_ideal;\t\t\t#[mol]\n",
+ "m2 = (n2*M)/1000;\t\t\t#[kg]\n",
+ "print \" Under ideal conditions,the mass of ethane is, %f kg\"%m2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Under actual conditions, the mass of ethane is, 136.395203 kg\n",
+ " Under ideal conditions,the mass of ethane is, 42.339741 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.6 Page number - 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 373.15;\t\t\t#[K] - Temperature\n",
+ "P = 101325;\t\t\t#[N/m**(2)] - Pressure\n",
+ "Tc = 647.1;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 220.55*10**(5)\t#[N/m**(2)] - Critical pressure\n",
+ "w = 0.345;\t\t\t#acentric factor\n",
+ "Tr = T/Tc;\t\t\t# Reduced temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - UNiversal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6))\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2))\n",
+ "\n",
+ "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol] - Second virial coefficient\n",
+ "\n",
+ "\t\t\t#We have% Z = 1+(B/V) and Z = (P*V)/(R*T). Substituting the value of Z%we get\n",
+ "\t\t\t# V**(2)-((R*T)/P)*V-((B*R*T)/P)=0 .Solving the quadratic equation by shreedharcharya rule\n",
+ "V1 = (((R*T)/P) + (((R*T)/P)**(2) + 4*1*((B*R*T)/P))**(1./2))/2*1;\n",
+ "\n",
+ "# Results\n",
+ "print \" The molar volume of water vapour is %f m**(3)/mol\"%V1\n",
+ "\n",
+ "\t\t\t#The roots are%V1 = 0.0003670 [m**(3)/mol] and V2 = 0.0302510 [m**(3)/mol].\n",
+ "\t\t\t#As 'V2' is near to ideal volume (0.030618 [m**(3)/mol])%it is taken as the molar volume\n",
+ "\t\t\t#The other root 'V1' hss no physical significance\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The molar volume of water vapour is 0.030251 m**(3)/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.7 Page number - 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 50+273.15;\t\t\t#[K] - Temperature\n",
+ "P = 15*10**(5)\t\t\t#[N/m**(2)] - Pressure\n",
+ "Tc = 305.3;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 48.72*10**(5)\t\t\t#[N/m**(2)] - Critical pressure\n",
+ "w = 0.100;\t\t\t# Acentric factor\n",
+ "B = -157.31;\t\t\t#[cm**(3)/mol] - second virial coefficient\n",
+ "B = B*10**(-6)\t\t\t#[m**(3)/mol]\n",
+ "C = 9650;\t\t\t#[cm**(6)/mol**(2)] - third virial coefficient\n",
+ "C = C*10**(-12)\t\t\t#[cm**(6)/mol**(2)]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# (1)\n",
+ "V_1 = (R*T)/P;\t\t\t#[m**(3)/mol] - Molar volume\n",
+ "print \" (1).The molar volume for ideal equation of state is %e m**(3)/mol\"%V_1\n",
+ "\n",
+ "\t\t\t# (2)\n",
+ "Tr = T/Tc;\t\t\t# Reduced temperature\n",
+ "\t\t\t# At this temperature\n",
+ "B_0 = 0.083-(0.422/(Tr)**(1.6))\n",
+ "B_1 = 0.139-(0.172/(Tr)**(4.2))\n",
+ "\n",
+ "\t\t\t# We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B_2 = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\t\t\t#second virial coefficient\n",
+ "print \" (2).The second virial coefficent using Pitzer correlation is \\\n",
+ "found to be %e m**(3)/mol which is same as given value\"%B_2\n",
+ "\n",
+ "\t\t\t# (3)\n",
+ "\t\t\t# Given (virial equation)%Z=1+(B/V)\n",
+ "V_3 = B + (R*T)/P;\t\t\t#[m**(3)/mol] - Molar volume\n",
+ "print \" (3).The molar volume using virial equation of state is %e m**(3)/mol\"%V_3\n",
+ "\n",
+ "\t\t\t# (4)\n",
+ "\t\t\t# Given (virial equation)%Z = 1 + ((B*P)/(R*T)) + ((C - B**(2))/(R*T)**(2))*P**(2)\n",
+ "V_4 = B + (R*T)/P + ((C - B**(2))/(R*T))*P;\t\t\t# [m**(3)/mol]\n",
+ "print \" (4).The molar volume using given virial equation of state is %e m**(3)/mol\"%V_4\n",
+ "\n",
+ "\t\t\t# (5)\n",
+ "\t\t\t# Given%Z = 1 + (B/V)\n",
+ "\t\t\t# Also%Z = (P*V)/(R*T). Substituting the value of Z%we get\n",
+ "\t\t\t# V**(2)-((R*T)/P)*V-((B*R*T)/P)=0.Solving the quadratic equation\n",
+ "from scipy.optimize import fsolve\n",
+ "def f(V):\n",
+ " global R,T,P,B\n",
+ " return V**(2)-((R*T)/P)*V-((B*R*T)/P)\n",
+ "V_5_1 = fsolve(f,0)\n",
+ "V_5_2 = fsolve(f,1)\n",
+ "\n",
+ "print \" (5).The molar volume using given virial equation of state is %e m**(3)/mol\"%V_5_2\n",
+ "\n",
+ "\t\t\t# The roots are%V_5_1=0.0001743 [m**(3)/mol] and V_5_2=0.0016168 [m**(3)/mol].\n",
+ "\t\t\t# As 'V_2' is near to ideal volume (0.0017911 [m**(3)/mol])%it is taken as the molar volume\n",
+ "\n",
+ "\t\t\t# (6)\n",
+ "\t\t\t# Given%Z = 1 + (B/V) + (C/V**(2))\n",
+ "\t\t\t# Also%Z = (P*V)/(R*T). Substituting the value of Z%we get\n",
+ "\t\t\t# V**(3)-((R*T)/P)*V**(2)-((B*R*T)/P)*V-((C*R*T)/P)=0. Solving the cubic equation\n",
+ "def f1(V):\n",
+ " global P,R,T,B,C\n",
+ " return V**(3)-((R*T)/P)*V**(2)-((B*R*T)/P)*V-((C*R*T)/P)\n",
+ " \n",
+ "V_6_3=fsolve(f1,-1)\n",
+ "V_6_4=fsolve(f1,0)\n",
+ "V_6_5=fsolve(f1,1)\n",
+ "\t\t\t#The above equation has 1 real and 2 imaginary roots. We consider only real root.\n",
+ "print \" (6).The molar volume using given virial equation of state is %e m**(3)/mol\"%V_6_5\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (1).The molar volume for ideal equation of state is 1.791113e-03 m**(3)/mol\n",
+ " (2).The second virial coefficent using Pitzer correlation is found to be -1.573258e-04 m**(3)/mol which is same as given value\n",
+ " (3).The molar volume using virial equation of state is 1.633803e-03 m**(3)/mol\n",
+ " (4).The molar volume using given virial equation of state is 1.625374e-03 m**(3)/mol\n",
+ " (5).The molar volume using given virial equation of state is 1.616848e-03 m**(3)/mol"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " (6).The molar volume using given virial equation of state is 1.624187e-03 m**(3)/mol\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "/home/jovina/virtualenvs/scipy/local/lib/python2.7/site-packages/scipy/optimize/minpack.py:236: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
+ " improvement from the last ten iterations.\n",
+ " warnings.warn(msg, RuntimeWarning)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.8 Page number - 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 0 + 273.15;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "from numpy import linalg,array\n",
+ "from scipy.stats import linregress\n",
+ "\t\t\t#Virial equation of state% Z=1+(B/V)+(C/V**(2))\n",
+ "\t\t\t#From above equation we get (Z-1)*V=B+(C/V)\n",
+ "\n",
+ "P=[50,100,200,400,600,1000];\n",
+ "Z=[0.9846,1.0000,1.0365,1.2557,1.7559,2.0645];\n",
+ "V=[0,0,0,0,0,0]\n",
+ "k= []\n",
+ "t=array([0,0,0,0,0,0])\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(6):\n",
+ " V[i]=(Z[i]*R*T)/(P[i]*101325.)\t\t\t#[m**(3)/mol]\n",
+ " k.append((Z[i]-1.)*V[i])\n",
+ " t[i]=1./V[i]\n",
+ " \n",
+ "k = array(k)\n",
+ "\n",
+ "\t\t\t#w = linalg.lstsq(t.T,k.T)\n",
+ "\t\t\t#[C,B,sig]=reglin(t',k')\n",
+ "C,B,c,d,e = linregress(t.T,k.T)\n",
+ "\n",
+ "# Results\n",
+ "#From the regression% we get intercept=B and slope=C%and thus%\n",
+ "print \" The value of second virial coefficient (B) is %e m**(3)/mol\"%B\n",
+ "print \" The value of third virial coefficient (C) is %e m**(6)/mol**(2)\"%C\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of second virial coefficient (B) is -1.563305e-05 m**(3)/mol\n",
+ " The value of third virial coefficient (C) is 3.133359e-09 m**(6)/mol**(2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.9 Page number - 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 444.3;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "B_11 = -8.1;\t\t\t#[cm**(3)/mol]\n",
+ "B_11 = -8.1*10**(-6)\t\t\t#[m**(3)/mol]\n",
+ "B_22 = -293.4*10**(-6)\t\t\t#[m**(3)/mol]\n",
+ "y1 = 0.5;\t\t\t# mole fraction \t\t\t# equimolar mixture\n",
+ "y2 = 0.5;\n",
+ "\n",
+ "# For component 1 (methane)\n",
+ "Tc_1 = 190.6;\t\t\t#[K] - cricitical temperature\n",
+ "Vc_1 = 99.2;\t\t\t#[cm**(3)/mol] - cricitical molar volume\n",
+ "Zc_1 = 0.288;\t\t\t# critical compressibility factor\n",
+ "w_1 = 0.012;\t\t\t# acentric factor\n",
+ "\n",
+ "# For component 2 (n-butane)\n",
+ "Tc_2 = 425.2;\t\t\t#[K]\n",
+ "Vc_2 = 255.0;\t\t\t#[cm**(3)/mol]\n",
+ "Zc_2 = 0.274;\n",
+ "w_2 = 0.199;\n",
+ "\n",
+ "# Calculations\n",
+ "#Using virial mixing rule%we get\n",
+ "Tc_12 = (Tc_1*Tc_2)**(1./2)\t\t\t#[K]\n",
+ "w_12 = (w_1 + w_2)/2.;\n",
+ "Zc_12 = (Zc_1+Zc_2)/2.;\n",
+ "Vc_12 = (((Vc_1)**(1./3) + (Vc_2)**(1./3))/2.)**(3)\t\t\t#[cm**(3)/mol]\n",
+ "Vc_12 = Vc_12*10**(-6)\t\t\t#[cm**(3)/mol]\n",
+ "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n",
+ "Tr_12 = T/Tc_12;\t\t\t#Reduced temperature\n",
+ "B_0 = 0.083 - (0.422/(Tr_12)**(1.6))\n",
+ "B_1 = 0.139 - (0.172/(Tr_12)**(4.2))\n",
+ "\n",
+ "\t\t\t#We know%(B_12*Pc_12)/(R*Tc_12) = B_0 + (w_12*B_1)\n",
+ "B_12 = ((B_0+(w_12*B_1))*(R*Tc_12))/Pc_12;\t\t\t#[m**(3)/mol] - Cross coefficient\n",
+ "B = y1**(2)*B_11+2*y1*y2*B_12+y2**(2)*B_22;\t\t\t#[m**(3)/mol] - Second virial coefficient for mixture\n",
+ "B = B*10**(6)\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" The second virial coefficient,(B) for the mixture of gas is %f cm**(3)/mol\"%B\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The second virial coefficient,(B) for the mixture of gas is -108.309380 cm**(3)/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 2.10 Page number - 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 71+273.15;\t\t\t#[K] - Temperature\n",
+ "P = 69*10**(5)\t\t\t#[N/m**(2)] - Pressure\n",
+ "y1 = 0.5;\t\t\t#[mol] - mole fraction of equimolar mixture\n",
+ "y2 = 0.5;\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t#For component 1 (methane)\n",
+ "Tc_1 =190.6;\t\t\t#[K] - Critical temperature\n",
+ "Pc_1 = 45.99*10**(5)\t\t\t#[N/m**(2)] - Critical pressure\n",
+ "Vc_1 = 98.6;\t\t\t#[cm**(3)/mol] - Critical volume\n",
+ "Zc_1 = 0.286;\t\t\t# Critical compressibility factor\n",
+ "w_1 = 0.012;\t\t\t# acentric factor\n",
+ "\n",
+ "\t\t\t#For component 2 (hydrogen sulphide)\n",
+ "Tc_2 = 373.5;\t\t\t#[K]\n",
+ "Pc_2 = 89.63*10**(5)\t\t\t#[N/m**(2)]\n",
+ "Vc_2 = 98.5;\t\t\t#[cm**(3)/mol]\n",
+ "Zc_2 = 0.284;\n",
+ "w_2 = 0.094;\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#For component 1\n",
+ "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n",
+ "\t\t\t#At reduced temperature\n",
+ "B1_0 = 0.083-(0.422/(Tr_1)**(1.6))\n",
+ "B1_1 = 0.139-(0.172/(Tr_1)**(4.2))\n",
+ "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#Similarly for component 2\n",
+ "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n",
+ "\t\t\t#At reduced temperature Tr_2%\n",
+ "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6))\n",
+ "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2))\n",
+ "B_22 = ((B2_0+(w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#For cross coeffcient\n",
+ "Tc_12 = (Tc_1*Tc_2)**(1./2)\t\t\t#[K]\n",
+ "w_12 = (w_1 + w_2)/2;\n",
+ "Zc_12 = (Zc_1 + Zc_2)/2;\n",
+ "Vc_12 = (((Vc_1)**(1./3) + (Vc_2)**(1./3))/2)**(3)\t\t\t#[cm**(3)/mol]\n",
+ "Vc_12 = Vc_12*10**(-6)\t\t\t#[m**(3)/mol]\n",
+ "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "\t\t\t#Now we have%(B_12*Pc_12)/(R*Tc_12) = B_0+(w_12*B_1)\n",
+ "\t\t\t#where B_0 and B_1 are to be evaluated at Tr_12\n",
+ "Tr_12 = T/Tc_12;\n",
+ "\t\t\t#At reduced temperature Tr_12\n",
+ "B_0 = 0.083 - (0.422/(Tr_12)**(1.6))\n",
+ "B_1 = 0.139 - (0.172/(Tr_12)**(4.2))\n",
+ "B_12=((B_0 + (w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#For the mixture\n",
+ "B = y1**(2)*B_11+2*y1*y2*B_12 + y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#Now given virial equation is% Z=1+(B*P)/(R*T)\n",
+ "Z = 1 + (B*P)/(R*T)\n",
+ "\n",
+ "\t\t\t#Also Z = (P*V)/(R*T).Therefore%\n",
+ "V = (Z*R*T)/P;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" The molar volume of the mixture is %e m**(3)/mol\"%V\n",
+ "\t\t\t#The value obtained is near the math.experimental value of V_math.exp = 3.38*10**(-4) m**(3)/mol\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The molar volume of the mixture is 3.390411e-04 m**(3)/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example - 2.11 Page number - 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P = 6.*10**(6)\t\t\t# [Pa] - Pressure\n",
+ "P_max = 12.*10**(6)\t\t\t# [Pa] - Max pressure to which cylinder may be math.exposed\n",
+ "T = 280.;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1).Assuming ideal gas behaviour%\n",
+ "V_ideal = (R*T)/P;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t#Now when temperature and pressure are increased%the molar volume remains same%as total volume and number of moles are same.\n",
+ "\t\t\t#For max pressure of 12 MPa%temperature is\n",
+ "T_max_ideal = (P_max*V_ideal)/R;\n",
+ "print \" (1).The maximum temperature assuming ideal behaviour is %f K\"%T_max_ideal\n",
+ "\n",
+ "\t\t\t# (2).Assuming virial equation of state\n",
+ "\t\t\t# For component 1 (methane)%at 280 K\n",
+ "Tc_1 = 190.6;\t\t\t#[K]\n",
+ "Pc_1 = 45.99*10**(5)\t\t\t#[N/m**(2)]\n",
+ "Vc_1 = 98.6;\t\t\t#[cm**(3)/mol]\n",
+ "Zc_1 = 0.286;\n",
+ "w_1 = 0.012;\n",
+ "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n",
+ "B1_0 = 0.083 - (0.422/(Tr_1)**(1.6))\n",
+ "B1_1 = 0.139 - (0.172/(Tr_1)**(4.2))\n",
+ "\n",
+ "\t\t\t#We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B_11 = ((B1_0 + (w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#For component 2 (Propane)\n",
+ "Tc_2 = 369.8;\t\t\t#[K]\n",
+ "Pc_2 = 42.48*10**(5)\t\t\t#[N/m**(2)]\n",
+ "Vc_2 = 200;\t\t\t#[cm**(3)/mol]\n",
+ "Zc_2 = 0.276;\n",
+ "w_2 = 0.152;\n",
+ "Tr_2 = T/Tc_2;\t\t\t# Reduced temperature\n",
+ "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6))\n",
+ "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2))\n",
+ "B_22 = ((B2_0 + (w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#For cross coeffcient\n",
+ "y1 = 0.8;\t\t\t#mole fraction of component 1\n",
+ "y2 = 0.2;\t\t\t#mole fraction of component 2\n",
+ "Tc_12 = (Tc_1*Tc_2)**(1/2.)\t\t\t#[K]\n",
+ "w_12 = (w_1 + w_2)/2;\n",
+ "Zc_12 = (Zc_1 + Zc_2)/2;\n",
+ "Vc_12 = (((Vc_1)**(1./3) + (Vc_2)**(1./3))/2)**(3)\t\t\t#[cm**(3)/mol]\n",
+ "Vc_12 = Vc_12*10**(-6)\t\t\t#[m**(3)/mol]\n",
+ "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n",
+ "Tr_12 = T/Tc_12;\n",
+ "\n",
+ "\t\t\t#At reduced temperature%Tr_12%\n",
+ "B_0 = 0.083 - (0.422/(Tr_12)**(1.6))\n",
+ "B_1 = 0.139 - (0.172/(Tr_12)**(4.2))\n",
+ "B_12 = ((B_0 + (w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#For the mixture\n",
+ "B = y1**(2)*B_11+2*y1*y2*B_12 + y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#Now given virial equation is% Z=1+(B*P)/(R*T)\n",
+ "Z = 1 + (B*P)/(R*T)\n",
+ "\t\t\t#Also Z = (P*V)/(R*T).Therefore%\n",
+ "V_real = (Z*R*T)/P;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t\n",
+ "\n",
+ "T_prime = 560.;\t\t\t#[K]\n",
+ "fault = 10.;\n",
+ "\n",
+ "while(fault > 1):\n",
+ " T_prime_r1 = T_prime/Tc_1;\n",
+ " B_prime1_0 = 7.7674*10**(-3)\n",
+ " B_prime1_1 = 0.13714;\n",
+ " B_prime_11 = ((B_prime1_0 + (w_1*B_prime1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ " \t\t\t#Similarly for component 2%\n",
+ " T_prime_r2 = T_prime/Tc_2;\n",
+ " B_prime2_0 = -0.1343;\n",
+ " B_prime2_1 = 0.10887;\n",
+ " B_prime_22 = ((B_prime2_0 + (w_2*B_prime2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ " \t\t\t#For cross coefficient (assuming k12=0)\n",
+ " \t\t\t#Tc_12 % w_12 % Zc_12 % Vc_12 and Pc_12 have already been calculated above%now\n",
+ " T_prime_r12 = T_prime/Tc_12;\t\t\t#\n",
+ " \t\t\t#At reduced temperature%T_prime_r12%\n",
+ " B_prime_0 = 0.083 - (0.422/(T_prime_r12)**(1.6))\n",
+ " B_prime_1 = 0.139 - (0.172/(T_prime_r12)**(4.2))\n",
+ " B_prime_12 = ((B_prime_0+(w_12*B_prime_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ " \t\t\t#For the mixture\n",
+ " B_prime = y1**(2)*B_prime_11 + 2*y1*y2*B_prime_12 + y2**(2)*B_prime_22;\t\t\t#[m**(3)/mol]\n",
+ " Z_prime = 1 + (B_prime*P_max)/(R*T_prime)\n",
+ " T_new = (P_max*V_real)/(Z_prime*R)\n",
+ " fault = abs(T_prime - T_new)\n",
+ " T_prime = T_new;\n",
+ "\n",
+ "print \" (2).The maximum temperature assuming the gas to follow virial equation of state is %f K\"%T_new\n",
+ "\n",
+ "# Note : Answers varies because of rounding error. Please check it manually."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (1).The maximum temperature assuming ideal behaviour is 560.000000 K\n",
+ " (2).The maximum temperature assuming the gas to follow virial equation of state is 440.112497 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example - 2.12 Page number - 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "V_vessel = 0.1;\t\t\t#[m**(3)]\t\t\t# Volume of vessel\n",
+ "T = 25 + 273.15;\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "m = 25*1000;\t\t\t#[g]\t\t\t# Mass of ethylene\n",
+ "Tc = 282.3;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 50.40;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5)\t\t\t#[N/m**(2)]\n",
+ "Zc = 0.281;\t\t\t# Critical compressibility factor\n",
+ "Vc = 131;\t\t\t#[cm**(3)/mol] - Critical volume\n",
+ "Vc = Vc*10**(-6)\t\t\t#[m**(3)/mol]\n",
+ "w = 0.087;\t\t\t# Acentric factor\n",
+ "M = 28.054;\t\t\t# Molecular weight of ethylene\n",
+ "\n",
+ "# Calculations\n",
+ "n = m/M;\t\t\t#[mole] - No. of moles of ethylene\n",
+ "V = V_vessel/n;\t\t#[m**(3)/mol] - Molar volume\n",
+ "\n",
+ "\t\t\t#Under Redlich Kwong equation of state% we have\n",
+ "a = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "P = ((R*T)/(V-b))-(a/(T**(1./2)*V*(V+b)))\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "# Results\n",
+ "print \" The required pressure using Redlich Kwong equation of state is %e N/m**(2)\"%P\n",
+ "\n",
+ "\t\t\t#For ideal gas equation of state%\n",
+ "P_ideal = (R*T)/V;\t\t\t#[N/m**(2)]\n",
+ "print \" For ideal gas equation of state,the required pressure is %e N/m**(2)\"%P_ideal\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The required pressure using Redlich Kwong equation of state is 7.934745e+06 N/m**(2)\n",
+ " For ideal gas equation of state,the required pressure is 2.208971e+07 N/m**(2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example - 2.13 Page number - 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "V_vessel = 360*10**(-3)\t\t\t#[m**(3)] - volume of vessel\n",
+ "T = 62+273.15;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "m = 70.*1000;\t\t\t#[g]/ - Mass of carbon dioxide\n",
+ "\n",
+ "\t\t\t#For carbon dioxide\n",
+ "Tc = 304.2;\t\t\t#[K] - Cricitical temperature\n",
+ "Pc = 73.83;\t\t\t#[bar] - Cricitical pressure\n",
+ "Pc = Pc*10**(5)\t\t\t# [N/m**(2)]\n",
+ "Zc = 0.274;\t\t\t# Critical compressibility factor\n",
+ "Vc = 94.0;\t\t\t#[cm**(3)/mol]\n",
+ "Vc = Vc*10**(-6)\t\t\t#[m**(3)/mol]\n",
+ "w = 0.224;\t\t\t# Acentric factor\n",
+ "M = 44.01;\t\t\t# Molecular weight of carbon dioxide\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n = m/M;\t\t\t#[mol] - No. of moles\n",
+ "V = V_vessel/n;\t\t\t#[m**(3)/mol]\t\t\t#molar volume\n",
+ "\n",
+ "\t\t\t# (1)\n",
+ "\t\t\t# Ideal gas behaviour\n",
+ "P_1 = (R*T)/V;\t\t\t#[N/m**(2)]\n",
+ "print \" (1).The required pressure using ideal equation of state is %e N/m**(2)\"%P_1\n",
+ "\n",
+ "\t\t\t# (2)\n",
+ "\t\t\t# Virial equation of state% Z = 1 + (B*P)/(R*T)\n",
+ "\t\t\t# (P*V)/(R*T) = 1 + (B*P)/(R*T)% and thus P = (R*T)/(V - B). Now\n",
+ "Tr = T/Tc;\t\t\t#Reduced temperature\n",
+ "\t\t\t# At reduced temperature Tr%\n",
+ "B_0 = 0.083 - (0.422/(Tr)**(1.6))\n",
+ "B_1 = 0.139 - (0.172/(Tr)**(4.2))\n",
+ "B = ((B_0 + (w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n",
+ "P_2 = (R*T)/(V - B)\t\t\t#[N/m**(2)]\n",
+ "print \" (2).The required pressure using given virial equation of state is %e N/m**(2)\"%P_2\n",
+ "\n",
+ "\t\t\t# (3)\n",
+ "\t\t\t# Virial equation of state% Z = 1 + (B/V)\n",
+ "\t\t\t# (P*V)/(R*T) = 1 + (B/V)\n",
+ "P_3 = ((R*T)/V) + (B*R*T)/(V**(2))\t\t\t#[N/m**(2)]\n",
+ "print \" (3).The required pressure using given virial equation of state is %e N/m**(2)\"%P_3\n",
+ "\n",
+ "\t\t\t# (4)\n",
+ "\t\t\t# Van der Walls equation of state%P = ((R*T)/(V-b)) - a/(V**(2))\n",
+ "a = (27*(R**(2))*(Tc**(2)))/(64*Pc)\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc)\t\t\t#[m**(3)/mol]\n",
+ "P_4 = ((R*T)/(V-b)) - a/(V**(2))\t\t\t#[N/m**(2)]\n",
+ "print \" (4).The required pressure using van der Walls equation of state is %e N/m**(2)\"%P_4\n",
+ "\n",
+ "\t\t\t#(5)\n",
+ "\t\t\t# Redlich Kwong equation of state%\n",
+ "a_1 = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b_1 = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "P_5 = ((R*T)/(V - b_1)) - (a_1/(T**(1./2)*V*(V + b_1)))\t\t\t#[N/m**(2)]\n",
+ "print \" (5).The required pressure using Redlich Kwong equation of state is %e N/m**(2)\"%P_5\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (1).The required pressure using ideal equation of state is 1.231100e+07 N/m**(2)\n",
+ " (2).The required pressure using given virial equation of state is 8.712394e+06 N/m**(2)\n",
+ " (3).The required pressure using given virial equation of state is 7.226009e+06 N/m**(2)\n",
+ " (4).The required pressure using van der Walls equation of state is 8.048790e+06 N/m**(2)\n",
+ " (5).The required pressure using Redlich Kwong equation of state is 8.079803e+06 N/m**(2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example - 2.14 Page number - 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 500+273.15;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "P = 325*1000;\t\t\t#[Pa] - Pressure\n",
+ "Tc = 647.1;\t\t\t#[K] - Cricitical temperature\n",
+ "Pc = 220.55;\t\t\t#[bar] - Cricitical pressure\n",
+ "Pc = Pc*10**(5)\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t# Van der Walls equation of state%\n",
+ "a = (27*(R**(2))*(Tc**(2)))/(64*Pc)\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc)\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# The cubic form of van der Walls equation of state is given by%\n",
+ "\t\t\t# V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P=0\n",
+ "\t\t\t# Solving the cubic equation\n",
+ "def f(V):\n",
+ " global b,R,T,P,a\n",
+ " return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n",
+ "from scipy.optimize import fsolve\n",
+ "V_1 = fsolve(f,1)\n",
+ "V_2 = fsolve(f,10)\n",
+ "V_3 = fsolve(f,100)\n",
+ "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root%\n",
+ "Z_1 = (P*V_1)/(R*T)\t\t\t#compressibility factor\n",
+ "print \" (1).The compressibility factor of steam using van der Walls equation of state is %f\"%Z_1\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\n",
+ "\t\t\t#Redlich Kwong equation of state%\n",
+ "a_1 = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b_1 = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# The cubic form of Redlich Kwong equation of state is given by%\n",
+ "\t\t\t# V**(3)-((R*T)/P)*V**(2)-((b_1**(2))+((b_1*R*T)/P)-(a/(T**(1/2)*P))*V-(a*b)/(T**(1/2)*P)=0\n",
+ "\t\t\t#Solving the cubic equation\n",
+ "def f1(V):\n",
+ " return V**(3)-((R*T)/P)*V**(2)-((b_1**(2))+((b_1*R*T)/P)-(a_1/(T**(1./2)*P)))*V-(a_1*b_1)/(T**(1./2)*P)\n",
+ " \n",
+ "V_4=fsolve(f1,1)\n",
+ "V_5=fsolve(f1,10)\n",
+ "V_6=fsolve(f1,100)\n",
+ "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root%\n",
+ "\t\t\t# Thus compressibility factor is\n",
+ "Z_2 = (P*V_4)/(R*T)\t\t\t#compressibility factor\n",
+ "print \" (2).The compressibility factor of steam using Redlich Kwong equation of state is %f\"%Z_2\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (1).The compressibility factor of steam using van der Walls equation of state is 0.997181\n",
+ " (2).The compressibility factor of steam using Redlich Kwong equation of state is 0.997028\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example - 2.15 Page number - 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T = 250+273.15;\t\t\t#[K]\n",
+ "R = 8.314;\t\t\t#[J/mol*K]\n",
+ "P = 39.76;\t\t\t#[bar] Vapour pressure of water at T\n",
+ "P = P*10**(5)\t\t\t#[N/m**(2)]\n",
+ "Tc = 647.1;\t\t\t#[K] - Cricitical temperature\n",
+ "Pc = 220.55*10**(5)\t\t\t#[N/m**(2)] - Cricitical pressure\n",
+ "w = 0.345;\t\t\t#Acentric factor\n",
+ "M = 18.015;\t\t\t# Molecular weight of water\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# Using peng-Robinson equation of stste \n",
+ "m = 0.37464 + 1.54226*w - 0.26992*w**(2)\n",
+ "Tr = T/Tc;\n",
+ "alpha = (1 + m*(1 - Tr**(1./2)))**(2)\n",
+ "a = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# Cubuc form of Peng-Robinson equation of stste is given by\n",
+ "\t\t\t# V**(3) + (b-(R*T)/P)*V**(2) - ((3*b**(2)) + ((2*R*T*b)/P) - (a/P))*V+b**(3) + ((R*T*(b**(2))/P) - ((a*b)/P) = 0;\n",
+ "\t\t\t# Solving the cubic equation\n",
+ "def f(V):\n",
+ " global b,R,T,P,a\n",
+ " return V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2)))/P)-((a*b)/P)\n",
+ "V_1 = fsolve(f,-1)\n",
+ "V_2 = fsolve(f,0)\n",
+ "V_3 = fsolve(f,1)\n",
+ "\t\t\t#The largest root is for vapour phase%\n",
+ "V_vap = V_3;\t\t\t#[m**(3)/mol] - Molar volume (saturated vapour)\n",
+ "V_vap = V_vap*10**(6)/M;\t\t\t#[cm**(3)/g]\n",
+ "\n",
+ "print \" The moar volume of saturated water in the vapour phase (V_vap) is %f cm**(3)/g\"%V_vap\n",
+ "\n",
+ "\t\t\t#The smallest root is for liquid phase%\n",
+ "V_liq = V_1;\t\t\t#[m**(3)/mol] - molar volume (saturated liquid)\n",
+ "V_liq = V_liq*10**(6)/M;\t\t\t#[cm**(3)/g]\n",
+ "print \" The moar volume of saturated water in the liquid phase (V_liq) is %f cm**(3)/g\"%V_liq\n",
+ "\n",
+ "\t\t\t#From steam table at 250 C% V_vap = 50.13 [cm**(3)/g] and V_liq = 1.251 [cm**(3)/g].\n",
+ "print \" From steam table at 250 C, V_vap = 50.13 [cm**(3)/g] and V_liq = 1.251 [cm**(3)/g]\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The moar volume of saturated water in the vapour phase (V_vap) is 51.757097 cm**(3)/g\n",
+ " The moar volume of saturated water in the liquid phase (V_liq) is 1.554560 cm**(3)/g\n",
+ " From steam table at 250 C, V_vap = 50.13 [cm**(3)/g] and V_liq = 1.251 [cm**(3)/g]\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example - 2.16 Page number - 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 500+273.15;\t\t\t#[K] - Temperature\n",
+ "P = 15.;\t\t\t#[atm] - Pressure\n",
+ "P = P*101325;\t\t\t#[N/m**(2)]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "Tc = 190.6;\t\t\t#[K] - Cricitical temperature\n",
+ "Pc = 45.99*10**(5)\t\t\t#[N/m**(2)] - Cricitical pressure\n",
+ "Vc = 98.6;\t\t\t#[cm**(3)/mol] - Cricitical molar volume\n",
+ "Zc = 0.286;\t\t\t# Critical compressibility factor\n",
+ "w = 0.012;\t\t\t# Acentric factor\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t#Virial equation of state%Z = 1 + (B*P)/(R*T)\n",
+ "Tr_1 = T/Tc;\t\t\t#Reduced temperature\n",
+ "B_0 = 0.083-(0.422/(Tr_1)**(1.6))\n",
+ "B_1 = 0.139-(0.172/(Tr_1)**(4.2)) \t\t\t# We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\t\t\t#second virial coefficient\n",
+ "Z = 1 + (B*P)/(R*T)\t\t\t#compressibility factor\n",
+ "\t\t\t#(P*V)/(R*T)=1+(B*P)/(R*T)%and thus%\n",
+ "V_1 = (Z*R*T)/P;\t\t\t#[m**(3)/mol]\n",
+ "print \" (1).The molar volume of methane using given virial equation is %e m**(3)/mol\"%V_1\n",
+ "\n",
+ "\t\t\t#(2).\n",
+ "\t\t\t#Virial equation of state%Z = 1 + (B/V)\n",
+ "\t\t\t#Also%Z = (P*V)/(R*T). Substituting the value of Z%we get\n",
+ "\t\t\t# V**(2) - ((R*T)/P)*V - ((B*R*T)/P) = 0.Solving the quadratic equation\n",
+ "def f(V):\n",
+ " global R,T,P,B\n",
+ " return V**(2)-((R*T)/P)*V-((B*R*T)/P)\n",
+ "V2_1=fsolve(f,0)\n",
+ "V2_2=fsolve(f,1)\n",
+ "\t\t\t# Out of two roots%we will consider only positive root\n",
+ "print \" (2).The molar volume of methane using given virial equation is %e m**(3)/mol\"%V2_2\n",
+ "\n",
+ "\t\t\t# (3)\n",
+ "\t\t\t# Van der Walls equation of state%\n",
+ "\t\t\t# (P + (a/V**(2)))*(V - b) = R*T\n",
+ "a_3 = (27*(R**(2))*(Tc**(2)))/(64*Pc)\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b_3 = (R*Tc)/(8*Pc)\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# The cubic form of van der Walls equation of state is given by%\n",
+ "\t\t\t# V**(3) - (b + (R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n",
+ "\t\t\t# Solving the cubic equation\n",
+ "def f1(V):\n",
+ " global b,R,T,P,a_3\n",
+ " return V**(3)-(b_3+(R*T)/P)*V**(2)+(a_3/P)*V-(a_3*b_3)/P\n",
+ "V3_1=fsolve(f1,1)\n",
+ "V3_2=fsolve(f1,10)\n",
+ "V3_3=fsolve(f1,100)\n",
+ "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root.\n",
+ "print \" (3).The molar volume of methane using van der Walls equation of state is %e m**(3)/mol\"%V3_1\n",
+ "\n",
+ "\t\t\t# (4)\n",
+ "\t\t\t# Redlich Kwong equation of state\n",
+ "a_4 = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b_4 = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# The cubic form of Redlich Kwong equation of state is given by%\n",
+ "\t\t\t# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n",
+ "\t\t\t# Solving the cubic equation\n",
+ "def f2(V):\n",
+ " global R,T,P,b_4,a_4\n",
+ " return V**(3)-((R*T)/P)*V**(2)-((b_4**(2))+((b_4*R*T)/P)-(a_4/(T**(1./2)*P)))*V-(a_4*b_4)/(T**(1./2)*P)\n",
+ "V4_1=fsolve(f2,1)\n",
+ "V4_2=fsolve(f2,10)\n",
+ "V4_3=fsolve(f2,100)\n",
+ "\t\t\t#The above equation has 1 real and 2 imaginary roots. We consider only real root.\n",
+ "print \" (4).The molar volume of methane using Redlich Kwong equation of state is %e m**(3)/mol\"%V4_1\n",
+ "\n",
+ "\t\t\t# (5)\n",
+ "\t\t\t# Using Peng-Robinson equation of state \n",
+ "m = 0.37464 + 1.54226*w - 0.26992*w**(2)\n",
+ "Tr_5 = T/Tc;\n",
+ "alpha = (1 + m*(1 - Tr_5**(1./2)))**(2)\n",
+ "a = ((0.45724*(R*Tc)**(2))/Pc)*alpha;\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b = (0.07780*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# Cubic form of Peng-Robinson equation of stste is given by\n",
+ "\t\t\t# V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2))/P)-((a*b)/P)=0;\n",
+ "\t\t\t# Solving the cubic equation\n",
+ "def f3(V):\n",
+ " global b,R,T,P,a\n",
+ " return V**(3)+(b-(R*T)/P)*V**(2)-((3*b**(2))+((2*R*T*b)/P)-(a/P))*V+b**(3)+((R*T*(b**(2)))/P)-((a*b)/P)\n",
+ "V5_1=fsolve(f3,-1)\n",
+ "V5_2=fsolve(f3,0)\n",
+ "V5_3=fsolve(f3,1)\n",
+ "\t\t\t#The largest root is for vapour phase%\n",
+ "\t\t\t#The largest root is only considered as the systemis gas\n",
+ "print \" (5).The molar volume of methane using Peng-Robinson equation of state is %e m**(3)/mol\"%V5_3\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (1).The molar volume of methane using given virial equation is 4.242974e-03 m**(3)/mol\n",
+ " (2).The molar volume of methane using given virial equation is 4.242930e-03 m**(3)/mol\n",
+ " (3).The molar volume of methane using van der Walls equation of state is 4.236938e-03 m**(3)/mol\n",
+ " (4).The molar volume of methane using Redlich Kwong equation of state is 4.241402e-03 m**(3)/mol\n",
+ " (5).The molar volume of methane using Peng-Robinson equation of state is 4.242341e-03 m**(3)/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example - 2.17 Page number - 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 310.93;\t\t\t#[K] - Temperature\n",
+ "P = 2.76*10**(6)\t\t\t#[N/m**(2)] - Pressure\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "y1 = 0.8942;\t\t\t# Mole fraction of component 1 (methane)\n",
+ "y2 = 1-y1;\t\t\t# Mole fraction of component 2 (n-butane)\n",
+ "\n",
+ "#For component 1 (methane)\n",
+ "Tc_1 = 190.58;\t\t\t#[K] - Cricitical temperature\n",
+ "Pc_1 = 46.05;\t\t\t#[bar] - Cricitical pressure\n",
+ "Pc_1 = Pc_1*10**(5)\t\t\t#[N/m**(2)]\n",
+ "Zc_1 = 0.288;\t\t\t# Critical compressibility factor\n",
+ "Vc_1 = 99.1;\t\t\t#[cm**(3)/mol]\n",
+ "Vc_1 = Vc_1*10**(-6)\t\t\t#[m**(3)/mol]\n",
+ "w_1 = 0.011;\t\t\t# Acentric factor\n",
+ "\n",
+ "\t\t\t#For component 2 (n-butane)\n",
+ "Tc_2 = 425.18;\t\t\t#[K] - Cricitical temperature\n",
+ "Pc_2 = 37.97;\t\t\t#[bar] - Cricitical pressure\n",
+ "Pc_2 = Pc_2*10**(5)\t\t\t# [N/m**(2)]\n",
+ "Zc_2 = 0.274;\t\t\t# Critical compressibility factor\n",
+ "Vc_2 = 255.1;\t\t\t# [cm**(3)/mol]\n",
+ "Vc_2 = Vc_2*10**(-6)\t\t\t# [m**(3)/mol]\n",
+ "w_2 = 0.193;\t\t\t# Acentric factor\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# (1)\n",
+ "\t\t\t# Virial equation of state% Z = 1 + (B*P)/(R*T)\n",
+ "\t\t\t# For component 1 (methane)\n",
+ "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n",
+ "\t\t\t# At reduced temperature\n",
+ "B1_0 = 0.083 - (0.422/(Tr_1)**(1.6))\n",
+ "B1_1 = 0.139 - (0.172/(Tr_1)**(4.2))\n",
+ "\t\t\t# We know%(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#Similarly for component 2\n",
+ "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n",
+ "\t\t\t#At reduced temperature Tr_2%\n",
+ "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6))\n",
+ "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2))\n",
+ "B_22 = ((B2_0 + (w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#For cross coeffcient\n",
+ "Tc_12 = (Tc_1*Tc_2)**(1./2)\t\t\t#[K]\n",
+ "w_12 = (w_1 + w_2)/2;\n",
+ "Zc_12 = (Zc_1 + Zc_2)/2;\n",
+ "Vc_12 = (((Vc_1)**(1./3)+(Vc_2)**(1./3))/2)**(3)\t\t\t#[m**(3)/mol]\n",
+ "Pc_12 =(Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "\t\t\t#Now we have%(B_12*Pc_12)/(R*Tc_12) = B_0+(w_12*B_1)\n",
+ "\t\t\t#where B_0 and B_1 are to be evaluated at Tr_12\n",
+ "Tr_12 = T/Tc_12;\n",
+ "\t\t\t#At reduced temperature Tr_12\n",
+ "B_0 = 0.083 - (0.422/(Tr_12)**(1.6))\n",
+ "B_1 = 0.139 - (0.172/(Tr_12)**(4.2))\n",
+ "B_12 = ((B_0+(w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#For the mixture\n",
+ "B = y1**(2)*B_11+2*y1*y2*B_12+y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n",
+ "Z_1 = 1+(B*P)/(R*T)\t\t\t#compressibility factor\n",
+ "print \" (1).The compressibility factor of mixture using Virial equation of state is %f\"%Z_1\n",
+ "\n",
+ "\t\t\t# (2)\n",
+ "\t\t\t# Pseudo reduced method.\n",
+ "T_pc = (y1*Tc_1)+(y2*Tc_2)\t\t\t#[K] - Cricitical temperature\n",
+ "P_pc = (y1*Pc_1)+(y2*Pc_2)\t\t\t#[N/m**(2)] - Cricitical pressure\n",
+ "w = (y1*w_1)+(y2*w_2)\t\t\t# Acentric factor\n",
+ "T_pr = T/T_pc;\t\t\t# Reduced temperature\n",
+ "P_pr = P/P_pc;\t\t\t# Reduced pressure\n",
+ "\t\t\t#At this value of Tpr%\n",
+ "B0 = 0.083 - (0.422/(T_pr)**(1.6))\n",
+ "B1 = 0.139 - (0.172/(T_pr)**(4.2))\n",
+ "Z0 = 1 + B0*(P_pr/T_pr)\n",
+ "Z1 = B1*(P_pr/T_pr)\n",
+ "Z = Z0 + w*Z1;\n",
+ "print \" (2).The compressibility factor of mixture using pseudo reduced method is %f\"%Z\n",
+ "\n",
+ "\t\t\t# (3)\n",
+ "\t\t\t# Redlich Kwong equation of state is given by\n",
+ "\t\t\t# P = ((R*T)/(V-b)) - (a/(T**(1/2)*V*(V+b)))\n",
+ "\t\t\t# For methane%component 1\n",
+ "a_1 = (0.42748*(R**(2))*(Tc_1**(2.5)))/Pc_1;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b_1 = (0.08664*R*Tc_1)/Pc_1;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t#For n-butane%component 2\n",
+ "a_2 = (0.42748*(R**(2))*(Tc_2**(2.5)))/Pc_2;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b_2 = (0.08664*R*Tc_2)/Pc_2;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t#For the mixture\n",
+ "a_12 = (a_1*a_2)**(1./2)\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "a = y1**(2)*a_1 + 2*y1*y2*a_12 + y2**(2)*a_2;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b = (y1*b_1) + (y2*b_2)\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# The cubic form of Redlich Kwong equation of state is given by%\n",
+ "\t\t\t# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n",
+ "\t\t\t# Solving the cubic equation\n",
+ "def f(V):\n",
+ " global R,T,P,b,a\n",
+ " return V**(3)-((R*T)/P)*V**(2)-((b**(2))+((b*R*T)/P)-(a/(T**(1./2)*P)))*V-(a*b)/(T**(1./2)*P)\n",
+ "V_1=fsolve(f,1)\n",
+ "V_2=fsolve(f,10)\n",
+ "V_3=fsolve(f,100)\n",
+ "\t\t\t# Thus compressibility factor is\n",
+ "Z_3 = (P*V_1)/(R*T)\t\t\t#compressibility factor\n",
+ "print \" (3).The compressibility factor of mixture using Redlich Kwong equation of state is %f\"%Z_3\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (1).The compressibility factor of mixture using Virial equation of state is 0.926842\n",
+ " (2).The compressibility factor of mixture using pseudo reduced method is 0.937191\n",
+ " (3).The compressibility factor of mixture using Redlich Kwong equation of state is 0.927540\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch3_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch3_2.ipynb new file mode 100755 index 00000000..6e43a54d --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch3_2.ipynb @@ -0,0 +1,1524 @@ +{
+ "metadata": {
+ "name": "ch3_2",
+ "signature": "sha256:8255c3a74c7b52da7fb922c8e6e009ed3e07e5e50a88f1302c38a2c832cbdc1f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : The First Law and Its Applications"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.1 Page number - 80 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "V_vessel = 4.*10**(-3);\t\t\t#[m**(-3)] - Volume of vessel\n",
+ "T = 200+273.15;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal fas constant\n",
+ "P = 1.5*10**(6);\t\t\t#[Pa] - Pressure\n",
+ "Q = 40.*1000;\t\t\t#[J] - Heat input\n",
+ "\t\t\t# From steam table at 200 C,Psat=1.55549 MPa,therefore the steam is superheated.\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# (1)\n",
+ "\t\t\t# Using steam table,at 1.5 MPa and 200 C,\n",
+ "V_1 = 0.1325;\t\t\t#[m**(3)/mol] - Specific volume\n",
+ "U_1 = 2598.1;\t\t\t#[kJ/kg] - Specific internal energy\n",
+ "\t\t\t# From first law under constant pressure,\n",
+ "\t\t\t# Q - m*P*(V2 - V1) = m*(U2 - U1)\n",
+ "m = V_vessel/V_1;\t\t\t#[kg] - Mass of system\n",
+ "\t\t\t# Putting the values,the above equation becomes\n",
+ "\t\t\t# 45283*(V2 - 0.1325) + 30.1887*(U2 - 2598.1) = 40000\n",
+ "\t\t\t# From steam table at 700 C LHS is 33917.0 and at 800 C,it is 40925.3.\n",
+ "\t\t\t# Therefore the final temperature lies between 700 and 800 C\n",
+ "print \" 1.From steam table the final temperature lies between 700 and 800 C\";\n",
+ "\n",
+ "\t\t\t# Alternate method\n",
+ "\t\t\t# Here we use first law at constant pressure,\n",
+ "\t\t\t# Q = m*(H_2 - H_1)\n",
+ "H_1 = 2796.8;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# Substituting the values,\n",
+ "\t\t\t# 40 = 0.0301887*(H_2 - 2796.8)\n",
+ "H_2 = (40/0.0301887) + 2796.9;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# Threfore,final enthalpy is (H2) 4121.8 [kJ/kg] and pressure is 1.5 [MPa].\n",
+ "\t\t\t# From steam table at 1.5 [MPa]and 700 C,enthalpy is 3920.3 [kj/kg] and at 1.5 [MPa]and 800 C,enthalpy is 4152.6 [kj/kg]\n",
+ "print \"\\tAlternate method\";\n",
+ "print \"\\tBy linear interpolation we get the temperature at which enthlpy is 4121.8 kJ/kg to be 786.74 C\";\n",
+ "\n",
+ "\t\t\t# (2)\n",
+ "\t\t\t# Assuming ideal behaviour.\n",
+ "n = (P*V_vessel)/(R*T);\t\t\t#[mol] - No of moles\n",
+ "M = 18.015;\t\t\t# Molecular weight of water\n",
+ "m_2 = n*M;\t\t\t#[g] - mass of moles\n",
+ "Cp_1 = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant presure\n",
+ "R0 = 1.987;\t\t\t#[cal/mol*K] - universal gas constant\n",
+ "Cv_1 = Cp_1 - R0;\t\t\t#[cal/mol*K] - Heat capacity at constant volume\n",
+ "Cv_1 = Cv_1*4.184/M;\t\t\t#[J/g*K]\n",
+ "T1 = T;\n",
+ "\t\t\t# From 1st law energy balance for constant pressure, we have Q-W= m*(delta_U)\n",
+ "\t\t\t# Q = P*(V2 - V1)*m = m*Cv*(T2 - T1)\n",
+ "\t\t\t# Q = P*((T2/T1)-1)*V1*m = m*Cv*(T2-T1)\n",
+ "\t\t\t# But, (V1*Cv)=initial total volume of system = V_vessel\n",
+ "\t\t\t# Q-P((T2/T1)-1)*V_vessel = m_2*Cv_0*(T2-T1);\n",
+ "def f(T2): \n",
+ "\t return Q-P*((T2/T1)-1)*V_vessel-m_2*Cv_1*(T2-T1)\n",
+ "T2_1 = fsolve(f,1)\n",
+ "\t\t\t#The heat capacity should be evaluted at mean temperature\n",
+ "T_mean = (T1 + T2_1)/2;\n",
+ "Cp_2 = 7.7 + 0.04594*10**(-2)*T_mean+0.2521*10**(-5)*T_mean**(2) - 0.8587*10**(-9)*T_mean**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant presure\n",
+ "Cv_2 = Cp_2-R0;\t\t\t#[cal/mol*K] - Heat capacity at constant volume\n",
+ "Cv_2 = Cv_2*4.184/M;\t\t\t#[J/g*K]\n",
+ "\t\t\t#Now again solving the equation Q=P*((T2/T1)-1)*V1*m = m*Cv*(T2-T1),for Cv=Cv_2\n",
+ "def f1(T2): \n",
+ "\t return Q-P*((T2/T1)-1)*V_vessel-m_2*Cv_2*(T2-T1)\n",
+ "T2_2 = fsolve(f1,1)\n",
+ "print \" 2).The temperature assuming ideal behaviour is %f K\"%(T2_2);\n",
+ "\n",
+ "\t\t\t# Alternate method\n",
+ "\t\t\t# From 1st law at constant pressure, we have Q = m*Cp(T2-T1)\n",
+ "T2_3 = Q/(m_2*(Cp_1*4.184/M))+T1;\n",
+ "\t\t\t#We can calculate the mean temperature as done above\n",
+ "T_mean1 = (T1 + T2_3)/2;\t\t\t#[J/g*K]\n",
+ "\t\t\t#The heat capacity should be evaluted at mean temperature\n",
+ "Cp_3 = 7.7 + 0.04594*10**(-2)*T_mean1 + 0.2521*10**(-5)*T_mean1**(2)-0.8587*10**(-9)*T_mean1**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant presure\n",
+ "Cp_3 = Cp_3*4.184/M;\t\t\t#[J/g*K]\n",
+ "\t\t\t# Again solving the equation Q = m*Cp(T2-T1), for Cp=Cp_3\n",
+ "T2_4 = Q/(m_2*Cp_3) + T1;\n",
+ "print \"\\tAlternate method\";\n",
+ "print \"\\tThe temperature assuming ideal behaviour alternate method) is %f K\"%(T2_4);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1.From steam table the final temperature lies between 700 and 800 C\n",
+ "\tAlternate method\n",
+ "\tBy linear interpolation we get the temperature at which enthlpy is 4121.8 kJ/kg to be 786.74 C\n",
+ " 2).The temperature assuming ideal behaviour is 1141.732355 K\n",
+ "\tAlternate method\n",
+ "\tThe temperature assuming ideal behaviour alternate method) is 1141.738180 K\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
+ " improvement from the last ten iterations.\n",
+ " warnings.warn(msg, RuntimeWarning)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.2 Page number - 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "V_tank = 1;\t\t\t#[m**(3)] - Volume of the tank\n",
+ "V_liq = 0.05;\t\t\t#[m**(3)] - Volume of saturated water\n",
+ "V_vap = 0.95;\t\t\t#[m**(3)] - Volume of saturated vapour\n",
+ "P = 1;\t\t\t#[bar] - Pressure\n",
+ "V_liq_sat = 0.001043;\t\t\t#[m**(3)/kg] - Specific volume of saturated water\n",
+ "V_vap_sat = 1.6940;\t\t\t#[m**(3)/kg] - Specific volume of saturated vapour\n",
+ "U_liq_sat = 417.4;\t\t\t#[kJ/kg] - Saturated liquid internal energy\n",
+ "U_vap_sat = 2506.1;\t\t\t#[kJ/kg] - Saturated vapour internal energy\n",
+ "\n",
+ "# Calculations\n",
+ "m = (V_liq/V_liq_sat) + (V_vap/V_vap_sat);\t\t\t#[kg] - Total mass of water\n",
+ "U_1 = (V_liq/V_liq_sat)*U_liq_sat + (V_vap/V_vap_sat)*U_vap_sat;\t\t\t#[kJ] - Total internal energy\n",
+ "\n",
+ "\t\t\t# At final state,which is saturated vapour\n",
+ "V = V_tank/m;\t\t\t#[m**(3)/kg] - Molar volume\n",
+ "\t\t\t# From saturated steam table at 8 MPa,as reported in the book V_vap = 0.02352[m**(3)/kg] and U_vap = 2569.8[kJ/kg]\n",
+ "\t\t\t# At 9 MPa, Vv = 0.02048[m**(3)/kg] and Uv = 2557.8[kJ/kg]\n",
+ "\t\t\t# Therefore final state pressure of the system (from interpolation) is 8.954 [MPa] and internal energy of saturated vapour is 2558.35 [kJ/kg]\n",
+ "U_2 = m*2558.35;\t\t\t#[kJ] - Final total internal energy\n",
+ "del_Ut = U_2 - U_1;\t\t\t#[kJ] \n",
+ "\t\t\t#we have, del_U = Q - W\n",
+ "\t\t\t#Here work done is zero because volume is rigid.\n",
+ "Q = del_Ut;\t\t\t#[kJ]\n",
+ "Q = del_Ut*10**(-3);\t\t\t#[MJ]\n",
+ "\n",
+ "# Results\n",
+ "print \" The amount of heat to be added is %f MJ\"%( Q);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The amount of heat to be added is 102.663530 MJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.3 Page number - 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "M_vap_sat = 0.22;\t\t\t#[kg] - mass of saturated vapour\n",
+ "M_liq_sat = 1.78;\t\t\t#[kg] - mass of saturated liquid\n",
+ "P = 700;\t\t\t#[kPa] - Pressure\n",
+ "\n",
+ "#At P=700 kPa,the systen is saturated,from steam table as reported in the book\n",
+ "T_sat1 = 164.97;\t\t\t#[C]\n",
+ "V_liq_1 = 0.001108;\t\t\t#[m**(3)/kg] \n",
+ "V_vap_1 = 0.2729;\t\t\t#[m**(3)/kg]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Vt_1 = V_liq_1*M_liq_sat + V_vap_1*M_vap_sat;\t\t\t#[m**(3)] - total volume\n",
+ "\n",
+ "\t\t\t#At final state,P = 8 MPa\n",
+ "T_sat2 = 295.06;\t\t\t#[C]\n",
+ "V_liq_2 = 0.001384;\t\t\t#[m**(3)/kg] \n",
+ "V_vap_2=0.02352;\t\t\t#[m**(3)/kg]\n",
+ "Vt_2 = Vt_1;\t\t\t# Since the volume is rigid.\n",
+ "\t\t\t# Since the volume of 2 kg of vapour is 0.062 [m**(3)]\n",
+ "V = Vt_2/2;\t\t\t#[m**(3)/kg] - specific volume\n",
+ "\n",
+ "\t\t\t# (a)\n",
+ "\t\t\t# From steam table at 8 [MPa]and 350 [C],V=0.02995[m**(3)/kg]; \n",
+ "V_1 = 0.02995;\t\t\t#[m**(3)/kg]\n",
+ "\t\t\t# And at 8 [MPa]and 400 [C],\n",
+ "V_2 = 0.03432;\t\t\t#[m**(3)/kg]\n",
+ "\t\t\t# By interpolation,\n",
+ "T = ((V-V_1)/(V_2 - V_1))*(400-350)+350;\n",
+ "print \" a).The final temperature is %f c\"%(T);\n",
+ "\n",
+ "\t\t\t# (b)\n",
+ "\t\t\t# From steam table \n",
+ "U_1 = 2747.7;\t\t\t#[kJ/kg]\n",
+ "H_1 = 2987.3;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# And at 8 [MPa]and 400 C,\n",
+ "U_2 = 2863.8;\t\t\t#[kJ/kg]\n",
+ "H_2 = 3138.3;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# Therefore at T = 362.01 C\n",
+ "U = U_1+((U_2 - U_1)/(400 - 350))*(T - 350);\n",
+ "print \" b).The internal energy is %f kJ/kg\"%(U);\n",
+ "\n",
+ "\t\t\t#(c)\n",
+ "H = H_1+((H_2 - H_1)/(400 - 350))*(T - 350);\n",
+ "print \" b).The enthalpy is %f kJ/kg\"%(H);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The final temperature is 362.072311 c\n",
+ " b).The internal energy is 2775.731907 kJ/kg\n",
+ " b).The enthalpy is 3023.758380 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.4 Page number - 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "T = 300;\t\t\t#[K] - Temperature\n",
+ "P1 = 1;\t\t\t#[bar] - Initial pressure\n",
+ "P1 = P1*10**(5);\t\t\t#[N/m**(2)]\n",
+ "P2 = 8;\t\t\t#[bar] - Final pressure\n",
+ "P2 = P2*10**(5);\t\t\t#[N/m**(2)]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "Tc = 126.2;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 34;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5);\t\t\t#[N/m**(2)]\n",
+ "w = 0.038;\t\t\t# Acentric factor\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# w = integral(Pdv)\n",
+ "\t\t\t# Z = 1 + (B/V)\n",
+ "\t\t\t# (P*V)/(R*T) = 1 + (B/V)\n",
+ "\t\t\t# P = (R*T)/V + (B*R*T)/V**(2)\n",
+ "\n",
+ "def f29(V): \n",
+ "\t return (R*T/V) + (B*R*T)/V**(2)\n",
+ "\n",
+ "\t\t\t# w = quad(f29,V1,V2)[0]\n",
+ "\n",
+ "\t\t\t# Under isothermal conditions,\n",
+ "\t\t\t# w = R*T*math.log(V2/V1) - B*R*T*((1/V2) - (1/V1));\n",
+ "\n",
+ "Tr = T/Tc;\n",
+ "B_0 = 0.083 - (0.422/(Tr)**(1.6));\n",
+ "B_1 = 0.139 - (0.172/(Tr)**(4.2));\n",
+ "B = ((B_0+(w*B_1))*(R*Tc))/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t# Now we have to calculate molar volume i.e V1 and V2 at given conditions\n",
+ "\t\t\t# At state 1,\n",
+ "def f(V): \n",
+ "\t return V**(2)-(R*T/P1)*V-(B*R*T)/P1\n",
+ "V_1 = fsolve(f,-1)\n",
+ "V_2 = fsolve(f,1)\n",
+ "\t\t\t# We will take root near to (R*T)/P, i.e V_2\n",
+ "V1 = V_2;\n",
+ "\n",
+ "\t\t\t# At state 2,\n",
+ "def f1(V): \n",
+ "\t return V**(2)-(R*T/P2)*V-(B*R*T)/P2\n",
+ "V_3=fsolve(f1,-1)\n",
+ "V_4=fsolve(f1,1)\n",
+ "V2 = V_4;\n",
+ "\t\t\t# The work done is thus,\n",
+ "w = R*T*math.log(V2/V1) - B*R*T*((1/V2) - (1/V1));\t\t\t#[J]\n",
+ "w = w*10**(-3);\t\t\t#[kJ]\n",
+ "\n",
+ "print \" The work done is %f kJ/mol\"%(w);\n",
+ "print \" Negative sign indicates that work is done on the gas\";\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The work done is -5.186547 kJ/mol\n",
+ " Negative sign indicates that work is done on the gas\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.5 Page number - 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "\n",
+ "T = 300;\t\t\t#[K] - Temperature\n",
+ "P1 = 1;\t\t\t#[bar] - Initial pressure\n",
+ "P1 = P1*10**(5);\t\t\t#[N/m**(2)]\n",
+ "P2 = 8;\t\t\t#[bar] - Final pressure\n",
+ "P2 = P2*10**(5);\t\t\t#[N/m**(2)]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "y1 = 0.21;\t\t\t# Mole fraction of component 1 (oxygen)\n",
+ "y2 = 0.79;\t\t\t# Mole fraction of component 1 (nitroen)\n",
+ "\n",
+ "# For component 1 (Oxygen)\n",
+ "Tc_1 = 154.6;\t\t\t#[K]\n",
+ "Pc_1 = 50.43*10**(5);\t\t\t#[N/m**(2)]\n",
+ "Vc_1 = 73.4;\t\t\t#[cm**(3)/mol]\n",
+ "Zc_1 = 0.288;\n",
+ "w_1 = 0.022;\n",
+ "\n",
+ "\t\t\t#For component 2 (Nitrogen)\n",
+ "Tc_2 = 126.2;\t\t\t#[K]\n",
+ "Pc_2 = 34*10**(5);\t\t\t#[N/m**(2)]\n",
+ "Vc_2 = 89.2;\t\t\t#[cm**(3)/mol]\n",
+ "Zc_2 = 0.289;\n",
+ "w_2 = 0.038;\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#For component 1\n",
+ "Tr_1 = T/Tc_1;\t\t\t#Reduced temperature\n",
+ "\t\t\t#At reduced temperature\n",
+ "B1_0 = 0.083 - (0.422/(Tr_1)**(1.6));\n",
+ "B1_1 = 0.139 - (0.172/(Tr_1)**(4.2));\n",
+ "\t\t\t# We know,(B*Pc)/(R*Tc) = B_0+(w*B_1)\n",
+ "B_11 = ((B1_0+(w_1*B1_1))*(R*Tc_1))/Pc_1;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t# Similarly for component 2\n",
+ "Tr_2 = T/Tc_2;\t\t\t#Reduced temperature\n",
+ "\t\t\t# At reduced temperature Tr_2,\n",
+ "B2_0 = 0.083 - (0.422/(Tr_2)**(1.6));\n",
+ "B2_1 = 0.139 - (0.172/(Tr_2)**(4.2));\n",
+ "B_22 = ((B2_0 + (w_2*B2_1))*(R*Tc_2))/Pc_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t#For cross coeffcient\n",
+ "Tc_12 = (Tc_1*Tc_2)**(1/2);\t\t\t#[K]\n",
+ "w_12 = (w_1 + w_2)/2;\n",
+ "Zc_12 = (Zc_1+Zc_2)/2;\n",
+ "Vc_12 = (((Vc_1)**(1/3)+(Vc_2)**(1/3))/2)**(3);\t\t\t#[cm**(3)/mol]\n",
+ "Vc_12 = Vc_12*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "Pc_12 = (Zc_12*R*Tc_12)/Vc_12;\t\t\t#[N/m**(2)]\n",
+ "\n",
+ "\t\t\t# Now we have,(B_12*Pc_12)/(R*Tc_12) = B_0 + (w_12*B_1)\n",
+ "\t\t\t# where B_0 and B_1 are to be evaluated at Tr_12\n",
+ "Tr_12 = T/Tc_12;\n",
+ "\t\t\t# At reduced temperature Tr_12\n",
+ "B_0 = 0.083 - (0.422/(Tr_12)**(1.6));\n",
+ "B_1 = 0.139 - (0.172/(Tr_12)**(4.2));\n",
+ "B_12 = ((B_0+(w_12*B_1))*R*Tc_12)/Pc_12;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t# For the mixture\n",
+ "B = y1**(2)*B_11 + 2*y1*y2*B_12+y2**(2)*B_22;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# Now we have to calculate molar volume i.eV1 and V2 at given conditions\n",
+ "\n",
+ "\t\t\t# At state 1,\n",
+ "def f(V): \n",
+ "\t return V**(2)-(R*T/P1)*V-(B*R*T)/P1\n",
+ "V_1=fsolve(f,-1)\n",
+ "V_2=fsolve(f,1)\n",
+ "\t\t\t# We will take root near to (R*T)/P, i.e V_2\n",
+ "V1 = V_2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t# At state 2,\n",
+ "def f1(V): \n",
+ "\t return V**(2)-(R*T/P2)*V-(B*R*T)/P2\n",
+ "V_3=fsolve(f1,-1)\n",
+ "V_4=fsolve(f1,1)\n",
+ "V2 = V_4;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\t\t\t# Work done per mole of air is given by, w=integral(Pdv)\n",
+ "\t\t\t# Z = 1 + (B/V)\n",
+ "\t\t\t# (P*V)/(R*T) = 1 +( B/V)\n",
+ "\t\t\t# P = (R*T)/V+(B*R*T)/V**(2)\n",
+ "\n",
+ "def f43(V): \n",
+ "\t return (R*T/V)+(B*R*T)/V**(2)\n",
+ "\n",
+ "\t\t\t# w = quad(f43,V1,V2)[0]\n",
+ "\n",
+ "\t\t\t# Under isothermal conditions,\n",
+ "w = R*T*math.log(V2/V1)-B*R*T*((1/V2)-(1/V1));\n",
+ "w = w*10**(-3);\t\t\t#[kJ/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" The work done is %f kJ/mol\"%(w);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The work done is -5.186545 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.6 Page number - 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 125+273.15;\t\t\t#[K] - Temperature\n",
+ "P1 = 1;\t\t\t#[bar] - Initial pressure\n",
+ "P1 = P1*10**(5);\t\t\t#[N/m**(2)]\n",
+ "P2 = 60;\t\t\t#[bar] - Final pressure\n",
+ "P2 = P2*10**(5);\t\t\t#[N/m**(2)]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "Tc = 416.3;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 66.80*10**(5);\t\t\t#[N/m**(2)] - Critical pressure\n",
+ "\n",
+ "\t\t\t# (1)\n",
+ "\t\t\t# Virial equation of state, Z = 1 + (B/V)+(C/V**(2))\n",
+ "\t\t\t# (P*V)/(R*T) = 1 + (B/V)+(C/V**(2))\n",
+ "\t\t\t# P = (R*T)/V+(B*R*T)/V**(2)+(C*R*T)/V**(3)\n",
+ "\t\t\t# w = integral(PdV)=R*T*math.log(V2/V1)-(B*R*T)*(1/V2-1/V1)-(C*R*T/2)*(1/V2**(2)-1/V1**(2))\n",
+ "\n",
+ "B = -207.5;\t\t\t#[cm**(3)/mol] - Second virial coefficient\n",
+ "B = -207.5*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "C = 18200;\t\t\t#[cm**(6)/mol**(2)] - Third virial coefficient\n",
+ "C = 18200*10**(-12);\t\t\t#[m**(6)/mol**(2)]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# We need to calculate molar volume at state 1 and 2,\n",
+ "\t\t\t# At state 1,P = P1,\n",
+ "\t\t\t# V**(3)-(R*T/P)*V**(2)-(B*R*T/P)*V-(C*R*T/P)=0\n",
+ "\t\t\t# Solving the cubic equation\n",
+ "def f1(V): \n",
+ "\t return V**(3)-(R*T/P1)*V**(2)-(B*R*T/P1)*V-(C*R*T/P1)\n",
+ "V_1=fsolve(f1,-1)\n",
+ "V_2=fsolve(f1,0)\n",
+ "V_3=fsolve(f1,10)\n",
+ "\t\t\t# The cubic equation has only 1 real root,other two roots are imaginary.\n",
+ "V1 = V_3;\n",
+ "\n",
+ "\t\t\t# Similarly at state 2,P=P2\n",
+ "\t\t\t# V**(3) - (R*T/P)*V**(2) - (B*R*T/P)*V - (C*R*T/P) = 0\n",
+ "\t\t\t# Solving the cubic equation\n",
+ "def f2(V): \n",
+ "\t return V**(3)-(R*T/P2)*V**(2)-(B*R*T/P2)*V-(C*R*T/P2)\n",
+ "V_4=fsolve(f2,-1)\n",
+ "V_5=fsolve(f2,0)\n",
+ "V_6=fsolve(f2,1)\n",
+ "V2 = V_6;\n",
+ "\t\t\t# Finally work done is given by,\n",
+ "w1 = R*T*math.log(V2/V1)-(B*R*T)*(1/V2-1/V1)-(C*R*T/2)*(1/V2**(2)-1/V1**(2));\t\t\t#[J/mol]\n",
+ "w1 = w1*10**(-3);\t\t\t#[kJ/mol]\n",
+ "print \" 1).The work done using given virial equation of state is %f kJ/mol\"%(w1);\n",
+ "\n",
+ "\t\t\t# (2)\n",
+ "\t\t\t# Virial equation of state, Z = 1+(B*P)/(R*T)+((C-B**(2))/(R*T)**(2))*P**(2)\n",
+ "\t\t\t# (P*V)/(R*T)= 1+(B*P)/(R*T)+((C-B**(2))/(R*T)**(2))*P**(2)\n",
+ "\t\t\t# V = (R*T)/P+B+((C-B**(2))/(R*T))*P\n",
+ "\t\t\t# Differentiating both sides by P and integrating we get,\n",
+ "\t\t\t# w = integral(PdV)=-(R*T)*math.log(P2/P1)+((C-B**(2))/(2*R*T))*(P2**(2)-P1**(2))\n",
+ "w2 = -(R*T)*math.log(P2/P1) + ((C-B**(2))/(2*R*T))*(P2**(2)-P1**(2));\t\t\t#[J/mol]\n",
+ "w2 = w2*10**(-3);\t\t\t#[kJ/mol]\n",
+ "print \" 2).The work done using given virial equation of state is %f kJ/mol\"%(w2);\n",
+ "\n",
+ "\t\t\t# (3)\n",
+ "\t\t\t# Van der Walls equation of state is given by,\n",
+ "a = (27*(R**(2))*(Tc**(2)))/(64*Pc);\t\t\t#[Pa*m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# P = ((R*T)/(V-b))-a/(V**(2));\t\t\t#[N/m**(2)]\n",
+ "\t\t\t# w = integral(PdV)=R*T*math.log((V2-b)/(V1-a))+a*(1/V2-1/V1)\n",
+ "\t\t\t# The cubic form of van der Walls equation of state is given by,\n",
+ "\t\t\t# V**(3) - (b+(R*T)/P)*V**(2) + (a/P)*V - (a*b)/P = 0\n",
+ "\t\t\t# Solving the cubic equation for P=P1\n",
+ "def f3(V): \n",
+ "\t return V**(3)-(b+(R*T)/P1)*V**(2)+(a/P1)*V-(a*b)/P1\n",
+ "V2_1=fsolve(f3,1)\n",
+ "V2_2=fsolve(f3,10)\n",
+ "V2_3=fsolve(f3,100)\n",
+ "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root (V2_3).\n",
+ "\n",
+ "\t\t\t# Similarly at state 2,for P=P2,\n",
+ "def f4(V): \n",
+ "\t return V**(3)-(b+(R*T)/P2)*V**(2)+(a/P2)*V-(a*b)/P2\n",
+ "V2_4=fsolve(f4,1)\n",
+ "V2_5=fsolve(f4,10)\n",
+ "V2_6=fsolve(f4,100)\n",
+ "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root (V2_6).\n",
+ "\t\t\t# Finally work done is given by\n",
+ "w3 = R*T*math.log((V2_6-b)/(V2_3-b))+a*(1/V2_6-1/V2_3);\t\t\t#[J/mol]\n",
+ "w3 = w3*10**(-3);\t\t\t#[kJ/mol]\n",
+ "print \" 3).The work done using van der Walls equation of state is %f kJ/mol\"%(w3);\n",
+ "\n",
+ "\t\t\t# (4)\n",
+ "\t\t\t# Redlich Kwong equation of state,\n",
+ "a_1 = (0.42748*(R**(2))*(Tc**(2.5)))/Pc;\t\t\t#[Pa*m**(6)*K**(1/2)/mol]\n",
+ "b_1 = (0.08664*R*Tc)/Pc;\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# P = ((R*T)/(V-b_1))-(a_1/(T**(1/2)*V*(V+b_1)));\t\t\t#[N/m**(2)]\n",
+ "\t\t\t# Work done is given by\n",
+ "\n",
+ "def f4(V): \n",
+ "\t return (V2-b)/(V1-b)-a/T**(1./2)*integrate(1/V*(V+b))\n",
+ "\n",
+ "\t\t\t# w = R*T*math.log((V2-b)/(V1-b))-a/T**(1/2)* quad(f4,V1,V2)[0]\n",
+ "\n",
+ "\t\t\t# Using the factorization 1/(V*(V+b))=(1/b)*((1/V)-(1/V+b)),we get\n",
+ "\t\t\t# w = R*T*math.log((V2-b)/(V1-b))-(a/(b*T**(1/2)))*(math.log(V2/V1)-math.log((V2+b)/(V1+b))\n",
+ "\t\t\t# Now we have calculate V1 and V2,\n",
+ "\t\t\t# The cubic form of Redlich Kwong equation of state is given by,\n",
+ "\t\t\t# V**(3) - ((R*T)/P)*V**(2) - ((b_1**(2)) + ((b_1*R*T)/P) - (a/(T**(1/2)*P))*V - (a*b)/(T**(1/2)*P) = 0\n",
+ "\t\t\t# Solving the cubic equation at state 1,\n",
+ "def f5(V): \n",
+ "\t return V**(3)-((R*T)/P1)*V**(2)-((b_1**(2))+((b_1*R*T)/P1)-(a_1/(T**(1./2)*P1)))*V-(a_1*b_1)/(T**(1./2)*P1)\n",
+ "V3_1=fsolve(f5,1)\n",
+ "V3_2=fsolve(f5,10)\n",
+ "V3_3=fsolve(f5,100)\n",
+ "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root (V3_3).\n",
+ "\n",
+ "\t\t\t# Similarly at state 2,for P = P2,\n",
+ "def f6(V): \n",
+ "\t return V**(3)-((R*T)/P2)*V**(2)-((b_1**(2))+((b_1*R*T)/P2)-(a_1/(T**(1./2)*P2)))*V-(a_1*b_1)/(T**(1./2)*P2)\n",
+ "V3_4=fsolve(f6,1)\n",
+ "V3_5=fsolve(f6,10)\n",
+ "V3_6=fsolve(f6,100)\n",
+ "\t\t\t# The above equation has 1 real and 2 imaginary roots. We consider only real root (V3_6).\n",
+ "\t\t\t# Finally work done is given by\n",
+ "w4 = R*T*math.log((V3_6-b_1)/(V3_3-b_1))-(a_1/(b_1*T**(1./2)))*(math.log(V3_6/V3_3)-math.log((V3_6+b_1)/(V3_3+b_1)));\t\t\t#[J/mol]\n",
+ "w4 = w4*10**(-3);\t\t\t#[kJ/mol]\n",
+ "print \" 3).The work done using Redlich Kwong equation of state is %f kJ/mol\"%(w4);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The work done using given virial equation of state is -13.848149 kJ/mol\n",
+ " 2).The work done using given virial equation of state is -13.688301 kJ/mol\n",
+ " 3).The work done using van der Walls equation of state is -14.802420 kJ/mol\n",
+ " 3).The work done using Redlich Kwong equation of state is -14.704965 kJ/mol\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
+ " improvement from the last five Jacobian evaluations.\n",
+ " warnings.warn(msg, RuntimeWarning)\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.8 Page number - 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 20 + 273.15;\t\t\t#[K] - Temperature\n",
+ "P_1 = 140.;\t\t\t#[kPa] - Initial pressure\n",
+ "P_1 = P_1*10.**(3);\t\t\t#[Pa]\n",
+ "P_2 = 560.;\t\t\t#[kPa] - Final pressure\n",
+ "P_2 = P_2*10.**(3);\t\t\t#[Pa]\n",
+ "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# Cp_0 = 1.648+4.124*10**(-2)*T - 1.53*10**(-5)*T**(2) + 1.74*10**(-9)*T**(3)\n",
+ "\t\t\t# Using adiabatic compression, P*V**(Y)=constant. For ideal gases\n",
+ "\t\t\t# P*(R*T/P)**(Y) = constant\n",
+ "\t\t\t# P**(1-Y)*T**(Y) = constant or,P1**(1-Y)*T1**(Y)=P2**(1-Y)*T2**(Y)\n",
+ "\t\t\t# Now,at state 1, i.e at T=20[C]\n",
+ "Cp_1 = 1.648+4.124*10**(-2)*T-1.53*10**(-5)*T**(2)+1.74*10**(-9)*T**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant pressure\n",
+ "Cv_1 = Cp_1 - R;\t\t\t#[cal/mol*K] - Heat capacity at constant volume\n",
+ "Y1 = Cp_1/Cv_1;\t\t\t# Ratio of heat capacities\n",
+ "\n",
+ "\t\t\t# Now calculatung the temperature at state 2 (T2)\n",
+ "\t\t\t# (T2/T1)=(P1/P2)**((1-Y1)/Y1)\n",
+ "T_1 = T;\n",
+ "T_2 = ((P_1/P_2)**((1-Y1)/Y1))*T_1;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# Now calculating the mean temperature\n",
+ "T_mean = (T_1 + T_2)/2;\t\t\t#[K]\n",
+ "\t\t\t# At mean temperature\n",
+ "Cp_2 = 1.648+4.124*10**(-2)*T_mean - 1.53*10**(-5)*T_mean**(2) + 1.74*10**(-9)*T_mean**(3);\t\t\t#[cal/mol*K] - Heat capacity at constant pressure\n",
+ "Cv_2 = Cp_2 - R;\t\t\t#[cal/mol*K] - Heat capacity at constant volume\n",
+ "Y2 = Cp_2/Cv_2;\n",
+ "\n",
+ "\t\t\t# Calculating exit temperature\n",
+ "\t\t\t# Again using the realation,(T2/T1)=(P1/P2)**((1-Y1)/Y1)\n",
+ "T_exit = ((P_1/P_2)**((1-Y2)/Y2))*T_1;\t\t\t#[K]\n",
+ "\t\t\t# Since value of mean temperature has not changed much the molar heat capacity ratio can be assumed to be same.Therefore\n",
+ "\t\t\t# w = -delta(U)=Cv_0*(T2-T1)\n",
+ "w = Cv_2*(T_1 - T_exit);\t\t\t#[cal/mol]\n",
+ "w = w*4.184;\t\t\t#[J/mol]\n",
+ "\n",
+ "# Results\n",
+ "print \" The work done for adiabatic compression is %f J/mol\"%(w);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The work done for adiabatic compression is -3198.427072 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.9 Page number - 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "m_ice = 1000;\t\t\t#[g] - Mass of ice\n",
+ "m_water = 1000;\t\t\t#[g] - Mass of water\n",
+ "T_ice = 273.15;\t\t\t#[K] - Temperature of ice\n",
+ "T_water = 373.15;\t\t\t#[K] - Temperature of water\n",
+ "L = 79.71;\t\t\t#[cal/g] - Latent heat of melting of ice.\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "Cp_1 = 1;\t\t\t#[cal/g-K] - Heat capacity at constant pressure\n",
+ "\t\t\t# Let the final temperature be T\n",
+ "\t\t\t# We assume that all of the ice melts.Energy taken up by ice is\n",
+ "\t\t\t# E1 = L*m_ice + m_ice*Cp_1*(T - T_ice)\n",
+ "\t\t\t# Energy given by hot water is,\n",
+ "\t\t\t# E2 = m_water*Cp_1*(T_water - T)\n",
+ "\t\t\t# No heat exchange with surrounding.Solving for T\n",
+ "T_1 = (m_ice*Cp_1*T_ice + m_water*Cp_1*T_water - L*m_ice)/(m_ice*Cp_1 + m_water*Cp_1);\t\t\t#[K]\n",
+ "T_1 = T_1 - 273.15;\t\t\t#[C]\n",
+ "\n",
+ "print \" 1).The final temperature taking Cp_water = 1 cal/g-K) is %f C\"%(T_1);\n",
+ "\t\t\t#Since the final temperature is greater than 273.15 K,so our assumption that all of ice melts is correct\n",
+ "\n",
+ "\t\t\t# (2)\n",
+ "\t\t\t# Cp_2 = 1.00874-0.7067*10**(-3)*T+15.93*10**(-6)*T**(2)-83.8*10**(-9)*T**(3);\n",
+ "\n",
+ "def f15(T): \n",
+ "\t return Cp_2\n",
+ "\n",
+ "\t\t\t# From energy balance,we get L*m_ice + m_ice* quad(f15,0,T) + m_water*integrate(Cp_2)[0]\n",
+ "\n",
+ "\t\t\t# On putting the values and then simplifying we get\n",
+ "\t\t\t# 2.01748*T - 0.0007067*T**(2) + 1.062*10**(-5)*T**(3) - 4.19*10**(-8)*T**(4) - 20.8455 = 0\n",
+ "\t\t\t# Solving the above equation we get\n",
+ "def f1(T): \n",
+ "\t return 2.01748*T - 0.0007067*T**(2) + 1.062*10**(-5)*T**(3) - 4.19*10**(-8)*T**(4) - 20.8455\n",
+ "T_0 = fsolve(f1,1)\n",
+ "print \" 2).The final temperature using specific heat capacity equation is %f C\"%(T_0);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The final temperature taking Cp_water = 1 cal/g-K) is 10.145000 C\n",
+ " 2).The final temperature using specific heat capacity equation is 10.364452 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.11 Page number - 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "n = 1.5;\t\t\t# - ratio of heat capacities\n",
+ "T_1 = 500.;\t\t\t#[K] - Initial temperature\n",
+ "T_2 = 1000.;\t\t\t#[K] - Final temperature\n",
+ "P_1 = 1.;\t\t\t#[bar] - Initial pressure\n",
+ "P_1 = P_1*10.**(5);\t\t\t#[Pa]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# The compression path is given by, P*V**(1.5) = constant\n",
+ "\t\t\t# P*(R*T/P)**(1.5) = constant\n",
+ "\t\t\t# P1**(-0.5)*T1**(1.5) = P2**(-0.5)*T2**(1.5)\n",
+ "P_2 = P_1*(T_1/T_2)**(-3);\t\t\t#[Pa]\n",
+ "P_2_final = P_2*10**(-5);\t\t\t#[bar] - Final pressure in bar\n",
+ "print \" The final pressure is %f bar\"%(P_2_final);\n",
+ "\n",
+ "\t\t\t# From first law q - w = delta(U). \n",
+ "\t\t\t# First w and delta(U) are calculated and thereafter heat exchange is determined.\n",
+ "V_1 = R*T_1/P_1;\t\t\t#[m**(3)/mol] - Initial volume\n",
+ "V_2 = R*T_2/P_2;\t\t\t#[m**(3)/mol] - Final volume\n",
+ "w = ((P_1*V_1)/(n - 1))*(1 - (P_2/P_1)**(1 - 1/n));\t\t\t#[J/mol] - work done\n",
+ "\n",
+ "\t\t\t# Mean temperature is given by,\n",
+ "T_mean = (T_1 + T_2)/2;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t#Now, heat capacity at T_mean is given by,\n",
+ "Cp_0 = R*(3.3 + 0.63*10**(-3)*T_mean);\t\t\t#[J/mol*K]\n",
+ "Cv_0 = Cp_0 - R;\t\t\t#[J/mol*K]\n",
+ "\t\t\t#Therefore delta(U) is given by\n",
+ "del_U = Cv_0*(T_2 - T_1);\t\t\t#[J/mol] - Change in internal energy\n",
+ "q = w + del_U;\t\t\t#[J/mol] - heat change\n",
+ "print \" The amount of heat supplied to the system is %f J/mol\"%(q);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The final pressure is 8.000000 bar\n",
+ " The amount of heat supplied to the system is 3211.282500 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.12 Page number - 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 150*10**(3);\t\t\t#[Pa] - Initial pressure\n",
+ "V_1 = 0.001;\t\t\t#[m**(3)] - Initial volume\n",
+ "P_2 = 1000*10**(3);\t\t\t#[Pa] - Final pressure\n",
+ "V_2 = 0.003;\t\t\t#[m**(3)] - Final volume\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# At x = 0, Vt(total volume) = 0.001 m**(3), therefore x = (V_t - V_1)/A; where A is area of cross section and x is length\n",
+ "\t\t\t# Force exerted b sprig is given by, F = Ps*A = k*x = k*(V_t - V_1)/A\n",
+ "\t\t\t# Ps = (k/A**(2))*(V_t - V_1)\n",
+ "\t\t\t# Total pressure = Initial pressre + Pressre due to spring\n",
+ "\t\t\t# P = P_1 + (k/A**(2))*(V_t - V_1)\n",
+ "\t\t\t# Let (k/A**(2)) = t (say)\n",
+ "\t\t\t# At state 2, i.e at P2 and V_t = V_2.\n",
+ "def f(t): \n",
+ "\t return P_2-P_1 - t*(V_2-V_1)\n",
+ "t = fsolve(f,1000)\n",
+ "\t\t\t# Therefore,pressure is related to total volume as P = P_1-t*(V_t - V_1)\n",
+ "\n",
+ "\t\t\t# (a)\n",
+ "\t\t\t#slope = (k/A**(2))\n",
+ "print \" a).The slope of the line on P-Vt diagram is %e N/m**5)\"%(t);\n",
+ "\n",
+ "\t\t\t# (b)\n",
+ "\t\t\t# Work done by the gas is given by w=integral(PdVt)\n",
+ "\n",
+ "def f30(V_t): \n",
+ "\t return P_1+t*(V_t-V_1)\n",
+ "\n",
+ "w = quad(f30,V_1,V_2)[0]\n",
+ "\n",
+ "w = w*10**(-3);\t\t\t#[kJ]\n",
+ "print \" b).The work done by gas is %f kJ\"%(w);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The slope of the line on P-Vt diagram is 4.250000e+08 N/m**5)\n",
+ " b).The work done by gas is 1.150000 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.13 Page number - 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "V = 36;\t\t\t#[L] - Vol of gas on each side\n",
+ "P_1 = 1;\t\t\t#[atm] - pressure on left side of the piston\n",
+ "P_1 = P_1*101325;\t\t\t#[Pa]\n",
+ "T = 273.15;\t\t\t#[K]\n",
+ "P_2 = 3.375;\t\t\t#[atm] - Pressure on right side of the piston\n",
+ "P_2 = P_2*101325;\t\t\t#[Pa]\n",
+ "Y = 1.44;\t\t\t# Ratio of heat capacities\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constnt\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# (a)\n",
+ "\t\t\t# For total system, del(U_total) = Q. \n",
+ "\t\t\t\n",
+ "\t\t\t# T_2/T_1 = (P_2/P_1)**((Y - 1)/Y)\n",
+ "T_right = T*(P_2/P_1)**((Y - 1)/Y);\t\t\t#[K]\n",
+ "\n",
+ "Cv_0 = R/(Y-1);\t\t\t#[J/mol*K] - Heat capacity at constant volume.\n",
+ "\t\t\t# Now work done on the gas on right hand side is given by\n",
+ "\t\t\t# W = (P_1*V_1 - P_2*V_2)/(Y - 1) = R*(T_2 - T_1)/(Y - 1) = Cv_0*(T_1 - T_2)\n",
+ "W_left = Cv_0*(T - T_right);\t\t\t#[J/mol]\n",
+ "\t\t\t# Negative sign for the work done on LHS gas implies work is done on the gas\n",
+ "\n",
+ "\t\t\t# For right hand side of the gas\n",
+ "\t\t\t# P*Vt = n*R*T\n",
+ "n = P_1*(V*10**(-3))/(R*T);\t\t\t# number of moles\n",
+ "W_right = (-W_left)*n;\t\t\t#[J] - We used negative sign for 'W_left' because it is negative in magnitude.\n",
+ "W_right = W_right/1000;\t\t\t#[kJ]\n",
+ "print \" a).Total work done on gas on the right hand side is %f kJ\"%(W_right);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "print \" b).The final temperature of the gas on right side is %f K\"%(T_right);\n",
+ "\n",
+ "\t\t\t# (c)\n",
+ " # We have (P_left*V_left)/T_left = (P_right*V_right)/T_right.\n",
+ "\t\t\t# Since P_left = P_right, (V_left/T_left) = (V_right/T-right) and also P*V**(Y) = constant.\n",
+ "V_right = V*(P_1/P_2)**(1/Y);\t\t\t#[L] - The total volume on right side \n",
+ "\n",
+ "\t\t\t# The total volume on right side can also be calculated using P2*V2 = n*R*T2.\n",
+ "\t\t\t# Since total volume = 72 [L], therefore volume of left side is\n",
+ "V_left = 2*V - V_right;\t\t\t#[L]\n",
+ "T_left = T_right*(V_left/V_right);\n",
+ "print \" c).Final temperature of the gas on the left side is %f K\"%(T_left);\n",
+ "\n",
+ "\t\t\t#(d)\n",
+ "\t\t\t#The first law applied to the total system (left side and right side) gives.\n",
+ "\t\t\t#Q - W = del(U_left) + del(U_right)\n",
+ "\t\t\t#There is no net work done by the total system as the cylinder is closed at both ends.\n",
+ "Q = n*Cv_0*(T_left-T) + n*Cv_0*(T_right-T);\t\t\t#[J]\n",
+ "Q = Q/1000;\t\t\t#[kJ]\n",
+ "print \" d).Amount of heat added to the gas on the left side is %f kJ\"%(Q);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).Total work done on gas on the right hand side is 3.731958 kJ\n",
+ " b).The final temperature of the gas on right side is 396.112176 K\n",
+ " c).Final temperature of the gas on the left side is 1447.650324 K\n",
+ " d).Amount of heat added to the gas on the left side is 39.378580 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.14 Page number - 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_2 = 0.2;\t\t\t#[bar]\n",
+ "P_2 = P_2*10**(5);\t\t\t#[Pa]\n",
+ "int_dia_2 = 2.4*10**(-2);\t\t\t#[m] - internal diameter at state 2.\n",
+ "Q = 5*10**(-3);\t\t\t#[cubic metre/s] - Flow rate at point 2.\n",
+ "den = 1000;\t\t\t#[kg/cubic metre] - density\n",
+ "delta_z = 1;\t\t\t#[m] - Difference in height\n",
+ "g = 9.81;\t\t\t#[m/s**(2)] - Acceleration due to gravity\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# (1)\n",
+ "\n",
+ "\t\t\t# (delta(P)/den) = (P2-P1)/den = P2/den\n",
+ "Vel_2 = Q/(3.14*(int_dia_2/2)**(2));\t\t\t#[m/s] - Velocity of water at state 2.\n",
+ "\t\t\t# Velocity at state 1 i negligible as compared to velocity at state 2,because the diameter of reservoir is very large as compared to diameter of pipe at state 2\n",
+ "\n",
+ "\t\t\t# From bernaulli equation we get,\n",
+ "\t\t\t# -w = (delta(P)/den) + delta(v**(2))/2 + g*delta_z\n",
+ "w = -((P_2/den )+ (Vel_2**(2)/2) + (g*delta_z));\t\t\t#[J/kg]\n",
+ "\t\t\t# w multiplied by m = (den*Q), will give the fluid power.\n",
+ "m = den*Q;\t\t\t#[kg/s]\n",
+ "W_net = m*w;\t\t\t#[Watt]\n",
+ "print \" 1).The fluid power is %f Watt\"%(W_net);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# Total discharge head developed by the pump is given by\n",
+ "\t\t\t# h = (delta(P)/den*g) + (Vel_2**(2)/2*g) + delta_z\n",
+ "h = (P_2/(den*g)) + (Vel_2**(2)/(2*g)) + delta_z;\t\t\t#[m]\n",
+ "print \" 2).Total discharge head developed by the pump is given by h = %f m\"%(h);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The fluid power is -454.750210 Watt\n",
+ " 2).Total discharge head developed by the pump is given by h = 9.271156 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.15 Page number - 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 1000.;\t\t\t#[K] - Temperature at entry\n",
+ "P_1 = 0.6;\t\t\t#[MPa] - Pressure at entry\n",
+ "P_2 = 0.2;\t\t\t#[MPa] - Exit pressure\n",
+ "Vel_1 = 50.;\t\t\t#[m/s] - Entry velocity \n",
+ "Y = 1.4;\t\t\t# Ratio of heat capacities\n",
+ "Mol_wt = 28.;\t\t\t#[g/mol] - Molecular weight of air\n",
+ "Cp = 29.099;\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n",
+ "Cp = (Cp/Mol_wt)*1000;\t\t\t#[J/kg-K]\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# We know that for a flow process \n",
+ "\t\t\t# delta_H + delta_V**(2)/2 + delta_(g*z) = q - w\n",
+ "\t\t\t# delta_H + delta_V**(2)/2 = 0\n",
+ "\n",
+ "\t\t\t# For a reversible process P*V**(Y) = constant and thus (T_2/T_1) = (P_2/P_1)**((Y-1)/Y)\n",
+ "T_2 = T_1*(P_2/P_1)**((Y-1)/Y);\t\t\t#[K] - Exit temperature\n",
+ "\n",
+ "\t\t\t# delta_H + delta_V**(2)/2 = 0\n",
+ "\t\t\t# Vel_2**(2)/2 - Vel_1**(2)/2 - (H_1 - H_2)= 0\n",
+ "\t\t\t# Vel_2**(2)/2 - Vel_1**(2)/2 - Cp*(T_1 - T_2) = 0\n",
+ "Vel_2_square = 2*(Vel_1**(2.)/2 - Cp*(T_2 - T_1));\t\t\t#[m**(2)/s**(2)]\n",
+ "Vel_2 = (Vel_2_square)**(1./2);\t\t\t#[m/s]\n",
+ "\n",
+ "# Results\n",
+ "print \" The discharge velocity is %f m/s\"%(Vel_2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The discharge velocity is 749.965327 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.16 Page number - 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_entry = 10;\t\t\t#[bar] - Pressure at entry\n",
+ "V_entry = 200;\t\t\t#[m/s] - Velocity at entry\n",
+ "P_exit = 1;\t\t\t#[bar] - Vressure at exit\n",
+ "V_exit = 800;\t\t\t#[m/s] - Velocity at exit\n",
+ "g = 9.81;\t\t\t#[m/s**(2)] - Acceleration due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#Heat balance gives\n",
+ "\t\t\t# delta_H + (delta_V**(2))/2 + g*delta_z = q - w\n",
+ "\t\t\t#delta_H = q - w - (delta_V**(2))/2 \n",
+ "\t\t\t#From nozzle no work is extracted,therefore\n",
+ "delta_H = -(V_exit**(2)- V_entry**(2))/2;\t\t\t#[J/kg]\n",
+ "delta_H = delta_H*10**(-3);\t\t\t#[kJ/kg]\n",
+ "\n",
+ "# Results\n",
+ "print \" The change in enthalpy per kg of steam is %f kJ/kg\"%(delta_H);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The change in enthalpy per kg of steam is -300.000000 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.17 Page number - 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 280;\t\t\t#[K] - Temperature at entry\n",
+ "P_1 = 100;\t\t\t#[kPa] - Pressure at entry\n",
+ "T_2 = 400;\t\t\t#[K] - Temperature at exit\n",
+ "P_2 = 600;\t\t\t#[kPa] - Pressure at exit\n",
+ "m = 0.02;\t\t\t#[kg/s] - Mass flow rate\n",
+ "m = m*10**(3);\t\t\t#[g/s]\n",
+ "heat_loss = 16;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#Cp_0 = 28.11 + 0.1967*10**(-2)*T + 0.4802*10**(-5)*T**(2) - 1.966*10**(-9)*T**(3)\n",
+ "\t\t\t#delta_H = q - w (neglecting kinetic and potential changes)\n",
+ "\t\t\t#delta_H = integral(Cp_0*dT)\n",
+ "\n",
+ "def f22(T): \n",
+ "\t return 28.11 + 0.1967*10**(-2)*T + 0.4802*10**(-5)*T**(2) - 1.966*10**(-9)*T**(3)\n",
+ "\n",
+ "delta_H = quad(f22,T_1,T_2)[0]\n",
+ "\n",
+ "print \" Change in enthalpy is %f J/mol\"%(delta_H);\n",
+ "\n",
+ "\t\t\t#Molecular weight of air(21 vol% O2 and 79 vol% N2)=(0.21*32)+(0.79*28)= 28.84 g/mol\n",
+ "Mol_wt = 28.84;\t\t\t#[g/mol]\n",
+ "q = - (heat_loss*Mol_wt);\t\t\t#[J/mol]\n",
+ "w = q - delta_H;\t\t\t#[J/mol]\n",
+ "print \" The work done per mole of air is %f J/mol\"%(w);\n",
+ "\t\t\t#the negative sign implies that work is done on the compressor.\n",
+ "\n",
+ "n = m/Mol_wt;\t\t\t#[mol/s] - Mole flow rate\n",
+ "W_net = delta_H*n;\t\t\t#[W]\n",
+ "W_net = -W_net*10**(-3);\t\t\t#[kW]\n",
+ "print \" And the necessary power input to the compressor is %f kW\"%(W_net);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Change in enthalpy is 3511.197066 J/mol\n",
+ " The work done per mole of air is -3972.637066 J/mol\n",
+ " And the necessary power input to the compressor is -2.434949 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.18 Page number - 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 300;\t\t\t#[K] - Temperature at entry\n",
+ "P_1 = 100;\t\t\t#[kPa] - Pressure at entry\n",
+ "P_2 = 900;\t\t\t#[kPa] - Pressure at exit\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# (a)\n",
+ "\t\t\t# Reversible adiabatic compression\n",
+ "Y = 1.4;\t\t\t#Ratio of specific heat capacities\n",
+ "\t\t\t# For ideal gas, P*V**(Y)= constant and it takes the form of (T_2/T_1) = (P_2/P_1)**((Y-1)/Y)\n",
+ "T_2 = T_1*(P_2/P_1)**((Y - 1)/Y);\t\t\t#[K]\n",
+ "\t\t\t# The work exchange for adiabatic process is given by\n",
+ "\t\t\t# W_adia = -delta_H = -Cp*(T2-T1) = Cp*(T1-T2) = ((Y*R)/(Y-1))*(T1-T2)\n",
+ "W_adia = ((Y*R)/(Y - 1))*(T_1 - T_2);\t\t\t#[J/mol] -work done\n",
+ "\t\t\t# Molecular weight of air(21 vol% O2 and 79 vol% N2)=(0.21*32)+(0.79*28)= 28.84 g/mol\n",
+ "Mol_wt = 28.84;\t\t\t#[g/mol]\n",
+ "W_adia = W_adia/Mol_wt;\t\t\t#[J/g]\n",
+ "print \" a).The compressor work done for reversible adiabatic compession is %f J/g\"%(W_adia);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "\t\t\t#Isothermal compression\n",
+ "\t\t\t#W_iso = -integral(V*dP) = -integral((R*T/P)*dP) = R*T*ln(P_2/P_1)\n",
+ "W_iso = -R*T_1*math.log(P_2/P_1);\t\t\t#[J/mol]\n",
+ "W_iso = W_iso/Mol_wt;\t\t\t#[J/g]\n",
+ "print \" b).The compressor work done for isothermal compession is %f J/g\"%(W_iso);\n",
+ "\t\t\t#Note that in isothermal compression between the same states work done is less as compared to reversible adiabatic compression.\n",
+ "\n",
+ "\t\t\t#(c)\n",
+ "\t\t\t#Ideal two-stage compression \n",
+ "n = 1.3;\t\t\t#Polytropic exponent.\n",
+ "\t\t\t#Minimum work done in two stage compression is given by\n",
+ "\t\t\t#W_comp = ((2*n*R*T_1)/(n-1))*[1-(P_x/P_1)**(n-1)/n]\n",
+ "\t\t\t#where for minimum work, (P_x/P_1) = (P_x/P_2), and thus\n",
+ "P_x = (P_1*P_2)**(1./2);\t\t\t#[kPa]\n",
+ "\t\t\t#therefore, work done is given by,\n",
+ "W_comp = ((2*n*R*T_1)/(n-1))*(1-(P_x/P_1)**((n-1)/n));\t\t\t#[J/mol]\n",
+ "W_comp = W_comp/Mol_wt;\t\t\t#[J/g]\n",
+ "print \" c).The compressor work done for ideal two-stage compession is %f J/g\"%(W_comp);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The compressor work done for reversible adiabatic compession is -264.386412 J/g\n",
+ " b).The compressor work done for isothermal compession is -190.024880 J/g\n",
+ " c).The compressor work done for ideal two-stage compession is -216.284501 J/g\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.19 Page number - 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 600;\t\t\t#[C] - Temperature at entry\n",
+ "P_1 = 15;\t\t\t#[MPa] - Pressure at entry\n",
+ "T_2 = 400;\t\t\t#[K] - Temperature at exit\n",
+ "P_2 = 100;\t\t\t#[kPa] - Pressure at exit\n",
+ "A_in = 0.045;\t\t\t#[metre square] - flow in area\n",
+ "A_out = 0.31;\t\t\t#[metre square] - flow out area\n",
+ "m = 30;\t\t\t#[kg/s] - mass flow rate.\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#At 15 MPa and 600 C,it has been reported in the book that the properties of steam are,\n",
+ "Vol_1 = 0.02491;\t\t\t#[m**(3)/kg] - Specific volume\n",
+ "H_1 = 3582.3;\t\t\t#[kJ/kg] - Enthalpy\n",
+ "\t\t\t# m = den*vel*A = (Vel*A)/Vol, substituting the values\n",
+ "vel_1 = (m*Vol_1)/A_in;\t\t\t#[m/s] - Velocity at point 1.\n",
+ "print \" The inlet velocity is %f m/s\"%(vel_1);\n",
+ "\n",
+ "\t\t\t#At 100 MPa (saturated vapour),it has been reported in the book that the properties of steam are, T_sat = 99.63 C, and\n",
+ "Vol_vap_2 = 1.6940;\t\t\t#[m**(3)/kg] - specific volume of saturated vapour.\n",
+ "H_vap_2 = 2675.5;\t\t\t#[kJ/kg] - Enthalpy os saturated vapour.\n",
+ "vel_2 = (m*Vol_vap_2)/A_out;\t\t\t#[m/s] - Velocity at point 2.\n",
+ "print \" The exit velocity is %f m/s\"%(vel_2);\n",
+ "\n",
+ "\t\t\t#From first law we get, q - w =delta_H + delta_V**(2)/2\n",
+ "\t\t\t#q = 0, therefore, -w = delta_H + delta_V**(2)/2\n",
+ "delta_H = H_vap_2 - H_1;\t\t\t#[kJ/kg] - change in enthalpy.\n",
+ "delta_V_square = (vel_2**(2) - vel_1**(2))/2;\t\t\t#[J/kg]\n",
+ "delta_V_square = delta_V_square*10**(-3);\t\t\t#[kJ/kg]\n",
+ "w = -(delta_H + delta_V_square);\t\t\t#[J/kg] \n",
+ "W_net = w*m;\t\t\t#[kW]\n",
+ "W_net = W_net*10**(-3);\t\t\t#[MW] - power produced.\n",
+ "print \" The power that can be produced by the turbine is %f MW\"%(W_net);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The inlet velocity is 16.606667 m/s\n",
+ " The exit velocity is 163.935484 m/s\n",
+ " The power that can be produced by the turbine is 26.805014 MW\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.20 Page number - 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n",
+ "Cp_0 = 2.5*R;\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n",
+ "Cv_0 = 1.5*R;\t\t\t#[J/mol-K] - Specific heat capacity at constant volume\n",
+ "T_L = 300;\t\t\t#[K] - Temperature at which port properties are constant.\n",
+ "\n",
+ "# Calculations\n",
+ "Y = Cp_0/Cv_0;\t\t\t# Ratio of heat capacities.\n",
+ "\t\t\t#From part(1) we obtained the relation,\n",
+ "\t\t\t# T_2 = 1/(((P_2-P_1)/(Y*T_L*P_2))+(P_1/(P_2*T_1)))\n",
+ "\t\t\t# Not that when P_2 >> P_1 ,T_2 approaches Y*T_L and thus\n",
+ "T_2 = Y*T_L;\t\t\t#[K]\n",
+ "\n",
+ "# Results\n",
+ "print \" b).The final temperature is %f K\"%(T_2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " b).The final temperature is 500.000000 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.21 Page number - 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 40 + 273.15;\t\t\t#[K] - Initial temperature.\n",
+ "P_1 = 1;\t\t\t#[bar] - Initial pressure.\n",
+ "P_1 = P_1*10**(5);\t\t\t#[Pa]\n",
+ "Vol_1 = 0.01;\t\t\t#[cubic metre] - Initial volume of the cylinder.\n",
+ "T_2 = 100 + 273.15;\t\t\t#[K] - Final temperature.\n",
+ "P_2 = 100;\t\t\t#[kPa] - Final pressure.\n",
+ "P_2 = P_2*10**(5);\t\t\t#[Pa]\n",
+ "Vol_2 = 0.02;\t\t\t#[cubic metre] - Final volume of the cylinder.\n",
+ "Cp = 1.005;\t\t\t#[J/g-K] - Specific heat capacity at constant pressure.\n",
+ "Cv = 0.718;\t\t\t#[J/g-K] - Specific heat capacity at constant volume.\n",
+ "Mol_wt = 28.84;\t\t\t#[g/mol] - Molecular weight of air.\n",
+ "R = 8.314;\t\t\t#[J/mol-K] - universal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "delta_Vol = Vol_2 - Vol_1;\t\t\t# [cubic metre] - Change in volume.\n",
+ "\t\t\t# Assuming ideal gas P*V = R*T\n",
+ "V_1 = (R*T_1)/P_1;\t\t\t# [m**(3)/mol] - Initial specific volume.\n",
+ "\t\t\t# Therefore,the total number of moles initially in the system is,\n",
+ "n_1 = (Vol_1/V_1);\t\t\t# [mol]\n",
+ "m_1 = n_1*Mol_wt;\t\t\t# [g] - Initial mass of the system.\n",
+ "Y = Cp/Cv;\t\t\t#Ratio of heat capacities\n",
+ "\n",
+ "\t\t\t# The energy balance equation is given by\n",
+ "\t\t\t# -P*delta_Vol + H_liq*(m_2 - m_1) = m_2*Cv*(P*V2)/R - m_1*Cv*T_1\n",
+ "\t\t\t# m_2*Cv*(P*V2)/R = (Cv*P_1*Vol_2)/R\n",
+ "\t\t\t# Cv/R = 1/(Y-1)\n",
+ "\t\t\t# Since pressure of the gas in system is assumed constant,therefore it remains at 1 bar and thus P = P_1,\n",
+ "H_liq = Cp*T_2;\t\t\t# [J/g] - Enthalpy of liquid\n",
+ "m_2 = (P_1*delta_Vol + ((P_1*Vol_2)/(Y-1)) + H_liq*m_1 - m_1*Cv*T_1)/H_liq;\t\t\t#[g]\n",
+ "\n",
+ "\t\t\t#The mass entering the assembly during the filling process is given by\n",
+ "m = m_2 - m_1;\t\t\t#[g]\n",
+ "n_2 = m_2/Mol_wt;\t\t\t#[mol] - Number of moles in the final state.\n",
+ "V_2 = Vol_2/n_2;\t\t\t#[m**(3)/mol] - Final specific volume.\n",
+ "\t\t\t# Therfore,final temperature is given by,\n",
+ "T_2 = (P_1*V_2)/R;\t\t\t#[K] - Final temperature.\n",
+ "\n",
+ "# Results\n",
+ "print \" The final equilibrium temperature is %f K\"%(T_2);\n",
+ "print \" The mass entering through the valve is %f g\"%(m);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The final equilibrium temperature is 339.343160 K\n",
+ " The mass entering through the valve is 9.367211 g\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example - 3.22 Page number - 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "V_total = 5;\t\t\t#[L] - Volume of pressure cooker.\n",
+ "V_total = V_total*10**(-3);\t\t\t#m**(3)\n",
+ "P_gauze = 15;\t\t\t#[psi] - Operating pressure (gauze)of pressure cooker.\n",
+ "P_gauze = (P_gauze/14.5)*10**(5);\t\t\t#[N/m**(2)]\n",
+ "P_atm = 0.966*10**(5);\t\t\t#[N/m**(2)] - Atmospheric pressure.\n",
+ "m_1 = 1;\t\t\t#[kg] - Initial mass.\n",
+ "t = 30*60;\t\t\t#[s] - Total time.\n",
+ "J = 500;\t\t\t#[W] - Rate of heat supply\n",
+ "\n",
+ "# Calculations\n",
+ "P_abs = P_gauze + P_atm;\t\t\t#[N/m**(2)] - Absolute pressure.\n",
+ "\t\t\t#The energy balance equqtion gives,\n",
+ "\t\t\t# Q = m_e*H_e +(m_2*U_2 - m_1*U_1), where 'm_e' is the mass exit from the system and 'H_e' is enthalpy at exit conditions.\n",
+ "\n",
+ "\t\t\t#It has been reported in the book that from steam table at P_abs,\n",
+ "T_sat = 120.23;\t\t\t#[K]- Saturated temperature\n",
+ "V_liq = 0.001061;\t\t\t#[m**(3)/kg] - specific volume of liquid.\n",
+ "V_vap = 0.8857;\t\t\t#[m**(3)/kg] - specific volume of vapour.\n",
+ "U_liq = 504.49;\t\t\t#[kJ/kg] - specific internal energy of liquid.\n",
+ "U_vap = 2529.5;\t\t\t#[kJ/kg] - specific internal energy of vapour.\n",
+ "H_liq = 504.70;\t\t\t#[kJ/kg] - specific enthalpy of liquid.\n",
+ "H_vap = 2706.7;\t\t\t#[kJ/kg] - specific internal energy of vapour.\n",
+ "\n",
+ "\t\t\t#We know that total volume occupied by 1 kg of fluid is \n",
+ "\t\t\t#V_total = (1-x)*V_liq + x*V_vap\n",
+ "x1 = (V_liq - V_total)/(V_liq - V_vap);\t\t\t#[g]\n",
+ "\n",
+ "\t\t\t#Internal energy at this state is\n",
+ "U_1 = (1-x1)*U_liq + x1*U_vap;\t\t\t#[kJ/kg] - specific internal energy\n",
+ "U_1_net = m_1*U_1;\t\t\t#[kJ] - Internal energy\n",
+ "\n",
+ "\t\t\t#The amount of heat suplied is given by,\n",
+ "J_net = J*t;\t\t\t#[J] - Net heat supplied.\n",
+ "J_net = J_net*10**(-3);\t\t\t#[kJ]\n",
+ "\n",
+ "\t\t\t#Let the dryness factor at the end of the process be x\n",
+ "\t\t\t#Let the total mass of H2O (liquid + vapour) at the end of the process be 'm' kg.\n",
+ "\t\t\t# V_total/m = (1-x)*(V_liq) + x*V_vap ......equqtion(1)\n",
+ "\n",
+ "\n",
+ "\t\t\t#The energy balance equqtion gives,\n",
+ "\t\t\t# Q = m_e*H_e +(m_2*U_2 - m_1*U_1), where 'm_e' is the mass exit from the system and 'H_e' is enthalpy at exit conditions.\n",
+ "\n",
+ " \t\t# The second equation on simplification becomes\n",
+ "\t\t\t# x = ((0.005/m) - 0.001061)/0.884639\n",
+ "\n",
+ "\t\t\t# Putting the expression of x in first equation and then simplifying, we get\n",
+ "\t\t\t# - 1293.2 = -2202.21*m + 11.445 - 2.429*m\n",
+ "m = (11.445+1293.2)/(2202.21+2.429);\t\t\t#[kg]\n",
+ "\n",
+ "\t\t\t# Therefore x can be calculated as\n",
+ "x = ((0.005/m) - 0.001061)/0.884639;\n",
+ "\n",
+ "\t\t\t# Therfore total water (liquid + vapour) present in the pressure cooker at the end of the process is m kg.\n",
+ "m_vapour = x*m;\t\t\t#[kg] - Mass of vapour\n",
+ "m_liquid = (1-x)*m;\t\t\t#[kg] - Mass of vapour\n",
+ "\n",
+ "# Results\n",
+ "print \" Total water liquid + vapour) present in the pressure cooker at the end of the process is %f kg\"%(m);\n",
+ "print \" The mass of vapour is %f kg\"%(m_vapour);\n",
+ "print \" The mass of liquid is %f kg\"%(m_liquid);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Total water liquid + vapour) present in the pressure cooker at the end of the process is 0.591773 kg\n",
+ " The mass of vapour is 0.004942 kg\n",
+ " The mass of liquid is 0.586830 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch4_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch4_2.ipynb new file mode 100755 index 00000000..ebeadf70 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch4_2.ipynb @@ -0,0 +1,1508 @@ +{
+ "metadata": {
+ "name": "ch4_2",
+ "signature": "sha256:8185298e7063d37f738c422b0f9a0946dd677189cdf544f54e436d8d650cb521"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : The Secomd Law and Its Applications"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page Number : 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "n = 1000.;\t\t\t#[mol]\n",
+ "T = 400.;\t\t\t#[K]\n",
+ "P_1 = 100.;\t\t\t#[kPa]\n",
+ "P_2 = 1000.;\t\t\t#[kPa]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(a)\n",
+ "T_surr = 400.;\t\t\t#[K] - surrounding temperature\n",
+ "\t\t\t# Total change in entropy of the system is given by\n",
+ "\t\t\t# delta_S_sys = n*(Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1))\n",
+ "\t\t\t# The process being isothermal the first term is zero and the total entropy change of the system is\n",
+ "delta_S_sys_a = - n*R*math.log(P_2/P_1);\t\t\t#[J/K]\n",
+ "delta_S_sys_a = delta_S_sys_a*10**(-3);\t\t\t#[kJ/K]\n",
+ "\n",
+ "\t\t\t# Since the process is reversible therefore\n",
+ "Q_sys = T_surr*delta_S_sys_a;\t\t\t#[kJ] - Heat change in the system\n",
+ "\n",
+ "Q_surr = - Q_sys;\t\t\t#[kJ] - Heat change in the surrounding\n",
+ "delta_S_surr_a = Q_surr/T_surr;\t\t\t#[kJ/K]\n",
+ "\n",
+ "delta_S_univ_a = delta_S_sys_a + delta_S_surr_a;\t\t\t#[kJ/K]\n",
+ "\t\t\t# We get delta_S_univ = 0, which is true for a reversible process\n",
+ "\n",
+ "print \" a).The entropy change of the gas is given by delta_S_sys = %f kJ/K \"%(delta_S_sys_a);\n",
+ "print \" The entropy change of the surrounding is delta_S_surr = %f kJ/K \"%(delta_S_surr_a);\n",
+ "print \" The total entropy change of the gas is delta_S_univ = %f kJ/K \"%(delta_S_univ_a);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "T_surr_b = 300.;\t\t\t#[K] - surrounding temperature\n",
+ "\n",
+ "delta_S_sys_b = delta_S_sys_a;\n",
+ "\n",
+ "\t\t\t# Work done under reversible condition is given by\n",
+ "\t\t\t# W = integral(P*dV) = integral(((R*T)/V)*dV) = R*T*math.log(V_2/V_1)\n",
+ "\t\t\t# For ideal gas we have, P1*V1/T1 = P2*V2/T2 or, V2/V1 = P1/P2 (for isothermal conditions)\n",
+ "W = R*T*math.log(P_1/P_2);\t\t\t#[J/mol]\n",
+ "W = W*10**(-3);\t\t\t#[kJ/mol]\n",
+ "\n",
+ "W = W*(120./100);\t\t\t#[kJ/mol]\n",
+ "W = W*n;\t\t\t#[kJ] - Total work done for n moles\n",
+ "\n",
+ "\t\t\t# Using the first law we have delta_U = Q - W. Now under isothermal conditions for ideal gas, delta_U = 0. Therefore,\n",
+ "Q = -W;\n",
+ "\n",
+ "\t\t\t# Since heat is gained by the surroundings therefore\n",
+ "delta_S_surr_b = Q/T_surr_b;\t\t\t#[kJ/K]\n",
+ "\n",
+ "delta_S_univ_b = delta_S_sys_b + delta_S_surr_b;\t\t\t#[kJ/K]\n",
+ "\n",
+ "print \" b).The entropy change of the gas is given by delta_S_sys = %f kJ/K \"%(delta_S_sys_b);\n",
+ "print \" The entropy change of the surrounding is delta_S_surr = %f kJ/K \"%(delta_S_surr_b);\n",
+ "print \" The total entropy change of the gas is delta_S_univ = %f kJ/K \"%(delta_S_univ_b);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The entropy change of the gas is given by delta_S_sys = -19.143692 kJ/K \n",
+ " The entropy change of the surrounding is delta_S_surr = 19.143692 kJ/K \n",
+ " The total entropy change of the gas is delta_S_univ = 0.000000 kJ/K \n",
+ " b).The entropy change of the gas is given by delta_S_sys = -19.143692 kJ/K \n",
+ " The entropy change of the surrounding is delta_S_surr = 30.629908 kJ/K \n",
+ " The total entropy change of the gas is delta_S_univ = 11.486215 kJ/K \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.2 Page Number : 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 400.;\t\t\t#[K] - Temperature\n",
+ "P_1 = 500.*10**(3);\t\t\t#[Pa] - Initial pressure\n",
+ "P_2 = 100.*10**(3);\t\t\t#[Pa] - Final pressure\n",
+ "V_1 = 750.*10**(-6);\t\t\t#[m**(3)] - Initial volume\n",
+ "W_actual = 0.55*10**(3);\t\t\t#[J] - Actual work done\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal fas constant\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# Suppose that the surroundings are at 400 K.\n",
+ "\n",
+ "\t\t\t# The number of moles is given by\n",
+ "n = (P_1*V_1)/(R*T);\t\t\t#[mol]\n",
+ "\t\t\t# The entropy change of ideal gas under isothermal condition is given by\n",
+ "delta_S_sys = - n*R*math.log(P_2/P_1);\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# The heat supplied to the system in the internally reversible process is\n",
+ "Q_theot = T*delta_S_sys;\t\t\t#[J]\n",
+ "\t\t\t# Since the process is isothermal therefore, workdone is given by\n",
+ "W_theot = Q_theot;\t\t\t#[J] - Theoritical work done\n",
+ "\t\t\t# Since actual work done by the gas is 0.55 kJ therefore actual heat supplied is also 0.55 kJ because under isothermal conditions delta_U = 0\n",
+ "Q_actual = W_actual;\n",
+ "\n",
+ "# Results\n",
+ "\t\t\t# Since Q_theot > Q_actual, so the process is irreversible\n",
+ "print \" Since Q_theot = %f J is greater than Q_actual = %f J\"%(Q_theot,Q_actual);\n",
+ "print \" Therefore, the process is internally irreversible\"\n",
+ "\n",
+ "\n",
+ "\t\t\t# delta_S_sys = Q/T_b + S_gen\n",
+ "S_gen = delta_S_sys - (Q_theot/T);\t\t\t#[J/K]\n",
+ "\t\t\t# The entropy generated may be due to friction and other dissipayive effects or due to non-quasi-static expansion\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Since Q_theot = 603.539217 J is greater than Q_actual = 550.000000 J\n",
+ " Therefore, the process is internally irreversible\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.3 Page Number : 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\t\t\t# For side A\n",
+ "V_A = 1;\t\t\t#[L] - Volume\n",
+ "V_A = V_A*10**(-3);\t\t\t#[m**(3)]\n",
+ "T_A = 300;\t\t\t#[K] - Temperature\n",
+ "P_A = 2;\t\t\t#[atm] - Pressure\n",
+ "P_A = P_A*101325;\t\t\t#[Pa]\n",
+ "\n",
+ "\t\t\t# For side B\n",
+ "V_B = 1;\t\t\t#[L] - volume\n",
+ "V_B = V_B*10**(-3);\t\t\t#[m**(3)]\n",
+ "T_B = 300;\t\t\t#[K] - Temperature\n",
+ "P_B = 1;\t\t\t#[atm] - Pressure\n",
+ "P_B = P_B*101325;\t\t\t#[Pa]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# From first law final temperature and pressure are given by (example 3.30)\n",
+ "\t\t\t# T = ((n_A*T_A) + (n_B*T_B))/(n_A + n_B)\n",
+ "\t\t\t# P = ((P_A*V_A) + (P_A*V_B))/(V_A + V_B)\n",
+ "\n",
+ "\t\t\t# Since in this case T_A = T_B, therefore final pressure is given by\n",
+ "P = ((P_A*V_A) + (P_B*V_B))/(V_A + V_B);\t\t\t#[Pa]\n",
+ "P = P/101325;\t\t\t#[atm]\n",
+ "\n",
+ "print \" The final temperature is %f K\"%(T_A);\n",
+ "print \" The final pressure is %f atm\"%(P);\n",
+ "\n",
+ "\t\t\t# The number of moles of air on each side are\n",
+ "n_A = (P_A*V_A)/(R*T_A);\t\t\t#[mol]\n",
+ "n_B = (P_B*V_B)/(R*T_B);\t\t\t#[mol]\n",
+ "\n",
+ "delta_S_A = -n_A*R*math.log((P*101325)/P_A);\t\t\t#[J/K] - Entropy change on side A\n",
+ "delta_S_B = -n_B*R*math.log((P*101325)/P_B);\t\t\t#[J/K] - Entropy change on side B\n",
+ "delta_S_sys = delta_S_A + delta_S_B;\t\t\t#[J/K] - Total entropy change of system\n",
+ "\n",
+ "\t\t\t# Since the system is insulated there is no heat exchange with the surroundings, therefore entropy change of surrounding is zero\n",
+ "delta_S_surr = 0;\t\t\t#[J/K]\n",
+ "delta_S_univ = delta_S_sys + delta_S_surr;\t\t\t#[J/K]\n",
+ "print \" The total increase in entropy is %f J/K\"%(delta_S_univ);\n",
+ "\n",
+ "\t\t\t# The entropy change of the system can also be writtten as\n",
+ "\t\t\t# delta_s_sys = Q/T_b + S_gen\n",
+ "\t\t\t# Since there is no heat transfer, therefore\n",
+ "S_gen = delta_S_univ;\t\t\t#[J/K]\n",
+ "\t\t\t# The process is reversible because of entropy generation due to spontaneous release of piston.\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The final temperature is 300.000000 K\n",
+ " The final pressure is 1.500000 atm\n",
+ " The total increase in entropy is 0.057383 J/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.4 Page Number : 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "V_vessel = 0.2;\t\t\t#[m**(3)] - Volume of the vessel\n",
+ "P_1 = 10;\t\t\t#[bar] - Initial pressure inside the vessel\n",
+ "P_1 = P_1*10**(5);\t\t\t#[Pa]\n",
+ "P_2 = 3.5;\t\t\t#[bar] - Final pressure inside the vessel\n",
+ "P_2 = P_2*10**(5);\t\t\t#Pa\n",
+ "T_1 = 250 + 273.15;\t\t\t#[K] - Initial temperature of the vesssel\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# (a)\n",
+ "\t\t\t# At 10 bar and 250 C the steam is superheated. From steam table as reported in book we have\n",
+ "V_1 = 0.2327;\t\t\t#[m**(3)/kg] - specific volume\n",
+ "U_1 = 2709.9;\t\t\t#[kJ/kg] - specific internal energy\n",
+ "H_1 = 2942.6;\t\t\t#[kj/kg] - Specific enthalpy\n",
+ "S_1 = 6.9247;\t\t\t#[kJ/kg-K] - Specific entropy\n",
+ "\t\t\t# the quantity of steam is given by\n",
+ "m = V_vessel/V_1;\t\t\t#[kg]\n",
+ "\n",
+ "\t\t\t# At final state \n",
+ "V_2 = 0.2327;\t\t\t#[m**(3)/kg] - Molar volume\n",
+ "V_liq_2 = 0.001079;\t\t\t# [m**(3)/kg]\n",
+ "V_vap_2 = 0.5243;\t\t\t# [m**(3)/kg]\n",
+ "\t\t\t# Since overall volume lies between saturated liquid and saturated vapour therefore the steam is saturated and its dryness fraction at final state is given by\n",
+ "x = (V_2 - V_liq_2)/(V_vap_2 - V_liq_2);\n",
+ "\t\t\t# Final temperature = T_sat (at 3 bar) from steam table\n",
+ "T_final = 138.88;\t\t\t#[C]\n",
+ "\n",
+ "\t\t\t# At 3.5 bar saturated conditions \n",
+ "S_liq = 1.7275;\t\t\t#[kJ/kg-K] - Entropy of saturated liquid\n",
+ "S_vap = 6.9405;\t\t\t#[kJ/kg-K] - Entropy of saturated vapour\n",
+ "U_liq = 583.95;\t\t\t#[kJ/kg] - Internal energy of saturated liquid\n",
+ "U_vap = 2548.9;\t\t\t#[kJ/kg] - Internal energy of saturated vapour\n",
+ "\t\t\t# Therefore at final state \n",
+ "U_2 = U_liq*(1 - x) + x*U_vap;\t\t\t#[kJ/kg]\n",
+ "S_2 = S_liq*(1 - x) + x*S_vap;\t\t\t#[kJ/kg-K]\n",
+ "Q_1 = m*(U_2 - U_1);\t\t\t#[kJ]\n",
+ "delta_S_1 = m*(S_2 - S_1);\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \" a).The final temperature is %f C\"%(T_final);\n",
+ "print \" The amount of heat transfer is %f kJ\"%(Q_1);\n",
+ "print \" The change of entropy is %f kJ/kg-K\"%(delta_S_1);\n",
+ "\n",
+ "\t\t\t# (b)\n",
+ "Y = 1.4;\t\t\t# Ratio of heat capacities for air\n",
+ "\t\t\t# (P_1*V_1)/T_1 = (P_2*V_2)/T_2 and since V_1 = V_2\n",
+ "T_2 = (P_2/P_1)*T_1;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# Since the volume is fixed therefore work done (W) = 0 and from first law we get\n",
+ "\t\t\t# Q = delta_U = n*Cv_0*(T_2 - T_1)\n",
+ "Cv_0 = R/(Y - 1);\t\t\t#[J/mol-K] - Heat capacity at constant volume\n",
+ "Cp_0 = (Y*R)/(Y - 1);\t\t\t#[J/mol-K] - Heat capacity at constant pressure\n",
+ "n = (P_1*V_vessel)/(R*T_1);\t\t\t#[mol] - No. of moles\n",
+ "Q_2 = n*Cv_0*(T_2 - T_1);\t\t\t#[J] - Heat change\n",
+ "Q_2 = Q_2*10**(-3);\t\t\t#[kJ]\n",
+ "\n",
+ "delta_S_2 = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n",
+ "delta_S_2 = n*delta_S_2*10**(-3);\t\t\t#[kJ/K]\n",
+ "\n",
+ "print \" b).The final temperature is %f C\"%(T_2);\n",
+ "print \" The amount of heat transfer is %f kJ\"%(Q_2);\n",
+ "print \" The change of entropy is %f kJ/K\"%(delta_S_2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The final temperature is 138.880000 C\n",
+ " The amount of heat transfer is -1079.587621 kJ\n",
+ " The change of entropy is -2.483450 kJ/kg-K\n",
+ " b).The final temperature is 183.102500 C\n",
+ " The amount of heat transfer is -325.000000 kJ\n",
+ " The change of entropy is -1.003366 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.5 Page Number : 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from math import *\n",
+ "# Variables\n",
+ "m = 1000.;\t\t\t#[g] - Mass of fluid\n",
+ "P_1 = 20.;\t\t\t#[bar] - Initial pressure\n",
+ "P_1 = P_1*10.**(5);\t\t\t#[Pa]\n",
+ "P_2 = 2;\t\t\t#[bar] - Final pressure\n",
+ "P_2 = P_2*10.**(5);\t\t\t#Pa\n",
+ "T_1 = 250 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "n = 1.25;\n",
+ "R = 8.314;\t\t\t#[J/mol*-] - Universal gas constant\n",
+ "Y = 1.4;\t\t\t# Index of expansion\n",
+ "Cv_0 = R/(Y- 1);\t\t\t#[J/mol-K]\n",
+ "Cp_0 = R + Cv_0;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(a)\n",
+ "\t\t\t# For steam at 20 bar and 250 C, from steam table as reported in the book\n",
+ "V_1 = 0.11144;\t\t\t#[m**(3)/kg]\n",
+ "U_1 = 2679.6;\t\t\t#[kJ/kg]\n",
+ "S_1 = 6.5453;\t\t\t#[kJ/kg-K]\n",
+ "\t\t\t# P_1*V_1**(n) = P_2*V_2**(n)\n",
+ "V_2 = ((P_1*V_1**(n))/P_2)**(1/n);\t\t\t#[m**(3)/kg]\n",
+ "\n",
+ "\t\t\t# At 2 bar under saturated conditions,from steam table as reported in the book\n",
+ "V_liq = 0.001061;\t\t\t#[m**(3)/kg]\n",
+ "V_vap = 0.8857;\t\t\t#[m**(3)/kg]\n",
+ "x = (V_2 - V_liq)/(V_vap - V_liq);\t\t\t# Dryness fraction\n",
+ "T_sat = 120.23;\t\t\t#[C] - The final temperature\n",
+ "U_liq = 504.49;\t\t\t#[kJ/kg] - Internal energy of saturate liquid\n",
+ "U_vap = 2529.5;\t\t\t#[kJ/kg] - Internal energy of saturate vapour\n",
+ "\t\t\t# Therefore, internal energy at state 2 is given by\n",
+ "U_2 = U_liq*(1 - x) + x*U_vap;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# Work transfer is given by\n",
+ "W = (P_1*V_1 - P_2*V_2)/(n - 1);\t\t\t#[J/kg]\n",
+ "W = W*10**(-3);\t\t\t#[kJ/kg]\n",
+ "delta_U = U_2 - U_1;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# From first law, q - W = delta_U\n",
+ "q = W + delta_U;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# At final state (2 bar saturated), as reported in the book\n",
+ "S_liq = 1.5301;\t\t\t#[kJ/kg-K] - Entropy of saturated liquid\n",
+ "S_vap = 7.1271;\t\t\t#[kJ/kg-K] - Entropy of saturated vapour\n",
+ "\t\t\t# Therefore, entropy at state 2 is given by\n",
+ "S_2 = S_liq*(1 - x) + x*S_vap;\t\t\t#[kJ/kg-K]\n",
+ "delta_S = S_2 - S_1;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \" a).The final temperature is %f C\"%(T_sat);\n",
+ "print \" The work done is equal to %f kJ/kg\"%(W);\n",
+ "print \" The heat change is equal to %f kJ/kg\"%(q);\n",
+ "print \" The entropy change is equal to %f kJ/kg-K\"%(delta_S);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "\t\t\t# P*V**(n) = constant\n",
+ "\t\t\t# Since the gas behaves as ideal we can write\n",
+ "\t\t\t# P_1**(1-n)*T_1**(n) = P_2**(1-n)*T_2**(n)\n",
+ "T_2 = T_1*(P_1/P_2)**((1-n)/n);\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# Molar volume is given by\n",
+ "V_2_1 = (R*T_1)/P_1;\t\t\t#[m**(3)/mol] - At state 1\n",
+ "V_2_2 = (R*T_2)/P_2;\t\t\t#[m**(3)/mol] - At state 2\n",
+ "\n",
+ "\t\t\t# Work transfer is given by\n",
+ "w_2 = ((P_1*V_2_1) - (P_2*V_2_2))/(n-1);\t\t\t#[J/mol]\n",
+ "Mol_wt_air = 0.21*32 + 0.79*28;\t\t\t#[g/mol] - Molecular weight of air\n",
+ "n_mole = m/Mol_wt_air;\n",
+ "\t\t\t# Total work transfer is given by\n",
+ "W_2 = w_2*n_mole*10**(-3);\t\t\t#[kJ]\n",
+ "\t\t\t# Internal energy change is given by\n",
+ "delta_U = n_mole*Cv_0*(T_2 - T_1)*10**(-3);\t\t\t#[kJ]\n",
+ "\n",
+ "\t\t\t# Heat transfer is given by\n",
+ "Q = W_2 + delta_U;\t\t\t#[kJ]\n",
+ "\n",
+ "\t\t\t# Entropy change is given by\n",
+ "delta_S_2 = Cp_0*log(T_2/T_1) - R*log(P_2/P_1);\t\t\t#[J/mol-K]\n",
+ "delta_S_2 = delta_S_2*n_mole;\t\t\t#[J/mol]\n",
+ "\n",
+ "print \" b).The final temperature is %f C\"%(T_2);\n",
+ "print \" The work done is equal to %f kJ/kg\"%(W_2);\n",
+ "print \" The total heat change is equal to %f kJ\"%(Q);\n",
+ "print \" The entropy change is equal to %f J/kg-K\"%(delta_S_2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The final temperature is 120.230000 C\n",
+ " The work done is equal to 329.008908 kJ/kg\n",
+ " The heat change is equal to -238.988250 kJ/kg\n",
+ " The entropy change is equal to -0.573241 kJ/kg-K\n",
+ " b).The final temperature is 330.085335 C\n",
+ " The work done is equal to 222.626855 kJ/kg\n",
+ " The total heat change is equal to 83.485071 kJ\n",
+ " The entropy change is equal to 199.136884 J/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.6 Page Number : 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "m = 1000;\t\t\t#[g] - Mass of fluid\n",
+ "P_1 = 20;\t\t\t#[bar] - Initial pressure\n",
+ "P_2 = 2;\t\t\t#[bar] - Final ressure\n",
+ "T_1 = 250 + 273.15;\t\t\t#[K] - Initial tempearture\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# (a).\n",
+ "\t\t\t# At 20 bar and 250 C as reported in the book\n",
+ "V_1 = 0.11144;\t\t\t#[m**(3)/kg] - Specific volume\n",
+ "U_1 = 2679.6;\t\t\t#[kJ/kg] - Specific internal energy\n",
+ "S_1 = 6.5453;\t\t\t#[kJ/kg-K] - Specific entropy\n",
+ "S_2 = S_1;\t\t\t# Isentropic expansion\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# At 2 bar under saturated conditions \n",
+ "S_liq = 1.5301;\t\t\t#[kJ/kg-K]\n",
+ "S_vap = 7.1271;\t\t\t#[kJ/kg-K]\n",
+ "U_liq = 504.49;\t\t\t#[kJ/kg-K]\n",
+ "U_vap = 2529.5;\t\t\t#[kJ/kg-K]\n",
+ "\t\t\t# Therefore dryness factor can be determined as\n",
+ "x = (S_1 - S_liq)/(S_vap - S_liq);\n",
+ "U_2 = U_liq*(1 - x) + x*U_vap;\t\t\t#[kJ/kg] - Specific internal energy at final state\n",
+ "delta_U = U_2 - U_1;\t\t\t#[kJ/kg] - change in internal energy\n",
+ "W = - delta_U;\t\t\t# - Work done\n",
+ "\n",
+ "\t\t\t# The final saturated temperature at 2 bar from steam table is\n",
+ "T_2 = 120.23;\t\t\t#[C]\n",
+ "\n",
+ "print \" a).The final temperature is %f C\"%(T_2);\n",
+ "print \" The work done is equal to %f kJ/kg\"%(W);\n",
+ "\n",
+ "\t\t\t# (b).\n",
+ "Y = 1.4;\t\t\t# Index of expansion for air\n",
+ "Cv_0 = R/(Y-1);\t\t\t#[J/mol*K] - Specific heat capacity at constant volume\n",
+ "\t\t\t# Ideal gas under isentropic expansion P_1**(1-Y)*T_1**(Y) =P_2**(1-Y)*T_2**(Y)\n",
+ "T_2_prime = T_1*(P_1/P_2)**((1-Y)/Y);\t\t\t#[K] - Final temperature\n",
+ "delta_U_prime = Cv_0*(T_2_prime - T_1);\t\t\t#[J/mol] - change in internal energy\n",
+ "\n",
+ "\t\t\t# Number of moles is given by\n",
+ "n = m/28.84;\t\t\t#[mol]\n",
+ "delta_U_prime = delta_U_prime*n*10**(-3);\t\t\t#[kJ]\n",
+ "W_prime = - delta_U_prime;\t\t\t# Work done\n",
+ "\n",
+ "print \" b).The final temperature is %f C\"%(T_2_prime);\n",
+ "print \" The work done is equal to %f kJ/kg\"%(W_prime);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The final temperature is 120.230000 C\n",
+ " The work done is equal to 360.596841 kJ/kg\n",
+ " b).The final temperature is 270.964218 C\n",
+ " The work done is equal to 181.750398 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.7 Page Number : 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P_1 = 15.;\t\t\t#[bar] - Initial pressure\n",
+ "P_2 = 0.15;\t\t\t#[bar] - Final pressure\n",
+ "\n",
+ "\t\t\t# We know that during isentropic expansion\n",
+ "\t\t\t# W = ((P_1*V_1) - (P_2*V_2))/(Y - 1)\n",
+ "\n",
+ "\t\t\t# At 15 bar (saturated vapour), from steam table as reported in the book\n",
+ "V_1 = 0.13177;\t\t\t#[m**(3)/kg]\n",
+ "U_1 = 2594.5;\t\t\t#[kJ/kg]\n",
+ "S_1 = 6.4448;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "\t\t\t# Now at state 2 (P_2 = 0.15 bar),from steam table as reported in the book\n",
+ "S_2 = S_1;\t\t\t# Isentropic expansion\n",
+ "S_liq = 0.7549;\t\t\t#[kJ/kg-K]\n",
+ "S_vap = 8.0085;\t\t\t#[kJ/kg-K]\n",
+ "U_liq = 225.92;\t\t\t#[kJ/kg]\n",
+ "U_vap = 2448.7;\t\t\t#[kJ/kg]\n",
+ "V_liq = 0.001014;\t\t\t#[m**(3)/kg]\n",
+ "V_vap = 10.02;\t\t\t#[m**(3)/kg]\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# Therefore dryness factor can be calculated as\n",
+ "x = round((S_1 - S_liq)/(S_vap - S_liq),3);\n",
+ "U_2 = round(U_liq*(1 - x) + x*U_vap,2);\t\t\t#[kJ/kg] - Specific internal energy at final state\n",
+ "delta_U = U_2 - U_1;\t\t\t#[kJ/kg] - change in internal energy\n",
+ "W = - delta_U;\t\t\t# - Work done\n",
+ "\n",
+ "\t\t\t# The specific volume at the final state is\n",
+ "V_2 = round(V_liq*(1 - x) + x*V_vap,3);\t\t\t#[m**(3)/kg]\n",
+ "\n",
+ "\t\t\t# From work done under adiabatic conditions we get\n",
+ "\t\t\t# W = ((P_1*V_1) - (P_2*V_2))/(Y - 1)\n",
+ "Y = (((P_1*V_1) - (P_2*V_2))*10**2/W) + 1;\n",
+ "\n",
+ "# Results\n",
+ "print \" The index of expansion is given by Y = %.4f\"%(Y);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The index of expansion is given by Y = 1.1275\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.8 Page Number : 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 40;\t\t\t#[bar] - Initial pressure\n",
+ "T_1 = 500;\t\t\t#[C] - Initial temperature\n",
+ "Vel_1 = 140;\t\t\t#[m/s] - Initial velocity\n",
+ "T_2 = 100;\t\t\t#[C] - Final temperature\n",
+ "Vel_2 = 80;\t\t\t#[m/s] - Final velocity\n",
+ "W = 746.0;\t\t\t#[kJ/kg] - Work output\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# (a).\n",
+ "\t\t\t# From steam table as reported in the book\n",
+ "H_1 = 3445.3;\t\t\t#[kJ/kg]\n",
+ "H_2 = 2676.1;\t\t\t#[kJ/kg]\n",
+ "S_1 = 7.0901;\t\t\t#[kJ/kh-K]\n",
+ "S_2 = 7.3549;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "\t\t\t# The temperature at which heat exchange take place is given by \n",
+ "T_b =(T_1 + T_2)/2 + 273.15;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# From first law in a control volume \n",
+ "\t\t\t# q - W = delta_H + (delta_V**(2))/2 , therefore\n",
+ "q = W*10**(3) + (H_2 - H_1)*10**(3) + (Vel_2**(2) - Vel_1**(2))/2;\t\t\t#[J/kg]\n",
+ "q = q*10**(-3);\t\t\t#[kJ/kg]\n",
+ "\n",
+ "S_gen = (S_2 - S_1) - (q/T_b);\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \" a).The specific entropy production within turbine is %f kJ/kg-K\"%(S_gen);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "\t\t\t# If control volume is too large to include the turbine and the environment then T_b becomes equal to 289 K. In this case\n",
+ "T_b_prime = 298;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# The entropy change of the sysytem is given by \n",
+ "\t\t\t#delta_S = q/T_b + S_gen\n",
+ "S_gen = (S_2 - S_1) - (q/T_b_prime);\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \" b).The specific entropy production within turbine is %f kJ/kg-K\"%(S_gen);\n",
+ "\n",
+ "\t\t\t# In the first part only irreversibilities within the turbine are evaluated\n",
+ "\t\t\t# whereas in part (2) irreversible heat transfer between the turbine cover and environment are also included.\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The specific entropy production within turbine is 0.316793 kJ/kg-K\n",
+ " b).The specific entropy production within turbine is 0.364800 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.9 Page Number : 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 1.;\t\t\t#[MPa] - Initial pressure\n",
+ "T_1 = 200 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 8.;\t\t\t#[MPa] - Final pressure\n",
+ "Y = 1.4;\t\t\t# Index of expansion of gas\n",
+ "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t# The exit temperature for ideal gas under isentropic conditions is given by \n",
+ "T_2 = round(T_1*(round((P_2/P_1)**((Y-1)/Y),2)),1);\t\t\t#[K] - Exit temperature\n",
+ "\n",
+ "Cp_0 = round(Y*R/(Y-1),1);\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n",
+ "\t\t\t# For isentropic conditions the enthalpy change for ideal gas is given by\n",
+ "delta_H_s = Cp_0*(T_2 - T_1);\t\t\t#[J/mol]\n",
+ "\t\t\t# Therefore work is given by\n",
+ "W = - delta_H_s;\t\t\t#[J/mol]\n",
+ "\n",
+ "print \" 1).The exit temperature of steam is %.2f K\"%(T_2);\n",
+ "print \" The required work is %.2f J/mol\"%(W);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "eff = 0.8;\t\t\t# Adiabatic efficiency\n",
+ "\t\t\t# delta_H_s/delta_H_a = 0.8\n",
+ "delta_H_a = delta_H_s/eff;\t\t\t#[J/mol] - Actual enthalpy change\n",
+ "W_a = - delta_H_a;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# The ideal gas enthalpy is a function only of temperature,therefore actual exit temperature T_2a is given by \n",
+ "\t\t\t# delta_H_a = Cp_0*(T_2a - T_1)\n",
+ "T_2a = (delta_H_a/Cp_0) + T_1;\n",
+ "\n",
+ "print \" 2).The exit temperature of steam is %.2f K\"%(T_2a);\n",
+ "print \" The required work is %.2f J/mol\"%(W_a);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The exit temperature of steam is 856.40 K\n",
+ " The required work is -11152.58 J/mol\n",
+ " 2).The exit temperature of steam is 952.21 K\n",
+ " The required work is -13940.72 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.10 Page Number : 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\t\n",
+ "\n",
+ "# Variables\n",
+ "P_1 = 1;\t\t\t#[MPa] - Initial pressure\n",
+ "T_1 = 200 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 8;\t\t\t#[MPa] - Final pressure\n",
+ "Y = 1.4;\t\t\t# Index of expansion of gas\n",
+ "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n",
+ "\t\t\t# Cp_0 = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3), here T is in K and Cp_0 is in cal/mol-K\n",
+ "a = 7.7;\n",
+ "b = 0.04594*10**(-2);\n",
+ "c = 0.2521*10**(-5);\n",
+ "d = - 0.8587*10**(-9);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# delta_S = integral((Cp_0/T)*dT) - R*math.log(P_2/P_1) = 0\n",
+ "\t\t\t# delta_S = integral(((a + b*T + c*T**(2) + d*T**(3))/T)*dT) - R*math.log(P_2/P_1) = 0\n",
+ "\t\t\t# delta_S = a*math.log(T_2/T_1) + b*(T_2 - T_1) + (c/2)*(T_2**(2) - T_1**(2)) + (d/3)*(T_2**(3) - T_1**(3)) - R*math.log(P_2/P_1) = 0\n",
+ "\t\t\t# Solving for T_2 in the above equation we get\n",
+ "def f(T_2): \n",
+ "\t return a*math.log(T_2/T_1)+b*(T_2-T_1)+(c/2)*(T_2**(2)-T_1**(2))+(d/3)*(T_2**(3)-T_1**(3))-R*math.log(P_2/P_1)\n",
+ "T_2 = fsolve(f,100)\n",
+ "\n",
+ "\t\t\t# Now let us calculate the enthalpy change under these conditions \n",
+ "\n",
+ "def f0(T): \n",
+ "\t return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)\n",
+ "\n",
+ "delta_H_s = quad(f0,T_1,T_2)[0]\n",
+ "\n",
+ "delta_H_s = delta_H_s*4.184;\t\t\t#[J/mol]\n",
+ "\t\t\t# Therefore isentropic work done is\n",
+ "W = - delta_H_s;\n",
+ "\n",
+ "print \" 1).The exit temperature of steam is %f K\"%(T_2);\n",
+ "print \" The required work is %f J/mol\"%(W);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "eff = 0.8;\n",
+ "delta_H_a = delta_H_s/eff;\t\t\t#[J/mol] - Actual enthalpy change\n",
+ "\t\t\t# Therefore actual work done is given by \n",
+ "W_a = - delta_H_a;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# Now we have to determine the exit temperature under actual conditions\n",
+ "\t\t\t# delta_H_a = integral(Cp_0*dT) from limit T_1 = 473.15 K to T_2\n",
+ "\t\t\t# On putting the values and simplifying we get\n",
+ "\t\t\t# 7.7*T_2 + 0.02297*10**(-2)*T_2**(2) + 0.084*10**(-5)*T_2**(3) - 0.214675*10**(-9)*T_2**(4) - 6907.106 = 0\n",
+ "\n",
+ "def f1(T_2_prime): \n",
+ "\t return a*(T_2_prime-T_1)+(b/2)*(T_2_prime**(2)-T_1**(2))+(c/3)*(T_2_prime**(3)-T_1**(3))+(d/4)*(T_2_prime**(4)-T_1**(4))-(delta_H_a/4.184)\n",
+ "T_2_prime = fsolve(f1,100)\n",
+ "\n",
+ "print \" 2).The exit temperature of steam is %f K\"%(T_2_prime);\n",
+ "print \" The required work is %f J/mol\"%(W_a);\n",
+ "\n",
+ "# Answers are vary because of rounding error. Calculations are correct. "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The exit temperature of steam is 760.037501 K\n",
+ " The required work is -10499.128839 J/mol\n",
+ " 2).The exit temperature of steam is 828.044888 K\n",
+ " The required work is -13123.911049 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.11 Page Number : 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P_1 = 1;\t\t\t#[MPa] - Initial pressure\n",
+ "T_1 = 200 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 8;\t\t\t#[MPa] - Final pressure\n",
+ "Y = 1.4;\t\t\t# Index of expansion of gas\n",
+ "\n",
+ "\t\t\t# At state 1 (1 MPa and 200 C) from steam table as reported in the book\n",
+ "H_1 = 2827.9;\t\t\t#[kJ/kg]\n",
+ "S_1 = 6.694;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# At state 2 (8 MPa)\n",
+ "S_2 = S_1;\t\t\t# Isentropic process\n",
+ "\t\t\t# From steam table at 8 MPa and 450 C\n",
+ "S_21 = 6.5551;\t\t\t#[kJ/kg-K]\n",
+ "\t\t\t# From steam table at 8 MPa and 500 C\n",
+ "S_22 = 6.7240;\t\t\t#[kJ/kg-K]\n",
+ "\t\t\t# Therefore temperature at which entropy of steam is 6.694 kJ/kg-K is given by\n",
+ "T_2 = 450 + (500-450)/(S_22-S_21)*(S_2-S_21);\t\t\t#[C]\n",
+ "T_2 = T_2 + 273.15;\t\t\t#[K]\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# Enthalpy of steam at 8 MPa and 450 C from steam table as reported in the book \n",
+ "H_21 = 3272.0;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# And at 8 MPA and 500 C\n",
+ "H_22 = 3398.3;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# Therefore enthalpy of steam at 8 MPa and T_2 \n",
+ "H_2 = H_21 + ((H_22-H_21)/(500-450))*((T_2-273.15) - 450); \n",
+ "\t\t\t# Work done is given by \n",
+ "\t\t\t# W = - delta_H_s\n",
+ "W = - (H_2 - H_1);\t\t\t#[J/g]\n",
+ "W = W*18.015;\t\t\t#[J/mol]\n",
+ "delta_H_s = - W;\n",
+ "\n",
+ "print \" 1).The exit temperature of steam is %f K\"%(T_2);\n",
+ "print \" The required work is %f J/mol\"%(W);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "eff = 0.8;\t\t\t# Adiabatic efficiency\n",
+ "\t\t\t# delta_H_s/delta_H_a = 0.8\n",
+ "delta_H_a = delta_H_s/eff;\t\t\t#[J/mol] - Actual enthalpy change\n",
+ "\t\t\t# Therefore actual work done \n",
+ "W_a = - delta_H_a;\t\t\t#[J/mol]\n",
+ "\t\t\t# Enthalpy at actual exit conditions is \n",
+ "H_2_a = H_1 + delta_H_a/18.015;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# Enthalpy of steam at 8 MPa and 500 C from steam table as reported in the book \n",
+ "H_21_a = 3398.3;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# And at 8 MPA and 550 C\n",
+ "H_22_a = 3521.0;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# Therefore temperature at H_22_a is given by\n",
+ "T_2_a = 500 + ((550-500)*(H_2_a - H_21_a))/(H_22_a - H_21_a);\t\t\t#[C]\n",
+ "T_2_a = T_2_a + 273.15;\t\t\t#[K]\n",
+ "\n",
+ "print \" 2).The exit temperature of steam is %f K\"%(T_2_a);\n",
+ "print \" The required work is %f J/mol\"%(W_a);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The exit temperature of steam is 764.269005 K\n",
+ " The required work is -9871.618433 J/mol\n",
+ " 2).The exit temperature of steam is 819.832257 K\n",
+ " The required work is -12339.523042 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.12 Page Number : 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 140.;\t\t\t#[kPa] - Initial pressure\n",
+ "T_1 = 20. + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 560.;\t\t\t#[kPa] - Final pressure\n",
+ "eff = 0.75;\t\t\t# Compressor efficiency\n",
+ "R = 1.987;\t\t\t#[cal/mol*K] - Universal gas constant\n",
+ "\t\t\t# Cp_0 = 4.750 + 1.200*10**(-2)*T + 0.3030*10**(-5)*T**(2) - 2.630*10**(-9)*T**(3), here T is in K and Cp_0 is in cal/mol-K\n",
+ "a = 7.7;\n",
+ "b = 0.04594*10**(-2);\n",
+ "c = 0.2521*10**(-5);\n",
+ "d = - 0.8587*10**(-9);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# At 20 C,as reported in the book\n",
+ "Cp_0 = 8.46;\t\t\t#[cal/mol-K] - Specific heat capacity at constant pressure\n",
+ "Cv_0 = Cp_0 - R;\t\t\t#[cal/mol-K] - Specific heat capacity at constant volume\n",
+ "Y = Cp_0/Cv_0;\t\t\t# Index of expansion\n",
+ "\n",
+ "\t\t\t# Assuming 100 % efficiency,for reversible and adiabatic process the final temperature is given by\n",
+ "\t\t\t# P*V**(Y) = constant or, P*((R*T)/P)**(Y) = constant\n",
+ "T_2 = ((P_1/P_2)**((1-Y)/Y))*T_1;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# Since at final temperature the value of heat capacity ratio would have changed \n",
+ "\t\t\t# So let us determine Y at mean temperature and then calculating final temperature\n",
+ "T_mean = (T_1 + T_2)/2;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# At T_mean,as reported in the book\n",
+ "Cp_0_new = 9.153;\t\t\t#[cal/mol-K]\n",
+ "Cv_0_new = Cp_0_new - R;\t\t\t#[cal/mol-K]\n",
+ "Y_new = Cp_0_new/Cv_0_new;\n",
+ "T_2_new = T_1*((P_1/P_2)**((1-Y_new)/Y_new));\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# The enthalpy change is given by \n",
+ "\n",
+ "def f23(T): \n",
+ "\t return 4.750+1.200*10**(-2)*T+0.3030*10**(-5)*T**(2)-2.630*10**(-9)*T**(3)\n",
+ "\n",
+ "delta_H = quad(f23,T_1,T_2_new)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t#For adiabatic process\n",
+ "W = - delta_H;\t\t\t#[cal/mol]\n",
+ "\t\t\t# Now actual work done on the system is given by \n",
+ "W_a = W/eff;\t\t\t#[cal/mol]\n",
+ "\n",
+ "\n",
+ "\t\t\t# Therefore actual change in enthalpy is - W_a, or\n",
+ "\t\t\t# - W_a = 4.750*(T_2-T_1) + (1.2*10**(-2)/2)*(T_2**(2)-T_1**(2)) + (0.3030*10**(-5)/3)*(T_2**(3)-T_1**(3)) - (2.63*10**(-9)/4)*(T_2***(4)-T_1**(4));\n",
+ "\t\t\t# Solving for T_2 in the above equation\n",
+ "def f1(T_2_prime): \n",
+ "\t return 4.750*(T_2_prime-T_1)+((1.2*10**(-2))/2)*(T_2_prime**(2)-T_1**(2))+((0.3030*10**(-5))/3)*(T_2_prime**(3)-T_1**(3))-((2.63*10**(-9))/4)*(T_2_prime**(4)-T_1**(4))+W_a\n",
+ "T_2_prime=fsolve(f1,100)\n",
+ "\n",
+ "print \" The required work is %f cal/mol\"%(W_a);\n",
+ "print \" The discharge temperature of methane is %f K\"%(T_2_prime);\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The required work is -1254.158148 cal/mol\n",
+ " The discharge temperature of methane is 427.374758 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.13 Page Number : 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 10;\t\t\t#[bar] - Initial pressure\n",
+ "T_1 = 500 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 2;\t\t\t#[psia] - Final pressure\n",
+ "P_2 = P_2/14.5;\t\t\t#[bar]\n",
+ "P_2 = P_2*10**(2);\t\t\t#[kPa]\n",
+ "m = 1.8;\t\t\t#[kg/s] - Mass flux\n",
+ "eff = 0.8;\t\t\t# Efficiency\n",
+ "\n",
+ "\t\t\t# At state 1, from steam table\n",
+ "H_1 = 3478.5;\t\t\t#[kJ/kg]\n",
+ "S_1 = 7.7622;\t\t\t#[kJ/kg-K]\n",
+ "S_2 = S_1;\t\t\t# Adiabatic process\n",
+ "\n",
+ "\t\t\t# From saturated steam table at 10 kPa\n",
+ "S_liq_1 = 0.6493;\t\t\t#[kJ/kg-K]\n",
+ "S_vap_1 = 8.1502;\t\t\t#[kJ/kg-K]\n",
+ "\t\t\t# From saturated steam table at 15 kPa\n",
+ "S_liq_2 = 0.7549;\t\t\t#[kJ/kg-K]\n",
+ "S_vap_2 = 8.0085;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# Threfore at P_2 \n",
+ "S_liq = S_liq_1 + ((S_liq_2-S_liq_1)/(15-10))*(P_2-10);\n",
+ "S_vap = S_vap_1 + ((S_vap_2-S_vap_1)/(15-10))*(P_2-10);\n",
+ "\n",
+ "\t\t\t# The dryness fraction at exit state is\n",
+ "x_2 = (S_1-S_liq)/(S_vap-S_liq);\n",
+ "\t\t\t# The enthalpy at exit to be determined. At 10 kPa\n",
+ "H_liq_1 = 191.83;\t\t\t#[kJ/kg]\n",
+ "H_vap_1 = 2584.7;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# At 15 kPa\n",
+ "H_liq_2 = 225.94;\t\t\t#[kJ/kg]\n",
+ "H_vap_2 = 2599.1;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# Therfore at P_2\n",
+ "H_liq = H_liq_1 + ((H_liq_2-H_liq_1)/(15-10))*(P_2-10);\n",
+ "H_vap = H_vap_1 + ((H_vap_2-H_vap_1)/(15-10))*(P_2-10);\n",
+ "\n",
+ "\t\t\t# Enthalpy at state 2\n",
+ "H_2_s = H_liq*(1-x_2) + x_2*H_vap;\t\t\t#[kJ/kg]\n",
+ "W = m*(H_1 - H_2_s);\t\t\t#[kW]\n",
+ "\n",
+ "print \" 1).The power output is %f kW\"%(W);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# If the process is 80 % efficient the enthalpy change is\n",
+ "\t\t\t# H_1 - H_2_a = eff*(H_1 - H_2_s)\n",
+ "H_2_a = H_1 - (0.8*(H_1 - H_2_s));\n",
+ "\n",
+ "\t\t\t# Now under these conditions temperature and entropy have to be determined. From superheated steam tables,as reported in the book\n",
+ "\t\t\t# At 10 kPa and 100 C\n",
+ "H_2_1 = 2687.5;\t\t\t#[kJ/kg]\n",
+ "S_2_1 = 8.4479;\t\t\t#[kJ/kg-k]\n",
+ "\t\t\t# At 10 kPa and 150 C\n",
+ "H_2_2 = 2783.0;\t\t\t#[kJ/kg]\n",
+ "S_2_2 = 8.6882;\t\t\t#[kJ/kg-k]\n",
+ "\t\t\t# At 50 kPa and 100 C\n",
+ "H_3_1 = 2682.5;\t\t\t#[kJ/kg]\n",
+ "S_3_1 = 7.6947;\t\t\t#[kJ/kg-k]\n",
+ "\t\t\t# At 50 kPa and 150 C\n",
+ "H_4_1 = 2780.1;\t\t\t#[kJ/kg]\n",
+ "S_4_1 = 7.9401;\t\t\t#[kJ/kg-k]\n",
+ "\t\t\t# Therefore at P_2 and 100 C\n",
+ "H_prime_1 = H_2_1 + ((H_3_1-H_2_1)/(50-10))*(P_2-10);\t\t\t#[kJ/kg]\n",
+ "S_prime_1 = S_2_1 + ((S_3_1-S_2_1)/(50-10))*(P_2-10);\t\t\t#[kJ/kg-K]\n",
+ "\t\t\t# Therefore at P_2 and 150 C\n",
+ "H_prime_2 = H_2_2 + ((H_4_1-H_2_2)/(50-10))*(P_2-10);\t\t\t#[kJ/kg]\n",
+ "S_prime_2 = S_2_2 + ((S_4_1-S_2_2)/(50-10))*(P_2-10);\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "\t\t\t# Enthalpy at exit is H_2_a. So at this condition temperature can be nom be determined\n",
+ "T_exit = ((H_2_a - H_prime_1)/(H_prime_2 - H_prime_1))/(150-100) + 100;\t\t\t#[C]\n",
+ "\t\t\t# The entropy at exit is\n",
+ "S_exit = ((H_2_a - H_prime_1)/(H_prime_2 - H_prime_1))/(S_prime_2 - S_prime_1) + S_prime_1;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \" 2).The entropy at exit is %f kJ/kg-K\"%(S_exit);\n",
+ "print \" The temperature of the exit state is %f C\"%(T_exit);\n",
+ "\n",
+ "print \" The irreversibility is advatageous because the exit steam is superheated and therefore\";\n",
+ "print \" the blades of the turbine are not eroded by water droplets which get formed when the process is isentropic\";\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The power output is 1753.346828 kW\n",
+ " 2).The entropy at exit is 8.906311 kJ/kg-K\n",
+ " The temperature of the exit state is 100.002552 C\n",
+ " The irreversibility is advatageous because the exit steam is superheated and therefore\n",
+ " the blades of the turbine are not eroded by water droplets which get formed when the process is isentropic\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.14 Page Number : 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 6;\t\t\t#[MPa] - Initial pressure\n",
+ "T_1 = 500 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 10;\t\t\t#[kPa] - Final pressure\n",
+ "out_qlty = 0.9;\t\t\t# Output quality\n",
+ "\n",
+ "\t\t\t# At 6 MPa and 500 C, from steam table as reported in the book\n",
+ "H_1 = 3422.2;\t\t\t#[kJ/kg]\n",
+ "S_1 = 6.8803;\t\t\t#[kJ/kg-K]\n",
+ "S_2 = S_1;\t\t\t# Adiabatic reversible conditions\n",
+ "\t\t\t# At 10 kPa saturated\n",
+ "H_liq = 191.83;\t\t\t#[kJ/kg]\n",
+ "H_vap = 2584.7;\t\t\t#[kJ/kg]\n",
+ "S_liq = 0.6493;\t\t\t#[kJ/kg-K]\n",
+ "S_vap = 8.1502;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# The dryness fraction is given by \n",
+ "x = (S_1-S_liq)/(S_vap-S_liq);\n",
+ "\n",
+ "\t\t\t# Now the exit enthalpy is given by\n",
+ "H_2 = H_liq*(1-x) + x*H_vap;\t\t\t#[kJ/kg]\n",
+ "W = - (H_2 - H_1);\t\t\t#[kJ/kg] - Under isentropic conditions\n",
+ "\n",
+ "\t\t\t# We know that, delta_S = q/T_b + S_gen\n",
+ "\t\t\t# Since delta_S = 0, therefore under isentropic conditions\n",
+ "S_gen = 0;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "\t\t\t# Now for output quality 0.9\n",
+ "H_2_a = H_liq*(1-out_qlty) + out_qlty*H_vap;\t\t\t#[kJ/kg]\n",
+ "S_2_a = S_liq*(1-out_qlty) + out_qlty*S_vap;\t\t\t#[kJ/kg]\n",
+ "W_a = - (H_2_a - H_1);\t\t\t#[kJ/kg]\n",
+ "delta_S_a = S_2_a - S_1;\t\t\t#[kJ/kg-k]\n",
+ "\t\t\t# Again, delta_S = q/T_b + S_gen\n",
+ "\t\t\t# Since q = 0, therefore under isentropic conditions\n",
+ "S_gen_a = delta_S_a;\t\t\t#[kJ/kg-K\n",
+ "\t\t\t# Now efficiency is given by eff = delta_H_a/delta_H_s\n",
+ "eff = W_a/W;\n",
+ "\n",
+ "print \" For output quality = 0.9\";\n",
+ "print \" The work output per unit mass is %f kJ/kg\"%(W_a);\n",
+ "print \" The entropy generation is given by S_gen = %f kJ/kg-K\"%(S_gen_a);\n",
+ "print \" The efficiency with respect to reversible adiabatic case is given by eff = %f\"%(eff);\n",
+ "\n",
+ "\t\t\t# Now for output quality 1\n",
+ "out_qlty_1 = 1;\n",
+ "H_2_a_1 = H_liq*(1-out_qlty_1) + out_qlty_1*H_vap;\t\t\t#[kJ/kg]\n",
+ "S_2_a_1 = S_liq*(1-out_qlty_1) + out_qlty_1*S_vap;\t\t\t#[kJ/kg]\n",
+ "W_a_1 = - (H_2_a_1 - H_1);\t\t\t#[kJ/kg]\n",
+ "delta_S_a_1 = S_2_a_1 - S_1;\t\t\t#[kJ/kg-k]\n",
+ "\t\t\t# Again, delta_S = q/T_b + S_gen\n",
+ "\t\t\t# Since q = 0, therefore under isentropic conditions\n",
+ "S_gen_a_1 = delta_S_a_1;\t\t\t#[kJ/kg-K\n",
+ "\t\t\t# Now efficiency is given by eff = delta_H_a/delta_H_s\n",
+ "eff_1 = W_a_1/W;\n",
+ "\n",
+ "print \" For output quality = 1.0\";\n",
+ "print \" The work output per unit mass is %f kJ/kg\"%(W_a_1);\n",
+ "print \" The entropy generation is given by S_gen = %f kJ/kg-K\"%(S_gen_a_1);\n",
+ "print \" The efficiency with respect to reversible adiabatic case is given by eff = %f\"%(eff_1);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " For output quality = 0.9\n",
+ " The work output per unit mass is 1076.787000 kJ/kg\n",
+ " The entropy generation is given by S_gen = 0.519810 kJ/kg-K\n",
+ " The efficiency with respect to reversible adiabatic case is given by eff = 0.866551\n",
+ " For output quality = 1.0\n",
+ " The work output per unit mass is 837.500000 kJ/kg\n",
+ " The entropy generation is given by S_gen = 1.269900 kJ/kg-K\n",
+ " The efficiency with respect to reversible adiabatic case is given by eff = 0.673983\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.15 Page Number : 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 3.;\t\t\t#[bar] - Initial pressure\n",
+ "T_1 = 150. + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "Vel_1 = 90.;\t\t\t#[m/s] - Initial velocity\n",
+ "P_2 = 1.;\t\t\t#[bar] - Final pressure\n",
+ "eff = 0.95;\t\t\t# Adiabatic effciciency of the nozzle\n",
+ "R = 8.314;\t\t\t#[J/mol*-] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# At 3 bar and 150 C, from steam table\n",
+ "S_1 = 7.0778;\t\t\t#[kJ/kg-K]\n",
+ "H_1 = 2761.0;\t\t\t#[kJ/kg]\n",
+ "S_2 = S_1;\t\t\t# \n",
+ "\n",
+ "\t\t\t# At 1 bar saturated\n",
+ "S_liq = 1.3026;\t\t\t#[kJ/kg-K]\n",
+ "S_vap = 7.3594;\t\t\t#[kJ/kg-K]\n",
+ "H_liq = 417.46;\t\t\t#[kJ/kg]\n",
+ "H_vap = 2675.5;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# The dryness factor of exit steam can be determined as\n",
+ "x = (S_1-S_liq)/(S_vap-S_liq);\n",
+ "\t\t\t# Enthalpy of exit steam is given by \n",
+ "H_2 = H_liq*(1-x) + x*H_vap;\t\t\t#[kJ/kg]\n",
+ "delta_H_s = H_2 - H_1;\t\t\t#[kJ/kg] - Enthalpy change\n",
+ "delta_H_a = eff*delta_H_s;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# Assuming no heat exchange with surroundings and since no work is done\n",
+ "\t\t\t# delta_H + (delta_V**(2))/2 = 0\n",
+ "delta_Vel_square = 2*(-delta_H_a)*1000;\t\t\t#[m**(2)/s**(2)]\n",
+ "Vel_2 = (delta_Vel_square + Vel_1**(2))**(1./2);\t\t\t#[m/s]\n",
+ "\n",
+ "print \" 1).The final velocity when fluid is steam) is %f m/s\"%(Vel_2);\n",
+ "\n",
+ "\t\t\t# (2)\n",
+ "Y = 1.4;\t\t\t# Index of expansion\n",
+ "Cp_0 = (Y*R)/(Y-1);\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n",
+ "\n",
+ "\t\t\t# P_1**(1-Y)*T_1**(Y) = P_2**(1-Y)*T_2**(Y)\n",
+ "T_2 = T_1*(P_1/P_2)**((1-Y)/Y);\t\t\t#[K]\n",
+ "delta_H_s_2 = Cp_0*(T_2 - T_1);\t\t\t#[J/mol]\n",
+ "delta_H_a_2 = eff*delta_H_s_2;\t\t\t#[J/mol]\n",
+ "delta_H_a_2 = (delta_H_a_2*1000)/28.84;\t\t\t#[J/kg]\n",
+ "\n",
+ "delta_Vel_square_2 = 2*(-delta_H_a_2);\t\t\t#[m**(2)/s**(2)]\n",
+ "Vel_2_2 = (delta_Vel_square_2 + Vel_1**(2))**(1./2);\t\t\t#[m/s]\n",
+ "\n",
+ "print \" 2).The final velocity when fluid is air which behaves as an ideal gas) is %f m/s\"%(Vel_2_2);\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The final velocity when fluid is steam) is 608.291583 m/s\n",
+ " 2).The final velocity when fluid is air which behaves as an ideal gas) is 476.065890 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.16 Page Number : 169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P_1 = 300.;\t\t\t#[kPa] - Initial pressure\n",
+ "T_1 = 450.;\t\t\t#[K] - Initial temperature\n",
+ "Vel_1 = 90.;\t\t\t#[m/s] - Initial velocity\n",
+ "P_2 = 180.;\t\t\t#[kPa] - Final pressure\n",
+ "eff = 0.95;\t\t\t# Adiabatic effciciency of the nozzle\n",
+ "R = 8.314;\t\t\t#[J/mol*-] - Universal gas constant\n",
+ "Cp = 5.19;\t\t\t#[kJ/kg-K] - Specific heat capacity at constant pressure\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(a)\n",
+ "\n",
+ "\n",
+ "Mol_wt_He = 4;\t\t\t#[g/mol] - Molecular weight of helium\n",
+ "R_He = R/Mol_wt_He;\t\t\t# 'R' for helium\n",
+ "Y = Cp/(Cp - R_He);\n",
+ "\n",
+ "\t\t\t# Now temperature at exit to be determined\n",
+ "T_2s = T_1*(P_1/P_2)**((1-Y)/Y);\t\t\t#[K]\n",
+ "delta_H_2s = Cp*(T_2s - T_1);\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# Since no work is done and heat exchange is zero,from first law we get\n",
+ "\t\t\t# delta_H + delta_Vel**(2)/2 = 0\n",
+ "delta_Vel_square = 2*(-delta_H_2s)*1000;\t\t\t#[m**(2)/s**(2)]\n",
+ "Vel_2 = (delta_Vel_square)**(1./2);\t\t\t#[m/s] - ( as Vel_1 << Vel_2)\n",
+ "\n",
+ "print \" a).The maximum exit velocity is %f m/s\"%(Vel_2);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "T_2a = 373;\t\t\t#[K] - Measured temperature of helium\n",
+ "delta_H_a = Cp*(T_2a - T_1);\t\t\t#[kJ/kg]\n",
+ "delta_Vel_square_a = 2*(-delta_H_a)*1000;\t\t\t#[m**(2)/s**(2)]\n",
+ "Vel_2a = (delta_Vel_square_a)**(1./2);\t\t\t#[m/s] - ( as Vel_1 << Vel_2a)\n",
+ "\n",
+ "print \" b).The actual exit velocity is %f m/s\"%(Vel_2a);\n",
+ "\n",
+ "\t\t\t#(c)\n",
+ "delta_S_sys = Cp*math.log(T_2a/T_1) - R_He*math.log(P_2/P_1);\n",
+ "\t\t\t# we know that delta_S_sys = q/T_b + S_gen and since q = 0, therfore\n",
+ "S_gen = delta_S_sys;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \" c).The increasse in entropy per unit mass is %f kJ/kg-K\"%(S_gen);\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The maximum exit velocity is 929.607346 m/s\n",
+ " b).The actual exit velocity is 894.013423 m/s\n",
+ " c).The increasse in entropy per unit mass is 0.087748 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.17 Page Number : 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 1;\t\t\t#[bar] - Initial pressure\n",
+ "T_1 = 150 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "V_2 = 0.28;\t\t\t#[m**(3)/kg] - Final specific volume\n",
+ "T_2 = T_1;\t\t\t#[K] - Isothermal process\n",
+ "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# At 1 bar and 150 C, from steam table\n",
+ "S_1 = 7.6134;\t\t\t#[kJ/kg-K]\n",
+ "H_1 = 2776.4;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# At 150 C saturated\n",
+ "V_liq = 0.001091;\t\t\t#[m**(3)/kg]\n",
+ "V_vap = 0.3928;\t\t\t#[m**(3)/kg]\n",
+ "H_liq = 632.2;\t\t\t#[kJ/kg]\n",
+ "H_vap = 2746.5;\t\t\t#[kJ/kg]\n",
+ "S_liq = 1.8418;\t\t\t#[kJ/kg-K]\n",
+ "S_vap = 6.8379;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# The dryness factor of exit steam can be determined as\n",
+ "x = (V_2 - V_liq)/(V_vap - V_liq);\n",
+ "S_2 = S_liq*(1-x) + x*S_vap;\t\t\t#[kJ/kg-K] -Entropy \n",
+ "H_2 = H_liq*(1-x) + x*H_vap;\t\t\t#[kJ/kg] -Enthalpy \n",
+ "delta_H = H_2 - H_1;\t\t\t#[kJ/kg] - Enthalpy change\n",
+ "delta_S = S_2 - S_1;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# Since the compression is reversible\n",
+ "q = T_1*delta_S;\t\t\t#[kJ/kg] - Heat transfer\n",
+ "\t\t\t# From first law q - W = delta_H\n",
+ "W = q - delta_H;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "print \" 1).The amount of heat transfer when fluid is steam) is %f kJ/kg\"%(q)\n",
+ "print \" The amount of work transfer when fluid is steam) is %f kJ/kg\"%(W)\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "V_2 = V_2*(28.84/1000);\t\t\t#[m**(3)/mol] - Molar volume at exit\n",
+ "\t\t\t# Pressure at exit is given by \n",
+ "P_2 = ((R*T_2)/V_2);\t\t\t#[N/m**(2)]\n",
+ "P_2 = P_2*10**(-5);\t\t\t#[bar]\n",
+ "\n",
+ "\t\t\t# Entropy change is given by, delta_S_2 = Cp*math.log(T_2/T_1) - R*math.log(P_2/P_1), but since T_1 = T_2, therfore\n",
+ "delta_S_2 = - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "q_2 = T_1*delta_S_2;\t\t\t#[J/mol] - Heat change\n",
+ "q_2 = q_2/28.84;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# Enthalpy change is given by, delta_H_2 = Cp*(T_2 - T_1) = 0 (as T_1 = T_2)\n",
+ "delta_H_2 = 0;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# From first law q - W = delta_H, therefore\n",
+ "W_2 = q_2 - delta_H_2;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "print \" 2).The amount of heat transfer when fluid is ideal gas) is %f kJ/kg\"%(q_2)\n",
+ "print \" The amount of work transfer when fluid is ideal gas) is %f kJ/kg\"%(W_2)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The amount of heat transfer when fluid is steam) is -936.947741 kJ/kg\n",
+ " The amount of work transfer when fluid is steam) is -298.195149 kJ/kg\n",
+ " 2).The amount of heat transfer when fluid is ideal gas) is -179.526401 kJ/kg\n",
+ " The amount of work transfer when fluid is ideal gas) is -179.526401 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.18 Page Number : 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 7*10**(5);\t\t\t#[Pa] - Initial pressure\n",
+ "T_1 = 95 + 273.15;\t\t\t#[K] - Initial temperature\n",
+ "P_2 = 3.5*10**(5);\t\t\t#[Pa] - Final pressure\n",
+ "dia = 15*10**(-2);\t\t\t#[m] - Diameter of pipe\n",
+ "m = 2;\t\t\t#[kg/s] - Mass flow rate\n",
+ "R = 8.314;\t\t\t#[J/mol-K] - Universal gas constant\n",
+ "Y = 1.4;\t\t\t# Index of expansion\n",
+ "Cp_0 = (R*Y)/(Y-1);\t\t\t#[J/mol-K] - Specific heat capacity at constant pressure\n",
+ "Cp_0 = (Cp_0/28.84)*1000;\t\t\t#[J/kg-K]\n",
+ "rho_1 = 6.6;\t\t\t#[kg/m**(3)] - Density\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# velocity before throttling is to be determined m = rho*Vol*Area\n",
+ "V_1 = (R*T_1)/P_1;\t\t\t#[m**(3)/mol] - Specific volume\n",
+ "V_1 = (V_1/28.84)*1000;\t\t\t#[m**(3)/kg]\n",
+ "Vel_1 = m/(rho_1*3.14*(dia/2)**(2));\t\t\t#[m/s] - Velocity before throttling\n",
+ "\n",
+ "\t\t\t# Let the temperature after throttling be T_2, then\n",
+ "\t\t\t# Vel_2 = m/(rho_2*Area) = (m*V_2)/(3.14*(dia/2)**(2))\n",
+ "\t\t\t# From first law, since q = W = 0, we get\n",
+ "\t\t\t# delta_H + (delta_V**(2))/2 = 0\n",
+ "\t\t\t#Cp_0*(T_2 - T_1) + (((m*((((R*T_2)/P_2)/28.84)*1000))/(3.14*(dia/2)**(2)))**(2) - (Vel_1)**(2))/2 = 0\n",
+ "\t\t\t# Solving the above equation for T_2, we get\n",
+ "def f1(T_2): \n",
+ "\t return Cp_0*(T_2 - T_1) + (((m*((((R*T_2)/P_2)/28.84)*1000))/(3.14*(dia/2)**(2)))**(2) - (Vel_1)**(2))/2\n",
+ "T_2 =fsolve(f1,100)\n",
+ "\t\t\t# Therefore velocity of air downstream of restriction is given by \n",
+ "Vel_2 = ((m*((((R*T_2)/P_2)/28.84)*1000))/(3.14*(dia/2)**(2)));\t\t\t#[m/s]\n",
+ "\n",
+ "print \" The velocity of air downstream of restriction is %f m/s\"%(Vel_2);\n",
+ "\n",
+ "delta_T = (T_2 - T_1);\n",
+ "\t\t\t# Since temperature difference (delta_T) is very small, therefore enthalpy change is also very small\n",
+ "\n",
+ "\t\t\t# Entropy change is given by, delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1), but since T_1 and T_2 are almost equal\n",
+ "delta_S = - R*math.log(P_2/P_1);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "print \" The change in entropy is %f kJ/mol-k\"%(delta_S);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The velocity of air downstream of restriction is 34.295216 m/s\n",
+ " The change in entropy is 5.762826 kJ/mol-k\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch5_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch5_2.ipynb new file mode 100755 index 00000000..6f1963f8 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch5_2.ipynb @@ -0,0 +1,743 @@ +{
+ "metadata": {
+ "name": "ch5_2",
+ "signature": "sha256:beb354ab1f11a4413c580f54f984be6db9b7dd2c39bed82bc1f4874533d75759"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Exergy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page Number : 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 500+273.15;\t\t\t#[C] - Condensation temperature\n",
+ "T_2 = 250+273.15;\t\t\t#[C] - Temperature at which vaporization takes place.\n",
+ "\n",
+ "T_3 = 25+273.15;\t\t\t#[C] - Ambient atmospheric temperature.\n",
+ "\n",
+ "Q = 1;\t\t\t\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#The exergy content of the vapour at 500 C,\n",
+ "Ex_T_1 = Q*(1-(T_3/T_1));\n",
+ "Ex_T_2 = Q*(1-(T_3/T_2));\n",
+ "\t\t\t#Therefore,loss in exergy is given by\n",
+ "Ex_loss = Ex_T_1 - Ex_T_2;\n",
+ "\t\t\t#Fraction of exergy lost due to irreversible process is,\n",
+ "Ex_fraction =(Ex_loss/Ex_T_1);\n",
+ "\n",
+ "# Results\n",
+ "print \" The fraction of exergy lost due to irreversible process is %f\"%(Ex_fraction);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The fraction of exergy lost due to irreversible process is 0.299954\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page Number : 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T_1 = 300.;\t\t\t#[K] - Initial temperature.\n",
+ "P_1 = 100.;\t\t\t#[kPa] - Initial pressure.\n",
+ "T_2 = 500.;\t\t\t#[K] - Final temperature.\n",
+ "T_0 = 300.;\t\t\t#[K] - Environment temperature.\n",
+ "P_0 = 1.;\t\t\t#[atm] - Environment pressure.\n",
+ "R = 8.314;\t\t\t#[J/mol*K]\n",
+ "\t\t\t#(Cp_0/R)= 3.626\n",
+ "Cp_0 = 3.626*R;\t\t\t#[J/mol-K] - Heat capacity at constant pressure\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1).\n",
+ "\t\t\t#The availability change is given by, (phi_1 - phi_2) = U_1 - U_2 + P_0*(V_1 - V_2) - T_0*(S_1 - S_2)\n",
+ "\t\t\t#Let us determine the change in internal energy\n",
+ "\n",
+ "\t\t\t#For ideal gas Cp_0 - Cv_0 = R, and therefore\n",
+ "Cv_0 = ((Cp_0/R)- 1)*R;\t\t\t#[J/mol-K] - Heat capacity at constant volume\n",
+ "delta_U = Cv_0*(T_2-T_1);\t\t\t#[J/mol]\n",
+ "\t\t\t#delta_U = -w (from energy balance). Therefore, U1-U2 = -delta_U.\n",
+ "\t\t\t#The entropy change of ideal gas is given by\n",
+ "\t\t\t#delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1), but,(P1*V1/T1) = (P1*V1/T1) and therefore (P2/P1) = (T2/T1)\n",
+ "delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(T_2/T_1);\t\t\t#[J/mol-K]\n",
+ "\t\t\t#The exergy change is given by, (phi_1 - phi_2) = U_1 - U_2 + P_0*(V_1 - V_2) - T_0*(S_1 - S_2)\n",
+ "\t\t\t#(V_1 - V_2) = 0, because the tank is rigid and so the volume is constant\n",
+ "delta_phi = (-delta_U) - T_0*(-delta_S);\t\t\t#[J/mol]\n",
+ "print \" 1).The change in exergy is %f J/mol\"%(delta_phi);\n",
+ "\n",
+ "\t\t\t#(2).\n",
+ "\t\t\t#Entropy change of the system is given by, delta_S_sys = q/T_b + S_gen\n",
+ "\t\t\t#Since the system is adiabatic therefore, delta_S_sys = S_gen\n",
+ "S_gen = delta_S;\n",
+ "\t\t\t#Irreversibility is given by\n",
+ "i = T_0*S_gen;\t\t\t#[J/mol]\n",
+ "print \" 2).The value of irreversibility is %f J/mol\"%(i);\n",
+ "\t\t\t#Irreversibility can also be determined using\n",
+ "\t\t\t#i = (W_rev_use - W_use)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The change in exergy is -1020.722863 J/mol\n",
+ " 2).The value of irreversibility is 3345.789937 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page Number : 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "# Variables\n",
+ "P_1 = 15.;\t\t\t#[bar] - Initial pressure\n",
+ "P_1 = P_1*10**(5);\t\t\t#[Pa]\n",
+ "T_1 = 300.+273.15;\t\t\t#[K] - Initial temperature\n",
+ "T_0 = 298.15;\t\t\t#[K]\n",
+ "T_R = 1200.;\t\t\t#[K] - Reservoir temerature.\n",
+ "P_0 = 1.;\t\t\t#[bar]\n",
+ "P_0 = P_0*10**(5);\t\t\t#[Pa]\n",
+ "n = 1.;\t\t\t#[mol] - No of moles\n",
+ "R = 8.314;\t\t\t#[J/mol*K]\n",
+ "Y = 1.4;\t\t\t# - Ratio of heat capacities.\n",
+ "Cv_0 = R/(Y-1);\t\t\t#[J/mol-K] - Heat capacity at constant volume\n",
+ "Cp_0 = Cv_0 + R;\t\t\t#[J/mol-K] - Heat capacity at constant pressure\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t#V_2 = 2*V_1 and since pressure is constant,we get (V_1/T_1) = (2*V_1/T_1), or, T_2 = 2*T_1.\n",
+ "T_2 = 2*T_1;\t\t\t#[K]\n",
+ "W = P_1*(((R*T_2)/P_1)-((R*T_1)/P_1));\t\t\t#[J/mol] - Actual work done\n",
+ "delta_U = Cv_0*(T_2-T_1);\t\t\t#[J/mol] - Change in internal energy.\n",
+ "q = W + delta_U;\t\t\t#[J/mol] - Heat change\n",
+ "\t\t\t#Now the availability change is given by, (phi_1 - phi_2) = U_1 - U_2 + P_0*(V_1 - V_2) - T_0*(S_1 - S_2) + q*(1-(T_0/T_R))\n",
+ "\t\t\t#delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1), and P_1 = P_2, Therefore\n",
+ "delta_S = Cp_0*math.log(T_2/T_1);\t\t\t#[J/mol-K] - Entropy change.\n",
+ "\t\t\t#Substituting expressions for delta_phi calculation. Decrease in availability is given by,\n",
+ "delta_phi = (-delta_U) + P_0*(((R*T_1)/P_1)-((R*T_2)/P_1)) - T_0*(-delta_S) + q*(1-(T_0/T_R));\t\t\t#[J/mol]\n",
+ "\t\t\t#Actual work done is given by, W = P_1*(V2-V1)\n",
+ "\t\t\t#Work done to print lace the atmosphere is given by, W = P_0*(V_2-V_1)\n",
+ "\t\t\t#Therefore, W_use = (P_1*(V2-V1) - P_0*(V2-V1))\n",
+ "W_use = (P_1-P_0)*(((R*T_2)/P_1)-((R*T_1)/P_1));\t\t\t#[J/mol] - useful work done\n",
+ "W_rev_use = delta_phi;\t\t\t# reversible useful work done\n",
+ "\t\t\t#Irreversibility is given by,\n",
+ "i = W_rev_use - W_use;\t\t\t#[J/mol]\n",
+ "print \" a).When the system is confined at constant pressure by a piston and is heated until it's volume is doubled \\n the ireversibility value is %f J/mol\"%(i);\n",
+ "\n",
+ "\t\t\t#The irreversibility can also be calculated using \n",
+ "\t\t\t# i = T_0*S_gen\n",
+ "\t\t\t#S_gen = delta_S - (q/T_R)\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "\t\t\t#V2 = 2*V_1 and therefore T_2 = 2*T_1, as P_2 = P_1\n",
+ "\t\t\t#Actual work done is same as before\n",
+ "\t\t\t#Let work done on stirrer be W_stir. Thus net work done by the system is W - W_stir.Fron energy balance we get,\n",
+ "W_stir = W + delta_U;\n",
+ "\t\t\t#Initially the exergy is due to that of the system at state 1 and stirrer work,'W_stir' and finally we have the exergy due to system at state 2,the stirrer work is spent,thus availability is given by\n",
+ "delta_phi_b = (-delta_U) + P_0*(((R*T_1)/P_1)-((R*T_2)/P_1)) - T_0*(-delta_S) + W_stir;\t\t\t#[J/mol]\n",
+ "W_rev_use_b = delta_phi_b;\t\t\t# reversible useful work done\n",
+ "W_use_b = W_use;\t\t\t# useful work done\n",
+ "\t\t\t#Now the irreversibility is given by,\n",
+ "i_b = W_rev_use_b - W_use_b;\t\t\t#[J/mol]\n",
+ "print \" b).When the system is confined at constant pressure by a piston and is stirred until it's volume is doubled \\n the ireversibility value is %f J/mol\"%(i_b);\n",
+ "\n",
+ "\t\t\t#The irreversibility can also be calculated using \n",
+ "\t\t\t# i_b = T_0*S_gen\n",
+ "\t\t\t#S_gen = delta_S - (q/T_R) and here, q = 0\n",
+ "\n",
+ "\t\t\t#(c)\n",
+ "P_2_c = 10;\t\t\t#[bar] - Final pressure, (Given)\n",
+ "P_2_c = P_2_c*10**(5);\t\t\t#[Pa]\n",
+ "\t\t\t#(P_1**(1-Y))*(T_1**(Y)) = (P_2**(1-Y))*(T_2**(Y))\n",
+ "T_2_c = T_1*((P_1/P_2_c)**((1-Y)/Y));\t\t\t#[K]\n",
+ "\t\t\t#Work done is given by, W = -delta_U = -Cv_0*(T_2_c - T_1)\n",
+ "W_c = -Cv_0*(T_2_c - T_1);\t\t\t#[J/mol]\n",
+ "\t\t\t#The final molar volume is calculated using P_1*V_1**(Y) = P_2*V_2**(Y)\n",
+ "\t\t\t#V_2 = V_1*((P_1/P_2_c)**(1/Y))\n",
+ "V_1 = (R*T_1)/P_1;\t\t\t#[cubic metre/mol] - Initial molar volume\n",
+ "V_2 = V_1*((P_1/P_2_c)**(1/Y));\t\t\t#[cubic metre/mol] - Final molar volume\n",
+ "\t\t\t#Now let us determine the work done to print lace the atmosphere,\n",
+ "W_atm_c = P_0*(V_2 - V_1);\t\t\t#[J/mol] - work done to print lace the atmosphere\n",
+ "\t\t\t#Thus useful work is given by,\n",
+ "W_use_c = W - W_atm_c;\t\t\t#[J/mol] - useful work done\n",
+ "\t\t\t#Here delta_S = 0,for reversible adiabatic process.Therefore,\n",
+ "W_rev_use_c = W_use_c;\n",
+ "\t\t\t#Now finally the irreversibility is given by,\n",
+ "i_c = W_rev_use_c - W_use_c;\t\t\t#[J/mol]\n",
+ "print \" c).When the system expands reversibly and adiabatically behind a piston \\n the ireversibility value is %f J/mol\"%(i_c);\n",
+ "\n",
+ "\t\t\t#(d)\n",
+ "\t\t\t#Here temperature is constant,but V_2 = 2*V_1, therefore P_2 = P_1/2\n",
+ "V_2_d = 2*V_1;\n",
+ "P_2_d = P_1/2;\n",
+ "\t\t\t#Under isothermal conditions work done is\n",
+ "W_d = R*T_1*math.log(V_2_d/V_1);\t\t\t#[J/mol]\n",
+ "\t\t\t#Work done to print lace the atmosphere is given by,\n",
+ "W_atm_d = P_0*(V_2_d - V_1);\t\t\t#[J/mol] - work done to print lace the atmosphere\n",
+ "\t\t\t#Thus useful work is given by,\n",
+ "W_use_d = W_d - W_atm_d;\t\t\t#[J/mol] - useful work done\n",
+ "delta_U_d = 0;\t\t\t#isothermal conditions\n",
+ "q_d = W_d;\t\t\t# since, delta_U_d = 0\n",
+ "\t\t\t#delta_S_d = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1), and T_1 = T_2, Therefore\n",
+ "delta_S_d = -R*math.log(P_2_d/P_1);\t\t\t#[J/mol-K] - Entropy change\n",
+ "\t\t\t#The reversible useful work is given by,\n",
+ "W_rev_use_d = P_0*(V_1 - V_2_d) - T_0*(-delta_S_d) + q_d*(1-(T_0/T_R));\t\t\t#[J/mol] - Reversible useful work done.\n",
+ "\t\t\t#The irreversibility is given by,\n",
+ "i_d = W_rev_use_d - W_use_d;\t\t\t#[J/mol]\n",
+ "print \" d).When the system expands reversibly and isothermally behind a piston until it's volume is doubled \\n the ireversibility value is %f J/mol\"%(i_d);\n",
+ "\n",
+ "\t\t\t#(e)\n",
+ "P_2_e = 10;\t\t\t#[bar] - Final pressure, (Given)\n",
+ "P_2_e = P_2_e*10**(5);\t\t\t#[Pa]\n",
+ "\t\t\t#During the expansion of an ideal gas in into vacuum the temperature of the gas remains the same,\n",
+ "T_2_e = T_1;\t\t\t# Final temperature\n",
+ "\t\t\t#Since boundary of the system is fixed so no net work is done, W = 0 and thus\n",
+ "W_use_e = 0;\t\t\t#[J/mol] - Useful work done\n",
+ "\t\t\t#Here, delta_U = 0,as temperature is same and\n",
+ "\t\t\t#(V_1-V_2) = 0,as for overall system there is no change in volume\n",
+ "delta_S_e = - R*math.log(P_2_e/P_1);\t\t\t#[J/mol-K] - Entropy change\n",
+ "\t\t\t#The reversible useful work is given by,\n",
+ "W_rev_use_e = - T_0*(-delta_S_e);\t\t\t#[J/mol] - Reversible useful work done.\n",
+ "\t\t\t#The irreversibility is given by,\n",
+ "i_e = W_rev_use_e - W_use_e;\t\t\t#[J/mol]\n",
+ "print \" e).When the system expands adiabatically into an adjacent chamber \\n the ireversibility value is %f J/mol\"%(i_e);\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).When the system is confined at constant pressure by a piston and is heated until it's volume is doubled \n",
+ " the ireversibility value is 1869.841742 J/mol\n",
+ " b).When the system is confined at constant pressure by a piston and is stirred until it's volume is doubled \n",
+ " the ireversibility value is 6013.652646 J/mol\n",
+ " c).When the system expands reversibly and adiabatically behind a piston \n",
+ " the ireversibility value is 0.000000 J/mol\n",
+ " d).When the system expands reversibly and isothermally behind a piston until it's volume is doubled \n",
+ " the ireversibility value is 897.537657 J/mol\n",
+ " e).When the system expands adiabatically into an adjacent chamber \n",
+ " the ireversibility value is 1005.074654 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page Number : 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 150+273.15;\t\t\t#[K] - Initial temperature.\n",
+ "m = 4.6;\t\t\t#[kg] - mass of water\n",
+ "P_1 = 1;\t\t\t#[MPa] - Initial pressure\n",
+ "Q = 11000;\t\t\t#[kJ] - Heat transferred to the system.\n",
+ "T_R = 600+273.15;\t\t\t#[K] - Temperature of the reservior.\n",
+ "T_0 = 298;\t\t\t#[K] - Temperature of the environment\n",
+ "P_0 = 100;\t\t\t#[kPa] - Pressure of the environment\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t#The entropy change of an isothermal system undergoing an internally reversible process is given by,\n",
+ "delta_S_t = (Q/T_1);\t\t\t#[kJ] - Entropy change\n",
+ "delta_S = delta_S_t/m;\t\t\t#[kJ/kg-K] - \n",
+ "\n",
+ "\t\t\t#At 150 C,it has been reported in the book that, P_sat - 0.4758 kPa, V_liq = 0.001091 m**(3)/kg, U_liq = 631.68 kJ/kg, S_liq = 1.8418 kJ/kg-K, S_vap = 6.8379 kJ/kg-K\n",
+ "V_1 = 0.001091;\t\t\t#[m**(3)/kg] - initial specific volume\n",
+ "U_1 = 631.68;\t\t\t#[kJ/kg] - initial specific internal energy\n",
+ "S_1 = 1.8418;\t\t\t#[kJ/kg-K] - initial entropy\n",
+ "\t\t\t#The initial state of the water is a compressed liquid state,and S_1 is therefore equal to the entropy of the saturated liquid of the saturated liquid at the same temperature.\n",
+ "S_2 = S_1 + delta_S;\t\t\t#[kJ/kg-K] - Final entropy\n",
+ "\n",
+ "\t\t\t#At the final state the temperature is 150 C and S = 7.499 kJ/kg-K which is more than S_vap therefore it is superheated steam.\n",
+ "S_final = 7.494;\t\t\t#[kJ/kg-K]\n",
+ "\t\t\t#At 150 C, and 0.1 MPa: V = 1.9364 m**(3)/kg, U = 2582.8 kJ/kg, S = 7.6134 kJ/kg-K\n",
+ "\t\t\t#At 150 C, and 0.2 MPa: V = 0.9596 m**(3)/kg, U = 2576.9 kJ/kg, S = 7.2795 kJ/kg-K\n",
+ "U_t_1 = 2582.8;\t\t\t#[kJ/kg] - Internal energy\n",
+ "U_t_2 = 2576.9;\t\t\t#[kJ/kg]\n",
+ "V_t_1 = 1.9364;\t\t\t#[m**(3)/kg] - Specific volume\n",
+ "V_t_2 = 0.9596;\t\t\t#[m**(3)/kg]\n",
+ "S_t_1 = 7.6134;\t\t\t#[kJ/kg-K] - Entropy\n",
+ "S_t_2 = 7.2795;\t\t\t#[kJ/kg-K]\n",
+ "\t\t\t#The pressure at exit is given by,\n",
+ "P_2 = ((S_final - S_t_1)/(S_t_2 - S_t_1))*(0.2 - 0.1) + 0.1;\t\t\t#[Mpa] - Final pressure\n",
+ "\t\t\t#At final state\n",
+ "U_2 = U_t_1 + (U_t_2 - U_t_1)*((S_final - S_t_1)/(S_t_2 - S_t_1));\t\t\t#[kJ/kg] - Final specific internal energy\n",
+ "V_2 = V_t_1 + (V_t_2 - V_t_1)*((S_final - S_t_1)/(S_t_2 - S_t_1));\t\t\t#[m**(3)/kg] - Final specific volume\n",
+ "\n",
+ "q = Q/m;\t\t\t#[kJ/kg] - Heat supplied per unit kg of mass.\n",
+ "W_rev_use = U_1 - U_2 + P_0*(V_1 - V_2) - T_0*(S_1 - S_2) + q*(1 - (T_0/T_R));\t\t\t#[kJ/kg] - Reversible useful work done.\n",
+ "\n",
+ "\t\t\t#Now let us calculate the actual work done. We know q - W = delta_U, therefore\n",
+ "W = q - (U_2 - U_1);\t\t\t#[kJ/kg] - Work done\n",
+ "W_use = W - P_0*(V_2 - V_1);\t\t\t#[kJ/kg]\n",
+ "i = W_rev_use - W_use;\t\t\t#[kJ/kg] - Irreversibility\n",
+ "\t\t\t#Since the system contains 4.6 g therefore, \n",
+ "W_use_new = W_use*m;\t\t\t#[kJ]\n",
+ "W_rev_use_new = W_rev_use*m;\t\t\t#[kJ]\n",
+ "I = W_rev_use_new - W_use_new;\t\t\t#[kJ]\n",
+ "\n",
+ "# Results\n",
+ "print \" 1).The useful work obtained is %f kJ\"%(W_use_new);\n",
+ "print \" 2).The reversible usefuk work done is %f kJ\"%(W_rev_use_new);\n",
+ "print \" 3).The irreversibility is %f kJ\"%(I);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The useful work obtained is 1304.987050 kJ\n",
+ " 2).The reversible usefuk work done is 5297.425775 kJ\n",
+ " 3).The irreversibility is 3992.438725 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page Number : 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 700+273.15;\t\t\t#[K] - Initial temperature.\n",
+ "P_1 = 12;\t\t\t#[MPa] - Initial pressure\n",
+ "P_2 = 0.6;\t\t\t#[MPa] - Final pressure\n",
+ "\t\t\t#At 12 MPa and 700 C,\n",
+ "H_1 = 3858.4;\t\t\t#[kJ/kg] - initial enthalpy\n",
+ "S_1 = 7.0757;\t\t\t#[kJ/kg-K] - initial entropy\n",
+ "\n",
+ "\t\t\t#At 0.6 MPa and 200 C,\n",
+ "H_2 = 2850.1;\t\t\t#[kJ/kg]\n",
+ "S_2 = 6.9673;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "\t\t\t#At 0.6 MPa and 250 C,\n",
+ "H_3 = 2957.2;\t\t\t#[kJ/kg]\n",
+ "S_3 = 7.1824;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "\t\t\t#At 0.6 MPa and 300 C,\n",
+ "H_4 = 3061.6;\t\t\t#[kJ/kg]\n",
+ "S_4 = 7.3732;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\n",
+ "P_exit = P_2;\t\t\t#[MPa] - exit pressure\n",
+ "T_exit = ((S_1 - S_2)/(S_3 - S_2))*(250 - 200) + 200;\t\t\t#[C] - exit temperature\n",
+ "H_exit = ((S_1 - S_2)/(S_3 - S_2))*(H_3 - H_2) + H_2;\t\t\t#[kJ/kg] - exit enthalpy\n",
+ "\n",
+ "\t\t\t#Snce it is a flow pocess,therfore\n",
+ "\t\t\t#W_rev = H_1 - H_exit - T_0*(S_1 - S_2)\n",
+ "\t\t\t#As S_1 = S_2,the above equation becomes\n",
+ "W_rev_1 = H_1 - H_exit;\t\t\t#[kJ/kg] - reversible work done\n",
+ "\n",
+ "\t\t\t#From the first law the actual work done can be calculated using, delta_H = q - W\n",
+ "\t\t\t#Since the turbine does not exchange heat,therefore W = - delta_H.\n",
+ "W_1 = - (H_exit - H_1);\t\t\t#[kJ/kg]\n",
+ "\n",
+ "print \" 1).The reversible work done is %f kJ/kg\"%(W_1);\n",
+ "print \" And since the maximum work is same as the actual work ,therefore irreversibility is zero\"\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# Variables\n",
+ "T_0 = 298.15;\t\t\t#[K] - Environment temperature\n",
+ "P_0 = 1;\t\t\t#[atm] - Environment pressure\n",
+ "adi_eff = 0.88;\t\t\t#adiabatc efficiency\n",
+ "\n",
+ "\t\t\t#(H_1 - H_exit_actual)/(H_1 - H_exit) = 0.88, therefore\n",
+ "H_exit_actual = H_1 - 0.88*(H_1 - H_exit);\t\t\t# - Actual exit enthalpy\n",
+ "\n",
+ "\t\t\t#Now two properties i.e pressure = 0.6 MPa and enthalpy = H_exit_actual is fixed at the exit. The exit temperature is given by,\n",
+ "T_exit_actual = ((H_exit_actual - H_3)/(H_4 - H_3))*(300 - 250) + 250;\t\t\t#[C]\n",
+ "S_exit_actual = ((H_exit_actual - H_3)/(H_4 - H_3))*(S_4 - S_3) + S_3;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t#Now reversible work done is given by,\n",
+ "W_rev_2 = H_1 - H_exit_actual - T_0*(S_1 - S_exit_actual);\t\t\t#[kJ/kg]\n",
+ "print \" 2).The reversible work done is %f kJ/kg\"%(W_rev_2);\n",
+ "\n",
+ "\t\t\t#The actual work is given by the first law,\n",
+ "W_2 = H_1 - H_exit_actual;\t\t\t#[kJ/kg] - Actual work done\n",
+ "i = W_rev_2 - W_2;\t\t\t#[kJ/kg] - irreversibility\n",
+ "print \" The value of irreversibility is %f kJ/kg\"%(i);\n",
+ "\n",
+ "\t\t\t#The irreversibility can also be determined using\n",
+ "\t\t\t# i = T_0*S_gen, and S_gen is given by\n",
+ "\t\t\t# S_gen = (q/T_R) - delta_S\n",
+ "\n",
+ "\t\t\t#The second law efficiency of the turbine is actual work done divided by reversible work,therefore\n",
+ "sec_eff = W_2/W_rev_2;\n",
+ "print \" The second law efficiency of the turbine is %f\"%(sec_eff);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The reversible work done is 954.326778 kJ/kg\n",
+ " And since the maximum work is same as the actual work ,therefore irreversibility is zero\n",
+ " 2).The reversible work done is 905.072590 kJ/kg\n",
+ " The value of irreversibility is 65.265025 kJ/kg\n",
+ " The second law efficiency of the turbine is 0.927890\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page Number : 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "P_1 = 8.;\t\t\t#[bar] - Initial pressure\n",
+ "T_1 = 93. + 273.15;\t\t\t#[C] - Initial temperature\n",
+ "V_1 = 100.;\t\t\t#[m/s] - Initial velocity\n",
+ "P_2 = 1.25;\t\t\t#[bar] - Exit pressure\n",
+ "T_2 = 27. + 273.15;\t\t\t#[C] - Exit temperature\n",
+ "V_2 = 60.;\t\t\t#[m/s] - Exit velocity \n",
+ "Y = 1.4;\t\t\t#Ratio of specific heat capacities\n",
+ "T_0 = 298.15;\t\t\t#[K] - surrounding temperature\n",
+ "P_0 = 1.;\t\t\t#[bar] - surrounding pressure\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Gas constant\n",
+ "Cp_0 = (R*Y)/(Y-1);\t\t\t#[J/mol-K] - Heat capacity at constant pressure\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\n",
+ "\t\t\t#W = delta_H + (delta_V_square)/2\n",
+ "delta_H = Cp_0*(T_2 - T_1);\t\t\t#[J/mol] - enthalpy change\n",
+ "delta_H = (delta_H/28.84);\t\t\t#[kJ/kg] - (1 mole = 28.84 g).\n",
+ "delta_V_square = V_2**(2) - V_1**(2);\n",
+ "\n",
+ "W = - delta_H - ((delta_V_square)/2)/1000;\t\t\t#[kJ/kg] - Actual work done\n",
+ "print \" The actual work done is %f kJ/kg\"%(W);\n",
+ "\n",
+ "\t\t\t#Now let us calculate the maximum work that can be obtained\n",
+ "\t\t\t#W_rev = (H_1 + (V_1**(2))/2) - (H_2 + (V_2**(2))/2) - T_0*(S_1 - S_2)\n",
+ "delta_S = Cp_0*math.log(T_2/T_1) - R*math.log(P_2/P_1);\t\t\t#[J/mol-K] - Entropy change\n",
+ "delta_S = delta_S/28.84;\t\t\t#kJ/kg-K]\n",
+ "W_rev = -delta_H - ((delta_V_square/2)/1000) + T_0*delta_S;\t\t\t#[kJ/kg]\n",
+ "print \" The maximum work obtainable per kg of air is %f kJ/kg\"%(W_rev);\n",
+ "\n",
+ "\t\t\t#The second law efficiency of the turbine is actual work done divided by reversible work,therefore\n",
+ "sec_eff = W/W_rev;\n",
+ "print \" The second law efficiency of the turbine is %f\"%(sec_eff);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The actual work done is 69.792718 kJ/kg\n",
+ " The maximum work obtainable per kg of air is 169.550182 kJ/kg\n",
+ " The second law efficiency of the turbine is 0.411635\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.7 Page Number : 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "m_cold_water = 60;\t\t\t#[kg/s] - mass flow rate of cold water\n",
+ "P_1 = 50;\t\t\t#[kPa]\n",
+ "T_2 = 250;\t\t\t#[C]\n",
+ "T_water_1 = 1000 + 273.15;\t\t\t#[K] - Entering temperature of water\n",
+ "T_water_2 = 450 +273.15;\t\t\t#[K] - Exit temperature of water\n",
+ "T_0 = 298.15;\t\t\t#[K] - surrounding temperature\n",
+ "P_0 = 1;\t\t\t#[atm] - surrounding pressure\n",
+ "Cp_0 = 1.005;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "\t\t\t#For water at 50 kPa under saturated conditions,T_sat = 81.33 C, \n",
+ "H_liq_1 = 340.49;\t\t\t#[kJ/kg] - Enthalpy\n",
+ "S_liq_1 = 1.0910;\t\t\t#[kJ/kg-K] - Entropy\n",
+ "\n",
+ "\t\t\t#For steam at 50 kPa and 250 C,\n",
+ "H_2 = 2976.0;\t\t\t#[kJ/kg]\n",
+ "S_2 = 8.3556;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\n",
+ "\n",
+ "m_hot_water = (m_cold_water*(H_2 - H_liq_1))/(Cp_0*(T_water_1 - T_water_2));\t\t\t#[kg/s] - mass flow rate of hot water\n",
+ "\n",
+ "\n",
+ "\t\t\t#S_gen = delta_S_hot + delta_S_cold\n",
+ "delta_S_cold = S_2 - S_liq_1;\t\t\t#[kJ/kg-K] - change of entropy of cold water\n",
+ "\t\t\t#delta_S_hot = Cp_0*math.log(T_2/T_1)-R*math.log(P_2/P_1), But pressure drop is zero,therfore\n",
+ "delta_S_hot = Cp_0*math.log(T_water_2/T_water_1);\t\t\t#[kJ/kg-K] - change of entropy of hot water\n",
+ "\n",
+ "S_gen = m_cold_water*delta_S_cold + m_hot_water*delta_S_hot;\t\t\t#[kW/K] - Entropy generated\n",
+ "print \" The entropy generation rate is %f kW/K\"%(S_gen);\n",
+ "\n",
+ "\t\t\t#The irreversibility rete is given by\n",
+ "I = T_0*S_gen;\t\t\t#[kW]\n",
+ "print \" The irreversibility rate of the heat exchanger is %f kW\"%(I);\n",
+ "\n",
+ "\t\t\t\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The entropy generation rate is 273.250824 kW/K\n",
+ " The irreversibility rate of the heat exchanger is 81469.733193 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.8 Page Number : 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "m_water = 10000.;\t\t\t#[kg/h] - Mass flow rate of cold water\n",
+ "m_water = m_water/3600;\t\t\t#[kg/s]\n",
+ "T_1_water = 30. + 273.15;\t\t\t#[K] - Cold water entering temperature\n",
+ "m_HC = 5000.;\t\t\t#[kg/h] - mass flow rate of hot hydrocarbon\n",
+ "m_HC = m_HC/3600;\t\t\t#[kg/s]\n",
+ "T_1_HC = 200. + 273.15;\t\t\t#[K] - Hot hydrocarbon entering temperature\n",
+ "T_2_HC = 100. + 273.15;\t\t\t#[K] - Hot hydrocarbon leaving temperature\n",
+ "Cp_0_water = 1.0;\t\t\t#[kcal/kg-K] - Mean heat capacity of cooling water\n",
+ "Cp_0_HC = 0.6;\t\t\t#[kcal/kg-K] - Mean heat capacity of hydrocarbon\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t#Applying energy balance to the heat exchanger,we get\n",
+ "\t\t\t#m_water*Cp_0_water*(T - T_1_water) = m_HC*Cp_0_HC*(T_1_HC - T_2_HC)\n",
+ "T_2_water = ((m_HC*Cp_0_HC*(T_1_HC - T_2_HC))/(m_water*Cp_0_water)) + T_1_water;\t\t\t#[K]\n",
+ "T_2 = T_2_water - 273.15;\t\t\t#[C]\n",
+ "print \" 1).The exit temperature of the cooling water is %f C\"%(T_2);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t#delta_S_hot_HC = Cp_0*math.log(T_2/T_1)-R*math.log(P_2/P_1), But pressure drop is zero,therfore\n",
+ "delta_S_hot_HC = (Cp_0_HC*4.184)*math.log(T_2_HC/T_1_HC);\t\t\t#[kW/K] - change of entropy of hot hydrocarbon\n",
+ "delta_S_HC = m_HC*delta_S_hot_HC;\t\t\t#[kW/K] - Entropy change for hudrocarbon liquid \n",
+ "print \" 2).Entropy change rate of hydrocarbon liquid is %f kW/K\"%(delta_S_HC);\n",
+ "\n",
+ "delta_S_cold_water = (Cp_0_water*4.184)*math.log(T_2_water/T_1_water);\t\t\t#[kW/K] - change of entropy of cooling water\n",
+ "delta_S_water = m_water*delta_S_cold_water;\t\t\t#[kW/K] - Entropy change for water\n",
+ "print \" And entropy change rate of water is %f kW/K\"%(delta_S_water);\n",
+ "\n",
+ "\t\t\t#(3)\n",
+ "T_0 = 298.15;\t\t\t#[K] - Surrounding temperature\n",
+ "\t\t\t#S_gen = delta_S_cold_water + delta_S_hot_HC = m_water*delta_S_cold_water + m_HC*delta_S_hot_HC;\t\t\t#[kW/K] - Entropy generated\n",
+ "S_gen = delta_S_water + delta_S_HC;\t\t\t#[kW/K]\n",
+ "I = T_0*S_gen;\t\t\t#[kW]\n",
+ "print \" 3).The irreversibility rate of the heat exchanger is %f kW\"%(I);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The exit temperature of the cooling water is 60.000000 C\n",
+ " 2).Entropy change rate of hydrocarbon liquid is -0.827846 kW/K\n",
+ " And entropy change rate of water is 1.096732 kW/K\n",
+ " 3).The irreversibility rate of the heat exchanger is 80.168382 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.9 Page Number : 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1_hotgas = 800.;\t\t\t#[K]\n",
+ "P_1_hotgas = 1.;\t\t\t#[bar]\n",
+ "T_2_hotgas = 700.;\t\t\t#[K]\n",
+ "P_2_hotgas = 1.;\t\t\t#[bar]\n",
+ "T_1_air = 470.;\t\t\t#[K]\n",
+ "P_1_air = 1.;\t\t\t#[bar]\n",
+ "P_2_air = 1.;\t\t\t#[bar]\n",
+ "Cp_0_hotgas = 1.08;\t\t\t#[kJ/kg-K] - Mean heat capacity of hot gas\n",
+ "Cp_0_air = 1.05;\t\t\t#[kcal/kg-K] - Mean heat capacity of air\n",
+ "T_0 = 298.15;\t\t\t#[K] - surrounding temperature\n",
+ "P_0 = 1.;\t\t\t#[bar] - surrounding pressure\n",
+ "\t\t\t#m_air = 2*m_hotgas\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t#Assuming heat exchange only takes places in-between the streams,from energy balance we get,\n",
+ "\t\t\t#m_gas*Cp_0_hotgas*(T_2_hotgas - T_1_hotgas) + 2*m_gas*Cp_0_air*(T - T_1_air), \n",
+ "T_2_air = T_1_air - ((Cp_0_hotgas*(T_2_hotgas - T_1_hotgas))/(2*Cp_0_air));\t\t\t#[K] - Temp of emerging air\n",
+ "print \" 1).The temperature of emerging air is %f K\"%(T_2_air);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t#Availability change of hot gas is given by,\n",
+ "\t\t\t#(si_1 - si_2)_hot = H_1 - H_2 - T_0*(S_1 - S_2)\n",
+ "delta_H_hotgas = (Cp_0_hotgas*(T_2_hotgas - T_1_hotgas));\t\t\t#[kJ/kg] - change in enthalpy of hotgas\n",
+ "\t\t\t#delta_S_hotgas = Cp_0_hotgas*math.log(T_2_hotgas/T_1_hotgas)- R*math.log(P_2/P_1), But pressure drop is zero (P_1 = P_2),therfore\n",
+ "delta_S_hotgas = Cp_0_hotgas*math.log(T_2_hotgas/T_1_hotgas);\t\t\t#[kJ/kg-K] - change of entropy of hot gas\n",
+ "delta_si_hotgas = (-delta_H_hotgas) - (-T_0*delta_S_hotgas);\t\t\t#[kJ/kg]\n",
+ "print \" 2).The availability change of hot gas is %f kJ/kg\"%(delta_si_hotgas);\n",
+ "\n",
+ "\t\t\t#(3)\n",
+ "\t\t\t#Availability change of air is given by,\n",
+ "\t\t\t#(si_1 - si_2)_air = H_1 - H_2 - T_0*(S_1 - S_2)\n",
+ "delta_H_air = (Cp_0_air*(T_2_air - T_1_air));\t\t\t#[kJ/kg] - change in enthalpy of air\n",
+ "\t\t\t#delta_S_air = Cp_0_air*math.log(T_2_air/T_1_air)- R*math.log(P_2/P_1), But pressure drop is zero (P_1 = P_2),therfore\n",
+ "delta_S_air = Cp_0_air*math.log(T_2_air/T_1_air);\t\t\t#[kJ/kg-K] - change of entropy of air\n",
+ "delta_si_air = (-delta_H_air) - (-T_0*delta_S_air);\t\t\t#[kJ/kg]\n",
+ "print \" 3).The availability change of air is %f kJ/kg\"%(delta_si_air);\n",
+ "\n",
+ "\t\t\t#(4)\n",
+ "\t\t\t#For the heat exchanger (Q = 0, W = 0)\n",
+ "\t\t\t#Basis : 1 kg of hot gas flowing through heat exchanger\n",
+ "S_gen = delta_S_hotgas + 2*delta_S_air;\t\t\t#[kJ/kg-K] - (as m_air = 2*m_hotgas)\n",
+ "I = T_0*S_gen;\t\t\t#[kJ/kg]\n",
+ "print \" 4).The irreversibility of thr exchanger per kg of hot gas flowing is %f kJ/kg\"%(I);\n",
+ "\n",
+ "\t\t\t#Irreversibility can also be obtained using\n",
+ "\t\t\t#I = 2*(si_1 - si_2)_air + (si_1 - si_2)_hotgas\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The temperature of emerging air is 521.428571 K\n",
+ " 2).The availability change of hot gas is 65.002625 kJ/kg\n",
+ " 3).The availability change of air is -21.492234 kJ/kg\n",
+ " 4).The irreversibility of thr exchanger per kg of hot gas flowing is 22.018157 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch6_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch6_2.ipynb new file mode 100755 index 00000000..4cdc915d --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch6_2.ipynb @@ -0,0 +1,847 @@ +{
+ "metadata": {
+ "name": "ch6_2",
+ "signature": "sha256:5875fd58ba5a3eb4a34d80c6cbf01fc2219f223f8352a521a425e02950a18a26"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 :Chemical reactions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.1 Page Number : 217"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\t\n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 298.15;\t\t\t#[K] - standard temperature\n",
+ "T_2 = 880;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "a_SO2 = 6.157;\n",
+ "a_SO3 = 3.918;\n",
+ "a_O2 = 6.732;\n",
+ "b_SO2 = 1.384*10**(-2);\n",
+ "b_SO3 = 3.483*10**(-2);\n",
+ "b_O2 = 0.1505*10**(-2);\n",
+ "c_SO2 = -0.9103*10**(-5);\n",
+ "c_SO3 = -2.675*10**(-5);\n",
+ "c_O2 = -0.01791*10**(-5);\n",
+ "d_SO2 = 2.057*10**(-9);\n",
+ "d_SO3 = 7.744*10**(-9);\n",
+ "\n",
+ "delta_H_rkn_298 = -23.45*10**(3);\t\t\t#[cal] - Rkn enthalpy at 298.15 K\n",
+ "delta_H_SO2_for_298 = -70.94*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of S02 at 298.15 K\n",
+ "delta_H_SO3_for_298 = -94.39*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of SO3 at 298.15 K\n",
+ "delta_G_SO2_for_298 = -71.68*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K\n",
+ "delta_G_SO3_for_298 = -88.59*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of SO3 at 298.15 K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t#standard enthalpy change of reaction at temperature T is given by,\n",
+ "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+ "delta_a = a_SO3 - a_SO2 - (a_O2/2);\n",
+ "delta_b = b_SO3 - b_SO2 - (b_O2/2);\n",
+ "delta_c = c_SO3 - c_SO2 - (c_O2/2);\n",
+ "delta_d = d_SO3 - d_SO2;\n",
+ "\n",
+ "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
+ "\t\t\t#Therefore we get,\n",
+ "\n",
+ "def f44(T): \n",
+ "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
+ "\n",
+ "delta_H_rkn_880 = delta_H_rkn_298 + quad(f44,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t#On manual simplification of the above expression,we will get the expression for 'delta_H_rkn_880' as a function of T,\n",
+ " \n",
+ "print \" 1.The expression for smath.tan(math.radiansard enthalpy change of reaction as a function of temperature is given by\";\n",
+ "print \" delta_H_rkn_880 = -22534.57 - 5.605*T + 1.012*10**-2*T**2 - 0.585*10**-5*T**3 + 1.422*10**-9*T**4\"\n",
+ "\n",
+ "print \" 2).Staandard enthalpy change of reaction at 880 K is %f cal\"%(delta_H_rkn_880);\n",
+ "\n",
+ "\t\t\t#(3)\n",
+ "\t\t\t#Let us determine the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
+ "delta_S_SO2_298 = (delta_H_SO2_for_298 - delta_G_SO2_for_298)/298.15;\t\t\t#[cal/mol-K]\n",
+ "delta_S_SO3_298 = (delta_H_SO3_for_298 - delta_G_SO3_for_298)/298.15;\t\t\t#[cal/mol-K]\n",
+ "delta_S_O2_298 = 0;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "delta_S_rkn_298 = delta_S_SO3_298 - delta_S_SO2_298 - (delta_S_O2_298/2);\t\t\t#[cal/K]\n",
+ "\n",
+ "def f45(T): \n",
+ "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
+ "\n",
+ "delta_S_rkn_880 = delta_S_rkn_298 + quad(f45,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" 3).Standard entropy change of reaction at 880 K is %f cal/K\"%(delta_S_rkn_880);\n",
+ "\n",
+ "\t\t\t#(4)\n",
+ "delta_G_rkn_880 = delta_H_rkn_880 - 880*delta_S_rkn_880;\t\t\t#[cal]\n",
+ "\n",
+ "print \" 4).Standard Gibbs free energy change of reaction at 880 K is %f cal\"%(delta_G_rkn_880);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1.The expression for smath.tan(math.radiansard enthalpy change of reaction as a function of temperature is given by\n",
+ " delta_H_rkn_880 = -22534.57 - 5.605*T + 1.012*10**-2*T**2 - 0.585*10**-5*T**3 + 1.422*10**-9*T**4\n",
+ " 2).Staandard enthalpy change of reaction at 880 K is -22766.609215 cal\n",
+ " 3).Standard entropy change of reaction at 880 K is -21.002783 cal/K\n",
+ " 4).Standard Gibbs free energy change of reaction at 880 K is -4284.160417 cal\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page Number : 219"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 298.15;\t\t\t#[K] - standard temperature\n",
+ "T_2 = 400;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "a_CH3OH = 4.55;\n",
+ "a_CO = 6.726;\n",
+ "a_H2 = 6.952;\n",
+ "b_CH3OH = 2.186*10**(-2);\n",
+ "b_CO = 0.04001*10**(-2);\n",
+ "b_H2 = -0.04576*10**(-2);\n",
+ "c_CH3OH = -0.291*10**(-5);\n",
+ "c_CO = 0.1283*10**(-5);\n",
+ "c_H2 = 0.09563*10**(-5);\n",
+ "d_CH3OH = -1.92*10**(-9);\n",
+ "d_CO = -0.5307*10**(-9);\n",
+ "d_H2 = -0.2079*10**(-9);\n",
+ "\n",
+ "delta_H_rkn_298 = -21.6643*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n",
+ "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO at 298.15 K\n",
+ "delta_H_CH3OH_for_298 = -48.08*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CH3OH at 298.15 K\n",
+ "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
+ "delta_G_CH3OH_for_298 = -38.69*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n",
+ "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+ "delta_a = a_CH3OH - a_CO - 2*(a_H2);\n",
+ "delta_b = b_CH3OH - b_CO - 2*(b_H2);\n",
+ "delta_c = c_CH3OH - c_CO - 2*(c_H2);\n",
+ "delta_d = d_CH3OH - d_CO - 2*(d_H2);\n",
+ "\n",
+ "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
+ "\t\t\t#Therefore we get,\n",
+ "\n",
+ "def f56(T): \n",
+ "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
+ "\n",
+ "delta_H_rkn_400 = delta_H_rkn_298 + quad(f56,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" Standard enthalpy change of reaction at 400 K is %f cal\"%(delta_H_rkn_400);\n",
+ "\n",
+ "\t\t\t#Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n",
+ "delta_G_rkn_298 = delta_G_CH3OH_for_298 - delta_G_CO_for_298;\t\t\t#[cal]\n",
+ "\n",
+ "\t\t\t#Now determining the standard entropy change of reaction at 298.15 K\n",
+ "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "\n",
+ "def f57(T): \n",
+ "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
+ "\n",
+ "delta_S_rkn_400 = delta_S_rkn_298 + quad(f57,T_1,T_2)[0]\n",
+ "\n",
+ "\t\t\t#Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+ "delta_G_rkn_400 = delta_H_rkn_400 - 400*delta_S_rkn_400;\t\t\t#[cal]\n",
+ "\n",
+ "print \" Standard Gibbs free energy change of reaction at 400 K is %f cal\"%(delta_G_rkn_400);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Standard enthalpy change of reaction at 400 K is -22587.159576 cal\n",
+ " Standard Gibbs free energy change of reaction at 400 K is -343.363287 cal\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page Number : 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
+ "T_2 = 1200;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "\n",
+ "a_CO2 = 5.316;\n",
+ "a_H2 = 6.952;\n",
+ "a_CO = 6.726;\n",
+ "a_H2O = 7.700;\n",
+ "b_CO2 = 1.4285*10**(-2);\n",
+ "b_H2 = -0.04576*10**(-2);\n",
+ "b_CO = 0.04001*10**(-2);\n",
+ "b_H2O = 0.04594*10**(-2);\n",
+ "c_CO2 = -0.8362*10**(-5);\n",
+ "c_H2 = 0.09563*10**(-5);\n",
+ "c_CO = 0.1283*10**(-5);\n",
+ "c_H2O = 0.2521*10**(-5);\n",
+ "d_CO2 = 1.784*10**(-9);\n",
+ "d_H2 = -0.2079*10**(-9);\n",
+ "d_CO = -0.5307*10**(-9);\n",
+ "d_H2O = -0.8587*10**(-9);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "delta_H_rkn_298 = -9.8382*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n",
+ "delta_H_CO2_for_298 = -94.0518*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of CO2 at 298.15 K\n",
+ "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of CO at 298.15 K\n",
+ "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of H2O at 298.15 K\n",
+ "delta_G_CO2_for_298 = -94.2598*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
+ "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K\n",
+ "delta_G_H2O_for_298 = -54.6357*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
+ "\n",
+ "\t\t\t#standard enthalpy change of reaction at temperature T is given by,\n",
+ "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+ "delta_a = a_CO2 + a_H2 - a_CO - a_H2O;\n",
+ "delta_b = b_CO2 + b_H2 - b_CO - b_H2O;\n",
+ "delta_c = c_CO2 + c_H2 - c_CO - c_H2O;\n",
+ "delta_d = d_CO2 + d_H2 - d_CO - d_H2O;\n",
+ "\n",
+ "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
+ "\t\t\t#Therefore we get,\n",
+ "\n",
+ "def f11(T): \n",
+ "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
+ "\n",
+ "delta_H_rkn_1200 = delta_H_rkn_298 + quad(f11,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" Standard enthalpy change of reaction at 1200 K is %f cal\"%(delta_H_rkn_1200);\n",
+ "\n",
+ "\t\t\t#Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n",
+ "delta_G_rkn_298 = delta_G_CO2_for_298 - delta_G_CO_for_298 - delta_G_H2O_for_298;\t\t\t#[cal]\n",
+ "\n",
+ "\t\t\t#Now determining the standard entropy change of reaction at 298.15 K\n",
+ "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "\n",
+ "def f12(T): \n",
+ "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
+ "\n",
+ "delta_S_rkn_1200 = delta_S_rkn_298 + quad(f12,T_1,T_2)[0]\n",
+ "\n",
+ "\t\t\t#Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+ "delta_G_rkn_1200 = delta_H_rkn_1200 - 1200*delta_S_rkn_1200;\t\t\t#[cal]\n",
+ "\n",
+ "print \" Standard Gibbs free energy change of reaction at 1200 K is %f cal\"%(delta_G_rkn_1200);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Standard enthalpy change of reaction at 1200 K is -7850.182811 cal\n",
+ " Standard Gibbs free energy change of reaction at 1200 K is 953.652749 cal\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.4 Page Number : 221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
+ "T_2 = 500;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "a_NH3 = 6.5846;\n",
+ "a_N2 = 6.903;\n",
+ "a_H2 = 6.952;\n",
+ "b_NH3 = 0.61251*10**(-2);\n",
+ "b_N2 = -0.03753*10**(-2);\n",
+ "b_H2 = -0.04576*10**(-2);\n",
+ "c_NH3 = 0.23663*10**(-5);\n",
+ "c_N2 = 0.1930*10**(-5);\n",
+ "c_H2 = 0.09563*10**(-5);\n",
+ "d_NH3 = -1.5981*10**(-9);\n",
+ "d_N2 = -0.6861*10**(-9);\n",
+ "d_H2 = -0.2079*10**(-9);\n",
+ "\n",
+ "delta_H_rkn_298 = -22.08*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n",
+ "delta_H_NH3_for_298 = -11.04*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of NH3 at 298.15 K\n",
+ "delta_G_NH3_for_298 = -3.976*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of NH3 at 298.15 K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#standard enthalpy change of reaction at temperature T is given by,\n",
+ "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+ "delta_a = 2*a_NH3 - a_N2 - 3*a_H2;\n",
+ "delta_b = 2*b_NH3 - b_N2 - 3*b_H2;\n",
+ "delta_c = 2*c_NH3 - c_N2 - 3*c_H2;\n",
+ "delta_d = 2*d_NH3 - d_N2 - 3*d_H2;\n",
+ "\n",
+ "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
+ "\t\t\t#Therefore we get,\n",
+ "\n",
+ "def f5(T): \n",
+ "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
+ "\n",
+ "delta_H_rkn_500 = delta_H_rkn_298 + quad(f5,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" Standard enthalpy change of reaction at 500 K is %f cal\"%(delta_H_rkn_500);\n",
+ "\n",
+ "\t\t\t#Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n",
+ "delta_G_rkn_298 = 2*delta_G_NH3_for_298;\t\t\t#[cal]\n",
+ "\n",
+ "\t\t\t#Now determining the standard entropy change of reaction at 298.15 K\n",
+ "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "\n",
+ "def f6(T): \n",
+ "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
+ "\n",
+ "delta_S_rkn_500 = delta_S_rkn_298 + quad(f6,T_1,T_2)[0]\n",
+ "\n",
+ "\t\t\t#Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+ "delta_G_rkn_500 = delta_H_rkn_500 - 500*delta_S_rkn_500;\t\t\t#[cal]\n",
+ "\n",
+ "print \" Standard Gibbs free energy change of reaction at 500 K is %f cal\"%(delta_G_rkn_500);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Standard enthalpy change of reaction at 500 K is -23925.267197 cal\n",
+ " Standard Gibbs free energy change of reaction at 500 K is 2159.910425 cal\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.5 Page Number : 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "delta_H_rkn_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Reaction enthalpy at 298.15 K\n",
+ "delta_G_rkn_298 = -54.6351*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
+ "\n",
+ "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n",
+ "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
+ "T_2_1 = 873.15;\t\t\t#[K] - Reaction temperature\n",
+ "T_2_2 = 1000;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#Therefore we get,\n",
+ "\n",
+ "def f34(T): \n",
+ "\t return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)\n",
+ "\n",
+ "delta_H_rkn_873 = delta_H_rkn_298 + quad(f34,T_1,T_2_1)[0]\n",
+ "\n",
+ "\n",
+ "def f35(T): \n",
+ "\t return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)\n",
+ "\n",
+ "delta_H_rkn_1000 = delta_H_rkn_298 + quad(f35,T_1,T_2_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" Standard enthalpy change of reaction at 873 K is %f cal/mol\"%(delta_H_rkn_873);\n",
+ "print \" Standard enthalpy change of reaction at 1000 K is %f cal/mol\"%(delta_H_rkn_1000);\n",
+ "\n",
+ "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
+ "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n",
+ "\n",
+ "\n",
+ "def f36(T): \n",
+ "\t return (7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3))/T\n",
+ "\n",
+ "delta_S_rkn_873 = delta_S_rkn_298 + quad(f36,T_1,T_2_1)[0]\n",
+ "\n",
+ "\n",
+ "def f37(T): \n",
+ "\t return (7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3))/T\n",
+ "\n",
+ "delta_S_rkn_1000 = delta_S_rkn_298 + quad(f37,T_1,T_2_2)[0]\n",
+ "\n",
+ "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
+ "delta_G_rkn_873 = (delta_H_rkn_873 - 873.15*delta_S_rkn_873)*10**(-3);\t\t\t#[kcal/mol]\n",
+ "delta_G_rkn_1000 = (delta_H_rkn_1000 - 1000*delta_S_rkn_1000)*10**(-3);\t\t\t#[kcal/mol]\n",
+ "\n",
+ "print \" Standard Gibbs free energy change of reaction at 873 K is %f kcal/mol\"%(delta_G_rkn_873);\n",
+ "print \" Standard Gibbs free energy change of reaction at 1000 K is %f kcal/mol\"%(delta_G_rkn_1000);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Standard enthalpy change of reaction at 873 K is -52801.656303 cal/mol\n",
+ " Standard enthalpy change of reaction at 1000 K is -51579.290952 cal/mol\n",
+ " Standard Gibbs free energy change of reaction at 873 K is -51.575573 kcal/mol\n",
+ " Standard Gibbs free energy change of reaction at 1000 K is -51.481661 kcal/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.6 Page Number : 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
+ "T_2 = 500.;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "a_C2H6 = 1.648;\n",
+ "a_O2 = 6.085;\n",
+ "a_CO2 = 5.316;\n",
+ "a_H2O = 7.700;\n",
+ "b_C2H6 = 4.124*10**(-2);\n",
+ "b_O2 = 0.3631*10**(-2);\n",
+ "b_CO2 = 1.4285*10**(-2);\n",
+ "b_H2O = 0.04594*10**(-2);\n",
+ "c_C2H6 = -1.530*10**(-5);\n",
+ "c_O2 = -0.1709*10**(-5);\n",
+ "c_CO2 = -0.8362*10**(-5);\n",
+ "c_H2O = 0.2521*10**(-5);\n",
+ "d_C2H6 = 1.740*10**(-9);\n",
+ "d_O2 = 0.3133*10**(-9);\n",
+ "d_CO2 = 1.784*10**(-9);\n",
+ "d_H2O = -0.8587*10**(-9);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\n",
+ "\n",
+ "\n",
+ "delta_H_C2H6_for_298 = -20.236*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of C2H6 at 298.15 K\n",
+ "delta_H_CO2_for_298 = -94.0518*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO2 at 298.15 K\n",
+ "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of H2O at 298.15 K\n",
+ "\n",
+ "delta_H_rkn_298 = 2*delta_H_CO2_for_298 + 3*delta_H_H2O_for_298 - delta_H_C2H6_for_298;\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n",
+ "\n",
+ "\t\t\t#standard enthalpy change of reaction at temperature T is given by,\n",
+ "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+ "delta_a = 2*a_CO2 + 3*a_H2O - a_C2H6 - 7./2*(a_O2);\n",
+ "delta_b = 2*b_CO2 + 3*b_H2O - b_C2H6 - 7./2*(b_O2);\n",
+ "delta_c = 2*c_CO2 + 3*c_H2O - c_C2H6 - 7./2*(c_O2);\n",
+ "delta_d = 2*d_CO2 + 3*d_H2O - d_C2H6 - 7./2*(d_O2);\n",
+ "\n",
+ "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
+ "\t\t\t#Therefore we get,\n",
+ "\n",
+ "def f55(T): \n",
+ "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
+ "\n",
+ "delta_H_rkn_500 = delta_H_rkn_298 + quad(f55,T_1,T_2)[0]\n",
+ "\n",
+ "delta_H_rkn_500 = delta_H_rkn_500*10**(-3);\t\t\t#[kcal]\n",
+ "\n",
+ "print \" The heat exchange of the reaction at 500 K is %f kcal\"%(delta_H_rkn_500);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The heat exchange of the reaction at 500 K is -340.644585 kcal\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.7 Page Number : 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
+ "T_2 = 600.;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "a_C2H6 = -8.65;\n",
+ "a_H2O = 7.700;\n",
+ "a_CH4 = 4.750;\n",
+ "a_O2 = 6.085;\n",
+ "b_C2H6 = 11.578*10**(-2);\n",
+ "b_H2O = 0.04594*10**(-2);\n",
+ "b_CH4 = 1.200*10**(-2);\n",
+ "b_O2 = 0.3631*10**(-2);\n",
+ "c_C2H6 = -7.540*10**(-5);\n",
+ "c_H2O = 0.2521*10**(-5);\n",
+ "c_CH4 = 0.3030*10**(-5);\n",
+ "c_O2 = -0.1709*10**(-5);\n",
+ "d_C2H6 = 18.54*10**(-9);\n",
+ "d_H2O = -0.8587*10**(-9);\n",
+ "d_CH4 = -2.630*10**(-9);\n",
+ "d_O2 = 0.3133*10**(-9);\n",
+ "\n",
+ "delta_S_CH4_for_298 = 44.50;\t\t\t#[cal/mol-K] - Entropy of formation of CH4 at 298.15 K\n",
+ "delta_S_O2_for_298 = 49.00;\t\t\t#[cal/mol-K] - Entropy of formation of O2 at 298.15 K\n",
+ "delta_S_C2H6_for_298 = 64.34;\t\t\t#[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K\n",
+ "delta_S_H2O_for_298 = 45.11;\t\t\t#[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
+ "\n",
+ "\t\t\t#Smath.tan(math.radiansard entropy change of reaction at temperature T is given by,\n",
+ "\t\t\t#delta_S_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+ "delta_a = 1./6*(a_C2H6) + 3./2*(a_H2O) - a_CH4 - 3./4*(a_O2);\n",
+ "delta_b = 1./6*(b_C2H6) + 3./2*(b_H2O) - b_CH4 - 3./4*(b_O2);\n",
+ "delta_c = 1./6*(c_C2H6) + 3./2*(c_H2O) - c_CH4 - 3./4*(c_O2);\n",
+ "delta_d = 1./6*(d_C2H6) + 3./2*(d_H2O) - d_CH4 - 3./4*(d_O2);\n",
+ "\n",
+ "delta_S_rkn_298 = 1./6*(delta_S_C2H6_for_298) + 3./2*(delta_S_H2O_for_298) - delta_S_CH4_for_298 - 3./4*(delta_S_O2_for_298);\t\t\t#[cal/K]\n",
+ "\n",
+ "def f27(T): \n",
+ "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
+ "\n",
+ "delta_S_rkn_600 = delta_S_rkn_298 + quad(f27,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" Change in entropy of the reaction at 298.15 K is %f cal/K\"%(delta_S_rkn_298);\n",
+ "print \" Standard entropy change of reaction at 600 K is %f cal/K\"%(delta_S_rkn_600);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Change in entropy of the reaction at 298.15 K is -2.861667 cal/K\n",
+ " Standard entropy change of reaction at 600 K is -1.880233 cal/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.8 Page Number : 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
+ "T_2 = 973.15;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "\t\t\t#At 298.15 K\n",
+ "delta_H_CH4_for_298 = -17.889*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CH4 at 298.15 K\n",
+ "delta_H_C_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of C (s, graphite) at 298.15 K\n",
+ "delta_H_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of H2 at 298.15 K\n",
+ "delta_G_CH4_for_298 = -12.140*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
+ "delta_G_C_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of C (s, graphite) at 298.15 K\n",
+ "delta_G_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#/standard heat capacity data in cal/mol-K are given below, T is in K\n",
+ "\t\t\t#Cp_0_CH4 = 4.75 + 1.2*10**(-2)*T + 0.303*10**(-5)*T**(2) - 2.63*10**(-9)*T**(3)\n",
+ "\t\t\t#Cp_0_C = 3.519 + 1.532*10**(-3)*T - 1.723*10**(5)*T**(-2)\n",
+ "\t\t\t#Cp_0_H2 = 6.952 - 0.04576*10**(-2)*T + 0.09563*10**(-5)*T**(2) - 0.2079*10**(-9)*T**(3)\n",
+ "\n",
+ "\t\t\t#Therefore standard heat capacity of reaction is given by,\n",
+ "\t\t\t#Cp_0_rkn = 2*Cp_0_H2 + Cp_0_C - Cp_0_CH4\n",
+ "\t\t\t#On simplification,we get the relation\n",
+ "\t\t\t#Cp_0_rkn = 12.673 - 0.0113832*T - 1.1174*10**(-6)*T**(2) + 2.2142*10**(-9)*T**(3) - 1.723*10**(5)*T**(-2)\n",
+ "\n",
+ "delta_H_rkn_298 = -delta_H_CH4_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n",
+ "delta_G_rkn_298 = -delta_G_CH4_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n",
+ "\n",
+ "\n",
+ "def f63(T): \n",
+ "\t return 12.673-0.0113832*T-1.1174*10**(-6)*T**(2)+2.2142*10**(-9)*T**(3)-1.723*10**(5)*T**(-2)\n",
+ "\n",
+ "delta_H_rkn_973 = delta_H_rkn_298 + quad(f63,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" Standard enthalpy change of reaction at 973.15 K is %f cal\"%(delta_H_rkn_973);\n",
+ "\n",
+ "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
+ "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n",
+ "\n",
+ "def f64(T): \n",
+ "\t return (12.673-0.0113832*T-1.1174*10**(-6)*T**(2)+2.2142*10**(-9)*T**(3)-1.723*10**(5)*T**(-2))/T\n",
+ "\n",
+ "delta_S_rkn_973 = delta_S_rkn_298 + quad(f64,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
+ "delta_G_rkn_973 = delta_H_rkn_973 - 973.15*delta_S_rkn_973;\t\t\t#[cal]\n",
+ "\n",
+ "print \" Standard Gibbs free energy change of reaction at 973 K is %f cal\"%(delta_G_rkn_973);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Standard enthalpy change of reaction at 973.15 K is 21316.998642 cal\n",
+ " Standard Gibbs free energy change of reaction at 973 K is -3880.803382 cal\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.9 Page Number : 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
+ "T_2 = 1000;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "\t\t\t#At 298.15 K\n",
+ "delta_H_C_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of C(s,graphite) at 298.15 K\n",
+ "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of H2O at 298.15 K\n",
+ "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO at 298.15 K\n",
+ "delta_H_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of H2 at 298.15 K\n",
+ "delta_G_C_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of C(s, graphite) at 298.15 K\n",
+ "delta_G_H2O_for_298 = -54.6357*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
+ "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
+ "delta_G_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#/standard heat capacity data in cal/mol-K are given below, T is in K\n",
+ "\t\t\t#Cp_0_C = 3.519 + 1.532*10**(-3)*T - 1.723*10**(5)*T**(-2)\n",
+ "\t\t\t#Cp_0_H2O = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3)\n",
+ "\t\t\t#Cp_0_CO = 6.726 + 0.04001*10**(-2)*T + 0.1283*10**(-5)*T**(2) - 0.5307*10**(-9)*T**(3)\n",
+ "\t\t\t#Cp_0_H2 = 6.952 - 0.04576*10**(-2)*T + 0.09563*10**(-5)*T**(2) - 0.2079*10**(-9)*T**(3)\n",
+ "\n",
+ "\t\t\t#Therefore standard heat capacity of reaction is given by,\n",
+ " #Cp_0_rkn = 2.459 - 2.0489*10**(-3)*T - 2.817*10**(-7)*T**(2) + 1.201*10**(-10)*T**(3) + 1.723*10**(5)*T**(-2)\n",
+ "\n",
+ "delta_H_rkn_298 = delta_H_CO_for_298 + delta_H_H2_for_298 - delta_H_C_for_298 - delta_H_H2O_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n",
+ "delta_G_rkn_298 = delta_G_CO_for_298 + delta_G_H2_for_298 - delta_G_C_for_298 - delta_G_H2O_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n",
+ "\n",
+ "\n",
+ "def f13(T): \n",
+ "\t return 2.459-2.0489*10**(-3)*T-2.817*10**(-7)*T**(2)+1.201*10**(-10)*T**(3)+1.723*10**(5)*T**(-2)\n",
+ "\n",
+ "delta_H_rkn_1000 = delta_H_rkn_298 + quad(f13,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" Standard enthalpy change of reaction at 1000 K is %f cal\"%(delta_H_rkn_1000);\n",
+ "\n",
+ "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
+ "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n",
+ "\n",
+ "def f14(T): \n",
+ "\t return (2.459-2.0489*10**(-3)*T-2.817*10**(-7)*T**(2)+1.201*10**(-10)*T**(3)+1.723*10**(5)*T**(-2))/T\n",
+ "\n",
+ "delta_S_rkn_1000 = delta_S_rkn_298 + quad(f14,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
+ "delta_G_rkn_1000 = delta_H_rkn_1000 - 1000*delta_S_rkn_1000;\t\t\t#[cal]\n",
+ "\n",
+ "print \" Standard Gibbs free energy change of reaction at 1000 K is %f cal\"%(delta_G_rkn_1000);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Standard enthalpy change of reaction at 1000 K is 32518.639475 cal\n",
+ " Standard Gibbs free energy change of reaction at 1000 K is -1858.365607 cal\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.10 Page Number : 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
+ "T_2 = 1042;\t\t\t#[K] - Reaction temperature\n",
+ "\n",
+ "\t\t\t#At 298.15 K\n",
+ "delta_H_CaCO3_for_298 = -289.5*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CaCO3 at 298.15 K\n",
+ "delta_H_CaO_for_298 = -151.7*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CaO at 298.15 K\n",
+ "delta_H_CO2_for_298 = -94.052*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO2 at 298.15 K\n",
+ "delta_G_CaCO3_for_298 = -270.8*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CaCO3 at 298.15 K\n",
+ "delta_G_CaO_for_298 = -144.3*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CaO at 298.15 K\n",
+ "delta_G_CO2_for_298 = -94.260*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#/Smath.tan(math.radiansaerd heat capacity data in cal/mol-K are given below, T is in K\n",
+ "\t\t\t#Cp_0_CO2 = 5.316 + 1.4285*10**(-2)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3)\n",
+ "\t\t\t#Cp_0_CaO = 12.129 + 0.88*10**(-3)*T + 2.08*10**(5)*T**(-2)\n",
+ "\t\t\t#Cp_0_CaCO3 = 24.98 + 5.240*10**(-3)*T + 6.199*10**(5)*T**(-2)\n",
+ "\n",
+ "\t\t\t#Therefore smath.tan(math.radiansard heat capacity of reaction is given by,\n",
+ " #Cp_0_rkn = -7.535 + 9.925*10**(-3)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3) + 4.119*10**(5)*T**(-2)\n",
+ "\n",
+ "delta_H_rkn_298 = delta_H_CaO_for_298 + delta_H_CO2_for_298 - delta_H_CaCO3_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n",
+ "delta_G_rkn_298 = delta_G_CaO_for_298 + delta_G_CO2_for_298 - delta_G_CaCO3_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n",
+ "\n",
+ "\n",
+ "def f38(T): \n",
+ "\t return -7.535+9.925*10**(-3)*T-0.8362*10**(-5)*T**(2)+1.784*10**(-9)*T**(3)+4.119*10**(5)*T**(-2)\n",
+ "\n",
+ "delta_H_rkn_1042 = delta_H_rkn_298 + quad(f38,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "print \" Standard enthalpy change of reaction at 1042 K is %f cal\"%(delta_H_rkn_1042);\n",
+ "\n",
+ "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
+ "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n",
+ "\n",
+ "def f39(T): \n",
+ "\t return (-7.535+9.925*10**(-3)*T-0.8362*10**(-5)*T**(2)+1.784*10**(-9)*T**(3)+4.119*10**(5)*T**(-2))/T\n",
+ "\n",
+ "delta_S_rkn_1042 = delta_S_rkn_298 + quad(f39,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
+ "delta_G_rkn_1042 = delta_H_rkn_1042 - 1042*delta_S_rkn_1042;\t\t\t#[cal]\n",
+ "\n",
+ "print \" Standard Gibbs free energy change of reaction at 1042 K is %f cal\"%(delta_G_rkn_1042);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Standard enthalpy change of reaction at 1042 K is 41518.919956 cal\n",
+ " Standard Gibbs free energy change of reaction at 1042 K is 4873.416608 cal\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch7_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch7_2.ipynb new file mode 100755 index 00000000..5f644cdd --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch7_2.ipynb @@ -0,0 +1,1542 @@ +{
+ "metadata": {
+ "name": "ch7_2",
+ "signature": "sha256:1fc4ec5605309ff88ba6d75ddff6c3046fc8a8dc45dca2d12f7651c49812921e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Thermodynamic property relations of pure substance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.6 Page Number : 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "P_1 = 1;\t\t\t#[MPa] - Initial pressure\n",
+ "P_2 = 1.4;\t\t\t#[MPa] - Final pressure\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t#We know that\n",
+ "\t\t\t# dS = (Cp/T)*dT - (dV/dT)*dP\n",
+ "\t\t\t# Along an isothermal path,integration of above expression between states 1 and 2 yields\n",
+ "\t\t\t# S_2 - S_1 = - integral((dV/dT)*dP)_P\n",
+ "\t\t\t# An estimate can be made by assuming that (dV/dT)_P remains constant over the range of pressure from P_1 to P_2 and evaluating the derivative at average pressure of 1.2 MPa\n",
+ "P_avg = P_2;\n",
+ "\t\t\t# S_2 - S_1 = -integral((dV/dT)*dP)_Pavg*(P_2 - P_1)\n",
+ "\t\t\t# (dV/dT)_P=1.2MPa = ((V_350 - V_250)/(350 - 250))\n",
+ "dV_dT = (0.2345 - 0.19234)/100;\t\t\t#[m**(3)/kg-K]\n",
+ "\t\t\t#Therefore\n",
+ "delta_S = -dV_dT*(P_2 - P_1)*1000;\t\t\t#[kJ/kg-K] - Entropy change\n",
+ "\n",
+ "# Results\n",
+ "print \"The change in entropy is given by S_2-S_1 = %f kJ/kg-K\"%(delta_S);\n",
+ "\n",
+ "\t\t\t#Let us compare this tabulated values. At 1MPA and 300 C, S_1 = 7.1229 kJ/kg-K. At 1.4 MPa and 300 C, S_2 = 6.9534 kJ/kg-K. \n",
+ "\t\t\t#Therefore S_2 - S_1 = -0.1695 kJ/kg-K\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in entropy is given by S_2-S_1 = -0.168640 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.7 Page Number : 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "T = 25. + 273.15;\t\t\t#[K] - Temperature of the surrounding\n",
+ "P_1 = 1.;\t\t\t#[atm] - Initial pressure\n",
+ "P_2 = 1000.;\t\t\t#[atm] - Final pressure\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# V = 18.066 - 7.15*10**(-4)*P + 4.6*10**(-8)*P**(2) where, V is in 'cm**(3)/mol' and P is in 'atm\n",
+ "\t\t\t# (dV/dT)_P = 0.0045 + 1.4*10**(-6)*P ;\t\t\t#cm**(3)/mol-K\n",
+ "\n",
+ "\t\t\t# The work done by 1 mol is given by W = integral(P*dV)\n",
+ "\t\t\t# Differentiating both sides of the expression for V, we get\n",
+ "\t\t\t# dV = -7.15*10**(-4)*dP + 9.2*10**(-8)*(P*dP) \n",
+ "\t\t\t# P*dV = -7.15*10**(-4)*P*dP + 9.2*10**(-8)*(P**(2)*dP)\n",
+ "\n",
+ "\t\t\t# The work done is given by\n",
+ "\n",
+ "def f58(P): \n",
+ "\t return -7.15*10**(-4)*P + 9.2*10**(-8)*(P**(2))\n",
+ "\n",
+ "W = quad(f58,P_1,P_2)[0];\t\t\t#[atm-cm**(3)[0]\n",
+ "\n",
+ "W = W*101325*10**(-6);\t\t\t#[J/mol]\n",
+ "\n",
+ "print \"The necessary work to compress water from 1 atm to 1000 atm is %f J/mol\"%(W);\n",
+ "\n",
+ "\t\t\t#Let us calculate the amount of heat transfer\n",
+ "\t\t\t# q = integral(T*dS)\n",
+ "\t\t\t# dS = ((ds/dT)_P)*dT + ((dS/dP)_T)*dP\n",
+ "\t\t\t# Since the temperature is constant the first term is zero and\n",
+ "\t\t\t# dS = ((dS/dP)_T)*dP = -((dV/dT)_P)*dP\n",
+ "\t\t\t# Thus, q = integral(T*dS) = T*(integral(dS)) ( as temperature is constant )\n",
+ "\t\t\t# or, q = -T*(integral((dV/dT)_P)*dP)\n",
+ "\n",
+ "\t\t\t# Thus the heat transfer is given by\n",
+ "\n",
+ "def f59(P): \n",
+ "\t return 0.0045+1.4*10**(-6)*P\n",
+ "\n",
+ "q = -T* quad(f59,P_1,P_2)[0];\t\t\t#[atm-cm**(3)[0]\n",
+ "\n",
+ "q = q*101325*10**(-6);\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# q - W = delta_U\n",
+ "\t\t\t# Thus delta_U is given by\n",
+ "delta_U = q - W;\t\t\t#[J/mol]\n",
+ "\n",
+ "print \"The change in internal energy is %f J/mol\"%(delta_U);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The necessary work to compress water from 1 atm to 1000 atm is -33.116351 J/mol\n",
+ "The change in internal energy is -123.839936 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.12 Page Number : 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.optimize import fsolve \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T = 25+273.15;\t\t\t#[K] - Temperature\n",
+ "P = 1;\t\t\t#[atm] - Pressure\n",
+ "P = P*101325;\t\t\t#[Pa]\n",
+ "Tc = 126.2;\t\t\t#[K] - Critical temperature\n",
+ "Pc = 34;\t\t\t#[bar] - Critical pressure\n",
+ "Pc = Pc*10**(5);\t\t\t#[Pa]\n",
+ "R=8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "a = (27*R**(2)*Tc**(2)/(64*Pc));\t\t\t#[Pa-m**(6)/mol**(2)]\n",
+ "b = (R*Tc)/(8*Pc);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# the cubic form of van der Walls equation of state is\n",
+ "\t\t\t# V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P=0\n",
+ "\t\t\t#Solving the cubic equation\n",
+ "def f(V): \n",
+ "\t return V**(3)-(b+(R*T)/P)*V**(2)+(a/P)*V-(a*b)/P\n",
+ "V = fsolve(f,1)\n",
+ "\t\t\t#The above equation has 1 real and 2 imaginary roots. We consider only real root.\n",
+ "\n",
+ "Beta = R/((P*V)-(a/V)+((2*a*b)/V**(2)));\t\t\t#[K**(-1)]\n",
+ "\n",
+ "K_t = (V-b)/((P*V)-(a/V)+((2*a*b)/V**(2)));\t\t\t#[Pa**(-1)]\n",
+ "K_t = K_t*101325;\t\t\t#[atm**(-1)]\n",
+ "\n",
+ "print \" Beta\\t = \\t %f K**-1)\"%(Beta);\n",
+ "print \" K_t\\t = \\t %f atm**-1)\"%(K_t);\n",
+ "\n",
+ "\t\t\t#For ideal gas, Beta = 1/T = 0.0033354 K**(-1) and K_t = 1/P = 1 atm**(-1)\n",
+ "\t\t\t# So results obtained are convergent with those obtained assuming ideal gas.\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Beta\t = \t 0.003364 K**-1)\n",
+ " K_t\t = \t 1.000672 atm**-1)\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.13 Page Number : 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 45+273.15;\t\t\t#[K]\n",
+ "P_1 = 10;\t\t\t#[kPa] - Initial pressure\n",
+ "P_2 = 8600;\t\t\t#[kPa] - Final pressure\n",
+ "V = 1010;\t\t\t#[cm**(3)/kg] - Specific volume for saturated liquid water at 45 C\n",
+ "V = V*10**(-6);\t\t\t#[m**(3)/kg]\n",
+ "\t\t\t# Beta = (1/V)*(dV/dT)_P\n",
+ "Beta = 4.25*10**(-4);\t\t\t#[k**(-1)]\n",
+ "Cp = 4.178;\t\t\t#[kJ/kg-K] - Specific heat at constant pressure\n",
+ "eff = 0.75;\t\t\t# Efficiency of the pump\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t#when efficiency of the pump is 100% , W = -delta_Hs\n",
+ "\t\t\t# Now delta_H = T*dS + V*dP, therefore under isentropic conditions, dH = V*dP\n",
+ "\t\t\t# delta_Hs = V*dP\n",
+ "delta_Hs = V*(P_2 - P_1);\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t#Actual pumps are not isentropic and therefore not 100% efficient. Therefore actual work done by the pump is given by\n",
+ "W = -delta_Hs/eff;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "print \" 1).The work done by the pump is %f kJ/kg\"%(W);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# We know that dH = Cp*dT + (1 - Beta*T)*V*dP\n",
+ "\t\t\t# Integrating the above equation we get\n",
+ "\t\t\t# delta_H = Cp*delta_T + (1 - Beta*T)*V*(delta_P)\n",
+ "\t\t\t# Now from energy balance delta_H = q - W . But q = 0. Therefore,\n",
+ "delta_H = -W;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# Solving for delta_T\n",
+ "delta_T = (delta_H - (1 - Beta*T)*V*(P_2-P_1))/Cp;\n",
+ "\n",
+ "print \" 2).The temperature of water change by delta_T = %f K\"%(delta_T);\n",
+ "\n",
+ "\t\t\t#(3)\n",
+ "T_1 = T;\t\t\t#[K]\n",
+ "T_2 = T + delta_T;\t\t\t#[K]\n",
+ "\t\t\t# dS = (Cp/T)*dT - Beta*V*dP\n",
+ "\t\t\t# Beta and V are weak functions of pressure in the case of liquids. Integrating the above equation we get\n",
+ "delta_S = Cp*math.log(T_2/T_1) - Beta*V*(P_2-P_1);\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \" 3).The entropy change of water is given by delta_S = %f kJ/kg-K\"%(delta_S);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The work done by the pump is -11.567867 kJ/kg\n",
+ " 2).The temperature of water change by delta_T = 0.972970 K\n",
+ " 3).The entropy change of water is given by delta_S = 0.009070 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.14 Page Number : 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 270;\t\t\t#[K]\n",
+ "P_1 = 381;\t\t\t#[kPa] - Initial pressure\n",
+ "P_2 = 1200;\t\t\t#[kPa] - Final pressure\n",
+ "V_liq = 1.55*10**(-3);\t\t\t#[m**(3)/kg] - Specific volume for saturated water in liquid phase at 270 C\n",
+ "Beta = 2.095*10**(-3);\t\t\t#[K**(-1)]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#dH = Cp*dT + [V - T*(dV/dT)_P]*dP\n",
+ "\t\t\t# dS = (Cp/T)*dT - ((dV/dT)_P)*dP\n",
+ "\t\t\t# dH = [V - T*(dV/dT)_P]*dP = V*(1 - Beta*T)*dP\n",
+ "\t\t\t# For the liquid assuming V and Beta to remain constant during pressure change, and since temperature is constant we get\n",
+ "delta_H = V_liq*(1 - Beta*T)*(P_2 - P_1);\t\t\t#[kJ/kg]\n",
+ "\n",
+ "print \"The enthalpy change is given by delta_H = %f kJ/kg\"%(delta_H);\n",
+ "\n",
+ "\t\t\t# Under isothermal conditions \n",
+ "\t\t\t# dS = -((dV/dT)_P)*dP = -Beta*V_liq*dP\n",
+ "\t\t\t# If Beta*V is assumed to remain constant during pressure change we get\n",
+ "delta_S = -Beta*V_liq*(P_2-P_1);\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \"The entropy change is given by delta_S = %e kJ/kg-K\"%(delta_S);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy change is given by delta_H = 0.551386 kJ/kg\n",
+ "The entropy change is given by delta_S = -2.659498e-03 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.15 Page Number : 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T_1 = 0;\t\t\t#[C] - Initial tempetaure\n",
+ "T_2 = 100;\t\t\t#[C] - Final temperature\n",
+ "\t\t\t# Beta = 1.0414*10**(-3) + 1.5672*10**(-6)*T + 5.148*10**(-8)*T**(2), where T is in C\n",
+ "\t\t\t# At constant pressure (1/V)*(dV/dT) = Beta\n",
+ "\t\t\t# or, d(math.log(V)) = Beta*dT\n",
+ "\t\t\t# Integrating we get math.log(V_2/V_1) = integral(Beta*dT) from limit T_1 to T_2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "def f62(T): \n",
+ "\t return 1.0414*10**(-3)+1.5672*10**(-6)*T+5.148*10**(-8)*T**(2)\n",
+ "\n",
+ "integral = quad(f62,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t# math.log(V_2/V_1) = integral\n",
+ "\t\t\t# (V_2/V_1) = exp(integral)\n",
+ "\t\t\t# (V_2 - V_1)/V_1 = change = exp(integral) - 1;\n",
+ "change = math.exp(integral) - 1;\n",
+ "per_change = 100*change;\n",
+ "\n",
+ "print \"The percentage change in volume = %f %%\"%(per_change);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage change in volume = 13.784486 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.16 Page Number : 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T_1 = 25 + 273.15;\t\t\t#[C] - Initial tempetaure\n",
+ "T_2 = 50 + 273.15;\t\t\t#[C] - Final temperature\n",
+ "P_1 = 1;\t\t\t#[bar] - Initial pressure\n",
+ "P_2 = 1000;\t\t\t#[bar] - Final pressure\n",
+ "\n",
+ "Cp_T1_P1 = 75.305;\t\t\t#[J/mol-K]\n",
+ "Cp_T2_P1 = 75.314;\t\t\t#[J/mol-K]\n",
+ "V_T1_P1 = 18.071;\t\t\t#[cm**(3)/mol]\n",
+ "V_T1_P2 = 18.012;\t\t\t#[cm**(3)/mol]\n",
+ "V_T2_P1 = 18.234;\t\t\t#[cm**(3)/mol]\n",
+ "V_T2_P2 = 18.174;\t\t\t#[cm**(3)/mol]\n",
+ "Beta_T1_P1 = 256*10**(-6);\t\t\t#[K**(-1)]\n",
+ "Beta_T1_P2 = 366*10**(-6);\t\t\t#[K**(-1)]\n",
+ "Beta_T2_P1 = 458*10**(-6);\t\t\t#[K**(-1)]\n",
+ "Beta_T2_P2 = 568*10**(-6);\t\t\t#[K**(-1)]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# The entropy change is given by\n",
+ "\t\t\t# dS = (Cp/T)*dT - ((dV/dT)_P)*dP\n",
+ "\t\t\t# The mean Cp between 25 and 50 C is \n",
+ "Cp_mean = (Cp_T1_P1 + Cp_T1_P1)/2;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "\n",
+ "\t\t\t# (dV/dT)_P=1bar = (V_T2_P1 - V_T1_P1)/(50 - 25)\n",
+ "dV_dT_P1 = ((V_T2_P1 - V_T1_P1)/(50 - 25))*10**(-6);\t\t\t#[m**(-3)/mol-K]\n",
+ "dV_dT_P2 = ((V_T2_P2 - V_T1_P2)/(50 - 25))*10**(-6);\t\t\t#[m**(-3)/mol-K]\n",
+ "\t\t\t# The mean value of (dV/dT)_P between 1 and 1000 bar is\n",
+ "dV_dT_mean = (dV_dT_P1 + dV_dT_P2)/2;\t\t\t#[m**(-3)/mol-K]\n",
+ "delta_S = Cp_mean*math.log(T_2/T_1) - dV_dT_mean*(P_2 - P_1)*10**(5);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "print \" The value of entropy change is given by delta_S = %f J/mol-K\"%(delta_S);\n",
+ "\n",
+ "\t\t\t# Now let us determine the enthalpy change. We know that\n",
+ "\t\t\t# dH = Cp*dT + [V - T*(dV/dT)_P]*dP\n",
+ "\t\t\t# [V - T*(dV/dT)_P] = (V - T*V*Beta) = val (say)\n",
+ "\t\t\t# At state 1\n",
+ "val_1 = ((V_T1_P1)*10**(-6))*(1 - (T_1)*(Beta_T1_P1));\t\t\t#[m**(3)/mol]\n",
+ "\t\t\t# At state 2\n",
+ "val_2 = ((V_T2_P2)*10**(-6))*(1 - (T_2)*(Beta_T2_P2));\t\t\t#[m**(3)/mol]\n",
+ "val_mean = (val_1 + val_2)/2;\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "delta_H = Cp_mean*(T_2 - T_1) + val_mean*(P_2-P_1)*10**(5);\t\t\t#[J/mol]\n",
+ "\n",
+ "print \" The value of enthalpy change is given by delta_H = %f J/mol\"%(delta_H);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of entropy change is given by delta_S = 5.414201 J/mol-K\n",
+ " The value of enthalpy change is given by delta_H = 3457.542629 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.22 Page Number : 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 100 + 273.15;\t\t\t#[K]\n",
+ "P = 10;\t\t\t#[MPa]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# The volume expansivity is defined as \n",
+ "\t\t\t# Beta = (1/V)*(del V/del T)_P = (1/V)*(dV/dT)_P\n",
+ "\t\t\t# From compressed liquid water tables at 100 C and 10 MPa,\n",
+ "V = 0.0010385;\t\t\t#[m(3)/kg]\n",
+ "Beta = (1/V)*((0.0010549 - 0.0010245)/(120 - 80));\t\t\t#[K**(-1)] \t\t\t# The values are obtained from the steam table as reported in the book.\n",
+ "\n",
+ "print \"The value of volume expansivity is Beta = %e K**-1)\"%(Beta);\n",
+ "\n",
+ "\t\t\t#Isothermal compressibility is defined as\n",
+ "\t\t\t# K_t = -(1/V)*(del V/del T)_T = -(1/V)*(dV/dT)_T\n",
+ "K_t = -(1/V)*((0.0010361 - 0.0010410)/(15 - 5));\t\t\t#[MPa**(-1)] \t\t\t# The values are obtained from the steam table as reported in the book.\n",
+ "\n",
+ "K_t = K_t*10**(-3);\t\t\t#[kPa]\n",
+ "\n",
+ "print \"The value of isothermal compressibility is K_t = %e kPa**-1)\"%(K_t);\n",
+ "\n",
+ "\t\t\t# Cp - Cv = (T*V*(Beta**(2)))/K_t\n",
+ "R = (T*V*(Beta**(2)))/K_t;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \"The value of the difference between Cp and Cv is Cp-Cv = %f kJ/kg-K\"%(R);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of volume expansivity is Beta = 7.318247e-04 K**-1)\n",
+ "The value of isothermal compressibility is K_t = 4.718344e-07 kPa**-1)\n",
+ "The value of the difference between Cp and Cv is Cp-Cv = 0.439860 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.23 Page Number : 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 300 + 273.15;\t\t\t#[K]\n",
+ "P = 4;\t\t\t#[MPa] \n",
+ "\n",
+ "# Calculations and Results\n",
+ "Cp_0 = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3);\t\t\t#[cal/mol-K]\n",
+ "Cp_0 = (Cp_0*4.186)/18.015;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "\t\t\t# Cp(T,P) = Cp_0(T,P=0) - T*integral((del**2 V/del T**(2))_P)*dP from limit 0 to P\n",
+ "\t\t\t# Cp = Cp_0 - T*((del**2 V/del T**2)_Pavg)*(P_2 - P_1)\n",
+ "\n",
+ "P_avg = (0+4)/2;\t\t\t#[MPa]\n",
+ "\n",
+ "\t\t\t#Using finite difference we get (del**2 V/del T**(2)) = ((V_(T+delta T) - 2*V_T + V_(T-delta T))/(delta_T**(2))\n",
+ "\t\t\t#(del**2 V/del T**(2))_Pavg = (V_(350 C) + V_(250 C) - 2*V_(300 C))/(delta_T**(2)) = del_2 (say)\n",
+ "del_2 = (0.13857 + 0.11144 - 2*0.12547)/(50**(2));\t\t\t#[m**(3)/kg-K**2] \t\t\t# The values are obtained from the steam table as reported in the book.\n",
+ "\n",
+ "\n",
+ "Cp = Cp_0 - T*del_2*4000;\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "print \" The value of constant pressure specific heat capacity is Cp = %f kJ/kg-K\"%(Cp);\n",
+ "\n",
+ "\t\t\t# At P = 4 MPa\n",
+ "\t\t\t# Cp = (del H/del T)_P = (H_350 C - H_250 C)/(350 - 250.4)\n",
+ "\t\t\t# Cp = (3092.5 - 2801.4)/(350 - 250.4) = 2.923 [kJ/kg-K]\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of constant pressure specific heat capacity is Cp = 2.858079 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.24 Page Number : 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 300 + 273.15;\t\t\t#[K]\n",
+ "P = 2.0;\t\t\t#[MPa]\n",
+ "\n",
+ "\t\t\t# At 2 MPa and 250 C \n",
+ "H_1 = 2902.5;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# At 2 MPa and 350 C \n",
+ "H_2 = 3137.0;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "# Calculations\n",
+ "Cp = (H_2 - H_1)/(350 - 250);\t\t\t#[kJ/kg-K]\n",
+ "\n",
+ "# Results\n",
+ "print \" The value of constant pressure specific heat capacity is Cp = %f kJ/kg-K\"%(Cp);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of constant pressure specific heat capacity is Cp = 2.345000 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.25 Page Number : 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "T = 80 + 273.15;\t\t\t#[K]\n",
+ "P = 10;\t\t\t#[MPa] \n",
+ "\n",
+ "V_1 = 0.0010245;\t\t\t#[m**(3)/kg]\n",
+ "\t\t\t# At 60 C and 10 MPa\n",
+ "V_2 = 0.0010127;\t\t\t#[m**(3)/kg]\n",
+ "\t\t\t# At 100 C and 10 MPa\n",
+ "V_3 = 0.0010385;\t\t\t#[m**(3)/kg]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Beta = (1/V_1)*((V_3 - V_2)/(100 - 60));\t\t\t#[K**(-1)]\n",
+ "\n",
+ "print \"The value of volume expansivity is Beta = %e K**-1)\"%(Beta);\n",
+ "\n",
+ "\t\t\t#Isothermal compressibility is given by\n",
+ "\t\t\t# K_t = -(1/V)*(del V/del P)_T\n",
+ "\n",
+ "\t\t\t# Temperature is kept fixed at 80 C and different pressures are taken to calculate (del V/del P)_T\n",
+ "\t\t\t# At 80 C and 5 MPa\n",
+ "V_4 = 0.0010268;\t\t\t#[m**(3)/kg]\n",
+ "\t\t\t# At 80 C and 10 MPa\n",
+ "V_5 = 0.0010245;\t\t\t#[m**(3)/kg]\n",
+ "\t\t\t# At 80 C and 15 MPa\n",
+ "V_6 = 0.0010222;\t\t\t#[m**(3)/kg]\n",
+ "\n",
+ "\t\t\t# K_t = -(1/V)*(del V/del T)_P\n",
+ "K_t = -(1/V_1)*((V_4 - V_6)/(5 - 15));\t\t\t#[MPa**(-1)]\n",
+ "K_t = K_t*10**(-6);\t\t\t#[Pa**(-1)]\n",
+ "\n",
+ "print \"The value of isothermal compressibility is K_t = %e Pa**-1)\"%(K_t);\n",
+ "\n",
+ "\t\t\t# Cp - Cv = (T*V*(Beta**(2)))/K_t\n",
+ "R = (T*V_1*(Beta**(2)))/K_t;\t\t\t#[J/kg-K]\n",
+ "\n",
+ "print \"The value of the difference between Cp and Cv is Cp-Cv = %f J/kg-K\"%(R);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of volume expansivity is Beta = 6.295754e-04 K**-1)\n",
+ "The value of isothermal compressibility is K_t = 4.489995e-10 Pa**-1)\n",
+ "The value of the difference between Cp and Cv is Cp-Cv = 319.389628 J/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.26 Page Number : 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "P_1 = 150;\t\t\t#[bar]\n",
+ "P_2 = 1;\t\t\t#[bar]\n",
+ "\n",
+ "T_1 = 300;\t\t\t#[K]\n",
+ "T_2 = 260;\t\t\t#[K]\n",
+ "T_3 = 280;\t\t\t#[K]\n",
+ "T_4 = 200;\t\t\t#[K]\n",
+ "T_5 = 120;\t\t\t#[K]\n",
+ "T_6 = 140;\t\t\t#[K]\n",
+ "\n",
+ "H_P1_T1 = 271.8;\t\t\t#[kJ/kg]\n",
+ "H_P2_T2 = 260.0;\t\t\t#[kJ/kg] \n",
+ "H_P2_T3 = 280.2;\t\t\t#[kJ/kg]\n",
+ "H_P1_T4 = 129.2;\t\t\t#[kJ/kg]\n",
+ "H_P2_T5 = 118.8;\t\t\t#[kJ/kg]\n",
+ "H_P2_T6 = 139.1;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(a)\n",
+ "\n",
+ "\n",
+ "T_new = ((H_P1_T1 - H_P2_T2)/(H_P2_T3 - H_P2_T2))*(T_3 - T_2) + T_2;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# Therefore Joule-Thomson coefficient is given by,\n",
+ "meu = (T_1 - T_new)/(P_1 - P_2);\t\t\t#[K/bar]\n",
+ "\n",
+ "print \" a).The value of Joule-Thomson coefficient for initial T = 300 K) is %f J/bar\"%(meu);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "\n",
+ "\n",
+ "T_new_prime = ((H_P1_T4 - H_P2_T5)/(H_P2_T6 - H_P2_T5))*(T_6 - T_5) + T_5;\t\t\t#[K]\n",
+ "\n",
+ "\t\t\t# Therefore Joule-Thomson coefficient is given by,\n",
+ "meu_prime = (T_4 - T_new_prime)/(P_1 - P_2);\t\t\t#[K/bar]\n",
+ "\n",
+ "print \" b).The value of Joule-Thomson coefficient for initial T = 200 K) is %f J/bar\"%(meu_prime);\n",
+ "\n",
+ "\t\t\t# Therefore the Joule-Thomson coefficient is higher for low initial temperatures and therefore the drop in temperature is more.\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The value of Joule-Thomson coefficient for initial T = 300 K) is 0.190046 J/bar\n",
+ " b).The value of Joule-Thomson coefficient for initial T = 200 K) is 0.468146 J/bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.27 Page Number : 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 300;\t\t\t#[K] - Temperature\n",
+ "P = 5;\t\t\t#[atm] - Pressure\n",
+ "P = P*101325;\t\t\t#[Pa]\n",
+ "Cp_0 = 35.78;\t\t\t#[J/mol-K] - Smath.tan(math.radiansard specific heat capacity at constant pressure\n",
+ "B = -50;\t\t\t#[cm**(3)/mol]\n",
+ "B = B*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# (dB/dT) = 1.0 = dB_dT (say)\n",
+ "dB_dT = 1.0;\t\t\t#[cm**(3)/mol-K]\n",
+ "dB_dT = dB_dT*10**(-6);\t\t\t#[m**(3)/mol-K]\n",
+ "\n",
+ "\t\t\t# (d**2 B/d T**2) = -0.01 = dB_dT_2 (say)\n",
+ "dB_dT_2 = -0.01;\t\t\t#[cm**(3)/mol-K**(2)]\n",
+ "dB_dT_2 = dB_dT_2*10**(-6);\t\t\t#[m**(3)/mol-K**(2)]\n",
+ "\n",
+ "Cp = Cp_0 - P*T*(dB_dT_2);\t\t\t#[[J/mol-K]] - Specific heat capacity at constant pressure\n",
+ "\n",
+ "\t\t\t#Therefore Joule-Thomson coefficient is given by,\n",
+ "meu = (1/Cp)*(-B + T*dB_dT);\t\t\t#[K/Pa]\n",
+ "meu = meu*10**(5);\t\t\t#[K/bar]\n",
+ "\n",
+ "# Results\n",
+ "print \" c).The value of Joule-Thomson coefficient is %f K/bar\"%(meu);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " c).The value of Joule-Thomson coefficient is 0.938341 K/bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.30 Page Number : 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "den_liq = 13690.;\t\t\t#[kg/m**(3)] - Density of liquid mercury\n",
+ "den_solid = 14190.;\t\t\t#[kg/m**(3)] - Density of solid mercury\n",
+ "mp = -38.87;\t\t\t#[C] - Melting point of mercury at pressure of 1 bar\n",
+ "mp = mp + 273.15;\t\t\t#[K]\n",
+ "T_req = 0.;\t\t\t#[C] - Required temperature to which the melting point is to be raised\n",
+ "T_req = T_req + 273.15;\t\t\t#[K]\n",
+ "H_fus = 11.62;\t\t\t#[kJ/kg] - Latent heat of fusion of mercury\n",
+ "\n",
+ "# Calculations\n",
+ "V_liq = (1/den_liq);\t\t\t#[m**(3)/kg] - Specific volume of liquid mercury\n",
+ "\n",
+ "V_solid = (1/den_solid);\t\t\t#[m**(3)/kg] - Specific volume of solid mercury\n",
+ "\n",
+ "\t\t\t# (delta P/delta T) = ((P - 1)*100)/(T_req - mp)\n",
+ "\t\t\t# delta H/(T*delta V) = (H_liq - H_solid)/(T*(V_liq - V_solid)) = del (say)\n",
+ "d = (H_fus)/(mp*(V_liq - V_solid));\t\t\t#[kPa/K] - delta H/(T*delta V)\n",
+ "\n",
+ "\t\t\t#Equating the two sides and then solving we get\n",
+ "P = (d*(T_req - mp))/100 + 1;\t\t\t#[bar]\n",
+ "\n",
+ "# Results\n",
+ "print \" The required pressure should be %f bar\"%(P);\n",
+ "\n",
+ "# answers are correct but vary from book because of rouding error. please calculate manually."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The required pressure should be 7491.335878 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.31 Page Number : 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Calculations and Results\n",
+ "\t\t\t#(1)\n",
+ "\t\t\t# At 1 bar\n",
+ "\t\t\t# Considering the data given at pressure 1 and 1000 bar, we have\n",
+ "delta_H_fus_1 = ((1000-1)*10**(5)*(273.15-22.6)*3.97*10**(-6))/(14.8+22.6);\t\t\t#[J/mol]\n",
+ "delta_S_fus_1 = delta_H_fus_1/(273.15-22.6);\t\t\t#[J/mol-K]\n",
+ "\n",
+ "print \" 1).The delta_H_fus at 1 bar is %f J/mol\"%(delta_H_fus_1);\n",
+ "print \" The delta_S_fus at 1 bar is %f J/mol-K\"%(delta_S_fus_1);\n",
+ "\n",
+ "\t\t\t#(2)\n",
+ "\t\t\t# At 6000 bar\n",
+ "T_mean = (128.8+173.6)/2;\t\t\t#[C] - Mean temperature\n",
+ "T_mean = T_mean + 273.15;\t\t\t#[K]\n",
+ "delta_V_fus_mean = (1.12+1.55)/2;\t\t\t#[cm**(3)/mol]\n",
+ "\n",
+ "\t\t\t# Consider the data at pressure of 5000 and 7000 bar we get,\n",
+ "delta_H_fus_2 = ((7000-5000)*10**(5)*(T_mean*delta_V_fus_mean*10**(-6)))/(173.6-128.8);\t\t\t#[J/mol]\n",
+ "delta_S_fus_2 = delta_H_fus_2/T_mean;\t\t\t#[J/mol-K]\n",
+ "\n",
+ "print \" 2).The delta_H_fus at 6000 bar is %f J/mol\"%(delta_H_fus_2);\n",
+ "print \" The delta_S_fus at 6000 bar is %f J/mol-K\"%(delta_S_fus_2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1).The delta_H_fus at 1 bar is 2656.921969 J/mol\n",
+ " The delta_S_fus at 1 bar is 10.604358 J/mol-K\n",
+ " 2).The delta_H_fus at 6000 bar is 2529.050223 J/mol\n",
+ " The delta_S_fus at 6000 bar is 5.959821 J/mol-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.32 Page Number : 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "H_fus = 80;\t\t\t#[cal/g] - Heat of fusion at 0 C and 1 atm pressure\n",
+ "T = 0+273.15;\t\t\t#[K] - Temperature\n",
+ "vol_ratio = 1.091;\t\t\t# Ratio of the specific volume of ice and water.\n",
+ "sp_vol = 0.001;\t\t\t#[m**(3)/kg] - Specific volume of saturated liquid water.\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# The clapeyron equation can be written as\n",
+ "\t\t\t# (dP/dT)_sat = T*delta V_LS/(delta H_LS) = (T*(V_ice - V_water))/(H_ice - H_water)\n",
+ "dP_dT = (T*(vol_ratio - 1)*10**(-3))/(-H_fus*4.186);\t\t\t#[K/kPa]\n",
+ "\n",
+ "# Results\n",
+ "print \"The value of dT/dP)_sat is %e K/kPa\"%(dP_dT);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of dT/dP)_sat is -7.422554e-05 K/kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.33 Page Number : 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "P = 2;\t\t\t#[atm] - Surrounding pressure\n",
+ "bp_water = 100 + 273.15;\t\t\t#[K] - Boiling point of water at 1 atm pressure\n",
+ "delta_H_vap = 2257;\t\t\t#[kJ/kg] - Enthalpy of vaporization\n",
+ "delta_H_vap = delta_H_vap*18.015;\t\t\t#[J/mol]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# The clapeyron equation is given by\n",
+ "\t\t\t# math.log(P_2_sat/P_1_sat) = (-delta H_vap/R)*(1/T_2 - 1/T_1)\n",
+ "P_1_sat = 1;\t\t\t#[atm]\n",
+ "P_2_sat = P;\n",
+ "T_1 = bp_water;\n",
+ "\n",
+ "\t\t\t# Solving the above equation\n",
+ "T_2 = 1/((math.log(P_2_sat/P_1_sat))/(-delta_H_vap/R) + (1/T_1));\t\t\t#[K]\n",
+ "T_2 = T_2 - 273.15;\t\t\t#[C]\n",
+ "\n",
+ "# Results\n",
+ "print \" The boiling point of water at a pressure of 2 atm is %f C\"%(T_2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The boiling point of water at a pressure of 2 atm is 120.836990 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.34 Page Number : 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T_1 = 0.01 +273.15;\t\t\t#[K]\n",
+ "T_2 = 1 + 273.15;\t\t\t#[K]\n",
+ "P_sat_1 = 0.611;\t\t\t#[kPa] - P_sat at temperature T_1\n",
+ "P_sat_2 = 0.657;\t\t\t#[kPa] - P_sat at temperature T_2\n",
+ "Mol_wt = 18.015;\t\t\t#[g/mol] - Molecular weight of water\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results \n",
+ " # The clapeyron equation is given by\n",
+ "\t\t\t# math.log(P_sat_2/P_sat_1) = (-delta H_LV/R)*(1/T_2 - 1/T_1)\n",
+ "\n",
+ "\t\t\t# Solving the above equation\n",
+ "delta_H = -(math.log(P_sat_2/P_sat_1)/(1/T_2 - 1/T_1))*R;\t\t\t#[J/mol]\n",
+ "delta_H = delta_H/Mol_wt;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "print \" The enthalpy of vaporization is %f kJ/kg\"%(delta_H);\n",
+ "\n",
+ "\t\t\t# Entropy of vaporization is given by\n",
+ "S_vap = delta_H/T_2;\t\t\t#[kJ/kg-K]\n",
+ "print \" The entropy of vaporization is %f kJ/kg-K\"%(S_vap);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The enthalpy of vaporization is 2533.991278 kJ/kg\n",
+ " The entropy of vaporization is 9.243083 kJ/kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.35 Page Number : 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T = 100. + 273.15;\t\t\t#[K]\n",
+ "\t\t\t# (dT/dP)_sat = (1/27.12) K/mm\n",
+ "dT_dP = (1/27.12);\t\t\t#[K/mm]\n",
+ "dT_dP = dT_dP*(760./101325);\t\t\t#[K/Pa]\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# The clapeyron equation is given by\n",
+ "\t\t\t# (dP/dT)_sat = (-delta H_LV)/(T*delta V_LV)\n",
+ "\t\t\t# delta H_LV = T*delta V_LV*(dP/dT)_sat\n",
+ "\n",
+ "\t\t\t# (dP/dT)_sat = 1/(dT/dP)_sat\n",
+ "dP_dT = 1/dT_dP;\t\t\t#[Pa/K]\n",
+ "\n",
+ "\t\t\t# From saturated steam table at 100 C\n",
+ "V_vap = 1.6729;\t\t\t#[m**(3)/kg]\n",
+ "V_liq = 0.001044;\t\t\t#[m**(3)/kg]\n",
+ "delta_V = V_vap - V_liq;\t\t\t#[m**(3)/kg]\n",
+ "\n",
+ "\t\t\t# Therefore delta_H_LV is given by\n",
+ "delta_H_LV = T*delta_V*(dP_dT);\t\t\t#[J/kg]\n",
+ "delta_H_LV = delta_H_LV*10**(-3);\t\t\t#[kJ/kg]\n",
+ "\n",
+ "# Results\n",
+ "print \" The heat of vaporization of water is %f kJ/kg\"%(delta_H_LV);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The heat of vaporization of water is 2255.667174 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.36 Page Number : 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 100 + 273.15;\t\t\t#[K]\n",
+ "P_1 = 1.01325;\t\t\t#[bar]\n",
+ "T_2 = 98 + 273.15;\t\t\t#[K]\n",
+ "P_2 = 0.943;\t\t\t#[bar]\n",
+ "V_vap = 1.789;\t\t\t#[m**(3)] - Volume in vapour phase\n",
+ "vessel_vol = 1.673;\t\t\t#[m**(3)] - Volume of the vessel\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t\n",
+ "x = vessel_vol/V_vap;\n",
+ "\n",
+ "\t\t\t\n",
+ "m_vap = x;\t\t\t#[kg] - Mass of saturated vapour\n",
+ "m_liq = (1 - x);\t\t\t#[kg] - Mass of saturated liquid\n",
+ "\n",
+ "print \" The amount of vapour condensed is %f kg\"%(m_liq);\n",
+ "\n",
+ "\t\t\t# The clapeyron equation is given by\n",
+ "\t\t\t# math.log(P_2_sat/P_1_sat) = (-delta H_LV/R)*(1/T_2 - 1/T_1)\n",
+ "\n",
+ "\t\t\t# Solving the above equation\n",
+ "delta_H = -(math.log(P_2/P_1)/(1/T_2 - 1/T_1))*R;\n",
+ "delta_H = delta_H/18.015;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "print \" The latent heat of vaporization is %f kJ/kg\"%(delta_H);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The amount of vapour condensed is 0.064841 kg\n",
+ " The latent heat of vaporization is 2296.240786 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.37 Page Number : 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from scipy.integrate import quad \n",
+ "from scipy.optimize import *\n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard reaction temperature\n",
+ "delta_H_gas = -52.23;\t\t\t#[kcal/mol] - Enthalpy of formation of C2H5OH(gas)\n",
+ "delta_H_liq = -66.35;\t\t\t#[kcal/mol] - Enthalpy of formation of C2H5OH(liq)\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# For ethanol(g) [T is in K and Cp_0 in cal/mol-K]\n",
+ "\t\t\t# Cp_0 = 4.75 + 5.006*10**(-2)*T - 2.479*10**(-5)*T**(2) + 4.79*10**(-9)*T**(3)\n",
+ "\n",
+ "\t\t\t# For ethanol(l) [T is in K and Cp_0 in cal/mol-K]\n",
+ "\t\t\t# Cp_0 = 67.29 - 0.343*T - 6.94*10**(-4)*T**(2)\n",
+ "\n",
+ "\t\t\t# The vaporization of a liquid can be written as C2H5OH(liq) - C2H5OH(gas)\n",
+ "\t\t\t# Since the pressure is 1 atm therefore the standard data can be used\n",
+ "delta_H_298 = delta_H_gas - delta_H_liq;\t\t\t#[kcal/mol]\n",
+ "delta_H_298 = delta_H_298*1000;\t\t\t#[cal/mol]\n",
+ "delta_a = 4.75 - 67.29;\n",
+ "delta_b = 5.006*10**(-2) - (-0.343);\n",
+ "delta_c = -2.479*10**(-5) - 6.94*10**(-4);\n",
+ "delta_d = 4.79*10**(-9);\n",
+ "\n",
+ "\t\t\t# The standard enthalpy of vaporization at a temperature T is given by\n",
+ "\n",
+ "def f31(T): \n",
+ "\t return delta_a + delta_b*T + delta_c*T**(2) + delta_d*T**(3)\n",
+ "\n",
+ "\t\t\t# delta_H_T = delta_H_298 + quad(f31,T_1,T)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t# Therefore the standard enthalpy of vaporization at a temperature T = 283 K is given by\n",
+ "T_2 = 283;\t\t\t#[K]\n",
+ "\n",
+ "def f32(T): \n",
+ "\t return delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3)\n",
+ "\n",
+ "delta_H_283 = delta_H_298 + quad(f32,T_1,T_2)[0]\n",
+ "\n",
+ "\n",
+ "\t\t\t# Therefore the standard enthalpy of vaporization at a temperature T = 348 K is given by\n",
+ "T_3 = 348;\t\t\t#[K]\n",
+ "\n",
+ "def f33(T): \n",
+ "\t return delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3)\n",
+ "\n",
+ "delta_H_348 = delta_H_298 + quad(f33,T_1,T_3)[0]\n",
+ "\n",
+ "\n",
+ "print \" The value of enthalpy of vaporization at 283 K is %f cal/mol\"%(delta_H_283);\n",
+ "print \" The value of enthalpy of vaporization at 298.15 K is %f cal/mol\"%(delta_H_298);\n",
+ "print \" The value of enthalpy of vaporization at 348 K is %f cal/mol\"%(delta_H_348);\n",
+ "\n",
+ "\n",
+ "\t\t\t# Solving the above equatio manually we get,\n",
+ "\t\t\t# delta_H_vap = 1.1975*10**(-9)*T**(4) - 2.396*10**(-4)*T**(3) + 0.1965*T**(2) - 62.54*T + 21639.54 \n",
+ "\t\t\t# Solving for 'T' at which 'delta_H_vap' = 0\n",
+ "def f(T): \n",
+ "\t return 1.1975*10**(-9)*T**(4)-2.396*10**(-4)*T**(3)+0.1965*T**(2)-62.54*T + 21639.54\n",
+ "T_0 = fsolve(f,500)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \" The temperature obtained by equating standard enthalpy of vaporization equal to zero is %f K\"%(T_0);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of enthalpy of vaporization at 283 K is 14255.030925 cal/mol\n",
+ " The value of enthalpy of vaporization at 298.15 K is 14120.000000 cal/mol\n",
+ " The value of enthalpy of vaporization at 348 K is 13593.385895 cal/mol\n",
+ " The temperature obtained by equating standard enthalpy of vaporization equal to zero is 635.058887 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.38 Page Number : 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variables\n",
+ "T = 300 + 273.15;\t\t\t#[K] - Temperature\n",
+ "P = 9000;\t\t\t#[kPa] - Pressure\n",
+ "P_sat = 8592.7;\t\t\t#[kPa] - Vapour pressure of saturated water at 300 C\n",
+ "f_sat = 6738.9;\t\t\t#[kPa] - Fugacity of saturated water at 300 C\n",
+ "V_liq = 25.28;\t\t\t#[cm**(3)/mol] - Molar volume of water in liquid phase\n",
+ "V_liq = V_liq*10**(-6);\t\t\t# [m**(3)/mol]\n",
+ "V_vap = 391.1;\t\t\t#[cm**(3)/mol] - Molar volume of water in vapour phase\n",
+ "V_vap = V_vap*10**(-6);\t\t\t# [m**(3)/mol]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "\t\t\t# At 300 C and 9000 kPa water is a compressed liquid and its fugacity is given by\n",
+ "\t\t\t# f = f_sat*exp[V_liq*(P - P_sat)/R*T]\n",
+ "fugacity = f_sat*math.exp((V_liq*(P - P_sat)*1000)/(R*T));\n",
+ "\n",
+ "# Results\n",
+ "print \" The fugacity of water at 9000 kPa is %f kPa\"%(fugacity);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The fugacity of water at 9000 kPa is 6753.477111 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.39 Page Number : 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T = 200 + 273.15;\t\t\t#[K] - Temperature\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\t\t\t# From steam table at 200 C as reported in the book\n",
+ "P_sat = 1.5538;\t\t\t#[MPa] - Vapour pressure of saturated steam\n",
+ "H_vap = 2793.2;\t\t\t#[kJ/kg] - Enthalpy of saturated steam in vapour phase\n",
+ "S_vap = 6.4323;\t\t\t#[kJ/kg-K] - Entropy of saturated steam in vapour phase\n",
+ "\n",
+ "# Calculations\n",
+ "G_sat = H_vap - T*S_vap;\t\t\t#[kJ/kg] - Gibbs free energy\n",
+ "G_sat = G_sat*18.015;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# Now let us calculate the Gibbs free energy at the lowest pressure available in superheated steam tables at 200 C\n",
+ "\t\t\t# At 200 C and 0.01 MPa as reported in the book\n",
+ "H = 2879.5;\t\t\t#[kJ/kg] - Enthalpy\n",
+ "S = 8.9038;\t\t\t#[kJ/kg-K] - Entropy\n",
+ "G_ig = H - T*S;\t\t\t#[kJ/kg] - Gibbs free energy\n",
+ "G_ig = G_ig*18.015;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# Integrating from ideal gas state at 200 C and 0.01 MPa to saturated vapour at 200 C we get\n",
+ "\t\t\t# G_sat - G_ig = R*T*math.log(f_sat/f_ig)\n",
+ "\n",
+ "\t\t\t# Under the ideal gas condition the pressure is small therefore f_ig = P = 0.01 MPa\n",
+ "f_ig = 0.01;\t\t\t#[MPa]\n",
+ "\n",
+ "\t\t\t# Solving the above equation\n",
+ "f_sat = f_ig*(math.exp((G_sat - G_ig)/(R*T)));\t\t\t#[MPa]\n",
+ "\n",
+ "# Results\n",
+ "print \" The fugacity of saturated steam at 200 C is %f MPa\"%(f_sat);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The fugacity of saturated steam at 200 C is 1.426074 MPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.40 Page Number : 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T = 320 + 273.15;\t\t\t#[K]\n",
+ "P_1 = 70;\t\t\t#[bar]\n",
+ "P_2 = 170;\t\t\t#[bar]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t#(a)\n",
+ "\t\t\t# dG = R*T*dmath.log(f)\n",
+ "\t\t\t# G - G_ig = R*T*math.log(f/f_ig)\n",
+ "\n",
+ "\t\t\t# From steam table the low pressure that is available is 1 kPa.\n",
+ "f_ig = 1;\t\t\t#[kPa] - Assuming ideal gas behaviour at such low pressure\n",
+ "\n",
+ "\t\t\t# At 1 kPa (under saturated conditions)\n",
+ "P_sat = 112.891;\t\t\t#[bar]\n",
+ "\t\t\t# Therefore at both 1 kPa and 70 bar the stem is superheated and byond a pressure of 112.891 bar it is compressed liquid.\n",
+ "\n",
+ "\t\t\t# For superheated steam table at 1 kPa and 320 C, as repoted in the book\n",
+ "H_1 = 3117.08;\t\t\t#[kJ/kg] - Enthalpy\n",
+ "S_1 = 10.41232;\t\t\t#[kJ/kg-K] - Entropy\n",
+ "\n",
+ "\t\t\t# For superheated steam table at 70 bar and 320 C, as repoted in the book\n",
+ "H_2 = 2916.92;\t\t\t#[kJ/kg] - Enthalpy\n",
+ "S_2 = 6.0651;\t\t\t#[kJ/kg-K] - Entropy\n",
+ "\n",
+ "\t\t\t# At 70 bar and 320 C,\n",
+ "G = H_2 - T*S_2;\t\t\t#[kJ/kg] - Gibbs free energy\n",
+ "\t\t\t# At 1 kPa and 320 C\n",
+ "G_ig = H_1 - T*S_1;\t\t\t#[kJ/kg] - Gibbs free energy\n",
+ "\n",
+ "\t\t\t# math.log(f/f_ig) = (G - G_ig)/(R*T)\n",
+ "f = f_ig*(math.exp((G - G_ig)*18/(R*T)));\t\t\t#[kPa]\n",
+ "f = f*10**(-2);\t\t\t#[bar]\n",
+ "\n",
+ "\t\t\t# At 70 bar\n",
+ "phi = f/P_1;\n",
+ "\n",
+ "print \" a).The fugacity of steam at 320 C and 70 bar is %f bar\"%(f);\n",
+ "print \" The fugacity coefficient at 320 C and 70 bar is phi = %f\"%(phi);\n",
+ "\n",
+ "\t\t\t#(b)\n",
+ "\t\t\t# Now consider saturated steam at 320 C. We have\n",
+ "P_sat = 112.891;\t\t\t#[bar]\n",
+ "V_liquid = 1.5;\t\t\t#[cm**(3)/mol] - Molar vlume of saturated liquid\n",
+ "V_liquid = V_liquid*10**(-6);\t\t\t#[m**(3)/mol]\n",
+ "V_vapour = 15.48;\t\t\t#[cm**(3)/mol] - Molar vlume of saturated vapour\n",
+ "U_liqid = 1445.7;\t\t\t#[Kj/kg] - Internal energy of satuarted liquid\n",
+ "U_vapour = 2528.9;\t\t\t#[kJ/kg] - Internal energy of satuarted vapour\n",
+ "H_liquid = 1462.6;\t\t\t#[kJ/kg] - Enthalpy of saturated liquid\n",
+ "H_vapour = 2703.7;\t\t\t#[kJ/kg] - Enthalpy of saturated vapour\n",
+ "S_liquid = 3.45;\t\t\t#[kJ/kg-K] - Entropy of saturated liquid\n",
+ "S_vapour = 5.5423;\t\t\t#[kJ/kg-K] - Entropy of saturated vapour\n",
+ "\n",
+ "\t\t\t# Now let us calculate Gibbs free energy of saturated liquid and saturated vapour\n",
+ "G_liquid = H_liquid - T*S_liquid;\t\t\t#[kJ/kg]\n",
+ "G_vapour = H_vapour - T*S_vapour;\t\t\t#[kJ/kg]\n",
+ "\t\t\t# Note that under saturated conditions\n",
+ "\t\t\t# G_sat = G_liquid = G_vapour\n",
+ "G_sat = G_liquid;\t\t\t#[kJ/kg]\n",
+ "\n",
+ "\t\t\t# math.log(f_sat/f_ig) = (G_sat - G_ig)/(R*T)\n",
+ "f_sat = f_ig*(math.exp((G_sat - G_ig)*18/(R*T)));\t\t\t#[kPa]\n",
+ "f_sat = f_sat*10**(-2);\t\t\t#[bar]\n",
+ "\n",
+ "phi_sat = f_sat/P_sat;\n",
+ "\n",
+ "\t\t\t# And now the fugacity is to be determined at 320 C and P = 170 bar. We know the following relation for compressed liquid.\n",
+ "\t\t\t# f_CL = f_sat*exp(V_liquid*(P-P_sat)/(R*T))\n",
+ "f_CL = f_sat*math.exp(V_liquid*18*(P_2-P_sat)*10**(5)/(R*T));\t\t\t#[bar]\n",
+ "\n",
+ "\t\t\t# Therefore the fugacity coefficient at 170 bar and 320 C is given by\n",
+ "phi_2 = f_CL/P_2;\n",
+ "\n",
+ "print \" b).The fugacity of steam at 320 C and 170 bar is %f bar\"%(f_CL);\n",
+ "print \" The fugacity coefficient at 320 C and 170 bar is phi = %f\"%(phi_2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a).The fugacity of steam at 320 C and 70 bar is 58.913361 bar\n",
+ " The fugacity coefficient at 320 C and 70 bar is phi = 0.841619\n",
+ " b).The fugacity of steam at 320 C and 170 bar is 86.552966 bar\n",
+ " The fugacity coefficient at 320 C and 170 bar is phi = 0.509135\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.41 Page Number : 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "# Variables\n",
+ "T = 300 + 273.15;\t\t\t#[K]\n",
+ "P_1 = 12500*10**(3);\t\t\t#[Pa]\n",
+ "P_2 = 8581*10**(3);\t\t\t#[Pa]\n",
+ "P_3 = 300*10**(3);\t\t\t#[Pa]\n",
+ "V_liq = 1.404;\t\t\t#[cm**(3)/g] - Specific volume of liquid\n",
+ "V_liq = (V_liq/10**(6))*18.015;\t\t\t#[m**(3)/mol]\n",
+ "R = 8.314;\t\t\t#[J/mol*K] - Universal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t# state 1: 300 C, 12500 kPa\n",
+ "\t\t\t# state 2: 300 C, 8581 kPa\n",
+ "\t\t\t# state 3: 300 C, 300 kPa\n",
+ "\n",
+ "\t\t\t# From state 1 to state 2 the system is liquid water and if the molar volume of liquid is assumed costant we can write\n",
+ "\t\t\t# G_2 - G_1 = V_liq*(P_2 - P_1)\n",
+ "\t\t\t# G_2 - G_1 = R*Tmath.log(f_2/f_1)\n",
+ "\t\t\t# Comparing the above two equations we get\n",
+ "\t\t\t# (f_2/f_1) = exp((V_liq*(P_2 - P_1)/(R*T))\n",
+ "f2_f1 = math.exp((V_liq*(P_2 - P_1)/(R*T))); \t\t\t# (f_2/f_1) = f2_f1 (say)\n",
+ "\n",
+ "\t\t\t# In state 2 the fugacity of liquid is same as that of saturated vapour and for the vapour phase change from state 2 to 3 the fugacity ratio is calculated using \n",
+ "\t\t\t# G_3 - G_2 = R*Tmath.log(f_3/f_2)\n",
+ "\n",
+ "\t\t\t# At 300 C, 8581 kPa \n",
+ "H_liq_2 = 2749.0;\t\t\t#[kJ/kg]\n",
+ "S_vap_2 = 5.7045;\t\t\t#[kJ/kg-K]\n",
+ "G_vap_2 = -520.53;\t\t\t#[kJ/kg]\n",
+ "G_vap_2 = G_vap_2*18.015;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# At 300 C, 300 kPa \n",
+ "H_3 = 3069.3;\t\t\t#[kJ/kg]\n",
+ "S_3 = 7.7022;\t\t\t#[kJ/kg-K]\n",
+ "G_3 = -1345.22;\t\t\t#[kJ/kg]\n",
+ "G_3 = G_3*18.015;\t\t\t#[J/mol]\n",
+ "\n",
+ "\t\t\t# Substituting and solving the equation G_3 - G_2 = R*Tmath.log(f_3/f_2)\n",
+ "f3_f2 = math.exp((G_3 - G_vap_2)/(R*T));\t\t\t# (f_3/f_2) = f3_f2 (say)\n",
+ "\n",
+ "\t\t\t# (f_3/f_1) = (f_3/f_2)*(f_2/f_1)\n",
+ "f3_f1 = f3_f2*f2_f1;\n",
+ "\n",
+ "print \" The ratio of fugacity in the final state to that in the initial state is given by f3/f2 = %f\"%(f3_f2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The ratio of fugacity in the final state to that in the initial state is given by f3/f2 = 0.044255\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch8_2.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch8_2.ipynb new file mode 100755 index 00000000..6b83d68c --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/ch8_2.ipynb @@ -0,0 +1,752 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8df6804e24ffba947b26128cacd98ede56f82be4a3089c7567d672249f51ebda" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "\n", + "Chapter 8 : Thermodynamic Cycles" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.1 Page Number : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "# Variables\n", + "P_1 = 30;\t\t\t#[bar]\n", + "P_2 = 0.04;\t\t\t#[bar]\n", + "\n", + "\t\t\t#(1).Carnot cycle\n", + "\t\t\t#It has been reported in the book that at 30 bar pressure (saturated) :\n", + "H_liq_1 = 1008.42;\t\t\t#[kJ/kg]\n", + "H_vap_1 = 2804.2;\t\t\t#[kJ/kg]\n", + "S_liq_1 = 2.6457;\t\t\t#[kJ/kg-K]\n", + "S_vap_1 = 6.1869;\t\t\t#[kJ/kh-K]\n", + "\t\t\t#Therefore, H_1 = H_liq_1, H_2 = H_vap_1, S_1 = S_liq_1 and S_2 = S_vap_1\n", + "H_1 = H_liq_1;\n", + "H_2 = H_vap_1;\n", + "S_1 = S_liq_1;\n", + "S_2 = S_vap_1;\n", + "\n", + "#At 0.04 bar pressure (saturated) :\n", + "H_liq_2 = 121.46;\t\t\t#[kJ/kg]\n", + "H_vap_2 = 2554.4;\t\t\t#[kJ/kg]\n", + "S_liq_2 = 0.4226;\t\t\t#[kJ/kg-K]\n", + "S_vap_2 = 8.4746;\t\t\t#[kJ/kh-K]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#Dryness fraction at state 3 can be found the fact that S_3 = S_2 \n", + "x_3 = (S_2 - S_liq_2)/(S_vap_2 - S_liq_2);\n", + "H_3 = H_liq_2*(1 - x_3) + x_3*H_vap_2;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Dryness fraction at state 4 can be found the fact that S_4 = S_1\n", + "x_4 = (S_1 - S_liq_2)/(S_vap_2 - S_liq_2);\n", + "H_4 = H_liq_2*(1 - x_4) + x_4*H_vap_2;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work done by turbine W_tur = -delta_H = -(H_3 - H_2)\n", + "W_tur = H_2 - H_3;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work supplied by boiler,\n", + "q_H = H_2 - H_1;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work transfer in compressor is given by\n", + "W_com = -(H_1 - H_4);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Efficiency can now be calculated as\n", + "\t\t\t#n = (Net work done/Work supplied by boiler)\n", + "n_carnot = (W_tur + W_com)/q_H;\n", + "\n", + "\t\t\t#Efficiency of the Carnot cycle can also be determined from the formula\n", + "\t\t\t# n = 1 - (T_L/T_H), Where T_L is saturated temperature at 0.04 bar and T_H is saturated temperature at 30 bar\n", + "\n", + "print \"1.Carnot cycle\";\n", + "print \"The work done by the turbine is %f kJ/kg\"%(W_tur);\n", + "print \"The heat transfer in the boiler is %f kJ/kg\"%(q_H);\n", + "print \"The cycle efficiency is %f\"%(n_carnot);\n", + "\n", + "\t\t\t#(2).Rankine cycle\n", + "\t\t\t#The enthalpies at state 2 and 3 remain as in the Carnot cycle\n", + "\t\t\t#Saturated liquid enthalpy at 0.04 bar is \n", + "H_4_prime = H_liq_2;\n", + "\n", + "\t\t\t#Saturated liquid volume at 0.04 bar as reported in the book is\n", + "V_liq = 0.001004;\t\t\t#[m**(3)/kg]\n", + "\t\t\t#Work transfer in pump can be calculated as\n", + "W_pump = -V_liq*(P_1 - P_2)*100;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work transfer around pump gives, W_pump = -delta_H = -(H_1_prime - H_4_prime);\n", + "H_1_prime = H_4_prime - W_pump;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Heat supplied to boiler is\n", + "q_H_prime = H_2 - H_1_prime;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work done by turbine is\n", + "W_tur_prime = H_2 - H_3;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Efficiency can now be calculated as\n", + "\t\t\t#n = (Net work done/Heat input)\n", + "n_rankine = (W_tur_prime + W_pump)/q_H_prime;\t\t\t#\n", + "\n", + "print \"2.Rankine cycle\";\n", + "print \"The work done by the turbine is %f kJ/kg\"%(W_tur_prime);\n", + "print \"The heat transfer in the boiler is %f kJ/kg\"%(q_H_prime);\n", + "print \"The cycle efficiency is %f\"%(n_rankine);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.Carnot cycle\n", + "The work done by the turbine is 941.036567 kJ/kg\n", + "The heat transfer in the boiler is 1795.780000 kJ/kg\n", + "The cycle efficiency is 0.404166\n", + "2.Rankine cycle\n", + "The work done by the turbine is 941.036567 kJ/kg\n", + "The heat transfer in the boiler is 2679.732016 kJ/kg\n", + "The cycle efficiency is 0.350046\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.2 Page Number : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_max = 700+273.15;\t\t\t#[K] - Maximum temperature.\n", + "P_boiler = 10*10**(6);\t\t\t#[Pa] - Constant pressure in the boiler\n", + "P_condenser = 10*10**(3);\t\t\t#[Pa] - Constant pressure in the condenser\n", + "\n", + "\t\t\t#At state 2 i.e, at 700 C and 10 MPa,it has been reported in the book that from steam table\n", + "S_2 = 7.1687;\t\t\t#[kJ/kg-K] - Entropy\n", + "H_2 = 3870.5;\t\t\t#[kJ/kg] - Enthalpy\n", + "\n", + "\t\t\t#At state 3 i.e, at 700 C and 10 KPa,\n", + "S_3 = S_2;\t\t\t#[kJ/kg-K]- Entropy \n", + "\n", + "\t\t\t#For sturated steam at 10 kPa, it has been reported in the book that from steam table\n", + "S_liq = 0.6493;\t\t\t#[kJ/kg-K]- Entropy of saturated liquid\n", + "S_vap = 8.1502;\t\t\t#[kJ/kg-K] - Enthalpy of saturated liquid\n", + "\t\t\t#Therefore steam is saturated and its dryness factor can be calculated as\n", + "x = (S_2 - S_liq)/(S_vap - S_liq);\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#The enthalpy at state 3 is now calculated. For steam at 10 kPa,it has been reported in the book that from steam table\n", + "H_liq = 191.83;\t\t\t#[kJ/kg]\n", + "H_vap = 2584.7;\t\t\t#[kJ/kg]\n", + "\t\t\t#Therefore enthalpy at state 3 is\n", + "H_3 = H_liq*(1-x) + H_vap*x;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Work done by the turbine \n", + "W_tur = -(H_3 - H_2);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Now we have to calculate work input to the pump\n", + "\t\t\t#State 4:Saturated liquid at 10 kPa\n", + "\t\t\t#State 4:Compressed liquid at 10 MPa\n", + "\t\t\t#Since volume of liquid does not get affected by pressure we take volume of saturated liquid at 10 kPa,\n", + "V_liq = 0.001010;\t\t\t#[m**(3)/kg]\n", + "\n", + "\t\t\t#Work transfer in the pump is\n", + "W_pump = -V_liq*(P_boiler - P_condenser)*10**(-3);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Energy balance around pump gives, W_pump = -delta_H = -(H_1 - H_4)\n", + "H_4 = H_liq;\t\t\t# Enthalpy at state 4 (saturated liquid at 10 kPa)\n", + "H_1 = H_4 - W_pump;\t\t\t#[kJ/kg]\n", + " \n", + "\t\t\t#Heat supplied to boiler is\n", + "q_H = H_2 - H_1;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Efficiency can now be calculated as\n", + "\t\t\t#n = (Net work done/Heat input)\n", + "n_rankine = (W_tur + W_pump)/q_H;\n", + "\n", + "print \"The efficiency of the Rankine cycle is found to be %f\"%(n_rankine);\n", + "\n", + "\t\t\t#Now let us determine the efficiency of Carnot cycle. The maximun temperature is 700 C and minimum temperature is that of saturated steam at 10 kPa,\n", + "T_min = 45.81 + 273.15;\t\t\t#[K] - From steam table as reported in the book\n", + "n_carnot = 1-(T_min/T_max);\n", + "\t\t\t#Note that the efficiency of Rankine cycle is less than that of carnot cycle" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the Rankine cycle is found to be 0.433088\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.3 Page Number : 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "W = 1.1;\t\t\t#[kW] - Work done per ton of refrigeration \n", + "\t\t\t#1 ton refrigeration = 3.517 kW, therefore\n", + "H = 3.517;\t\t\t#[kW] - Heat absorbed\n", + "T_low = -30 + 273.15;\t\t\t#[K] - Low temperature maintained\n", + "\n", + "# Calculations\n", + "\t\t\t#COP can be calculated as\n", + "\t\t\t#COP = (Heat absorbed/Work done)\n", + "COP = H/W;\n", + "\n", + "\t\t\t#For reversed carnot cycle, COP = T_low/(T_high - T_low). Solving this we get\n", + "T_high = (T_low/COP) + T_low;\t\t\t#[K] - Higher temperature\n", + "\n", + "\t\t\t#Heat rejected is\n", + "H_rej = W + H;\t\t\t#[kW];\n", + "\n", + "# Results\n", + "print \"The COP is %f\"%(COP);\n", + "print \"The higher temperature of the cycle is %f K\"%(T_high);\n", + "print \"The heat rejected per ton of refrigeration is %f kW\"%(H_rej);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The COP is 3.197273\n", + "The higher temperature of the cycle is 319.199190 K\n", + "The heat rejected per ton of refrigeration is 4.617000 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.4 Page Number : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_high = 20 + 273.15;\t\t\t#[K] - High temperature\n", + "T_low = 0 + 273.15;\t\t\t#[K] - Low temperature\n", + "Q_H = 10;\t\t\t#[kW] - Heat supplied\n", + "\n", + "# Calculations\n", + "\t\t\t#If 'Q_H' is the rate at which heat is taken from surrounding and 'W' is the rate at which work is done,then\n", + "\t\t\t# Q_H = W + Q_L\n", + "\t\t\t#(Q_H/Q_L) = (T_high/T_low)\n", + "\t\t\t#Also for a reversible cycle, (Q_H/Q_L) = 1 + (W/Q_L). Solving we get,\n", + "Q_L = (T_low/T_high)*Q_H;\t\t\t#[kW]\n", + "W = (Q_H - Q_L) ;\t\t\t#[kW]\n", + " \n", + "# Results\n", + "print \"The minimum power required is %f kW\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum power required is 0.682245 kW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.5 Page Number : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "T_high = 40 + 273.15;\t\t\t#[K] - High temperature\n", + "T_low = -20 + 273.15;\t\t\t#[K] - Low temperature\n", + "C = 10;\t\t\t#[tons of refrigeration] - Capacity\n", + "\t\t\t#1 ton refrigeration = 3.517 kW, therefore\n", + "H = C*3.517;\t\t\t#[kW] - Heat absorbed\n", + "\n", + "# Calculations\n", + "\t\t\t#For reversed carnot cycle, COP = T_low/(T_high - T_low)\n", + "COP = T_low/(T_high - T_low);\n", + "\n", + "\t\t\t# COP = (Refrigerating effect)/(Work input), therefore power required is given by\n", + "P = (H/COP);\t\t\t#[kW]\n", + "\n", + "# Results\n", + "print \"The COP is %f\"%(COP);\n", + "print \"The power required is %f kW\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The COP is 4.219167\n", + "The power required is 8.335769 kW\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.6 Page Number : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "COP = 4;\t\t\t#Coefficient of performance\n", + "P = 10;\t\t\t#[kW] - Work done on the cycle\n", + "\n", + "# Calculations\n", + "\t\t\t#For reversed carnot cycle, COP = T_low/(T_high - T_low)\n", + "\t\t\t#ratio = (T_high/T_low),therefore\n", + "ratio = -1/(COP + 1);\n", + "\n", + "\t\t\t# Refrigerating effect = (COP)*Work input, therefore refrigeration is given by\n", + "H = COP*P;\t\t\t#[kW]\n", + "\n", + "\t\t\t#Maximum refrigearation in tons is given by\n", + "H_max = (H/3.517);\n", + "\n", + "# Results\n", + "print \"The maximum refrigeration value is %f ton\"%(H_max);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum refrigeration value is 11.373330 ton\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.7 Page Number : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "m = 0.6;\t\t\t#[kg/s] - mass flow rate\n", + "T_low = -20+273.15;\t\t\t#[K] - Temperature at which vapour enters the compressor\n", + "T_high = 30+273.15;\t\t\t#[K] - Temperature at which vapour leaves the condenser\n", + "\n", + "\t\t\t#From saturated refrigeration-12 tables we get,at -20 C\n", + "H_1 = 178.74;\t\t\t#[kJ/kg] - (H_1 = H_vap)\n", + "P_1 = 0.15093;\t\t\t#[MPa] - (P_1 = P_sat)\n", + "P_4 = P_1;\n", + "S_1 = 0.7087;\t\t\t#[kJ/kg-K] - (S_1 = S_vap)\n", + "S_2 = S_1;\n", + "\n", + "\t\t\t#At 30 C\n", + "P_2 = 0.7449;\t\t\t#[MPa] - (P_2 = P_sat)\n", + "P_3 = P_2;\n", + "H_3 = 64.59;\t\t\t#[kJ/kg] - (H_3 = H_liq)\n", + "H_4 = H_3;\n", + "S_3 = 0.24;\t\t\t#[kJ/kg-K] - (S_3 = S_liq)\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#It is assumed that presssure drop in the evaporator and condenser are negligible. The heat transfer rate in the evaporator is\n", + "Q_L = m*(H_1 - H_4);\n", + "\n", + "print \"The heat transfer rate in the evaporator is %f kW\"%(Q_L);\n", + "\n", + "\t\t\t#At state 2 (P = 0.7449 MPa and S = 0.7087 kJ/kg-K) and looking in the superheated tables we have to calculate the enthalpy at state 2\n", + "\n", + "\t\t\t#At P = 0.7 MPa and S = 0.6917 kJ/kg-K,\n", + "H_11 = 200.46;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At P = 0.7 MPa and S = 0.7153 kJ/kg-K,\n", + "H_12 = 207.73;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Thus at P = 0.7 MPa and S = 0.7087 kJ/kg-K, enthalpy is given by\n", + "H_13 = ((S_2 -0.6917)/(0.7153 - 0.6917))*(H_12 - H_11) + H_11;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At P = 0.8 MPa and S = 0.7021 kJ/kg-K,\n", + "H_21 = 206.07;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At P = 0.8 MPa and S = 0.7253 kJ/kg-K,\n", + "H_22 = 213.45;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Thus at P = 0.8 MPa and S = 0.7087 kJ/kg-K, enthalpy is given by\n", + "H_23 = ((S_2 -0.7021)/(0.7253 - 0.7021))*(H_22 - H_21) + H_21;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At P = 0.7449 MPa, S = 0.7087 kJ/kg-K, the enthalpy is\n", + "H_2 = ((0.7449 - 0.7)/(0.8 - 0.7))*(H_23 - H_13) + H_13;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#Power consumed by the compressor is\n", + "W_comp = m*(H_2 - H_1);\t\t\t#[kW]\n", + "\n", + "print \"The power consumed by the compressor is %f kW\"%(W_comp);\n", + "\n", + "\t\t\t#Heat removed in evaporator/work done on compressor\n", + "COP_R = Q_L/W_comp;\n", + "\n", + "print \"The COP the refrigerator is %f kW\"%(COP_R);\n", + "\n", + "\n", + "\t\t\t#At -20 C,saturated conditions \n", + "H_liq = 17.82;\t\t\t#[kJ/kg]\n", + "H_vap = 178.74;\t\t\t#[kJ/kg]\n", + "x_4 = (H_4 - H_liq)/(H_vap - H_liq);\n", + "\n", + "print \"The dryness factor of refrigerant after the expansion valve is %f\"%(x_4);\n", + "\n", + "\t\t\t#The heat transfer rate in the condenser is\n", + "Q_H = m*(H_3 - H_2);\t\t\t#[kW]\n", + "\n", + "print \"The heat transfer rate in the condenser is %f kW\"%(Q_H);\n", + "\n", + "\t\t\t#If the cycle would have worked as a pump then,\n", + "\t\t\t#COP_HP = (Heat supplied from condenser/Work done on compressor)\n", + "COP_HP = (-Q_H)/W_comp;\n", + "\n", + "print \"The COP if cycle would work as a heat pump is %f kW\"%(COP_HP);\n", + "\n", + "\t\t\t#If the cycle would have been a reversed Carnot cycle then\n", + "COP_C = T_low/(T_high - T_low);\n", + "\n", + "print \"The COP if cycle would run as reversed Carnot cycle is %f kW\"%(COP_C);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat transfer rate in the evaporator is 68.490000 kW\n", + "The power consumed by the compressor is 16.840242 kW\n", + "The COP the refrigerator is 4.067044 kW\n", + "The dryness factor of refrigerant after the expansion valve is 0.290641\n", + "The heat transfer rate in the condenser is -85.330242 kW\n", + "The COP if cycle would work as a heat pump is 5.067044 kW\n", + "The COP if cycle would run as reversed Carnot cycle is 5.063000 kW\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.8 Page Number : 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from scipy.optimize import fsolve \n", + "import math \n", + "\t\t\n", + "\n", + "# Variables\n", + "H_1 = 310.38;\t\t\t#[kJ/kg]\n", + "H_2 = 277.7;\t\t\t#[kJ/kg]\n", + "H_5 = -122.6;\t\t\t#[kJ/kg]\n", + "H_6 = 77.8;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#The enthalpy at point 3 is same at point 4 as the expansion is isenthalpic\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#The mass condensed is 1 kg and therefore m_1 = m+6 + 1\n", + "\n", + "\t\t\t#Enthalpy balance around heat exchanger\n", + "\t\t\t#m_2*H_2 + m_2*H_6 = m_3*H_3 + m_7*H_7\n", + "\n", + "\t\t\t#Enthalpy balance around separator\n", + "\t\t\t#m_4*H_4 = m_5*H_5 + m_6*H_6\n", + "\t\t\t#It can be seen that m_1 = m_2 = m_3 = m_4\n", + "\t\t\t#and m_6 = m_7 = m_1 - 1\n", + "\n", + "\t\t\t#Substituting the values for enthalpy balance around heat exchanger we get,\n", + "\t\t\t#m_1*H_2 + (m_1 - 1)*(H_6) = m_1*H_3 + (m_1 - 1)*H_1\n", + "\t\t\t#and substituting the values for enthalpy balance around seperator we get\n", + "\t\t\t#m_1*H_3 = (1)*(-122.6) + (m_1 - 1)*77.8\n", + "\t\t\t#H_3 = ((1)*(-122.6) + (m_1 - 1)*77.8)/m_1\n", + "\t\t\t#Substituting the expression for 'H_3' in the above equation and then solving for m_1, we get\n", + "def f(m_1): \n", + "\t return m_1*H_2+(m_1-1)*(H_6)-m_1*(((1)*(-122.6) + (m_1 - 1)*77.8)/m_1)-(m_1-1)*H_1\n", + "m_1 = fsolve(f,4)\n", + "\t\t\t#Thus to liquify 1 kg of air compression of m_1 kg of air is carried out.\n", + "\n", + "\t\t\t#Now substituting this value of m_1 to get the value of H_3,\n", + "H_3 = ((1)*(-122.6) + (m_1 - 1)*77.8)/m_1;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#From given compressed air table we see at 200 bar and 160 K,\n", + "H_3_1 = 40.2;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#At 200 bar and 180 K,\n", + "H_3_2 = 79.8;\t\t\t#[kJ/kg]\n", + "\t\t\t#By interpolation we get,\n", + "T_3 = ((H_3 - H_3_1)*(180 - 160))/(H_3_2 - H_3_1) + 160;\t\t\t#[K]\n", + "\n", + "print \"Temperature before throttling is %f K\"%(T_3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature before throttling is 171.350719 K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.9 Page Number : 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "# Variables\n", + "\t\t\t#At 1 bar, 310 K \n", + "H_1 = 310.38;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 200 bar, 310 K\n", + "H_2 = 277.7;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 1 bar, Saturated liquid\n", + "H_7 = -122.6;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 1 bar, Saturated vapour\n", + "H_8 = 77.8;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 200 bar, 200 K\n", + "H_3 = 117.6;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 1 bar, 100 K\n", + "H_11 = 98.3;\t\t\t#[kJ/kg]\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#For 1 kg of liquid air obtained,the overall enthalpy balance is\n", + "\t\t\t#m_2*H_2 = W - 122.6 + (m_2 - 1)*H_1\n", + "\t\t\t#W = - 0.8*m_2*(H_11 - H_3)\n", + "\t\t\t#Overall enthalpy balance equation becomes\n", + "\t\t\t#H_2*m_2 = 15.44*m_2 - H_7 + (m_2 - 1)*H_1, solving\n", + "m_2_prime = (H_7 - H_1)/(H_2 - 15.44 - H_1);\n", + "\n", + "print \"The number of kimath.lograms of air compressed per kg of liquid air produced is %f kg\"%(m_2_prime);\n", + "\n", + "\t\t\t#(2)\n", + "\t\t\t#Enthalpy balance around separator is \n", + "\t\t\t#0.2*m_2*H_5 = -H_7 + (0.2*m_2 - 1)*H_8, solving\n", + "m_2 = m_2_prime;\n", + "H_5_prime = ((0.2*m_2-1)*H_8 - H_7)/(0.2*m_2);\n", + "\n", + "\t\t\t#At point 5, P = 200 bar and enthalpy is\n", + "H_5_1 = -33.53;\t\t\t#[kJ/kg]\n", + "\t\t\t#From compressed air tables at 200 bar and 140 K,\n", + "H_5_2 = 0.2;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 200 bar and 120 K,\n", + "H_5_3 = -38.0;\t\t\t#[kJ/kg]\n", + "\t\t\t#Solving by interpolation we get\n", + "T_5 = ((H_5_1 - H_5_3)*(140 - 120))/(H_5_2 - H_5_3) + 120;\t\t\t#[K]\n", + "\n", + "print \"The temperature of air before throttling is %f K\"%(T_5);\n", + "\n", + "\t\t\t#(3)\n", + "\t\t\t#During mixing of streams 8 and 11 to produce stream 9, the enthalpy balance is\n", + "\t\t\t# (0.2*m_2 - 1)*H_8 + 0.8*m_2*H_11 = (m_2 - 1)*H_9,Solving for H_9\n", + "\n", + "H_9_prime = ((0.2*m_2-1)*H_8+0.8*m_2*H_11)/(m_2 - 1);\n", + "\n", + "\t\t\t#From given compressed air tables at 1 bar and 100 K,\n", + "H_9_1 = H_11;\n", + "\t\t\t#At 1 bar and 90 K \n", + "H_9_2 = 87.9;\t\t\t#[kJ/kg]\n", + "\t\t\t#Solving by interpolation we get\n", + "T_9 = ((H_9_prime - H_9_2)*(100 - 90))/(H_9_1 - H_9_2) + 90;\t\t\t#[K]\n", + "\n", + "print \"The temperature of stream entering second heat exchanger is %f K\"%(T_9);\n", + "\n", + "\t\t\t#(4)\n", + "\t\t\t#Enthalpy balance around first heat exchanger is\n", + "\t\t\t#H_2*m_2 + (m_2 - 1)*H_10 = H_3*m-2 + (m-2 - 1)*H_1, solving for H_10\n", + "\n", + "H_10_prime = ((m_2 - 1)*H_1 + H_3*m_2 - H_2*m_2)/(m_2 - 1);\n", + "\n", + "\t\t\t#From given compressed air tables at 1 bar and 140 K,\n", + "H_10_1 = 139.1;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 1 bar and 120 K \n", + "H_10_2 = 118.8;\t\t\t#[kJ/kg]\n", + "\t\t\t#Solving by interpolation we get\n", + "T_10 = ((H_10_prime - H_10_2)*(140 - 120))/(H_10_1 - H_10_2) + 120;\t\t\t#[K]\n", + "\n", + "print \"The temperature of stream exiting second heat exchanger is %f K\"%(T_10);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of kimath.lograms of air compressed per kg of liquid air produced is 8.997922 kg\n", + "The temperature of air before throttling is 122.340314 K\n", + "The temperature of stream entering second heat exchanger is 98.029358 K\n", + "The temperature of stream exiting second heat exchanger is 131.292906 K\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.10 Page Number : 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "P_high = 40;\t\t\t#[bar]\n", + "P_low = 5;\t\t\t#[bar]\n", + "m_1 = 0.5;\t\t\t#[kg/s] - Rate of mass moving through the expander\n", + "m_2 = 0.1;\t\t\t#[kg/s] - Rate of mass of vapour mixing with air\n", + "e = 0.7;\t\t\t#Efficiency\n", + "\n", + "\t\t\t#At state 3,(40 bar and 200 K),enthalpy and entropy is given by\n", + "H_3 = 179.7;\t\t\t#[kJ/kg]\n", + "S_3 = 5.330;\t\t\t#[kJ/kg-K]\n", + "\n", + "\t\t\t#If isentropic conditions exits in the turbine then state 11 is at 5 bar\n", + "S_11 = 5.330;\t\t\t#[kJ/kg-K]\n", + "\t\t\t#From given compressed air tables at 5 bar and 120 K,\n", + "H_11_1 = 113.6;\t\t\t#[kJ/kg]\n", + "S_11_1 = 5.455;\t\t\t#[kJ/kg-K]\n", + "\t\t\t#At 5 bar and 100 K \n", + "H_11_2 = 90.6;\t\t\t#[kJ/kg]\n", + "S_11_2 = 5.246;\t\t\t#[kJ/kg-K]\n", + "\t\t\t#The enthalpy has to be determined when S = S_3\n", + "\n", + "# Calculations and Results\n", + "\t\t\t#Solving by interpolation we get\n", + "H_11_s = ((H_11_1 - H_11_2)*(S_3 - S_11_2))/(S_11_1 - S_11_2) + H_11_2;\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#The adiabatic efficiency of tyrbine is given by\n", + "\t\t\t#(H_3 - H_11_a)/(H_3 - H_11_s) = e\n", + "H_11_a = H_3 - e*(H_3 - H_11_s);\t\t\t#[kJ/kg] - Actual enthalpy\n", + "\n", + " \t\t\t#At 5 bar,the saturated enthalpy is given to be\n", + "H_8 = 88.7;\t\t\t#[kJ/kg]\n", + "\t\t\t#From enthalpy balance during mixing we get,\n", + "\t\t\t#0.1*H_8 + 0.5*H_11_a = 0.6*H_9\n", + "H_9 = (m_2*H_8 + m_1*H_11_a)/(m_1 + m_2);\t\t\t#[kJ/kg]\n", + "\n", + "\t\t\t#From given compressed air tables at 5 bar and 140 K,\n", + "H_9_1 = 135.3;\t\t\t#[kJ/kg]\n", + "\t\t\t#At 5 bar and 120 K \n", + "H_9_2 = 113.6;\t\t\t#[kJ/kg]\n", + "\t\t\t#By interpolation we get\n", + "T_9 = ((H_9 - H_11_1)*(140 - 120))/(H_9_1 - H_11_1) + 120;\t\t\t#[K]\n", + "\n", + "print \" The temperature of air entering the second heat exchanger is %f K\"%(T_9);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The temperature of air entering the second heat exchanger is 124.009841 K\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic111.png b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic111.png Binary files differindex 0564964c..0564964c 100755 --- a/Chemical_Engineering_Thermodynamics/screenshots/pic111.png +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic111.png diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic222.png b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic222.png Binary files differindex 2442734b..2442734b 100755 --- a/Chemical_Engineering_Thermodynamics/screenshots/pic222.png +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic222.png diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pic333.png b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic333.png Binary files differindex 2fcec895..2fcec895 100755 --- a/Chemical_Engineering_Thermodynamics/screenshots/pic333.png +++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/screenshots/pic333.png diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt index bda52f46..bda52f46 100644..100755 --- a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch1.png b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch1.png Binary files differnew file mode 100755 index 00000000..1d1f5f7b --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch1.png diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch8.png b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch8.png Binary files differnew file mode 100755 index 00000000..939248bf --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/ch8.png diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/pressureVSvol3.png b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/pressureVSvol3.png Binary files differnew file mode 100755 index 00000000..d1051723 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/screenshots/pressureVSvol3.png diff --git a/Chemical_Engineering_Thermodynamics/README.txt b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/README.txt index 98c63c7c..98c63c7c 100755 --- a/Chemical_Engineering_Thermodynamics/README.txt +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/README.txt diff --git a/Chemical_Engineering_Thermodynamics/ch1.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch1.ipynb index c7a29075..c7a29075 100755 --- a/Chemical_Engineering_Thermodynamics/ch1.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch1.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch10.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch10.ipynb index 5d1a66e8..5d1a66e8 100755 --- a/Chemical_Engineering_Thermodynamics/ch10.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch10.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch11.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch11.ipynb index 9c8a35bf..9c8a35bf 100755 --- a/Chemical_Engineering_Thermodynamics/ch11.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch11.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch12.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch12.ipynb index fe626468..fe626468 100755 --- a/Chemical_Engineering_Thermodynamics/ch12.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch12.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch13.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch13.ipynb index 8dc5f0be..8dc5f0be 100755 --- a/Chemical_Engineering_Thermodynamics/ch13.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch13.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch14.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch14.ipynb index e54d6be2..e54d6be2 100755 --- a/Chemical_Engineering_Thermodynamics/ch14.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch14.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch2.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch2.ipynb index b7849ef3..b7849ef3 100755 --- a/Chemical_Engineering_Thermodynamics/ch2.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch2.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch3.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch3.ipynb index 2b39d6e0..2b39d6e0 100755 --- a/Chemical_Engineering_Thermodynamics/ch3.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch3.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch4.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch4.ipynb index 5433cf7c..5433cf7c 100755 --- a/Chemical_Engineering_Thermodynamics/ch4.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch4.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch5.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch5.ipynb index 9cf5b1c8..9cf5b1c8 100755 --- a/Chemical_Engineering_Thermodynamics/ch5.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch5.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch6.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch6.ipynb index cf3f1f12..cf3f1f12 100755 --- a/Chemical_Engineering_Thermodynamics/ch6.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch6.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch7.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch7.ipynb index 879f7b43..879f7b43 100755 --- a/Chemical_Engineering_Thermodynamics/ch7.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch7.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch8.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch8.ipynb index 1e8782d9..1e8782d9 100755 --- a/Chemical_Engineering_Thermodynamics/ch8.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch8.ipynb diff --git a/Chemical_Engineering_Thermodynamics/ch9.ipynb b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch9.ipynb index 9efdc810..9efdc810 100755 --- a/Chemical_Engineering_Thermodynamics/ch9.ipynb +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/ch9.ipynb diff --git a/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_gE-RTx1x2_vs_x1.png b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_gE-RTx1x2_vs_x1.png Binary files differindex 90bbaf61..90bbaf61 100755 --- a/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_gE-RTx1x2_vs_x1.png +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_gE-RTx1x2_vs_x1.png diff --git a/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png Binary files differindex b7a97cb1..b7a97cb1 100755 --- a/Chemical_Engineering_Thermodynamics/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/Plot_of_ln(gamma1-gamma2)_vs_x1.png diff --git a/Chemical_Engineering_Thermodynamics/screenshots/T-x-y_diagram.png b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/T-x-y_diagram.png Binary files differindex f231eb76..f231eb76 100755 --- a/Chemical_Engineering_Thermodynamics/screenshots/T-x-y_diagram.png +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/T-x-y_diagram.png diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/pressureVSvol3.png Binary files differindex 9e02c340..9e02c340 100755 --- a/Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png +++ b/Chemical_Engineering_Thermodynamics_by_Y_V_C_Rao/screenshots/pressureVSvol3.png diff --git a/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt b/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt index 9612c709..9612c709 100644..100755 --- a/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt +++ b/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt diff --git a/DC_Machines_and_Synchronous_Machines/README.txt b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/README.txt index 9c84b56e..9c84b56e 100755 --- a/DC_Machines_and_Synchronous_Machines/README.txt +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/README.txt diff --git a/DC_Machines_and_Synchronous_Machines/ch1.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch1_2.ipynb index 04ab6c30..b98c0ac6 100755 --- a/DC_Machines_and_Synchronous_Machines/ch1.ipynb +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch1_2.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:28530af987ec737018da049988fa2fb2a82d79acc8dd496873e17355c1e77828" + "signature": "sha256:ae45c35a90f5d6d72689d00dd327a0dd50ebdc721f0cf7cc3ef6e9742fbf7b87" }, "nbformat": 3, "nbformat_minor": 0, @@ -1086,7 +1086,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "from numpy import *\n", + "from numpy import array\n", "\n", "# Variables\n", "Z = 496. \t\t\t#no of conductors\n", @@ -1130,7 +1130,7 @@ ] } ], - "prompt_number": 25 + "prompt_number": 1 }, { "cell_type": "heading", @@ -1617,14 +1617,6 @@ } ], "prompt_number": 34 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] } ], "metadata": {} diff --git a/DC_Machines_and_Synchronous_Machines/ch2.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch2_2.ipynb index b87a9190..deb5684b 100755 --- a/DC_Machines_and_Synchronous_Machines/ch2.ipynb +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch2_2.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:78f41af8e7d3182972251bae0a04df7a30b3aeb555cc290301b49daf9f643c37" + "signature": "sha256:f03a268884ccacb4d0b4a4e0ccceeba1a58caa51f0cbd85024ffaf9d558c0182" }, "nbformat": 3, "nbformat_minor": 0, @@ -703,7 +703,7 @@ "collapsed": false, "input": [ "import math \n", - "from numpy import *\n", + "from numpy import roots\n", "\n", "# Variables\n", "shaft_output = 80.*746 \t\t\t#coverted to watts\n", @@ -745,18 +745,11 @@ "stream": "stdout", "text": [ "Mechanical power developed on full load = 70.812 kW\n", - "No load speed and current are 1250.9121 rpm and 45.85 A respectively" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" + "No load speed and current are 1250.9121 rpm and 45.85 A respectively\n" ] } ], - "prompt_number": 19 + "prompt_number": 1 }, { "cell_type": "heading", @@ -1101,7 +1094,7 @@ "collapsed": false, "input": [ "import math \n", - "from numpy import *\n", + "from numpy import array,roots\n", "\n", "# Variables\n", "V = 250.\n", @@ -1140,7 +1133,7 @@ ] } ], - "prompt_number": 26 + "prompt_number": 2 }, { "cell_type": "heading", @@ -1733,7 +1726,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "from numpy import *\n", + "from numpy import roots\n", "import math \n", "\n", "# Variables\n", @@ -1770,7 +1763,7 @@ ] } ], - "prompt_number": 39 + "prompt_number": 3 }, { "cell_type": "heading", @@ -1784,7 +1777,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "from numpy import *\n", + "from numpy import roots\n", "import math \n", "\n", "# Variables\n", @@ -1824,7 +1817,7 @@ ] } ], - "prompt_number": 40 + "prompt_number": 4 }, { "cell_type": "heading", @@ -1994,14 +1987,6 @@ } ], "prompt_number": 43 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] } ], "metadata": {} diff --git a/DC_Machines_and_Synchronous_Machines/ch3.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch3_2.ipynb index 6f59c07f..70deb8f3 100755 --- a/DC_Machines_and_Synchronous_Machines/ch3.ipynb +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch3_2.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:851db29572c4b7f5287b09f53c6bb9c3406b6b6577d3bab318bf198d21eaaa81" + "signature": "sha256:19909d6eede67a544640ad0d428f3fdc9bcbea2eb33090ca90ae171a5a4991eb" }, "nbformat": 3, "nbformat_minor": 0, @@ -145,7 +145,7 @@ "collapsed": false, "input": [ "import math \n", - "from numpy import *\n", + "from numpy import roots\n", "\n", "# Variables\n", "#no load\n", @@ -186,7 +186,7 @@ ] } ], - "prompt_number": 3 + "prompt_number": 1 }, { "cell_type": "heading", @@ -1896,14 +1896,6 @@ } ], "prompt_number": 35 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] } ], "metadata": {} diff --git a/DC_Machines_and_Synchronous_Machines/ch4.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch4_2.ipynb index 7e4b687b..801aa5cf 100755 --- a/DC_Machines_and_Synchronous_Machines/ch4.ipynb +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch4_2.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:e5bf1101b5ca7d663f8c7db6ba5353cd5daf17690d3f4785e774f0306b01e83e" + "signature": "sha256:37c6f1ad2861e36aaa3d0e24a0317df8883a0a0a3ce46bfb539d00dfac4215c9" }, "nbformat": 3, "nbformat_minor": 0, @@ -1098,14 +1098,6 @@ } ], "prompt_number": 28 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] } ], "metadata": {} diff --git a/DC_Machines_and_Synchronous_Machines/ch5.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch5_2.ipynb index 4aca598c..b8d7dccd 100755 --- a/DC_Machines_and_Synchronous_Machines/ch5.ipynb +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch5_2.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:ae2b9384b1b13f79321d75082b020b6a54688771e761bc6446ad00de14bf068e" + "signature": "sha256:933ba5514f95bafa26850ac6e2454a01e504df02d55087ce5bb50cc93571fedc" }, "nbformat": 3, "nbformat_minor": 0, @@ -1596,14 +1596,6 @@ } ], "prompt_number": 35 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] } ], "metadata": {} diff --git a/DC_Machines_and_Synchronous_Machines/ch6.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch6_2.ipynb index b2228585..5cc8495d 100755 --- a/DC_Machines_and_Synchronous_Machines/ch6.ipynb +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch6_2.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:9f548e729a327e12aefb50cf84c5cae777df427713c1104c34d610a547e935f3" + "signature": "sha256:65f8e8657a6631c1a9d4f4644c0ba8ed136071b32d61999a56bf9cfb9b9555d8" }, "nbformat": 3, "nbformat_minor": 0, @@ -1444,7 +1444,7 @@ "collapsed": false, "input": [ "import math \n", - "from numpy import *\n", + "from numpy import array,tan,arccos\n", "\n", "# Variables\n", "kW = array([800,500,1000,600])\n", @@ -1482,7 +1482,7 @@ ] } ], - "prompt_number": 56 + "prompt_number": 2 }, { "cell_type": "heading", @@ -1497,7 +1497,7 @@ "collapsed": false, "input": [ "import math \n", - "from numpy import *\n", + "from numpy import array,tan,arccos\n", "\n", "# Variables\n", "kW = array([250,300,150])\n", @@ -1533,7 +1533,7 @@ ] } ], - "prompt_number": 57 + "prompt_number": 3 }, { "cell_type": "heading", @@ -1900,7 +1900,7 @@ "collapsed": false, "input": [ "import math \n", - "from numpy import *\n", + "from numpy import array,tan,arccos\n", "\n", "# Variables\n", "V_L = 6600.\n", @@ -1942,7 +1942,7 @@ ] } ], - "prompt_number": 67 + "prompt_number": 4 }, { "cell_type": "heading", @@ -2411,14 +2411,6 @@ } ], "prompt_number": 83 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] } ], "metadata": {} diff --git a/DC_Machines_and_Synchronous_Machines/ch7.ipynb b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch7_2.ipynb index a22a6459..90ee7606 100755 --- a/DC_Machines_and_Synchronous_Machines/ch7.ipynb +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/ch7_2.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:95ca4467d5385b9a67e6a4c31c682e32bf0713e6d2ff74a5a89a56c51df83062" + "signature": "sha256:a6d47374988dffe6254758a68746561860439fac0faeabc093287fa2241d2260" }, "nbformat": 3, "nbformat_minor": 0, @@ -88,8 +88,7 @@ "collapsed": false, "input": [ "import math \n", - "from numpy import *\n", - "\n", + "from numpy import cos\n", "# Variables\n", "V_l = 500.\n", "R_a = 0.4\n", @@ -1695,14 +1694,6 @@ } ], "prompt_number": 42 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] } ], "metadata": {} diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch1.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1.png Binary files differindex a18f9a05..a18f9a05 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch1.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1.png diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch1_1.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_1.png Binary files differindex a18f9a05..a18f9a05 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch1_1.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_1.png diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch1_2.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_2.png Binary files differindex a18f9a05..a18f9a05 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch1_2.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch1_2.png diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch4.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4.png Binary files differindex 4e0892cf..4e0892cf 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch4.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4.png diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch4_1.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_1.png Binary files differindex 4e0892cf..4e0892cf 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch4_1.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_1.png diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch4_2.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_2.png Binary files differindex 4e0892cf..4e0892cf 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch4_2.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch4_2.png diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch7.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7.png Binary files differindex 6244be52..6244be52 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch7.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7.png diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch7_1.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_1.png Binary files differindex 6244be52..6244be52 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch7_1.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_1.png diff --git a/DC_Machines_and_Synchronous_Machines/screenshots/ch7_2.png b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_2.png Binary files differindex 6244be52..6244be52 100755 --- a/DC_Machines_and_Synchronous_Machines/screenshots/ch7_2.png +++ b/DC_Machines_and_Synchronous_Machines_by_U_A_Bakshi_and_M_V_Bakshi/screenshots/ch7_2.png diff --git a/Digital_Communications/ChapterNo2.ipynb b/Digital_Communications/ChapterNo2.ipynb deleted file mode 100755 index f8cf6b90..00000000 --- a/Digital_Communications/ChapterNo2.ipynb +++ /dev/null @@ -1,290 +0,0 @@ -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1>Chapter no 2: SAMPLING THEORY AND PULSE MODULATION<h1>"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.1, page no 50"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#find Nquist Rate\n",
- "\n",
- "#Variable declaration\n",
- "#given \n",
- "pi=3.14\n",
- "w1=50*pi\n",
- "w2=300*pi\n",
- "w3=100*pi\n",
- "#w=2*%pi*f\n",
- "\n",
- "#Calculation\n",
- "f1=w1/(2*pi)\n",
- "f2=w2/(2*pi)\n",
- "f3=w3/(2*pi)\n",
- "fm=f2 #fm = maximum frquency is present at the signal\n",
- "\n",
- "#Result\n",
- "print('maximum frquency of the signal is = %.2f Hz' %f2)\n",
- "fs=2*fm #Nyquist rate\n",
- "print('Nquist Rate of Signal is = %.2f Hz' %fs)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "maximum frquency of the signal is = 150.00 Hz\n",
- "Nquist Rate of Signal is = 300.00 Hz\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.2 , page no 50"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Nquist Rate and Nquist time interval\n",
- "\n",
- "#Variable declaration\n",
- "#given\n",
- "w1=5000*math.pi\n",
- "w2=3000*math.pi;\n",
- "f1=w1/(2*math.pi);\n",
- "f2=w2/(2*math.pi);\n",
- "\n",
- "#Calculation\n",
- "fm=f1 #fm = maximum frquency is present at the signal\n",
- "fs=2*fm #Nyquist rate\n",
- "Ts=1.0/(2.0*fm) #frequncy =1/time\n",
- "Ts=Ts*(10**3)\n",
- "\n",
- "#Result\n",
- "print('maximum frquency of the signal is = %.f Hz' %f1)\n",
- "print('Nquist Rate of the given Signal is = %.f Hz' %fs)\n",
- "print('Nquist Interval of the given signal is = %.1f m Sec' %Ts)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "maximum frquency of the signal is = 2500 Hz\n",
- "Nquist Rate of the given Signal is = 5000 Hz\n",
- "Nquist Interval of the given signal is = 0.2 m Sec\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.3, page no 51"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find Nquist Rate \n",
- "\n",
- "#Variable declaration\n",
- "#given\n",
- "f=100.0 # Frequency component of continuous-time signal\n",
- "\n",
- "#Calculation\n",
- "fs=2*f #Nyquist rate\n",
- "\n",
- "#Result\n",
- "print('i) To avoid aliasing Nquist Rate is = %.f Hz' %fs)\n",
- "print('ii) It is theoretical example ')\n",
- "print('iii) It is theoretical example ')\n",
- "print('iv) It is theoretical example ')\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) To avoid aliasing Nquist Rate is = 200 Hz\n",
- "ii) It is theoretical example \n",
- "iii) It is theoretical example \n",
- "iv) It is theoretical example \n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.4, page no 52 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Nquist Rate of Continous signal\n",
- "\n",
- "#Variable declaration\n",
- "#given\n",
- "w1=50*math.pi\n",
- "w2=300*math.pi\n",
- "w3=100*math.pi\n",
- "\n",
- "#Calculation\n",
- "f1=w1/(2*math.pi)\n",
- "f2=w2/(2*math.pi)\n",
- "f3=w3/(2*math.pi)\n",
- "fmax=f2 #fmax = Highest frquency component of the message signal\n",
- "fs=2*fmax #Nyquist rate\n",
- "\n",
- "#Result\n",
- "print('Highest frquency component of the message signal will be fmax = %.f Hz' %fmax)\n",
- "print('Nquist Rate of the given Signal is = %.f Hz' %fs)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Highest frquency component of the message signal will be fmax = 150 Hz\n",
- "Nquist Rate of the given Signal is = 300 Hz\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 2.7, page no 67 <h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#find amplitude distortion at highest frquency\n",
- "\n",
- "#Variable declaration\n",
- "#given\n",
- "fs=9.5 #samplig frequncy\n",
- "fmax=1 #maximum frequncy\n",
- "t=0.2 #pulse width\n",
- "\n",
- "#Calculation\n",
- "c=3*10**8\n",
- "f=fmax\n",
- "H1=t*(0.9933) #aperture effect at highest frequency, sinc(f*t)=0.9933 (given)\n",
- "H1=H1*100\n",
- "\n",
- "#Result\n",
- "print('|H(1)|=%.2f' %H1)\n",
- "print('Approximation error')"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "|H(1)|=19.87\n",
- "Approximation error\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.8, page no 74 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Calculate Transmission Bandwidth\n",
- "\n",
- "#Variable declaration\n",
- "#given\n",
- "fm=3.0*(10^3)\n",
- "fs=8.0*(10^3) # sampling frequncy\n",
- "\n",
- "#Calculation\n",
- "Ts=1.0/fs\n",
- "t=0.1*Ts\n",
- "BW=1.0/(2*t) #Bandwidth\n",
- "BW=BW/(10^3)\n",
- "\n",
- "#Result\n",
- "print('Transmission Bandwidth of PAM signal is kHz = %.f Khz ' %BW)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Transmission Bandwidth of PAM signal is kHz = 40 Khz \n"
- ]
- }
- ],
- "prompt_number": 6
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Digital_Communications/ChapterNo3.ipynb b/Digital_Communications/ChapterNo3.ipynb deleted file mode 100755 index 5b9ea469..00000000 --- a/Digital_Communications/ChapterNo3.ipynb +++ /dev/null @@ -1,2238 +0,0 @@ -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1> Chpater No 3: WAVEFORM CODING TECHNIQUES<h1>"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3,1 Page No 110"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "print('This is a Theoretical example')\t"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "This is a theoretcal example\n"
- ]
- }
- ],
- "prompt_number": 104
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3,2,i, Page No 111"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math \n",
- "#find code word length\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "bandwidth=4.2*10**6\n",
- "fm=bandwidth\n",
- "q=512 #Quantization levels\n",
- "#q=2^v\n",
- "\n",
- "#Calculation\n",
- "v=math.log10(512)/math.log10(2)\n",
- "\n",
- "#Result\n",
- "print(\"The code word legth is = %.f bits\" %v)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The code word legth is = 9 bits\n"
- ]
- }
- ],
- "prompt_number": 105
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.2.ii, Page No 111"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#find The transmission Bandwidth\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "bandwidth=4.2*10**6\n",
- "fm=bandwidth\n",
- "q=512.0 #Quantization levels\n",
- "v=9.0\n",
- "\n",
- "#Calculation\n",
- "bw=v*fm*10**-6\n",
- "\n",
- "#Result\n",
- "print(\"The transmission Bandwidth is = %.1f MHz\" %bw)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The transmission Bandwidth is = 37.8 MHz\n"
- ]
- }
- ],
- "prompt_number": 106
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.2.iii, Page No 111 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#find Final Bit rate\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "bandwidth=4.2*10**6\n",
- "fm=bandwidth\n",
- "q=512.0 #Quantization levels\n",
- "v=9.0\n",
- "\n",
- "#Calculation\n",
- "fs=2*fm\n",
- "r=v*fs #signaling rate\n",
- "\n",
- "#Result\n",
- "print(\"Final Bit rate =%.1f x 10^6 bits/sec\" %(r/(10**6)))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Final Bit rate =75.6 x 10^6 bits/sec\n"
- ]
- }
- ],
- "prompt_number": 107
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.2.iv, Page No 111"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#find Output signal to noise ratio\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "bandwidth=4.2*10**6\n",
- "fm=bandwidth\n",
- "q=512 #Quantization levels\n",
- "v=9.0\n",
- "\n",
- "#Calculation\n",
- "sn=4.8+6*v #noise in dB\n",
- "\n",
- "\n",
- "print(\"Output signal to noise ratio is = %.1f dB\" %sn)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Output signal to noise ratio is = 58.8 dB\n"
- ]
- }
- ],
- "prompt_number": 108
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3.i, Page No 112"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#find bits per sample\n",
- "\n",
- "#Variable Declaration\n",
- "fmax=4*10**3\n",
- "xmax=3.8\n",
- "snr=100\n",
- "\n",
- "#Calculation\n",
- "P=30*10**-3\n",
- "v=(math.log10(((snr*xmax**2)/(3*P)))/(2*math.log10(2)))\n",
- "\n",
- "#Result\n",
- "print(\"Number of bits required per sample are = %.2f bits\" %v)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number of bits required per sample are = 6.98 bits\n"
- ]
- }
- ],
- "prompt_number": 109
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3.ii, Page No 168"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Find Transmission Bandwith\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "fm=4*10**3 #Bandwidth of PCM\n",
- "xmax=3.8\n",
- "snr=100 #Signal to Noise Ratio\n",
- "outputs=30.0\n",
- "v=7.0\n",
- "\n",
- "#Calculation\n",
- "bw=outputs*v*fm \n",
- "r=bw*2\n",
- "bw=bw/10**3\n",
- "\n",
- "#Result\n",
- "print('Transmission Bandwith R = %.f kHz' %bw)\n",
- "r=r/1000\n",
- "print('Signaling rate R = %.f bits/sec' %r)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Transmission Bandwith R = 840 kHz\n",
- "Signaling rate R = 1680 bits/sec\n"
- ]
- }
- ],
- "prompt_number": 110
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.4, Page No 112"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#find sampling rate,number of bits,bit rate,bandwidht\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "emax=0.001\n",
- "de=2*emax\n",
- "fm=100.0\n",
- "xmax=10.0\n",
- "\n",
- "#Calculation\n",
- "q=(2*xmax)/de\n",
- "fs=2*fm\n",
- "v=(math.log10(q))/math.log10(2)\n",
- "v=math.ceil(v)\n",
- "r=v*fs\n",
- "\n",
- "#Result\n",
- "print('1. sampling Frequncy = %.f Hz ' %fs) \n",
- "print('2. No.of bits in PCM = %.f bits ' %v) \n",
- "print('3. sampling rate = %.f bits per second ' %r)\n",
- "r=r/2\n",
- "print('4. Transmission Bandwidth = %.f Hz ' %r) "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1. sampling Frequncy = 200 Hz \n",
- "2. No.of bits in PCM = 14 bits \n",
- "3. sampling rate = 2800 bits per second \n",
- "4. Transmission Bandwidth = 1400 Hz \n"
- ]
- }
- ],
- "prompt_number": 111
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.5, Page No 113 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Bandwidth,Sampling Rate\n",
- "\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "fm=3.4*10**3\n",
- "N=24\n",
- "r=1.5*10**6\n",
- "encoder=8\n",
- "\n",
- "#Calculation\n",
- "BW=N*fm\n",
- "BW=BW/10**3\n",
- "r1=r/N\n",
- "fs=r1/encoder\n",
- "\n",
- "#Result\n",
- "print(\"i. Channel Bandwith is = %.2f kHz\" %BW)\n",
- "print(\"ii. Sampling frequency is = %.2f Hz or samples per second.\" %fs)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i. Channel Bandwith is = 81.60 kHz\n",
- "ii. Sampling frequency is = 7812.50 Hz or samples per second.\n"
- ]
- }
- ],
- "prompt_number": 112
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.6, Page No 114 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Find Signal Bandwidth,Noise Ratio\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "v=7\n",
- "r=50*10**6\n",
- "\n",
- "#Calculation\n",
- "#fs=2*fm\n",
- "fm=r/(2*v)\n",
- "snr=1.8+(6*v);\n",
- "fm=fm*10**-6\n",
- "\n",
- "#Result\n",
- "print('i. Maximum message Bandwidth is = %.2f MHz ' %fm)\n",
- "print('ii. signal to quantization niose ration = %.2f dB ' %snr)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i. Maximum message Bandwidth is = 3.57 MHz \n",
- "ii. signal to quantization niose ration = 43.80 dB \n"
- ]
- }
- ],
- "prompt_number": 113
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.7, Page No 114"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#find i)bits per sample,ii)transmission rate\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "fm=3*10**3\n",
- "q=16\n",
- "\n",
- "#Calculation\n",
- "v=(math.log10(q))/math.log10(2)\n",
- "\n",
- "#Result\n",
- "print('i) Bits in code word= %.f bits' %v)\n",
- "fs=2*fm\n",
- "r=v*fs\n",
- "print('ii) it trasmission rate= %.f x 10^3 bits per second' %(r/(10**3)))\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Bits in code word= 4 bits\n",
- "ii) it trasmission rate= 24 x 10^3 bits per second\n"
- ]
- }
- ],
- "prompt_number": 114
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.8, Page No 115"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Find signal to noise ratio\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "fm=3.5*10**3\n",
- "r=50*10**3\n",
- "\n",
- "#Calculation\n",
- "fs=2*fm\n",
- "rms=0.2\n",
- "xmax=2\n",
- "v=r/fs #signaling rate r=v*fs\n",
- "v=math.ceil(v)\n",
- "P=(rms**2)/1\n",
- "SNR=((3*P*2**(2*v))/(xmax**2))\n",
- "SN=10*math.log10(SNR)\n",
- "SN=math.ceil(SN)\n",
- "\n",
- "#Result\n",
- "print(\"signal to niose ratio =%.f dB\" %SN)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "signal to niose ratio =33 dB\n"
- ]
- }
- ],
- "prompt_number": 115
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.10, Page No 117 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find i)noise ratio ii)bits\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "Am=3.0\n",
- "v=10.0\n",
- "\n",
- "#Calculation\n",
- "SNR=1.8+6*v #noise ratio \n",
- "SN=40\n",
- "v=(SN-1.8)/6\n",
- "\n",
- "#Result\n",
- "print(\"i) Signal to Quantization noise ratio = %.1f dB\" %SNR)\n",
- "print(\"ii) Bits required to get signal to niose ratio of 40dB = %.f \" %math.ceil(v))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Signal to Quantization noise ratio = 61.8 dB\n",
- "ii) Bits required to get signal to niose ratio of 40dB = 7 \n"
- ]
- }
- ],
- "prompt_number": 116
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.11, Page No 117 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Maximum frequency\n",
- "\n",
- "#Variable Declaration\n",
- "#Given data\n",
- "v=7\n",
- "SNR=1.8+6*v\n",
- "r=56*10**3\n",
- "\n",
- "#Calculation\n",
- "fs=r/v #r=v*fs signaling rate\n",
- "fm=fs/2 #Nquset rate\n",
- "\n",
- "#Result\n",
- "fm=fm/10**3\n",
- "print(\"Maximum frequency is = %.f kHz\" %fm)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Maximum frequency is = 4 kHz\n"
- ]
- }
- ],
- "prompt_number": 117
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.14, Page No 129 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Maximum Amplitude\n",
- "\n",
- "#Variable Declaration\n",
- "fm=3*10**3.0\n",
- "\n",
- "#Calculation\n",
- "Nyquistrate=2*fm #Nyquistrate\n",
- "fs=5*Nyquistrate #Samplingfrquency\n",
- "Ts=1/fs #Sampling Interval\n",
- "de=0.25 #step size\n",
- "fm1=2*10**3.0\n",
- "Am=de/(2*math.pi*fm1*Ts)\n",
- "\n",
- "#Result\n",
- "print(\"Maximum Amplitude = %.4f Volts\" %Am)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Maximum Amplitude = 0.5968 Volts\n"
- ]
- }
- ],
- "prompt_number": 118
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.16, Page No 130"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find signaling rate\n",
- "\n",
- "#Variable Declaration\n",
- "fs1=8*10**3.0\n",
- "de=31.25*10**-3\n",
- "q=64.0\n",
- "\n",
- "#Calculation\n",
- "v=math.log(q,2)\n",
- "r=v*fs1 #signaling rate\n",
- "fm=3*10**3.0\n",
- "A=1\n",
- "fs2=(2*math.pi*fm*A)/(de)\n",
- "\n",
- "#Result\n",
- "r=r*10**-3\n",
- "print(\"Signaling rate of PCM is = %.f kHz\" %r)\n",
- "fs2=fs2*10**-3\n",
- "print(\"The signaling rate of DM is = %.2f kHz\" %fs2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Signaling rate of PCM is = 48 kHz\n",
- "The signaling rate of DM is = 603.19 kHz\n"
- ]
- }
- ],
- "prompt_number": 119
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.17, Page No 131"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find signal to noise ratio\n",
- "\n",
- "#Variable Declaration\n",
- "fs=64.0*10**3 #frequency\n",
- "fm=2.0*10**3 #Sinosoidal input signal sample \n",
- "fM=4.0*10**3 #bandwidth\n",
- "\n",
- "#Calculation\n",
- "SNR=(3*fs**3)/(8*math.pi**2*fm**2*fM) #Signal to noise ratio\n",
- "SNRO=10*math.log10(SNR)\n",
- "\n",
- "#Result\n",
- "print(\"Output signal to noise ratio = %.2f dB\" %SNRO)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Output signal to noise ratio = 27.94 dB\n"
- ]
- }
- ],
- "prompt_number": 120
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.18, Page No 131"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find signal to Quatization noise ratio \n",
- "\n",
- "#Variable Declaration\n",
- "fs=8.0*10**3 #Sampling frequency\n",
- "r=64.0*10**3 #Data Rate\n",
- "N=8 #number of bits\n",
- "\n",
- "#Calculation\n",
- "SNR=(1.8+6*N) #signal to Quatization noise ratio\n",
- "\n",
- "#Result\n",
- "print(\"Signal to Quatization noise ratio of PCM system is = %.f dB\" %SNR)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Signal to Quatization noise ratio of PCM system is = 50 dB\n"
- ]
- }
- ],
- "prompt_number": 121
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.20, Page No 149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Find sampling rate,quantizing level\n",
- "\n",
- "#Variable Declaration\n",
- "r=36000\n",
- "fm=3.2*10**3\n",
- "\n",
- "#Calculation\n",
- "fs=2*fm #Nquest rate\n",
- "v=r/fs #r=v*fs signaling rate\n",
- "v=math.floor(v)\n",
- "q=2**v\n",
- "fs1=r/v\n",
- "\n",
- "#Result\n",
- "print(\"Quantizing level q = %.f \" %q)\n",
- "fs1=fs1/1000\n",
- "print(\"sampling rate fs = %.1f kHz \" %fs1)\n",
- "print(\"Number of binary digits = %.f \" %v)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Quantizing level q = 32 \n",
- "sampling rate fs = 7.2 kHz \n",
- "Number of binary digits = 5 \n"
- ]
- }
- ],
- "prompt_number": 122
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.21, Page No 149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find time duration of 1bit binary encoded signal\n",
- "\n",
- "#Variable Declaration\n",
- "fs=input(\"Enter the Nyquist rate of Signal fs(Hz)=\")\n",
- "q=input(\"Enter the Quantization levels q =\")\n",
- "\n",
- "#Calculation\n",
- "v=math.log(q,2) #binary pulses transmitted per second\n",
- "t=1.0/(v*fs) #Nyquist interval\n",
- "\n",
- "#Result\n",
- "print('Time duration of binary signal t = %.4f sec ' %t)\n",
- "#output\n",
- "#Enter the Nyquist rate fs(Hz)=3\n",
- "#Enter the Quantization levels q =5\n",
- "#time duration of 1bit binary signal \n",
- "#t=0.1435589 sec"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Enter the Nyquist rate of Signal fs(Hz)=23\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Enter the Quantization levels q =34\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Time duration of binary signal t = 0.0085 sec \n"
- ]
- }
- ],
- "prompt_number": 123
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.23, Page No 150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#find signal to noise ratio\n",
- "\n",
- "#Variable Declaration\n",
- "SNR=40\n",
- "SNRO=10**(SNR/10)\n",
- "\n",
- "#SNR=3(q**2)/2, Signal to Quantization noise ratio\n",
- "\n",
- "#Calculation\n",
- "q=math.sqrt((2*SNRO)/3)\n",
- "q=math.ceil(q)\n",
- "v=math.log(q,2) #q=2**v Quantization levels\n",
- "v=math.ceil(v)\n",
- "snr=1.76+6.02*v #output Signal to Quantization noise ratio\n",
- "\n",
- "#Result\n",
- "print(\"Output Signal to Quantization noise ratio = %.1f dB\" %snr)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Output Signal to Quantization noise ratio = 43.9 dB\n"
- ]
- }
- ],
- "prompt_number": 124
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.24.i, Page No 150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Quantizing levels,minimum number of bits per sample\n",
- "\n",
- "#Variable Declaration\n",
- "SNRO=30.0\n",
- "fmin=300.0\n",
- "fmax=3300.0\n",
- "fs=80000.0\n",
- "\n",
- "#Calculation\n",
- "#SNRO=1.76+20log10(q)\n",
- "q=10**((SNRO-1.76)/20)\n",
- "q=math.ceil(q)\n",
- "v=math.log(q,2)\n",
- "\n",
- "#Result\n",
- "print('Quantizing levels required is =%.f' %q)\n",
- "print('minimum number of bits per sample are=%.1f that is approximately 5' %v)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Quantizing levels required is =26\n",
- "minimum number of bits per sample are=4.7 that is approximately 5\n"
- ]
- }
- ],
- "prompt_number": 125
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.24.ii, Page No 150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find minimum required bandwidth\n",
- "\n",
- "#Variable Declaration\n",
- "SNRO=30.0 #Signal to quantisizing noise ratio\n",
- "fmin=300.0 #min frequency band\n",
- "fmax=3300.0 #max frequency band\n",
- "fs=8000.0 #Sampling rate\n",
- "v=5.0 #Minimum number of bits per sample\n",
- "\n",
- "#Calculation\n",
- "fPCM=(v*fs)/2\n",
- "fPCM=fPCM/1000\n",
- "\n",
- "#Result\n",
- "print('minimum required bandwidth =%.f kHz' %fPCM)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "minimum required bandwidth =20 kHz\n"
- ]
- }
- ],
- "prompt_number": 126
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.24.iii, Page No 150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Quantizing levels,minimum number of bits per sample and bandwidth\n",
- "\n",
- "#Variable Declaration\n",
- "SNRO=30.0 #Signal to quantisizing noise ratio\n",
- "fmin=300.0 #min frequency band\n",
- "fmax=3300.0 #max frequency band\n",
- "fs=8000.0 #Sampling rate\n",
- "\n",
- "#Calculation\n",
- "q=10**((SNRO+10.1)/20)\n",
- "q=math.ceil(q)\n",
- "v=math.log(q,2)\n",
- "v=math.ceil(v)\n",
- "\n",
- "#Result\n",
- "print('Quantizing levels need is =%.f' %q)\n",
- "print('minimum number of bits per sample is =%.f' %v)\n",
- "fPCM=(v*fs)/2\n",
- "fPCM=fPCM/1000\n",
- "print('minimum required bandwidth =%.f Khz' %fPCM)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Quantizing levels need is =102\n",
- "minimum number of bits per sample is =7\n",
- "minimum required bandwidth =28 Khz\n"
- ]
- }
- ],
- "prompt_number": 127
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.27, Page No 152"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#determine the Maximum Amplitude,\n",
- "\n",
- "#Variable Declaration\n",
- "de=250*10**-3\n",
- "wm=2*math.pi*1000 \n",
- "fs=3*10**3\n",
- "Ts=1/fs\n",
- "\n",
- "#Calculation\n",
- "Amax=(de*3*fs*2)/(wm) #Amplitude\n",
- "SNR=(3.0*((3*6*(10**3))**3))/((8*(math.pi**2)*(10**3)**3))\n",
- "\n",
- "#Result\n",
- "print('Maximum Amplitude= %.1f mV' %(Amax*(10**2)))\n",
- "print('Signal to noise ratio = %.2f dB' %(10*math.log10(SNR)))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Maximum Amplitude= 71.6 mV\n",
- "Signal to noise ratio = 23.46 dB\n"
- ]
- }
- ],
- "prompt_number": 128
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.29, Page No 153"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find number of bits per sample\n",
- "\n",
- "#Variable Declaration\n",
- "SNR=20\n",
- "averagepower=30*10**-3\n",
- "SNRO=10**(SNR/10)\n",
- "A=3.8\n",
- "\n",
- "#SNRO=average signal power/Quatizing power\n",
- "#de=(2*A)/L\n",
- "\n",
- "#Calculation\n",
- "L=math.sqrt((SNRO*A**2)/(3*averagepower))\n",
- "n=math.log(L,2)\n",
- "n=math.ceil(n)\n",
- "\n",
- "#Result\n",
- "print('Bits required per sample =%.f' %n)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Bits required per sample =7\n"
- ]
- }
- ],
- "prompt_number": 129
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.30.i, Page No 153"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Normalized power for quantization noise\n",
- "\n",
- "#Variable Declaration\n",
- "fm=3.0*10.0**3\n",
- "v=8.0\n",
- "VH=5.0\n",
- "VL=-5.0\n",
- "q=2**v\n",
- "\n",
- "#Calculation\n",
- "de=(VH-VL)/q\n",
- "Nq=de**2/12.0 #quantization noise\n",
- "\n",
- "#Result\n",
- "print('Normalized power for quantization noise =%.2f x 10^-6 W' %(Nq*(10**6)))\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Normalized power for quantization noise =127.16 x 10^-6 W\n"
- ]
- }
- ],
- "prompt_number": 130
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.30.ii, Page No 153"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find bit transmission rate\n",
- "\n",
- "#Variable Declaration\n",
- "fm=3*10.0**3\n",
- "v=8.0\n",
- "VH=5.0\n",
- "VL=-5\n",
- "q=2**v\n",
- "\n",
- "#Calculation\n",
- "fs=2*fm #Nyquist rate\n",
- "r=8*fs/1000\n",
- "\n",
- "#Result\n",
- "print('bit transmission rate %.f K bits/s' %r)\n",
- " \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "bit transmission rate 48 K bits/s\n"
- ]
- }
- ],
- "prompt_number": 131
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.30.iii, Page No 153"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Signal to quantization noise ratio\n",
- "\n",
- "#Variable Declaration\n",
- "Nq=127.15*10**-6\n",
- "Meansignal=2\n",
- "\n",
- "#Calculation\n",
- "P=Meansignal/1\n",
- "SNR=P/Nq\n",
- "SNRq=10*math.log10(SNR)\n",
- "\n",
- "#Result\n",
- "print('Signal to quantization noise ratio %.2f dB ' %SNRq)\n",
- " \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Signal to quantization noise ratio 41.97 dB \n"
- ]
- }
- ],
- "prompt_number": 132
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.31, Page No 154"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find i)SNR ii)output bit rate iii)no.of bits recorded\n",
- "\n",
- "#Variable Declaration\n",
- "N=16.0\n",
- "v=16.0\n",
- "fs=44.1*10**3\n",
- "\n",
- "#Calculation\n",
- "SNR=1.76+6*N\n",
- "bitrate=2*v*fs\n",
- "outputbitrate=2*bitrate*10**-6 #including addtional 100% over head\n",
- "CD=outputbitrate*3600*10**-3\n",
- "\n",
- "#Result\n",
- "print('i)Out put signal noise ratio =%.2f dB' %SNR)\n",
- "print('ii)output bit rate =%.3f Mbits/sec' %outputbitrate)\n",
- "print('iii)no.of bits recorded in CD =%.2f gigabits' %CD)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i)Out put signal noise ratio =97.76 dB\n",
- "ii)output bit rate =2.822 Mbits/sec\n",
- "iii)no.of bits recorded in CD =10.16 gigabits\n"
- ]
- }
- ],
- "prompt_number": 133
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.32, Page No 155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find output SNR\n",
- "#Variable Declaration\n",
- "fm=1*10.0**3\n",
- "fs=32*10**3\n",
- "\n",
- "#Calculation\n",
- "FM=4*10**3 #Bandwidth\n",
- "SNR=(3*fs**3)/(8*math.pi**2*fm**2*FM) #SNR\n",
- "SNRO=10*math.log10(SNR)\n",
- "\n",
- "#Result\n",
- "print('Output signal to noise ratio %.2f dB' %SNRO)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Output signal to noise ratio 24.93 dB\n"
- ]
- }
- ],
- "prompt_number": 134
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.33.i, Page No 155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find step size\n",
- "\n",
- "#Variable Declaration\n",
- "fs=64000.0 #samples/sec\n",
- "Amax=1.0 #Maximum signal amplitude\n",
- "fm=3500.0 #Sample Rate\n",
- "\n",
- "#Calculation\n",
- "de=(2*math.pi*fm*Amax)/fs*1000\n",
- "\n",
- "#Result\n",
- "print('Step Size %.2f mV ' %de)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Step Size 343.61 mV \n"
- ]
- }
- ],
- "prompt_number": 135
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.33ii, Page No 155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Quantizatio noise power \n",
- "#Variable Declaration\n",
- "fs=64000.0 #sample Rate\n",
- "Amax=1.0 #Maximum signal Amplitude\n",
- "fm=3500.0\n",
- "\n",
- "#Calculation\n",
- "de=343.6117*10**-3 #step size\n",
- "Nq=de**2/3.0 #Quantizatio noise power\n",
- "Nqd=Nq*(fm/fs)*1000\n",
- "\n",
- "#Result\n",
- "print('Quantizatio noise power %.3f mW' %Nqd)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Quantizatio noise power 2.152 mW\n"
- ]
- }
- ],
- "prompt_number": 136
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.33iii, Page No 155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find SNR\n",
- "\n",
- "#Variable Declaration\n",
- "fs=64000.0\n",
- "Amax=1.0\n",
- "fm=3500.0\n",
- "Nqd=2.1522995*10**-3\n",
- "\n",
- "#Calculation\n",
- "So=Amax**2/2\n",
- "SNR=So/Nqd\n",
- "SNRO=10*math.log10(SNR)\n",
- "\n",
- "#Result\n",
- "print('Output signal noise ratio dB %.3f dB' %SNRO)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Output signal noise ratio dB 23.661 dB\n"
- ]
- }
- ],
- "prompt_number": 137
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.34, Page No 156"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Assuming signal is sampled at the rate 20% above Nyquist rate\n",
- "\n",
- "#Variable Declaration\n",
- "fm=4.5*10**6\n",
- "q=1024.0\n",
- "\n",
- "#Calculation\n",
- "fs=1.2*2*fm #20% above Nyquist rate\n",
- "v=math.log(q,2)\n",
- "r=v*fs/10**6\n",
- "\n",
- "#Result\n",
- "print('no.of bits/sec = %.f M bit/sec' %r)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "no.of bits/sec = 108 M bit/sec\n"
- ]
- }
- ],
- "prompt_number": 138
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.35, Page No 156"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#assume bandwidth of the singal is 4kHz\n",
- "\n",
- "#Variable Declaration\n",
- "fs=32000.0\n",
- "A=2.0\n",
- "fm=4000.0\n",
- "BW=4000.0\n",
- "\n",
- "#Calculation\n",
- "de=(2*math.pi*fm*A)/fs\n",
- "Nq=de**2/3\n",
- "SNR=(3*fs**3)/(8*math.pi**2*fm**2*BW)\n",
- "\n",
- "#Result\n",
- "print('i)step size = %.3f M Volt' %de)\n",
- "print('ii)noise power = %.3f W' %Nq)\n",
- "print('iii)SNR= = %.3f ' %SNR)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i)step size = 1.571 M Volt\n",
- "ii)noise power = 0.822 W\n",
- "iii)SNR= = 19.454 \n"
- ]
- }
- ],
- "prompt_number": 139
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.36, Page No 157"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#assuming signal is sampled at the rate 20% above Nyquist rate\n",
- "\n",
- "#Variable Declaration\n",
- "fm=15*10**3\n",
- "fs=1.2*2*fm\n",
- "q=65536\n",
- "\n",
- "#Calculation\n",
- "v=math.log(q,2)\n",
- "r=v*fs/1000\n",
- "BW=r/2\n",
- "\n",
- "#Result\n",
- "print('i)signaling rate,= %.f K bits/sec ' %r)\n",
- "print('ii)bandwidth BW min = %.f kHz ' %BW)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i)signaling rate,= 576 K bits/sec \n",
- "ii)bandwidth BW min = 288 kHz \n"
- ]
- }
- ],
- "prompt_number": 140
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.37, Page No 157"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find step size,noise power\n",
- "\n",
- "#Variable Declaration\n",
- "fs=64*10**3\n",
- "fm=3500.0\n",
- "A=1.0\n",
- "\n",
- "#Calculation\n",
- "de=(2*math.pi*fm*A)/fs #step size\n",
- "Nq=(de**2/3)*(fm/fs) #Granular noise power\n",
- "\n",
- "#Result\n",
- "print('i)step size = %.3f Volts' %de)\n",
- "print('ii)Nq= %.5f W' %Nq)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i)step size = 0.344 Volts\n",
- "ii)Nq= 0.00215 W\n"
- ]
- }
- ],
- "prompt_number": 141
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.40, Page No 159"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find step Nr,Transmission Bandwidth, SNR\n",
- "\n",
- "#Variable Declaration\n",
- "fs=4 #kHz\n",
- "N=12\n",
- "\n",
- "#Calculation\n",
- "Nr=2*fs #Nyquest rate\n",
- "Bt=1.0/2*N*fs #Transmission Bandwidth\n",
- "SNR=1.8+(6*N) \n",
- "\n",
- "\n",
- "#Result\n",
- "print('i)Nyquest rate = %.1f kHz' %Nr)\n",
- "print('ii)Transmission Bandwidth = %.1f kHz' %Bt)\n",
- "print('iii)SNR = %.1f dB' %SNR)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i)Nyquest rate = 8.0 kHz\n",
- "ii)Transmission Bandwidth = 24.0 kHz\n",
- "iii)SNR = 73.8 dB\n"
- ]
- }
- ],
- "prompt_number": 142
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.41, Page No 159"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find step size,noise power\n",
- "\n",
- "#Variable Declaration\n",
- "fm=3.5*10**3\n",
- "fs=64*10**3\n",
- "A=2.0\n",
- "\n",
- "#Calculation\n",
- "de=(2*math.pi*fm*A)/fs #step size\n",
- "Nq=(de**2/3)*(fm/fs) #Granular noise power\n",
- "\n",
- "#Result\n",
- "print('i)step size = %.3f Volts' %de)\n",
- "print('ii)Nq= %.1f X 10^-3 W' %(Nq*10**3))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i)step size = 0.687 Volts\n",
- "ii)Nq= 8.6 X 10^-3 W\n"
- ]
- }
- ],
- "prompt_number": 143
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.42, Page No 159"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find number of binay pulse per word, Bit rate, Bandwidth\n",
- "\n",
- "#Variable Declaration\n",
- "W=4.5 * 10**6 #khz\n",
- "Nr = 2 * W #Nyquist Rate\n",
- "Q = 1024\n",
- "fs=10.8\n",
- "\n",
- "#Calculation\n",
- "N = math.log(Q,2) #number of binay pulse per word\n",
- "Br= N*fs #Bit rate\n",
- "Bw= 1.0/2*Br #Bandwidth\n",
- "\n",
- "#Result\n",
- "print('i) Number of binay pulse per word = %.1f k bits/sec' %N)\n",
- "print('ii) Bit rate = %.1f k bits/sec' %Br)\n",
- "print('iii)Bandwidth= %.1f X 10^-3 kHz' %Bw)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Number of binay pulse per word = 10.0 k bits/sec\n",
- "ii) Bit rate = 108.0 k bits/sec\n",
- "iii)Bandwidth= 54.0 X 10^-3 kHz\n"
- ]
- }
- ],
- "prompt_number": 144
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.43, Page No 160"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find number of binay pulse per word, Bit rate, Bandwidth\n",
- "\n",
- "#Variable Declaration\n",
- "W=15 #khz\n",
- "Nr = 2*W #Nyquist Rate\n",
- "Q = 65.53\n",
- "fs=44.1 # Sampling rate kHz\n",
- "N=16\n",
- "\n",
- "#Calculation\n",
- "Br= N*fs #Bit rate\n",
- "Bw= 1.0/2*Br #Bandwidth\n",
- "\n",
- "#Result\n",
- "print('i) Number of binay pulse per word = %.3f bits' %N)\n",
- "print('ii) Bit rate = %.1f k bits/sec' %Br)\n",
- "print('iii)Bandwidth= %.1f kHz' %Bw)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Number of binay pulse per word = 16.000 bits\n",
- "ii) Bit rate = 705.6 k bits/sec\n",
- "iii)Bandwidth= 352.8 kHz\n"
- ]
- }
- ],
- "prompt_number": 145
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.44, Page No 160"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Number of binay pulse per word\n",
- "\n",
- "#Variable Declaration\n",
- "W=3.3 #khz\n",
- "fm = 1*10**3 #kHz\n",
- "de = 250 #mV\n",
- "fs=19.8 # Sampling rate kHz\n",
- "\n",
- "#Calculation\n",
- "A=(de*fs)/(2*math.pi*fm)\n",
- "\n",
- "#Result\n",
- "print('i) Number of binay pulse per word = %.3f' %A)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Number of binay pulse per word = 0.788\n"
- ]
- }
- ],
- "prompt_number": 146
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.45, Page No 160"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find number of binay pulse per word, Signaling rate, Bandwidth\n",
- "\n",
- "#Variable Declaration\n",
- "W=3.3 #khz\n",
- "fm = 3300 #Hz\n",
- "Snq = 40 #dB\n",
- "fs= 8000 # Samples/sec\n",
- "\n",
- "#Calculation \n",
- "N=math.ceil((Snq-4.8)/6) # Number of bits per word\n",
- "Q=2**N #\n",
- "r=N*fs #Signaling rate k bits/sec\n",
- "Bw=1.0/2*r\n",
- "\n",
- "#Result\n",
- "print('i) Number of bits per word = %.1f' %N)\n",
- "print('ii) Signaling rate rate = %.1f k bits/sec' %(r/10**3))\n",
- "print('iii)Bandwidth= %.1f kHz' %(Bw/10**3))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Number of bits per word = 6.0\n",
- "ii) Signaling rate rate = 48.0 k bits/sec\n",
- "iii)Bandwidth= 24.0 kHz\n"
- ]
- }
- ],
- "prompt_number": 147
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.46, Page No 161"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find the maximun frequency with 1 volt amplitude\n",
- "\n",
- "#Variable Declaration\n",
- "de=256*10**-3 #V\n",
- "Ts = 10*10**-6 #kHz\n",
- "fm = 10 #kHz\n",
- "fs= 100 # kHz\n",
- "A=1 #V\n",
- "\n",
- "#Calculation \n",
- "wm=(de/A*Ts)*10**7\n",
- "\n",
- "#Result\n",
- "print('i) maximun frequency = %.1f X 10^3 rad/sec' %wm)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) maximun frequency = 25.6 X 10^3 rad/sec\n"
- ]
- }
- ],
- "prompt_number": 148
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.47, Page No 162"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find the Signal to noise ratio\n",
- "\n",
- "#Variable Declaration\n",
- "Q=256 \n",
- "m=255\n",
- "\n",
- "#Calculation \n",
- "SNR=(3*Q**2)/(math.log((1+m),math.e))**2 #dB\n",
- "Gc=m/(math.log(1+m)) #Companding gain\n",
- "Gc=20*math.log(Gc,10)\n",
- "\n",
- "#Result\n",
- "print('i) The Signal to noise ratio= %.1f dB' %SNR)\n",
- "print('ii) The Companding gain = %.1f dB' %Gc)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) The Signal to noise ratio= 6394.0 dB\n",
- "ii) The Companding gain = 33.3 dB\n"
- ]
- }
- ],
- "prompt_number": 149
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.48, Page No 162"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find number of binay pulse per word, Signaling rate, Bandwidth\n",
- "\n",
- "#Variable Declaration\n",
- "fm=15*10**3 #kHz\n",
- "Q=200\n",
- "fs=2*fm\n",
- "\n",
- "#Calculation \n",
- "N=math.ceil(math.log(Q,2))\n",
- "tr=N*fs #Transmission rate kbps\n",
- "Bw=1.0/2*tr\n",
- "\n",
- "#Result\n",
- "print('i) Number of bits per Samples = %.1f' %N)\n",
- "print('ii) Signaling rate = %.1f k bits/sec' %(tr/10**3))\n",
- "print('iii)Bandwidth= %.1f kHz' %(Bw/10**3))\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Number of bits per Samples = 8.0\n",
- "ii) Signaling rate = 240.0 k bits/sec\n",
- "iii)Bandwidth= 120.0 kHz\n"
- ]
- }
- ],
- "prompt_number": 150
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.49, Page No 162"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find number of quantization level\n",
- "\n",
- "#Variable Declaration\n",
- "tr=36.0 #kbps\n",
- "fm=3.4 #kHz\n",
- "fs=8\n",
- "\n",
- "#Calculation \n",
- "N=math.ceil(tr/fs)\n",
- "Q=2**N\n",
- "\n",
- "\n",
- "#Result\n",
- "print('i) number of quantization level = %.1f' %Q)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) number of quantization level = 32.0\n"
- ]
- }
- ],
- "prompt_number": 151
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.50, Page No 162"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find delta modulation\n",
- "\n",
- "#Variable Declaration\n",
- "A=1 #V\n",
- "fm=3.4 #kHz\n",
- "fs=20\n",
- "\n",
- "#Calculation \n",
- "de=1*2*math.pi*(fm/fs)\n",
- "\n",
- "\n",
- "#Result\n",
- "print('i) delta modulation = %.2f V' %de)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) delta modulation = 1.07 V\n"
- ]
- }
- ],
- "prompt_number": 152
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.51, Page No 163"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Signal to noise ratio\n",
- "\n",
- "#Variable Declaration\n",
- "W=3.5 #kHz\n",
- "r=50.0 #kbps\n",
- "Vpp=4 #V\n",
- "fs=8\n",
- "\n",
- "#Calculation \n",
- "N=r/fs\n",
- "SNR=4.8+(6.8*N)\n",
- "\n",
- "#Result\n",
- "print('i) Signal to noise ratio = %.2f V' %SNR)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Signal to noise ratio = 47.30 V\n"
- ]
- }
- ],
- "prompt_number": 153
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.52, Page No 163"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Signal to noise ratio\n",
- "\n",
- "#Variable Declaration\n",
- "W=1 #MHz\n",
- "fs1=3 #MHz\n",
- "fs2=2.4 #MHz\n",
- "Q=256\n",
- "m=255\n",
- "\n",
- "#Calculation \n",
- "SNR=((3*Q**2)/(math.log((1+m),math.e))**2)\n",
- "SNR1=63095.73 #SNR=38+10\n",
- "Q1=math.sqrt((SNR1*((math.log(256,math.e))**2))/3)\n",
- "N1=math.ceil(math.log(Q1,2))\n",
- "r=N1*fs2\n",
- "Bw=1.0/2*r\n",
- "\n",
- "#Result\n",
- "print('i) Number of bits/word = %.2f ' %N1)\n",
- "print('ii) Bit rate = %.1f Mb/s' %r)\n",
- "print('iii) Bandwidth = %.1f Mb/s' %Bw)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Number of bits/word = 10.00 \n",
- "ii) Bit rate = 24.0 Mb/s\n",
- "iii) Bandwidth = 12.0 Mb/s\n"
- ]
- }
- ],
- "prompt_number": 154
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Digital_Communications/ChapterNo4.ipynb b/Digital_Communications/ChapterNo4.ipynb deleted file mode 100755 index 547a969e..00000000 --- a/Digital_Communications/ChapterNo4.ipynb +++ /dev/null @@ -1,273 +0,0 @@ -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1> Chpater No 4: DIGITAL MULTIPLEXERS<h1>"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.4, page no 190 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Caption: Sampling Rate\n",
- "\n",
- "#initialisation of variables\n",
- "f1=4.0*10**3\n",
- "f2=4.5*10**3\n",
- "\n",
- "#CALCULATIONS\n",
- "fsmin=(2*f2)/1000\n",
- "\n",
- "#RESULTS\n",
- "print(\" Sampling rate =%.2f kHz\" %fsmin)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Sampling rate =9.00 kHz\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.5, Page No 190 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Caption: Nyquest rate,Signaling rate,bandwidth\n",
- "\n",
- "#initialisation of variables\n",
- "f1=3000.0\n",
- "f4=1000.0\n",
- "f2=1000.0\n",
- "f3=1000.0\n",
- "\n",
- "#CALCULATIONS\n",
- "#Nyquest rate\n",
- "nq1=2*f1\n",
- "nq2=2*f2\n",
- "nq3=2*f3\n",
- "nq4=2*f4\n",
- "\n",
- "#RESULTS\n",
- "print('i. Nyquest rate of x1 =%.2fkHz' %nq1)\n",
- "print('ii. Nyquest rate of x2 =%.2fkHz' %nq2)\n",
- "print('iii. Nyquest rate of x3 =%.2fkHz' %nq3)\n",
- "print('iv. Nyquest rate of x4 =%.2fkHz' %nq4)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i. Nyquest rate of x1 =6000.00kHz\n",
- "ii. Nyquest rate of x2 =2000.00kHz\n",
- "iii. Nyquest rate of x3 =2000.00kHz\n",
- "iv. Nyquest rate of x4 =2000.00kHz\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.6, Page No 190 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find The spacing between two successive pules\n",
- "\n",
- "#initialisation of variables\n",
- "samplingrate=8000.0\n",
- "totalsignals=24+1\n",
- "\n",
- "#CALCULATIONS\n",
- "t=1/samplingrate\n",
- "T=t/totalsignals\n",
- "T=T*10**6 #time is now u sec\n",
- "space=T-1\n",
- "\n",
- "#RESULTS\n",
- "print('The spacing between two successive pules %.f u sec' %space)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The spacing between two successive pules 4 u sec\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.7, Page No 191"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find signaling rate ,bandwidth\n",
- "\n",
- "#initialisation of variables\n",
- "N=6.0\n",
- "fm=5000.0\n",
- "\n",
- "#CALCULATIONS\n",
- "r=2*fm #sampling rate\n",
- "sr=N*r #signalingrate\n",
- "BW=N*fm #Bandwith\n",
- "sr=sr/1000\n",
- "BW=BW/1000\n",
- "\n",
- "#RESULTS\n",
- "print('Signaling rate %.f K bits/sec' %sr)\n",
- "print('Bandwith to avoid the cross talk in TDM is %.f kHz' %BW)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Signaling rate 60 K bits/sec\n",
- "Bandwith to avoid the cross talk in TDM is 30 kHz\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.9, Page No 198"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find signaling rate ,bandwidth\n",
- "\n",
- "#initialisation of variables\n",
- "N=4.0\n",
- "x=24 #bits/frame\n",
- "D=1152\n",
- "s=1.0/3\n",
- "r=1.544*10**6\n",
- "\n",
- "#CALCULATIONS\n",
- "r0=N*r*((D+x)/(D-s*N))\n",
- "\n",
- "#RESULTS\n",
- "print('Output bit rate %.2f MB/sec' %(r0/(10**6)))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Output bit rate 6.31 MB/sec\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.10, Page No 198"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find signaling rate ,bandwidth\n",
- "\n",
- "#initialisation of variables\n",
- "N=24.0\n",
- "x=72.0 #bits\n",
- "D=192 #message and stuff bits\n",
- "s=1.0/3\n",
- "r=64 #kb/sec\n",
- "\n",
- "#CALCULATIONS\n",
- "r0=N*r*((D+x)/(D-s*N))\n",
- "r1=((N*r)/r0)*100\n",
- "\n",
- "#RESULTS\n",
- "print('i) Output bit rate %.2f MB/sec' %(r0/(10**3)))\n",
- "print('iI) Throughput efficiency is = %.2f percent' %r1)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) Output bit rate 2.20 MB/sec\n",
- "iI) Throughput efficiency is = 69.70 percent\n"
- ]
- }
- ],
- "prompt_number": 6
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Digital_Communications/ChapterNo5.ipynb b/Digital_Communications/ChapterNo5.ipynb deleted file mode 100755 index b36df857..00000000 --- a/Digital_Communications/ChapterNo5.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1> Chpater No 5: DIGTIAL BASEBAND TRANSMISSION<h1>"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.12, Page No 249 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find The roll of factor alpha\n",
- "\n",
- "#initialisation of variables\n",
- "datarate=0.1*10**6\n",
- "fB=75000.0 #bandwidth\n",
- "\n",
- "#CALCULATIONS\n",
- "Tb=1/datarate\n",
- "alpha=2*fB*Tb-1\n",
- "\n",
- "#RESULTS\n",
- "print('The roll out factor alpha = = %.1f ' %alpha)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The roll out factor alpha = = 0.5 \n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.13, Page No 249"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find The Transmission bandwidth\n",
- "\n",
- "#initialisation of variables\n",
- "q=128.0\n",
- "alpha=0.2\n",
- "n=math.log(q,2)\n",
- "fm=2000.0\n",
- "\n",
- "#CALCULATIONS\n",
- "Nq=2*fm\n",
- "fs=1.25*Nq\n",
- "N=8.0\n",
- "total=N*fs\n",
- "bitrate=7*total\n",
- "fB=((1+alpha)*bitrate)/2\n",
- "fB=fB/1000\n",
- "#RESULTS\n",
- "print('The minimum transmission Bandwidth required = %.f kHz' %fB)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The minimum transmission Bandwidth required = 168 kHz\n"
- ]
- }
- ],
- "prompt_number": 2
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Digital_Communications/ChapterNo6.ipynb b/Digital_Communications/ChapterNo6.ipynb deleted file mode 100755 index 83113b9c..00000000 --- a/Digital_Communications/ChapterNo6.ipynb +++ /dev/null @@ -1,158 +0,0 @@ -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1> Chpater No 6: DIGITAL MODULATION TECHNIQUES<h1>"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.5, Page No 327"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math \n",
- "#Symbol rate of transmission and bandwidth \n",
- "\n",
- "#initialisation of variables\n",
- "fb=1.0 #MHz\n",
- "Tb=1/fb #bit period ms\n",
- "N=4\n",
- "\n",
- "#CALCULATIONS\n",
- "Ts1=Tb\n",
- "Bw1=2*fb\n",
- "Ts2=Tb*2\n",
- "Tr2=(1.0/2)*1000 #Symbols/sec\n",
- "Bw2=1/Tb\n",
- "Ts3=N*Tb\n",
- "Tr3=(1.0/4)*1000\n",
- "Bw3=(2.0*fb)/N\n",
- "\n",
- "#RESULTS\n",
- "print(\"In BPSK\")\n",
- "print(\"The symbol rate of transmission is = %.f X 10^6 symbol/sec \" %Ts1)\n",
- "print(\"The Bandwidth is = %.f MHz \" %Bw1)\n",
- "print(\"In QPSK\")\n",
- "print(\"The symbol rate of transmission is = %.f X 10^3 symbol/sec \" %Tr2)\n",
- "print(\"The Bandwidth is = %.f MHz \" %Bw2)\n",
- "print(\"In 16-ary PSK\")\n",
- "print(\"The symbol rate of transmission is = %.f X 10^3 symbol/sec \" %Tr3)\n",
- "print(\"The Bandwidth is = %.f kHz \" %(Bw3*1000))\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "In BPSK\n",
- "The symbol rate of transmission is = 1 X 10^6 symbol/sec \n",
- "The Bandwidth is = 2 MHz \n",
- "In QPSK\n",
- "The symbol rate of transmission is = 500 X 10^3 symbol/sec \n",
- "The Bandwidth is = 1 MHz \n",
- "In 16-ary PSK\n",
- "The symbol rate of transmission is = 250 X 10^3 symbol/sec \n",
- "The Bandwidth is = 500 kHz \n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.6, Page No 328"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#initialisation of variables\n",
- "fb=90 #MHz\n",
- "Bw=20 #Mb/s\n",
- "\n",
- "#CALCULATIONS\n",
- "N=(2*fb)/Bw\n",
- "\n",
- "#RESULTS\n",
- "print(\"Number of bits required = %.f \" %N)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number of bits required = 9 \n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6.12, Page No 357"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#initialisation of variables\n",
- "Tb=0.1 #msec\n",
- "\n",
- "#CALCULATIONS\n",
- "fb=1/Tb\n",
- "\n",
- "#RESULTS\n",
- "print(\"Transmission bandwidth = %.f kHz\" %fb)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Transmission bandwidth = 10 kHz\n"
- ]
- }
- ],
- "prompt_number": 3
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Digital_Communications/ChapterNo7.ipynb b/Digital_Communications/ChapterNo7.ipynb deleted file mode 100755 index 9d58a722..00000000 --- a/Digital_Communications/ChapterNo7.ipynb +++ /dev/null @@ -1,431 +0,0 @@ -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1> Chpater No 7: PERFORMANCE ANALYSIS OF DIGITAL COMMUNICATION SYSTEMS<h1>"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.15, Page No 414"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math \n",
- "\n",
- "#initialisation of variables\n",
- "T=1.0*10**-6 #ms\n",
- "A=10.0*10**-3\n",
- "N=1*10**-11\n",
- "\n",
- "#CALCULATIONS\n",
- "Eb=((A**2)*T)/2.0\n",
- "Epb=math.sqrt(Eb/N)\n",
- "Pb=(1.0/2)*math.erfc(Epb)*(1.0/4)\n",
- "\n",
- "#RESULTS\n",
- "print(\"Bit error probability = %.2f X 10^-4 \" %(Pb*(10**4)))\n",
- "print('Approximation error')"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Bit error probability = 1.96 X 10^-4 \n",
- "Approximation error\n"
- ]
- }
- ],
- "prompt_number": 44
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.16, Page No 420"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#initialisation of variables\n",
- "Br=25*10**6 #bits/sec\n",
- "N=2*10**-20 #Power spectral density of noise\n",
- "A=1.0*10**-6\n",
- "Ps=1*10**-12 # Normalized power\n",
- "\n",
- "#CALCULATIONS\n",
- "Tb=1.0/Br\n",
- "Ps=(A**2)/2.0\n",
- "Pe=1.0/2*(math.erfc((0.6*Ps*Tb)/N))\n",
- "#RESULTS\n",
- "print(\"Average probability of bit error is Pe= %.2f X 10^-4 \" %(Pe*10))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Average probability of bit error is Pe= 1.98 X 10^-4 \n"
- ]
- }
- ],
- "prompt_number": 45
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.17, Page No 423"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find probability of error\n",
- "\n",
- "#initialisation of variables\n",
- "A=2.0\n",
- "N0=2.0*10**-4 #power sepctral density\n",
- "\n",
- "#CALCULATIONS\n",
- "Tmin=(6.76*N0)/4\n",
- "\n",
- "#RESULTS\n",
- "print(\"The min time for which the signal should be extended is Tmin= %.3f X 10^-3 msec \" %(Tmin*10**3))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The min time for which the signal should be extended is Tmin= 0.338 X 10^-3 msec \n"
- ]
- }
- ],
- "prompt_number": 46
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.20, Page No 428"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#The average carrier\n",
- "\n",
- "#initialisation of variables\n",
- "Pe=10**-4\n",
- "N0=2*10**10\n",
- "T=1.0/10**6\n",
- "\n",
- "#CALCULATIONS\n",
- "E=6.76*N0\n",
- "P=E/T\n",
- "Eb=8.5171*N0\n",
- "P2=Eb/T\n",
- "\n",
- "\n",
- "#RESULTS\n",
- "print(\"The average carrier = %.3f X 10^-3 mW \" %(P2/10**17))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The average carrier = 1.703 X 10^-3 mW \n"
- ]
- }
- ],
- "prompt_number": 47
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.21, Page No 430"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#The average carrier\n",
- "\n",
- "#initialisation of variables\n",
- "A=0.2*10**-3 #V\n",
- "T=2*10**-6\n",
- "N0=2*10**-15\n",
- "\n",
- "#CALCULATIONS\n",
- "Pe=(math.sqrt((A**2*T)/4*N0))\n",
- "\n",
- "#RESULTS\n",
- "print(\"The average carrier = %.3f X 10^-4 mW \" %(Pe*10**15))\n",
- "print(\"Approximation error\")"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The average carrier = 6.325 X 10^-4 mW \n",
- "Approximation error\n"
- ]
- }
- ],
- "prompt_number": 48
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.29, Page No 447"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#initialisation of variables\n",
- "A=1.0\n",
- "N0=2.0*10**-5 #power sepctral density\n",
- "\n",
- "#CALCULATIONS\n",
- "T=((3.71**2)*2*N0)/(A**2)\n",
- "Br=1/T\n",
- "#Results\n",
- "print(\"Bit rate Br= %.2f k bits/sec\" %(Br/(10**3)))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Bit rate Br= 1.82 k bits/sec\n"
- ]
- }
- ],
- "prompt_number": 49
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.31, Page No 448"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#initialisation of variables\n",
- "Pe=10.0**-4 #probability of error of PSK\n",
- "N0=2.0*10**-10\n",
- "Br=10**6 #Bit Rate\n",
- "\n",
- "\n",
- "#CALCULATIONS\n",
- "T=1.0/Br\n",
- "E=N0*6.76\n",
- "P=E/T\n",
- "Eb=8.5171*N0\n",
- "Pb=Eb/T\n",
- "#Results\n",
- "print(\"i) PSK system The required carrier power = %.2f mW\" %(P*10**3))\n",
- "print(\"ii) DPSK system The required carrier power = %.2f mW\" %(Pb*10**3))\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) PSK system The required carrier power = 1.35 mW\n",
- "ii) DPSK system The required carrier power = 1.70 mW\n"
- ]
- }
- ],
- "prompt_number": 50
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.32, Page No 450"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#initialisation of variables\n",
- "A=0.2*10**-3 #V\n",
- "T=2*10**-6 #Sec\n",
- "N0=2*10**-15\n",
- "\n",
- "\n",
- "#CALCULATIONS\n",
- "x=math.sqrt((A**2*T)/(4*N0))\n",
- "Pe=(1.0/2)*math.erfc(x/math.sqrt(2.0))\n",
- "\n",
- "#Results\n",
- "print(\"Probability of error = %.2f X 10^-4\" %(Pe*10**4))\n",
- "#print(\"Channel Bandwidth = %.5f MHz\" %BW)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Probability of error = 7.83 X 10^-4\n"
- ]
- }
- ],
- "prompt_number": 51
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.36, Page No 453"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#initialisation of variables\n",
- "Ap=1 #mV\n",
- "En=192.3 #mV\n",
- "Arms=707 #mV\n",
- "\n",
- "\n",
- "#CALCULATIONS\n",
- "Z=Arms/En\n",
- "Pe=1.0/2*(math.erfc(math.sqrt(2)*(Z/math.sqrt(2))))\n",
- "\n",
- "#Results\n",
- "print(\"Probability of error is %.7f \" %Pe)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Probability of error is 0.0000001 \n"
- ]
- }
- ],
- "prompt_number": 52
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7.37, Page No 454"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#initialisation of variables\n",
- "Br=2.08*10**-6 #Bit Rate\n",
- "N0=2*10**-8\n",
- "\n",
- "#CALCULATIONS\n",
- "Eb=(math.sqrt(3.3))/(5*10**7) #Eb=bit energy\n",
- "Ps=Eb*Br\n",
- "BW=2*Br #Bandwidth\n",
- "Es=286.39*N0\n",
- "Ps2=(Es*Br)/2\n",
- "BW2=(2*Br)/4\n",
- "\n",
- "#Results\n",
- "print(\"i) BPSK THe transmission bandwidth = %.2f MHz\" %(BW*10**6)) \n",
- "print(\"ii) For 16 ary PSK THe transmission bandwidth = %.2f MHz\" %(BW2*10**6)) \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i) BPSK THe transmission bandwidth = 4.16 MHz\n",
- "ii) For 16 ary PSK THe transmission bandwidth = 1.04 MHz\n"
- ]
- }
- ],
- "prompt_number": 53
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Digital_Communications/ChapterNo8.ipynb b/Digital_Communications/ChapterNo8.ipynb deleted file mode 100755 index d34d983c..00000000 --- a/Digital_Communications/ChapterNo8.ipynb +++ /dev/null @@ -1,1439 +0,0 @@ -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1> Chpater No 8: INFORMATION THEORY<h1>"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.1, Page No 464"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math \n",
- "#Find Information Content of Each Symbol\n",
- "\n",
- "#Variable Declaration\n",
- "px1=1/2.0\n",
- "px2=1/4.0\n",
- "px3=1/8.0\n",
- "px4=1/8.0\n",
- "\n",
- "#Calculation\n",
- "#information content of each symbol\n",
- "Ix1=math.log(1/px1,2)\n",
- "Ix2=math.log(1/px2,2)\n",
- "Ix3=math.log(1/px3,2)\n",
- "Ix4=math.log(1/px4,2)\n",
- "\n",
- "#Result\n",
- "print(\"Information Content tI(x1)= %.2f bit\" %Ix1)\n",
- "print(\" tI(x2)= %.f bits\" %Ix2)\n",
- "print(\" tI(x3)= %.f bits\" %Ix3)\n",
- "print(\" tI(x4)= %.f bits\" %Ix4)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Information Content tI(x1)= 1.00 bit\n",
- " tI(x2)= 2 bits\n",
- " tI(x3)= 3 bits\n",
- " tI(x4)= 3 bits\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.2, Page No 464"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find amount of Information\n",
- "#Variable Declaration\n",
- "#Calculation\n",
- "pxi=1/4.0\n",
- "Ixi=(math.log10(1/pxi))/math.log10(2)\n",
- "\n",
- "#RESULTS\n",
- "print(\"The amount of Information I(Xi)= %.f \" %Ixi)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The amount of Information I(Xi)= 2 \n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.3, Page No 464"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Amount of Information\n",
- "\n",
- "#Variable Declaration\n",
- "px1=1/2.0\n",
- "px2=1/2.0\n",
- "\n",
- "#Calculation\n",
- "Ix1=math.log(1/px1,2) #entropy\n",
- "Ix2=math.log(1/px2,2)\n",
- "\n",
- "#Result\n",
- "print(\"The amount of Information I(X1)= %.f bit\" %Ix1)\n",
- "print(\"The amount of Information I(X2)= %.f bit\" %Ix2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The amount of Information I(X1)= 1 bit\n",
- "The amount of Information I(X2)= 1 bit\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.4, Page No 465"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Amount of Information \n",
- "\n",
- "#Variable Declaration\n",
- "px1=1/4.0\n",
- "px2=3/4.0\n",
- "\n",
- "#Calculation\n",
- "Ix1=math.log(1/px1,2)\n",
- "Ix2=math.log(1/px2,2)\n",
- "\n",
- "#Result\n",
- "print(\"The amount of Information I(X1)= %.f bit\" %Ix1)\n",
- "print(\"The amount of Information I(X2)= %.2f bit\" %Ix2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The amount of Information I(X1)= 2 bit\n",
- "The amount of Information I(X2)= 0.42 bit\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.9, Page No 468 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Entropy,Amount of information\n",
- "\n",
- "#Variable Declaration\n",
- "px1=0.4\n",
- "px2=0.3\n",
- "px3=0.2\n",
- "px4=0.1\n",
- "\n",
- "#Calculation\n",
- "HX=-px1*math.log(px1,2)-px2*math.log(px2,2)-px3*math.log(px3,2)-px4*math.log(px4,2)\n",
- "Px1x2x1x3=px1*px2*px1*px3\n",
- "Ix1x2x1x3=-math.log(Px1x2x1x3,2)\n",
- "Px4x3x3x2=px4*px3*px3*px2\n",
- "Ix4x3x3x2=-math.log(Px4x3x3x2,2)\n",
- "\n",
- "#Result\n",
- "print(\" \\n Entropy H(X) = %.2f bits/symbol \" %HX)\n",
- "print(\"The amount of Information I(x1x2x1x3)= %.2f bits/symbol\" %Ix1x2x1x3)\n",
- "print(\" I(x4x3x3x2) = %.2f bits/symbol \" %Ix4x3x3x2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " Entropy H(X) = 1.85 bits/symbol \n",
- "The amount of Information I(x1x2x1x3)= 6.70 bits/symbol\n",
- " I(x4x3x3x2) = 9.70 bits/symbol \n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.13, Page No 471"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#Find information rate the telegraphic source\n",
- "\n",
- "#Variable Declaration\n",
- "pdash=1/3.0\n",
- "pdot=2/3.0\n",
- "tdot=0.2\n",
- "tdash=0.6\n",
- "tspace=0.2\n",
- "\n",
- "#Calculation\n",
- "HX=-pdash*math.log(pdash,2)-pdot*math.log(pdot,2)\n",
- "Ts=pdot*tdot+pdash*tdash+tspace\n",
- "r=1/Ts\n",
- "R=r*HX\n",
- "\n",
- "#Result\n",
- "print('Average rate of information R = %.2f bits/s' %R)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Average rate of information R = 1.72 bits/s\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.14, Page No 471"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find information rate of the source\n",
- "\n",
- "f=input('Enter the frequncy f=')\n",
- "px1=1/8.0\n",
- "px2=1/8.0\n",
- "px3=3/8.0\n",
- "px4=3/8.0\n",
- "\n",
- "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2) #entropy of the source\n",
- "R=2*f*HX #r=2*f\n",
- "print('information rate R= %.1f bits/sec ' %R) #f=signal bandwidth\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Enter the frequncy f=34\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "information rate R= 123.2 bits/sec \n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.15, Page No 472"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find information rate of the source\n",
- "#all symbols are equally likely\n",
- "\n",
- "#Variable Declaration\n",
- "px1=1/2.0\n",
- "px2=1/2.0\n",
- "px3=1/2.0\n",
- "px4=1/2.0\n",
- "\n",
- "#Calculation\n",
- "f=input('Enter the frequncy of system fm(in Hz) =')\n",
- "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)\n",
- "\n",
- "#Result\n",
- "print('\\n Entropy H(X) =%.f bits/symbol ' %HX)\n",
- "R=2*f*HX\n",
- "print('information rate =%.f bits/sec' %R)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Enter the frequncy of system fm(in Hz) =45\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Entropy H(X) =2 bits/symbol \n",
- "information rate =180 bits/sec\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.16, Page No 473"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find source entropy ,information rate\n",
- "\n",
- "#Variable Declaration\n",
- "#probability symbols\n",
- "px1=1/2.0\n",
- "px2=1/4.0\n",
- "px3=1/8.0\n",
- "px4=1/16.0\n",
- "px5=1/16.0\n",
- "Tb=10.0**-3\n",
- "\n",
- "#Calculation\n",
- "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4)+px5*math.log(1/px5)\n",
- "\n",
- "#Result\n",
- "print('1. source entropy H(X) = %.2f bits/symbol ' %HX) #source entropy\n",
- "r=1.0/Tb\n",
- "R=r*HX #information rate\n",
- "print(' 2. Information rate R = %.2f bits/sec ' %R)\n",
- "print('Approximation error')"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1. source entropy H(X) = 1.72 bits/symbol \n",
- " 2. Information rate R = 1721.57 bits/sec \n",
- "Approximation error\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.17, Page No 473"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#assume if there are 16 outcomes per second\n",
- "\n",
- "#Variable Declaration\n",
- "px1=1/2.0\n",
- "px2=1/4.0\n",
- "px3=1/8.0\n",
- "px4=1/16.0\n",
- "px5=1/16.0\n",
- "r=16.0\n",
- "\n",
- "#Calculation\n",
- "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)+px5*math.log(1/px5,2)\n",
- "\n",
- "#Result\n",
- "print('1. Entropy H(X) = %.2f bits/symbol ' %HX) #source entropy\n",
- "\n",
- "R=r*HX\n",
- "print('2., Information rate R = %.f bits/sec' %R)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1. Entropy H(X) = 1.88 bits/symbol \n",
- "2., Information rate R = 30 bits/sec\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.18, Page No 474"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#determine entropy ,information rate\n",
- "\n",
- "#Variable Declaration\n",
- "px1=1/4.0\n",
- "px2=1/5.0\n",
- "px3=1/5.0\n",
- "px4=1/10.0\n",
- "px5=1/10.0\n",
- "px6=1/20.0\n",
- "px7=1/20.0\n",
- "px8=1/20.0\n",
- "f=10*10**3.0\n",
- "fs=10*2*10**3.0\n",
- "\n",
- "#Calculation\n",
- "#entropy\n",
- "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)+px5*math.log(1/px5,2)+px6*math.log(1/px6,2)+px7*math.log(1/px7,2)+px8*math.log(1/px8,2) \n",
- "\n",
- "#Result\n",
- "print('bits/message H(X) = %.2f ' %HX)\n",
- "r=fs\n",
- "R=r*HX #information rate\n",
- "print('bits/sec R = %.2f' %R)\n",
- "print('Approximation error')"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "bits/message H(X) = 2.74 \n",
- "bits/sec R = 54828.92\n",
- "Approximation error\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.19, Page No 476 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "from array import *\n",
- "#Find Channel Matrix,joint probability\n",
- "\n",
- "#Variable Declaration\n",
- "px1=0.5\n",
- "px2=0.5\n",
- "py1x1=0.9\n",
- "py2x1=0.1\n",
- "py1x2=0.2\n",
- "py2x2=0.8\n",
- "PYX=[[py1x1,py2x1],[py1x2,py2x2]]\n",
- "PX=[[px1,px2]]\n",
- "PY = [[0,0],\n",
- " [0,0]]\n",
- "PXY = [[0,0],\n",
- " [0,0]]\n",
- "\n",
- "for i in range(len(PYX)):\n",
- " # iterate through columns of Y\n",
- " for j in range(len(PX[0])):\n",
- " # iterate through rows of Y\n",
- " for k in range(len(PX)):\n",
- " PY[i][j] += PYX[i][k] * PX[k][j]\n",
- "print(' PY ARRAY = \\n')\n",
- "for r in PY:\n",
- " print(r)\n",
- "PXd=[[px1,0],[0,px2]]\n",
- "\n",
- "\n",
- "for i in range(len(PXd)):\n",
- " # iterate through columns of Y\n",
- " for j in range(len(PYX[0])):\n",
- " # iterate through rows of Y\n",
- " for k in range(len(PYX)):\n",
- " PXY[i][j] += PXd[i][k] * PYX[k][j]\n",
- "\n",
- " \n",
- "print(' \\n PXY ARRAY = \\n')\n",
- "for r in PXY:\n",
- " print(r)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " PY ARRAY = \n",
- "\n",
- "[0.45, 0.45]\n",
- "[0.1, 0.1]\n",
- " \n",
- " PXY ARRAY = \n",
- "\n",
- "[0.45, 0.05]\n",
- "[0.1, 0.4]\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.35, Page No 498"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Channel is aproximated by the AWGN Channel\n",
- "\n",
- "#Variable Declaration\n",
- "B=4000.0\n",
- "S=0.1*10**-3\n",
- "n=2*10**-12\n",
- "\n",
- "#Calculation\n",
- "N=n*B\n",
- "C=B*math.log(1+(S/N),2) #Capacity of Channel\n",
- "C=C/1000.0\n",
- "#Result\n",
- "print(' Capacity of Channel C=%.3f(10^3) b/s ' %C)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Capacity of Channel C=54.439(10^3) b/s \n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.36i, Page No 499"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#assume that succeissive samples are statistically independent\n",
- "\n",
- "#Variable Declaration\n",
- "fm=4000.0\n",
- "fs=2*fm\n",
- "n=1.25\n",
- "\n",
- "#Calculation\n",
- "r=fs*n\n",
- "pxi=1/256.0\n",
- "HX=-math.log(pxi,2)\n",
- "R=r*HX\n",
- "R=R/1000\n",
- "print('Information Rate R= %.f kb/s' %R)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Information Rate R= 80 kb/s\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.36ii, Page No 499"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "#assume that succeissive samples are statistically independent\n",
- "\n",
- "#Variable Declaration\n",
- "B=10*10**3.0\n",
- "SN=20.0\n",
- "\n",
- "#Calculation\n",
- "SNR=10**(SN/10.0)\n",
- "C=B*math.log(1+(SNR),2)\n",
- "C=C/1000\n",
- "\n",
- "#Result\n",
- "print('The channel capacity = %.2f 10^3 b/s' %C)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The channel capacity = 66.58 10^3 b/s\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.36iii, Page No 499"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#assume that succeissive samples are statistically independent\n",
- "\n",
- "#Variable Declaration\n",
- "C=8*10**4.0\n",
- "B=10**4.0\n",
- "\n",
- "#Calculation\n",
- "SN=2**(C/B)-1\n",
- "SNR=10*math.log(SN,10) #SNR\n",
- "\n",
- "#Result\n",
- "print(' The S/N ratio required for error-free transmission =%.2f dB ' %SNR) #required SNR is greater that 24.064\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The S/N ratio required for error-free transmission =24.07 dB \n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.36iv, Page No 499 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#assume that succeissive samples are statistically independent\n",
- "\n",
- "#Variable Declaration\n",
- "SN=20.0\n",
- "\n",
- "#Calculation\n",
- "SNR=10**(SN/10.0)\n",
- "C=8*10**4.0\n",
- "B=C/(math.log(1+SNR,2)) #Bandwidth\n",
- "B=B/1000\n",
- "\n",
- "#Result\n",
- "print('Bandwidth required for AWGN channel B =%.2f kHz ' %B)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Bandwidth required for AWGN channel B =12.02 kHz \n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.37, Page No 502"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find code efficiency,redundancy\n",
- "\n",
- "#Variable Declaration\n",
- "px1=0.9\n",
- "px2=0.1\n",
- "n1=1.0\n",
- "n2=1.0\n",
- "\n",
- "#Calculation\n",
- "L=px1*n1+px2*n2 #code leght\n",
- "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)\n",
- "n=(HX/L) #code efficiency\n",
- "n=n*100\n",
- "\n",
- "print('Code efficiency = %.1f percent' %n)\n",
- "r=(100-n) #code reduncy\n",
- "print('Code redundancy = %.1f percent' %r)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Code efficiency = 46.9 percent\n",
- "Code redundancy = 53.1 percent\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.38, Page No 502"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find code efficiency,redundancy\n",
- "\n",
- "#Variable Declaration\n",
- "pa1=0.81\n",
- "pa2=0.09 \n",
- "pa3=0.09\n",
- "pa4=0.01 \n",
- "n1=1\n",
- "n2=2 \n",
- "n3=3\n",
- "n4=3 \n",
- "\n",
- "#Calculation\n",
- "L=pa1*n1+pa2*n2+pa3*n3+pa4*n4\n",
- "HX2=pa1*math.log(1/pa1,2)+pa2*math.log(1/pa2,2)+pa3*math.log(1/pa3,2)+pa4*math.log(1/pa4,2)\n",
- "n=HX2/L*100\n",
- "\n",
- "#Result\n",
- "print(' code efficiency = %.2f percent' %n)\n",
- "\n",
- "r=(100-n) #code reduncy\n",
- "print(' code redundancy = %.1f percent' %r)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " code efficiency = 72.71 percent\n",
- " code redundancy = 27.3 percent\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.44, Page No 507"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find efficiency of the code\n",
- "\n",
- "#Variable Declaration\n",
- "px1=1/2.0\n",
- "px2=1/4.0\n",
- "px3=1/8.0\n",
- "px4=1/8.0\n",
- "n1=1.0\n",
- "n2=2.0\n",
- "n3=3.0\n",
- "n4=3.0\n",
- "\n",
- "#Calculation\n",
- "#information content of each symbol\n",
- "Ix1=-math.log(px1,2)\n",
- "Ix2=-math.log(px2,2)\n",
- "Ix3=-math.log(px3,2)\n",
- "Ix4=-math.log(px4,2)\n",
- "\n",
- "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2)+px4*math.log(1/px4,2)\n",
- "L=px1*n1+px2*n2+px3*n3+px4*n4\n",
- "\n",
- "n=HX/L*100\n",
- "\n",
- "#Result\n",
- "print('Ccode efficiency = %.f Percent' %n)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Ccode efficiency = 100 Percent\n"
- ]
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.50, Page No 512"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find entropy ,information rate\n",
- "#If there are 16 outcomes per second\n",
- "\n",
- "#Variable Declaration\n",
- "P1=1/2.0\n",
- "P2=1/4.0\n",
- "P3=1/8.0\n",
- "P4=1/16.0\n",
- "P5=1/32.0\n",
- "P6=1/32.0\n",
- "r=16 #message rate\n",
- "\n",
- "#Calculation\n",
- "H=P1*math.log(1/P1,2)+P2*math.log(1/P2,2)+P3*math.log(1/P3,2)+P4*math.log(1/P4,2)+P5*math.log(1/P5,2)+P6*math.log(1/P6,2)\n",
- "#Entropy of system\n",
- "\n",
- "#Result\n",
- "print('1. Entropy of system H = %.2f bits/message ' %H)\n",
- "R=H*r #R=Entropy*message rate\n",
- "print(' 2. Information rate R = %.f bits/sec ' %R)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1. Entropy of system H = 1.94 bits/message \n",
- " 2. Information rate R = 31 bits/sec \n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.51, Page No 512"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Calculate H(X) ,H(Y)\n",
- "\n",
- "#Variable Declaration\n",
- "px1=0.3\n",
- "px2=0.4\n",
- "px3=0.3\n",
- "\n",
- "#Calculation\n",
- "HX=px1*math.log(1/px1,2)+px2*math.log(1/px2,2)+px3*math.log(1/px3,2) #Entropy of X\n",
- "\n",
- "\n",
- "print(' 1.Entropy of X H(X)=%.3f bits/symbol ' %HX)\n",
- "\n",
- "PYX=[[0.8, 0.2, 0],[ 0, 1, 0],[ 0, 0.3, 0.7]]\n",
- "PX=[[px1, px2, px3]]\n",
- "PXY = [[0,0,0],\n",
- " [0,0,0],\n",
- " [0,0,0]]\n",
- "\n",
- "for i in range(len(PYX)):\n",
- " # iterate through columns of PXd\n",
- " for j in range(len(PX[0])):\n",
- " # iterate through rows of PYX\n",
- " for k in range(len(PX)):\n",
- " PXY[i][j] += PYX[i][k] * PX[k][j]\n",
- "\n",
- "py1=PXY[0][0]\n",
- "py2=PXY[0][1]\n",
- "py3=PXY[0][2]\n",
- "HY=py1*math.log(1/py1,2)+py2*math.log(1/py2,2)+py3*math.log(1/py3,2) #Entropy of Y\n",
- "print(' 2. Entropy of Y H(Y)= %.2f bits/symbol ' %HY)\n",
- "print('Approximation error')\t\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " 1.Entropy of X H(X)=1.571 bits/symbol \n",
- " 2. Entropy of Y H(Y)= 1.51 bits/symbol \n",
- "Approximation error\n"
- ]
- }
- ],
- "prompt_number": 22
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.52, Page No 513"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find entropy of source ,entropy of second order extension\n",
- "\n",
- "#Variable Declaration\n",
- "P1=0.7\n",
- "P2=0.15\n",
- "P3=0.15\n",
- "\n",
- "#Calculation\n",
- "HX=P1*math.log(1/P1,2)+P2*math.log(1/P2,2)+P3*math.log(1/P3,2) #Entropy of source\n",
- "print(' 1. Entropy of system H(X)=%.2f bits/symbol ' %HX)\n",
- "#H(X^n)=n*H(X)\n",
- "n=2 #for second order\n",
- "HX2=n*HX\n",
- "\n",
- "#Result\n",
- "print(' 2. Entropy of second order system extension of source can be H(X^2)=%.2f bits/symbol ' %(HX*2))\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " 1. Entropy of system H(X)=1.18 bits/symbol \n",
- " 2. Entropy of second order system extension of source can be H(X^2)=2.36 bits/symbol \n"
- ]
- }
- ],
- "prompt_number": 23
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.54, Page No 514"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find entropy of source \n",
- "\n",
- "#Variable Declaration\n",
- "S0=1/3.0\n",
- "S1=1/6.0\n",
- "S2=1/4.0\n",
- "S3=1/4.0\n",
- "\n",
- "#Calculation\n",
- "HX=S0*math.log(1/S0,2)+S1*math.log(1/S1,2)+S2*math.log(1/S2,2)+S3*math.log(1/S3,2) #EntroSy of source\n",
- "\n",
- "#Result\n",
- "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Entropy of system H(X)=1.96 bits/symbol \n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.56, Page No 515"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Information capacity of telephone\n",
- "\n",
- "#Variable Declaration\n",
- "B=3.4*10**3\n",
- "SNR=30.0\n",
- "\n",
- "#Calculation\n",
- "SN=10**(SNR/10)\n",
- "C=B*math.log(1+SN,2) #Information capacity\n",
- "C=C/1000\n",
- "\n",
- "#Result\n",
- "print(' Information capacity of telephone is C = %.2f kbps ' %C)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Information capacity of telephone is C = 33.89 kbps \n"
- ]
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.59, Page No 516"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find entropy of source \n",
- "\n",
- "#Variable Declaration\n",
- "S0=1/3.0\n",
- "S1=1/6.0\n",
- "S2=1/4.0\n",
- "S3=1/4.0\n",
- "\n",
- "#Calculation\n",
- "HX=S0*math.log(1/S0,2)+S1*math.log(1/S1,2)+S2*math.log(1/S2,2)+S3*math.log(1/S3,2) #EntroSy of source\n",
- "\n",
- "#Result\n",
- "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Entropy of system H(X)=1.96 bits/symbol \n"
- ]
- }
- ],
- "prompt_number": 26
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.60, Page No 516"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find entropy of source \n",
- "\n",
- "#Variable Declaration\n",
- "m1=1/2.0\n",
- "m2=1/4.0\n",
- "m3=1/8.0\n",
- "m4=1/16.0\n",
- "m5=1/16.0\n",
- "\n",
- "#Calculation\n",
- "L=(m1*1)+(m2*2)+(m3*3)+(2*(m4)*4)\n",
- "\n",
- "#Result\n",
- "print(' Average number of bits per message =%.2f bits ' %L)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Average number of bits per message =1.88 bits \n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.61, Page No 517"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find Information capacity of telephone\n",
- "\n",
- "#Variable Declaration\n",
- "B=3.4*10**3\n",
- "SNR=30.0\n",
- "\n",
- "#Calculation\n",
- "SN=10**(SNR/10)\n",
- "C=B*math.log(1+SN,2) #Information capacity\n",
- "C=C/1000\n",
- "\n",
- "#Result\n",
- "print(' Information capacity of telephone is C = %.2f kbps ' %C)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Information capacity of telephone is C = 33.89 kbps \n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.62, Page No 517"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find entropy of source \n",
- "\n",
- "#Variable Declaration\n",
- "p1=4.0\n",
- "m1=0.5\n",
- "m2=0.5\n",
- "m3=0.375\n",
- "m4=0.375\n",
- "m5=0.375\n",
- "m6=0.375\n",
- "\n",
- "#Calculation\n",
- "I1=p1*math.log(1/p1,2) \n",
- "HX=m1*math.log(1/m1,2)+m2*math.log(1/m2,2)+m3*math.log(1/m3,2)+m4*math.log(1/m4,2)+m5*math.log(1/m5,2)+m6*math.log(1/m6,2) #EntroSy of source\n",
- "\n",
- "#Result\n",
- "print(' Entropy of system H(X)=%.2f bits/symbol ' %HX)\n",
- "print('Approximation error')\t"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Entropy of system H(X)=3.12 bits/symbol \n",
- "Approximation error\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.65, Page No 519"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find entropy of source \n",
- "\n",
- "#Variable Declaration\n",
- "S0=1/2.0\n",
- "S1=1/4.0\n",
- "S2=1/8.0\n",
- "S3=1/8.0\n",
- "n=1\n",
- "\n",
- "#Calculation\n",
- "H=S0*math.log(1.0/S0,2)+S1*math.log(1.0/S1,2)+S2*math.log(1.0/S2,2)+S3*math.log(1.0/S3,2) #EntroSy of source\n",
- "L=H*n\n",
- "\n",
- "\n",
- "#Result\n",
- "print(' Code length =%.2f bits/messages ' %L)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Code length =1.75 bits/messages \n"
- ]
- }
- ],
- "prompt_number": 30
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.67, Page No 520"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#Find channel capacity and new bandwidth\n",
- "\n",
- "#Variable Declaration\n",
- "B=8*10**3\n",
- "SNR=31.0\n",
- "SNR2=61\n",
- "\n",
- "#Calculation\n",
- "C=B*math.log(1+SNR,2) #Information capacity\n",
- "B2=C/math.log(1+SNR2,2)\n",
- "#Result\n",
- "print(' Channel capacity is C = %.2f x 10^3 bits/sec ' %(C/1000))\n",
- "print(' New Bandwidth is C = %.2f x kHz ' %(B2/1000))\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Channel capacity is C = 40.00 x 10^3 bits/sec \n",
- " New Bandwidth is C = 6.72 x kHz \n"
- ]
- }
- ],
- "prompt_number": 31
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Digital_Communications/ChapterNo9.ipynb b/Digital_Communications/ChapterNo9.ipynb deleted file mode 100755 index 8062105c..00000000 --- a/Digital_Communications/ChapterNo9.ipynb +++ /dev/null @@ -1,182 +0,0 @@ -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1> Chpater No 9: ERROR CONTROL CODING<h1>"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.4, Page No 540"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find detected errors,corrected errors\n",
- "\n",
- "#initialisation of variables\n",
- "dmin=5.0\n",
- "#(s+1)<= dmin number errors can be detected(s)\n",
- " \n",
- "#CALCULATIONS\n",
- "s=dmin-1\n",
- "\n",
- "#RESULTS\n",
- "print(' i)Number of detected errors s <= %.f ' %s)\n",
- "#(2t+1)<=dmin number errors can be corrected(t)\n",
- "t=(dmin-1)/2.0\n",
- "print('ii) Number of corrected errors t<= %.f ' %t)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " i)Number of detected errors s <= 4 \n",
- "ii) Number of corrected errors t<= 2 \n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.17, Page No 569"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Determine all possible code vectors \n",
- "\n",
- "m3=1\n",
- "m2=0\n",
- "m1=1\n",
- "m0=0\n",
- "#M=Message Matrix\n",
- "#G=Generator Matrix\n",
- "G=[[1, 0, 1, 1, 0, 0, 0],[0, 1, 0, 1, 1, 0, 0],[0, 0, 1, 0, 1, 1, 0],[0, 0, 0, 1, 0, 1, 1]]\n",
- "M=[[m3,m2,m1,m0]]\n",
- "X = [[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0]]\n",
- "\n",
- "for i in range(len(G)):\n",
- " # iterate through columns of PXd\n",
- " for j in range(len(M[0])):\n",
- " # iterate through rows of PYX\n",
- " for k in range(len(M)):\n",
- " X[i][j] += G[i][k] * M[k][j]\n",
- "print('The required code word')\n",
- "for r in range(0,7):\n",
- " print(X[0][r])"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The required code word\n",
- "1\n",
- "0\n",
- "1\n",
- "0\n",
- "0\n",
- "0\n",
- "0\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9.19, Page No 572"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Determine code word \n",
- "m3=1\n",
- "m2=0\n",
- "m1=1\n",
- "m0=0\n",
- "#M=Message Matrix\n",
- "#G=Generator Matrix\n",
- "G=[[1, 0, 0, 0, 1, 0, 1],[0, 1, 0, 0, 1, 1, 1],[0, 0, 1, 0, 1, 1, 0],[0, 0, 0, 1, 0, 1, 1]]\n",
- "M=[[m3,m2,m1,m0]]\n",
- "X = [[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0]]\n",
- "\n",
- "\n",
- "for i in range(len(G)):\n",
- " # iterate through columns of PXd\n",
- " for j in range(len(M[0])):\n",
- " # iterate through rows of PYX\n",
- " for k in range(len(M)):\n",
- " X[i][j] += G[i][k] * M[k][j]\n",
- "print('The required code word')\n",
- "for r in range(0,7):\n",
- " print(X[0][r] )\n",
- " \n",
- "\n",
- "print('The code in the book is wrong')\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The required code word\n",
- "1\n",
- "0\n",
- "1\n",
- "0\n",
- "0\n",
- "0\n",
- "0\n",
- "The code in the book is wrong\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Digital_Communications/Chapter2.ipynb b/Digital_Communications_by_S._Sharma/Chapter2.ipynb index 9cc6d1df..9cc6d1df 100755 --- a/Digital_Communications/Chapter2.ipynb +++ b/Digital_Communications_by_S._Sharma/Chapter2.ipynb diff --git a/Digital_Communications/Chapter3.ipynb b/Digital_Communications_by_S._Sharma/Chapter3.ipynb index 805bc62b..805bc62b 100755 --- a/Digital_Communications/Chapter3.ipynb +++ b/Digital_Communications_by_S._Sharma/Chapter3.ipynb diff --git a/Digital_Communications/Chapter4.ipynb b/Digital_Communications_by_S._Sharma/Chapter4.ipynb index e56598ee..e56598ee 100755 --- a/Digital_Communications/Chapter4.ipynb +++ b/Digital_Communications_by_S._Sharma/Chapter4.ipynb diff --git a/Digital_Communications/Chapter5.ipynb b/Digital_Communications_by_S._Sharma/Chapter5.ipynb index bf535beb..bf535beb 100755 --- a/Digital_Communications/Chapter5.ipynb +++ b/Digital_Communications_by_S._Sharma/Chapter5.ipynb diff --git a/Digital_Communications/Chapter6.ipynb b/Digital_Communications_by_S._Sharma/Chapter6.ipynb index fd5f6716..fd5f6716 100755 --- a/Digital_Communications/Chapter6.ipynb +++ b/Digital_Communications_by_S._Sharma/Chapter6.ipynb diff --git a/Digital_Communications/Chapter7.ipynb b/Digital_Communications_by_S._Sharma/Chapter7.ipynb index 7c33676a..7c33676a 100755 --- a/Digital_Communications/Chapter7.ipynb +++ b/Digital_Communications_by_S._Sharma/Chapter7.ipynb diff --git a/Digital_Communications/Chapter8.ipynb b/Digital_Communications_by_S._Sharma/Chapter8.ipynb index 52d8741e..52d8741e 100755 --- a/Digital_Communications/Chapter8.ipynb +++ b/Digital_Communications_by_S._Sharma/Chapter8.ipynb diff --git a/Digital_Communications/Chapter9.ipynb b/Digital_Communications_by_S._Sharma/Chapter9.ipynb index c91e1583..c91e1583 100755 --- a/Digital_Communications/Chapter9.ipynb +++ b/Digital_Communications_by_S._Sharma/Chapter9.ipynb diff --git a/Digital_Communications/README.txt b/Digital_Communications_by_S._Sharma/README.txt index cb9038a1..cb9038a1 100755 --- a/Digital_Communications/README.txt +++ b/Digital_Communications_by_S._Sharma/README.txt diff --git a/Digital_Communications/screenshots/Chapter1.png b/Digital_Communications_by_S._Sharma/screenshots/Chapter1.png Binary files differindex ecbda1c6..ecbda1c6 100755 --- a/Digital_Communications/screenshots/Chapter1.png +++ b/Digital_Communications_by_S._Sharma/screenshots/Chapter1.png diff --git a/Digital_Communications/screenshots/chapter2.png b/Digital_Communications_by_S._Sharma/screenshots/chapter2.png Binary files differindex cfb39197..cfb39197 100755 --- a/Digital_Communications/screenshots/chapter2.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter2.png diff --git a/Digital_Communications/screenshots/chapter2_1.png b/Digital_Communications_by_S._Sharma/screenshots/chapter2_1.png Binary files differindex 4eac12f5..4eac12f5 100755 --- a/Digital_Communications/screenshots/chapter2_1.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter2_1.png diff --git a/Digital_Communications/screenshots/chapter2_2.png b/Digital_Communications_by_S._Sharma/screenshots/chapter2_2.png Binary files differindex 2aa76318..2aa76318 100755 --- a/Digital_Communications/screenshots/chapter2_2.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter2_2.png diff --git a/Digital_Communications/screenshots/chapter2_3.png b/Digital_Communications_by_S._Sharma/screenshots/chapter2_3.png Binary files differindex 2aa76318..2aa76318 100755 --- a/Digital_Communications/screenshots/chapter2_3.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter2_3.png diff --git a/Digital_Communications/screenshots/chapter3.png b/Digital_Communications_by_S._Sharma/screenshots/chapter3.png Binary files differindex bd8ace20..bd8ace20 100755 --- a/Digital_Communications/screenshots/chapter3.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter3.png diff --git a/Digital_Communications/screenshots/chapter3_1.png b/Digital_Communications_by_S._Sharma/screenshots/chapter3_1.png Binary files differindex b59f5a6f..b59f5a6f 100755 --- a/Digital_Communications/screenshots/chapter3_1.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter3_1.png diff --git a/Digital_Communications/screenshots/chapter3_2.png b/Digital_Communications_by_S._Sharma/screenshots/chapter3_2.png Binary files differindex 9e929daa..9e929daa 100755 --- a/Digital_Communications/screenshots/chapter3_2.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter3_2.png diff --git a/Digital_Communications/screenshots/chapter3_3.png b/Digital_Communications_by_S._Sharma/screenshots/chapter3_3.png Binary files differindex 9e929daa..9e929daa 100755 --- a/Digital_Communications/screenshots/chapter3_3.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter3_3.png diff --git a/Digital_Communications/screenshots/chapter4.png b/Digital_Communications_by_S._Sharma/screenshots/chapter4.png Binary files differindex 9160481e..9160481e 100755 --- a/Digital_Communications/screenshots/chapter4.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter4.png diff --git a/Digital_Communications/screenshots/chapter4_1.png b/Digital_Communications_by_S._Sharma/screenshots/chapter4_1.png Binary files differindex 230f9193..230f9193 100755 --- a/Digital_Communications/screenshots/chapter4_1.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter4_1.png diff --git a/Digital_Communications/screenshots/chapter4_2.png b/Digital_Communications_by_S._Sharma/screenshots/chapter4_2.png Binary files differindex 31a0c9c2..31a0c9c2 100755 --- a/Digital_Communications/screenshots/chapter4_2.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter4_2.png diff --git a/Digital_Communications/screenshots/chapter4_3.png b/Digital_Communications_by_S._Sharma/screenshots/chapter4_3.png Binary files differindex 31a0c9c2..31a0c9c2 100755 --- a/Digital_Communications/screenshots/chapter4_3.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter4_3.png diff --git a/Digital_Communications/screenshots/chapter6.png b/Digital_Communications_by_S._Sharma/screenshots/chapter6.png Binary files differindex 47807122..47807122 100755 --- a/Digital_Communications/screenshots/chapter6.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter6.png diff --git a/Digital_Communications/screenshots/chapter7.png b/Digital_Communications_by_S._Sharma/screenshots/chapter7.png Binary files differindex 12c93548..12c93548 100755 --- a/Digital_Communications/screenshots/chapter7.png +++ b/Digital_Communications_by_S._Sharma/screenshots/chapter7.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/README.txt b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/README.txt new file mode 100755 index 00000000..52274925 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/README.txt @@ -0,0 +1,10 @@ +Contributed By: kiruthika gowthaman +Course: be +College/Institute/Organization: Sona College of Technology,Salem,Tamil Nadu,India +Department/Designation: Computer Science +Book Title: Discrete Mathematics and its Applications +Author: Kenneth H.Rosen +Publisher: McGrawhill +Year of publication: 2012 +Isbn: 9780071315012 +Edition: 7
\ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.ipynb index 645ce13f..645ce13f 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.ipynb index 645ce13f..645ce13f 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_2.ipynb new file mode 100755 index 00000000..8f25fc13 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_2.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"source": "##Example 01: Page 156", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "#To generate a sequence a_n=1/n\ni=1.0 #floating point division\nn=input(\"enter the number of terms in the sequence\");\nprint \"a_n=1/n\"\nprint \"when n=\",n,\"a_n is\"\nfor i in range(1,n+1): #iteration till the number of terms specified by the user\n a=1.0/i\n print \"1/\",i,\",\",\nprint \"\\n\"\nfor i in range(1,n+1): #iteration till the number of terms specified by the user\n a=1.0/i\n print a,\",\",\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter the number of terms in the sequence5\na_n=1/n\nwhen n= 5 a_n is\n1/ 1 , 1/ 2 , 1/ 3 , 1/ 4 , 1/ 5 , \n\n1.0 , 0.5 , 0.333333333333 , 0.25 , 0.2 ,\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 02: Page 157", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "n=input(\"Enter the number of terms in the sequence to generate the geometric progression\");\ni=1\nprint\"the list of terms\",\nfor i in range (n+1):print\"b\",i,\",\",\nprint \"begins with\", \nfor i in range (n+1): #iterate for the number of terms given as input\n b_n=(-1)**i\n print b_n,\nprint\"\\n\",\"the list of terms\",\nfor i in range (n+1):print\"c\",i,\",\",\nprint \"begins with\", \nfor i in range (n+1): #iterate for the number of terms given as input\n c_n=2*(5**i)\n print c_n,\nprint\"\\n\",\"the list of terms\",\nfor i in range (n+1):print\"c\",i,\",\",\nprint \"begins with\",\nfor i in range (n+1): #iterate for the number of terms given as input\n d_n=6.0*((1.0/3.0)**i)\n print d_n, #prints the fraction values in decimals. Floating point division\n\n \n \n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of terms in the sequence to generate the geometric progression5\nthe list of terms b 0 , b 1 , b 2 , b 3 , b 4 , b 5 , begins with 1 -1 1 -1 1 -1 \nthe list of terms c 0 , c 1 , c 2 , c 3 , c 4 , c 5 , begins with 2 10 50 250 1250 6250 \nthe list of terms c 0 , c 1 , c 2 , c 3 , c 4 , c 5 , begins with 6.0 2.0 0.666666666667 0.222222222222 0.0740740740741 0.0246913580247\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 157", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "n=input(\"Enter the number terms in the sequence\");\ns_n=-1+4*n\nt_n=7-3*n\ni=0\nprint \"The list of terms\",\nfor i in range(n): \n print \"s\",i,\",\",\nprint \"begins with\",\nfor i in range(n):#generates the sequence for -1*4i\n print -1+4*i,\nprint \"\\nThe list of terms\",\nfor i in range(n):\n print \"t\",i,\",\",\nprint \"begins with\",\nfor i in range(n):#generates the sequence for 7-3i\n print 7-3*i,\n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number terms in the sequence5\nThe list of terms s 0 , s 1 , s 2 , s 3 , s 4 , begins with -1 3 7 11 15 \nThe list of terms t 0 , t 1 , t 2 , t 3 , t 4 , begins with 7 4 1 -2 -5\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 158", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "a=[2,0,0,0] #assigning a[0]=2 (Given)\n\nfor i in range(1,4):#iteration to run till a[3]\n a[i]=a[i-1]+3\n print \"a[\",i,\"]\",a[i]", "outputs": [{"output_type": "stream", "name": "stdout", "text": "a[ 1 ] 5\na[ 2 ] 8\na[ 3 ] 11\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 06: Page 158", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "a=[3,5,0,0] #assingning a[0],a[1] to the given values\n\nfor i in range(2,4): # iterations to find the successive values. If values are to be found for further terms the for loop \"stop\" has to be modified\n a[i]=a[i-1]-a[i-2]\n print \"a[\",i,\"]\",a[i]", "outputs": [{"output_type": "stream", "name": "stdout", "text": "a[ 2 ] 2\na[ 3 ] -3\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 07: Page 158 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "f=[0,1,0,0,0,0,0] #assingning a[0],a[1] to the given values\nprint \"Fibonacci series is\"\nfor i in range(2,7): # iterations to find the successive values. If values are to be found for further terms the for loop \"stop\" has to be modified\n f[i]=f[i-1]+f[i-2]\n print \"f[\",i,\"]=f[\",i-1,\"]+f[\",i-2,\"]=\",f[i]", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Fibonacci series is\nf[ 2 ]=f[ 1 ]+f[ 0 ]= 1\nf[ 3 ]=f[ 2 ]+f[ 1 ]= 2\nf[ 4 ]=f[ 3 ]+f[ 2 ]= 3\nf[ 5 ]=f[ 4 ]+f[ 3 ]= 5\nf[ 6 ]=f[ 5 ]+f[ 4 ]= 8\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 08: Page 159 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "n=1\nresult=0\nnumber=input(\"Enter the number\");\nfor i in range(1,number):\n n=n+i*n \nprint \"The factorial of\",number,\"is\",n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number5\nThe factorial of 5 is 120\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 18: Page 164", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "#finding the summation of j^2\nup=input(\"Enter the upper limit for the operation j^2\");\nlow=input(\"Enter the lower limit for the operation j^2\");\nsum=0\nprint \"The square of terms form 1 to n\",\nfor j in range (low,up+1): #summation. Iteration from lower to upper limit.\n print j,\"^2+\",\n j=j**2 #square function is computed as '**'\n sum=sum+j\nprint \"=\",sum\n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the upper limit for the operation j^25\nEnter the lower limit for the operation j^21\nThe square of terms form 1 to n 1 ^2+ 2 ^2+ 3 ^2+ 4 ^2+ 5 ^2+ = 55\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 19: Page 164", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "k=4 #lower limit\nsum=0\nprint \"The value for the sequence\",\nfor k in range (4,8+1,1): #8+1 , 8 is the upper limit, in python to make for loop run till the limit equal to upper limit we give a +1.\n print \"(-1)^\",k,\"+\",\n sum=sum+((-1)**k)\nprint \"=\",sum\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The value for the sequence (-1)^ 4 + (-1)^ 5 + (-1)^ 6 + (-1)^ 7 + (-1)^ 8 + = 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 21: Page 165", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "\nglobals()['j']=0\ni=0\nglobals()['s']=0\nupj=input(\"Enter the upper limit for the inner summation\");\nlowj=input(\"Enter the lower limit for the inner summation\");\nupi=input(\"Enter the upper limit for the outer summation\");\nlowi=input(\"Enter the lower limit for the outer summation\");\nfor i in range (lowj,upj+1):\n j=j+i\nfor l in range(lowi,upi+1):\n s=s+(j*l)\nprint s\n \n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the upper limit for the inner summation3\nEnter the lower limit for the inner summation1\nEnter the upper limit for the outer summation4\nEnter the lower limit for the outer summation1\n60\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 13: Page 161", "cell_type": "markdown", "metadata": {"collapsed": true}}, {"execution_count": 4, "cell_type": "code", "source": "#To print series 1 once, 2 twice, 3 thrice and so on\na=[]\ni=1\nfor i in range(1,10+1): #for loop to initialise the number\n for j in range(1,i+1):#for loop to iterate to make the count\n print i,\n ", "outputs": [{"output_type": "stream", "name": "stdout", "text": "1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 22: Page 166", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "s=0 #initialise it to zero to store the results\nglobals()['res']=0 #difining result as global variable since it has to be accessed outside the loop\nprint \"Sum of values of s for all the members of the set {\",\nfor s in range (0,4+1,2): #iterate for terms 0,4,6\n print s,\n res=res+s\nprint \"} is\",res\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Sum of values of s for all the members of the set { 0 2 4 } is 6\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02: Page 178", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "def getmat(): #function to get the matrix elements\n m = int(input('number of rows, m = '))\n n = int(input('number of columns, n = '))\n matrix = []; columns = []\n\n for i in range(0,m):\n matrix.append([])\n for j in range(0,n):\n matrix[i].append(0)\n print ('entry in row: ',i+1,' column: ',j+1)\n matrix[i][j] = int(input())\n return (matrix)\n\ndef matrixADD(m1,m2): #function to add the matrix.\n z=[]\n for i in range (len(m1)):\n tem = []\n for j in range (len(m2)):\n x=m1[i][j]+m2[i][j]\n tem.append(x)\n z.append(tem)\n return z \n \n\n\nmat1=[]\nmat2=[]\nZ=[]\nprint \"Enter the elements of matrix 1\"\nmat1=getmat() #function call\nprint \"Enter the elements of matrix 2\"\nmat2=getmat() #function call\nprint \"Addition of \\n matrix 1\",mat1,\"and \\n matrix 2\",mat2,\"is \\n\",matrixADD(mat1,mat2) #function call to add \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the elements of matrix 1\nnumber of rows, m = 3\nnumber of columns, n = 3\n('entry in row: ', 1, ' column: ', 1)\n1\n('entry in row: ', 1, ' column: ', 2)\n0\n('entry in row: ', 1, ' column: ', 3)\n-1\n('entry in row: ', 2, ' column: ', 1)\n2\n('entry in row: ', 2, ' column: ', 2)\n2\n('entry in row: ', 2, ' column: ', 3)\n-3\n('entry in row: ', 3, ' column: ', 1)\n3\n('entry in row: ', 3, ' column: ', 2)\n4\n('entry in row: ', 3, ' column: ', 3)\n0\nEnter the elements of matrix 2\nnumber of rows, m = 3\nnumber of columns, n = 3\n('entry in row: ', 1, ' column: ', 1)\n3\n('entry in row: ', 1, ' column: ', 2)\n4\n('entry in row: ', 1, ' column: ', 3)\n-1\n('entry in row: ', 2, ' column: ', 1)\n1\n('entry in row: ', 2, ' column: ', 2)\n-3\n('entry in row: ', 2, ' column: ', 3)\n0\n('entry in row: ', 3, ' column: ', 1)\n-1\n('entry in row: ', 3, ' column: ', 2)\n1\n('entry in row: ', 3, ' column: ', 3)\n2\nAddition of \n matrix 1 [[1, 0, -1], [2, 2, -3], [3, 4, 0]] and \n matrix 2 [[3, 4, -1], [1, -3, 0], [-1, 1, 2]] is \n[[4, 4, -2], [3, -1, -3], [2, 5, 2]]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 179", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "\n# Program to multiply two matrices using nested loops\n\n# 3x3 matrix\nX = [[1,0,4],\n [2,1,1],\n [3,1,0],\n [0,2,2]]\n# 3x4 matrix\nY = [[2,4],\n [1,1],\n [3,0]]\n# result is 3x4\nresult = [[0,0],\n [0,0],\n [0,0,],\n [0,0]]\n\n# iterate through rows of X\nfor i in range(len(X)):\n # iterate through columns of Y\n for j in range(len(Y[0])):\n # iterate through rows of Y\n for k in range(len(Y)):\n result[i][j] += X[i][k] * Y[k][j]\nprint \"The multiplication of the two matrices AB is\"\n\nfor r in result:\n print(r)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The multiplication of the two matrices AB is\n[14, 4]\n[8, 9]\n[7, 13]\n[8, 2]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 181", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "# Program to transpose a matrix using nested loop\n# iterate through rows\ndef mattrans(X,result):\n print \"The transpose is\"\n for i in range(len(X)):\n # iterate through columns\n for j in range(len(X[0])):\n result[j][i] = X[i][j]\n for r in result:\n print(r)\n \ndef getmat():\n row = int(input('number of rows = '))\n col = int(input('number of columns = '))\n matrix = []; columns = []\n\n for i in range(0,row):\n matrix.append([])\n for j in range(0,col):\n matrix[i].append(0)\n print ('entry in row: ',i+1,' column: ',j+1)\n matrix[i][j] = int(input())\n for c in range(col):\n for r in range(row):\n result[c][r]=0\n mattrans(matrix,result)\n \n\n\nprint \"Enter the elements of the matrix\"\ngetmat()\n#mattrans(mat1)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the elements of the matrix\nnumber of rows = 2\nnumber of columns = 3\n('entry in row: ', 1, ' column: ', 1)\n1\n('entry in row: ', 1, ' column: ', 2)\n2\n('entry in row: ', 1, ' column: ', 3)\n3\n('entry in row: ', 2, ' column: ', 1)\n4\n('entry in row: ', 2, ' column: ', 2)\n5\n('entry in row: ', 2, ' column: ', 3)\n6\nThe transpose is\n[1, 4]\n[2, 5]\n[3, 6]\n[8, 2]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "", "cell_type": "markdown", "metadata": {}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}}
\ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.ipynb index fe652a17..fe652a17 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.ipynb index fe652a17..fe652a17 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_2.ipynb new file mode 100755 index 00000000..6dd38e86 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_2.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 01: The Foundations: Logic and Proofs\n", "cell_type": "markdown", "metadata": {}}, {"source": "##Example 01:Page 02", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "print \"The following sentences are Propositions\" #Proposition should be a declarative sentence or should result in either a YES or a NO.\n\nprint \"1. Washington D.C is the capital of the United States of America\\n2. Toronto is the capital of Canada\\n3. 1+1=2.\\n4. 2+2=3.\" #Since these statements are declarative and they answer the question YES or NO they are called propositions.\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The following sentences are Propositions\n1. Washington D.C is the capital of the United States of America\n2. Toronto is the capital of Canada\n3. 1+1=2.\n4. 2+2=3.\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 02:Page 02", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "print \"1. What time is it? \\n2. Read this carefully. \\n3. x+1=2.\\n4. x+y=Z.\"\nprint\"Sentences 1 and 2 are not propositions since they are not declarative. Sentences 3 and 4 are neither true nor false and so they are not propositions.\"\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "1. What time is it? \n2. Read this carefully. \n3. x+1=2.\n4. x+y=Z.\nSentences 1 and 2 are not propositions since they are not declarative. Sentences 3 and 4 are neither true nor false and so they are not propositions.\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 03:Page 03", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "print \"Propositon p=Michael's PC runs Linux.\"\nprint \"\\n Negation of p is ~p : It is not the case that Michael's PC runs Linux.\"\nprint \"\\n Negation of p is ~p : Michae's PC does not run.\"#Negation is opposite of the truth value of the proposition expressed with \"it is not the case that\" or with \"not\".\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Propositon p=Michael's PC runs Linux.\n\n Negation of p is ~p : It is not the case that Michael's PC runs Linux.\n\n Negation of p is ~p : Michae's PC does not run.\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 04:Page 03", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "print \"Let p=Vandana's smartphone has at least 32GB of memory.\"\nprint \"The negation of p is ( ~p ) :It is not the case that Vandana's smartphone has at least 32GB of memory.\"\nprint \"Or in simple English ( ~p ): Vandana's smartphone does not have at least 32GB of memory.\"\nprint \"Or even more simple as ( ~p ): Vandana's smartphone has less than 32GB of memory.\"\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let p=Vandana's smartphone has at least 32GB of memory.\nThe negation of p is ( ~p ) :It is not the case that Vandana's smartphone has at least 32GB of memory.\nOr in simple English ( ~p ): Vandana's smartphone does not have at least 32GB of memory.\nOr even more simple as ( ~p ): Vandana's smartphone has less than 32GB of memory.\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 05:Page 04", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "p=\"Rebecca's PC has more than 16GB free hard disk space\"\nq=\"The processor in Rebecca's PC runs faster than 1GHz\"\nprint \"Let p,q be two propositions\"\nprint \"Let p=\",p,\"\\n\",\"Let q=\",q\nprint \"Conjunction of p^q is : \"+p+\" and \"+q #conjunction combines two propositons with \"and\"\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let p,q be two propositions\nLet p= Rebecca's PC has more than 16GB free hard disk space \nLet q= The processor in Rebecca's PC runs faster than 1GHz\nConjunction of p^q is : Rebecca's PC has more than 16GB free hard disk space and The processor in Rebecca's PC runs faster than 1GHz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 06:Page 05", "cell_type": "markdown", "metadata": {}}, {"execution_count": 12, "cell_type": "code", "source": "p=\"Rebecca's PC has more than 16GB free hard disk space\"\nq=\"The processor in Rebecca's PC runs faster than 1GHz\"\nprint \"Let p,q be two propositions\"\nprint \"Let p=\",p,\"\\n\",\"Let q=\",q\nprint \"Disjunction of p\\/q is : \"+p+\" or \"+q #unavailability of cup symbol. So \\/\n#Disjunction combines two propositons using OR \n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let p,q be two propositions\nLet p= Rebecca's PC has more than 16GB free hard disk space \nLet q= The processor in Rebecca's PC runs faster than 1GHz\nDisjunction of p\\/q is : Rebecca's PC has more than 16GB free hard disk space or The processor in Rebecca's PC runs faster than 1GHz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 07:Page 07", "cell_type": "markdown", "metadata": {}}, {"execution_count": 14, "cell_type": "code", "source": "p=\"Maria learns discrete mathematics\"\nq=\"Maria will find a good job\"\nprint\"Let p=\",p,\"\\n\",\"Let q=\",q\nprint\"p->q is : \"+\"If \"+p+\" then \"+q #p->q p implies q means If P then Q.\nprint\"p->q is also expressed as :\",q,\" when \",p\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let p= Maria learns discrete mathematics \nLet q= Maria will find a good job\np->q is : If Maria learns discrete mathematics then Maria will find a good job\np->q is also expressed as : Maria will find a good job when Maria learns discrete mathematics\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 01:Page 37", "cell_type": "markdown", "metadata": {}}, {"execution_count": 15, "cell_type": "code", "source": "def p(x): #Function defined to check whether the given statements are true.\n if(x>3):\n print \"p(\",x,\") which is the statement\",x,\">3, is true\"\n else:\n print \"p(\",x,\") which is the statement\",x,\">3, is false\"\np(4)#Fuction call \np(2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "p( 4 ) which is the statement 4 >3, is true\np( 2 ) which is the statement 2 >3, is false\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02:Page 38", "cell_type": "markdown", "metadata": {}}, {"execution_count": 17, "cell_type": "code", "source": "x1=\"CS1\" #Defining systems to check whether they are under attack through a function.\nx2=\"CS2\"\nx3=\"MATH1\"\ndef A(x):\n if(x==\"CS1\"): #Since cs1 and Math1 are the two computers under attack\n print \"A(\",x,\") is true.\"\n else:\n if(x==\"MATH1\"): #Since CS1 and MATH1 are the two computers under attack\n print \"A(\",x,\") is true.\"\n else:\n print\"A(\",x,\") is false.\"\nprint \"Systems under attack are CS1 and MATH1. The truth values for the same are calculated using functions.\"\nA(x1)#Function call \nA(x2)\nA(x3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Systems under attack are CS1 and MATH1. The truth values for the same are calculated using functions.\nA( CS1 ) is true.\nA( CS2 ) is false.\nA( MATH1 ) is true.\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}}
\ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.ipynb index e1c0050e..e1c0050e 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb index e1c0050e..e1c0050e 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_4.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_4.ipynb new file mode 100755 index 00000000..8b20399a --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_4.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 03: Algorithms", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 03: Page 195", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "def binarysearch(a,num): #function definition with its parameters 'a' is the inputlist\n #and 'num' number to be found\n\n first=0 #initially the first position is zero\n last=len(a)-1 #initially the last position is the total length of the inputlist-1\n found=False #boolean value to indicate if the number to be searched is found or not.\n\n while first<=last and not found:\n midpoint=(first+last)//2 #dividing the inputlist into two halves and comparing the number to be found with the midpoint.\n\n if a[midpoint]==num: #If the number to be found is equal to the midpoint returns the position.\n found=True\n else:\n if num<a[midpoint]: #if the number to be found is less than the midpoint\n #then the first half of the divided input list is taken for further computation.\n\n last=midpoint-1 #by assigning the last number of the first half(number before the midpoint) to the variable last.\n\n\n else:\n first=midpoint+1 #if the number to be found is greater than the midpoint\n #then the second half of the divided input list is taken for further computation.\n #by assigning the first number of the second half(number following the midpoint) to the variable first.\n\n return midpoint #returns the position of the number found in the list. \n\n\n\nnumlist=[1, 23, 5, 6, 7, 8, 10, 12, 13, 15, 16, 18, 19, 20, 22] #List of inputs\nprint \"Found number 19 at the position\",(binarysearch(numlist, 19)) #Printing the position of the number to be found by a function call.\n #The function binarysearch is called along with its parameters, inputlist\n #and the number to be found.\n\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Found number 19 at the position 12\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "##Example 05: Page 198", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "#To perform insertionsort\ndef sort_insertion(inputlist):\n\n for i in range(1,len(inputlist)):\n\n val_current = inputlist[i]\n pos = i \n \n # check backwards through sorted list for proper pos of val_current\n while((pos > 0) and (inputlist[pos-1] > val_current)):\n inputlist[pos] = inputlist[pos-1]\n pos = pos-1\n \n if pos != i:\n inputlist[pos] = val_current \n print(inputlist)\n return inputlist\ninputlist = [3,2,4,1,5]\nprint sort_insertion(inputlist)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "[2, 3, 4, 1, 5]\n[1, 2, 3, 4, 5]\n[1, 2, 3, 4, 5]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "", "cell_type": "markdown", "metadata": {}}, {"source": "", "cell_type": "markdown", "metadata": {}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}}
\ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.ipynb index 074d0a2b..074d0a2b 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb index 074d0a2b..074d0a2b 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_4.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_4.ipynb new file mode 100755 index 00000000..740280e5 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_4.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 03: Page 239", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "#To find the quotient and remainder \ndividend=101\ndivisor=11\nquotient=dividend/divisor #To find quotient\nremainder=dividend%divisor #To find remainder\ndividend=(divisor*quotient)+remainder\nprint \"The quotient when\",dividend,\"is divided by\",divisor,\"is\",quotient,\"=\",dividend,\"div\",divisor,\"and the remainder is\",remainder,\"=\",dividend,\"mod\",divisor\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The quotient when 101 is divided by 11 is 9 = 101 div 11 and the remainder is 2 = 101 mod 11\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 240", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "#To find the quotient and remainder\ndividend=-11\ndivisor=3\nquotient=dividend/divisor\nremainder=dividend%divisor\ndividend=(divisor*quotient)+remainder\nprint \"The quotient when\",dividend,\"is divided by\",divisor,\"is\",quotient,\"=\",dividend,\"div\",divisor,\"and the remainder is\",remainder,\"=\",dividend,\"mod\",divisor\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The quotient when -11 is divided by 3 is -4 = -11 div 3 and the remainder is 1 = -11 mod 3\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 01: Page 246", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "#To convert binary to decimal equivalent\nbinary_num= raw_input('enter a number: ')\ndecimal = 0\nfor digit in binary_num:\n decimal = decimal*2 + int(digit)\n\nprint decimal\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter a number: 101011111\n351\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 247", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "#To convert decimal to hexadecimal\ndec= raw_input('enter a number: ')\n\nprint \"The conversion of\",dec,\"to hexadeimal is\",int(dec,16)\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter a number: 2AE0B\nThe conversion of 2AE0B to hexadeimal is 175627\n"}], "metadata": {"scrolled": true, "collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 247", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "#To compute decimal to octal\nnumbers= []\ndec=input(\"Enter a number\");\nnum=dec\nwhile dec!=0:\n \n rem=dec%8\n dec=dec/8\n numbers.append(rem)\nprint \"The decimal number\",num,\"is converted to its octal equivalent : \",\nfor i in reversed(numbers):\n print i,\n \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter a number12345\nThe decimal number 12345 is converted to its octal equivalent : 3 0 0 7 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 248", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "#To convert Decimal to hexadecimal\nnum=[]\ndef ChangeHex(n): #function to convert\n if (n < 0):\n num.append(\"\")\n elif (n<=1):\n num.append(n)\n else: #for numbers greater than 9\n x =(n%16)\n if (x < 10):\n num.append(x) \n if (x == 10):\n num.append(\"A\")\n if (x == 11):\n num.append(\"B\")\n if (x == 12):\n num.append(\"C\")\n if (x == 13):\n num.append(\"D\")\n if (x == 14):\n num.append(\"E\")\n if (x == 15):\n num.append(\"F\")\n ChangeHex( n / 16 )\ndec_num=input(\"Enter the decimal number which is to be converted to hexadecimal\");\nChangeHex(dec_num)\nprint \"The hexadecimal equivalent of decimal\",dec_num,\"is\",\nfor i in reversed(num):\n print i,\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the decimal number which is to be converted to hexadecimal177130\nThe hexadecimal equivalent of decimal 177130 is 0 2 B 3 E A\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 06: Page 249", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "#Compute Decimal to Binary\narray=[]\ndef conv(n):\n if n==0:\n print ''\n else:\n array.append(str(n%2)) #to compute remainder and append it to the result\n return conv(n/2) \ndec_num=input(\"Enter a decimal number\")\nconv(dec_num)\nprint \"The binary equivalent of decimal\",dec_num,\"is\",\nfor i in reversed(array):\n print i,\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter a decimal number241\n\nThe binary equivalent of decimal 241 is 1 1 1 1 0 0 0 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 06: Page 249", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "#To compute the binary addition\ndef binAdd(bin1, bin2): #function to add two binary numbers\n if not bin1 or not bin2:#checks if both the numbers are binary\n return '' \n\n maxlen = max(len(bin1), len(bin2))\n\n bin1 = bin1.zfill(maxlen) #zfill fills with zero to fill the entire width\n bin2 = bin2.zfill(maxlen)\n\n result = ''\n carry = 0\n\n i = maxlen - 1\n while(i >= 0):\n s = int(bin1[i]) + int(bin2[i])#adding bit by bit\n if s == 2: #1+1\n if carry == 0:\n carry = 1\n result = \"%s%s\" % (result, '0')\n else:\n result = \"%s%s\" % (result, '1')\n elif s == 1: # 1+0\n if carry == 1:\n result = \"%s%s\" % (result, '0')\n else:\n result = \"%s%s\" % (result, '1')\n else: # 0+0\n if carry == 1:\n result = \"%s%s\" % (result, '1')\n carry = 0 \n else:\n result = \"%s%s\" % (result, '0') \n\n i = i - 1;\n\n if carry>0:\n result = \"%s%s\" % (result, '1')\n return result[::-1]\nbin1 = raw_input('enter the first number: ')\nbin2 = raw_input('enter the second number: ')\nprint \"The sum of binary numbers\",bin1,\"and\",bin2,\"is\",binAdd(bin1,bin2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter the first number: 1110\nenter the second number: 1011\nThe sum of binary numbers 1110 and 1011 is 11001\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02: Page 258", "cell_type": "markdown", "metadata": {}}, {"execution_count": 21, "cell_type": "code", "source": "#to find the prime factors\n\ndef prime_factors(n):\n i = 2\n factors = []\n while i * i <= n:\n if n % i: #modulp division to check of the number is prime or not\n i += 1\n else:\n n //= i\n factors.append(i) #append those numbers which readily divides the given number\n if n > 1:\n factors.append(n)\n return factors\nnumber=input(\"Enter the number for which the prime factors have to be found\");\na=prime_factors(number)\nprint a\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number for which the prime factors have to be found100\n[2, 2, 5, 5]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 258", "cell_type": "markdown", "metadata": {}}, {"execution_count": 22, "cell_type": "code", "source": "#To say if a number is prime or not\nglobals() ['count']=0\nn=input(\"Enter the number\");\nfor i in range(2,n):#number thats not divisible by other than one and itself. so from 2 to n (n-1 in python for loop)\n if n%i==0:\n count=count+1\n num=i\nif count==0:\n print n,\"is prime\" \nelse:\n print n,\"is not prime because its divisible by\",num\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number101\n101 is prime\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 259", "cell_type": "markdown", "metadata": {}}, {"execution_count": 23, "cell_type": "code", "source": "#to find the prime factors\n\ndef prime_factors(n):\n i = 2\n factors = []\n while i * i <= n:\n if n % i: #modulp division to check of the number is prime or not\n i += 1\n else:\n n //= i\n factors.append(i) #append those numbers which readily divides the given number\n if n > 1:\n factors.append(n)\n return factors\nnumber=input(\"Enter the number for which the prime factors have to be found\");\na=prime_factors(number)\nprint a\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number for which the prime factors have to be found7007\n[7, 7, 11, 13]\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 10: Page 263", "cell_type": "markdown", "metadata": {}}, {"execution_count": 24, "cell_type": "code", "source": "#To compute GCD\ndef gcd(a,b):#fuction computes gcd\n if b > a:\n return gcd(b,a)\n r = a%b\n if r == 0:\n return b\n return gcd(r,b)\nn1=input(\"Enter the first number\");\nn2=input(\"Enter the second number\");\nprint \"GCD(\",n1,\",\",n2,\") is\",gcd(n1,n2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number24\nEnter the second number36\nGCD( 24 , 36 ) is 12\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 11: Page 263", "cell_type": "markdown", "metadata": {}}, {"execution_count": 25, "cell_type": "code", "source": "#To compute GCD\ndef gcd(a,b):#fuction computes gcd\n if b > a:\n return gcd(b,a)\n r = a%b\n if r == 0:\n return b\n return gcd(r,b)\nn1=input(\"Enter the first number\");\nn2=input(\"Enter the second number\");\nprint \"GCD(\",n1,\",\",n2,\") is\",gcd(n1,n2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number17\nEnter the second number22\nGCD( 17 , 22 ) is 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 16: Page 268", "cell_type": "markdown", "metadata": {}}, {"execution_count": 26, "cell_type": "code", "source": "#to find gcd using euclidean algorithm\ndef gcd(a,b):#euclidean algithm definition\n x=a\n y=b\n while y!=0:\n r=x%y\n x=y\n y=r\n print \"gcd(\",a,\",\",b,\")is\",x\nnum1=input(\"Enter the first number\");\nnum2=input(\"Enter the second number\");\ngcd(num1,num2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number414\nEnter the second number662\ngcd( 414 , 662 )is 2\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 17: Page 270", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "#to find gcd using euclidean algorithm\ndef gcd(a,b):#euclidean algithm definition\n x=a\n y=b\n while y!=0:\n r=x%y\n x=y\n y=r\n print \"gcd(\",a,\",\",b,\")is\",x\nnum1=input(\"Enter the first number\");\nnum2=input(\"Enter the second number\");\ngcd(num1,num2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number252\nEnter the second number198\ngcd( 252 , 198 )is 18\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}}
\ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.ipynb index dd13690b..dd13690b 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb index dd13690b..dd13690b 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_4.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_4.ipynb new file mode 100755 index 00000000..2d1d9fff --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_4.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 01: Page 346", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "#to compute the recursive functions\ndef f(n):\n\n if n==0:\n return 3\n else:\n n=n-1\n result=2*f(n)+3 #recursive call\n return result\nfor num in range(1,5):\n r=f(num)\n print \"The value of f(\",num,\") is\",r #Prints the result for individual instance\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The value of f( 1 ) is 9\nThe value of f( 2 ) is 21\nThe value of f( 3 ) is 45\nThe value of f( 4 ) is 93\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 01: Page 361", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "#To compute the factorial of a given number using recursion\ndef factorial(n):\n if n==0:\n return 1\n else:\n return n*factorial(n-1) #recursive function call\nnum=input(\"Enter a number whose factorial is to be found\");\nprint \"The factorial of\",num,\"is\",factorial(num);\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter a number whose factorial is to be found4\nThe factorial of 4 is 24\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02: Page 361", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "#To compute power using recursive algorithm\ndef power(a,n):\n if n==0:\n return 1\n else:\n return a*power(a,n-1) #recursive call algorithm\nnum=input(\"Enter the number\");\np=input(\"Enter the power\");\nprint \"The value of\",num,\"to the power\",p,\"is\",power(num,p);\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number5\nEnter the power4\nThe value of 5 to the power 4 is 625\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 362", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "#To compute gcd using modular recursion\ndef gcd(a,b):\n if a==0:\n return b\n else:\n return gcd(b%a,a) #recursive call\n\nnum1=input(\"Enter the first number\")\nnum2=input(\"Enter the second number\")\nprint \"The gcd of\",num1,\",\",num2,\"is\",gcd(num1,num2)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the first number5\nEnter the second number8\nThe gcd of 5 , 8 is 1\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 362", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "#To compute mpower function using recursion\ndef mpower(b,n,m):\n if n==0:\n return 1\n else:\n if n%2==0:\n return ((mpower(b,n/2,m))**2) % m #recursive call\n else:\n return ((mpower(b,n/2,m)**2)%m*(b%m))%m #recursive call\nnumber=input(\"Enter the number\")\npower=input(\"Enter the power\")\nmodulo=input(\"Enter the modulo number\");\nprint \"The answer of mpower(\",number,\",\",power,\",\",modulo,\") is\",mpower(number,power,modulo)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number2\nEnter the power5\nEnter the modulo number3\nThe answer of mpower( 2 , 5 , 3 ) is 2\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 09: Page 367", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "def msort2(x): #function for merge sort\n if len(x) < 2:\n return x\n result = [] \n mid = int(len(x)/2) #divides the elements into halves\n y = msort2(x[:mid])\n z = msort2(x[mid:])\n while (len(y) > 0) and (len(z) > 0):\n if y[0] > z[0]:\n result.append(z[0]) #merges to append the elements\n z.pop(0)\n else:\n result.append(y[0])\n y.pop(0)\n result += y\n result += z\n return result\nl=[]\nr=[]\nl=raw_input(\"enter the numbers to be merge sorted\").split(\",\")\nr=msort2(l)\nprint \"Ther Merge sort is\", r\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "enter the numbers to be merge sorted8,2,4,6,9,7,10,1,5,3\nTher Merge sort is ['1', '10', '2', '3', '4', '5', '6', '7', '8', '9']\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}}
\ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.ipynb index 485e6b32..485e6b32 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.ipynb index 485e6b32..485e6b32 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.ipynb diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_2.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_2.ipynb new file mode 100755 index 00000000..72118ab0 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_2.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 01: Page 386", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "n=2 #number of employees\nr=12 #number of office rooms\nways_alloc_sanchez=12\nways_alloc_patel=11\n\n#By PRODUCT RULE\nprint \"Total ways to assign offices to these employees is\",ways_alloc_sanchez*ways_alloc_patel\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Total ways to assign offices to these employees is 132\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 02: Page 386", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "alphabets=26 #Total number of alphabets\nposint=100 #Total positive numbers not beyond 100\n\n#number of chairs to be labelled with a alphabet and an integer using product rule\nprint \"Total number of chairs that can be labelled with an alphabet and an integer is\",alphabets*posint\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Total number of chairs that can be labelled with an alphabet and an integer is 2600\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 03: Page 386", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "mc=32 #total number of microcomputers\nport=24 #total number of ports in each microcomputer\n\n#total number of different ports to a microcomputer in the center are found using product rule\n\nprint \"total number of ports\",mc*port\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "total number of ports 768\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 386", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "bits=2 #possible bits either 0 or 1\nns=7 #number of bits in the string (ie). length of the string\n # 7 bits are capable of taking either 0 or 1 so by PRODUCT RULE\nprint \"Total different bit strings of lenth seven are\",bits**ns\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Total different bit strings of lenth seven are 128\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 387", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "letters=26 #number of letters in english alphabet\nno_of_letters=3 #number of letters \nchoices=10 #number of choices for each letter\nresult=1#in order to avoid junk values. Assigned it to 1.\nfor i in range(0,no_of_letters):\n result=result*letters*choices\nprint \"The total number of choices are\",result", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The total number of choices are 17576000\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 01: Page 407", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "def permutation(n,r): #function definition\n \n i=n\n result=1\n for i in range((n-r)+1,n+1): #computing the permutation\n result=result*i\n \n return result\n\nprint \"The number of ways to select 3 students from a group of 5 students to line up for a picture is \",permutation(5,3) #function call\nprint \"The number of ways to select 5 students from a group of 5 students to line up for a picture is \",permutation(5,5) #function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The number of ways to select 3 students from a group of 5 students to line up for a picture is 60\nThe number of ways to select 5 students from a group of 5 students to line up for a picture is 120\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 04: Page 409", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "def permutation(n,r): #function definition\n \n i=n\n result=1\n for i in range((n-r)+1,n+1): #permutation computation\n result=result*i\n return result\nnum=input(\"Enter the number of people\")\nperm=input(\"Enter the prizes\")\nprint \"The number of ways to decide the prize winners is\",permutation(num,perm) #function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of people100\nEnter the prizes3\nThe number of ways to decide the prize winners is 970200\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 05: Page 409", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "def permutation(n,r):\n \n i=n\n result=1\n for i in range((n-r)+1,n+1):\n result=result*i\n \n return result\nnum=input(\"Enter the number of runners\")\nperm=input(\"Enter the number of prizes\")\nprint \"The number of ways to decide the prize winners is\",permutation(num,perm)\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of runners8\nEnter the number of prizes3\nThe number of ways to decide the prize winners is 336\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 06: Page 409", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "def calc(n):\n \n i=n\n result=1\n for i in range(1,n): #find the number of ways to decide the path. since the first city us decided. The for loop is from 1 to n\n result=result*i\n \n return result\nnum=input(\"Enter the number of cities\") \nprint \"The number of possible ways to decide the path is\",calc(num)\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of cities8\nThe number of possible ways to decide the path is 5040\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 10: Page 410", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "def combination(n,r): #combination function\n i=n\n numerator=1\n denominator=1\n for i in range((n-r)+1,n+1):#computes the value of the numerator \n numerator=numerator*i\n for j in range (1,r+1): #computes the value of the denominator\n denominator=denominator*j\n result=numerator/denominator #computes result\n return result\nnum=input(\"Enter the number of elements\")\ncomb=input(\"Enter the combinations\")\nprint \"The number of combinations are \",combination(num,comb)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of elements4\nEnter the combinations2\nThe number of combinations are 6\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 12: Page 412", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "def combination(n,r): #function definition for combination\n i=n\n numerator=1\n denominator=1\n for i in range((n-r)+1,n+1):\n numerator=numerator*i\n for j in range (1,r+1):\n denominator=denominator*j\n result=numerator/denominator\n return result\nnum=input(\"Enter the number of members in a team\")\ncomb=input(\"Enter the number of players\")\nprint \"The number of combinations are \",combination(num,comb) #function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the number of members in a team10\nEnter the number of players5\nThe number of combinations are 252\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 13: Page 412", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "def combination(n,r): #function definition\n i=n\n numerator=1\n denominator=1\n for i in range((n-r)+1,n+1):\n numerator=numerator*i\n for j in range (1,r+1):\n denominator=denominator*j\n result=numerator/denominator\n return result\nnum=input(\"Enter the total number of astronauts\")\ncomb=input(\"Enter the number of astronauts to be selected \")\nprint \"The total number of combinations of selected astronauts to Mars are \",combination(num,comb) #function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the total number of astronauts30\nEnter the number of astronauts to be selected 6\nThe total number of combinations of selected astronauts to Mars are 593775\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 15: Page 413", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "def combination(n,r): #Function definition\n i=n\n numerator=1\n denominator=1\n for i in range((n-r)+1,n+1): #computation of the numerator\n numerator=numerator*i\n for j in range (1,r+1): #computation of the denominator\n denominator=denominator*j\n result=numerator/denominator\n return result\nnum1=input(\"Enter the total number of faculty in computer science department\")\ncomb1=input(\"Enter the number of faculty to be selected for computer science department\")\nnum2=input(\"Enter the total number of faculty in maths department\")\ncomb2=input(\"Enter the number of faculty to be selected for maths department\")\n\nprint \"The total number of combinations of selected faculties are \",combination(num1,comb1)*combination(num2,comb2) #Function call\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Enter the total number of faculty in computer science department9\nEnter the number of faculty to be selected for computer science department3\nEnter the total number of faculty in maths department11\nEnter the number of faculty to be selected for maths department4\nThe total number of combinations of selected faculties are 27720\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.9", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}}
\ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png Binary files differindex 9f76c123..9f76c123 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.png Binary files differindex 9f76c123..9f76c123 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.png +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_2.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_2.png Binary files differnew file mode 100755 index 00000000..c053a934 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_2.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png Binary files differindex 6d747624..6d747624 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.png Binary files differindex 6d747624..6d747624 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.png +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_2.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_2.png Binary files differnew file mode 100755 index 00000000..06018c4c --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_2.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.png Binary files differindex c5cb06bb..c5cb06bb 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.png +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5_1.png b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5_1.png Binary files differnew file mode 100755 index 00000000..88593253 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5_1.png diff --git a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb index 14960493..14960493 100644..100755 --- a/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb index 1bf81061..1bf81061 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb index 1bf81061..1bf81061 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb index 1bf81061..1bf81061 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb index 1bf81061..1bf81061 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb index 1bf81061..1bf81061 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb index 51ab5318..51ab5318 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb index 51ab5318..51ab5318 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb index 7a93f17f..7a93f17f 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb index 7a93f17f..7a93f17f 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb index 7a93f17f..7a93f17f 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb index 8b0abd3c..8b0abd3c 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb index 1cfc005c..1cfc005c 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb index 8b0abd3c..8b0abd3c 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb index 8b0abd3c..8b0abd3c 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb index 8b0abd3c..8b0abd3c 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb index 64f5bc0b..64f5bc0b 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb index 64f5bc0b..64f5bc0b 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb index 740a15e5..740a15e5 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb index 740a15e5..740a15e5 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb index 740a15e5..740a15e5 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb index a26aa20d..a26aa20d 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb index a26aa20d..a26aa20d 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb index b5443c89..b5443c89 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb index b5443c89..b5443c89 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb index b5443c89..b5443c89 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb index 4625b5fe..4625b5fe 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb index 4625b5fe..4625b5fe 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb index 87d00465..87d00465 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb index 87d00465..87d00465 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb index 87d00465..87d00465 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb index e7b833fc..e7b833fc 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb index e7b833fc..e7b833fc 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb index 50f98373..50f98373 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb index 50f98373..50f98373 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb index 50f98373..50f98373 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb index 9f8fe79f..9f8fe79f 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb index e716836b..e716836b 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb index 0348a194..0348a194 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb index 0348a194..0348a194 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb index 0348a194..0348a194 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb index d31fdb5a..d31fdb5a 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb index d31fdb5a..d31fdb5a 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb index f08902b6..f08902b6 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb index f08902b6..f08902b6 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb index f08902b6..f08902b6 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb index 62ec71d4..62ec71d4 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb index 62ec71d4..62ec71d4 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb index 62ec71d4..62ec71d4 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb index 62ec71d4..62ec71d4 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb index 62ec71d4..62ec71d4 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt index 34ae49a2..34ae49a2 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png Binary files differindex 106927af..106927af 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png Binary files differindex 106927af..106927af 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png Binary files differindex 106927af..106927af 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png Binary files differindex 523adeb5..523adeb5 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png Binary files differindex 523adeb5..523adeb5 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png Binary files differindex 523adeb5..523adeb5 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png Binary files differindex ab9b0bc1..ab9b0bc1 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png Binary files differindex ab9b0bc1..ab9b0bc1 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png Binary files differindex ab9b0bc1..ab9b0bc1 100644..100755 --- a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png diff --git a/ELECTRIC_MACHINERY/chapter8.ipynb b/ELECTRIC_MACHINERY/chapter8.ipynb deleted file mode 100755 index d938905f..00000000 --- a/ELECTRIC_MACHINERY/chapter8.ipynb +++ /dev/null @@ -1,392 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c0cec23fbe397fb7ebb6d2fd4aa3f54866d7506eaba8e21d17c10d01c93413cd" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8: Variable-Reluctance Machines and Stepping Motors" - ] - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.1, Page number: 411" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from numpy import *\n", - "from math import *\n", - "from matplotlib import *\n", - "from pylab import *\n", - "\n", - "#Variable declaration:\n", - "R=0.038 #m\n", - "a=b=pi/3 #rad\n", - "g=2.54*10**-4 #m\n", - "D=0.13 #m\n", - "N=100 #turns in both poles\n", - "uo=4*pi*10**-7 #permeability of free space()\n", - "i1=5 #coil current (A)\n", - "\n", - "\n", - "#Calculation:\n", - "Lm=N**2*uo*a*R*D/(2*g)\n", - "#x=symbols('x')\n", - "subplot(2,1,1)\n", - "x=linspace(-180,-120,100)\n", - "L=-(Lm/60)*x-2*Lm\n", - "plot(x,L,'b')\n", - "#grid()\n", - "\n", - "x=linspace(-60,0,100)\n", - "L=(Lm/60)*x+Lm\n", - "plot(x,L,'b')\n", - "grid()\n", - "\n", - "x=linspace(0,60,100)\n", - "L=-(Lm/60)*x+Lm\n", - "plot(x,L,'b')\n", - "grid()\n", - "\n", - "\n", - "x=linspace(120,180,100)\n", - "L=(Lm/60)*x-2*Lm\n", - "plot(x,L)\n", - "annotate('Lm=0.128 H',xy=(-150,0.10))\n", - "annotate('Lmax',xy=(0,Lm+0.005))\n", - "ylabel('L11(theta)')\n", - "xlabel('theta')\n", - "grid()\n", - "\n", - "#part(b)\n", - "subplot(2,1,2)\n", - "x1=linspace(-180,-120,100)\n", - "x2=linspace(-150,-90,100)\n", - "i1=5\n", - "i2=4\n", - "Tm1=(Lm/(2*pi/3))*i1**2\n", - "Tm2=(Lm/(2*pi/3))*i2**2\n", - "dll=np.ones(100)\n", - "plot(x1,-Tm1*np.array(dll),'g')\n", - "plot(x2,Tm2*np.array(dll),'b--')\n", - "\n", - "x1=linspace(-60,0,100)\n", - "x2=linspace(-90,-30,100)\n", - "Tm1=(Lm/(2*pi/3))*i1**2\n", - "Tm2=(Lm/(2*pi/3))*i2**2\n", - "dll=np.ones(100)\n", - "plot(x1,Tm1*np.array(dll),'g')\n", - "plot(x2,-Tm2*np.array(dll),'b--')\n", - "\n", - "x1=linspace(0,60,100)\n", - "x2=linspace(30,90,100)\n", - "Tm1=(Lm/(2*pi/3))*i1**2\n", - "Tm2=(Lm/(2*pi/3))*i2**2\n", - "dll=np.ones(100)\n", - "plot(x1,-Tm1*np.array(dll),'g')\n", - "plot(x2,Tm2*np.array(dll),'b--')\n", - "\n", - "x1=linspace(120,180,100)\n", - "x2=linspace(90,150,100)\n", - "Tm1=(Lm/(2*pi/3))*i1**2\n", - "Tm2=(Lm/(2*pi/3))*i2**2\n", - "dll=np.ones(100)\n", - "plot(x1,Tm1*np.array(dll),'g')\n", - "plot(x2,-Tm2*np.array(dll),'b--')\n", - "grid()\n", - "ylim(-3,3)\n", - "annotate('___ i1=I1, i2=0', xy=(110,2.6))\n", - "annotate('---- i1=0, i2=I2', xy=(110,2.2))\n", - "ylabel('Torque [N.m]')\n", - "xlabel('thetam [degrees]')\n", - "\n", - "#Results:\n", - "print \"Lm =\",Lm,\"H\"\n", - "print \"(c)The peak torque =\",round(Tm1,2),\"N.m\"\n", - "print \"\\t(i) The net torque, (at thetam=0) =\", 0, \"N.m\"\n", - "print \"\\t(ii) The net torque, (at thetam=45 deg.) =\", 0, \"N.m\"\n", - "print \"\\t(iii)The net torque, (at thetam=75 deg) =\", round(Tm1,2), \"N.m\"\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Lm = 0.127968099059 H\n", - "(c)The peak torque = 1.53 N.m\n", - "\t(i) The net torque, (at thetam=0) = 0 N.m\n", - "\t(ii) The net torque, (at thetam=45 deg.) = 0 N.m\n", - "\t(iii)The net torque, (at thetam=75 deg) = 1.53 N.m\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEMCAYAAADTfFGvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdcFEf/xz9H0ygqaqQI6CkgvSNoYsEoEVBRo4maqGAw\n4adBY2KPSezE+qiRWGJUsJtoVDSALZ5dkGYBVFTuERCMBQzYgLv5/bGez4mUO27vdhfn/XrtK5kt\ns29nF4ad8h0RIQQUCoVCoaiKHtcCFAqFQhEWtOKgUCgUilrQioNCoVAoakErDgqFQqGoBa04KBQK\nhaIWtOKgUCgUilpoteJITEwMdHBwuGZnZ5ezePHi6VWPX7t2zaFr167nGzdu/Hz58uWTqx6XyWT6\nnp6e6QMGDDioTU8KhUKhqI7WKg6ZTKYfGRkZnZiYGJiVleW0c+fOEdnZ2Y7K57Ru3frh6tWrJ0yZ\nMmVZdXmsWrXqaycnpyyRSEQnm1AEhbGxcRnXDhSKttBaxZGcnOxra2t7UywWSw0NDSuGDx++68CB\nAwOVz2nTps19Hx+fFENDw4qq1+fn51vFx8cHjx079jdCiEhbnhSKNqB/7FAaMgbayrigoMDS2to6\nT5G2srLKT0pK8lP1+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S3NWVxcfMlgMDTGxMTM9fb2\nvnHs2LEvFArFQFJS0oRGo7EtN+5/WadCKpX+SdM0TVFU38aNGx9zj5UAAMxms8loNNarVCoHwzBR\nWVlZ3Q0NDWVVVVXVhYWF316+fLmIoqi+pKSkCa7QhY+fk5Pzs8vlklMU1QewWAybm5sPy+Vy1+nT\npz/S6XQWlmX5QqFwoaGhoSw6Ojpw9OjRr1iW5QMAnDt3rjKSa0FoKQw5RGiVPM2M6J8Eg8GXBAJB\nSCAQhPr6+iij0Vi/1rMDmqZpsVg8U15e/slajoOeL/ioCqFVEhcXN73SC4BPw+12y/bs2fNrZmbm\n3ePHj9dyy7uulYqKiporV668JxKJZtdyHPT8wRkHQgihiOCMAyGEUESwcCCEEIoIFg6EEEIRwcKB\nEEIoIlg4EEIIRQQLB0IIoYj8DRLhonoh4yhPAAAAAElFTkSuQmCC\n", - "text": [ - "<matplotlib.figure.Figure at 0x2cad490>" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.3, Page number: 424" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", - "from sympy import *\n", - "from math import *\n", - "from matplotlib.pyplot import *\n", - "\n", - "#Variable declaration:\n", - "n1=4000 #r/min\n", - "R=0.038 #m\n", - "a=b=pi/3 #rad\n", - "g=2.54*10**-4 #m\n", - "D=0.13 #m\n", - "N=100 #turns in both poles\n", - "uo=4*pi*10**-7 #permeability of free space(H/m)\n", - "Ll=0.005 #H\n", - "Vo=100 #phase voltage applied to phase 1.(V)\n", - "\n", - "\n", - "#Calculation:\n", - "wm=n1*pi/30\n", - "Lm=N**2*uo*a*R*D/(2*g)\n", - "thetam=symbols('thetam')\n", - "t=symbols('t')\n", - "#for part (a):\n", - "#for -60<=thetam<=0deg,\n", - "L11=Ll+(Lm/(pi/3))*(thetam+pi/3)\n", - "L111=diff(L11,thetam)\n", - "R1=L111*wm\n", - "#which is nuch greater than resistance R=1.5 ohm\n", - "thetam=-pi/3+wm*t\n", - "i1=Vo*t/(float(round(Ll,3))+float(Lm/(pi/3))*thetam+float(Lm/(pi/3))*pi/3)\n", - "\n", - "#for part (b):\n", - "V2=-200 #applied voltage(V)\n", - "thetam2=symbols('thetam2')\n", - "L12=Ll+(Lm/(pi/3))*(pi/3-thetam2)\n", - "L112=diff(L12,thetam2)\n", - "to=2.5*10**-3 #ms\n", - "thetam2=float(-pi/3+wm*to)\n", - "i1=Vo*t/(float(round(Ll,3))+float(Lm/(pi/3))*thetam+float(Lm/(pi/3))*pi/3)\n", - "i2=(0.25-200*(t-to))/(0.005+51.1*(5*10**-3-t))\n", - "\n", - "\n", - "#Results:\n", - "print \"i1 =\",i1,\"\\t, (where round(16.2934044186179*pi,2) = 51.1 )\"\n", - "print \"\\ni2 =\",i2,\"\\n\"\n", - "\n", - "\n", - "#Calculations & Results:\n", - "#for part (c):\n", - "Lleak=0.005\n", - "Posintegral=0\n", - "integral=0\n", - "N1=500\n", - "tmax=3.75*10**-3\n", - "t=[0]*503\n", - "thet=[0]*503\n", - "Torque=[0]*503\n", - "deltat = tmax/N1\n", - "thetm=[0]*503\n", - "i=[0]*503\n", - "for n in range(1,N1+2,1):\n", - " t[n-1]=tmax*(n-1)/N1\n", - " thetm[n-1]=-(pi/3)+(400*pi/3)*t[n-1]\n", - " if (thetm[n-1]<=0):\n", - " i[n-1]=100*t[n-1]/(0.005+51.1*t[n-1])\n", - " dld1d1theta = 0.122\n", - " Torque[n-1]=0.5*i[n-1]**2*dld1d1theta\n", - " Posintegral=Posintegral+Torque[n-1]*deltat\n", - " integral=Posintegral\n", - " else:\n", - " i[n-1]=(0.25-200*(t[n-1]-2.5*10**-3))/(0.005+51.1*(5*10**-3-t[n-1]))\n", - " dld11dtheta = -0.122\n", - " Torque[n-1] = 0.5*i[n-1]**2*dld11dtheta\n", - " integral = integral + Torque[n-1]*deltat\n", - "\n", - "print \"\\nPositve torque integral =\",Posintegral, \"[N-m-sec]\"\n", - "print \"\\nTorque integral=\",integral,\"[N-m-sec]\\n\"\n", - "\n", - "plot(1000*np.array(t),i)\n", - "xlabel('time [msec]')\n", - "ylabel('Phase current [A]')\n", - "title('(a) phase-1 current profile')\n", - "grid()\n", - "show()\n", - "plot(1000*np.array(t),Torque)\n", - "xlabel('time [msec]')\n", - "ylabel('Torque [N-m]')\n", - "title('(b) torque profile')\n", - "grid()\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "i1 = 100*t/(51.1872396234976*t + 0.005) \t, (where round(16.2934044186179*pi,2) = 51.1 )\n", - "\n", - "i2 = (-200*t + 0.75)/(-51.1*t + 0.2605) \n", - "\n", - "\n", - "Positve torque integral = 0.000456384094483 [N-m-sec]\n", - "\n", - "Torque integral= 0.000335463884625 [N-m-sec]\n", - "\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEXCAYAAACpuuMDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYFdX/B/D3ZRHZNwWVRSw0AdkU9wXMFQTErbRwyxTt\nq5hLaS6JuZSllmYZmrlRWi4lKuLKxRVRBMXcUEEBEUF2UNb5/TG/W2gsF5i5MwOf1/PMwx3u3Jk3\np5xz55wzZ2QMw4AQQghRUBM6ACGEEHGhioEQQsgrqGIghBDyCqoYCCGEvIIqBkIIIa+gioEQQsgr\nqGIg//jss8++3LBhw2xlth09evT+8PDwofU91qRJk3YsXbp0RX0/T4R14cKF3u3bt08wMDDIO3To\n0HAvL6+w3bt3jweAHTt2TOrbt+85oTOS+qOKgQAAMjIyWu7evXv89OnTf1Jm+wULFqxZsmTJyvoe\nTyaTMTKZTNCbaJ4+fdrK19c31MLCIlVNTa3i8ePH1kLmqS+5XO5hZWWVrMpjfv75518EBgZuzMvL\nMxg+fPihsLAwr/Hjx+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CXV3dQiMjoxwfH5/DAODo6Bh/48YNp8LCQt2LFy/2qtwvUVJS0qy248pk\nMsbT0/OYurp6eadOnW5WVFSoDRky5Lhi30lJSTbe3t5Hmjdv/nLKlCnbvL29j3h7ex8BgFOnTg28\nffu2nWJf+fn5+oWFhbqnT58e8Pvvv7+r+L2RkVFO3UuEkPqjioE0CVpaWsWK12pqahWKdTU1tYqy\nsjKNiooKNWNj4+zY2FjXuu67WbNmJYp9aWpqllY+TllZmYa6unp5dHR0t9OnTw/Yv3//6E2bNs08\nffr0AIZhZJcvX+6u+HxltVV0hPCJ+hhIo6Cvr5+fn5+vX9fPKU7A+vr6+e3atUvcv3//aMXvb9y4\n4cRFtsLCQt2cnBwjT0/PY+vXr597/fp1ZwAYPHjwiY0bNwYqtlP8ftCgQSd/+OGH/yl+n5OTY8RF\nDkKURRUDaRRMTU2f9+7d+4Kjo2P8ggUL1shkMkYxeqfya8V65deK9V9//fX9bdu2TXFxcYnr1KnT\nzdDQUF9ljl3dvhXr+fn5+j4+PoednZ2v9+3b99y33347BwA2btwYePXqVTdnZ+frDg4OfytmxFyy\nZMnK7OxsY0dHx3gXF5e4qh5kQwifaHZVQupg+fLly/T09ArmzZu3Tojj9+/fP2LdunXzOnfufE2I\n45Omga4YCKkDPT29gi1btkwT6ga3xMTEdpX7MQjhA10xEEIIeQVdMRBCCHkFVQyEEEJeQRUDIYSQ\nV1DFQAgh5BVUMRBCCHnF/wGN24SgosJe8AAAAABJRU5ErkJggg==\n", - "text": [ - "<matplotlib.figure.Figure at 0x3e4b1d0>" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEXCAYAAABRWhj0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcFPX/B/DXIiAKGKCICOiieODFigqZX3NREfEguzy+\nqWB4ZZaapliaVlpommmaV2ao5ZGm4kUqsmoe4IWa4oWs3IQCBig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nGWm/1qxrv9as//TT\nT29t2rQpUiaTJXfq1OmP2NjYMEOOrW/fmvXi4mLHoUOHHvDz87vau3fv0ytWrJgBAKtWrXr/4sWL\n3f38/K527NjxhubupPPmzVtUWFjo3Llz5+symSxZ10OKCDEXusstIRz69NNPFzg4OJTMnDlzOR/H\nDwoKSli+fPlMf3//y3wcn9R+NNIghEMODg4lGzZsmMjXxX1paWne2nUTQrhGIw1CCCEGo5EGIYQQ\ng1GnQQghxGDUaRBCCDEYdRqEEEIMRp0GIYQQg/0f5kV5JRSR0IsAAAAASUVORK5CYII=\n", - "text": [ - "<matplotlib.figure.Figure at 0x3a66fd0>" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 3, - "metadata": {}, - "source": [ - "Example 8.4, Page number: 433" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "from __future__ import division\n", - "%matplotlib inline\n", -<<<<<<< HEAD - "from matplotlib.pyplot import *\n", -======= ->>>>>>> 0ee873700378b995b441b1be6652178f741aea5b - "\n", - "#Variavle declaration:\n", - "rpm=2500 #rpm of motor\n", - "\n", - "\n", - "#Calculations & Results:\n", - "#For part (a):\n", - "theta=[0]*12\n", - "i=[0]*102\n", - "lambda1=[0]*102\n", - "for m in range(1,11,1):\n", - " theta[m-1]=10*(m-1)\n", - " for n in range(1,102,1):\n", - " i[n-1]=30*(n-1)/100\n", - " lambda1[n-1]=i[n-1]*(0.005+0.09*((90-theta[m-1])/90))*(8/(i[n-1]+8))\n", - "\n", - " \n", - " plot(i,lambda1,'.')\n", - " \n", - " if m==1:\n", - " hold(True)\n", - " \n", - "xlabel('current [A]')\n", - "ylabel('Lambda [Wb]')\n", - "title('Family of lambda-i curves as theta_m varies from 0 to 90 degrees') \n", - "annotate('theta_m=0 deg',xy=(6,0.03))\n", - "annotate('theta_m=0 deg',xy=(8,0.5))\n", - "\n", - "\n", - "#for part (b):\n", - "lambdamax=25*(0.005+0.09*(8/(25+8)))\n", - "AreaWnet=0\n", - "AreaWrec=0\n", - "deli=0.25\n", - "for n in range(1,102,1):\n", - " i[n-1]=25*(n-1)/100\n", - " AreaWnet=AreaWnet + deli*i[n-1]*(0.09)*(8/(i[n-1]+8))\n", - " AreaWrec=AreaWrec + deli*(lambdamax-i[n-1]*(0.005+0.09*(8/(i[n-1]+8))))\n", - "\n", - "Ratio=(AreaWnet+AreaWrec)/AreaWnet\n", - "print \"part (b): Ratio =\", round(Ratio,2)\n", - "\n", - "#for part(b):\n", - "rps=rpm/60\n", - "T=1/rps\n", - "Pphase=2*AreaWnet/T\n", - "Ptot=2*Pphase\n", - "print \"part (c): AreaWnet =\", round(AreaWnet,2),\"Joules\"\n", - "print \"Pphase =\",round(Pphase),\"W\",\"\\tPtot =\",round(Ptot),\"W\\n\"\n", - "plot(AreaWrec=0.7,AreaWnet=25)\n", - "grid()\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part (b): Ratio = 1.55\n", - "part (c): AreaWnet = 9.91 Joules\n", - "Pphase = 825.0 W \tPtot = 1651.0 W\n", - "\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAZ4AAAEXCAYAAACdwyIfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXlYE9f6x98EUEEiYQkiyKKiEVChKi5YC221LShi9cYF\nFa1LvPXa1tat3i7a+mtdqrW7V7xtUTGiVquixQVLrBUBN/AiFRQNIkpBCUskQgjz+yNOGIbMZAhZ\nJuF8nicPM2Rmck5m+eZdzns4GIYBAoFAIBDmgmvpBiAQCASic4GEB4FAIBBmBQkPAoFAIMwKEh4E\nAoFAmBUkPAgEAoEwK0h4EAgEAmFWWCU8PB6vTiaTBQAAzJs3L+mjjz5ab+zPuHDhwpj+/fvf4vF4\ndceOHZtEfj8gIEB29uzZl439uVKpNMrX17eU6fZJSUnzxo4de96Qz7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Vf+H9cerrCEYUsuAAAAAElFTkSuQmCC\n", - "text": [ - "<matplotlib.figure.Figure at 0x315dc10>" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter10-checkpoint.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter10-checkpoint.ipynb index de5013c9..de5013c9 100755 --- a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter10-checkpoint.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter10-checkpoint.ipynb diff --git a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter3-checkpoint.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter3-checkpoint.ipynb index 22fca9a1..22fca9a1 100755 --- a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter3-checkpoint.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter3-checkpoint.ipynb diff --git a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter5-checkpoint.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter5-checkpoint.ipynb index 3f99f735..3f99f735 100755 --- a/ELECTRIC_MACHINERY/.ipynb_checkpoints/chapter5-checkpoint.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/.ipynb_checkpoints/chapter5-checkpoint.ipynb diff --git a/ELECTRIC_MACHINERY/README.txt b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/README.txt index 4b574a6d..4b574a6d 100755 --- a/ELECTRIC_MACHINERY/README.txt +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/README.txt diff --git a/ELECTRIC_MACHINERY/chapter1.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter1.ipynb index 3eaa70a1..3eaa70a1 100755 --- a/ELECTRIC_MACHINERY/chapter1.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter1.ipynb diff --git a/ELECTRIC_MACHINERY/chapter10.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter10.ipynb index 2bcd2ccb..2bcd2ccb 100755 --- a/ELECTRIC_MACHINERY/chapter10.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter10.ipynb diff --git a/ELECTRIC_MACHINERY/chapter11.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter11.ipynb index 308afbf5..308afbf5 100755 --- a/ELECTRIC_MACHINERY/chapter11.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter11.ipynb diff --git a/ELECTRIC_MACHINERY/chapter2.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter2.ipynb index 855c3bd6..855c3bd6 100755 --- a/ELECTRIC_MACHINERY/chapter2.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter2.ipynb diff --git a/ELECTRIC_MACHINERY/chapter3.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter3.ipynb index 411be995..411be995 100755 --- a/ELECTRIC_MACHINERY/chapter3.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter3.ipynb diff --git a/ELECTRIC_MACHINERY/chapter4.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter4.ipynb index aef0df05..aef0df05 100755 --- a/ELECTRIC_MACHINERY/chapter4.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter4.ipynb diff --git a/ELECTRIC_MACHINERY/chapter5.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter5.ipynb index e0897bf4..e0897bf4 100755 --- a/ELECTRIC_MACHINERY/chapter5.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter5.ipynb diff --git a/ELECTRIC_MACHINERY/chapter6.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter6.ipynb index 1e8c7e97..1e8c7e97 100755 --- a/ELECTRIC_MACHINERY/chapter6.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter6.ipynb diff --git a/ELECTRIC_MACHINERY/chapter7.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter7.ipynb index c5e8eebf..c5e8eebf 100755 --- a/ELECTRIC_MACHINERY/chapter7.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter7.ipynb diff --git a/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter8.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter8.ipynb new file mode 100755 index 00000000..785bba7e --- /dev/null +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter8.ipynb @@ -0,0 +1,427 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Variable-Reluctance Machines and Stepping Motors" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.1, Page number: 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from numpy import *\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "R=0.038 #m\n", + "a=b=pi/3 #rad\n", + "g=2.54*10**-4 #m\n", + "D=0.13 #m\n", + "N=100 #turns in both poles\n", + "uo=4*pi*10**-7 #permeability of free space()\n", + "i1=5 #coil current (A)\n", + "\n", + "\n", + "#Calculation:\n", + "Lm=N**2*uo*a*R*D/(2*g)\n", + "#x=symbols('x')\n", + "subplot(2,1,1)\n", + "x=linspace(-180,-120,100)\n", + "L=-(Lm/60)*x-2*Lm\n", + "plot(x,L,'b')\n", + "#grid()\n", + "\n", + "x=linspace(-60,0,100)\n", + "L=(Lm/60)*x+Lm\n", + "plot(x,L,'b')\n", + "grid()\n", + "\n", + "x=linspace(0,60,100)\n", + "L=-(Lm/60)*x+Lm\n", + "plot(x,L,'b')\n", + "grid()\n", + "\n", + "\n", + "x=linspace(120,180,100)\n", + "L=(Lm/60)*x-2*Lm\n", + "plot(x,L)\n", + "annotate('Lm=0.128 H',xy=(-150,0.10))\n", + "annotate('Lmax',xy=(0,Lm+0.005))\n", + "ylabel('L11(theta)')\n", + "xlabel('theta')\n", + "grid()\n", + "\n", + "#part(b)\n", + "subplot(2,1,2)\n", + "x1=linspace(-180,-120,100)\n", + "x2=linspace(-150,-90,100)\n", + "i1=5\n", + "i2=4\n", + "Tm1=(Lm/(2*pi/3))*i1**2\n", + "Tm2=(Lm/(2*pi/3))*i2**2\n", + "dll=np.ones(100)\n", + "plot(x1,-Tm1*np.array(dll),'g')\n", + "plot(x2,Tm2*np.array(dll),'b--')\n", + "\n", + "x1=linspace(-60,0,100)\n", + "x2=linspace(-90,-30,100)\n", + "Tm1=(Lm/(2*pi/3))*i1**2\n", + "Tm2=(Lm/(2*pi/3))*i2**2\n", + "dll=np.ones(100)\n", + "plot(x1,Tm1*np.array(dll),'g')\n", + "plot(x2,-Tm2*np.array(dll),'b--')\n", + "\n", + "x1=linspace(0,60,100)\n", + "x2=linspace(30,90,100)\n", + "Tm1=(Lm/(2*pi/3))*i1**2\n", + "Tm2=(Lm/(2*pi/3))*i2**2\n", + "dll=np.ones(100)\n", + "plot(x1,-Tm1*np.array(dll),'g')\n", + "plot(x2,Tm2*np.array(dll),'b--')\n", + "\n", + "x1=linspace(120,180,100)\n", + "x2=linspace(90,150,100)\n", + "Tm1=(Lm/(2*pi/3))*i1**2\n", + "Tm2=(Lm/(2*pi/3))*i2**2\n", + "dll=np.ones(100)\n", + "plot(x1,Tm1*np.array(dll),'g')\n", + "plot(x2,-Tm2*np.array(dll),'b--')\n", + "grid()\n", + "ylim(-3,3)\n", + "annotate('___ i1=I1, i2=0', xy=(110,2.6))\n", + "annotate('---- i1=0, i2=I2', xy=(110,2.2))\n", + "ylabel('Torque [N.m]')\n", + "xlabel('thetam [degrees]')\n", + "\n", + "#Results:\n", + "print \"Lm =\",Lm,\"H\"\n", + "print \"(c)The peak torque =\",round(Tm1,2),\"N.m\"\n", + "print \"\\t(i) The net torque, (at thetam=0) =\", 0, \"N.m\"\n", + "print \"\\t(ii) The net torque, (at thetam=45 deg.) =\", 0, \"N.m\"\n", + "print \"\\t(iii)The net torque, (at thetam=75 deg) =\", round(Tm1,2), \"N.m\"\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Lm =" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 0.127968099059 H\n", + "(c)The peak torque = 1.53 N.m\n", + "\t(i) The net torque, (at thetam=0) = 0 N.m\n", + "\t(ii) The net torque, (at thetam=45 deg.) = 0 N.m\n", + "\t(iii)The net torque, (at thetam=75 deg) = 1.53 N.m\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEPCAYAAABV6CMBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlcFPX/B/DXonmFWiqiAoopciwLLKGGB2FfT9T065Hm\nUaiVqXmkeWUplppn6tfKtCz9epS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5mdnaVQKLS4h40WFxfZ39+ns7PzU+PI96MZh4iI+KIZh4iI+KLEISIivihx\niIiIL0ocIiLiixKHiIj4osQhIiK+/ADYIdwwaPRWXQAAAABJRU5ErkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x1d13bd0>" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.3, Page number: 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from sympy import *\n", + "from math import *\n", + "\n", + "#Variable declaration:\n", + "n1=4000 #r/min\n", + "R=0.038 #m\n", + "a=b=pi/3 #rad\n", + "g=2.54*10**-4 #m\n", + "D=0.13 #m\n", + "N=100 #turns in both poles\n", + "uo=4*pi*10**-7 #permeability of free space(H/m)\n", + "Ll=0.005 #H\n", + "Vo=100 #phase voltage applied to phase 1.(V)\n", + "\n", + "\n", + "#Calculation:\n", + "wm=n1*pi/30\n", + "Lm=N**2*uo*a*R*D/(2*g)\n", + "thetam=symbols('thetam')\n", + "t=symbols('t')\n", + "#for part (a):\n", + "#for -60<=thetam<=0deg,\n", + "L11=Ll+(Lm/(pi/3))*(thetam+pi/3)\n", + "L111=diff(L11,thetam)\n", + "R1=L111*wm\n", + "#which is nuch greater than resistance R=1.5 ohm\n", + "thetam=-pi/3+wm*t\n", + "i1=Vo*t/(float(round(Ll,3))+float(Lm/(pi/3))*thetam+float(Lm/(pi/3))*pi/3)\n", + "\n", + "#for part (b):\n", + "V2=-200 #applied voltage(V)\n", + "thetam2=symbols('thetam2')\n", + "L12=Ll+(Lm/(pi/3))*(pi/3-thetam2)\n", + "L112=diff(L12,thetam2)\n", + "to=2.5*10**-3 #ms\n", + "thetam2=float(-pi/3+wm*to)\n", + "i1=Vo*t/(float(round(Ll,3))+float(Lm/(pi/3))*thetam+float(Lm/(pi/3))*pi/3)\n", + "i2=(0.25-200*(t-to))/(0.005+51.1*(5*10**-3-t))\n", + "\n", + "\n", + "#Results:\n", + "print \"i1 =\",i1,\"\\t, (where round(16.2934044186179*pi,2) = 51.1 )\"\n", + "print \"\\ni2 =\",i2,\"\\n\"\n", + "\n", + "\n", + "#Calculations & Results:\n", + "#for part (c):\n", + "from __future__ import division\n", + "from pylab import *\n", + "\n", + "Lleak=0.005\n", + "Posintegral=0\n", + "integral=0\n", + "N1=500\n", + "tmax=3.75*10**-3\n", + "t=[0]*503\n", + "thet=[0]*503\n", + "Torque=[0]*503\n", + "deltat = tmax/N1\n", + "thetm=[0]*503\n", + "i=[0]*503\n", + "for n in range(1,N1+2,1):\n", + " t[n-1]=tmax*(n-1)/N1\n", + " thetm[n-1]=-(pi/3)+(400*pi/3)*t[n-1]\n", + " if (thetm[n-1]<=0):\n", + " i[n-1]=100*t[n-1]/(0.005+51.1*t[n-1])\n", + " dld1d1theta = 0.122\n", + " Torque[n-1]=0.5*i[n-1]**2*dld1d1theta\n", + " Posintegral=Posintegral+Torque[n-1]*deltat\n", + " integral=Posintegral\n", + " else:\n", + " i[n-1]=(0.25-200*(t[n-1]-2.5*10**-3))/(0.005+51.1*(5*10**-3-t[n-1]))\n", + " dld11dtheta = -0.122\n", + " Torque[n-1] = 0.5*i[n-1]**2*dld11dtheta\n", + " integral = integral + Torque[n-1]*deltat\n", + "\n", + "print \"\\nPositve torque integral =\",Posintegral, \"[N-m-sec]\"\n", + "print \"\\nTorque integral=\",integral,\"[N-m-sec]\\n\"\n", + "\n", + "plot(1000*np.array(t),i)\n", + "xlabel('time [msec]')\n", + "ylabel('Phase current [A]')\n", + "title('(a) phase-1 current profile')\n", + "grid()\n", + "show()\n", + "plot(1000*np.array(t),Torque)\n", + "xlabel('time [msec]')\n", + "ylabel('Torque [N-m]')\n", + "title('(b) torque profile')\n", + "grid()\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "i1 =" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 100*t/(51.1872396234976*t + 0.005) \t, (where round(16.2934044186179*pi,2) = 51.1 )\n", + "\n", + "i2 = (-200*t + 0.75)/(-51.1*t + 0.2605) \n", + "\n", + "\n", + "Positve torque integral = 0.000456384094483 [N-m-sec]\n", + "\n", + "Torque integral= 0.000335463884625 [N-m-sec]\n", + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['fmod', 'cosh', 'sinh', 'trunc', 'tan', 'gamma', 'degrees', 'radians', 'sin', 'expm1', 'ldexp', 'isnan', 'frexp', 'ceil', 'copysign', 'cos', 'tanh', 'fabs', 'sqrt', 'hypot', 'log', 'log10', 'pi', 'log1p', 'floor', 'modf', 'exp', 'isinf', 'e']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVmX+//HXDSqYLKImGlgumQuCgKa2kJiailGOWpa5\n22hOo2U6NtlmX3VmyqVsbLHfmK3uVpqWmQpmWo6j4DblFqhgpogKIsh2/f44w523bDdwn/ucA5/n\n43E/5OY+nPPmUu/Pfa7rXNexKaUUQgghxP94GB1ACCGEuUhhEEII4UAKgxBCCAdSGIQQQjiQwiCE\nEMKBFAYhhBAOpDAIu+eee44FCxY4te3gwYPZuHFjpY81atQoXnzxxUr/vDBWXFwct9xyC35+fqxd\nu5aYmBg+/vhjAD744AOioqIMTiiqQgqDAODcuXN8/PHHPPHEE05t/+yzz/LCCy9U+ng2mw2bzVbp\nn3eFM2fO8MADDxAUFISHhwcnT540NE9lxcfH06xZM7ce8+WXX2bq1KlkZGTw4IMP8tVXXzF8+HC3\nZhD6kcIgAO1TXv/+/fHy8nJq+9tvv52MjAz27Nmj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DEIIIRzIGYMQQggHUhiEEEI4kMIghBDCgRQGIYQQDqQwCCGEcPD/ATnLc2SOfyyJAAAA\nAElFTkSuQmCC\n", + "text": [ + "<matplotlib.figure.Figure at 0x388b510>" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEZCAYAAABrUHmEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X18T/X/x/HHmauJzVwOm29E5WvMtlAUDUmby0KLb0Mh\n1a0U6UcUEl24Kn2TiC4JQ0nmu69cfBRlKXPVBWJjszCGzdXs4vz+ON992myzz+fjfD7nnO11v90+\nt33O53N2znPv8Xnt/X6fC0VVVRUhhBDCAV5GBxBCCGEdUjSEEEI4TIqGEEIIh0nREEII4TApGkII\nIRwmRUMIIYTDpGgI03rppZeYO3cuADabjUaNGpW47tixY/nggw88Fc1y5syZQ61atfD19SU9PR0f\nHx+SkpIAGDp0KK+88oqxAYVlVDQ6gBDFSUtL4/PPP+fw4cMOrT927FjatWvHsGHDqFSpUpH3k5KS\nuOWWW8jJycHLq3z9rXT58mUmTJjAzz//TMuWLQHIzMy0v68oCoqiGBVPWEz5+t8jLOOTTz6hR48e\nVKlSxaH169evT/PmzVm7du1113P1XNacnByXvs8TSst26tQprl69yj//+c8S15FzfIWjpGgIU4qL\ni+Pee+8t8vobb7yBv78/9evXZ/HixYXeCw8PJzY2ttjtderUCQA/Pz98fHyIj49HVVVeeukl/P39\n8fPzY8CAAZw9exbQeiZeXl589NFHNGnShG7dupGXl8fTTz+Nr68vzZo1Y968eXh5eZGXlwdA48aN\n2bRpk32fU6ZMITo62r68efNmQkND8fX1pXnz5sTFxZX48zdu3Jg333yTVq1a4ePjwyOPPMLly5cB\nbaguMDCQGTNmEBAQwLBhw8jKymLEiBHUqlWL2rVrM3LkSLKysjh48CBBQUH2n/2+++4DwMvLiyNH\njhS77xUrVtC8eXN8fX0JCwtj586dJeY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KxY9L9paUVQCHeROQ1RLlStWpVLly45/X35H8516tShbt26rFu3zv56SXMazrp48SKZ\nmZlEREQwe/Zsdu3aBcB9993HBx98YF8vf3/dunWzX9oaICMjQ5ccQjhCioYoF/z9/QkJCaFFixaM\nGzcORVHsRxkVfJ6/XPB5/vKKFSuYPXs2wcHBtGzZ0uEJ6JK2nb+ckZHBAw88QGhoKB07duTtt98G\n4IMPPrDf3Kdly5bMnTsXgNdee41jx47RokULQkJC2LRpkwstIoRr5H4aQujo1VdfpXr16rzwwguG\n7L9z587Mnj2bsLAwQ/Yvyj7paQiho+rVq7Nw4ULDTu5LTEwsNG8ihN6kpyGEEMJh0tMQQgjhMCka\nQgghHCZFQwghhMOkaAghhHCYFA0hhBAO+3+uUuMJ2ejlWAAAAABJRU5ErkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x3a36f90>" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.4, Page number: 433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "\n", + "#Variavle declaration:\n", + "rpm=2500 #rpm of motor\n", + "\n", + "\n", + "#Calculations & Results:\n", + "#For part (a):\n", + "theta=[0]*12\n", + "i=[0]*102\n", + "lambda1=[0]*102\n", + "for m in range(1,11,1):\n", + " theta[m-1]=10*(m-1)\n", + " for n in range(1,102,1):\n", + " i[n-1]=30*(n-1)/100\n", + " lambda1[n-1]=i[n-1]*(0.005+0.09*((90-theta[m-1])/90))*(8/(i[n-1]+8))\n", + "\n", + " \n", + " plot(i,lambda1,'.')\n", + " \n", + " if m==1:\n", + " hold(True)\n", + " \n", + "xlabel('current [A]')\n", + "ylabel('Lambda [Wb]')\n", + "title('Family of lambda-i curves as theta_m varies from 0 to 90 degrees') \n", + "annotate('theta_m=0 deg',xy=(6,0.03))\n", + "annotate('theta_m=0 deg',xy=(8,0.5))\n", + "\n", + "\n", + "#for part (b):\n", + "lambdamax=25*(0.005+0.09*(8/(25+8)))\n", + "AreaWnet=0\n", + "AreaWrec=0\n", + "deli=0.25\n", + "for n in range(1,102,1):\n", + " i[n-1]=25*(n-1)/100\n", + " AreaWnet=AreaWnet + deli*i[n-1]*(0.09)*(8/(i[n-1]+8))\n", + " AreaWrec=AreaWrec + deli*(lambdamax-i[n-1]*(0.005+0.09*(8/(i[n-1]+8))))\n", + "\n", + "Ratio=(AreaWnet+AreaWrec)/AreaWnet\n", + "print \"part (b): Ratio =\", round(Ratio,2)\n", + "\n", + "#for part(b):\n", + "rps=rpm/60\n", + "T=1/rps\n", + "Pphase=2*AreaWnet/T\n", + "Ptot=2*Pphase\n", + "print \"part (c): AreaWnet =\", round(AreaWnet,2),\"Joules\"\n", + "print \"Pphase =\",round(Pphase),\"W\",\"\\tPtot =\",round(Ptot),\"W\\n\"\n", + "plot(AreaWrec=0.7,AreaWnet=25)\n", + "grid()\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "part (b): Ratio =" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1.55\n", + "part (c): AreaWnet = 9.91 Joules\n", + "Pphase = 825.0 W \tPtot = 1651.0 W\n", + "\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "WARNING: pylab import has clobbered these variables: ['power', 'random', 'fft', 'linalg', 'info']\n", + "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZ4AAAEZCAYAAACnyUNvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXtcVNX6/z+gyMUBB7mIikpaiCKBOFZeinmVZpAGxyK/\nkoJ9s/Ebpzp1EjtdTE+dbze71y8VTyeO35qjZmWpkaExhqhoKiZZ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I20JDg4WHBOysrJQWVmJjRs3Ml76oUOHcOzYMea9zz//PNrb23HixAkU\nFRUJGuyFCxdi5cqVOHToEADzD/ZvvvkGTU1NPT4LYp9BCy4bnscffxyXLl1CeHg4brrpJtx22202\nX8jetzdHhvs637FBQUGYPXs2Tp48idmzZ/O2adasWViyZAluu+02hIeH49ChQ/j000+d6t+KFStQ\nVFSEsLAwLFiwAPfccw9ve8X0YfDgwQgJCcGQIUNw11134Y033mAykFavXo3a2lpERETgvvvuQ15e\nHvO+O++8E7feeitGjhyJuLg4+Pn5WYUT7cF34fv06YPi4mLs378fkZGRGDx4MP7v//4PAJCRkYHM\nzEwkJCRgwoQJmDFjhuD1spCTk4MdO3YgOzvbavB57733EB4ejjFjxiAsLAxpaWmoqqoCYA4D3XLL\nLejfvz8mTpyIBx54gDFabHrq+xdffIH4+Hj0798fDz/8MNauXYv+/fvbfE5SUhLuuusuxMbGYuDA\ngUxWG1//+vbti23btmHHjh0YNGgQ1Go1cnNzmQcsOzsbLS0tGDBgADQaDcLDw7FixQrMnj0bAwcO\nxL///W/MnDnT7jXgIuYcCzF37lx89913uO2225iwDuD6/SvF9eOD/T0xMTH49NNP8dxzz0GlUmHp\n0qX4/PPPrbwKR8YRNgEBAdi0aRNWr14NlUqF1atXY9OmTejbt6/d4x944AF8//33CAsLw+zZsxEY\nGIjNmzdDr9cjLCwM9913H1atWoWUlBS77//qq68QFxcHtVqNd955B19//TUThejXr59DbREaEwYO\nHIivv/4aq1atwsCBAxEREYHHH3+ciaisXr0aNTU1GDhwIObOnYu5c+daPZvc83XLLbdgxYoVyMvL\nQ2hoKEaMGMHMQerTp4/NszB//nzmWRD7DDLfTWSMA3z99dcoKChAZ2cn8vLy8OSTT9ocYzAYsGTJ\nEphMJgwYMAA7d+4U/MwXXngBv/zyi1XaIIVCoVCEWbp0KX799VdGj/Uk9s2sBLS1teGhhx7Crl27\nMGjQIEyaNAm33347M98BMLvtDz/8ML799ltER0f3GDq6fPkyPvzwQ3z44Yd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AheffVV\n+Pn54cyZM1zZ398fAwMD2LZtGwQCAby8vHDgwAHu98LCwrB27Vp4eHhAIpGAiHDgwAHcuXMH4eHh\nWL58uVb65uXlYc+ePWhpaeH2imEwTJEp+laAwdAFNTU1SE9PR1VVFWxtbfHgwQMAw7fbUC5fvHgR\nV69ehaurK8rKylTKBw4cgIuLCy5duoS+vj4sWbKEW7S2trYWV69ehaOjI4KDg1FeXo60tDRkZGSg\nrKwMM2fOfKq+jY2NaGlpgUAgQFxcHI4dO4YdO3ZM4BthMAwH1uNhmCSlpaWIj4/n9pPRZl+ZwMBA\nuLq6qi3/8MMPOHz4MEQiEYKCgtDZ2YmbN2+Cx+MhMDAQTk5O4PF4EAqFKtt5aMuxY8cQFxcHAJBI\nJMOG2xgMU4L1eBgmCY/HU7ulsZmZGQYHBwHId2x8/Pgxd83a2lpFdmj5888/R3h4uMpnZWVlsLS0\n5Mrm5ubc/UfD0aNH0dzczC1h//vvv+P69euYN2/eqO/FYBg6rMfDMEmWL1+O/Px83L9/HwC4n25u\nblx02KlTpyCTybS6X2RkJLKysjinUl9frzFiTYGVlRW6u7ufeu9r166hu7sbTU1NqK+vR319Pd59\n913W62GYLMzxMEwSkUiEt956C0FBQRCJRNyWxlu2bMH3338PkUiEiooKLrgAUJ3vUexKqWDr1q1w\ndXWFj48PBAIBkpOTIZPJhskpk5KSolVwQV5eHtasWaPyWWxsLPLy8kZtN4NhDLD9eBgMPTBnzhxU\nVVXB3t5eK/nw8HCkp6erhF8zGMYK6/EwGHrAwcEBERERKgmkmggPD0d9fT0sLCwmQTMGQ/ewHg+D\nwWAwJhXW42EwGAzGpMIcD4PBYDAmFeZ4GAwGgzGpMMfDYDAYjEmFOR4Gg8FgTCr/D5eEOnUTMe26\nAAAAAElFTkSuQmCC\n", + "text": [ + "<matplotlib.figure.Figure at 0x3a59f50>" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/ELECTRIC_MACHINERY/chapter9.ipynb b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter9.ipynb index 3cdb1b6c..3cdb1b6c 100755 --- a/ELECTRIC_MACHINERY/chapter9.ipynb +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/chapter9.ipynb diff --git a/ELECTRIC_MACHINERY/screenshots/capture1.png b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture1.png Binary files differindex 1196a40b..1196a40b 100755 --- a/ELECTRIC_MACHINERY/screenshots/capture1.png +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture1.png diff --git a/ELECTRIC_MACHINERY/screenshots/capture2.png b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture2.png Binary files differindex 56b278d5..56b278d5 100755 --- a/ELECTRIC_MACHINERY/screenshots/capture2.png +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture2.png diff --git a/ELECTRIC_MACHINERY/screenshots/capture3.png b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture3.png Binary files differindex a8df3c9e..a8df3c9e 100755 --- a/ELECTRIC_MACHINERY/screenshots/capture3.png +++ b/ELECTRIC_MACHINERY_by_Fitzgerald_Kingsley_and_Umans/screenshots/capture3.png diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb index cb082314..cb082314 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb index 1cb96575..1cb96575 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb index 66e003cf..66e003cf 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb index a473f6ff..a473f6ff 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb index dcee3cfd..dcee3cfd 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb index 07337cc2..07337cc2 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb index 4e55b2bd..4e55b2bd 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb index 1a50199d..1a50199d 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb index 78e631ed..78e631ed 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb index 6714ed49..6714ed49 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb index ad79101f..ad79101f 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb index a956890c..a956890c 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png Binary files differindex 2c4bc453..2c4bc453 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png Binary files differindex c9268ce2..c9268ce2 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png diff --git a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png Binary files differindex a3a8aebe..a3a8aebe 100644..100755 --- a/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb index 0db63819..0db63819 100644..100755 --- a/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb +++ b/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb index 09c62b0c..09c62b0c 100644..100755 --- a/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb +++ b/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb index 930b14d4..930b14d4 100644..100755 --- a/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb +++ b/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb index 60bed6fd..60bed6fd 100644..100755 --- a/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb +++ b/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png Binary files differindex 13bfad16..13bfad16 100644..100755 --- a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png +++ b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png Binary files differindex 3fee428b..3fee428b 100644..100755 --- a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png +++ b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png Binary files differindex 6184a800..6184a800 100644..100755 --- a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png +++ b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png diff --git a/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt b/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt index 67020269..67020269 100644..100755 --- a/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt +++ b/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb index c97fbbe0..c97fbbe0 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb index 3abf271f..3abf271f 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb index 3baf21d6..3baf21d6 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb index 38d22a7c..38d22a7c 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb index 26c74103..26c74103 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb index 59db3bd3..59db3bd3 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png Binary files differindex edde0bd9..edde0bd9 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png Binary files differindex 16bc685f..16bc685f 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png Binary files differindex 5edf8418..5edf8418 100644..100755 --- a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/README.txt b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/README.txt new file mode 100755 index 00000000..4053b71e --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/README.txt @@ -0,0 +1,10 @@ +Contributed By: Amit Raval +Course: bscit +College/Institute/Organization: Saurashtra University +Department/Designation: Bsc. IT +Book Title: Electronic Communications: Principles and Systems +Author: W. D. Stanley & J. M. Jeffords +Publisher: Cengage Learning, New Delhi +Year of publication: 2009 +Isbn: 9788131503546 +Edition: 2
\ No newline at end of file diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb index c3414fde..c3414fde 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb index 1b54a824..1b54a824 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb index 019fc2d1..019fc2d1 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb index 9bab9cd4..9bab9cd4 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb index 142dee30..142dee30 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb index 5de80405..5de80405 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb index 17a29608..17a29608 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb index 13b125cb..13b125cb 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb index 8d138368..8d138368 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb index 14d054c2..14d054c2 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb index b4b74781..b4b74781 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb index fab5433e..fab5433e 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb index 941b7e6c..941b7e6c 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb index c000bc59..c000bc59 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb index c94b7f1e..c94b7f1e 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb index 7f2d8462..7f2d8462 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb index 9d1b862a..9d1b862a 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb index 62b97ffa..62b97ffa 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb index 7a56724b..7a56724b 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb index 82afeeb0..82afeeb0 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png Binary files differindex 6fbb6032..6fbb6032 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png Binary files differindex 3138717d..3138717d 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png diff --git a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png Binary files differindex 9a07efe8..9a07efe8 100644..100755 --- a/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_1.ipynb index 40ac1384..40ac1384 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_2.ipynb index d6bc89ef..d6bc89ef 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_3.ipynb index d6bc89ef..d6bc89ef 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_1.ipynb index 79133326..79133326 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_2.ipynb index 5be584aa..5be584aa 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_3.ipynb index 5be584aa..5be584aa 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_1.ipynb index b3a3f35f..b3a3f35f 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb index b3a3f35f..b3a3f35f 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb index b3a3f35f..b3a3f35f 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb index 1230d468..1230d468 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb index 8c91c4fa..8c91c4fa 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb index 8c91c4fa..8c91c4fa 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb index 6a69bc61..6a69bc61 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb index 6a69bc61..6a69bc61 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb index 6a69bc61..6a69bc61 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb index 3cfc1964..3cfc1964 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb index 44c41756..44c41756 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb index 44c41756..44c41756 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb index 30dff9c1..30dff9c1 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb index 9fa544f7..9fa544f7 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb index 9fa544f7..9fa544f7 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb index 3756f226..3756f226 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb index 4a7f41f9..4a7f41f9 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb index 4a7f41f9..4a7f41f9 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb index 6a0cb850..6a0cb850 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb index 6a0cb850..6a0cb850 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb index 6a0cb850..6a0cb850 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb index 1250b8e1..1250b8e1 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb index 10a03cd7..10a03cd7 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb index 10a03cd7..10a03cd7 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb index 44534838..44534838 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb index 226ca17a..226ca17a 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb index 226ca17a..226ca17a 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb index 90e30550..90e30550 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb index 90e30550..90e30550 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb index 90e30550..90e30550 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb index 010ef3d2..010ef3d2 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb index 010ef3d2..010ef3d2 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb index 010ef3d2..010ef3d2 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb index f251fb09..f251fb09 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb index f251fb09..f251fb09 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb index f251fb09..f251fb09 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb index 15242e34..15242e34 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb index 15242e34..15242e34 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb index 15242e34..15242e34 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb index 8d024566..8d024566 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb index 8d024566..8d024566 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb index 8d024566..8d024566 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb index 8c67de26..8c67de26 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb index 8c67de26..8c67de26 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb index 8c67de26..8c67de26 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt index ef6ddcdd..ef6ddcdd 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG Binary files differindex a0f7a628..a0f7a628 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG Binary files differindex e60afe5f..e60afe5f 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG Binary files differindex 230c4102..230c4102 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG Binary files differindex 230c4102..230c4102 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG Binary files differindex 49fbfaa6..49fbfaa6 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG Binary files differindex 49fbfaa6..49fbfaa6 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG Binary files differindex c8a09ce2..c8a09ce2 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG Binary files differindex c8a09ce2..c8a09ce2 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG diff --git a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG Binary files differindex 72e1a311..72e1a311 100644..100755 --- a/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb index 550ebd64..550ebd64 100644..100755 --- a/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb index 8f8e2183..8f8e2183 100644..100755 --- a/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb index 585e15e9..585e15e9 100644..100755 --- a/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb index 1742be0d..1742be0d 100644..100755 --- a/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb index 113c19cc..113c19cc 100644..100755 --- a/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/1.png b/Electronic_Devices_by_K._C._Nandi/screenshots/1.png Binary files differindex 47f1b312..47f1b312 100644..100755 --- a/Electronic_Devices_by_K._C._Nandi/screenshots/1.png +++ b/Electronic_Devices_by_K._C._Nandi/screenshots/1.png diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/2.png b/Electronic_Devices_by_K._C._Nandi/screenshots/2.png Binary files differindex d55bb4f7..d55bb4f7 100644..100755 --- a/Electronic_Devices_by_K._C._Nandi/screenshots/2.png +++ b/Electronic_Devices_by_K._C._Nandi/screenshots/2.png diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/5.png b/Electronic_Devices_by_K._C._Nandi/screenshots/5.png Binary files differindex 36ae44f2..36ae44f2 100644..100755 --- a/Electronic_Devices_by_K._C._Nandi/screenshots/5.png +++ b/Electronic_Devices_by_K._C._Nandi/screenshots/5.png diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb index 121ebd92..121ebd92 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb index 8b8c6f98..8b8c6f98 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb index 077b1bb4..077b1bb4 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb index 40d5c095..40d5c095 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb index 3c3e2342..3c3e2342 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb index b4318d00..b4318d00 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb index 6b65016a..6b65016a 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb index 863a69a3..863a69a3 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb index ee2c5bbc..ee2c5bbc 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png Binary files differindex 9e2ff7b3..9e2ff7b3 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png Binary files differindex aaadd53e..aaadd53e 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png diff --git a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png Binary files differindex aaadd53e..aaadd53e 100644..100755 --- a/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb index 4234eb46..4234eb46 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb index 75895112..75895112 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb index 75895112..75895112 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb index 6d83b13e..6d83b13e 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb index 6d83b13e..6d83b13e 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb index e589bb65..e589bb65 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb index e589bb65..e589bb65 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb index fba4d6b9..fba4d6b9 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb index 6bbb77b6..6bbb77b6 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb index 7b589d8e..7b589d8e 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb index 1ef87929..1ef87929 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb index 1ef87929..1ef87929 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb index 0d8f7157..0d8f7157 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb index 1abc780a..1abc780a 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb index 9085b454..9085b454 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb index 9085b454..9085b454 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb index d3729e3e..d3729e3e 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb index d3729e3e..d3729e3e 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb index 9b14cc8e..9b14cc8e 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb index 9b14cc8e..9b14cc8e 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb index 77ecc1b5..77ecc1b5 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb index 77ecc1b5..77ecc1b5 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb index 48a66cea..48a66cea 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb index 48a66cea..48a66cea 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt index 51265d08..51265d08 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png Binary files differindex 78289ac2..78289ac2 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png Binary files differindex 78289ac2..78289ac2 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png Binary files differindex 30341dad..30341dad 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png Binary files differindex 30341dad..30341dad 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png Binary files differindex bce9d527..bce9d527 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png Binary files differindex bce9d527..bce9d527 100644..100755 --- a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb index 553bfea3..553bfea3 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb index afd03593..afd03593 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb index b771ce52..b771ce52 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb index 1d312472..1d312472 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb index 697d4b21..697d4b21 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb index 4731f202..4731f202 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb index 8895e342..8895e342 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png Binary files differindex 2cc93e75..2cc93e75 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png Binary files differindex 22f87a95..22f87a95 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png Binary files differindex 60b16536..60b16536 100644..100755 --- a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb index 8bb19cf4..8bb19cf4 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb index e5603984..e5603984 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb index d074e1fe..d074e1fe 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb index 15b0854c..15b0854c 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb index e132cf6b..e132cf6b 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb index 8ade6c6b..8ade6c6b 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb index 3791b320..3791b320 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb index 99ed3014..99ed3014 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb index fda149db..fda149db 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt index 1facaa58..1facaa58 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png Binary files differindex 0b079b20..0b079b20 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png Binary files differindex f0fcaa85..f0fcaa85 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png Binary files differindex 937d5b91..937d5b91 100644..100755 --- a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png diff --git a/Engineering_Economics/Chapter10.ipynb b/Engineering_Economics/Chapter10.ipynb deleted file mode 100755 index bc34bb84..00000000 --- a/Engineering_Economics/Chapter10.ipynb +++ /dev/null @@ -1,357 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:28b0077be1a0d41b0cc471c0e34331f1edde6c138991b53632e2c3b3cb0de57c"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Evaluation of Public Alternatives"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.1 Page 138"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "Ii=4000000.0;#in Rs.\n",
- "AM=150000.0;#in Rs.\n",
- "AFS=600000.0;#in Rs.\n",
- "Einc=50000.0;#in Rs.\n",
- "i=12.0;#in % per annum\n",
- "n=15.0;#in years\n",
- "\n",
- "#calculation\n",
- "Cp=AM*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\n",
- "TPW=Ii+Cp;#in RS\n",
- "\n",
- "#result\n",
- "print \"Total present worth of costs in RS. : \",round(TPW,3);\n",
- "\n",
- "#Total present worth of fuel savings:\n",
- "AI=600000.0;#in Rs.\n",
- "G=50000.0;#in Rs.\n",
- "i=12.0;#in % per annum\n",
- "n=15.0;#in years\n",
- "\n",
- "#calculation\n",
- "A=AI+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100);#in RS\n",
- "Bp=A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs.\n",
- "BCratio=Bp/(Ii+Cp);#unitless\n",
- "\n",
- "#result\n",
- "print \"Present worth of fuel savings in Rs. : \",round(Bp,3);\n",
- "print \"BCratio : \",round(BCratio,3);\n",
- "print\"Since BC ratio is more than 1, the construction of the bridge across the river is justified.\";\n",
- "print\"answers are slightly different from the book due to approximation\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Total present worth of costs in RS. : 5021629.673\n",
- "Present worth of fuel savings in Rs. : 5782527.265\n",
- "BCratio : 1.152\n",
- "Since BC ratio is more than 1, the construction of the bridge across the river is justified.\n",
- "answers are slightly different from the book due to approximation\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.2 Page 139"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "Ic=80000000.0;#in Rs.\n",
- "Aps=6000000.0;#in Rs.\n",
- "Afs=3000000.0;#in Rs.\n",
- "Aib=5000000.0;#in Rs.\n",
- "Arb=2000000.0;#in Rs.\n",
- "Amc=3000000.0;#in Rs.\n",
- "i=12.0;#in % per annum\n",
- "n=50.0;#in years\n",
- "\n",
- "#calculation\n",
- "TAB=Afs+Aib+Arb;#in Rs.\n",
- "PW_B=TAB*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\n",
- "\n",
- "#result\n",
- "print \"Total present worth of benefits in RS. : \",round(PW_B,3);\n",
- "\n",
- "#Present worth of costs:\n",
- "PW_C=Ic+Amc*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)-Aps*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
- "BCratio=PW_B/PW_C;#unitless\n",
- "\n",
- "#result\n",
- "print \"Present worth of costs in Rs. : \",round(PW_C,3);\n",
- "print \"BCratio : \",round(BCratio,3);\n",
- "print \"Since BC ratio is more than 1, the state govt. can implement the hydroelectric project.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Total present worth of benefits in RS. : 83044984.884\n",
- "Present worth of costs in Rs. : 55086504.535\n",
- "BCratio : 1.508\n",
- "Since BC ratio is more than 1, the state govt. can implement the hydroelectric project.\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 10.3 Page 140"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#alternative 1\n",
- "P=3000000.0;#in Rs.\n",
- "B=900000.0;#in Rs.\n",
- "i=10.0;#in % per annum\n",
- "n=5.0;#in years\n",
- "\n",
- "#calculation\n",
- "AE1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n",
- "BCratio=B/AE1;#unitless\n",
- "\n",
- "#result\n",
- "print \"Annual equivalent of initial cost in Rs. : \",round(AE1,3);\n",
- "print \"BCratio : \",round(BCratio,3);\n",
- "\n",
- "#Alternative A2 : \n",
- "P=6000000.0;#in Rs.\n",
- "B=1500000.0;#in Rs.\n",
- "i=10.0;#in % per annum\n",
- "n=7.0;#in years\n",
- "\n",
- "#calculation\n",
- "AE2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n",
- "BCratio=B/AE2;#unitless\n",
- "\n",
- "#result\n",
- "print \"Annual equivalent of initial cost in Rs. : \",round(AE2,3);\n",
- "print \"BCratio : \",round(BCratio,3);\n",
- "print \"The benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Annual equivalent of initial cost in Rs. : 791392.442\n",
- "BCratio : 1.137\n",
- "Annual equivalent of initial cost in Rs. : 1232432.998\n",
- "BCratio : 1.217\n",
- "The benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.4 Page 141"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#cost of the state\n",
- "n=20.0;#in years\n",
- "P=2500000000.0;#in Rs.\n",
- "Agt=10000000.0;#in Rs.\n",
- "Ai=1000000.0;#in Rs.\n",
- "Com=48000.0;#in Rs./year/employee\n",
- "C1=Com*300;#in Rs.\n",
- "i=10.0;#in % per annum\n",
- "\n",
- "#calculation\n",
- "C2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n",
- "CA=C2+C1;#in Rs\n",
- "\n",
- "#result\n",
- "print \"Annual equivalent initial cost in Rs. : \",round(C2,3);\n",
- "print \"Total Annual equivalent cost of the project in Rs. : \",round(CA,3);\n",
- "\n",
- "#Benefit to the state : \n",
- "W=30000000.0;#in Rs.\n",
- "A1=W*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs.\n",
- "Agpy=10000000.0;#in ton/year\n",
- "A2=Agpy*(30-10);#in Rs.\n",
- "AvgAI=1000000.0;#in tons Km.\n",
- "G=20000000.0;#in Rs.\n",
- "\n",
- "#calculation\n",
- "A3=A2+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in Rs.\n",
- "BA=A1+A3;#in Rs\n",
- "BCratio=BA/CA;#unitless\n",
- "print \"Annual equivalent average of transport cost saving in Rs. : \",round(A3,3);\n",
- "print \"Total annual equivalent benefits to the state : \",round(BA,3);\n",
- "print \"BCratio : \",round(BCratio,3);\n",
- "print \"The benefit cost ratio is more than 1,the project is justified.\";\n",
- "print \"the slight error in the answer of the book is due to approximation error\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Annual equivalent initial cost in Rs. : 293649061.931\n",
- "Total Annual equivalent cost of the project in Rs. : 308049061.931\n",
- "Annual equivalent average of transport cost saving in Rs. : 330161500.91\n",
- "Total annual equivalent benefits to the state : 333685289.653\n",
- "BCratio : 1.083\n",
- "The benefit cost ratio is more than 1,the project is justified.\n",
- "the slight error in the answer of the book is due to approximation error\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10.5 Page 143"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#project A\n",
- "i=9.0;#% per annum\n",
- "n=50.0;#in years\n",
- "P_A=150000000.0;#in RS.\n",
- "Fcs_A=2500000;#in Rs.\n",
- "Ib_A=3500000;#in Rs.\n",
- "Rb_A=1000000;#in RS.\n",
- "OMC_A=2000000.0;#in Rs.\n",
- "Psy_A=10000000.0;#in Rs.\n",
- "\n",
- "#calculation\n",
- "AE_A=P_A*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n",
- "Cpy_A=AE_A+OMC_A-Psy_A;#in Rs.\n",
- "Bpy_A=Fcs_A+Ib_A+Rb_A;#in Rs.\n",
- "BCratio_A=Bpy_A/Cpy_A;#unitless\n",
- "\n",
- "#result\n",
- "print \"Costs/year : \",round(Cpy_A,3);\n",
- "print \"Benefits/year : \",round(Bpy_A,3);\n",
- "print \"BC Ratio of project A : \",round(BCratio_A,3)\n",
- "\n",
- "\n",
- "#Project B : \n",
- "P_B=250000000.0;#in Rs.\n",
- "\n",
- "OMC_B=2500000.0;#in Rs.\n",
- "Psy_B=12000000.0;#in Rs.\n",
- "Fcs_B=3500000.0;#in Rs.\n",
- "Ib_B=4500000.0;#in Rs.\n",
- "Rb_B=2000000.0;#in RS.\n",
- "AE_B=P_B*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n",
- "Cpy_B=AE_B+OMC_B-Psy_B;#in Rs.\n",
- "Bpy_B=Fcs_B+Ib_B+Rb_B;#in Rs.\n",
- "BCratio_B=Bpy_B/Cpy_B;#unitless\n",
- "\n",
- "#result\n",
- "print \"Costs/year : \",round(Cpy_B,3);\n",
- "print \"Benefits/year : \",round(Bpy_B,3);\n",
- "print \"BC Ratio of project B : \",round(BCratio_B,3)\n",
- "\n",
- "#Project C : \n",
- "P_C=400000000.0;#in Rs.\n",
- "OMC_C=3500000.0;#in Rs.\n",
- "Psy_C=18000000.0;#in Rs.\n",
- "Fcs_C=5000000.0;#in Rs.\n",
- "Ib_C=6000000.0;#in Rs.\n",
- "Rb_C=3500000.0;#in RS.\n",
- "AE_C=P_C*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n",
- "Bpy_C=Fcs_C+Ib_C+Rb_C;#in Rs.\n",
- "Cpy_C=AE_C+OMC_C-Psy_C;#in Rs.\n",
- "BCratio_C=Bpy_C/Cpy_C;#unitless\n",
- "\n",
- "#result\n",
- "print \"Costs/year : \",round(Cpy_C,3);\n",
- "print \"Benefits/year : \",round(Bpy_C,3);\n",
- "print \"BC Ratio of project C : \",round(BCratio_C,3)\n",
- "print\"From the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Costs/year : 5684030.212\n",
- "Benefits/year : 7000000.0\n",
- "BC Ratio of project A : 1.232\n",
- "Costs/year : 13306717.021\n",
- "Benefits/year : 10000000.0\n",
- "BC Ratio of project B : 0.752\n",
- "Costs/year : 21990747.233\n",
- "Benefits/year : 14500000.0\n",
- "BC Ratio of project C : 0.659\n",
- "From the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\n"
- ]
- }
- ],
- "prompt_number": 8
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter11.ipynb b/Engineering_Economics/Chapter11.ipynb deleted file mode 100755 index 55cbf9b2..00000000 --- a/Engineering_Economics/Chapter11.ipynb +++ /dev/null @@ -1,306 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:72b2e09b74af58b464a4895e1776dc966d9cb12318da78fc7aa16f78becf8696"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Inflation Adjusted Decisions"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 11.1 Page 148"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "print \"Few steps are as follows : \";\n",
- "print \"Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\";\n",
- "print \"Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\";\n",
- "print \"Formula : P*(1+IR)^n\";\n",
- "P=24000.0;#in Rs.\n",
- "IR=9.0;#in % per year\n",
- "Age=61.0;#in years\n",
- "for n in range(21,31) :\n",
- " IV=P*(1+IR/100)**n;#in Rs\n",
- " print \"Age in years : \",Age,\". \"\"Inflated value of Rs. 24000 at end of year : \",n,\" in Rs. \",round(IV);\n",
- " Age=Age+1;#in Years\n",
- "\n",
- "PW=0;#For initialising\n",
- "n=21.0;#in years\n",
- "for m in range(10) :\n",
- " A=P*(1+IR/100)**n;#in Rs\n",
- " n=n+1;\n",
- " i=15.0;#in % per year\n",
- " PW=PW+A/(1+i/100)**(m+1);\n",
- "\n",
- "#result\n",
- "print \"Present equivalent of withdrawls in Rs. : \",round(PW,3);\n",
- "\n",
- "#The annual equivalent amount :\n",
- "i=15.0;#in % per year\n",
- "n=20.0;#in years\n",
- "#Formula : (A/F,i,n) : (i/100)/(((1+i/100)^n)-1) \n",
- "A=PW*(i/100)/(((1+i/100)**n)-1);#in Rs.\n",
- "print \"The annual equivalent amount in Rs. : \",round(A,3);\n",
- "print\"RECOMMENDATION : The person has to invest an amount of Rs. \",round(A,3),\" at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\"; \n",
- "print \"slight erorr in the answer is due to approximation error\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Few steps are as follows : \n",
- "Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\n",
- "Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\n",
- "Formula : P*(1+IR)^n\n",
- "Age in years : 61.0 . Inflated value of Rs. 24000 at end of year : 21 in Rs. 146611.0\n",
- "Age in years : 62.0 . Inflated value of Rs. 24000 at end of year : 22 in Rs. 159806.0\n",
- "Age in years : 63.0 . Inflated value of Rs. 24000 at end of year : 23 in Rs. 174189.0\n",
- "Age in years : 64.0 . Inflated value of Rs. 24000 at end of year : 24 in Rs. 189866.0\n",
- "Age in years : 65.0 . Inflated value of Rs. 24000 at end of year : 25 in Rs. 206954.0\n",
- "Age in years : 66.0 . Inflated value of Rs. 24000 at end of year : 26 in Rs. 225580.0\n",
- "Age in years : 67.0 . Inflated value of Rs. 24000 at end of year : 27 in Rs. 245882.0\n",
- "Age in years : 68.0 . Inflated value of Rs. 24000 at end of year : 28 in Rs. 268011.0\n",
- "Age in years : 69.0 . Inflated value of Rs. 24000 at end of year : 29 in Rs. 292132.0\n",
- "Age in years : 70.0 . Inflated value of Rs. 24000 at end of year : 30 in Rs. 318424.0\n",
- "Present equivalent of withdrawls in Rs. : 1013631.794\n",
- "The annual equivalent amount in Rs. : 9894.537\n",
- "RECOMMENDATION : The person has to invest an amount of Rs. 9894.537 at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\n",
- "slight erorr in the answer is due to approximation error\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 11.2 Page 150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "print\"The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\";\n",
- "print\"End of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\";\n",
- "i=20.0;#in per year\n",
- "Cum=0.0;#initialising\n",
- "Op_cost=40000.0;#in RS.\n",
- "Main_cost=60000.0;#in Rs.\n",
- "OpMain=Op_cost+Main_cost;#in Rs.\n",
- "S=400000.0;#in Rs.\n",
- "for n in range (1,16) :\n",
- " PF=1/((1+i/100)**n);\n",
- " PW=OpMain*PF;#in Rs.\n",
- " Cum=Cum+PW\n",
- " PW_S=PF*S;#in RS.\n",
- " TPW=500000.0+Cum-PW_S;#in Rs.\n",
- " AP=((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n",
- " AEM=TPW*AP;#in RS\n",
- " print \" \",n,\" \",Op_cost,\" \",Main_cost,\" \",OpMain,\" \",PF,\" \",PW,\" \",Cum,\" \",S,\" \",PW_S,\" \",TPW,\" \",AP,\" \",AEM;\n",
- " Op_cost=Op_cost+5000.0;#in Rs.\n",
- " Main_cost=Main_cost+6000.0;#in Rs.\n",
- " S=S-50000.0;#in Rs.\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\n",
- "End of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\n",
- " 1 40000.0 60000.0 100000.0 0.833333333333 83333.3333333 83333.3333333 400000.0 333333.333333 250000.0 1.2 300000.0\n",
- " 2 45000.0 66000.0 100000.0 0.694444444444 69444.4444444 152777.777778 350000.0 243055.555556 409722.222222 0.654545454545 268181.818182\n",
- " 3 50000.0 72000.0 100000.0 0.578703703704 57870.3703704 210648.148148 300000.0 173611.111111 537037.037037 0.474725274725 254945.054945\n",
- " 4 55000.0 78000.0 100000.0 0.48225308642 48225.308642 258873.45679 250000.0 120563.271605 638310.185185 0.386289120715 246572.280179\n",
- " 5 60000.0 84000.0 100000.0 0.401877572016 40187.7572016 299061.213992 200000.0 80375.5144033 718685.699588 0.33437970329 240313.910987\n",
- " 6 65000.0 90000.0 100000.0 0.33489797668 33489.797668 332551.01166 150000.0 50234.6965021 782316.315158 0.300705745867 235247.011053\n",
- " 7 70000.0 96000.0 100000.0 0.279081647234 27908.1647234 360459.176383 100000.0 27908.1647234 832551.01166 0.277423926347 230969.570539\n",
- " 8 75000.0 102000.0 100000.0 0.232568039361 23256.8039361 383715.980319 50000.0 11628.4019681 872087.578351 0.260609422409 227274.240084\n",
- " 9 80000.0 108000.0 100000.0 0.193806699468 19380.6699468 403096.650266 0.0 0.0 903096.650266 0.248079461672 224039.730836\n",
- " 10 85000.0 114000.0 100000.0 0.16150558289 16150.558289 419247.208555 -50000.0 -8075.27914449 927322.4877 0.238522756883 221187.516286\n",
- " 11 90000.0 120000.0 100000.0 0.134587985742 13458.7985742 432706.007129 -100000.0 -13458.7985742 946164.805703 0.231103794152 218662.276491\n",
- " 12 95000.0 126000.0 100000.0 0.112156654785 11215.6654785 443921.672608 -150000.0 -16823.4982177 960745.170825 0.225264964904 216422.227187\n",
- " 13 100000.0 132000.0 100000.0 0.0934638789872 9346.38789872 453268.060506 -200000.0 -18692.7757974 971960.836304 0.220620001083 214434.000758\n",
- " 14 105000.0 138000.0 100000.0 0.0778865658226 7788.65658226 461056.717089 -250000.0 -19471.6414557 980528.358544 0.216893055222 212669.791417\n",
- " 15 110000.0 144000.0 100000.0 0.0649054715189 6490.54715189 467547.264241 -300000.0 -19471.6414557 987018.905696 0.213882119838 211105.69587\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 11.3 Page 152"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "IR=5.0;#in % per year\n",
- "i=15.0;#in % per year\n",
- "#Machine X :\n",
- "Ppx=1500000.0;#in Rs.\n",
- "n=7.0;#in years\n",
- "S=200000.0;#in Rs.\n",
- "AMC=300000.0;#in Rs.\n",
- "print \"End of year AMC InflationFactor InflatedAmount P/F PW\";\n",
- "Pw=0;#For initialising\n",
- "for n in range (1,8) :\n",
- " FP=(1+IR/100)**n\n",
- " IA=AMC*FP;#in Rs.\n",
- " PF=1/((1+i/100)**n);\n",
- " PW=IA*PF;#in Rs.\n",
- " Pw=Pw+PW;#in Rs.\n",
- " print\" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n",
- "\n",
- "print \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\n",
- "PWX=Ppx+Pw-S*1/((1+i/100)**n);\n",
- "print \"Present worth of machine X in Rs. : \",round(PWX,3);\n",
- "\n",
- "#Machine Y\n",
- "\n",
- "Ppy=2000000.0;#in Rs.\n",
- "n=7.0;#in years\n",
- "S=300000.0;#in Rs.\n",
- "AMC=250000.0;#in Rs.\n",
- "print \"End of year AMC InflationFactor InflatedAmount P/F PW\";\n",
- "Pw=0;#For initialising\n",
- "for n in range (1,8) :\n",
- " FP=(1+IR/100)**n\n",
- " IA=AMC*FP;#in Rs.\n",
- " PF=1/((1+i/100)**n);\n",
- " PW=IA*PF;#in Rs.\n",
- " Pw=Pw+PW;#in Rs.\n",
- " print \" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n",
- "\n",
- "PWY=Ppy+Pw-S*1/((1+i/100)**n);\n",
- "\n",
- "#result\n",
- "print \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\n",
- "print \"Present worth of machine Y in Rs. : \",round(PWY,3);\n",
- "print \"Since the present worth of Machine X is less than Machine Y, select Machine X\"\n",
- "print \" Calculations are not accurate in the book\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "End of year AMC InflationFactor InflatedAmount P/F PW\n",
- " 1 300000.0 1.05 315000.0 0.869565217391 273913.043478\n",
- " 2 300000.0 1.1025 330750.0 0.756143667297 250094.517958\n",
- " 3 300000.0 1.157625 347287.5 0.657516232432 228347.168571\n",
- " 4 300000.0 1.21550625 364651.875 0.571753245593 208490.893043\n",
- " 5 300000.0 1.2762815625 382884.46875 0.497176735298 190361.25017\n",
- " 6 300000.0 1.34009564063 402028.692188 0.432327595912 173808.097981\n",
- " 7 300000.0 1.40710042266 422130.126797 0.375937039923 158694.35033\n",
- "Present worth of inflated annual operating and maintenance cost in Rs. : 1483709.322\n",
- "Present worth of machine X in Rs. : 2908521.914\n",
- "End of year AMC InflationFactor InflatedAmount P/F PW\n",
- " 1 250000.0 1.05 262500.0 0.869565217391 228260.869565\n",
- " 2 250000.0 1.1025 275625.0 0.756143667297 208412.098299\n",
- " 3 250000.0 1.157625 289406.25 0.657516232432 190289.307142\n",
- " 4 250000.0 1.21550625 303876.5625 0.571753245593 173742.410869\n",
- " 5 250000.0 1.2762815625 319070.390625 0.497176735298 158634.375141\n",
- " 6 250000.0 1.34009564063 335023.910156 0.432327595912 144840.081651\n",
- " 7 250000.0 1.40710042266 351775.105664 0.375937039923 132245.291942\n",
- "Present worth of inflated annual operating and maintenance cost in Rs. : 1236424.435\n",
- "Present worth of machine Y in Rs. : 3123643.323\n",
- "Since the present worth of Machine X is less than Machine Y, select Machine X\n",
- " Calculations are not accurate in the book\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 11.4 Page 156"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "IR=6.0;#in % per year\n",
- "i=18.0;#in % per year\n",
- "AFR=5000000.0;#in Rs.\n",
- "n=7.0;#in years\n",
- "AI=500000.0;#in Rs.\n",
- "print\"End of year AFR InflationFactor InflatedAmount P/F PW\";\n",
- "TPW=0;#Initialising\n",
- "\n",
- "for n in range (1,6) :\n",
- " IF=(1+IR/100)**n;\n",
- " IA=IF*AFR;#in Rs.\n",
- " PF=1/((1+i/100)**n);\n",
- " PW=PF*IA;#in Rs.\n",
- " TPW=PW+TPW;#in Rs.\n",
- " print\" \",round(n),\" \",round(AFR,3),\" \",round(IF,3),\" \",round(IA,3),\" \",round(PF,3),\" \",round(PW,3);\n",
- " AFR=AFR+AI;#in Rs.\n",
- "\n",
- " \n",
- "#result\n",
- "print \"The value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : \",round(TPW,3)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "End of year AFR InflationFactor InflatedAmount P/F PW\n",
- " 1.0 5000000.0 1.06 5300000.0 0.847 4491525.424\n",
- " 2.0 5500000.0 1.124 6179800.0 0.718 4438236.139\n",
- " 3.0 6000000.0 1.191 7146096.0 0.609 4349334.645\n",
- " 4.0 6500000.0 1.262 8206100.24 0.516 4232615.212\n",
- " 5.0 7000000.0 1.338 9367579.043 0.437 4094655.134\n",
- "The value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : 21606366.553\n"
- ]
- }
- ],
- "prompt_number": 19
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter2.ipynb b/Engineering_Economics/Chapter2.ipynb deleted file mode 100755 index e29c54c2..00000000 --- a/Engineering_Economics/Chapter2.ipynb +++ /dev/null @@ -1,372 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:579288a5e0685252a970b36dc99c069cd7fb91e6e042c88d50d8eb0615ccf38d"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Elementary Economic Analysis"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.1 Page 16"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#Part a \n",
- "w1=1.2;#in Kg\n",
- "c1=80.0;#cost of making aluminium casting in Rs/Kg\n",
- "c2=150.0;#ost of machining aluminium casting per unit in Rs\n",
- "\n",
- "#calculation\n",
- "Tc1=c1*w1+c2;#Total cost of jet engine part made of aluminium per unit in Rs\n",
- "\n",
- "#result\n",
- "print \"Total cost of jet engine part made of aluminium per unit in Rs \",round(Tc1,3)\n",
- "\n",
- "#Part b \n",
- "w2=1.35;#in Kg\n",
- "c1=35.0;#in Rs/Kg\n",
- "c2=170.0;#in Rs\n",
- "c3=1300.0;#in Rs/Kg\n",
- "\n",
- "#calculation\n",
- "Tc2=c1*w2+c2+c3*(w2-w1);#in Rs\n",
- "\n",
- "#result\n",
- "print \"Total cost of jet engine part made of steel per unit in Rs : \",round(Tc2,3);\n",
- "print \"DECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs \",round(Tc2-Tc1,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Total cost of jet engine part made of aluminium per unit in Rs 246.0\n",
- "Total cost of jet engine part made of steel per unit in Rs : 412.25\n",
- "DECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs 166.25\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.2, Page 17"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#Part a \n",
- "wood=0.1;#in m^3\n",
- "WoodCost=12000.0;#in Rs/m^3\n",
- "Table=1;#in units\n",
- "TableTopCost=3000.0;#in Rs/unit\n",
- "LegBushes=4.0;#units\n",
- "LegBushesCost=10.0;#Rs/units\n",
- "Nails=100.0;#in grams\n",
- "NailsCost=300.0;#in Rs/Kg\n",
- "TotalLabour=15.0;#in Hours\n",
- "TotalLabourCost=50.0;#in Rs/Hours\n",
- "\n",
- "#calcualtion\n",
- "WoodCostframelegs=WoodCost*wood;#in Rs\n",
- "WoodTopCost=3000.0;#in Rs\n",
- "BushesCost=LegBushesCost*LegBushes;#in Rs\n",
- "NailsCost=Nails*NailsCost/1000;#in Rs\n",
- "LabourCost=TotalLabourCost*TotalLabour;#in Rs\n",
- "TotalCost1=WoodCostframelegs+WoodTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n",
- "\n",
- "#result\n",
- "print \"Cost of Table with wooden top in Rs \",round(TotalCost1,3)\n",
- "\n",
- "#given data for table with granite top\n",
- "#Part b \n",
- "wood=0.15;#in m^3\n",
- "WoodCost=12000.0;#in Rs/m^3\n",
- "Granite=1.62;#in m^2\n",
- "GraniteCost=800.0;#in Rs/m^2\n",
- "LegBushes=4.0;#units\n",
- "LegBushesCost=25.0;#Rs/units\n",
- "Nails=50.0;#in grams\n",
- "NailsCost=300.0;#in Rs/Kg\n",
- "TotalLabour=8.0;#in Hours\n",
- "TotalLabourCost=50.0;#in Rs/Hours\n",
- "\n",
- "\n",
- "WoodCostframelegs=WoodCost*wood;#in Rs\n",
- "GraniteTopCost=Granite*GraniteCost;#in Rs\n",
- "BushesCost=LegBushesCost*LegBushes;#in Rs\n",
- "NailsCost=Nails*NailsCost/1000;#in Rs\n",
- "LabourCost=TotalLabourCost*TotalLabour;#in Rs\n",
- "TotalCost2=WoodCostframelegs+GraniteTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n",
- "\n",
- "#result\n",
- "print \"Cost of Table with Granite top in Rs \",round(TotalCost2,3);\n",
- "print \"Economic advantage of table with granite top in Rs \",round(TotalCost1-TotalCost2,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Cost of Table with wooden top in Rs 5020.0\n",
- "Cost of Table with Granite top in Rs 3611.0\n",
- "Economic advantage of table with granite top in Rs 1409.0\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.3 Page 19"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#design A\n",
- "LatheCost=200.0;#in Rs/hour\n",
- "grinderCost=150.0;#in Rs/hour\n",
- "HoursOfLathe=16.0;#in hours/1000Unit\n",
- "HoursOfGrinder=4.5;#in hours/1000Unit\n",
- "\n",
- "#calcualtion\n",
- "TotalCostA=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n",
- "\n",
- "#result\n",
- "print \"Total cost of design A per 100,000 units \",round(TotalCostA*100000.0/1000,3);\n",
- "\n",
- "# Design B\n",
- "HoursOfLathe=7.0;#in hours/1000Unit\n",
- "HoursOfGrinder=12.0;#in hours/1000Unit\n",
- "TotalCostB=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n",
- "\n",
- "#result\n",
- "print \"Total cost of design A per 100,000 units\",round(TotalCostB*100000.0/1000,3);\n",
- "print \"Economic advantage of design B over design A per 100,000 units in Rs \",round(TotalCostA-TotalCostB,3)*100;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Total cost of design A per 100,000 units 387500.0\n",
- "Total cost of design A per 100,000 units 320000.0\n",
- "Economic advantage of design B over design A per 100,000 units in Rs 67500.0\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.4,Page 20"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "from math import pi\n",
- "Tanks=4.0;#units\n",
- "TankDia=5.2;#in meter\n",
- "\n",
- "#calcualtion\n",
- "TankRad=TankDia/2;#in meters\n",
- "TankHeight=7;#in meters\n",
- "HeightDiaRatio=TankHeight/TankDia;#unitless\n",
- "VolPerTank=(22/7)*TankRad**2*TankHeight;#in m^3\n",
- "h=VolPerTank/(pi)*64;#in meters\n",
- "r=h/8;#in meters\n",
- "d=2*r;#in meters\n",
- "CostNewDesign=900000*(100.0/111);#in Rs\n",
- "\n",
- "#result\n",
- "print \"Expected savings by redesign in Rs \",round(900000-CostNewDesign,3);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Expected savings by redesign in Rs 89189.189\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.5,Page 21"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#steel frame\n",
- "distance=2500.0;#in Km\n",
- "TransCost=1.0;#in Rs/Kg/100Km\n",
- "SteelFramePrice=1000.0;#in Rs/Unit\n",
- "SteelFrameWeight=75.0;#in Kg/Unit\n",
- "\n",
- "#calculation\n",
- "TotalCost1=SteelFramePrice+TransCost*SteelFrameWeight*distance/100;#in Rs\n",
- "\n",
- "#result\n",
- "print \"Total cost of steel window frame per unit in Rs \",round(TotalCost1,3);\n",
- "\n",
- "# Aluminium window frame\n",
- "AlumilniumFramePrice=1500.0;#in Rs/Unit\n",
- "AlumilniumFrameWeight=28.0;#in Kg/Unit\n",
- "\n",
- "#calculation\n",
- "TotalCost2=AlumilniumFramePrice+TransCost*AlumilniumFrameWeight*distance/100;#in Rs\n",
- "\n",
- "#result\n",
- "print \"Total cost of Alumilnium window frame per unit in Rs \",round(TotalCost2,3);\n",
- "print \"DECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs \",round(TotalCost1-TotalCost2,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Total cost of steel window frame per unit in Rs 2875.0\n",
- "Total cost of Alumilnium window frame per unit in Rs 2200.0\n",
- "DECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs 675.0\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2.6,Page 23"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#Cost of component using process sequence 1\n",
- "print\"The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\" ;\n",
- "print \"Calculations are summarized in form of table below : \";\n",
- "print \"Operation Operation Time Machine Hour rate Cost\";\n",
- "print \" No. Min Hour Rs. Rs.\";\n",
- "print \" 1 Turning 5 0.083 200 16.60\";\n",
- "print \" 2 Milling 8 0.133 400 53.20\";\n",
- "print \" 3 Shapiing 10 0.167 350 58.45\";\n",
- "print \" 4 Drilling 3 0.050 300 15.00\";\n",
- "print \" Total 143.25\";\n",
- "\n",
- "#Cost of component using process sequence 2\n",
- "print \"The process sequence 2 of the component is as follows : Turning - Milling - Drilling\" ;\n",
- "print \"Calculations are summarized in form of table below : \";\n",
- "print \"Operation Operation Time Machine Hour rate Cost\";\n",
- "print \" No. Min Hour Rs. Rs.\";\n",
- "print \" 1 Turning 5 0.083 200 16.60\";\n",
- "print \" 2 Milling 14 0.233 400 93.20\";\n",
- "print \" 4 Drilling 3 0.050 300 15.00\";\n",
- "print \" Total 124.80\";\n",
- "\n",
- "#Cost of component using process sequence 3\n",
- "print \"The process sequence 3 of the component is as follows : Only CNC operations\" ;\n",
- "print \"Calculations are summarized in form of table below : \";\n",
- "print \"Operation Operation Time Machine Hour rate Cost\";\n",
- "print \" No. Min Hour Rs. Rs.\";\n",
- "print \" 1 CNC 8 0.133 1000 133\";\n",
- "\n",
- "print \"The process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\n",
- "Calculations are summarized in form of table below : \n",
- "Operation Operation Time Machine Hour rate Cost\n",
- " No. Min Hour Rs. Rs.\n",
- " 1 Turning 5 0.083 200 16.60\n",
- " 2 Milling 8 0.133 400 53.20\n",
- " 3 Shapiing 10 0.167 350 58.45\n",
- " 4 Drilling 3 0.050 300 15.00\n",
- " Total 143.25\n",
- "The process sequence 2 of the component is as follows : Turning - Milling - Drilling\n",
- "Calculations are summarized in form of table below : \n",
- "Operation Operation Time Machine Hour rate Cost\n",
- " No. Min Hour Rs. Rs.\n",
- " 1 Turning 5 0.083 200 16.60\n",
- " 2 Milling 14 0.233 400 93.20\n",
- " 4 Drilling 3 0.050 300 15.00\n",
- " Total 124.80\n",
- "The process sequence 3 of the component is as follows : Only CNC operations\n",
- "Calculations are summarized in form of table below : \n",
- "Operation Operation Time Machine Hour rate Cost\n",
- " No. Min Hour Rs. Rs.\n",
- " 1 CNC 8 0.133 1000 133\n",
- "The process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\n"
- ]
- }
- ],
- "prompt_number": 13
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter3.ipynb b/Engineering_Economics/Chapter3.ipynb deleted file mode 100755 index b94c5fa1..00000000 --- a/Engineering_Economics/Chapter3.ipynb +++ /dev/null @@ -1,360 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:5b530b225e354d5204b6b04a92931fcee5b92fa42094bc3f03e4022169e39d78"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Interest Formulas and their Application"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.1 Page 29"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "P=20000.0;#in rupees\n",
- "n=10.0;#in years\n",
- "i=18.0;#% per annum\n",
- "\n",
- "#calculation\n",
- "F=P*(1+i/100)**n;\n",
- "\n",
- "#result\n",
- "print \"Maturity value after 18 years is \", round(F,3),\" Rupees.\";\n",
- "print \" Ans in the book is not correct\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Maturity value after 18 years is : 104676.711 Rupees.\n",
- " Ans in the book is not correct\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.2 Page 30"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "F=100000.0;#in rupees\n",
- "n=10.0;#in years\n",
- "i=15.0;#% per annum\n",
- "\n",
- "#calculation\n",
- "P=F/((1.0+i/100.0)**n);\n",
- "\n",
- "#result\n",
- "print \"The person has to invest \", round(P,3),\" Rupees.\";\n",
- "print \" Ans in the book is not correct\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The person has to invest 24718.471 Rupees.\n",
- " Ans in the book is not correct\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.3 Page 31"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "A=10000.0;#in rupees\n",
- "n=25.0;#in years\n",
- "i=20.0;#% per annum\n",
- "\n",
- "#calculation\n",
- "F=A*(((1+i/100)**n-1)/(i/100));\n",
- "\n",
- "#result\n",
- "print \"The future sum of the annual equal payment after 25 years is \",round(F,3),\" Rupees.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The future sum of the annual equal payment after 25 years is 4719810.832 Rupees.\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.4 Page 32"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "F=500000.0;#in rupees\n",
- "n=15.0;#in years\n",
- "i=18.0;#% per annum\n",
- "\n",
- "#calculation\n",
- "A=F*((i/100)/((1+i/100)**n-1));\n",
- "\n",
- "#result\n",
- "print \"The annual equal ammount which must be deposited for 15 years is \",round(A,3),\" Rupees.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The annual equal ammount which must be deposited for 15 years is 8201.391 Rupees.\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.5 Page 33"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiasation of variable\n",
- "A=1000000.0;#in rupees\n",
- "n=20.0;#in years\n",
- "i=15.0;#% per annum\n",
- "\n",
- "#calculation\n",
- "P=A*(((1+i/100)**n-1)/((i/100)*(1+i/100)**n));\n",
- "\n",
- "#result\n",
- "print \"The amount of reserve which must be setup now is : \",round(P,3),\" Rupees\";\n",
- "print \" Ans in the book is not correct\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The amount of reserve which must be setup now is : 6259331.474 Rupees\n",
- " Ans in the book is not correct\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.6 Page 34"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "P=1000000.0;#in rupees\n",
- "n=15.0;#in years\n",
- "i=18.0;#% per annum\n",
- "\n",
- "#calculation\n",
- "A=P*(((i/100)*(1+i/100)**n)/((1+i/100)**n-1));\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent installment to be paid by the company to the bank is \",round(A),\" Rupees.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The annual equivalent installment to be paid by the company to the bank is : 196403.0 Rupees.\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.7 Page 35"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "A1=4000.0;#in rupees\n",
- "G=500.0;#in rupees\n",
- "n=10.0;#in years\n",
- "i=15.0;#% per annum\n",
- "\n",
- "#calculation\n",
- "A=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\n",
- "F=A*(((1+i/100)**n-1)/(i/100));\n",
- "\n",
- "#result\n",
- "print \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "At the end of 10th year, the compound amountr of all his payments will be : 115560.6 Rupees.\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.8 Page 36"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "A1=8500.0;#in rupees\n",
- "G=-500.0;#in rupees\n",
- "n=10.0;#in years\n",
- "i=15.0;#% per annum\n",
- "\n",
- "#calculation\n",
- "A=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\n",
- "F=A*(((1+i/100)**n-1)/(i/100));\n",
- "\n",
- "#result\n",
- "print \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "At the end of 10th year, the compound amountr of all his payments will be : 138235.878 Rupees.\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3.9 Page 38"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "P=5000.0;#in rupees\n",
- "n=10.0;#in years\n",
- "i=12.0;#% per annum\n",
- "m=4.0;#no. of interest periods per year for quarterly\n",
- "\n",
- "#calculation\n",
- "N=n*m;\n",
- "r=i/m;\n",
- "F=P*(1+r/100)**N;\n",
- "\n",
- "#result\n",
- "print\"Maturity value after 10 years is \",round(F,3),\" Rupees.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Maturity value after 10 years is : 16310.189 Rupees.\n"
- ]
- }
- ],
- "prompt_number": 18
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter4.ipynb b/Engineering_Economics/Chapter4.ipynb deleted file mode 100755 index 2b2d10b2..00000000 --- a/Engineering_Economics/Chapter4.ipynb +++ /dev/null @@ -1,388 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:aed8a204f6a6b9aa286380e07fd82210fb76cb7818bcaa10c4f627aee9d0c52a"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Present Worth Method of Comparision"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.1 Page 44"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#technology 1\n",
- "P=1200000.0;#in Rs\n",
- "A=400000.0;#in Rs\n",
- "i=20.0;#in % per annum\n",
- "n=10.0;#in years\n",
- "\n",
- "#calculation\n",
- "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth for this technology in RS. \",round(PW,3);\n",
- "\n",
- "#technology 2\n",
- "P=2000000.0;#in Rs\n",
- "A=600000.0;#in Rs\n",
- "i=20.0;#in % per annum\n",
- "n=10.0;#in years\n",
- "\n",
- "#calculation\n",
- "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth for this technology in RS. \",round(PW,3);\n",
- "\n",
- "#technology 3\n",
- "P=1800000.0;#in Rs\n",
- "A=500000.0;#in Rs\n",
- "i=20.0;#in % per annum\n",
- "n=10.0;#in years\n",
- "\n",
- "#calculation\n",
- "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth for this technology in RS. \",round(PW,3);\n",
- "print \"It is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\";\n",
- "print \"the answer is differnt due to approximation error\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The present worth for this technology in RS. 476988.834\n",
- "The present worth for this technology in RS. 515483.251\n",
- "The present worth for this technology in RS. 296236.043\n",
- "It is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\n",
- "the answer is differnt due to approximation error\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.2 Page 46"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#bid 1\n",
- "P=450000.0;#in Rs\n",
- "A=27000.0;#in Rs\n",
- "i=15.0;#in % per annum\n",
- "n=15.0;#in years\n",
- "\n",
- "#calculation\n",
- "PW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth for this bid in RS. \",round(PW,3)\n",
- "\n",
- "#bid 2\n",
- "P=540000.0;#in Rs\n",
- "A=28500.0;#in Rs\n",
- "i=15.0;#in % per annum\n",
- "n=15.0;#in years\n",
- "\n",
- "#calculation\n",
- "PW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth for this bid in RS. \",round(PW,3)\n",
- "print \"The total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The present worth for this bid in RS. 607878.993\n",
- "The present worth for this bid in RS. 706650.048\n",
- "The total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.3 Page 47"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#investment proposal A\n",
- "P1=-10000.0;#in Rs\n",
- "P2=3000.0;#in Rs\n",
- "P3=3000.0;#in Rs\n",
- "P4=7000.0;#in Rs\n",
- "P5=6000.0;#in Rs\n",
- "i=18.0;#in % per annum\n",
- "\n",
- "#calculation\n",
- "PW_A=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth of A in RS. \",round(PW_A,3);\n",
- "\n",
- "#investment proposal B\n",
- "P1=-10000.0;#in Rs\n",
- "P2=6000.0;#in Rs\n",
- "P3=6000.0;#in Rs\n",
- "P4=3000.0;#in Rs\n",
- "P5=3000.0;#in Rs\n",
- "i=18.0;#in % per annum\n",
- "\n",
- "#calculation\n",
- "PW_B=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth of B in RS. \",round(PW_B,3);\n",
- "print\"At i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The present worth of A in RS. 2052.076\n",
- "The present worth of B in RS. 2767.112\n",
- "At i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.4 Page 48"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "P0=400000.0;#in Rs\n",
- "P=200000.0;#in Rs\n",
- "i=18.0;#in % per annum\n",
- "n=10.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "PW=P0+P*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth of alternative 2 in RS. \",round(PW,3);\n",
- "print \"The present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The present worth of alternative 2 in RS. 1298817.259\n",
- "The present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.5 Page 49"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#plan 1\n",
- "P0=-1000.0;#in Rs\n",
- "P=12000.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=15.0;#in years\n",
- "\n",
- "#calculation\n",
- "PW1=P0+P*1/((1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth of Plan-1 in RS. \",round(PW1,3);\n",
- "\n",
- "#plan 2\n",
- "P0=-1000.0;#in Rs\n",
- "P=4000.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n1=10.0;#in years\n",
- "n2=15.0;#in years\n",
- "\n",
- "#calculation\n",
- "PW2=P0+P*1/((1+i/100)**n1)++P*1/((1+i/100)**n2);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth of Plan-2 in RS.\",round(PW2,3);\n",
- "print \"The present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The present worth of Plan-1 in RS. 1192.355\n",
- "The present worth of Plan-2 in RS. 1018.678\n",
- "The present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.6,Page 50"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#plan 1\n",
- "P0=-10000.0;#in Rs\n",
- "P=800000.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=20.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "PW1=P0*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)+P*1/((1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth of Plan-1 in RS. \",round(PW1,3);\n",
- "\n",
- "#plan 2\n",
- "P0=-10000.0;#in Rs\n",
- "P=1500000.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n1=20.0;#in years\n",
- "n2=25.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "PW2=P0*(((1+i/100)**n1)-1)/((i/100)*(1+i/100)**n1)+P*1/((1+i/100)**n2);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth of Plan-2 in RS. \",round(PW2,3);\n",
- "print \"The present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\";\n",
- "print \"answer is bit different due to approximation error\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The present worth of Plan-1 in RS. 8238.976\n",
- "The present worth of Plan-2 in RS. 13540.524\n",
- "The present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\n",
- "answer is bit different due to approximation error\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4.7 Page 50"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "P=12000.0;#in Rs\n",
- "A1=10000.0;#in Rs\n",
- "G=1000.0;#in Rs\n",
- "i=18.0;#in % per annum\n",
- "n=10.0;#in years\n",
- "\n",
- "#calculation\n",
- "PW=-P+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
- "\n",
- "#result\n",
- "print \"The present worth of the small business in RS. \",round(PW,3);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The present worth of the small business in RS. 47293.316\n"
- ]
- }
- ],
- "prompt_number": 13
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter5.ipynb b/Engineering_Economics/Chapter5.ipynb deleted file mode 100755 index 398e418d..00000000 --- a/Engineering_Economics/Chapter5.ipynb +++ /dev/null @@ -1,352 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:e388f34dd67bfe5948d20d52a601f7e8e53b92aa882e9a754ed91176569417c0"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Future Worth Method"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.1,Page 54"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#alternate A\n",
- "P=5000000.0;#in Rs\n",
- "A=2000000.0;#in Rs\n",
- "i=18.0;#in % per annum\n",
- "n=4.0;#in years\n",
- "\n",
- "#calculation\n",
- "FW_A=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of alternative A in RS. \",round(FW_A,3);\n",
- "\n",
- "#alternate B\n",
- "P=4500000.0;#in Rs\n",
- "A=1800000.0;#in Rs\n",
- "i=18.0;#in % per annum\n",
- "n=4.0;#in years\n",
- "\n",
- "#calculation\n",
- "FW_B=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\n",
- "print \"The future worth amount of alternative B in RS. \", round(FW_B,3);\n",
- "print \"The future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\";\n",
- "print \" Calculation in the book is not accurate.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The future worth amount of alternative A in RS. 736975.2\n",
- "The future worth amount of alternative B in RS. 663277.68\n",
- "The future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\n",
- " Calculation in the book is not accurate.\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.2,Page 58"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#alternate 1\n",
- "FC=2000000.0;#in Rs\n",
- "AI=800000.0;#in Rs\n",
- "ATax=80000.0;#in Rs\n",
- "NetAI=AI-ATax;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=20.0;#in years\n",
- "\n",
- "#calculation\n",
- "FW_1=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of alternative 1 in RS. : \", round(FW_1,3)\n",
- "\n",
- "#alternative2\n",
- "FC=3600000.0;#in Rs\n",
- "AI=980000.0;#in Rs\n",
- "ATax=150000.0;#in Rs\n",
- "NetAI=AI-ATax;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=20.0;#in years\n",
- "\n",
- "#calculation\n",
- "FW_2=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of alternative 2 in RS.\",round(FW_2,3)\n",
- "print\"The future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\";\n",
- "print \" Calculation in the book is not accurate.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The future worth amount of alternative 1 in RS. : 32585172.373\n",
- "The future worth amount of alternative 2 in RS. 25076872.093\n",
- "The future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\n",
- " Calculation in the book is not accurate.\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.3,Page 59"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#part a\n",
- "#alternative 1\n",
- "P=500000.0;#in Rs\n",
- "A1=50000.0;#in Rs\n",
- "G=50000.0;#in Rs\n",
- "i=8.0;#in % per annum\n",
- "n=6.0;#in years\n",
- "\n",
- "#calculation\n",
- "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n",
- "\n",
- "#alternative 2\n",
- "P=700000.0;#in Rs\n",
- "A1=70000.0;#in Rs\n",
- "G=70000.0;#in Rs\n",
- "i=8.0;#in % per annum\n",
- "n=6.0;#in years\n",
- "\n",
- "#calculation\n",
- "FW_2=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of alternative 2 in RS. \", round(FW_2,3);\n",
- "print \"The future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\";\n",
- "\n",
- "\n",
- "#part b\n",
- "#alternative a\n",
- "P=500000.0;#in Rs\n",
- "A1=50000.0;#in Rs\n",
- "G=50000.0;#in Rs\n",
- "i=9.0;#in % per annum\n",
- "n=6.0;#in years\n",
- "\n",
- "#calculation\n",
- "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n",
- "\n",
- "#altenative 2\n",
- "P=700000.0;#in Rs\n",
- "A1=70000.0;#in Rs\n",
- "G=70000.0;#in Rs\n",
- "i=9.0;#in % per annum\n",
- "n=6.0;#in years\n",
- "\n",
- "#calculation\n",
- "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of alternative 2 in RS.\", round(FW_1,3);\n",
- "print \"The negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \";\n",
- "print \" Calculation in the book is not accurate.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The future worth amount of alternative 1 in RS. 408314.938\n",
- "The future worth amount of alternative 2 in RS. 571640.914\n",
- "The future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\n",
- "The future worth amount of alternative 1 in RS. 383913.653\n",
- "The future worth amount of alternative 2 in RS. 537479.115\n",
- "The negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \n",
- " Calculation in the book is not accurate.\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.4 Page 62"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#alternative 1\n",
- "P=8000000.0;#in Rs\n",
- "A=800000.0;#in Rs\n",
- "i=20.0;#in % per annum\n",
- "n=12.0;#in years\n",
- "Salvage=500000;#in Rs\n",
- "\n",
- "#calcualtion\n",
- "FW1=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth for this alternative in RS.\",round(FW1,3)\n",
- "\n",
- "#alternative 2\n",
- "P=7000000.0;#in Rs\n",
- "A=900000.0;#in Rs\n",
- "i=20.0;#in % per annum\n",
- "n=12.0;#in years\n",
- "Salvage=400000;#in Rs\n",
- "\n",
- "#calculation\n",
- "FW2=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth for this alternative in RS.\",round(FW2,3);\n",
- "\n",
- "#alternative 3\n",
- "P=9000000.0;#in Rs\n",
- "A=850000.0;#in Rs\n",
- "i=20.0;#in % per annum\n",
- "n=12.0;#in years\n",
- "Salvage=700000;#in Rs\n",
- "\n",
- "#calculation\n",
- "FW3=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n",
- "\n",
- "print \"The future worth for this alternative in RS. \",round(FW3,3)\n",
- "print \"The future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\";\n",
- "print \" Calculation in the book is not accurate.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The future worth for this alternative in RS. 102493205.379\n",
- "The future worth for this alternative in RS. 97635155.155\n",
- "The future worth for this alternative in RS. 113188330.939\n",
- "The future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\n",
- " Calculation in the book is not accurate.\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5.5 Page 64"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialisation of variable\n",
- "#Machine A\n",
- "P=400000.0;#in Rs\n",
- "A=40000.0;#in Rs\n",
- "S=200000.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=4.0#in years\n",
- "\n",
- "#calculation\n",
- "FW_A=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of Machine A in RS. \",round(FW_A,3);\n",
- "\n",
- "#Machine B\n",
- "P=800000.0;#in Rs\n",
- "A=0.0;#in Rs\n",
- "S=550000.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=4.0#in years\n",
- "\n",
- "#calculation\n",
- "FW_B=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n",
- "\n",
- "#result\n",
- "print \"The future worth amount of Machine B in RS. \",round(FW_B,3);\n",
- "print \"The future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\";\n",
- "print \" Calculation in the book is not accurate\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The future worth amount of Machine A in RS. 620580.864\n",
- "The future worth amount of Machine B in RS. 708815.488\n",
- "The future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\n",
- " Calculation in the book is not accurate\n"
- ]
- }
- ],
- "prompt_number": 13
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter8.ipynb b/Engineering_Economics/Chapter8.ipynb deleted file mode 100755 index de307e62..00000000 --- a/Engineering_Economics/Chapter8.ipynb +++ /dev/null @@ -1,619 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:44663c03d7c23760034bea6db3765d8b79a48144d6b54769443d3f295fd0b9f3"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Replacement and Maintenance Analysis"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.1 Page 103"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "FC=4000.0;#in Rs.\n",
- "i=0.0;#in % per annum\n",
- "MC1=0;#in Rs.\n",
- "print \"Tabulation to determine economic life : \";\n",
- "print\"End of Maintenance Summation of Avg cost of Avg FC if Avg total\";\n",
- "print\" year cost at end maintenance maintenance replaced at cost through\";\n",
- "print\" of year costs through year year given year given\";\n",
- "print\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\";\n",
- "print\" 1 0 0 0 4000 4000\";\n",
- "print\" 2 200 200 100 2000 2100\";\n",
- "print\" 3 400 600 200 1333.33 1533.33\";\n",
- "print\" 4 600 1200 300 1000 1300\";\n",
- "print\" 5 800 2000 400 800 1200\";\n",
- "print\" 6 1000 3000 500 666.67 1166.67\";\n",
- "print\" 7 1200 4200 600 571.43 1171.43\";\n",
- "print\"Economic life of the machine : 6 years\";\n",
- "print\"Column C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\";\n",
- "\n",
- "#When i=12%\n",
- "i=12.0;#in % per annum\n",
- "FC=4000.0;#in Rs.\n",
- "print\"Tabulation to determine economic life : \";\n",
- "print\"End of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\";\n",
- "print\" year cost at end 12% of year of PW of cumulative 12% total cost\";\n",
- "print\" of year n maintenance maintenance maintenance n of year\";\n",
- "print\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\";\n",
- "print\" 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\";\n",
- "print\" 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\";\n",
- "print\" 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\";\n",
- "print\" 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\";\n",
- "print\" 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\";\n",
- "print\" 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\";\n",
- "print\" 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\";\n",
- "print\" 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\";\n",
- "print\" 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\";\n",
- "print\" 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\";\n",
- "print\"Economic life of the machine : 7 years\";\n",
- "print\"For this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Tabulation to determine economic life : \n",
- "End of Maintenance Summation of Avg cost of Avg FC if Avg total\n",
- " year cost at end maintenance maintenance replaced at cost through\n",
- " of year costs through year year given year given\n",
- " A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\n",
- " 1 0 0 0 4000 4000\n",
- " 2 200 200 100 2000 2100\n",
- " 3 400 600 200 1333.33 1533.33\n",
- " 4 600 1200 300 1000 1300\n",
- " 5 800 2000 400 800 1200\n",
- " 6 1000 3000 500 666.67 1166.67\n",
- " 7 1200 4200 600 571.43 1171.43\n",
- "Economic life of the machine : 6 years\n",
- "Column C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\n",
- "Tabulation to determine economic life : \n",
- "End of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\n",
- " year cost at end 12% of year of PW of cumulative 12% total cost\n",
- " of year n maintenance maintenance maintenance n of year\n",
- " A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\n",
- " 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\n",
- " 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\n",
- " 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\n",
- " 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\n",
- " 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\n",
- " 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\n",
- " 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\n",
- " 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\n",
- " 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\n",
- " 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\n",
- "Economic life of the machine : 7 years\n",
- "For this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.2 Page 105"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "FC=20000.0;#in Rs.\n",
- "i=15.0;#in % per annum\n",
- "\n",
- "#result\n",
- "print \"The other details are summarized in Table 8.3. It can be seen from the book.\";\n",
- "print \"Total annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\";\n",
- "print \"In column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The other details are summarized in Table 8.3. It can be seen from the book.\n",
- "Total annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\n",
- "In column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.3 Page 107"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "FC=20000.0;#in Rs.\n",
- "i=15.0;#in % per annum\n",
- "\n",
- "#result\n",
- "print \"The details are summarized in Table 8.4. It can be seen from the book.\";\n",
- "print\"Total annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\";\n",
- "print\"(column E + Rs. 6000)* Column G\";\n",
- "print \"Column F * Column G\";\n",
- "print \"In column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \";\n",
- "print \"RESULT : Min annual equivalent cost for machine A : Rs. 2780\";\n",
- "print \"Min annual equivalent cost for machine B : Rs. 3672.30\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The details are summarized in Table 8.4. It can be seen from the book.\n",
- "Total annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\n",
- "(column E + Rs. 6000)* Column G\n",
- "Column F * Column G\n",
- "In column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \n",
- "RESULT : Min annual equivalent cost for machine A : Rs. 2780\n",
- "Min annual equivalent cost for machine B : Rs. 3672.30\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.4 Page 109"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#alternative 1\n",
- "Pprice=200000.0;#in Rs\n",
- "P=120000.0;#in Rs\n",
- "F=25000.0;#in Rs\n",
- "A=25000.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=6.0;#in years\n",
- "\n",
- "#calculation\n",
- "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE1,3);\n",
- "\n",
- "#Alternative 2\n",
- "P=150000.0;#in Rs\n",
- "F=20000.0;#in Rs\n",
- "A=14000.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=6.0;#in years\n",
- "\n",
- "#calcualion\n",
- "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE2,3);\n",
- "print \"Since, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\";\n",
- "print \"answer is bit different due to approximation error\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The annual equivalent cost(AE(12%)) of this alternative in RS. 51106.443\n",
- "The annual equivalent cost(AE(12%)) of this alternative in RS. 48019.343\n",
- "Since, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\n",
- "answer is bit different due to approximation error\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.5 Page 111"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initation of variable\n",
- "#alternative 1\n",
- "Pprice=50000.0;#in Rs\n",
- "P=15000.0;#in Rs\n",
- "F=8000.0;#in Rs\n",
- "A=14000.0;#in Rs\n",
- "i=15.0;#in % per annum\n",
- "n=5.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(15%)) of this alternative in RS. \",round(AE1,3);\n",
- "\n",
- "#Alternative 2\n",
- "P=65000.0;#in Rs\n",
- "F=13000.0;#in Rs\n",
- "A=9000.0;#in Rs\n",
- "i=15.0;#in % per annum\n",
- "n=20.0;#in years\n",
- "\n",
- "#calculation\n",
- "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(15%)) of this alternative in RS. : \",round(AE2,3);\n",
- "print \"Since, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The annual equivalent cost(AE(15%)) of this alternative in RS. 17288.209\n",
- "The annual equivalent cost(AE(15%)) of this alternative in RS. : 19257.596\n",
- "Since, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.6 Page 113"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#intiation of variable\n",
- "P=660000.0;#in Rs\n",
- "F=400000.0;#in Rs\n",
- "A=96000.0;#in Rs\n",
- "i=10.0;#in % per annum\n",
- "n=5.0;#in years\n",
- "\n",
- "#caculation\n",
- "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE1,3);\n",
- "\n",
- "#Alternative 2\n",
- "P=150000.0;#in Rs\n",
- "X=420000.0;#in Rs\n",
- "i=10.0;#in % per annum\n",
- "n=40.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "AE2=(P-X)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE2,3);\n",
- "print \"Since, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\";\n",
- "print \" calculations in the book is not accurate.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The annual equivalent cost(AE(10%)) of this alternative in RS. : 204587.345\n",
- "The annual equivalent cost(AE(10%)) of this alternative in RS. : 108389.958\n",
- "Since, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\n",
- " calculations in the book is not accurate.\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.7 Page 113"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#alternative 1\n",
- "P=10000.0;#in Rs\n",
- "F=1500.0;#in Rs\n",
- "A=1600.0;#in Rs\n",
- "i=15.0;#in % per annum\n",
- "n=7.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : \",round(AE1,3);\n",
- "\n",
- "#alternative 1 part 2\n",
- "P=10000;#in Rs\n",
- "F=800.0;#in Rs\n",
- "A=1000.0;#in Rs\n",
- "i=15.0;#in % per annum\n",
- "n=7.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. \",round(AE2,3);\n",
- "print \"Total annual equivalent cost of alternative in Rs. : \",round(AE1+AE2,3);\n",
- "\n",
- "\n",
- "#Alternative 2\n",
- "P=35000.0;#in Rs\n",
- "F=4000.0;#in Rs\n",
- "A=500.0;#in Rs\n",
- "i=15.0;#in % per annum\n",
- "n=7.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "AE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "\n",
- "print \"The annual equivalent cost of alternative 2 in RS.\",round(AE,3);\n",
- "print\"Since, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\";\n",
- "print \" calculations in the book is not accurate\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : 3868.063\n",
- "The annual equivalent cost(AE(10%)) of 10 hp motor in RS. 3331.315\n",
- "Total annual equivalent cost of alternative in Rs. : 7199.378\n",
- "The annual equivalent cost of alternative 2 in RS. 8551.171\n",
- "Since, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\n",
- " calculations in the book is not accurate\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.8 Page 115"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "P=10000.0;#in Rs\n",
- "F=4000.0;#in Rs\n",
- "A=500.0;#in Rs\n",
- "i=12.0;#in % per annum\n",
- "n=4.0;#in years\n",
- "\n",
- "#calcualtion\n",
- "AE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
- "X= (AE-1000*i/100-750)/0.3292+1000;\n",
- "#result\n",
- "print \"The annual equivalent cost(AE(15%)) of n in RSew machine : \",round(AE,3);\n",
- "print \"The comparative use value of old machine is Rs.\", round(X,3), \"which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \";\n",
- "print\"Therefore, it is advisable to replace the old machine with the new one.\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The annual equivalent cost(AE(15%)) of n in RSew machine : 2955.407\n",
- "The comparative use value of old machine is Rs. 7334.771 which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \n",
- "Therefore, it is advisable to replace the old machine with the new one.\n"
- ]
- }
- ],
- "prompt_number": 22
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.9 Page 117"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Intiation of Variable\n",
- "p1=0.07;#unitless\n",
- "p2=0.11;#unitless\n",
- "p3=0.12;#unitless\n",
- "p4=0.18;#unitless\n",
- "p5=0.21;#unitless\n",
- "p6=0.20;#unitless\n",
- "p7=0.11;#unitless\n",
- "N0=100.0;#no. of transistors\n",
- "\n",
- "#calcualtion\n",
- "N1=N0*p1;#no. of transistors\n",
- "N2=N0*p2;#no. of transistors\n",
- "N3=N0*p3;#no. of transistors\n",
- "N4=N0*p4;#no. of transistors\n",
- "N5=N0*p5;#no. of transistors\n",
- "N6=N0*p6;#no. of transistors\n",
- "N7=N0*p7;#no. of transistors\n",
- "Life=0;#in weeks\n",
- "p=[p1, p2, p3, p4, p5, p6, p7];#Unitless\n",
- "for i in range (7): \n",
- " Life=Life+(i+1)*p[i];\n",
- "\n",
- "#result\n",
- "print \"Expected life of each transistor in weeks : \",round(Life,3)\n",
- "print \"Average No. of failures/week : \",round(100/Life);\n",
- "\n",
- "#result of group replacement cost \n",
- "print \"Cost of transistor when replaced simultaneously = Rs. 3\";\n",
- "print \"Cost of transistor when replaced individually = Rs. 9\";\n",
- "print \"The cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\";\n",
- "print \"From table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\";\n",
- "print \"Individual replacement cost/week = Rs. 207\";\n",
- "print \"Minimum group replacement ost/week = Rs. 196.50\";\n",
- "print \"Since the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Expected life of each transistor in weeks : 4.39\n",
- "Average No. of failures/week : 23.0\n",
- "Cost of transistor when replaced simultaneously = Rs. 3\n",
- "Cost of transistor when replaced individually = Rs. 9\n",
- "The cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\n",
- "From table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\n",
- "Individual replacement cost/week = Rs. 207\n",
- "Minimum group replacement ost/week = Rs. 196.50\n",
- "Since the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8.10 Page 119"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "p1=(100.0-96)/100;#unitless\n",
- "p2=(96.0-89)/100;#unitless\n",
- "p3=(89.0-68)/100;#unitless\n",
- "p4=(68.0-37)/100;#unitless\n",
- "p5=(37.0-13)/100;#unitless\n",
- "p6=(13.0-0)/100;#unitless\n",
- "N0=1000.0;#no. of resistors\n",
- "\n",
- "#calculation\n",
- "N1=N0*p1;#no. of resistors\n",
- "N2=N0*p2+N1*p1;#no. of resistors\n",
- "N3=N0*p3+N1*p2+N2*p1;#no. of resistors\n",
- "N4=N0*p4+N1*p3+N2*p2+N3*p1;#no. of resistors\n",
- "N5=N0*p5+N1*p4+N2*p3+N3*p2+N4*p1;#no. of resistors\n",
- "N6=N0*p6+N1*p5+N2*p4+N3*p3+N4*p2+N5*p1 ;#no. of resistors\n",
- "\n",
- "Life=0;#in months\n",
- "p=[p1, p2, p3, p4, p5, p6];#Unitless\n",
- "for i in range (6): \n",
- " Life=Life+(i+1)*p[i];\n",
- "\n",
- "#result\n",
- "print \"Expected life of each transistor in weeks : \",round(Life,3)\n",
- "print \"Average No. of failures/week : \",round(1000/Life);\n",
- "\n",
- "#result of group replacement cost\n",
- "print \"Cost/transistor when replaced simultaneously = Rs. 4\";\n",
- "print \"Cost/transistor when replaced individually = Rs. 10\";\n",
- "print \"The cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\";\n",
- "print \"From table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\";\n",
- "print \"Individual replacement cost/month = Rs. 2480\";\n",
- "print \"Minimum group replacement ost/month = Rs. 2426.67\";\n",
- "print \"Since the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Expected life of each transistor in weeks : 4.03\n",
- "Average No. of failures/week : 248.0\n",
- "Cost/transistor when replaced simultaneously = Rs. 4\n",
- "Cost/transistor when replaced individually = Rs. 10\n",
- "The cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\n",
- "From table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\n",
- "Individual replacement cost/month = Rs. 2480\n",
- "Minimum group replacement ost/month = Rs. 2426.67\n",
- "Since the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\n"
- ]
- }
- ],
- "prompt_number": 10
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter10_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter10_1.ipynb new file mode 100755 index 00000000..8a14db85 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter10_1.ipynb @@ -0,0 +1,125 @@ +{ + "metadata": { + "name": "EE-10" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Evaluation of Public Alternatives" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 10.1 Page 138" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIi=4000000.0;#in Rs.\nAM=150000.0;#in Rs.\nAFS=600000.0;#in Rs.\nEinc=50000.0;#in Rs.\ni=12.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nCp=AM*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\nTPW=Ii+Cp;#in RS\n\n#result\nprint \"Total present worth of costs in RS. : \",round(TPW,3);\n\n#Total present worth of fuel savings:\nAI=600000.0;#in Rs.\nG=50000.0;#in Rs.\ni=12.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nA=AI+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100);#in RS\nBp=A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs.\nBCratio=Bp/(Ii+Cp);#unitless\n\n#result\nprint \"Present worth of fuel savings in Rs. : \",round(Bp,3);\nprint \"BCratio : \",round(BCratio,3);\nprint\"Since BC ratio is more than 1, the construction of the bridge across the river is justified.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total present worth of costs in RS. : 5021629.673\nPresent worth of fuel savings in Rs. : 5782527.265\nBCratio : 1.152\nSince BC ratio is more than 1, the construction of the bridge across the river is justified.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 10.2 Page 139" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIc=80000000.0;#in Rs.\nAps=6000000.0;#in Rs.\nAfs=3000000.0;#in Rs.\nAib=5000000.0;#in Rs.\nArb=2000000.0;#in Rs.\nAmc=3000000.0;#in Rs.\ni=12.0;#in % per annum\nn=50.0;#in years\n\n#calculation\nTAB=Afs+Aib+Arb;#in Rs.\nPW_B=TAB*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\n\n#result\nprint \"Total present worth of benefits in RS. : \",round(PW_B,3);\n\n#Present worth of costs:\nPW_C=Ic+Amc*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)-Aps*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\nBCratio=PW_B/PW_C;#unitless\n\n#result\nprint \"Present worth of costs in Rs. : \",round(PW_C,3);\nprint \"BCratio : \",round(BCratio,3);\nprint \"Since BC ratio is more than 1, the state govt. can implement the hydroelectric project.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total present worth of benefits in RS. : 83044984.884\nPresent worth of costs in Rs. : 55086504.535\nBCratio : 1.508\nSince BC ratio is more than 1, the state govt. can implement the hydroelectric project.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 10.3 Page 140" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nP=3000000.0;#in Rs.\nB=900000.0;#in Rs.\ni=10.0;#in % per annum\nn=5.0;#in years\n\n#calculation\nAE1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\nBCratio=B/AE1;#unitless\n\n#result\nprint \"Annual equivalent of initial cost in Rs. : \",round(AE1,3);\nprint \"BCratio : \",round(BCratio,3);\n\n#Alternative A2 : \nP=6000000.0;#in Rs.\nB=1500000.0;#in Rs.\ni=10.0;#in % per annum\nn=7.0;#in years\n\n#calculation\nAE2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\nBCratio=B/AE2;#unitless\n\n#result\nprint \"Annual equivalent of initial cost in Rs. : \",round(AE2,3);\nprint \"BCratio : \",round(BCratio,3);\nprint \"The benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Annual equivalent of initial cost in Rs. : 791392.442\nBCratio : 1.137\nAnnual equivalent of initial cost in Rs. : 1232432.998\nBCratio : 1.217\nThe benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 10.4 Page 141" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#cost of the state\nn=20.0;#in years\nP=2500000000.0;#in Rs.\nAgt=10000000.0;#in Rs.\nAi=1000000.0;#in Rs.\nCom=48000.0;#in Rs./year/employee\nC1=Com*300;#in Rs.\ni=10.0;#in % per annum\n\n#calculation\nC2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\nCA=C2+C1;#in Rs\n\n#result\nprint \"Annual equivalent initial cost in Rs. : \",round(C2,3);\nprint \"Total Annual equivalent cost of the project in Rs. : \",round(CA,3);\n\n#Benefit to the state : \nW=30000000.0;#in Rs.\nA1=W*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs.\nAgpy=10000000.0;#in ton/year\nA2=Agpy*(30-10);#in Rs.\nAvgAI=1000000.0;#in tons Km.\nG=20000000.0;#in Rs.\n\n#calculation\nA3=A2+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in Rs.\nBA=A1+A3;#in Rs\nBCratio=BA/CA;#unitless\nprint \"Annual equivalent average of transport cost saving in Rs. : \",round(A3,3);\nprint \"Total annual equivalent benefits to the state : \",round(BA,3);\nprint \"BCratio : \",round(BCratio,3);\nprint \"The benefit cost ratio is more than 1,the project is justified.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Annual equivalent initial cost in Rs. : 293649061.931\nTotal Annual equivalent cost of the project in Rs. : 308049061.931\nAnnual equivalent average of transport cost saving in Rs. : 330161500.91\nTotal annual equivalent benefits to the state : 333685289.653\nBCratio : 1.083\nThe benefit cost ratio is more than 1,the project is justified.\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 10.5 Page 143" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#project A\ni=9.0;#% per annum\nn=50.0;#in years\nP_A=150000000.0;#in RS.\nFcs_A=2500000;#in Rs.\nIb_A=3500000;#in Rs.\nRb_A=1000000;#in RS.\nOMC_A=2000000.0;#in Rs.\nPsy_A=10000000.0;#in Rs.\n\n#calculation\nAE_A=P_A*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\nCpy_A=AE_A+OMC_A-Psy_A;#in Rs.\nBpy_A=Fcs_A+Ib_A+Rb_A;#in Rs.\nBCratio_A=Bpy_A/Cpy_A;#unitless\n\n#result\nprint \"Costs/year : \",round(Cpy_A,3);\nprint \"Benefits/year : \",round(Bpy_A,3);\nprint \"BC Ratio of project A : \",round(BCratio_A,3)\n\n\n#Project B : \nP_B=250000000.0;#in Rs.\n\nOMC_B=2500000.0;#in Rs.\nPsy_B=12000000.0;#in Rs.\nFcs_B=3500000.0;#in Rs.\nIb_B=4500000.0;#in Rs.\nRb_B=2000000.0;#in RS.\nAE_B=P_B*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\nCpy_B=AE_B+OMC_B-Psy_B;#in Rs.\nBpy_B=Fcs_B+Ib_B+Rb_B;#in Rs.\nBCratio_B=Bpy_B/Cpy_B;#unitless\n\n#result\nprint \"Costs/year : \",round(Cpy_B,3);\nprint \"Benefits/year : \",round(Bpy_B,3);\nprint \"BC Ratio of project B : \",round(BCratio_B,3)\n\n#Project C : \nP_C=400000000.0;#in Rs.\nOMC_C=3500000.0;#in Rs.\nPsy_C=18000000.0;#in Rs.\nFcs_C=5000000.0;#in Rs.\nIb_C=6000000.0;#in Rs.\nRb_C=3500000.0;#in RS.\nAE_C=P_C*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\nBpy_C=Fcs_C+Ib_C+Rb_C;#in Rs.\nCpy_C=AE_C+OMC_C-Psy_C;#in Rs.\nBCratio_C=Bpy_C/Cpy_C;#unitless\n\n#result\nprint \"Costs/year : \",round(Cpy_C,3);\nprint \"Benefits/year : \",round(Bpy_C,3);\nprint \"BC Ratio of project C : \",round(BCratio_C,3)\nprint\"From the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Costs/year : 5684030.212\nBenefits/year : 7000000.0\nBC Ratio of project A : 1.232\nCosts/year : 13306717.021\nBenefits/year : 10000000.0\nBC Ratio of project B : 0.752\nCosts/year : 21990747.233\nBenefits/year : 14500000.0\nBC Ratio of project C : 0.659\nFrom the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\n" + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter11_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter11_1.ipynb new file mode 100755 index 00000000..6eb51dc1 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter11_1.ipynb @@ -0,0 +1,104 @@ +{ + "metadata": { + "name": "EE-11" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Inflation Adjusted Decisions" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 11.1 Page 148" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nprint \"Few steps are as follows : \";\nprint \"Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\";\nprint \"Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\";\nprint \"Formula : P*(1+IR)^n\";\nP=24000.0;#in Rs.\nIR=9.0;#in % per year\nAge=61.0;#in years\nfor n in range(21,31) :\n IV=P*(1+IR/100)**n;#in Rs\n print \"Age in years : \",Age,\". \"\"Inflated value of Rs. 24000 at end of year : \",n,\" in Rs. \",round(IV);\n Age=Age+1;#in Years\n\nPW=0;#For initialising\nn=21.0;#in years\nfor m in range(10) :\n A=P*(1+IR/100)**n;#in Rs\n n=n+1;\n i=15.0;#in % per year\n PW=PW+A/(1+i/100)**(m+1);\n\n#result\nprint \"Present equivalent of withdrawls in Rs. : \",round(PW,3);\n\n#The annual equivalent amount :\ni=15.0;#in % per year\nn=20.0;#in years\n#Formula : (A/F,i,n) : (i/100)/(((1+i/100)^n)-1) \nA=PW*(i/100)/(((1+i/100)**n)-1);#in Rs.\nprint \"The annual equivalent amount in Rs. : \",round(A,3);\nprint\"RECOMMENDATION : The person has to invest an amount of Rs. \",round(A,3),\" at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\"; ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Few steps are as follows : \nStep 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\nStep 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\nFormula : P*(1+IR)^n\nAge in years : 61.0 . Inflated value of Rs. 24000 at end of year : 21 in Rs. 146611.0\nAge in years : 62.0 . Inflated value of Rs. 24000 at end of year : 22 in Rs. 159806.0\nAge in years : 63.0 . Inflated value of Rs. 24000 at end of year : 23 in Rs. 174189.0\nAge in years : 64.0 . Inflated value of Rs. 24000 at end of year : 24 in Rs. 189866.0\nAge in years : 65.0 . Inflated value of Rs. 24000 at end of year : 25 in Rs. 206954.0\nAge in years : 66.0 . Inflated value of Rs. 24000 at end of year : 26 in Rs. 225580.0\nAge in years : 67.0 . Inflated value of Rs. 24000 at end of year : 27 in Rs. 245882.0\nAge in years : 68.0 . Inflated value of Rs. 24000 at end of year : 28 in Rs. 268011.0\nAge in years : 69.0 . Inflated value of Rs. 24000 at end of year : 29 in Rs. 292132.0\nAge in years : 70.0 . Inflated value of Rs. 24000 at end of year : 30 in Rs. 318424.0\nPresent equivalent of withdrawls in Rs. : 1013631.794\nThe annual equivalent amount in Rs. : 9894.537\nRECOMMENDATION : The person has to invest an amount of Rs. 9894.537 at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 11.2 Page 150" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nprint\"The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\";\nprint\"End of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\";\ni=20.0;#in per year\nCum=0.0;#initialising\nOp_cost=40000.0;#in RS.\nMain_cost=60000.0;#in Rs.\nOpMain=Op_cost+Main_cost;#in Rs.\nS=400000.0;#in Rs.\nfor n in range (1,16) :\n PF=1/((1+i/100)**n);\n PW=OpMain*PF;#in Rs.\n Cum=Cum+PW\n PW_S=PF*S;#in RS.\n TPW=500000.0+Cum-PW_S;#in Rs.\n AP=((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n AEM=TPW*AP;#in RS\n print \" \",n,\" \",Op_cost,\" \",Main_cost,\" \",OpMain,\" \",PF,\" \",PW,\" \",Cum,\" \",S,\" \",PW_S,\" \",TPW,\" \",AP,\" \",AEM;\n Op_cost=Op_cost+5000.0;#in Rs.\n Main_cost=Main_cost+6000.0;#in Rs.\n S=S-50000.0;#in Rs.\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\nEnd of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\n 1 40000.0 60000.0 100000.0 0.833333333333 83333.3333333 83333.3333333 400000.0 333333.333333 250000.0 1.2 300000.0\n 2 45000.0 66000.0 100000.0 0.694444444444 69444.4444444 152777.777778 350000.0 243055.555556 409722.222222 0.654545454545 268181.818182\n 3 50000.0 72000.0 100000.0 0.578703703704 57870.3703704 210648.148148 300000.0 173611.111111 537037.037037 0.474725274725 254945.054945\n 4 55000.0 78000.0 100000.0 0.48225308642 48225.308642 258873.45679 250000.0 120563.271605 638310.185185 0.386289120715 246572.280179\n 5 60000.0 84000.0 100000.0 0.401877572016 40187.7572016 299061.213992 200000.0 80375.5144033 718685.699588 0.33437970329 240313.910987\n 6 65000.0 90000.0 100000.0 0.33489797668 33489.797668 332551.01166 150000.0 50234.6965021 782316.315158 0.300705745867 235247.011053\n 7 70000.0 96000.0 100000.0 0.279081647234 27908.1647234 360459.176383 100000.0 27908.1647234 832551.01166 0.277423926347 230969.570539\n 8 75000.0 102000.0 100000.0 0.232568039361 23256.8039361 383715.980319 50000.0 11628.4019681 872087.578351 0.260609422409 227274.240084\n 9 80000.0 108000.0 100000.0 0.193806699468 19380.6699468 403096.650266 0.0 0.0 903096.650266 0.248079461672 224039.730836\n 10 85000.0 114000.0 100000.0 0.16150558289 16150.558289 419247.208555 -50000.0 -8075.27914449 927322.4877 0.238522756883 221187.516286\n 11 90000.0 120000.0 100000.0 0.134587985742 13458.7985742 432706.007129 -100000.0 -13458.7985742 946164.805703 0.231103794152 218662.276491\n 12 95000.0 126000.0 100000.0 0.112156654785 11215.6654785 443921.672608 -150000.0 -16823.4982177 960745.170825 0.225264964904 216422.227187\n 13 100000.0 132000.0 100000.0 0.0934638789872 9346.38789872 453268.060506 -200000.0 -18692.7757974 971960.836304 0.220620001083 214434.000758\n 14 105000.0 138000.0 100000.0 0.0778865658226 7788.65658226 461056.717089 -250000.0 -19471.6414557 980528.358544 0.216893055222 212669.791417\n 15 110000.0 144000.0 100000.0 0.0649054715189 6490.54715189 467547.264241 -300000.0 -19471.6414557 987018.905696 0.213882119838 211105.69587\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 11.3 Page 152" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIR=5.0;#in % per year\ni=15.0;#in % per year\n#Machine X :\nPpx=1500000.0;#in Rs.\nn=7.0;#in years\nS=200000.0;#in Rs.\nAMC=300000.0;#in Rs.\nprint \"End of year AMC InflationFactor InflatedAmount P/F PW\";\nPw=0;#For initialising\nfor n in range (1,8) :\n FP=(1+IR/100)**n\n IA=AMC*FP;#in Rs.\n PF=1/((1+i/100)**n);\n PW=IA*PF;#in Rs.\n Pw=Pw+PW;#in Rs.\n print\" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n\nprint \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\nPWX=Ppx+Pw-S*1/((1+i/100)**n);\nprint \"Present worth of machine X in Rs. : \",round(PWX,3);\n\n#Machine Y\n\nPpy=2000000.0;#in Rs.\nn=7.0;#in years\nS=300000.0;#in Rs.\nAMC=250000.0;#in Rs.\nprint \"End of year AMC InflationFactor InflatedAmount P/F PW\";\nPw=0;#For initialising\nfor n in range (1,8) :\n FP=(1+IR/100)**n\n IA=AMC*FP;#in Rs.\n PF=1/((1+i/100)**n);\n PW=IA*PF;#in Rs.\n Pw=Pw+PW;#in Rs.\n print \" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n\nPWY=Ppy+Pw-S*1/((1+i/100)**n);\n\n#result\nprint \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\nprint \"Present worth of machine Y in Rs. : \",round(PWY,3);\nprint \"Since the present worth of Machine X is less than Machine Y, select Machine X\"\nprint \" Calculations are not accurate in the book\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year AMC InflationFactor InflatedAmount P/F PW\n 1 300000.0 1.05 315000.0 0.869565217391 273913.043478\n 2 300000.0 1.1025 330750.0 0.756143667297 250094.517958\n 3 300000.0 1.157625 347287.5 0.657516232432 228347.168571\n 4 300000.0 1.21550625 364651.875 0.571753245593 208490.893043\n 5 300000.0 1.2762815625 382884.46875 0.497176735298 190361.25017\n 6 300000.0 1.34009564063 402028.692188 0.432327595912 173808.097981\n 7 300000.0 1.40710042266 422130.126797 0.375937039923 158694.35033\nPresent worth of inflated annual operating and maintenance cost in Rs. : 1483709.322\nPresent worth of machine X in Rs. : 2908521.914\nEnd of year AMC InflationFactor InflatedAmount P/F PW\n 1 250000.0 1.05 262500.0 0.869565217391 228260.869565\n 2 250000.0 1.1025 275625.0 0.756143667297 208412.098299\n 3 250000.0 1.157625 289406.25 0.657516232432 190289.307142\n 4 250000.0 1.21550625 303876.5625 0.571753245593 173742.410869\n 5 250000.0 1.2762815625 319070.390625 0.497176735298 158634.375141\n 6 250000.0 1.34009564063 335023.910156 0.432327595912 144840.081651\n 7 250000.0 1.40710042266 351775.105664 0.375937039923 132245.291942\nPresent worth of inflated annual operating and maintenance cost in Rs. : 1236424.435\nPresent worth of machine Y in Rs. : 3123643.323\nSince the present worth of Machine X is less than Machine Y, select Machine X\n Calculations are not accurate in the book\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 11.4 Page 156" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIR=6.0;#in % per year\ni=18.0;#in % per year\nAFR=5000000.0;#in Rs.\nn=7.0;#in years\nAI=500000.0;#in Rs.\nprint\"End of year AFR InflationFactor InflatedAmount P/F PW\";\nTPW=0;#Initialising\n\nfor n in range (1,6) :\n IF=(1+IR/100)**n;\n IA=IF*AFR;#in Rs.\n PF=1/((1+i/100)**n);\n PW=PF*IA;#in Rs.\n TPW=PW+TPW;#in Rs.\n print\" \",round(n),\" \",round(AFR,3),\" \",round(IF,3),\" \",round(IA,3),\" \",round(PF,3),\" \",round(PW,3);\n AFR=AFR+AI;#in Rs.\n\n \n#result\nprint \"The value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : \",round(TPW,3)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year AFR InflationFactor InflatedAmount P/F PW\n 1.0 5000000.0 1.06 5300000.0 0.847 4491525.424\n 2.0 5500000.0 1.124 6179800.0 0.718 4438236.139\n 3.0 6000000.0 1.191 7146096.0 0.609 4349334.645\n 4.0 6500000.0 1.262 8206100.24 0.516 4232615.212\n 5.0 7000000.0 1.338 9367579.043 0.437 4094655.134\nThe value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : 21606366.553\n" + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter12.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter12_1.ipynb index 75f40350..75f40350 100755 --- a/Engineering_Economics/Chapter12.ipynb +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter12_1.ipynb diff --git a/Engineering_Economics/Chapter13.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter13_1.ipynb index af23fcbb..af23fcbb 100755 --- a/Engineering_Economics/Chapter13.ipynb +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter13_1.ipynb diff --git a/Engineering_Economics/Chapter16.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter16_1.ipynb index 25b11449..86e57be5 100755 --- a/Engineering_Economics/Chapter16.ipynb +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter16_1.ipynb @@ -1,297 +1,134 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:2e3de312e11632c16b5c14fdb6f5e083c4b44aeeb327466acbfc97c2f088ee01"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Linear Progrmming"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 16.1 Page 200"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "#result\n",
- "print\"The data of the problem are summarized below : \";\n",
- "print\"Machine Products Limit on \";\n",
- "print\" P1 P2 machine hours\";\n",
- "print\"Lathe 5 10 60\";\n",
- "print\"Milling 4 4 40\";\n",
- "print\"Profit/unit 6 8\";\n",
- "print\"Let X1 be the production volume of the product.P1, and\";\n",
- "print\"X2 be the production volume of the product,P2.\";\n",
- "print\"The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \";\n",
- "print\"maximize Z = 6*X1 + 8*X2\";\n",
- "print\"subject to\";\n",
- "print\"5*X1+10*X2 <= 60\"\n",
- "print\"4*X1+4*X2 <= 40\"\n",
- "print\"X1,X2 >= 0\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The data of the problem are summarized below : \n",
- "Machine Products Limit on \n",
- " P1 P2 machine hours\n",
- "Lathe 5 10 60\n",
- "Milling 4 4 40\n",
- "Profit/unit 6 8\n",
- "Let X1 be the production volume of the product.P1, and\n",
- "X2 be the production volume of the product,P2.\n",
- "The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \n",
- "maximize Z = 6*X1 + 8*X2\n",
- "subject to\n",
- "5*X1+10*X2 <= 60\n",
- "4*X1+4*X2 <= 40\n",
- "X1,X2 >= 0\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 16.2 Page 200"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "print\"Let X1 be the No. of packets of food type1 suggested for babies, and\";\n",
- "print\"X2 be the No. of packets of food type1 suggested for babies.\";\n",
- "print\"The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \";\n",
- "print\"maximize Z = 2*X1 + 3*X2\";\n",
- "print\"subject to\";\n",
- "print\"X1+X2 >= 6\"\n",
- "print\"7*X1+X2 >= 14\";\n",
- "print\"X1,X2 >= 0\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Let X1 be the No. of packets of food type1 suggested for babies, and\n",
- "X2 be the No. of packets of food type1 suggested for babies.\n",
- "The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \n",
- "maximize Z = 2*X1 + 3*X2\n",
- "subject to\n",
- "X1+X2 >= 6\n",
- "7*X1+X2 >= 14\n",
- "X1,X2 >= 0\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 16.3 Page201"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "%pylab inline\n",
- "import matplotlib.pyplot as plt\n",
- "print\"Given the following LP model :\"\n",
- "print\"maximize Z = 6*X1 + 8*X2\";\n",
- "print\"subject to\";\n",
- "print\"5*X1+10*X2 <= 60\";\n",
- "print\"4*X1+4*X2 <= 40\";\n",
- "print\"X1,X2 >= 0\";\n",
- "print\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\n",
- "print\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\n",
- "print\"5*X1+10*X2 <= 60\";\n",
- "print\"When X1=0 : X2=6\";\n",
- "print\"When X2=0 : X1=12\";\n",
- "plt.plot([0,12],[6,0],'r')\n",
- "plt.plot([10,0],[0,10])\n",
- "plt.title('Graphical Plot')\n",
- "plt.show()\n",
- "print \"Consider the 2nd constraint in the form : in blue \";\n",
- "print \"4*X1+4*X2 <= 40\";\n",
- "print \"When X1=0 : X2=10\";\n",
- "print \"When X2=0 : X1=10\";\n",
- "print \"The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\";\n",
- "ZA=6*0+8*0;\n",
- "ZB=6*10+8*0;\n",
- "ZC=6*8+8*2;\n",
- "ZD=6*0+8*6;\n",
- "print \"Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \";\n",
- "print \"X1 = 8 X2 = 2 and Z(Optimum) is\",ZC;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Populating the interactive namespace from numpy and matplotlib\n",
- "Given the following LP model :\n",
- "maximize Z = 6*X1 + 8*X2\n",
- "subject to\n",
- "5*X1+10*X2 <= 60\n",
- "4*X1+4*X2 <= 40\n",
- "X1,X2 >= 0\n",
- "The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\n",
- "Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n",
- "5*X1+10*X2 <= 60\n",
- "When X1=0 : X2=6\n",
- "When X2=0 : X1=12\n"
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEKCAYAAADkYmWmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGzlJREFUeJzt3Xtw1PW5x/HPImCRSAgISXMbSiAl4ZbYCJUOkMq1TIlc\nFZBCCeBR9FTQ4TRlqglSIRGl2qnSc4jhIhboZQoUkKlg12IRQYNAUaRQUgKBdCgkIQYSCXv+SAkG\nNrfNb/d32fdrJjPmsrvfdfTh4Z29uDwej0cAAFtqZfYBAAC+Y4gDgI0xxAHAxhjiAGBjDHEAsDGG\nOADYGEMcjpCVlaUf/OAH9X6/T58++stf/uLX26hPQUGBWrVqpevXr7fo9gFvGOLwi40bN2rgwIEK\nCQlReHi4vv3tb2vlypV+uz2Xy9Xg9//2t79pyJAhfrsNt9utVq1a6e6771aHDh3Uq1cvrVmzptm3\n4esfFAheDHEY7uWXX9b8+fP14x//WMXFxSouLtavfvUr/fWvf1VVVZXXy7R0Sw3Ec9Yau42oqChd\nvnxZZWVlysnJ0dy5c3Xs2DG/nwvBjSEOQ5WWliozM1MrV67UhAkT1L59e0lSUlKS1q9fr7Zt20qS\nfvjDH+rxxx/XmDFjFBISIrfbre3btys5OVmhoaGKjY3V4sWLa6/3RpJYtWqVoqKiFBkZq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P1r3/d06ZNG090dLQnLy/P8+9//9szbNgw\nT8+ePT0jRozwXLp0yexj+uzW+/fGG294evTo4YmNja2dL48//niD18GTfQDAxpz3EAQACCIMcQCw\nMYY4ANgYQxwAbIwhDgA2xhAHABtjiAOAjTHEAcDG/h92IUTgGfYhtAAAAABJRU5ErkJggg==\n",
- "text": [
- "<matplotlib.figure.Figure at 0x51094e0>"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Consider the 2nd constraint in the form : in blue \n",
- "4*X1+4*X2 <= 40\n",
- "When X1=0 : X2=10\n",
- "When X2=0 : X1=10\n",
- "The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\n",
- "Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \n",
- "X1 = 8 X2 = 2 and Z(Optimum) is 64\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 16.4 Page 203"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initiation of variable\n",
- "%pylab inline\n",
- "import matplotlib.pyplot as plt\n",
- "print\"Given the following LP model :\"\n",
- "print \"minimize Z = 2*X1 + 3*X2\";\n",
- "print\"subject to\";\n",
- "print\"X1+X2 >= 6\";\n",
- "print\"7*X1+X2 >= 14\";\n",
- "print\"X1,X2 >= 0\";\n",
- "print\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\n",
- "print\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\n",
- "print\"X1+X2 = 6\";\n",
- "print\"When X1=0 : X2=6\";\n",
- "print\"When X2=0 : X1=6\";\n",
- "plt.plot([0,6],[6,0],'r')\n",
- "plt.plot([2,0],[0,14])\n",
- "plt.title('Graphical Plot')\n",
- "plt.show()\n",
- "print\"Consider the 2nd constraint in the form (in blue):\";\n",
- "print\"7*X1+X2 = 14\";\n",
- "print\"When X1=0 : X2=14\";\n",
- "print\"When X2=0 : X1=2\";\n",
- "print\"The Optimum solution will be in any one of the corners A, B and C\";\n",
- "print\"The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\"\n",
- "ZA=2*0+3*14;\n",
- "ZB=2*(4.0/3)+3*(14.0/3);\n",
- "ZC=2*6+3*0;\n",
- "\n",
- "#result\n",
- "print\"Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \";\n",
- "print \"X1 = 6 X2 = 0 and Z(Optimum) =\",ZC"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Populating the interactive namespace from numpy and matplotlib\n",
- "Given the following LP model :\n",
- "minimize Z = 2*X1 + 3*X2\n",
- "subject to\n",
- "X1+X2 >= 6\n",
- "7*X1+X2 >= 14\n",
- "X1,X2 >= 0\n",
- "The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\n",
- "Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n",
- "X1+X2 = 6\n",
- "When X1=0 : X2=6\n",
- "When X2=0 : X1=6\n"
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEKCAYAAAAyx7/DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGwVJREFUeJzt3Xlw1PX9x/HXpoiAkRAQNs3VtAHKHaJRig6yyBVtgcgl\nl9AgcayjLdJhRKeWwwoE1JZSpTNQUaQF2vKrUMCMgXYDipQhIFKoxYOMiRydoAlHhEiyvz8iKyHZ\nZHfz/e7u97vPx8zOJHt8v59VfPPsd7/frcPj8XgEALCMmHAvAAAQGAY3AFgMgxsALIbBDQAWw+AG\nAIthcAOAxTC4YQsLFizQgw8+6PPxPn36aPfu3abuw5eSkhLFxMSotra2RfsHrmJwwxQbN27UgAED\nFBsbK6fTqR/84AdatWqVaftzOBxNPv7vf/9bd999t2n7cLvdiomJ0c0336z27durR48eevXVVwPe\nR7B/OSC6MLhhuBdeeEGzZ8/Wk08+qTNnzujMmTP6/e9/r3feeUfV1dWNvqalNRqK68ia20dSUpLO\nnz+vc+fOKT8/X3l5efrggw9MXxeiD4MbhqqsrNT8+fO1atUqjR07VjfddJMkqX///lq/fr1at24t\nSfrxj3+sn/zkJ7rvvvsUGxsrt9ut7du3KzMzU3FxcUpNTdXChQu92716uGH16tVKSkpSYmKiXnjh\nBe/jDodD1dXVmjFjhtq3b68+ffqouLjY+3haWpp27dolSaqpqdHixYvVtWtXtW/fXllZWfrss88k\nST/72c+UmpqquLg4ZWVl6e233w7qn8OYMWMUHx+vY8eONXjs5MmTGj16tDp16qRu3bppzZo1kqSC\nggItWbJEmzZt0s0336zMzMyg9g37Y3DDUO+++64uX76sMWPGNPvcDRs26JlnntGFCxd01113KTY2\nVuvXr1dlZaW2b9+uVatWacuWLfVe43a79dFHH+mtt95Sfn6+dxh7PB5t3bpVkydPVmVlpUaPHq3H\nHnvM+zqHw+E91PHiiy9q48aNevPNN3Xu3DmtXbtWbdu2lSTdcccdOnz4sL744gtNmTJFEyZM8Pm/\nEnypra3V3/72N1VUVKhv374NHp80aZJSU1N16tQp/fWvf9XTTz+tf/7zn8rOztbTTz+tSZMm6fz5\n8zp06FBA+0X0YHDDUOXl5brlllsUE/PNH60777xT8fHxateuXb2CzcnJ0cCBAyVJN954owYPHqze\nvXtLkvr27atJkyapqKio3vbnz5+vtm3bqk+fPsrNzdWGDRu8jw0aNEjZ2dlyOByaNm2aDh8+3Oga\n16xZo+eee07dunXz7qtjx46SpKlTpyo+Pl4xMTGaM2eOLl++rP/+979+vfeTJ08qPj5enTt31rPP\nPqv169d793FVaWmp9u7dq/z8fLVu3VoZGRmaNWuW1q1bJ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uv/++7V///4wr8gYycnJSk5O1u233y5JGj9+\nvA4ePOjz+YYP7qysLH344YcqKSlRdXW1Nm3apNGjRxu9G5jA4/HooYceUq9evTR79uxwL8dw5eXl\nqqiokCR9+eWXKiwsVGZmZphXZZzFixertLRUJ06c0MaNG3XPPfdo3bp14V6WYaqqqnT+/HlJ0sWL\nF/XWW2/Z5uyuhIQEpaSk6Pjx45KknTt3qnfv3j6fH9QFOE2x+8U5kydPVlFRkc6ePauUlBQtWrRI\nubm54V6WId555x2tX7/ee7qVJC1ZskTZ2dlhXpkxTp06pRkzZqi2tla1tbV68MEHNXTo0HAvyzR2\nO2x55swZ3X///ZLqDi1MnTpVI0aMCPOqjLNy5UpNnTpV1dXVSk9P19q1a30+lwtwAMBi7PnRMwDY\nGIMbACyGwQ0AFsPgBgCLYXADgMUwuAHAYhjcAGAxDG4AsJj/B8cOct+Nyla5AAAAAElFTkSuQmCC\n",
- "text": [
- "<matplotlib.figure.Figure at 0x81f27b8>"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Consider the 2nd constraint in the form (in blue):\n",
- "7*X1+X2 = 14\n",
- "When X1=0 : X2=14\n",
- "When X2=0 : X1=2\n",
- "The Optimum solution will be in any one of the corners A, B and C\n",
- "The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\n",
- "Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \n",
- "X1 = 6 X2 = 0 and Z(Optimum) = 12\n"
- ]
- }
- ],
- "prompt_number": 15
- }
- ],
- "metadata": {}
- }
- ]
+{ + "metadata": { + "name": "Untitled2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Linear Progrmming" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 16.1 Page 200" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#result\nprint\"The data of the problem are summarized below : \";\nprint\"Machine Products Limit on \";\nprint\" P1 P2 machine hours\";\nprint\"Lathe 5 10 60\";\nprint\"Milling 4 4 40\";\nprint\"Profit/unit 6 8\";\nprint\"Let X1 be the production volume of the product.P1, and\";\nprint\"X2 be the production volume of the product,P2.\";\nprint\"The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \";\nprint\"maximize Z = 6*X1 + 8*X2\";\nprint\"subject to\";\nprint\"5*X1+10*X2 <= 60\"\nprint\"4*X1+4*X2 <= 40\"\nprint\"X1,X2 >= 0\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The data of the problem are summarized below : \nMachine Products Limit on \n P1 P2 machine hours\nLathe 5 10 60\nMilling 4 4 40\nProfit/unit 6 8\nLet X1 be the production volume of the product.P1, and\nX2 be the production volume of the product,P2.\nThe corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \nmaximize Z = 6*X1 + 8*X2\nsubject to\n5*X1+10*X2 <= 60\n4*X1+4*X2 <= 40\nX1,X2 >= 0\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 16.2 Page 200" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nprint\"Let X1 be the No. of packets of food type1 suggested for babies, and\";\nprint\"X2 be the No. of packets of food type1 suggested for babies.\";\nprint\"The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \";\nprint\"maximize Z = 2*X1 + 3*X2\";\nprint\"subject to\";\nprint\"X1+X2 >= 6\"\nprint\"7*X1+X2 >= 14\";\nprint\"X1,X2 >= 0\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Let X1 be the No. of packets of food type1 suggested for babies, and\nX2 be the No. of packets of food type1 suggested for babies.\nThe corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \nmaximize Z = 2*X1 + 3*X2\nsubject to\nX1+X2 >= 6\n7*X1+X2 >= 14\nX1,X2 >= 0\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 16.3 Page201" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n%pylab inline\nimport matplotlib.pyplot as plt\nprint\"Given the following LP model :\"\nprint\"maximize Z = 6*X1 + 8*X2\";\nprint\"subject to\";\nprint\"5*X1+10*X2 <= 60\";\nprint\"4*X1+4*X2 <= 40\";\nprint\"X1,X2 >= 0\";\nprint\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\nprint\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\nprint\"5*X1+10*X2 <= 60\";\nprint\"When X1=0 : X2=6\";\nprint\"When X2=0 : X1=12\";\nplt.plot([0,12],[6,0],'r')\nplt.plot([10,0],[0,10])\nplt.title('Graphical Plot')\nplt.show()\nprint \"Consider the 2nd constraint in the form : in blue \";\nprint \"4*X1+4*X2 <= 40\";\nprint \"When X1=0 : X2=10\";\nprint \"When X2=0 : X1=10\";\nprint \"The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\";\nZA=6*0+8*0;\nZB=6*10+8*0;\nZC=6*8+8*2;\nZD=6*0+8*6;\nprint \"Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \";\nprint \"X1 = 8 X2 = 2 and Z(Optimum) is\",ZC;", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Populating the interactive namespace from numpy and matplotlib\nGiven the following LP model :\nmaximize Z = 6*X1 + 8*X2\nsubject to\n5*X1+10*X2 <= 60\n4*X1+4*X2 <= 40\nX1,X2 >= 0\nThe introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\nCompute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n5*X1+10*X2 <= 60\nWhen X1=0 : X2=6\nWhen X2=0 : X1=12\n" + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEKCAYAAADkYmWmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGzlJREFUeJzt3Xtw1PW5x/HPImCRSAgISXMbSiAl4ZbYCJUOkMq1TIlc\nFZBCCeBR9FTQ4TRlqglSIRGl2qnSc4jhIhboZQoUkKlg12IRQYNAUaRQUgKBdCgkIQYSCXv+SAkG\nNrfNb/d32fdrJjPmsrvfdfTh4Z29uDwej0cAAFtqZfYBAAC+Y4gDgI0xxAHAxhjiAGBjDHEAsDGG\nOADYGEMcjpCVlaUf/OAH9X6/T58++stf/uLX26hPQUGBWrVqpevXr7fo9gFvGOLwi40bN2rgwIEK\nCQlReHi4vv3tb2vlypV+uz2Xy9Xg9//2t79pyJAhfrsNt9utVq1a6e6771aHDh3Uq1cvrVmzptm3\n4esfFAheDHEY7uWXX9b8+fP14x//WMXFxSouLtavfvUr/fWvf1VVVZXXy7R0Sw3Ec9Yau42oqChd\nvnxZZWVlysnJ0dy5c3Xs2DG/nwvBjSEOQ5WWliozM1MrV67UhAkT1L59e0lSUlKS1q9fr7Zt20qS\nfvjDH+rxxx/XmDFjFBISIrfbre3btys5OVmhoaGKjY3V4sWLa6/3RpJYtWqVoqKiFBkZqZdffrn2\n+y6XS1VVVZo5c6Y6dOigPn366OOPP679frdu3bR7925JUnV1tZYuXaoePXqoQ4cOSklJ0dmzZyVJ\nTz31lGJjYxUaGqqUlBS9//77Pv17ePDBBxUWFqZPP/30tu8VFRUpLS1NnTt3Vs+ePZWbmytJ2rlz\np5YtW6ZNmzbp7rvvVnJysk+3jeDCEIehPvjgA1VWVurBBx9s9Gc3bNigZ599VuXl5frOd76jkJAQ\nrV+/XqWlpdq+fbtWrlypLVu21LmM2+3WiRMn9Kc//Uk5OTm1g9nj8Wjr1q2aOnWqSktLlZaWpief\nfLL2ci6XqzaHrFixQhs3btTbb7+tsrIyrV69Wu3atZMkDRgwQIcOHdKlS5c0bdo0TZ48ud6/PdTn\n+vXr+sMf/qCSkhL17dv3tu9PmTJFsbGxOnfunH73u99p0aJF+vOf/6zRo0dr0aJFmjJlii5fvqyD\nBw8263YRnBjiMNSFCxd0zz33qFWrm/9pDRo0SGFhYbrrrrvqbLbjxo3T/fffL0m68847NXToUPXu\n3VuS1LdvX02ZMkXvvfdenevPzMxUu3bt1KdPH82aNUsbNmyo/d7gwYM1evRouVwuTZ8+XYcOHfJ6\nxtzcXL3wwgvq2bNn7W116tRJkvTII48oLCxMrVq10tNPP63Kykp9/vnnTbrvRUVFCgsLU5cuXbRk\nyRKtX7++9jZuKCws1N69e5WTk6O2bduqf//+mjNnjtatWyep5g8jXs4IzdHa7APAWTp37qwLFy7o\n+vXrtYN87969kqSYmJja9u1yuRQdHV3nsh9++KEyMjJ09OhRVVVVqbKyUg899FCdn4mJian959jY\nWB05cqT28/Dw8Np/vuuuu3T16tU657jhzJkziouL83r+l156SXl5eSoqKpLL5VJZWZkuXLjQpPse\nGRmpwsLCBn+mqKhInTp1qs1MN+7HRx991KTbAG7FJg5D3X///brzzju1efPmZl922rRpGjdunM6c\nOaOSkhI99thjt/3C8/Tp03X+OSoqqtm3ExMToxMnTtz29T179mj58uX67W9/q5KSEl26dEmhoaGG\nbsaRkZG6ePGiysvLa792+vTp2j/QGnuUDXArhjgM1bFjR2VmZmrevHn6/e9/r8uXL+v69ev65JNP\n9MUXX9T+nLfBWF5errCwMLVt21b79+/Xr3/969uG2s9+9jNduXJFR48e1Zo1a/Twww83+4xz5szR\ns88+qxMnTsjj8ejw4cO1g7V169a65557VFVVpeeff15lZWXN/5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\n", + "text": "<matplotlib.figure.Figure at 0x51094e0>" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "Consider the 2nd constraint in the form : in blue \n4*X1+4*X2 <= 40\nWhen X1=0 : X2=10\nWhen X2=0 : X1=10\nThe closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\nSince the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \nX1 = 8 X2 = 2 and Z(Optimum) is 64\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 16.4 Page 203" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n%pylab inline\nimport matplotlib.pyplot as plt\nprint\"Given the following LP model :\"\nprint \"minimize Z = 2*X1 + 3*X2\";\nprint\"subject to\";\nprint\"X1+X2 >= 6\";\nprint\"7*X1+X2 >= 14\";\nprint\"X1,X2 >= 0\";\nprint\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\nprint\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\nprint\"X1+X2 = 6\";\nprint\"When X1=0 : X2=6\";\nprint\"When X2=0 : X1=6\";\nplt.plot([0,6],[6,0],'r')\nplt.plot([2,0],[0,14])\nplt.title('Graphical Plot')\nplt.show()\nprint\"Consider the 2nd constraint in the form (in blue):\";\nprint\"7*X1+X2 = 14\";\nprint\"When X1=0 : X2=14\";\nprint\"When X2=0 : X1=2\";\nprint\"The Optimum solution will be in any one of the corners A, B and C\";\nprint\"The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\"\nZA=2*0+3*14;\nZB=2*(4.0/3)+3*(14.0/3);\nZC=2*6+3*0;\n\n#result\nprint\"Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \";\nprint \"X1 = 6 X2 = 0 and Z(Optimum) =\",ZC", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Populating the interactive namespace from numpy and matplotlib\nGiven the following LP model :\nminimize Z = 2*X1 + 3*X2\nsubject to\nX1+X2 >= 6\n7*X1+X2 >= 14\nX1,X2 >= 0\nThe introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\nCompute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \nX1+X2 = 6\nWhen X1=0 : X2=6\nWhen X2=0 : X1=6\n" + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEKCAYAAAAyx7/DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGwVJREFUeJzt3Xlw1PX9x/HXpoiAkRAQNs3VtAHKHaJRig6yyBVtgcgl\nl9AgcayjLdJhRKeWwwoE1JZSpTNQUaQF2vKrUMCMgXYDipQhIFKoxYOMiRydoAlHhEiyvz8iKyHZ\nZHfz/e7u97vPx8zOJHt8v59VfPPsd7/frcPj8XgEALCMmHAvAAAQGAY3AFgMgxsALIbBDQAWw+AG\nAIthcAOAxTC4YQsLFizQgw8+6PPxPn36aPfu3abuw5eSkhLFxMSotra2RfsHrmJwwxQbN27UgAED\nFBsbK6fTqR/84AdatWqVaftzOBxNPv7vf/9bd999t2n7cLvdiomJ0c0336z27durR48eevXVVwPe\nR7B/OSC6MLhhuBdeeEGzZ8/Wk08+qTNnzujMmTP6/e9/r3feeUfV1dWNvqalNRqK68ia20dSUpLO\nnz+vc+fOKT8/X3l5efrggw9MXxeiD4MbhqqsrNT8+fO1atUqjR07VjfddJMkqX///lq/fr1at24t\nSfrxj3+sn/zkJ7rvvvsUGxsrt9ut7du3KzMzU3FxcUpNTdXChQu92716uGH16tVKSkpSYmKiXnjh\nBe/jDodD1dXVmjFjhtq3b68+ffqouLjY+3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1tXrvvfd08eJF\n7/MaG4YXLlxQfHy8Wrdurf379+tPf/pTg0H2q1/9Sl9++aWOHj2qV199VQ888EDAa5w1a5aeeeYZ\nffTRR/J4PHr//fe9w7RVq1a65ZZbVF1drUWLFuncuXOB/0NoQkpKiu6880499dRTunz5st5//329\n8sormjZtmiQpISFBJSUlHC5BkxjcMNzcuXP14osvatmyZUpISFBCQoIeeeQRLVu2zHtM+9oPC696\n+eWX9ctf/lLt27fXs88+2+hQHjx4sLp27aphw4Zp7ty5GjZsmM/t+arXOXPmaOLEiRoxYoTi4uKU\nl5enS5cuaeTIkcrOzlb37t2Vlpamtm3bKjU1td72mipifx/bsGGDSkpKlJiYqLFjx2rRokW65557\nJEkTJkyQVHfIKSsry+f2EN0cTf0fKcycOVPbt29Xly5d6h1LlOrO1Z07d67Ky8u9H+wAZikpKdH3\nvvc9XblypcExayDaNPlfQG5urgoKChrcX1paqsLCQn3nO98xbWEAgMY1ObgHDRqk+Pj4BvfPmTNH\ny5YtM21RQGP44A6oE/DpgFu2bFFycrL69etnxnqARqWlpammpibcywAiQkCDu6qqSosXL1ZhYaH3\nPj79BoDQCmhwf/zxxyopKVFGRoakugsZbrvtNu3fv19dunSp99xvfaurams/Nm6lABAF0tPTG73O\noB5PM06cOOHp06dPo4+lpaV5zp492+hjkjyjRjW3deuaP39+uJdgKt6fddn5vXk89n9/foxlT5Mf\nTk6ePFl33nmnjh8/rpSUFK1du7be4819WFRcXHcDABinyUMl136BT2M++eSTJh+fN09auFDaujXw\nhQEAGmfqlQx5efatbpfLFe4lmIr3Z112fm+S/d+fP5q8crJFG3Y45PF4tHKlVFhIdQOAP67Oziaf\nY/bgvnRJSk+vG9y33WbGngDAPvwZ3KZ/6UObNt8c6wYAtJzpxS2J6gYAP0VEcUtUNwAYKSTFLVHd\nAOCPiCluieoGAKOErLglqhsAmhNRxS1R3QBghJAWt0R1A0BTIq64JaobAFoq5MUtUd0A4EtEFrdE\ndQNAS4SluCWqGwAaE7HFLVHdABC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AMBi7PnRMwDY\nGIMbACyGwQ0AFsPgBgCLYXADgMUwuAHAYhjcAGAxDG4AsJj/B8cOct+Nyla5AAAAAElFTkSuQmCC\n", + "text": "<matplotlib.figure.Figure at 0x81f27b8>" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "Consider the 2nd constraint in the form (in blue):\n7*X1+X2 = 14\nWhen X1=0 : X2=14\nWhen X2=0 : X1=2\nThe Optimum solution will be in any one of the corners A, B and C\nThe objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\nSince the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \nX1 = 6 X2 = 0 and Z(Optimum) = 12\n" + } + ], + "prompt_number": 15 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "Example 16.5 Page", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] }
\ No newline at end of file diff --git a/Engineering_Economics/Chapter1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter1_1.ipynb index 64198a89..64198a89 100755 --- a/Engineering_Economics/Chapter1.ipynb +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter1_1.ipynb diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter2_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter2_1.ipynb new file mode 100755 index 00000000..d848674b --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter2_1.ipynb @@ -0,0 +1,146 @@ +{ + "metadata": { + "name": "EE-2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Elementary Economic Analysis" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.1 Page 16" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#Part a \nw1=1.2;#in Kg\nc1=80.0;#cost of making aluminium casting in Rs/Kg\nc2=150.0;#ost of machining aluminium casting per unit in Rs\n\n#calculation\nTc1=c1*w1+c2;#Total cost of jet engine part made of aluminium per unit in Rs\n\n#result\nprint \"Total cost of jet engine part made of aluminium per unit in Rs \",round(Tc1,3)\n\n#Part b \nw2=1.35;#in Kg\nc1=35.0;#in Rs/Kg\nc2=170.0;#in Rs\nc3=1300.0;#in Rs/Kg\n\n#calculation\nTc2=c1*w2+c2+c3*(w2-w1);#in Rs\n\n#result\nprint \"Total cost of jet engine part made of steel per unit in Rs : \",round(Tc2,3);\nprint \"DECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs \",round(Tc2-Tc1,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost of jet engine part made of aluminium per unit in Rs 246.0\nTotal cost of jet engine part made of steel per unit in Rs : 412.25\nDECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs 166.25\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.2, Page 17" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#Part a \nwood=0.1;#in m^3\nWoodCost=12000.0;#in Rs/m^3\nTable=1;#in units\nTableTopCost=3000.0;#in Rs/unit\nLegBushes=4.0;#units\nLegBushesCost=10.0;#Rs/units\nNails=100.0;#in grams\nNailsCost=300.0;#in Rs/Kg\nTotalLabour=15.0;#in Hours\nTotalLabourCost=50.0;#in Rs/Hours\n\n#calcualtion\nWoodCostframelegs=WoodCost*wood;#in Rs\nWoodTopCost=3000.0;#in Rs\nBushesCost=LegBushesCost*LegBushes;#in Rs\nNailsCost=Nails*NailsCost/1000;#in Rs\nLabourCost=TotalLabourCost*TotalLabour;#in Rs\nTotalCost1=WoodCostframelegs+WoodTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n\n#result\nprint \"Cost of Table with wooden top in Rs \",round(TotalCost1,3)\n\n#given data for table with granite top\n#Part b \nwood=0.15;#in m^3\nWoodCost=12000.0;#in Rs/m^3\nGranite=1.62;#in m^2\nGraniteCost=800.0;#in Rs/m^2\nLegBushes=4.0;#units\nLegBushesCost=25.0;#Rs/units\nNails=50.0;#in grams\nNailsCost=300.0;#in Rs/Kg\nTotalLabour=8.0;#in Hours\nTotalLabourCost=50.0;#in Rs/Hours\n\n\nWoodCostframelegs=WoodCost*wood;#in Rs\nGraniteTopCost=Granite*GraniteCost;#in Rs\nBushesCost=LegBushesCost*LegBushes;#in Rs\nNailsCost=Nails*NailsCost/1000;#in Rs\nLabourCost=TotalLabourCost*TotalLabour;#in Rs\nTotalCost2=WoodCostframelegs+GraniteTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n\n#result\nprint \"Cost of Table with Granite top in Rs \",round(TotalCost2,3);\nprint \"Economic advantage of table with granite top in Rs \",round(TotalCost1-TotalCost2,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Cost of Table with wooden top in Rs 5020.0\nCost of Table with Granite top in Rs 3611.0\nEconomic advantage of table with granite top in Rs 1409.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.3 Page 19" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#design A\nLatheCost=200.0;#in Rs/hour\ngrinderCost=150.0;#in Rs/hour\nHoursOfLathe=16.0;#in hours/1000Unit\nHoursOfGrinder=4.5;#in hours/1000Unit\n\n#calcualtion\nTotalCostA=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n\n#result\nprint \"Total cost of design A per 100,000 units \",round(TotalCostA*100000.0/1000,3);\n\n# Design B\nHoursOfLathe=7.0;#in hours/1000Unit\nHoursOfGrinder=12.0;#in hours/1000Unit\nTotalCostB=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n\n#result\nprint \"Total cost of design A per 100,000 units\",round(TotalCostB*100000.0/1000,3);\nprint \"Economic advantage of design B over design A per 100,000 units in Rs \",round(TotalCostA-TotalCostB,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost of design A per 100,000 units 387500.0\nTotal cost of design A per 100,000 units 320000.0\nEconomic advantage of design B over design A per 100,000 units in Rs 675.0\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.4,Page 20" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nfrom math import pi\nTanks=4.0;#units\nTankDia=5.2;#in meter\n\n#calcualtion\nTankRad=TankDia/2;#in meters\nTankHeight=7;#in meters\nHeightDiaRatio=TankHeight/TankDia;#unitless\nVolPerTank=(22/7)*TankRad**2*TankHeight;#in m^3\nh=VolPerTank/(pi)*64;#in meters\nr=h/8;#in meters\nd=2*r;#in meters\nCostNewDesign=900000*(100.0/111);#in Rs\n\n#result\nprint \"Expected savings by redesign in Rs \",round(900000-CostNewDesign,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Expected savings by redesign in Rs 89189.189\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.5,Page 21" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#steel frame\ndistance=2500.0;#in Km\nTransCost=1.0;#in Rs/Kg/100Km\nSteelFramePrice=1000.0;#in Rs/Unit\nSteelFrameWeight=75.0;#in Kg/Unit\n\n#calculation\nTotalCost1=SteelFramePrice+TransCost*SteelFrameWeight*distance/100;#in Rs\n\n#result\nprint \"Total cost of steel window frame per unit in Rs \",round(TotalCost1,3);\n\n# Aluminium window frame\nAlumilniumFramePrice=1500.0;#in Rs/Unit\nAlumilniumFrameWeight=28.0;#in Kg/Unit\n\n#calculation\nTotalCost2=AlumilniumFramePrice+TransCost*AlumilniumFrameWeight*distance/100;#in Rs\n\n#result\nprint \"Total cost of Alumilnium window frame per unit in Rs \",round(TotalCost2,3);\nprint \"DECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs \",round(TotalCost1-TotalCost2,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost of steel window frame per unit in Rs 2875.0\nTotal cost of Alumilnium window frame per unit in Rs 2200.0\nDECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs 675.0\n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 2.6,Page 23" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#Cost of component using process sequence 1\nprint\"The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\" ;\nprint \"Calculations are summarized in form of table below : \";\nprint \"Operation Operation Time Machine Hour rate Cost\";\nprint \" No. Min Hour Rs. Rs.\";\nprint \" 1 Turning 5 0.083 200 16.60\";\nprint \" 2 Milling 8 0.133 400 53.20\";\nprint \" 3 Shapiing 10 0.167 350 58.45\";\nprint \" 4 Drilling 3 0.050 300 15.00\";\nprint \" Total 143.25\";\n\n#Cost of component using process sequence 2\nprint \"The process sequence 2 of the component is as follows : Turning - Milling - Drilling\" ;\nprint \"Calculations are summarized in form of table below : \";\nprint \"Operation Operation Time Machine Hour rate Cost\";\nprint \" No. Min Hour Rs. Rs.\";\nprint \" 1 Turning 5 0.083 200 16.60\";\nprint \" 2 Milling 14 0.233 400 93.20\";\nprint \" 4 Drilling 3 0.050 300 15.00\";\nprint \" Total 124.80\";\n\n#Cost of component using process sequence 3\nprint \"The process sequence 3 of the component is as follows : Only CNC operations\" ;\nprint \"Calculations are summarized in form of table below : \";\nprint \"Operation Operation Time Machine Hour rate Cost\";\nprint \" No. Min Hour Rs. Rs.\";\nprint \" 1 CNC 8 0.133 1000 133\";\n\nprint \"The process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\nCalculations are summarized in form of table below : \nOperation Operation Time Machine Hour rate Cost\n No. Min Hour Rs. Rs.\n 1 Turning 5 0.083 200 16.60\n 2 Milling 8 0.133 400 53.20\n 3 Shapiing 10 0.167 350 58.45\n 4 Drilling 3 0.050 300 15.00\n Total 143.25\nThe process sequence 2 of the component is as follows : Turning - Milling - Drilling\nCalculations are summarized in form of table below : \nOperation Operation Time Machine Hour rate Cost\n No. Min Hour Rs. Rs.\n 1 Turning 5 0.083 200 16.60\n 2 Milling 14 0.233 400 93.20\n 4 Drilling 3 0.050 300 15.00\n Total 124.80\nThe process sequence 3 of the component is as follows : Only CNC operations\nCalculations are summarized in form of table below : \nOperation Operation Time Machine Hour rate Cost\n No. Min Hour Rs. Rs.\n 1 CNC 8 0.133 1000 133\nThe process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\n" + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter3_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter3_1.ipynb new file mode 100755 index 00000000..12f9a0ae --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter3_1.ipynb @@ -0,0 +1,209 @@ +{ + "metadata": { + "name": "EE-3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Interest Formulas and their Application" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.1 Page 29" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nP=20000.0;#in rupees\nn=10.0;#in years\ni=18.0;#% per annum\n\n#calculation\nF=P*(1+i/100)**n;\n\n#result\nprint \"Maturity value after 18 years is \", round(F,3),\" Rupees.\";\nprint \" Ans in the book is not correct\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Maturity value after 18 years is : 104676.711 Rupees.\n Ans in the book is not correct\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.2 Page 30" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nF=100000.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nP=F/((1.0+i/100.0)**n);\n\n#result\nprint \"The person has to invest \", round(P,3),\" Rupees.\";\nprint \" Ans in the book is not correct\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The person has to invest 24718.471 Rupees.\n Ans in the book is not correct\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 3.3 Page 31" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nA=10000.0;#in rupees\nn=25.0;#in years\ni=20.0;#% per annum\n\n#calculation\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"The future sum of the annual equal payment after 25 years is \",round(F,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future sum of the annual equal payment after 25 years is 4719810.832 Rupees.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.4 Page 32" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nF=500000.0;#in rupees\nn=15.0;#in years\ni=18.0;#% per annum\n\n#calculation\nA=F*((i/100)/((1+i/100)**n-1));\n\n#result\nprint \"The annual equal ammount which must be deposited for 15 years is \",round(A,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equal ammount which must be deposited for 15 years is 8201.391 Rupees.\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 3.5 Page 33" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiasation of variable\nA=1000000.0;#in rupees\nn=20.0;#in years\ni=15.0;#% per annum\n\n#calculation\nP=A*(((1+i/100)**n-1)/((i/100)*(1+i/100)**n));\n\n#result\nprint \"The amount of reserve which must be setup now is : \",round(P,3),\" Rupees\";\nprint \" Ans in the book is not correct\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The amount of reserve which must be setup now is : 6259331.474 Rupees\n Ans in the book is not correct\n" + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.6 Page 34" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nP=1000000.0;#in rupees\nn=15.0;#in years\ni=18.0;#% per annum\n\n#calculation\nA=P*(((i/100)*(1+i/100)**n)/((1+i/100)**n-1));\n\n#result\nprint \"The annual equivalent installment to be paid by the company to the bank is \",round(A),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent installment to be paid by the company to the bank is : 196403.0 Rupees.\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.7 Page 35" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nA1=4000.0;#in rupees\nG=500.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nA=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "At the end of 10th year, the compound amountr of all his payments will be : 115560.6 Rupees.\n" + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.8 Page 36" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nA1=8500.0;#in rupees\nG=-500.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nA=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "At the end of 10th year, the compound amountr of all his payments will be : 138235.878 Rupees.\n" + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 3.9 Page 38" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=5000.0;#in rupees\nn=10.0;#in years\ni=12.0;#% per annum\nm=4.0;#no. of interest periods per year for quarterly\n\n#calculation\nN=n*m;\nr=i/m;\nF=P*(1+r/100)**N;\n\n#result\nprint\"Maturity value after 10 years is \",round(F,3),\" Rupees.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Maturity value after 10 years is : 16310.189 Rupees.\n" + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter4_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter4_1.ipynb new file mode 100755 index 00000000..fc61fff4 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter4_1.ipynb @@ -0,0 +1,167 @@ +{ + "metadata": { + "name": "EE-4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Present Worth Method of Comparision" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.1 Page 44" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#technology 1\nP=1200000.0;#in Rs\nA=400000.0;#in Rs\ni=20.0;#in % per annum\nn=10.0;#in years\n\n#calculation\nPW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this technology in RS. \",round(PW,3);\n\n#technology 2\nP=2000000.0;#in Rs\nA=600000.0;#in Rs\ni=20.0;#in % per annum\nn=10.0;#in years\n\n#calculation\nPW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this technology in RS. \",round(PW,3);\n\n#technology 3\nP=1800000.0;#in Rs\nA=500000.0;#in Rs\ni=20.0;#in % per annum\nn=10.0;#in years\n\n#calculation\nPW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this technology in RS. \",round(PW,3);\nprint \"It is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for this technology in RS. 476988.834\nThe present worth for this technology in RS. 515483.251\nThe present worth for this technology in RS. 296236.043\nIt is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.2 Page 46" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#bid 1\nP=450000.0;#in Rs\nA=27000.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nPW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this bid in RS. \",round(PW,3)\n\n#bid 2\nP=540000.0;#in Rs\nA=28500.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nPW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth for this bid in RS. \",round(PW,3)\nprint \"The total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for this bid in RS. 607878.993\nThe present worth for this bid in RS. 706650.048\nThe total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.3 Page 47" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#investment proposal A\nP1=-10000.0;#in Rs\nP2=3000.0;#in Rs\nP3=3000.0;#in Rs\nP4=7000.0;#in Rs\nP5=6000.0;#in Rs\ni=18.0;#in % per annum\n\n#calculation\nPW_A=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n\n#result\nprint \"The present worth of A in RS. \",round(PW_A,3);\n\n#investment proposal B\nP1=-10000.0;#in Rs\nP2=6000.0;#in Rs\nP3=6000.0;#in Rs\nP4=3000.0;#in Rs\nP5=3000.0;#in Rs\ni=18.0;#in % per annum\n\n#calculation\nPW_B=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n\n#result\nprint \"The present worth of B in RS. \",round(PW_B,3);\nprint\"At i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of A in RS. 2052.076\nThe present worth of B in RS. 2767.112\nAt i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.4 Page 48" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP0=400000.0;#in Rs\nP=200000.0;#in Rs\ni=18.0;#in % per annum\nn=10.0;#in years\n\n#calcualtion\nPW=P0+P*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth of alternative 2 in RS. \",round(PW,3);\nprint \"The present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\";\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of alternative 2 in RS. 1298817.259\nThe present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.5 Page 49" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#plan 1\nP0=-1000.0;#in Rs\nP=12000.0;#in Rs\ni=12.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nPW1=P0+P*1/((1+i/100)**n);#in RS\n\n#result\nprint \"The present worth of Plan-1 in RS. \",round(PW1,3);\n\n#plan 2\nP0=-1000.0;#in Rs\nP=4000.0;#in Rs\ni=12.0;#in % per annum\nn1=10.0;#in years\nn2=15.0;#in years\n\n#calculation\nPW2=P0+P*1/((1+i/100)**n1)++P*1/((1+i/100)**n2);#in RS\n\n#result\nprint \"The present worth of Plan-2 in RS.\",round(PW2,3);\nprint \"The present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of Plan-1 in RS. 1192.355\nThe present worth of Plan-2 in RS. 1018.678\nThe present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.6,Page 50" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#plan 1\nP0=-10000.0;#in Rs\nP=800000.0;#in Rs\ni=12.0;#in % per annum\nn=20.0;#in years\n\n#calcualtion\nPW1=P0*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)+P*1/((1+i/100)**n);#in RS\n\n#result\nprint \"The present worth of Plan-1 in RS. \",round(PW1,3);\n\n#plan 2\nP0=-10000.0;#in Rs\nP=1500000.0;#in Rs\ni=12.0;#in % per annum\nn1=20.0;#in years\nn2=25.0;#in years\n\n#calcualtion\nPW2=P0*(((1+i/100)**n1)-1)/((i/100)*(1+i/100)**n1)+P*1/((1+i/100)**n2);#in RS\n\n#result\nprint \"The present worth of Plan-2 in RS. \",round(PW2,3);\nprint \"The present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of Plan-1 in RS. 8238.976\nThe present worth of Plan-2 in RS. 13540.524\nThe present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 4.7 Page 50" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=12000.0;#in Rs\nA1=10000.0;#in Rs\nG=1000.0;#in Rs\ni=18.0;#in % per annum\nn=10.0;#in years\n\n#calculation\nPW=-P+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n\n#result\nprint \"The present worth of the small business in RS. \",round(PW,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth of the small business in RS. 47293.316\n" + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter5_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter5_1.ipynb new file mode 100755 index 00000000..37880d17 --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter5_1.ipynb @@ -0,0 +1,125 @@ +{ + "metadata": { + "name": "EE-5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Future Worth Method" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 5.1,Page 54" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#alternate A\nP=5000000.0;#in Rs\nA=2000000.0;#in Rs\ni=18.0;#in % per annum\nn=4.0;#in years\n\n#calculation\nFW_A=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\n\n#result\nprint \"The future worth amount of alternative A in RS. \",round(FW_A,3);\n\n#alternate B\nP=4500000.0;#in Rs\nA=1800000.0;#in Rs\ni=18.0;#in % per annum\nn=4.0;#in years\n\n#calculation\nFW_B=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\nprint \"The future worth amount of alternative B in RS. \", round(FW_B,3);\nprint \"The future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth amount of alternative A in RS. 736975.2\nThe future worth amount of alternative B in RS. 663277.68\nThe future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 5.2,Page 58" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#alternate 1\nFC=2000000.0;#in Rs\nAI=800000.0;#in Rs\nATax=80000.0;#in Rs\nNetAI=AI-ATax;#in Rs\ni=12.0;#in % per annum\nn=20.0;#in years\n\n#calculation\nFW_1=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n\n#result\nprint \"The future worth amount of alternative 1 in RS. : \", round(FW_1,3)\n\n#alternative2\nFC=3600000.0;#in Rs\nAI=980000.0;#in Rs\nATax=150000.0;#in Rs\nNetAI=AI-ATax;#in Rs\ni=12.0;#in % per annum\nn=20.0;#in years\n\n#calculation\nFW_2=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n\n#result\nprint \"The future worth amount of alternative 2 in RS.\",round(FW_2,3)\nprint\"The future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth amount of alternative 1 in RS. : 32585172.373\nThe future worth amount of alternative 2 in RS. 25076872.093\nThe future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 5.3,Page 59" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#part a\n#alternative 1\nP=500000.0;#in Rs\nA1=50000.0;#in Rs\nG=50000.0;#in Rs\ni=8.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nFW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n\n#result\nprint \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n\n#alternative 2\nP=700000.0;#in Rs\nA1=70000.0;#in Rs\nG=70000.0;#in Rs\ni=8.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nFW_2=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n\n#result\nprint \"The future worth amount of alternative 2 in RS. \", round(FW_2,3);\nprint \"The future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\";\n\n\n#part b\n#alternative a\nP=500000.0;#in Rs\nA1=50000.0;#in Rs\nG=50000.0;#in Rs\ni=9.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nFW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n\n#result\nprint \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n\n#altenative 2\nP=700000.0;#in Rs\nA1=70000.0;#in Rs\nG=70000.0;#in Rs\ni=9.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nFW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n\n#result\nprint \"The future worth amount of alternative 2 in RS.\", round(FW_1,3);\nprint \"The negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth amount of alternative 1 in RS. 408314.938\nThe future worth amount of alternative 2 in RS. 571640.914\nThe future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\nThe future worth amount of alternative 1 in RS. 383913.653\nThe future worth amount of alternative 2 in RS. 537479.115\nThe negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 5.4 Page 62" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#alternative 1\nP=8000000.0;#in Rs\nA=800000.0;#in Rs\ni=20.0;#in % per annum\nn=12.0;#in years\nSalvage=500000;#in Rs\n\n#calcualtion\nFW1=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n\n#result\nprint \"The future worth for this alternative in RS.\",round(FW1,3)\n\n#alternative 2\nP=7000000.0;#in Rs\nA=900000.0;#in Rs\ni=20.0;#in % per annum\nn=12.0;#in years\nSalvage=400000;#in Rs\n\n#calculation\nFW2=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n\n#result\nprint \"The future worth for this alternative in RS.\",round(FW2,3);\n\n#alternative 3\nP=9000000.0;#in Rs\nA=850000.0;#in Rs\ni=20.0;#in % per annum\nn=12.0;#in years\nSalvage=700000;#in Rs\n\n#calculation\nFW3=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n\nprint \"The future worth for this alternative in RS. \",round(FW3,3)\nprint \"The future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth for this alternative in RS. 102493205.379\nThe future worth for this alternative in RS. 97635155.155\nThe future worth for this alternative in RS. 113188330.939\nThe future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 5.5 Page 64" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#Machine A\nP=400000.0;#in Rs\nA=40000.0;#in Rs\nS=200000.0;#in Rs\ni=12.0;#in % per annum\nn=4.0#in years\n\n#calculation\nFW_A=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n\n#result\nprint \"The future worth amount of Machine A in RS. \",round(FW_A,3);\n\n#Machine B\nP=800000.0;#in Rs\nA=0.0;#in Rs\nS=550000.0;#in Rs\ni=12.0;#in % per annum\nn=4.0#in years\n\n#calculation\nFW_B=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n\n#result\nprint \"The future worth amount of Machine B in RS. \",round(FW_B,3);\nprint \"The future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\";\nprint \" Calculation in the book is not accurate\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The future worth amount of Machine A in RS. 620580.864\nThe future worth amount of Machine B in RS. 708815.488\nThe future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\n Calculation in the book is not accurate\n" + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter6.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter6_1.ipynb index c0d35ab9..c0d35ab9 100755 --- a/Engineering_Economics/Chapter6.ipynb +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter6_1.ipynb diff --git a/Engineering_Economics/Chapter7.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter7_1.ipynb index 827a806e..827a806e 100755 --- a/Engineering_Economics/Chapter7.ipynb +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter7_1.ipynb diff --git a/Engineering_Economics_by_R_Panneerselvam/Chapter8_1.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter8_1.ipynb new file mode 100755 index 00000000..a226c6dc --- /dev/null +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter8_1.ipynb @@ -0,0 +1,230 @@ +{ + "metadata": { + "name": "EE-8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Replacement and Maintenance Analysis" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.1 Page 103" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nFC=4000.0;#in Rs.\ni=0.0;#in % per annum\nMC1=0;#in Rs.\nprint \"Tabulation to determine economic life : \";\nprint\"End of Maintenance Summation of Avg cost of Avg FC if Avg total\";\nprint\" year cost at end maintenance maintenance replaced at cost through\";\nprint\" of year costs through year year given year given\";\nprint\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\";\nprint\" 1 0 0 0 4000 4000\";\nprint\" 2 200 200 100 2000 2100\";\nprint\" 3 400 600 200 1333.33 1533.33\";\nprint\" 4 600 1200 300 1000 1300\";\nprint\" 5 800 2000 400 800 1200\";\nprint\" 6 1000 3000 500 666.67 1166.67\";\nprint\" 7 1200 4200 600 571.43 1171.43\";\nprint\"Economic life of the machine : 6 years\";\nprint\"Column C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\";\n\n#When i=12%\ni=12.0;#in % per annum\nFC=4000.0;#in Rs.\nprint\"Tabulation to determine economic life : \";\nprint\"End of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\";\nprint\" year cost at end 12% of year of PW of cumulative 12% total cost\";\nprint\" of year n maintenance maintenance maintenance n of year\";\nprint\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\";\nprint\" 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\";\nprint\" 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\";\nprint\" 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\";\nprint\" 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\";\nprint\" 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\";\nprint\" 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\";\nprint\" 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\";\nprint\" 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\";\nprint\" 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\";\nprint\" 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\";\nprint\"Economic life of the machine : 7 years\";\nprint\"For this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\";\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Tabulation to determine economic life : \nEnd of Maintenance Summation of Avg cost of Avg FC if Avg total\n year cost at end maintenance maintenance replaced at cost through\n of year costs through year year given year given\n A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\n 1 0 0 0 4000 4000\n 2 200 200 100 2000 2100\n 3 400 600 200 1333.33 1533.33\n 4 600 1200 300 1000 1300\n 5 800 2000 400 800 1200\n 6 1000 3000 500 666.67 1166.67\n 7 1200 4200 600 571.43 1171.43\nEconomic life of the machine : 6 years\nColumn C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\nTabulation to determine economic life : \nEnd of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\n year cost at end 12% of year of PW of cumulative 12% total cost\n of year n maintenance maintenance maintenance n of year\n A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\n 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\n 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\n 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\n 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\n 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\n 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\n 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\n 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\n 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\n 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\nEconomic life of the machine : 7 years\nFor this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.2 Page 105" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nFC=20000.0;#in Rs.\ni=15.0;#in % per annum\n\n#result\nprint \"The other details are summarized in Table 8.3. It can be seen from the book.\";\nprint \"Total annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\";\nprint \"In column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The other details are summarized in Table 8.3. It can be seen from the book.\nTotal annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\nIn column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.3 Page 107" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nFC=20000.0;#in Rs.\ni=15.0;#in % per annum\n\n#result\nprint \"The details are summarized in Table 8.4. It can be seen from the book.\";\nprint\"Total annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\";\nprint\"(column E + Rs. 6000)* Column G\";\nprint \"Column F * Column G\";\nprint \"In column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \";\nprint \"RESULT : Min annual equivalent cost for machine A : Rs. 2780\";\nprint \"Min annual equivalent cost for machine B : Rs. 3672.30\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The details are summarized in Table 8.4. It can be seen from the book.\nTotal annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\n(column E + Rs. 6000)* Column G\nColumn F * Column G\nIn column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \nRESULT : Min annual equivalent cost for machine A : Rs. 2780\nMin annual equivalent cost for machine B : Rs. 3672.30\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.4 Page 109" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nPprice=200000.0;#in Rs\nP=120000.0;#in Rs\nF=25000.0;#in Rs\nA=25000.0;#in Rs\ni=12.0;#in % per annum\nn=6.0;#in years\n\n#calculation\nAE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE1,3);\n\n#Alternative 2\nP=150000.0;#in Rs\nF=20000.0;#in Rs\nA=14000.0;#in Rs\ni=12.0;#in % per annum\nn=6.0;#in years\n\n#calcualion\nAE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE2,3);\nprint \"Since, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(12%)) of this alternative in RS. 51106.443\nThe annual equivalent cost(AE(12%)) of this alternative in RS. 48019.343\nSince, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.5 Page 111" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initation of variable\n#alternative 1\nPprice=50000.0;#in Rs\nP=15000.0;#in Rs\nF=8000.0;#in Rs\nA=14000.0;#in Rs\ni=15.0;#in % per annum\nn=5.0;#in years\n\n#calcualtion\nAE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(15%)) of this alternative in RS. \",round(AE1,3);\n\n#Alternative 2\nP=65000.0;#in Rs\nF=13000.0;#in Rs\nA=9000.0;#in Rs\ni=15.0;#in % per annum\nn=20.0;#in years\n\n#calculation\nAE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(15%)) of this alternative in RS. : \",round(AE2,3);\nprint \"Since, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(15%)) of this alternative in RS. 17288.209\nThe annual equivalent cost(AE(15%)) of this alternative in RS. : 19257.596\nSince, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.6 Page 113" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#intiation of variable\nP=660000.0;#in Rs\nF=400000.0;#in Rs\nA=96000.0;#in Rs\ni=10.0;#in % per annum\nn=5.0;#in years\n\n#caculation\nAE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE1,3);\n\n#Alternative 2\nP=150000.0;#in Rs\nX=420000.0;#in Rs\ni=10.0;#in % per annum\nn=40.0;#in years\n\n#calcualtion\nAE2=(P-X)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE2,3);\nprint \"Since, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\";\nprint \" calculations in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(10%)) of this alternative in RS. : 204587.345\nThe annual equivalent cost(AE(10%)) of this alternative in RS. : 108389.958\nSince, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\n calculations in the book is not accurate.\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.7 Page 113" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nP=10000.0;#in Rs\nF=1500.0;#in Rs\nA=1600.0;#in Rs\ni=15.0;#in % per annum\nn=7.0;#in years\n\n#calcualtion\nAE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : \",round(AE1,3);\n\n#alternative 1 part 2\nP=10000;#in Rs\nF=800.0;#in Rs\nA=1000.0;#in Rs\ni=15.0;#in % per annum\nn=7.0;#in years\n\n#calcualtion\nAE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\n#result\nprint \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. \",round(AE2,3);\nprint \"Total annual equivalent cost of alternative in Rs. : \",round(AE1+AE2,3);\n\n\n#Alternative 2\nP=35000.0;#in Rs\nF=4000.0;#in Rs\nA=500.0;#in Rs\ni=15.0;#in % per annum\nn=7.0;#in years\n\n#calcualtion\nAE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n\nprint \"The annual equivalent cost of alternative 2 in RS.\",round(AE,3);\nprint\"Since, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\";\nprint \" calculations in the book is not accurate\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : 3868.063\nThe annual equivalent cost(AE(10%)) of 10 hp motor in RS. 3331.315\nTotal annual equivalent cost of alternative in Rs. : 7199.378\nThe annual equivalent cost of alternative 2 in RS. 8551.171\nSince, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\n calculations in the book is not accurate\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.8 Page 115" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=10000.0;#in Rs\nF=4000.0;#in Rs\nA=500.0;#in Rs\ni=12.0;#in % per annum\nn=4.0;#in years\n\n#calcualtion\nAE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\nX= (AE-1000*i/100-750)/0.3292+1000;\n#result\nprint \"The annual equivalent cost(AE(15%)) of n in RSew machine : \",round(AE,3);\nprint \"The comparative use value of old machine is Rs.\", round(X,3), \"which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \";\nprint\"Therefore, it is advisable to replace the old machine with the new one.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent cost(AE(15%)) of n in RSew machine : 2955.407\nThe comparative use value of old machine is Rs. 7334.771 which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \nTherefore, it is advisable to replace the old machine with the new one.\n" + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.9 Page 117" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Intiation of Variable\np1=0.07;#unitless\np2=0.11;#unitless\np3=0.12;#unitless\np4=0.18;#unitless\np5=0.21;#unitless\np6=0.20;#unitless\np7=0.11;#unitless\nN0=100.0;#no. of transistors\n\n#calcualtion\nN1=N0*p1;#no. of transistors\nN2=N0*p2;#no. of transistors\nN3=N0*p3;#no. of transistors\nN4=N0*p4;#no. of transistors\nN5=N0*p5;#no. of transistors\nN6=N0*p6;#no. of transistors\nN7=N0*p7;#no. of transistors\nLife=0;#in weeks\np=[p1, p2, p3, p4, p5, p6, p7];#Unitless\nfor i in range (7): \n Life=Life+(i+1)*p[i];\n\n#result\nprint \"Expected life of each transistor in weeks : \",round(Life,3)\nprint \"Average No. of failures/week : \",round(100/Life);\n\n#result of group replacement cost \nprint \"Cost of transistor when replaced simultaneously = Rs. 3\";\nprint \"Cost of transistor when replaced individually = Rs. 9\";\nprint \"The cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\";\nprint \"From table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\";\nprint \"Individual replacement cost/week = Rs. 207\";\nprint \"Minimum group replacement ost/week = Rs. 196.50\";\nprint \"Since the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Expected life of each transistor in weeks : 4.39\nAverage No. of failures/week : 23.0\nCost of transistor when replaced simultaneously = Rs. 3\nCost of transistor when replaced individually = Rs. 9\nThe cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\nFrom table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\nIndividual replacement cost/week = Rs. 207\nMinimum group replacement ost/week = Rs. 196.50\nSince the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\n" + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 8.10 Page 119" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\np1=(100.0-96)/100;#unitless\np2=(96.0-89)/100;#unitless\np3=(89-68)/100;#unitless\np4=(68.0-37)/100;#unitless\np5=(37.0-13)/100;#unitless\np6=(13.0-0)/100;#unitless\nN0=1000.0;#no. of resistors\n\n#calculation\nN1=N0*p1;#no. of resistors\nN2=N0*p2+N1*p1;#no. of resistors\nN3=N0*p3+N1*p2+N2*p1;#no. of resistors\nN4=N0*p4+N1*p3+N2*p2+N3*p1;#no. of resistors\nN5=N0*p5+N1*p4+N2*p3+N3*p2+N4*p1;#no. of resistors\nN6=N0*p6+N1*p5+N2*p4+N3*p3+N4*p2+N5*p1 ;#no. of resistors\n\nLife=0;#in months\np=[p1, p2, p3, p4, p5, p6, p7];#Unitless\nfor i in range (7): \n Life=Life+(i+1)*p[i];\n\n#result\nprint \"Expected life of each transistor in weeks : \",round(Life,3)\nprint \"Average No. of failures/week : \",round(100/Life);\n\n#result of group replacement cost\nprint \"Cost/transistor when replaced simultaneously = Rs. 4\";\nprint \"Cost/transistor when replaced individually = Rs. 10\";\nprint \"The cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\";\nprint \"From table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\";\nprint \"Individual replacement cost/month = Rs. 2480\";\nprint \"Minimum group replacement ost/month = Rs. 2426.67\";\nprint \"Since the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Expected life of each transistor in weeks : 4.17\nAverage No. of failures/week : 24.0\nCost/transistor when replaced simultaneously = Rs. 4\nCost/transistor when replaced individually = Rs. 10\nThe cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\nFrom table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\nIndividual replacement cost/month = Rs. 2480\nMinimum group replacement ost/month = Rs. 2426.67\nSince the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\n" + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter9.ipynb b/Engineering_Economics_by_R_Panneerselvam/Chapter9_1.ipynb index 6221daa0..6221daa0 100755 --- a/Engineering_Economics/Chapter9.ipynb +++ b/Engineering_Economics_by_R_Panneerselvam/Chapter9_1.ipynb diff --git a/Engineering_Economics/README.txt b/Engineering_Economics_by_R_Panneerselvam/README.txt index 27bb08be..27bb08be 100755 --- a/Engineering_Economics/README.txt +++ b/Engineering_Economics_by_R_Panneerselvam/README.txt diff --git a/Engineering_Economics/screenshots/Depriciation_and_Book_value.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/Depriciation_and_Book_value.png Binary files differindex 3c2c419d..3c2c419d 100755 --- a/Engineering_Economics/screenshots/Depriciation_and_Book_value.png +++ b/Engineering_Economics_by_R_Panneerselvam/screenshots/Depriciation_and_Book_value.png diff --git a/Engineering_Economics/screenshots/Economic_order_and_Time.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/Economic_order_and_Time.png Binary files differindex 623d5718..623d5718 100755 --- a/Engineering_Economics/screenshots/Economic_order_and_Time.png +++ b/Engineering_Economics_by_R_Panneerselvam/screenshots/Economic_order_and_Time.png diff --git a/Engineering_Economics/screenshots/Expected_Saving.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/Expected_Saving.png Binary files differindex 6970da10..6970da10 100755 --- a/Engineering_Economics/screenshots/Expected_Saving.png +++ b/Engineering_Economics_by_R_Panneerselvam/screenshots/Expected_Saving.png diff --git a/Engineering_Economics/screenshots/Present_Worth.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/Present_Worth.png Binary files differindex c5295c6e..c5295c6e 100755 --- a/Engineering_Economics/screenshots/Present_Worth.png +++ b/Engineering_Economics_by_R_Panneerselvam/screenshots/Present_Worth.png diff --git a/Engineering_Economics/screenshots/future_sum.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/future_sum.png Binary files differindex 50e1aa00..50e1aa00 100755 --- a/Engineering_Economics/screenshots/future_sum.png +++ b/Engineering_Economics_by_R_Panneerselvam/screenshots/future_sum.png diff --git a/Engineering_Economics/screenshots/maturity_value.png b/Engineering_Economics_by_R_Panneerselvam/screenshots/maturity_value.png Binary files differindex 72bd0ac4..72bd0ac4 100755 --- a/Engineering_Economics/screenshots/maturity_value.png +++ b/Engineering_Economics_by_R_Panneerselvam/screenshots/maturity_value.png diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_13.ipynb index cf97f900..cf97f900 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./appendix_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./appendix_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_14.ipynb index cf97f900..cf97f900 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./appendix_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./appendix_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_15.ipynb index cf97f900..cf97f900 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./appendix_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./appendix_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb index cc6b9f04..cc6b9f04 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_13.ipynb index d55d1267..d55d1267 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter02_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter02_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_14.ipynb index d55d1267..d55d1267 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter02_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter02_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_15.ipynb index d55d1267..d55d1267 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter02_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter02_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_16.ipynb index d55d1267..d55d1267 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter02_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter02_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb index d55d1267..d55d1267 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_13.ipynb index cdcc5a68..cdcc5a68 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter03_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter03_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_14.ipynb index cdcc5a68..cdcc5a68 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter03_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter03_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_15.ipynb index cdcc5a68..cdcc5a68 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter03_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter03_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb index cdcc5a68..cdcc5a68 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_13.ipynb index e5d35c61..e5d35c61 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter04_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter04_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_14.ipynb index e5d35c61..e5d35c61 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter04_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter04_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb index e5d35c61..e5d35c61 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb index e5d35c61..e5d35c61 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_13.ipynb index efb681de..efb681de 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter05_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter05_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_14.ipynb index efb681de..efb681de 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter05_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter05_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_15.ipynb index efb681de..efb681de 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter05_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter05_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb index efb681de..efb681de 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_13.ipynb index a0feab39..a0feab39 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter06_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter06_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_14.ipynb index a0feab39..a0feab39 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter06_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter06_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_15.ipynb index a0feab39..a0feab39 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter06_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter06_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb index a0feab39..a0feab39 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_13.ipynb index aae60e42..aae60e42 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter07_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter07_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_14.ipynb index aae60e42..aae60e42 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter07_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter07_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_15.ipynb index aae60e42..aae60e42 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter07_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter07_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb index aae60e42..aae60e42 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb index 666bcf43..666bcf43 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb index 666bcf43..666bcf43 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb index 666bcf43..666bcf43 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb index 666bcf43..666bcf43 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb index aa9e114b..aa9e114b 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb index aa9e114b..aa9e114b 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb index aa9e114b..aa9e114b 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb index aa9e114b..aa9e114b 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb index 3563e562..3563e562 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb index 3563e562..3563e562 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb index 3563e562..3563e562 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb index 3563e562..3563e562 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb index 9f1a8645..9f1a8645 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb index 9f1a8645..9f1a8645 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb index 9f1a8645..9f1a8645 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb index 690eeb8a..690eeb8a 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb index 690eeb8a..690eeb8a 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb index 690eeb8a..690eeb8a 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb index 41eaaa76..41eaaa76 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb index 41eaaa76..41eaaa76 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb index 5a718ded..5a718ded 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb index db992973..db992973 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb index db992973..db992973 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb index db992973..db992973 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb index 7bd00420..7bd00420 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb index 7bd00420..7bd00420 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb index 7bd00420..7bd00420 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb index 5049e924..5049e924 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb index 5049e924..5049e924 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb index 5049e924..5049e924 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb index 696a0479..696a0479 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb index 696a0479..696a0479 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb index 5eed275e..5eed275e 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb index ca13c8e8..ca13c8e8 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb index ca13c8e8..ca13c8e8 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb index 264f97d6..264f97d6 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb index 7b30b675..7b30b675 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb index 7b30b675..7b30b675 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb index 50cd95d2..50cd95d2 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb index c58e0b47..c58e0b47 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb index c58e0b47..c58e0b47 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb index 52504506..52504506 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb index c5908132..c5908132 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb index c5908132..c5908132 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb index c88d8037..c88d8037 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb index e2d06a9e..e2d06a9e 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb index e2d06a9e..e2d06a9e 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb index 917abffa..917abffa 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb index 9fcc267a..9fcc267a 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb index 9fcc267a..9fcc267a 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb index d978edd5..d978edd5 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb index c424f5bc..c424f5bc 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb index c424f5bc..c424f5bc 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb index c424f5bc..c424f5bc 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb diff --git a/Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png b/Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png Binary files differindex b2fe11de..b2fe11de 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png +++ b/Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png diff --git a/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png b/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png Binary files differindex 00bf60e4..00bf60e4 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png +++ b/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png diff --git a/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png b/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png Binary files differindex a193dcf3..a193dcf3 100644..100755 --- a/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png +++ b/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb index aea79a8c..aea79a8c 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb index d6847b23..d6847b23 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb index a7245a22..a7245a22 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb index 54bbbf07..54bbbf07 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb index afb202a5..afb202a5 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb index 1d22e338..1d22e338 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb index 79e12829..79e12829 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb index b55e472d..b55e472d 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb index 49292516..49292516 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb index 9c78727b..9c78727b 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb index 7c2ac18d..7c2ac18d 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb index 13a2a17f..13a2a17f 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb index e403d61e..e403d61e 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb index 90c89eeb..90c89eeb 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb diff --git a/Engineering_Physics_by_G._Vijayakumari/README.txt b/Engineering_Physics_by_G._Vijayakumari/README.txt index 87e83878..87e83878 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/README.txt +++ b/Engineering_Physics_by_G._Vijayakumari/README.txt diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png Binary files differindex 2b3d6924..2b3d6924 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png +++ b/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png Binary files differindex b7b6ba9e..b7b6ba9e 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png +++ b/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png Binary files differindex bfad6e10..bfad6e10 100644..100755 --- a/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png +++ b/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png diff --git a/Engineering_Physics_by_P.K.Palanisamy/README.txt b/Engineering_Physics_by_P.K.Palanisamy/README.txt index b9fb4354..b9fb4354 100644..100755 --- a/Engineering_Physics_by_P.K.Palanisamy/README.txt +++ b/Engineering_Physics_by_P.K.Palanisamy/README.txt diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb index bde406ea..bde406ea 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb index bde406ea..bde406ea 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb index 574c6311..574c6311 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb index 574c6311..574c6311 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb index 025145ab..025145ab 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb index 025145ab..025145ab 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb index fcba3e05..fcba3e05 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb index fcba3e05..fcba3e05 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb index 7394ba5e..7394ba5e 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb index 7394ba5e..7394ba5e 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb index 511fc472..511fc472 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb index 511fc472..511fc472 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb index 1e25347e..1e25347e 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb index 1e25347e..1e25347e 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb index 2e5de774..2e5de774 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb index 2e5de774..2e5de774 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb index 93bc35ac..93bc35ac 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb index 6849e540..6849e540 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb index e1679d0d..e1679d0d 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb index e1679d0d..e1679d0d 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb index 149cb0a8..149cb0a8 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb index 149cb0a8..149cb0a8 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb index 41986969..41986969 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb index 41986969..41986969 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb index 5d2dcf7b..5d2dcf7b 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb index 5d2dcf7b..5d2dcf7b 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb index b200f715..b200f715 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb index b200f715..b200f715 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb index 36284e09..36284e09 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb index 36284e09..36284e09 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb index ccfbcf75..ccfbcf75 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb index ccfbcf75..ccfbcf75 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt index e83684c9..e83684c9 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png Binary files differindex b7bd34b3..b7bd34b3 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png Binary files differindex b7bd34b3..b7bd34b3 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png Binary files differindex caa7fc64..caa7fc64 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png Binary files differindex caa7fc64..caa7fc64 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png Binary files differindex 1fbea36d..1fbea36d 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png Binary files differindex 0c7f0fa6..0c7f0fa6 100644..100755 --- a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb index 9538ba45..9538ba45 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb index d437d117..d437d117 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb index cea37dd0..cea37dd0 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb index 55b436e9..55b436e9 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb index b1f33747..b1f33747 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb index e0db4e17..e0db4e17 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb index aba467a3..aba467a3 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb index f11e05ff..f11e05ff 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb index 2fa5c11e..2fa5c11e 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb index da805b46..da805b46 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb index a1ee2e2e..a1ee2e2e 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb index 0b33c8c4..0b33c8c4 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb diff --git a/Engineering_Physics_by_S._Mani_Naidu/README.txt b/Engineering_Physics_by_S._Mani_Naidu/README.txt index 4ca38c63..4ca38c63 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/README.txt +++ b/Engineering_Physics_by_S._Mani_Naidu/README.txt diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png Binary files differindex a8f1d875..a8f1d875 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png +++ b/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png Binary files differindex efdf1aef..efdf1aef 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png +++ b/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png Binary files differindex 066e8809..066e8809 100644..100755 --- a/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png +++ b/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png diff --git a/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb.bkup b/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb index 0efc0c8d..0efc0c8d 100755 --- a/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb.bkup +++ b/Engineering_Physics_by_Uma_Mukherji/Chapter12.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb index 090338c5..090338c5 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb index 734b0b4e..734b0b4e 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb index f99d37c6..f99d37c6 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb index 1a8acc22..1a8acc22 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb index db346d84..db346d84 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb index 14a68207..14a68207 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb index 64ed52f4..64ed52f4 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb index dba61ec2..dba61ec2 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb index e4907e1d..e4907e1d 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb index 8c36c1a8..8c36c1a8 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb index 479e2614..479e2614 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb index 60af9521..60af9521 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png Binary files differindex 672f3e73..672f3e73 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png Binary files differindex 712b80a7..712b80a7 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png Binary files differindex c20c6261..c20c6261 100644..100755 --- a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt index e1a3562c..e1a3562c 100644..100755 --- a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt diff --git a/Fluid_Mechanics/screenshots/ch11.png b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch11.png Binary files differindex 7f1e98ab..7f1e98ab 100755 --- a/Fluid_Mechanics/screenshots/ch11.png +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch11.png diff --git a/Fluid_Mechanics/screenshots/ch3.png b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch3.png Binary files differindex 1b4c7079..1b4c7079 100755 --- a/Fluid_Mechanics/screenshots/ch3.png +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch3.png diff --git a/Fluid_Mechanics/screenshots/ch5.png b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch5.png Binary files differindex 66f3995c..66f3995c 100755 --- a/Fluid_Mechanics/screenshots/ch5.png +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/screenshots/ch5.png diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter1.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter1.ipynb new file mode 100755 index 00000000..561385dd --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter1.ipynb @@ -0,0 +1,609 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 1 : Fluid Properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.1 Page no 8" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Desnity of air at 20 deg C and 50 psia = 4.1 kg/m**3" + ] + } + ], + "source": [ + "# Density of air\n", + "\n", + "#Given \n", + "\n", + "Mw = 29.0 # Molecular weight of air\n", + "\n", + "R = 8323/Mw # Universal gas constant\n", + "\n", + "T = 273 + 20 # temperature in K\n", + "\n", + "p = 50*144*47.88 # Pressure in N/m**2\n", + "\n", + "# Solution\n", + "\n", + "rho = p/(R*T) # from the state law\n", + "\n", + "print \"Desnity of air at 20 deg C and 50 psia = \",round(rho,2),\"kg/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.2 Page no 12" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Reduction in volume = 0.045 %\n" + ] + } + ], + "source": [ + "# Reduction in volume\n", + "\n", + "# Given\n", + "\n", + "dP = 10**6 # Pressure drop in N/m**2\n", + "\n", + "V = 1 # Volume in m**3\n", + "\n", + "bta = 2.2*10**9 # Bulk modulus of elasticity in N/m**2\n", + "\n", + "# Solution\n", + "\n", + "dV = -dP*V/bta # Change in volume in m**3\n", + "\n", + "v = -dV*100\n", + "\n", + "print \"Reduction in volume = \",round(v,3),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.3 Page no 13" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volume reduction = -3.57e-06 m**3\n", + "Negative sign indicates the volume has reduced" + ] + } + ], + "source": [ + "# Volume reduction\n", + "\n", + "# Given\n", + "\n", + "bta1 = 2.28*10**9 # Bulk modulus of elasticity at 20 deg C and 103.4 N/m**2\n", + "\n", + "bta2 = 2.94*10**9 # Bulk modulus of elasticity at 20 deg C and 1034 N/m**2\n", + "\n", + "p1 = 103.4 # Pressure in N/m**2\n", + "\n", + "p2 = 1034 # Pressure in N/m**2\n", + "\n", + "# Solution \n", + "\n", + "bavg = (bta1+bta2)/2 # bulk modulus average in N/m**2\n", + "\n", + "dP = p2-p1 # pressure drop in N/m**2\n", + "\n", + "V = 10 # Volume in m**3\n", + "\n", + "dV = dP*V/bavg # Change in volume in m**3\n", + "\n", + "v = -dV\n", + "\n", + "print \"Volume reduction = \",round(v,8),\"m**3\"\n", + "\n", + "print \"Negative sign indicates the volume has reduced\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.4 Page no 14" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "An increase in pressure by 2 psia will result in a volume reduction of -0.0173 ft**3\n" + ] + } + ], + "source": [ + "# Volume reduction \n", + "\n", + "# Given\n", + "\n", + "patm = 14.6 # Atmospheric pressure in psia\n", + "\n", + "p1 = 100 # gauge pressure at point 1 in psia\n", + "\n", + "p2 = 102 # gauge pressure at point 2 in psia\n", + "\n", + "V = 1 # volume in m**3\n", + "# solution\n", + "\n", + "p = p1+patm # absolute pressure in psia\n", + "\n", + "b = p # for isothermal air\n", + "\n", + "p1 = p2+patm # absolute pressure in psia\n", + "\n", + "b1 = p1 # for isothermal air\n", + "\n", + "dP = p1 - p # change in pressure\n", + "\n", + "bavg = (b1+b)/2 # average bulk modulus of elasticity in N/m**2\n", + "\n", + "dV = dP*V/bavg\n", + "\n", + "v = -dV\n", + "\n", + "print \"An increase in pressure by 2 psia will result in a volume reduction of\",round(v,4),\"ft**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.5 Page no 14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sonic velocity in air at 68 deg F = 1126.0 ft/s\n" + ] + } + ], + "source": [ + "# Sonic velocity of air\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "R = 1716 # Universal gas constant in ft.lb/slug^oR\n", + "\n", + "T = 68+460 # temperature in *oR\n", + "\n", + "# solution\n", + "\n", + "c = sqrt(k*R*T)\n", + "\n", + "print \"Sonic velocity in air at 68 deg F = \",round(c,0),\"ft/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.6 Page no 19" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required to move the piston by 1 m/s = 2.83 N\n" + ] + } + ], + "source": [ + "# Force required to move the piston\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "d = 0.05 # diameter of cylinder 1 in m\n", + "\n", + "l = 0.2 # length of the cylinder in meters\n", + "\n", + "d1 = 0.052 # diameter of cylinder in m\n", + "\n", + "mu = 0.09 # Viscosity of oil in Ns/m**2\n", + "\n", + "U = 1 # velocity in m/s\n", + "\n", + "Y = (d1-d)/2 # clearance between the two cylinders in m\n", + "\n", + "A = pi*l*d # area in m**2\n", + "\n", + "# Solution \n", + "\n", + "tau = mu*U/Y # Shear stress in N/m**2\n", + "\n", + "F = tau*A # Shear foce in N\n", + "\n", + "print \"Force required to move the piston by 1 m/s = \",round(F,2),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.7 Page no 20" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a) Distance between the walls = 1.0 cm\n", + " (b) Shear stress = 0.0001005 N/m**2\n", + " (c) Shear Stress at 20 um from the plate = 0.000100098 N/m**2\n", + " (d) Location of maximum velocity = 0.005 m\n", + "Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate \n", + "This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\n" + ] + } + ], + "source": [ + "# Distance between the walls; Shear Stress; Location of maximum velocity\n", + "\n", + "from math import *\n", + "\n", + "from sympy import *\n", + "\n", + "# Given\n", + "\n", + "mu = 1.005*10**-3 # Viscosity of water in Ns/m**2\n", + "\n", + "# Solution \n", + "\n", + "# Part a\n", + "\n", + "# Velocity is given by the formula u = 10*(0.01*y-y**2)\n", + "\n", + "# two boundary conditions must be satisfied\n", + "\n", + "# at y=0;u=0 at the bottom of the plate\n", + "\n", + "# at y=Y ; u = 0 at top of the plate\n", + "\n", + "Y = 0.01 # Distance between the walls\n", + "\n", + "Y1 = Y*100\n", + "\n", + "print \" (a) Distance between the walls = \",round(Y1,1),\"cm\"\n", + "\n", + "# Part b\n", + "\n", + "# tau = mu*du/dy # Newtons law of viscosity\n", + "\n", + "# differentiate u wrt y\n", + "\n", + "y = Symbol('y')\n", + "\n", + "u = 10*(0.01*y-y**2)\n", + "\n", + "uprime = u.diff(y)\n", + "\n", + "y = 0\n", + "\n", + "U = uprime\n", + "\n", + "#print U\n", + "# for y =0 at the bottom plate we get \n", + "\n", + "U1 = 0.01 # from U\n", + "\n", + "tau = mu*10*U1 # shear stress in N/m**2\n", + "\n", + "print \" (b) Shear stress = \",round(tau,9),\"N/m**2\"\n", + "\n", + "# Part c\n", + "\n", + "# Shaer stress at 20um from the wall\n", + "\n", + "tau1 = mu*10*(0.01-2*20*10**-6) # using the equation of U and y = 20*10**-6 calc shear stress in N/m**2\n", + "\n", + "print \" (c) Shear Stress at 20 um from the plate = \",round(tau1,9),\"N/m**2\"\n", + "\n", + "# Part D\n", + "\n", + "# Distance at which shaer stress is zero can be found from the location of maximum velocity \n", + "\n", + "# equating uprime = 0\n", + "\n", + "y1 = 0.01/2 # shear stress location\n", + "\n", + "print \" (d) Location of maximum velocity = \",round(y1,3),\"m\"\n", + "\n", + "print \"Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate\",\"\\n\",\"This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.8 Page 24" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a) For linear distribution of velocity , shaft torque = 10.86 m.N\n", + " (b) For non-linear distribution of velocity , shaft torque = 10.86 m.N\n" + ] + } + ], + "source": [ + "# Shaft torque for linear and non linear distribution of velocity \n", + "from math import *\n", + "# Given\n", + "\n", + "d = 0.1 # diameter of shaft in m\n", + "\n", + "l = 0.2 # length of the shaft in m\n", + "\n", + "t = 0.00002 # thickness in m\n", + "\n", + "N = 30 # RPM of shaft\n", + "\n", + "U = pi*d*30/60 # velocity in m/s\n", + "\n", + "r1 = d/2\n", + "\n", + "r2 = r1 + t # radius of bearing in m\n", + "\n", + "mu = 0.44 # Viscosity of SAE-30 oil in Ns/m**2\n", + "\n", + "# Solution\n", + "\n", + "# part a\n", + "\n", + "F = 2*pi*r1*l*mu*U/t\n", + "\n", + "T =F*r1\n", + "\n", + "print \" (a) For linear distribution of velocity , shaft torque = \",round(T,2),\"m.N\"\n", + "\n", + "# part b\n", + "\n", + "F1 = 2*pi*l*mu*U/log(r2/r1)\n", + "\n", + "\n", + "T1 =F1*r1\n", + "\n", + "print \" (b) For non-linear distribution of velocity , shaft torque = \",round(T1,2),\"m.N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.9 Page 26" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Watts of energy lost in overcoming friction at 300 RPM = 1108.0 Watts\n" + ] + } + ], + "source": [ + "# Watts of energy lost to overcome friction\n", + "from math import *\n", + "# Given\n", + "\n", + "mu = 0.44 # viscosity of the oil in Ns/m**2\n", + "\n", + "N = 300 # RPM of the shaft\n", + "\n", + "t = 0.00025 # thickness of the film oil in m\n", + "\n", + "r1 = 0.15 # radius in m\n", + "\n", + "r2 = 0.1 # radius in m\n", + "\n", + "T = pi**2*mu*N*(r1**4-r2**4)/(60*t)\n", + "\n", + "P = T*2*pi*N/60\n", + "\n", + "print \"Watts of energy lost in overcoming friction at 300 RPM = \",round(P,0),\"Watts\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.10 Page no 28" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Excessive pressure inside the droplet = 29.2 N" + ] + } + ], + "source": [ + "# Excessive pressure inside droplet\n", + "\n", + "# Given\n", + "\n", + "d = 0.01 # diameter in m\n", + "\n", + "sigma = 0.073 # surface tension in N/m\n", + "\n", + "# Solution \n", + "\n", + "dP = 4*sigma/d # pressure excessive\n", + "\n", + "print \"Excessive pressure inside the droplet = \",round(dP,2),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.11 Page no 31" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The alcohol will rise to a height of 5.7 mm in the glass tube" + ] + } + ], + "source": [ + "# Height to which alcohol will rise\n", + "\n", + "# Given\n", + "\n", + "sigma = 0.022 # surface tension in N/m\n", + "\n", + "gma = 9789 # specific weight\n", + "\n", + "S = 0.79 # specific gravity\n", + "\n", + "d = 0.002 # diameter in m\n", + "\n", + "# Solution \n", + "\n", + "\n", + "h =4*sigma*1000/(gma*S*d) # capillary height in m\n", + "\n", + "print \"The alcohol will rise to a height of\",round(h,1),\"mm in the glass tube\"" + ] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter10.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter10.ipynb new file mode 100755 index 00000000..d207e652 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter10.ipynb @@ -0,0 +1,451 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 10 : Open Channel Flow " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.1 Page no 363" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Top width = 5.0 m\n", + "Area of flow = 8.0 m**2\n", + "Wetted perimeter = 7.472 m\n", + "Hydraulic radius = 1.07 m\n", + "Hydraulic depth = 1.6 m\n", + "Secton Factor = 10.12 m**2\n" + ] + } + ], + "source": [ + "# Top width, area of lfow, hydraulic radius\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "b = 3 # base of the channel\n", + "\n", + "z = 0.5 # slope of the channel\n", + "\n", + "y = 2 # depth of the channel\n", + "\n", + "# Solution\n", + "\n", + "T = b + 2*z*y\n", + "\n", + "print \"Top width =\",round(T,0),\"m\"\n", + "\n", + "A = (b+z*y)*y\n", + "\n", + "print \"Area of flow =\",round(A,0),\"m**2\"\n", + "\n", + "P = b + 2*y*sqrt(1+z**2)\n", + "\n", + "print \"Wetted perimeter =\",round(P,3),\"m\"\n", + "\n", + "R = A/P\n", + "\n", + "print \"Hydraulic radius =\",round(R,2),\"m\"\n", + "\n", + "D = A/T\n", + "\n", + "print \"Hydraulic depth =\",round(D,2),\"m\"\n", + "\n", + "Z = A*sqrt(D)\n", + "\n", + "print \"Secton Factor =\",round(Z,2),\"m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.2 Page no 366" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge for the channel = 16.1 m**3/s\n" + ] + } + ], + "source": [ + "# Discharge for the trapezoidal channel\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "z = 1.0 # slide slope\n", + "\n", + "b = 3.0 # base width\n", + "\n", + "y = 1.5 # depth\n", + "\n", + "S = 0.0009\n", + "\n", + "n = 0.012 # for concrete\n", + "\n", + "# Solution\n", + "\n", + "A = (b+z*y)*y\n", + "\n", + "P = P = b + 2*y*sqrt(1+z**2)\n", + "\n", + "R = A/P\n", + "\n", + "# from mannings eqquation\n", + "\n", + "Q = A*(1/n)*(R**(2/3)*S**(1/2))\n", + "\n", + "print \"Discharge for the channel =\",round(Q,2),\"m**3/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.4 Page no 373" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "depth(y) = 5.05 ft\n", + "base width(b) = 4.18 ft\n" + ] + } + ], + "source": [ + "# Determine cross sectional area\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "z = 1\n", + "\n", + "Q = 10000/60 # discharge of water in ft**#/s\n", + "\n", + "# Solution\n", + "\n", + "y = (Q/(1.828*2.25*sqrt(0.5)))**(2/5)\n", + "\n", + "print \"depth(y) =\",round(y,2),\"ft\"\n", + "\n", + "b = 0.828*y\n", + "\n", + "print \"base width(b) =\",round(b,2),\"ft\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.5 Page no 378" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Critical depth = 3.44 m\n" + ] + } + ], + "source": [ + "# Calculate criticcal depth\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "y = 2.5 # depth\n", + "\n", + "V = 8 # velocity in m/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "Yc = (20**2/g)**(1/3)\n", + "\n", + "print \"Critical depth =\",round(Yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.6 Page no 380" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a )Normal Depth = 2.22 m\n", + "b )F = 0.31 Since the Froude number is less than 1, the flow is subcritical\n", + "c )Critical depth is = 1.08 m\n" + ] + } + ], + "source": [ + "# determine normal depth, flow regine, critical depth\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "Q = 15 # flow rate in m**3/s\n", + "\n", + "w = 4.0 # bottom width\n", + "\n", + "S = 0.0008 # bed slope\n", + "\n", + "n = 0.025 # manning constant\n", + "\n", + "z = 0.5 # slope\n", + "\n", + "# Solution\n", + "\n", + "# We use a trial and error method here to find the value of y i.e. normal depth\n", + "\n", + "y = 2.22 # we take the value of y as 2.2 m\n", + "\n", + "Q = ((4+0.5*y)*(y/(n))*(((4+0.5*y)*y)/(4+2.236*y))**(0.667)*(S)**(0.5))\n", + "\n", + "print \"a )Normal Depth =\",round(y,2),\"m\"\n", + "\n", + "A = (4+0.5*y)*y\n", + "\n", + "T = (w+2*z*y)\n", + "\n", + "D = A/T\n", + "\n", + "V = (Q/A)\n", + "\n", + "F =V/(sqrt(9.81*D)) \n", + "\n", + "print \"b )F = \",round(F,2),\" Since the Froude number is less than 1, the flow is subcritical\"\n", + "\n", + "# we use trail and error to find the value of yc for critical depth\n", + "\n", + "yc = 1.08\n", + "\n", + "Q1 = (4+z*yc)*yc*sqrt((9.81*(4+0.5*yc)*yc)/(4+2*z*yc)) \n", + "\n", + "print \"c )Critical depth is = \",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.8 Page no 390" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Since F1 = 1.86 It is a weak jump\n", + "Length of the jump = 23.0 ft\n", + "Total energy loss = 133.7 HP\n" + ] + } + ], + "source": [ + "# Height, type and length of jump and loss of energy\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "b = 60 # base width in ft\n", + "\n", + "y1 = 2.5 # base depth in ft\n", + "\n", + "Q = 2500 # discharge in ft**3/s\n", + "\n", + "g = 32.2\n", + "\n", + "# Solution\n", + "\n", + "V1 = Q/(b*y1)\n", + "\n", + "F1 = V1/sqrt(g*y1)\n", + "\n", + "y2 = y1*0.5*(sqrt(1+8*F1**2)-1)\n", + "\n", + "V2 = Q/(b*y2)\n", + "\n", + "print \"Since F1 =\",round(F1,2),\" It is a weak jump\"\n", + "\n", + "L = y2*4.25\n", + "\n", + "print \"Length of the jump =\",round(L,0),\"ft\"\n", + "\n", + "E1 = y1+(V1**2/(2*g))\n", + "\n", + "E2 = y2+(V2**2/(2*g))\n", + "\n", + "El = E1-E2\n", + "\n", + "Te = El*62.4*Q/543\n", + "\n", + "print \"Total energy loss =\",round(Te,2),\"HP\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 10.12 Page no 409" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge = 503.0 cfs\n" + ] + } + ], + "source": [ + "# Determine flow rate\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 6 # depth of the channel\n", + "\n", + "w= 12 # width of the channel\n", + "\n", + "h = 1.0 # height of the channel\n", + "\n", + "p = 9 # pressure drop in m\n", + "\n", + "g = 32.2\n", + "\n", + "# Solution\n", + "\n", + "y2 = y1 - h - 0.75\n", + "\n", + "V1 = sqrt(2*g*0.75/((1.41)**2-1))\n", + "\n", + "Q = w*b*V1/10\n", + "\n", + "print \"Discharge =\",round(Q,0),\"cfs\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter11.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter11.ipynb new file mode 100755 index 00000000..3d434d74 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter11.ipynb @@ -0,0 +1,333 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Chapter 11: Compressible Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.1 Page no 420" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total change in enthalpy for 10 kg air = 180.0 kcal\n" + ] + } + ], + "source": [ + "# Example 11.1\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "T1 = 273 + 15 # temperature in K\n", + "\n", + "T2 = 273 + 90 # temperature in K\n", + "\n", + "Cp = 0.24 # cp for air in kcal/kgK\n", + "\n", + "# Solution\n", + "\n", + "dh = Cp*(T2-T1) # enthalpy per kg of air\n", + "\n", + "H = 10*dh # total enthallpy of 10 kg air\n", + "\n", + "print \"Total change in enthalpy for 10 kg air = \",round(H,0),\"kcal\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.2 Page no 420" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total change in enthalpy of 10 Kg of air = -0.255 kcal/K\n" + ] + } + ], + "source": [ + "# Example 11.2\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "T1 = 273 + 15 # temperature in K\n", + "\n", + "T2 = 273 + 90 # temperature in K\n", + "\n", + "P1 = 40 + 101.3 # pressure in abs\n", + "\n", + "P2 = 360 + 101.3 # presure in abs\n", + "\n", + "Cv = 0.171 # Specific volume Coefficient of air\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "# solution\n", + "\n", + "dS = Cv*log((T2/T1)**k*(P2/P1)**(1-k))\n", + "\n", + "S = 10*dS\n", + "\n", + "print \"Total change in enthalpy of 10 Kg of air =\",round(S,3),\"kcal/K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.3 Page no 421" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final temperature if air = 320.2 F\n", + "Total work done on 10 slugs = 330.0 Btu\n" + ] + } + ], + "source": [ + "# Example 11.3\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "P1 = 10 # pressure in psia\n", + "\n", + "P2 = 30 # pressure in psia\n", + "\n", + "T1 = 460+110 # temperature in R\n", + "\n", + "k =1.4 # gas constant\n", + "\n", + "T2 = T1*(P2/P1)**((k-1)/k)\n", + "\n", + "t2 = T2-460 # final temperature of air\n", + "\n", + "print \"Final temperature if air = \",round(t2,1),\"F\"\n", + "\n", + "Cv = 0.157 # coefficient of air \n", + "\n", + "W = Cv*(T2-T1) # work done per unit mass of oxygen\n", + "\n", + "Tw = 10*W # total work done on 10 slugs\n", + "\n", + "print \"Total work done on 10 slugs = \",round(Tw,0),\"Btu\" \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.4 Page no 426" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Speed of sound in water = 1483.0 m/s\n", + "Speed of sound in ethly alcohol = 1238.0 m/s\n", + "Speed of sound in Air = 343.0 m/s\n" + ] + } + ], + "source": [ + "# Example 11.4\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "# for water\n", + "\n", + "S =1 # specific gravity\n", + "\n", + "rho = S*1000 # density in kg/m**3\n", + "\n", + "bta = 2.2*10**9 # Bulk modulus of elasticity\n", + "\n", + "# ethly alcohol\n", + "\n", + "S1 =0.79 # specific gravity\n", + "\n", + "rho2 = S1*1000 # density in kg/m**3\n", + "\n", + "bta2 = 1.21*10**9 # Bulk modulus of elasticity\n", + "\n", + "# for air\n", + "\n", + "k = 1.4 # gas constant for air\n", + "\n", + "R = 287 # universal gas constant\n", + "\n", + "T = 273+20 # temperature in K\n", + "\n", + "# Solution\n", + "\n", + "C1 = sqrt(bta/rho)\n", + "\n", + "C2 = sqrt(bta2/rho2)\n", + "\n", + "print \"Speed of sound in water =\",round(C1,0),\"m/s\"\n", + "\n", + "print \"Speed of sound in ethly alcohol =\",round(C2,0),\"m/s\"\n", + "\n", + "C3 = sqrt(k*R*T)\n", + "\n", + "print \"Speed of sound in Air =\",round(C3,0),\"m/s\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.5 Page no 431" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.753305702898\n", + "Pressure at downstream = 3.03 psia\n", + "Temperature at downstream = 157.3 F\n", + "Velocity downstream = 463.02 ft/s\n" + ] + } + ], + "source": [ + "# Example 11.5\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "P1 = 1.5 # pressure in psia\n", + "\n", + "T1 = 40 + 460 # temperature in R\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "R = 1716 # universal gas constant in ft.lb/slug R\n", + "\n", + "V1 = 1500 # velocity in ft/s\n", + "\n", + "# Solution\n", + "\n", + "c1 = sqrt(k*R*T1)\n", + "\n", + "M1 = V1/c1\n", + "\n", + "M2 = sqrt((2+(k-1)*M1**2)/(2*k*M1**2-(k-1)))\n", + "print M2\n", + "\n", + "P2 = P1*((1+k*M1**2)/(1+k*M2**2))\n", + "\n", + "print \"Pressure at downstream = \",round(P2,2),\"psia\"\n", + "\n", + "T2 = T1*((1+0.5*(k-1)*M1**2)/(1+0.5*(k-1)*M2**2))\n", + "\n", + "t2 = T2-460\n", + "\n", + "print \"Temperature at downstream = \",round(t2,1),\"F\"\n", + "V2 = M2*sqrt(k*R*t2)\n", + "\n", + "print \"Velocity downstream = \",round(V2,2),\"ft/s\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter12.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter12.ipynb new file mode 100755 index 00000000..009a616c --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter12.ipynb @@ -0,0 +1,365 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 12: Turbomachines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.1 Page no 443" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of th pump = 74.0 %\n" + ] + } + ], + "source": [ + "# Example 12.1\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "Q = 0.25 # discharge from the pump in m**3/s\n", + "\n", + "gma= 0.8*9810 # specific weight in kg/m**3\n", + "\n", + "H=25 # elevation head in m\n", + "\n", + "T = 350 # Torque to drive the shaft in Nm\n", + "\n", + "N = 1800 # Speed in RPM\n", + "\n", + "w = 2*pi*N/60 # angular velocity\n", + "\n", + "# Solution\n", + "\n", + "Eff = gma*Q*H*100/(T*w) # efficiency\n", + "\n", + "print \"Efficiency of th pump =\",round(Eff,0),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.2 Page no 447" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a)\n", + "Radial velocity at exit = 10.6 m/s\n", + "Whirl velocity = 25.3 m/s\n", + "Relative velocity = 12.25 m/s\n", + "Actual velocity = 27.43 m/s\n", + "(b)\n", + "Head added for no inlet whirl = 81.0 m\n", + "(c)\n", + "Power required = 317.8 kW\n" + ] + } + ], + "source": [ + "# Example 12.2\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 0.4 # diameter of the pump in m\n", + "\n", + "b = 0.03 # width in m\n", + "\n", + "theta = pi/3 # blade angle\n", + "\n", + "N = 1500 # speed in RPM\n", + "\n", + "Q = 0.4 # flow rate in m**3/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "w = 2*pi*N/60 # anggular velocity in rad/s\n", + "\n", + "u2 = (d/2)*w # blade velocity in m/s\n", + "\n", + "V2r = Q/(2*pi*(d/2)*b) # relative velocity in m/s\n", + "\n", + "print \"(a)\"\n", + "\n", + "print \"Radial velocity at exit =\",round(V2r,1),\"m/s\"\n", + "\n", + "V2t = u2 - V2r*(cos(theta)/sin(theta))\n", + "\n", + "print \"Whirl velocity = \",round(V2t,1),\"m/s\"\n", + "\n", + "v2 = V2r/sin(theta)\n", + "\n", + "print \"Relative velocity = \",round(v2,2),\"m/s\"\n", + "\n", + "V2 = sqrt(V2t**2+V2r**2)\n", + "\n", + "print \"Actual velocity =\",round(V2,2),\"m/s\"\n", + "\n", + "print \"(b)\"\n", + "\n", + "H = u2*V2t/g\n", + "\n", + "print\"Head added for no inlet whirl =\",round(H,0),\"m\"\n", + "\n", + "print \"(c)\"\n", + "\n", + "P = g*Q*H\n", + "\n", + "print \"Power required =\",round(P,1),\"kW\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.3 Page no 450" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Impeller size = 38.45 cm\n", + "Speed of the pump = 1500.0 RPM\n" + ] + } + ], + "source": [ + "# Example 12.3\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 0.36 # diameter of the impeller of pump\n", + "\n", + "N = 1500 # Speed of impeller in RPM\n", + "\n", + "# Solution\n", + "\n", + "# For best efficiency\n", + "\n", + "Q1 = 82 # discharge in l/s\n", + "\n", + "H1 = 17.5 # Head in m\n", + "\n", + "Eta = 0.8 # efficiency \n", + "\n", + "Q2 = 100 # discharge in l/s\n", + "\n", + "H2 = 20 # head in m\n", + "\n", + "# Solving the simulataneous equation we get\n", + "\n", + "D2 = 38.45\n", + "\n", + "print \"Impeller size =\",round(D2,2),\"cm\"\n", + "\n", + "N2 = 1500 \n", + "\n", + "print \"Speed of the pump =\",round(N2,0),\"RPM\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.4 Page no 454 " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge, Q = 1.11 ft**3/s\n", + "Dynamic head of the pump, H = 122.1 m\n", + "Specific speed of the pump, Ns = 1096.0 RPM\n" + ] + } + ], + "source": [ + "# Example 12.4\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "q = 500 # discharge in cgm\n", + "\n", + "Q = 500/449 # discharge in ft**3/s\n", + "\n", + "D = 0.667 # diameter in ft\n", + "\n", + "A = pi*D**2/4\n", + "\n", + "V = Q/A # velocity in ft/s\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "N = 1800 # speed in RPM\n", + "\n", + "# Solution\n", + "\n", + "# for water at 65 deg C\n", + "\n", + "nu = 1.134*10**-5 # viscosity in ft**2/s\n", + "\n", + "e = 0.00085 # epssilon in ft\n", + "\n", + "r = 0.001275 \n", + "\n", + "R = V*D/nu # reynolds no\n", + "\n", + "f = 0.022 # from moody's diagram\n", + "\n", + "Hl = V**2*(12.1+(f*224.9))/64.4\n", + "\n", + "hs = 119.4 + Hl\n", + "\n", + "print \"Discharge, Q = \",round(Q,2),\"ft**3/s\"\n", + "print \"Dynamic head of the pump, H =\",round(hs,1),\"m\"\n", + "\n", + "Ns = N*sqrt(q)/(hs)**(3/4)\n", + "\n", + "print \"Specific speed of the pump, Ns =\",round(Ns,0),\"RPM\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.5 Page no 457" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum value of static suction lift = 4.02 m\n" + ] + } + ], + "source": [ + "# Example 12.5 \n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "H = 60 # height in m\n", + "\n", + "Pb = 98*10**3 # barometric pressure in N/m**2\n", + "\n", + "Hl = 1 # head in m\n", + "\n", + "Pv = 1707 # vapour pressure \n", + "\n", + "sigma = 0.08\n", + "\n", + "w = 9810 # specific weight\n", + "\n", + "# Solution\n", + "\n", + "Npsh_m = sigma*60 # minimum NPSH\n", + "\n", + "Hsm = (Pb/w)-(Pv/w)-Npsh_m-Hl\n", + "\n", + "print \"Minimum value of static suction lift = \",round(Hsm,2),\"m\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter2.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter2.ipynb new file mode 100755 index 00000000..e25d6ea0 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter2.ipynb @@ -0,0 +1,970 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 : Fluid Statics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1 Page no 44" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using the pascal's law a weight of 1000N can be lifted by applying a force only of 10.0 N\n" + ] + } + ], + "source": [ + "# Force applied on the piston\n", + "\n", + "from math import *\n", + "\n", + "# Given \n", + "\n", + "d = 10 # diameter of hydraulic press in meters\n", + "\n", + "d1 = 1 # diameter of piston in meters\n", + "\n", + "W = 1000 # weight in Newtons\n", + "\n", + "Ap = math.pi*d1**2/4 # Area of piston in m**2\n", + "\n", + "Ar = math.pi*d**2/4 # Area of rram in m**2\n", + "\n", + "# Solution \n", + "\n", + "p = W/Ar # pressure to be supplied by the oil in N/cm**2\n", + "\n", + "F = p*Ap # Force applied on the piston\n", + "\n", + "print \"Using the pascal's law a weight of 1000N can be lifted by applying a force only of \",round(F,1),\"N\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.2 Page no 53" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure = 10070.0 kN/m**2\n" + ] + } + ], + "source": [ + "# Pressure in kN/m**2\n", + "\n", + "# Given\n", + "\n", + "h = 1 # ocean depth below the surface in km\n", + "\n", + "gma = 10070 # Specific weight of sea water\n", + "\n", + "# Solution\n", + "\n", + "P =gma*h # Pressure in kN/m**2\n", + "\n", + "print \"Pressure = \",round(P),\"kN/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.3 Page no 53" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure at the bottom of the tank is 176.3 kN/m**3" + ] + } + ], + "source": [ + "# Pressure at the bottom of the tank\n", + "\n", + "# Given\n", + "\n", + "p1 = 150*10**3 # Pressure at point 1 in kN/m**2\n", + "\n", + "Sg = 0.85 # Specific gravity of oil\n", + "\n", + "h = 0.8 # height of oil 2 i tank in meters \n", + "\n", + "g = 9810 # specific gravity \n", + "\n", + "h1 = 2.0 # height of oil 3 in tank\n", + "\n", + "# Solution \n", + "\n", + "p2 = (p1 + Sg*h*g)\n", + "\n", + "p3 = (p2 + g*h1)/1000\n", + "\n", + "print \"Pressure at the bottom of the tank is\",round(p3,1),\"kN/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.4 Page no 54" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Height of the mountain is 2208.0 m\n" + ] + } + ], + "source": [ + "# Height of the mountain\n", + "\n", + "# Given\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "Po = 570 # mercury barometer reading in mm\n", + "\n", + "T = 273 -5 # temperature in K\n", + "\n", + "p = 750 # mercury barometer reading in mm\n", + "\n", + "n = 1.2345 # for polytropic atmosphere\n", + "\n", + "R =287 # univerasl gas constant in J/Kg-K\n", + "\n", + "g = 9.81 \n", + "\n", + "r = p/Po\n", + "\n", + "# Solution\n", + "\n", + "y = -(R*T/(g*0.19))*(1 - (r)**((n-1)/n))\n", + "\n", + "print \"Height of the mountain is\",round(y,0),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.5 Page no 57" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure in the pipe = 9.074 kPa\n" + ] + } + ], + "source": [ + "# Pressure in the pipe\n", + "\n", + "# Given\n", + "\n", + "h1 = 500 # height in mm\n", + "\n", + "h2 = 950 # height in mm\n", + "\n", + "S1 = 1 # specific gravity fo water\n", + "\n", + "S2 = 1.5 # specific gravity of liquid 2\n", + "\n", + "w = 9810 # specific weight of water\n", + "\n", + "# Solution\n", + "\n", + "ha = ((h2*S2)-(h1*S1))/1000\n", + "\n", + "Pa = w*ha/1000 # Pressure in kPa\n", + "\n", + "print \"Pressure in the pipe = \",round(Pa,3),\"kPa\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.6 Page no 66" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnitude of the force required to open the gate = 21659.0 N\n" + ] + } + ], + "source": [ + "# Force required to open the gate\n", + "\n", + "# Given\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "d = 1 # diameter of the gate in m\n", + "\n", + "w = 9810 # specific weight in N/m**3\n", + "\n", + "A = pi*d**2/4 # area of the gate\n", + "\n", + "Ig = pi*d**4/64 # mamm moment of inertia\n", + "\n", + "theta = pi/2\n", + "\n", + "y1= 5+0.5\n", + "\n", + "# Solution\n", + "\n", + "F = w*round(A,3)*(y1) # the answer will come out to be different as they have used the value of Area as 0.78 \n", + "\n", + "# depth of the COP\n", + "\n", + "h1 = y1 + (Ig*math.sin(theta)*math.sin(theta)/(A*y1))\n", + "\n", + "# moment about hinge A\n", + "\n", + "F1 = (F*(h1 - 5))/d\n", + "\n", + "print \"Magnitude of the force required to open the gate = \",round(F1,0),\"N\" \n", + "#The area calculated in the book is 0.785 and that calculated from code is 0.78. \n", + "#This difference of 0.005 is causing the answer to change from the original\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.7 Page no 67" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Total force = 31.71 kN\n", + "(b) Position of center of pressure = 1.616 m\n" + ] + } + ], + "source": [ + "# total force ; position of the center of pressure \n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "l =2 # length of the plate in m\n", + "\n", + "b =1 # width of the plate\n", + "\n", + "theta = pi/3\n", + "\n", + "h = 0.75 # depth of the plate\n", + "\n", + "w = 9810 # specific weight of water\n", + "\n", + "# Solution\n", + "\n", + "A = 1*2\n", + "\n", + "y1 = h + 1*sin(theta)\n", + "\n", + "F = w*A*y1/1000\n", + "\n", + "print \"(a) Total force = \",round(F,2),\"kN\"\n", + "\n", + "Ig = (b*l**3)/12\n", + "\n", + "h1 = y1 + (Ig*sin(theta)*sin(theta)/(2*y1))\n", + "\n", + "print \"(b) Position of center of pressure = \",round(h1,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.8 Page no 68" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total hydrostatic force = 40783.0 lbs\n", + "point of location on the center plate = 13.52 ft\n", + " OR point of location on the center plate from method 2 = 13.5 ft\n" + ] + } + ], + "source": [ + "# Hydrostatic force and point of location \n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "d = 6 # diameter of the gate in ft\n", + "\n", + "A =pi*d**2/4 # area of the gate\n", + "\n", + "p1 = 600 # pressure on top in psia\n", + "\n", + "y1 = 10 +2 + 3*sin(pi/6)\n", + "\n", + "F = 62.4*A*y1\n", + "\n", + "F1 = p1*A\n", + "\n", + "# Solution\n", + "\n", + "Tf = F+F1\n", + "\n", + "print \"Total hydrostatic force =\",round(Tf,0),\"lbs\"\n", + "\n", + "Ig = pi*d**4/64\n", + "\n", + "h1 = y1 + ((Ig*sin(pi/6)*sin(pi/6))/(A*y1))\n", + "\n", + "H = ((F*h1)+(F1*y1))/Tf\n", + "\n", + "print \"point of location on the center plate = \",round(H,2),\"ft\"\n", + "\n", + "# method 2\n", + "\n", + "Hf = p1/62.4 # equivalent fluid height\n", + "\n", + "y2 = Hf+y1\n", + "\n", + "Tf1 = 62.4*A*y2\n", + "\n", + "h2 = y2 + ((Ig*sin(pi/6)*sin(pi/6))/(A*y2))\n", + "\n", + "H1 = y2-Hf\n", + "\n", + "print \" OR point of location on the center plate from method 2 = \",round(H1,2),\"ft\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.10 Page no 74" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Horizontal component acting on the plate = 998.4 lbs\n", + "Vertical component acting on the plate = 1283.34 lbs\n", + "location of Xv = 1.82 ft\n" + ] + } + ], + "source": [ + "# Horizontal and Vertical components\n", + "\n", + "import math\n", + "\n", + "# Given\n", + "\n", + "R = 4 # radius of the gate in ft\n", + "\n", + "w = 1 # width of the gate in ft\n", + "\n", + "gma =62.4 # specific weight of water\n", + "\n", + "y1 = 4 # distance of center of the gate\n", + "\n", + "xv1 = 2 # distance in ft\n", + "\n", + "xv2 = 1.7 # distance in ft\n", + "\n", + "# Solution \n", + "\n", + "Fh = R*y1*gma\n", + "\n", + "Ig = w*R**3/12\n", + "\n", + "yh = y1 + (Ig/(R*y1))\n", + "\n", + "Fv1 = R*2*gma\n", + "\n", + "Fv2 = pi*R**2*gma/4\n", + "\n", + "Fv = Fv1 + Fv2\n", + "\n", + "Xv = (Fv1*xv1+Fv2*xv2)/(Fv)\n", + "\n", + "print \"Horizontal component acting on the plate = \",round(Fh,2),\"lbs\"\n", + "\n", + "print \"Vertical component acting on the plate = \",round(Fv,2),\"lbs\"\n", + "\n", + "print \"location of Xv =\",round(Xv,2),\"ft\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.11 Page no 77" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Horizontal component acting on the plate = 29923.0 lbs\n", + "(b) Vertical component acting on the plate = 30208.14 lbs\n", + "location of vertical component Xv = 1.99 ft from the left wall\n" + ] + } + ], + "source": [ + "# Vertical and Horizontal components\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "p = 50 # pressure in psia\n", + "\n", + "gma = 62.4 # specific weight in ft\n", + "\n", + "h1 = p*144/gma # equivalent height of water surface in ft\n", + "\n", + "R = 4 # radius of gate in ft\n", + "\n", + "w = 1 # width of the gate in ft\n", + "\n", + "A = R*w\n", + "\n", + "y1 = h1 + 2.5 + 2 # center of pressure\n", + "\n", + "xv1 = 2 # center of pressure1 for x direction force\n", + "\n", + "xv2 = 1.7 # center of pressure2 for x direction force\n", + "\n", + "# Solution\n", + "\n", + "Fh = gma*A*y1 # hiorizontal force\n", + "\n", + "Ig = 5.33 # moment of inertia\n", + "\n", + "yh = y1 + (Ig/(A*y1)) # location of horizontal component\n", + "\n", + "y2 = h1+2.5\n", + "\n", + "Fv1 = gma*(R*y2) # vertical force component 1\n", + "\n", + "Fv2 = gma*(pi*R**2/4) # vrtical force component 2\n", + "\n", + "Fv = Fv1 + Fv2 # vertical force component\n", + "\n", + "Xv = (Fv1*xv1+Fv2*xv2)/(Fv)\n", + "\n", + "print \"(a) Horizontal component acting on the plate = \",round(Fh,0),\"lbs\" # The answer for horizontal force in the book is wrong\n", + "\n", + "print \"(b) Vertical component acting on the plate = \",round(Fv,2),\"lbs\"\n", + "\n", + "print \"location of vertical component Xv =\",round(Xv,2),\"ft from the left wall\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.13 Page no 84" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Depth to which water would rise = 0.25 m\n" + ] + } + ], + "source": [ + "# Depth to which water would rise\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "l = 3 # length in m\n", + "\n", + "b = 4 # breadth in m\n", + "\n", + "h = 15 # height in m\n", + "\n", + "S = 0.9 # specific gravity of barge\n", + "\n", + "Sw = 1.09 # specific gravity of water\n", + "\n", + "Wd = 150*10**3 # addditional weight in kN\n", + "\n", + "V = l*b*h # volume in m**3\n", + "\n", + "Wb = gma*S*V # weight of barge\n", + "\n", + "Tw = Wb + Wd # total weight in kN\n", + "\n", + "gma = 9810 # specific density \n", + "\n", + "# Solution\n", + "\n", + "Fb = Tw # since barge is floating\n", + "\n", + "V1 = Fb/((gma/1000)*Sw) # volume in m**3\n", + "\n", + "\n", + "d = (V1/(h*b))/1000\n", + "\n", + "print \"Depth to which water would rise = \",round(d,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.14 Page no 85 " + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X = 3.12 cm\n", + "Y = 3.25 cm\n", + "The bottom of the solid cylinder will be 4.88 cm above the bottom\n" + ] + } + ], + "source": [ + "# Level at which cylinder will float\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import numpy as np\n", + "\n", + "# Given\n", + "\n", + "W = 0.4 * 9.81 # weight of the solid cylinder in N\n", + "\n", + "# Solution\n", + "\n", + "A = np.array([(1,-0.96),(1,1)])\n", + "\n", + "b = np.array([0,6.37])\n", + "\n", + "x = np.linalg.solve(A,b)\n", + "\n", + "X = x[0]\n", + "\n", + "Y = x[1]\n", + "\n", + "print \"X = \",round(X,2),\"cm\"\n", + "\n", + "print \"Y = \",round(Y,2),\"cm\"\n", + "\n", + "b = 8 -x[0]\n", + "\n", + "print \"The bottom of the solid cylinder will be \",round(b,2),\"cm above the bottom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.15 Page no 86" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight of the pan = 37.7 N\n", + "Magnitude of right momentum = 123.4 N.cm\n" + ] + } + ], + "source": [ + "# Weight of the pan and the magnitude of righting moment\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "l =100 # length of the pan in cm\n", + "\n", + "w = 20 # width of the pan in cm\n", + "\n", + "d = 4 # depth of the pan in cm\n", + "\n", + "L = 1.5 # load in N/m\n", + "\n", + "gma = 9810 # sepcific weight\n", + "\n", + "# Solution\n", + "\n", + "Fb = gma*(d*w*l/(2*l**3)) # weight on the pan\n", + "\n", + "W = Fb-L # weight of the pan\n", + "\n", + "X1 = w/3\n", + "\n", + "X2 = w/2\n", + "\n", + "theta = math.atan(d/w)*180/pi\n", + "\n", + "x = ((X2-X1)*cos(theta*pi/180))\n", + "\n", + "# momentum equation \n", + "\n", + "M = W*x\n", + "\n", + "print \"Weight of the pan =\",round(W,1),\"N\"\n", + "print \"Magnitude of right momentum = \",round(M,1),\"N.cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 2.16 Page no 90" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Metacentric height = 0.347 m\n", + "(b) Righting moment = 63.1 kN.m\n" + ] + } + ], + "source": [ + "# Metacentric height and rightning moment \n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Continued from example 2.15\n", + "\n", + "# Given\n", + "\n", + "Io = 15*4**3/12 # moment of inertia in m**4\n", + "\n", + "V = 15*4*2.71 # Volume in m**3\n", + "\n", + "Gb = ((3/2)-(2.71/2)) \n", + "\n", + "W = 1739.2 # weight of the barge from the previous example in kN\n", + "# Solution\n", + "\n", + "Mg = (Io/V)-Gb # metacentric height in m\n", + "\n", + "print \"(a) Metacentric height = \", round(Mg,3),\"m\"\n", + "\n", + "M = W*Mg*sin(pi*6/180)\n", + "\n", + "print \"(b) Righting moment =\",round(M,1),\"kN.m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 2.17 Page no 92" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Amximum pressure occurs at the bottom of the tank = 24768.9 N\n" + ] + } + ], + "source": [ + "# Maximum pressure in the tank\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "l=6 # length of the tank\n", + "\n", + "w =2 # width of the tank\n", + "\n", + "d = 3 # depth of the tank\n", + "\n", + "a = 3 # acceleration in m/s**2\n", + "\n", + "theta = pi/6\n", + "\n", + "W = 9810 # specific weight\n", + "\n", + "X = 0\n", + "\n", + "po=0 # pressure at the origin\n", + "\n", + "# Solution\n", + "\n", + "A = np.array([(1,-1),(1,1)])\n", + "\n", + "b = np.array([-1.38,3.0])\n", + "\n", + "x = np.linalg.solve(A,b)\n", + "\n", + "Y1 = x[0]\n", + "\n", + "Y2 = x[1]\n", + "\n", + "# AMximum pressure at the bottom of the tank\n", + "\n", + "P = po - W*(2.61*X/9.81) - W*(1+(1.5/9.81))*(-Y2)\n", + "\n", + "print\"Amximum pressure occurs at the bottom of the tank =\",round(P,3),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.18 Page no 98" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Height of paraboliod revolution of base = 1.48 ft\n", + "(b) Maximum pressure corresponding to maximum height = 92.3 lbs/ft**2\n", + "(c) Pressure = 26.4 lbs/ft**2\n" + ] + } + ], + "source": [ + "# Height of the paraboloid revolution; maxm=imum pressure and location ; pressure at the point 0.2 from the center\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 1 # diamter of the jar in ft\n", + "\n", + "h =2 # height of the jar in ft\n", + "\n", + "H = 1 # height of water in the jar in ft\n", + "\n", + "N = 150 # RPM\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "# Solution\n", + "\n", + "w = 2*pi*N/60\n", + "\n", + "ho = H+((w**2*(d/2)**2)/(4*g))\n", + "print \"(a) Height of paraboliod revolution of base = \", round(ho,2),\"ft\"\n", + "\n", + "Pmax = 62.4*ho\n", + "\n", + "print \"(b) Maximum pressure corresponding to maximum height = \",round(Pmax,1),\"lbs/ft**2\"\n", + "\n", + "z = H - ((w**2*(d/2)**2)/(4*g))\n", + "\n", + "r = 0.2 # distance from center\n", + "\n", + "y = -(0.52-0.25)\n", + "\n", + "P = po + (62.4*w**2*r**2/(2*g))-(62.4*y)\n", + "\n", + "print \"(c) Pressure =\",round(P,1),\"lbs/ft**2\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter3.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter3.ipynb new file mode 100755 index 00000000..fa74673c --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter3.ipynb @@ -0,0 +1,541 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 3: Fluid Kinematics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.1 Page no 117" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) u = 4*X; v = -4*Y \n", + "(b) u= 4.0 m/s and v= -8.0 m/s\n", + "(c) Magnitude of velocity = 8.94 m/s and angle of resultant velocity = -63.4 deg\n" + ] + } + ], + "source": [ + "# Dimension of flow field ; velocity components at (1,2) ; magnitude and direction of velocity \n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "# V = 4*Xi-4Yj\n", + "\n", + "x=1 # x co-ordinate\n", + "\n", + "y=2 # y co-ordinate\n", + "\n", + "# Solution\n", + "\n", + "print \"(a) u = 4*X; v = -4*Y \"\n", + "\n", + "u = 4*x\n", + "\n", + "v=- 4*y\n", + "\n", + "print \"(b) u=\",round(u,0),\"m/s and v=\",round(v,0),\"m/s\"\n", + "\n", + "R =sqrt(u**2+v**2)\n", + "\n", + "ang = atan(v/u)*180/pi\n", + "\n", + "print \"(c) Magnitude of velocity =\",round(R,2),\"m/s and angle of resultant velocity = \",round(ang,1),\"deg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.2 Page no 119" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Discharge = 1.06 m**3/s\n", + "(b) Mass flow rate = 1057.21 kg/s\n" + ] + } + ], + "source": [ + "# Discharge and mass flow rate\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 0.3 # diameter of pipe in m\n", + "\n", + "v = 15 # velocity in m/s\n", + "\n", + "rho = 997.1 # density in kg/m**3\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "# Solution\n", + "\n", + "Q=A*v\n", + "\n", + "print \"(a) Discharge =\",round(Q,2),\"m**3/s\"\n", + "\n", + "mdot = rho*Q\n", + "\n", + "print \"(b) Mass flow rate = \",round(mdot,2),\"kg/s\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.3 Page no 120 " + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean velocity of the flow = 5.0 m/s\n" + ] + } + ], + "source": [ + "# Mean Velocity\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from scipy import integrate\n", + "\n", + "# Given\n", + "\n", + "Vo = 10 # velocity in m/s\n", + "\n", + "r1 = 0\n", + "\n", + "ro = 0.1 # radius in m\n", + "\n", + "N = 1\n", + "\n", + "# Solution\n", + "\n", + "R = lambda r: (10*r-1000*r**3)\n", + "\n", + "R1,err=integrate.quad(R,r1,ro)\n", + "\n", + "Q = R1*2*pi\n", + "\n", + "A = pi*(0.1)**2\n", + "\n", + "V = Q/A\n", + "\n", + "print \"Mean velocity of the flow =\",round(V,0),\"m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.4 Page no 126" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2*x - 2*y**2\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAETCAYAAAA8rh0/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdUVFfXBvBnULFQFFGxgIrtFUQFxRrRwd5iFxEL9pYY\nWxJjx9iwtxiS+BpbomDsBcungIqCgoBGsSuKolgA6W3mfH+cSMRXZYAZzr3j/q3FWjrA3IdZsOfc\nc8/dR8EYYyCEEKJ3DEQHIIQQohtU4AkhRE9RgSeEED1FBZ4QQvQUFXhCCNFTVOAJIURPUYEnBEBA\nQACsrKxy/m9nZ4dz584VeQ4DAwM8ePCgyI9L9BMVeKIzgYGBaN26NcqVKwdzc3O0adMGoaGhAIBt\n27bByclJcMKPu379Otq2bSs6xkdJ/fUj0lBcdACinxITE9GzZ0/8+uuvcHFxQUZGBs6fP4+SJUtq\n/BxqtRoGBjQGIaSg6K+H6MSdO3egUCgwa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8IQACAkJQePGjZGRkYGUlBTY\n2dkhMjJSdCxCCoVW0RDyj3nz5iE9PR1paWmwsrIq8g6ChGgbFXhC/pGVlQVHR0eULl0aQUFBkmot\nQEhB0BQNIf949eoVUlJSkJycjLS0NNFxCCk0GsET8o9evXrBzc0NDx48wLNnz7Bx40bRkQgpFK1v\n2UeIHO3YsQMlS5aEq6sr1Go1WrdujYCAACiVStHRCCkwGsETQoieojl4QgjRU1TgCSFET1GBJ4QQ\nPUUFnhBC9BQVeEII0VNU4AkhRE/9Py1qsfLmAYBpAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x2e9ee90>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Sketch the stream lines in the first quadrant\n", + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "import numpy as np\n", + "\n", + "from sympy import *\n", + "\n", + "#init_printing(use_unicode=False, warp_line=False, no_global=True)\n", + "\n", + "# Given\n", + "\n", + "# V = 4*y(m)i+2(m)j\n", + "\n", + "x = Symbol('x')\n", + "U = integrate(2,x)\n", + "\n", + "#print u\n", + "\n", + "y = Symbol('y')\n", + "\n", + "V = integrate(-4*y,y)\n", + "\n", + "#print V\n", + "\n", + "Zhi = U + V\n", + "\n", + "print Zhi # for x and y =0 we get C = 0\n", + "\n", + "X = [5,6,7,8,9,10,11,12,13,14,15,16,17]\n", + "Y = [0,1.414,2,2.449,2.828,3.16,3.46,3.741,4,4.242,4.472,4.69,4.898]\n", + "\n", + "b1=plt.plot(X,Y)\n", + "\n", + "\n", + "X1 = [2.5,3,4,5,6,7,8,9,10,11,12,13,14,15]\n", + "Y1 = [0,1,1.732,2.23,2.645,3,3.31,3.60,3.87,4.123,4.35889,4.5825,4.795,5]\n", + "\n", + "b2=plt.plot(X1,Y1)\n", + "\n", + "\n", + "X2 = [0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5,14.5,15.5]\n", + "Y2 = [0,1.414,2,2.449,2.828,3.162,3.462,3.741,4,4.242,4.472,4.69,4.898,5.099,5.29,5.4772]\n", + "\n", + "b3=plt.plot(X2,Y2)\n", + "\n", + "plt.xlabel(\"x\")\n", + "\n", + "plt.ylabel(\"y\")\n", + "\n", + "plt.title(\"Streamline plot\")\n", + "\n", + "plt.legend([\"zhi=10\",\"zhi=5\",\"zhi=1\"])\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.5 PAge no 127" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resutant velocity magnitude = 17.89 m/s\n", + "Angle = 63.4 deg with the X-axis in the 4th quadrant\n" + ] + } + ], + "source": [ + "# magnitude and direction of flow field\n", + "\n", + "from math import *\n", + "\n", + "from sympy import *\n", + "\n", + "import numpy as np\n", + "\n", + "# Given\n", + "\n", + "x = 2 # X co-ordinate\n", + "\n", + "Y = 4 # Y co-ordiante\n", + "\n", + "# Solution\n", + "y = Symbol('y')\n", + "\n", + "zhi = 4*x*y\n", + "\n", + "zhiprime = zhi.diff(y)\n", + "\n", + "u = zhiprime\n", + "\n", + "x = Symbol('x')\n", + "\n", + "zhi = 4*x*Y\n", + "\n", + "zhiprime = zhi.diff(x)\n", + "\n", + "v = zhiprime\n", + "\n", + "R=sqrt(u**2+v**2)\n", + "\n", + "theta = atan(v/u)*180/pi\n", + "\n", + "print \"Resutant velocity magnitude = \",round(R,2),\"m/s\"\n", + "\n", + "print \"Angle =\",round(theta,1),\"deg with the X-axis in the 4th quadrant\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.6 Page no 130" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Velocity = 5.1 m/s\n", + "(b) Convective acceleration = 0.46 m**2/s\n" + ] + } + ], + "source": [ + "# Determine velocity ; convective accleration\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from sympy import *\n", + "\n", + "import numpy as np\n", + "\n", + "from scipy import integrate\n", + "\n", + "# Given\n", + "\n", + "d1 = 0.09 # diameter in cm\n", + "\n", + "d2 = 0.025 # diameter in cm\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "mdot = 25 # mass flow rate in kg/s\n", + "\n", + "# Solution\n", + "\n", + "x = Symbol('x')\n", + "\n", + "A1 = pi*d1**2/4\n", + "\n", + "A2 = pi*d2**2/4\n", + "\n", + "AA = A1 - ((A1-A2)/40)*10 # from figure\n", + "\n", + "V = mdot/(rho*AA)\n", + "\n", + "print \"(a) Velocity =\",round(V,1),\"m/s\"\n", + "\n", + "AX = (A1 - ((A1-AA)/40)*x)\n", + "\n", + "v = 25*10**4/(rho*AX)\n", + "\n", + "vprime = v.diff(x)\n", + "\n", + "V1 = vprime\n", + "\n", + "# at x = 0.1 m we get dv/dx = 0..09\n", + "\n", + "VPrime = 0.09\n", + "\n", + "Acx = V*VPrime\n", + "\n", + "print \"(b) Convective acceleration =\",round(Acx,3),\"m**2/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.8 Page no 143 " + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "z = -25.0\n", + "Hence the flow is rotational\n" + ] + } + ], + "source": [ + "# Is the flow irrotational\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "# w = (16y-12x)i +(12y-9x)j\n", + "\n", + "# Solution\n", + "\n", + "y = Symbol('y')\n", + "\n", + "U = 16*y-12*x\n", + "\n", + "zhiprime = U.diff(y)\n", + "\n", + "u = zhiprime\n", + "\n", + "\n", + "x = Symbol('x')\n", + "\n", + "V = 12*y-9*x\n", + "\n", + "zhiprime1 = V.diff(x)\n", + "\n", + "v = zhiprime1\n", + "\n", + "#Vx = -9 # differentiate V wrt x\n", + "\n", + "#Vx = -9 # differentiate V wrt x\n", + "#Uy = 16 # differentiate U wrt y\n", + "\n", + "z = v-u\n", + "\n", + "print \"z = \",round(z,0)\n", + "\n", + "print \"Hence the flow is rotational\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.10 Page no 148" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity at the larger cross section = 3.33 m/s\n" + ] + } + ], + "source": [ + "# Velocity in larger section\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "d1 = 0.1 # diameter in m\n", + "\n", + "d2 = 0.3 # diameter in m\n", + "\n", + "V1 = 30 # velocity in m/s\n", + "\n", + "# Solution\n", + "\n", + "V2 = (d1**2/d2**2)*V1\n", + "\n", + "print \"Velocity at the larger cross section = \",round(V2,2),\"m/s\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter4.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter4.ipynb new file mode 100755 index 00000000..5a1c879b --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter4.ipynb @@ -0,0 +1,558 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 4 : Fluid Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.1 Page no 159" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in pressure in section 1 and 2 = 1157.0 kN/m**2\n" + ] + } + ], + "source": [ + "# Difference in pressure at top and bottom\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d1 = 0.1 # diameter in m\n", + "\n", + "d2 = 0.05 # diameter in m\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "A1 = pi*d1**2/4\n", + "\n", + "A2 = pi*d2**2/4\n", + "\n", + "gma =9810 # specific weight\n", + "\n", + "z= 6 # difference in the height\n", + "\n", + "g = 9.81\n", + "\n", + "# Solution\n", + "\n", + "V1 = Q/A1 # velocity at section 1\n", + "\n", + "V2 = Q/A2 # velocity at section 2\n", + "\n", + "dP = gma*((V2**2/(2*g))-(V1**2/(2*g))-z)/1000\n", + "\n", + "print \"Difference in pressure in section 1 and 2 = \",round(dP,1),\"kN/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.2 Page no 160" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Actual discharge = 2.0 l/s\n" + ] + } + ], + "source": [ + "# Actual discharge\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 2.5 # diameter in cm\n", + "\n", + "h =200 # head in cm\n", + "\n", + "Cd = 0.65 # coefficient of discharge\n", + "\n", + "A =pi*d**2/4\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2 \n", + "\n", + "# Solution\n", + "\n", + "Q = Cd*A*sqrt(2*g*h)/100\n", + "\n", + "print \"Actual discharge =\",round(Q,2),\"l/s\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.3 Page no 162" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge through the orifice = 2.69 m**3/s\n" + ] + } + ], + "source": [ + "# Discharge through the orifice\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "import numpy as np\n", + "\n", + "# Given\n", + "\n", + "H1 = 3 # height in m\n", + "\n", + "H2 = 4 # height in m\n", + "\n", + "b = 0.5 # width in m\n", + "\n", + "Cd = 0.65 # co-efficient of discharge \n", + "\n", + "g = 9.81 # acceleration due to grvity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "q = lambda h: h**(1/2)\n", + " \n", + "Q,err = integrate.quad(q, H1, H2)\n", + "\n", + "Qt = Cd*b*sqrt(2*g)*Q\n", + "\n", + "print \"Discharge through the orifice =\",round(Qt,2),\"m**3/s\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.4 Page no 163" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total Discharge = 1.95 m**3/s\n" + ] + } + ], + "source": [ + "# discharge through orifice\n", + " \n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "from __future__ import division\n", + "\n", + "import numpy as np\n", + "\n", + "# Given\n", + "\n", + "b = 1 # bredth of the tank\n", + "\n", + "d = 0.5 # depth of the tank\n", + "\n", + "h1 = 0.2 # height of the orifice in m\n", + "\n", + "Cd = 0.6 # coefficient of discharge\n", + "\n", + "H1 = 2 # height in m\n", + "\n", + "H2 = 2+h1 # height in m\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "A = 1*0.3 # area of submerged section in m**2\n", + "\n", + "# Solution\n", + "\n", + "q = lambda h: h**(1/2)\n", + " \n", + "Q,err = integrate.quad(q, H1, H2)\n", + "\n", + "Q1 = Cd*b*sqrt(2*g)*(Q) # Flow through area 1\n", + "\n", + "Q2 = Cd*sqrt(2*g*H2)*A\n", + "\n", + "Td = Q1+Q2\n", + "\n", + "print \"Total Discharge =\",round(Td,2),\"m**3/s\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.5 Page no 165" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Actual discharge = 0.000454 m**3/s\n" + ] + } + ], + "source": [ + "# Determine flow rate of water\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d1 = 2 # radius of pipe\n", + "\n", + "d2 = 1 # radius of throat\n", + "\n", + "D1 = 40\n", + "\n", + "D2 = 20\n", + "\n", + "A1 = pi*D1**2/4\n", + "\n", + "A2 = pi*D2**2/4\n", + "\n", + "Cd = 0.95\n", + "\n", + "# Solution\n", + "\n", + "V2 = sqrt(21582/0.9375)\n", + "\n", + "Q = 1.52*pi*(d1/100)**2/4\n", + "\n", + "Qa = Q*Cd\n", + "\n", + "print \"Actual discharge =\",round(Qa,6),\"m**3/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.6 Page no 166" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity at the dept of 1 ft = 5.67 ft/s\n" + ] + } + ], + "source": [ + "# Velocity of stream point at the point of insertion\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "dx = 0.5 # in ft\n", + "\n", + "K = 1 # constant\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "# solution\n", + "\n", + "V = sqrt(2*g*dx)\n", + "\n", + "print \"velocity at the dept of 1 ft =\",round(V,2),\"ft/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 4.7 Page no 172" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge throught the system = 190.0 l/s\n" + ] + } + ], + "source": [ + "# Discharge throught the system\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "gma= 0.8 # specific weight\n", + "\n", + "V2 = 40 # velocity in m/s\n", + "\n", + "z1 =25 # height at point 1\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "d = 15 # diameter of the nozzle in cm\n", + "\n", + "# Solution\n", + "\n", + "V2 = sqrt(2*g*z1/4.25)\n", + "\n", + "A = pi*(d/100)**2/4\n", + "\n", + "Q = A*V2*1000\n", + "\n", + "print \"Discharge throught the system =\",round(Q,0),\"l/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.8 Page no 174" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power input = 32.5 kW\n" + ] + } + ], + "source": [ + "# Power input to the pump\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "# Given\n", + "\n", + "Eff = 0.8 # pump efficiency\n", + "\n", + "Hl = 30 # head loss in m\n", + "\n", + "D1 =6 # diameter in cm\n", + "\n", + "D2 = 2 # diameter in cm\n", + "\n", + "gma = 9810 # specific weight in N/m**3\n", + "\n", + "V2 = 40 # velocity in m/s\n", + "\n", + "P1 = -50 # pressure at point 1 in N/m**2\n", + "\n", + "z2 = 100 # height at point 2\n", + "\n", + "g = 9.8 # acceleration due to gravity in m/s**2\n", + "\n", + "z1 = 30 # height in m\n", + "\n", + "# Solution\n", + "\n", + "V1=(2/6)**2*V2\n", + "\n", + "Q = (pi*6**2/4)*V1*10**-4\n", + "\n", + "Hs = z2 + (V2**2/(2*g)) + z1 + (50/gma) -(V1**2/(2*g))\n", + "\n", + "P = gma*Q*Hs\n", + "\n", + "Pi = (P/Eff)/1000\n", + "\n", + "print \"Power input = \",round(Pi,1),\"kW\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.9 Page no 176" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elevation at height A = 492.39 m\n", + "Elevation at height B = 576.23 m\n" + ] + } + ], + "source": [ + "# Pressure head at A and B\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q = 0.2 # discharge in m**3/s\n", + "\n", + "d1 = 0.25 # diameter of the pipe in m\n", + "\n", + "A = pi*d1**2/4 # area of the pipe\n", + "\n", + "za = 480 # height in m\n", + "\n", + "z1 = 500 # height in m\n", + "\n", + "z3 = 550 # elevation in m\n", + "\n", + "gma =9810 # specific weight in N/m**2\n", + "\n", + "g =9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "V=Q/A # Velocity of in m/s\n", + "\n", + "Hl1 = (0.02*100*V**2/(0.25*2*9.81))\n", + "\n", + "# pressure head at A\n", + "\n", + "Pa =(z1-za-(V**2/(2*g))-Hl1)\n", + "\n", + "El = za+Pa\n", + "\n", + "print \"Elevation at height A =\",round(El,2),\"m\"\n", + "\n", + "# pressure head at B\n", + "\n", + "hs = z3 - z1 + (0.02*(500/0.25)*(V**2/(2*g))) \n", + "\n", + "El2 = El+hs\n", + "\n", + "print \"Elevation at height B =\",round(El2,2),\"m\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter5.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter5.ipynb new file mode 100755 index 00000000..f7f93457 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter5.ipynb @@ -0,0 +1,578 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 5 : Fluid Momentum" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.1 Page no 192" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resultant force on the elbow = 9800.58 N\n", + "Angle of resultant force = 34.8516 deg\n" + ] + } + ], + "source": [ + "# Resultant force on the elbow\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q = 0.3 # Water flow rate in m**3/s\n", + "\n", + "d1 = 0.3 # diameter at inlet in meters\n", + "\n", + "A1 = pi*d1**2/4 # inlet area in m**2\n", + "\n", + "d2 = 0.15 # diameter at outlet in m\n", + "\n", + "A2 = pi*d2**2/4 # area at outlet in m**2\n", + "\n", + "P1 = 175*10**3 # inlet pressure in kN/m**2\n", + "\n", + "P2 = 160*10**3 # Pressure at outlet in kN/m**2\n", + "\n", + "F1 = P1*A1 # Force at inlet\n", + "\n", + "F2 = P2*A2 # Force at outlet\n", + "\n", + "rho = 1000 # density of water in kg/m**3\n", + "\n", + "V1 = Q/A1 # inlet velocity in m/s\n", + "\n", + "V2 = Q/A2 # Velocity at outlet in m/s\n", + "\n", + "theta = 45*pi/180 # angle in deg\n", + "\n", + "# Soultion\n", + "\n", + "# Applying the X momentum equation we get\n", + "\n", + "Rx = F1 - F2*cos(theta)-rho*Q*(V2*cos(theta)-V1)\n", + "\n", + "# Applying the Y momentum equation\n", + "\n", + "Ry = F2*sin(theta)+rho*Q*(V2*sin(theta)-0)\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "print \"Resultant force on the elbow = \",round(R,2),\"N\"\n", + "\n", + "a = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Angle of resultant force = \",round(a,4),\"deg\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.2 Page no 194" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resultant force = 1232.0 lbs\n", + "Angle of resultant force = 59.2396 deg\n" + ] + } + ], + "source": [ + "# Force exerted by the jet on the vane\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "V1 = 80 # Velocity in ft/s\n", + "\n", + "A1 = 0.1 # area in ft**2\n", + "\n", + "g = 32.2 # Acceleration due to gravity in ft/s**2\n", + "\n", + "rho = 1.94 # density in lb/ft**3\n", + "\n", + "a = pi/3 # angle of pipe bend\n", + "\n", + "# Solution\n", + "\n", + "Q = A1*V1 # Total discharge in m**3\n", + "\n", + "# Applying bernoullis at point 1 and 2\n", + "\n", + "V2 = sqrt((2*g*V1**2/(2*32.2))-3*2*g)\n", + "\n", + "# Pressure at the end of the section are atmospheric and hence 0\n", + "\n", + "# momentum equation in X direction\n", + "\n", + "Rx = -(rho*Q*(V2*cos(a)-80))\n", + "\n", + "# momentum equation in Y direction\n", + "\n", + "Ry = (rho*Q*(V2*sin(a)-0))\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "print \"Resultant force = \",round(R,0),\"lbs\"\n", + "\n", + "ang = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Angle of resultant force = \",round(ang,4),\"deg\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 5.3 Page no 195 " + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resultant Force = 12489.0 N\n", + "Angle with horizontal = 69.2 deg with horizontal\n" + ] + } + ], + "source": [ + "# Force needed to hold the Y position \n", + "\n", + "# Given\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "Q1 = 0.5 # discharge from pipe 1 in m**3/s\n", + "\n", + "Q2 = 0.3 # discharge from pipe 2 in m**3/s\n", + "\n", + "Q3 = 0.2 # discharge from pipe 3 in m**3/s\n", + "\n", + "d1 = 0.45 # diameter of pipe 1 in m\n", + "\n", + "d2 = 0.3 # diameter of pipe 2 in m\n", + "\n", + "d3 = 0.15 # diameter of pipe 3 in m\n", + "\n", + "A1 = pi*d1**2/4 # area in m**2\n", + "\n", + "A2 = pi*d2**2/4 # area in m**2\n", + "\n", + "A3 = pi*d3**2/4 # area in m**2\n", + "\n", + "P1 = 60*10**3 # Pressure at point 1 in kPa\n", + "\n", + "gma = 9810\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "# Solution\n", + "\n", + "V1 = Q1/A1\n", + "\n", + "V2 = Q2/A2\n", + "\n", + "V3 = Q3/A3\n", + "\n", + "P2 = gma*((P1/gma) + V1**2/(2*g) - V2**2/(2*g))\n", + "\n", + "P3 = gma*((P1/gma) + V1**2/(2*g) - V3**2/(2*g))\n", + "\n", + "F1 = P1*A1\n", + "\n", + "F2 = P2*A2\n", + "\n", + "F3 = P3*A3\n", + "\n", + "Rx = rho*(Q2*V2*cos(pi/6)-Q3*V3*cos(pi/9)-0)+F3*cos(pi/9)-F2*cos(pi/6)\n", + "\n", + "Ry = rho*((Q2*V2*sin(pi/6)+Q3*V3*sin(pi/9)-Q1*V1))+F3*sin(pi/9)-F2*sin(pi/6)-F1\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "a = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Resultant Force = \",round(R,0),\"N\"\n", + "\n", + "print \"Angle with horizontal = \",round(a,1),\"deg with horizontal\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.4 Page no 199" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Normal force on the plate = 423.0 lbs\n" + ] + } + ], + "source": [ + "# Normal force on the plate\n", + "\n", + "# Given\n", + "from math import *\n", + "\n", + "d = 2 # diameter in inches\n", + "\n", + "A = pi*d**2/(4*144) # Area of jet\n", + "\n", + "V = 100 # velocity of jet in ft/s\n", + "\n", + "Q = A*V # dischargge in ft**3/s\n", + "\n", + "gma = 62.4 # mass\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "# Solution\n", + "\n", + "Rx = (gma*Q*V)/g # horizontal force required to keep plate in position\n", + "\n", + "print \"Normal force on the plate = \",round(Rx,0),\"lbs\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.5 Page no 202" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force on the plate = 331.34 N\n", + "Work done per second = 3313.4 N.m/s\n", + "Efficiency = 44.4 %\n" + ] + } + ], + "source": [ + "# Force on the plate ; work doen per second; efficiency\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "D = 0.075 # diameter in m\n", + "\n", + "A =pi*D**2/4 # area of jet\n", + "\n", + "V =15 # velocity of jet in m/s\n", + "\n", + "w = 9810 # specific weight\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s^2\n", + "\n", + "# Solution\n", + "\n", + "Q =A*V # Discharge in m**3/s\n", + "\n", + "Vp = 10 # velocity of plate in m/s\n", + "\n", + "Rx = w*Q*(V-Vp)/g # force in X direction\n", + "\n", + "print \"Force on the plate = \",round(Rx,2),\"N\"\n", + "\n", + "W = Rx*Vp\n", + "\n", + "print \"Work done per second = \",round(W,1),\"N.m/s\"\n", + "\n", + "Eff = 2*(V-Vp)*Vp/V**2\n", + "\n", + "E = 100*Eff\n", + "\n", + "print \"Efficiency = \",round(E,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.6 Page no 204" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force exerted in X direction = 273.8 lbs\n", + "Force exerted in Y direction = 0.0 lbs\n" + ] + } + ], + "source": [ + "# Force exerted on the plate\n", + "\n", + "# Given\n", + "from math import *\n", + "\n", + "d = 3 # diameter in inches\n", + "\n", + "A = pi*d**2/(4*144) # Area of jet\n", + "\n", + "Q = 2 # discharge in ft**3/s\n", + "\n", + "rho = 1.94 # density in lbs/ft**3\n", + "\n", + "# Solution\n", + "\n", + "V = Q/A # velocity in ft/s\n", + "\n", + "alpha = pi/6 # inlet vane angle\n", + "\n", + "bta = pi/6 # outlet vane angle\n", + "\n", + "Rx = rho*Q*(V*cos(bta)+V*cos(alpha)) # force in X direction\n", + "\n", + "Ry = rho*Q*(V*sin(bta)-V*sin(alpha)) # force in Y direction\n", + "\n", + "print \"Force exerted in X direction = \",round(Rx,1),\"lbs\"\n", + "\n", + "print \"Force exerted in Y direction = \",round(Ry,1),\"lbs\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.7 Page no 207" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a ) Angle of blade top at inlet and Outlet, Phi = 4 deg\n", + "b ) Work done per N of fluid per second = 80.31 N.m\n", + "c ) Efficiency = 98.4 %\n" + ] + } + ], + "source": [ + "# Angle of blade tips at inlet and exit ; work done on the vane; efficiency of the vane\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "V1 =40 # velocity in m/s\n", + "\n", + "Vp = 20 # velocity of the plate in m/s\n", + "\n", + "alpha = pi/6 # inlet vane angle\n", + "\n", + "bta = pi/9 # outlet vane angle\n", + "\n", + "g = 9.81\n", + "\n", + "# Solution\n", + "\n", + "V1x = V1*cos(alpha)\n", + "\n", + "Vw1 = V1x;\n", + "\n", + "V1y = V1*sin(alpha)\n", + "\n", + "dV = V1x - Vp\n", + "\n", + "theta = atan(V1y/dV)*180/pi\n", + "\n", + "Vr1 = V1y/sin(theta*pi/180)\n", + "\n", + "Vr2 = Vr1\n", + "\n", + "# from trial and error we get the blade tip angle at inlet and outlet\n", + "\n", + "print \"a ) Angle of blade top at inlet and Outlet, Phi = 4 deg\"\n", + "\n", + "phi = 4*pi/180 \n", + "\n", + "V2 = Vr2*sin(phi)/sin(bta)\n", + "\n", + "V2w = V2*cos(bta)\n", + "\n", + "W = (V2w+V1x)*Vp/g\n", + "\n", + "print \"b ) Work done per N of fluid per second = \",round(W,2),\"N.m\"\n", + "\n", + "Eff = (1 - (V2/V1)**2)*100\n", + "\n", + "print \"c ) Efficiency = \",round(Eff,2),\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.8 Page no 211" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a - Thrust on the plane = 5372.2 lbs\n", + "b - Theoretical efficiency = 76.0 %\n", + "c - Theoretical horsepower required = 4560.0 hp\n", + "d - Pressure difference across blades = 190.0 lbs/ft**3\n" + ] + } + ], + "source": [ + "# Thrust on the plane; propeller efficiency ; theoretical horsepower ; pressure difference acros the blades\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "v = 220 # velocity in ft/s\n", + "\n", + "d = 6 # diameter of the propeller\n", + "\n", + "Q = 12000 # discharge in ft**3/s\n", + "\n", + "mf = 0.0022 # mass flow rate in slugs/ft**3\n", + "\n", + "# Solution\n", + "\n", + "V1 = v*5280/3600 # velocity in ft/s\n", + "\n", + "V = Q/(pi*d**2/4) # velocity in ft/s\n", + "\n", + "V4 = 2*V-V1\n", + "\n", + "F = mf*Q*(V4-V1) # thrust on the plane\n", + "\n", + "print \"a - Thrust on the plane = \",round(F,1),\"lbs\"\n", + "\n", + "Eff = V1/V # efficiency \n", + "\n", + "E = Eff*100\n", + "\n", + "print \"b - Theoretical efficiency = \",round(E,0),\"%\"\n", + "\n", + "Thp = F*V1/(500*Eff)\n", + "\n", + "print \"c - Theoretical horsepower required = \",round(Thp,0),\"hp\"\n", + "\n", + "dP = mf*(V4**2-V1**2)/2\n", + "\n", + "print \"d - Pressure difference across blades = \",round(dP,2),\"lbs/ft**3\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter6.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter6.ipynb new file mode 100755 index 00000000..3cff1efa --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter6.ipynb @@ -0,0 +1,144 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 6 : Dimensional Analysis and Dynamic Similitude" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 6.2 Page no 233" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence the model should be tested at a velocity of 2.7 m/s. This velocity in the model is called corresponding velocity\n" + ] + } + ], + "source": [ + "# Velocity of the flow\n", + "\n", + "# Given\n", + "\n", + "L = 10 # length scale lp/l\n", + "\n", + "# crue oil at 20 deg C\n", + "\n", + "rhop = 0.86*998.2 # density inn kg/m**3\n", + "\n", + "mup = 8*10**-3 # viscosity in Ns/m**2\n", + "\n", + "Vp = 2.5 # Velocity in m/s\n", + "\n", + "# water at 20 deg C\n", + "\n", + "rhom = 998.2 # density in kg/m**3\n", + "\n", + "mum = 1.005*10**-3 # viscosity in Ns/m**2\n", + "\n", + "# Solution\n", + "\n", + "Vm = Vp*L*(rhop/rhom)*(mum/mup) # velocity in m/s\n", + "\n", + "print \"Hence the model should be tested at a velocity of \",round(Vm,2),\"m/s. This velocity in the model is called corresponding velocity\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 6.3 Page no 233" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum discharge, Qm = 5.65685425 cfs\n", + "Maximum head over crest = 4.74 ft\n" + ] + } + ], + "source": [ + "# Mximum head on the crest and corresponding discharge for dynamically similar conditions\n", + "\n", + "# Given\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "l = 300 # length in ft\n", + "\n", + "Q = 100000 # discharge in cfs\n", + "\n", + "Cd = 3.8 # coefficient of discharge\n", + "\n", + "L = (1/50) # length scale\n", + "\n", + "# Solution\n", + "\n", + "Qm = 100000*(L)**(5/2) # model discharge in cfs\n", + "\n", + "print \"Maximum discharge, Qm = \",round(Qm,8),\"cfs\"\n", + "\n", + "H = (Q/(Cd*l))**(2/3) # height over spill way\n", + "\n", + "h = H*L*12 # head over spill model\n", + "\n", + "print \"Maximum head over crest = \",round(h,2),\"ft\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter7.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter7.ipynb new file mode 100755 index 00000000..a8fa6c1f --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter7.ipynb @@ -0,0 +1,428 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 7 : Fluid Resistance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.1 Page no 245" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Reynolds number for water = 7463.0\n", + "R > 2000 the flow is turbulent for water\n", + "\n", + "\n", + "Reynolds number for glycerine = 8.7\n", + "R < 2000 the flow is laminar for glycerine\n" + ] + } + ], + "source": [ + "# Is the flow laminar or turbulent\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "nu1 = 0.804*10**-6 # viscosity in m**2/s\n", + "\n", + "V = 0.3 # velocity in m/s\n", + "\n", + "D = 0.02 # diameter in m/s\n", + "\n", + "# for water \n", + "\n", + "rho = 995.7 # density in kg/m**3\n", + "\n", + "# for gylcerine\n", + "\n", + "mu = 8620*10**-4 # viscosity in Ns/m**2\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "nu2 = mu/(S*rho) # viscosity of glycerine in Ns/m**2\n", + "\n", + "# Solution\n", + "\n", + "R1 = V*D/nu1\n", + "\n", + "print \"Reynolds number for water =\",round(R1,0)\n", + "\n", + "print \"R > 2000 the flow is turbulent for water\"\n", + "\n", + "print \"\\n\"\n", + "R2 = V*D/nu2\n", + "\n", + "print \"Reynolds number for glycerine =\",round(R2,1)\n", + "\n", + "print \"R < 2000 the flow is laminar for glycerine\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.2 Page no 248" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.7/y\n", + "Turbulence constant = 0.46\n", + "Mixing length = 13.8 cm\n", + "Eddy viscosity = 44.1 Nm/s**2\n" + ] + } + ], + "source": [ + "# Eddy Viscosity; mixing length ; turbulence constant\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from scipy import *\n", + "\n", + "import numpy as np\n", + "\n", + "from sympy import *\n", + "\n", + "y = Symbol('y')\n", + "\n", + "d = 0.0175 # diameter in m\n", + "\n", + "s = 0.3 # shear stress at a distance in m\n", + "\n", + "tau = 103 # shear stress in Pa\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "#y = 0.3\n", + "\n", + "# solution\n", + "\n", + "Up = diff(8.5+0.7*log(y),y)\n", + "\n", + "print Up\n", + "\n", + "Up = (0.7/0.3) # for y = 0.3\n", + "\n", + "k = sqrt(tau/(rho*s**2*Up**2))\n", + "\n", + "print \"Turbulence constant = \",round(k,2)\n", + "\n", + "Ml = k*s*100 # mixing length\n", + "\n", + "print \"Mixing length = \",round(Ml,1),\"cm\"\n", + "\n", + "Eta = rho*(Ml/100)**2*Up\n", + "\n", + "print \"Eddy viscosity =\",round(Eta,1),\"Nm/s**2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.3 Page no 256" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEICAYAAABS0fM3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4jOfeB/DvIFQkJIKIpUlatWQjEdI6lvHaKY21cQ6i\nHMfh7eoQVRzROkRRb9HFabXoYqmtWpU6WhN7I5EQseS0miAmSCUkksgyz/vHTWTImGQyzzyzfD/X\nNZfMZPI8v5lr3L957uV3qyRJkkBERA6rltIBEBGRspgIiIgcHBMBEZGDYyIgInJwTARERA6OiYCI\nyMHJlgiKiooQFhaGTp06wc/PD3PmzAEAREdHo1WrVggODkZwcDBiY2PlCoGIiKpAJec6goKCAjg7\nO6O0tBTdu3fH8uXL8dNPP8HV1RUzZsyQ67RERFQNsnYNOTs7AwCKi4tRVlYGd3d3AADXsBERWRFJ\nRmVlZVLHjh0lFxcXadasWZIkSVJ0dLTk7e0tBQUFSZMmTZJycnL0/gYAb7zxxhtvJtxMJesVQa1a\ntZCcnIwrV67g4MGD0Gg0mDZtGn7//XckJyfDy8sL//jHPx75O0mSeDPTbcGCBYrHYE83vp98P631\nVqO2ukZ/XUWNGjXCkCFDkJCQgGbNmkGlUkGlUuGvf/0r4uPjzX6+7Gzg8GGzH5aIyC7Jlgiys7OR\nm5sLACgsLMR//vMfBAcHIysrq/w5O3fuRGBgoNnPfekSMHo0kJdn9kMTEdmdOnIdWKvVIjIyEjqd\nDjqdDuPHj0efPn0wYcIEJCcnQ6VSwdfXF2vXrjX7uUNCgL59geXLgYULzX54m6JWq5UOwa7w/TQv\nvp/WQdbpo6ZQqVQ17u8CgIwMkRBSUoAWLcwQGBGRFatJ22m3iQAAoqKA3Fzg3/82y+GIyMY1btwY\nOTk5SodRI+7u7rh58+YjjzMRGJCbC7RtCxw4APj7m+WQRGTDzNm+KMXQa6jJa7PrWkNubsCcO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2p1\nW1USEZFlWfcOZUREJDsmAiIiB8dEQETk4JgIiIgcHBMBURWcOHECHTt2xN27d3Hnzh0EBARwBSzZ\nDc4aIqqi+fPno6ioCIWFhWjdujVmz56tdEhEZsFEQFRFJSUlCA0NRf369XHs2DGWlSC7wa4hoirK\nzs7GnTt3kJ+fj8LCQqXDITIbXhEQVdGwYcPw5z//GRcvXoRWq8Xq1auVDonILBQrMUFkSzZu3Ih6\n9eohIiICOp0O3bp1g0ajgVqtVjo0ohrjFQERkYPjGAERkYNjIiAicnBMBEREDo6JgIjIwTEREBE5\nOCYCIiIH9/84dLhcBD/ZrQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x446d2d0>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# PLot boundary layer distribution and total drag on the plate\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from pylab import plt\n", + "\n", + "from numpy import *\n", + "\n", + "from scipy import *\n", + "\n", + "from sympy import *\n", + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "# Given\n", + "\n", + "# for glycerine\n", + "\n", + "S = 1.26 # specific gravity \n", + "\n", + "mu = 0.862 # dynamic viscosity in Ns/m**2\n", + "\n", + "rho = S *1000 # density in kg/m**3\n", + "\n", + "K2 = 0.332\n", + "\n", + "V=1 # velocity in m/s\n", + "\n", + "# Solution\n", + "\n", + "# from blasius equation\n", + "\n", + "x = [0,0.1,0.5,1.0,2.0];\n", + "\n", + "d = 0.1307*np.sqrt(x)*100\n", + "\n", + "tauo = K2*rho*V**2/(sqrt(1462)*np.sqrt(x))\n", + "\n", + "#plt.figure()\n", + "plt.plot(x, d, 'r')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm),tauo(N/m**2)')\n", + "#plt.title('delta v/s x')\n", + "#plt.legend('d')\n", + "\n", + "plt.plot(x, tauo, 'b')\n", + "plt.xlabel('x')\n", + "#plt.ylabel('tauo(N/m**2)')\n", + "#plt.title('tauo v/s x(m)')\n", + "plt.legend('d''t')\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.4 page no 260" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEXCAYAAACpuuMDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVVX+x/E3ApV4xUuNAkUJAd5RsLA0HFMTlSzK0MnU\nMYeanElrsotNYaOmpU5jNqX9SjNH1OkipoKFxWRewNRRR0vxgiFpimJeSLm4f3/sPIqoHJDNOZzz\neT0Pz8PmbPb5nv3o/rDW3mstD8MwDERERH5Vy9EFiIiIc1EwiIhIKQoGEREpRcEgIiKlKBhERKQU\nBYOIiJSiYBCXNHToUP7617/atW9gYCArV660uCKRmkPBIC7Jw8MDDw+PCu+bmJjI4MGDrSyNV199\nlbFjx1r6HiJXQ8EgLstZx24uX76cPn36OLoMkctSMIhL2LRpEx06dKB+/frEx8dz+vTpUq8vXbqU\n9u3b4+vryx133MHWrVvLHCM1NZVXX32VhQsXUq9ePcLDwwGYPXs2LVu2pH79+rRo0YJZs2ZdsoYz\nZ87QsGFDtm3bZvvZ4cOH8fHxIS8vD4D8/Hx27txJVFQUeXl59O3bF19fXxo3bkzXrl0vGWZr1qyh\nadOm7N+/H4DNmzfTqFEjdu7cWbmTJVIOBYPUeIWFhfTv358hQ4aQn5/Pgw8+yMcff2zrHtq0aRPD\nhw/n3Xff5ejRoyQkJBAbG0tRUVGp49xzzz288MILxMfHc+LECTZt2gTADTfcwLJlyzh+/DizZ89m\n9OjRttcudO211xIXF0dSUpLtZ4sWLSI6OpomTZoAsGLFCu6++248PDyYOnUqAQEB5OXlcejQIV59\n9dVLdn917tyZhIQEhgwZwi+//MLDDz/M+PHjufXWW6vsHIpcSMEgNd66desoLi7myS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yxqCIRa6jFICIipajFICIipSgYRESkFAWD\niIiUomAQEZFSFAwiIlKKgkFEREr5f1iGZ/dHpXkqAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x4b3b910>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEXCAYAAACgUUN5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XdYFNf+BvB3KQFBMICKiCjYoihVihrL2g2WoCYWropR\nFNSoUWNM4o0hiS3XFkuMUSNqYsmNFQEbwVWsgAIqqCQqVhQRUGlSdn5/eN2fRBAEdoZl38/z8Dy7\nO7MzL8d1v5wzM2dkgiAIICIiraUjdQAiIpIWCwERkZZjISAi0nIsBEREWo6FgIhIy7EQEBFpORYC\nqhHGjBmDr776qlzr2tra4s8//1RzIiLNwUJANYJMJoNMJnvjdQMDAzFq1Ch1RsPChQsxZ84cte6D\nqDJYCKjGqK7XRoaFhaFfv35SxyAqFQsBaaTY2Fi4urrC1NQUw4cPR15eXrHlISEhcHZ2hpmZGd59\n911cvHjxlW0cPHgQCxcuxO+//w4TExO4uLgAAIKCgmBvbw9TU1M0a9YM69atKzHDs2fP8PbbbyMh\nIUH12sOHD2FkZIS0tDQAQEZGBpKSktChQwekpaWhf//+MDMzg4WFBbp06VJi8Tp16hTq1auHO3fu\nAADi4+Nhbm6OpKSkijUWURlYCEjj5Ofnw9vbG76+vsjIyMCHH36IXbt2qYZ7YmNjMW7cOKxfvx7p\n6enw9/fHwIEDUVBQUGw7ffv2xZdffonhw4fj6dOniI2NBQBYWloiNDQUT548QVBQEKZPn65a9jID\nAwMMGTIE27dvV7323//+F3K5HHXr1gUAHDp0CD179oRMJsPSpUthY2ODtLQ0pKamYuHChSUOZ3Xs\n2BH+/v7w9fVFbm4uRo4ciXnz5qFly5ZV1oZEL2MhII1z5swZFBYWYtq0adDV1cWQ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VyGqEMluXk9UncydOxdubm6oVasWVq1ahaio\nKNWcLsDzq0q7desGY2NjGBsb4+2331bdqMTBwQEXLlxQrduwYUMkJyeL/SsQVRgLARGAtLQ0ZGdn\no6ioCLm5uQBencHRwMBA9VhHR0f1XEdHB4WFhaplgiBIPist0Zvg0BARns/RMm/ePPj4+GD27Nmw\ntbXF/fv3VctfNxPLP5elpKTA1tZWXVGJqhx7BKT1tmzZAgMDAwwfPhxKpRIdO3ZEYmIiCgsLkZOT\nAyMjI8hksmJ/5f/z8cvPY2NjS72PM1F1xEnniEoRGBiI1q1bY9iwYeV+T1JSEj799FMEBwerMRlR\n1eLQEFEpJk+ejM2bN7/Re9auXYvPPvtMTYmI1IM9AiIiLcceARGRlmMhICLSciwERERajoWAiEjL\nsRAQEWk5FgIiIi33f5w+Vkc37U5LAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x4e36b10>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total Drag = 0.595 N\n" + ] + } + ], + "source": [ + "# Sketch the boundary layer and drag on the plate\n", + "\n", + "import numpy as np\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "from numpy import sqrt\n", + "\n", + "# Given\n", + "\n", + "rho = 1.197 # air density in kg/m**3\n", + "\n", + "mu = 18.22*10**-6 # viscosity in Ns/m**2\n", + "\n", + "l = 5 # length of the plate\n", + "\n", + "V = 8 # velocity in m/s\n", + "\n", + "Rec = 5*10**5 # crictical reynolds number\n", + "\n", + "l1 = 0.951 # length from 0 to 0.951\n", + "\n", + "l2 = 5.0 # length from 0 to 5\n", + "\n", + "l3 = 0.951 # length from 0 to 0.951\n", + "\n", + "# Solution\n", + "\n", + "X = Rec/525576\n", + "\n", + "x = [0,0.1,0.3,0.6,0.951];\n", + "\n", + "d = 0.0069*np.sqrt(x)*100\n", + "\n", + "plt.figure()\n", + "plt.plot(x, d, 'r')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm)')\n", + "plt.title('delta v/s x')\n", + "plt.legend('L')\n", + "plt.show()\n", + "\n", + "X1 = [0.951,1.5,2.0,2.5,3.0,4.0,5.0]\n", + "\n", + "Dt = 0.0265*np.power(X1,(4/5))*100\n", + "\n", + "plt.figure()\n", + "plt.plot(X1, Dt, 'g')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm)')\n", + "plt.title('delta v/s x')\n", + "plt.legend('T')\n", + "plt.show()\n", + "\n", + "Td = 0.664*sqrt(mu*rho*V**3*l1)+0.036*rho*V**2*l2*(mu/(rho*V*l2))**0.2-0.036*rho*V**2*l3*(mu/(rho*V*l3))**0.2\n", + "\n", + "print \"Total Drag = \",round(Td,3),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.5 Page no 270" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Drag on the sphere = 0.0043 N\n" + ] + } + ], + "source": [ + "# Determine drag on the sphere\n", + "\n", + "from math import *\n", + "\n", + "from pylab import plt\n", + "\n", + "from __future__ import division\n", + "\n", + "# Given\n", + "\n", + "d = 0.01 # doameter of sphere in m\n", + "\n", + "v = 0.05 # velocity in m/s\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "mu = 0.826 # kinematic viscosity in Ns/m**2\n", + "\n", + "rho = S*1000 # density\n", + "\n", + "# Solution\n", + "\n", + "R = rho*v*d/mu\n", + "\n", + "# for the above rho\n", + "\n", + "Cd = 35\n", + "\n", + "Fd = 0.5*Cd*rho*v**2*pi*d**2/4\n", + "\n", + "print \"Drag on the sphere = \",round(Fd,4),\"N\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter8.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter8.ipynb new file mode 100755 index 00000000..f81b0b54 --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter8.ipynb @@ -0,0 +1,396 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 8 : Laminar Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.1 Page no 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Maximum shear stress = 1.232 N/m**2\n", + "(b) Maximum velocity = 0.645 m/s\n", + "(c) Discharge = 4.1e-06 m**3/s\n", + "Reynolds number = 547.0 is less than 2000, the flow is laminar and the calculations are valid\n" + ] + } + ], + "source": [ + "# Determine maximum velocity and shear stress\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "P1 = 200 # Pressure at inlet in kPa\n", + "\n", + "P2 = 260 # Pressure at outlet in kPa\n", + "\n", + "d = 0.004 # diameter in m\n", + "\n", + "L = 8 # length of pipe in meters\n", + "\n", + "z = 6 # height of the pipe from the ground\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# properties of kerosene\n", + "\n", + "mu = 19.1*10**-4 # viscosity of kerosene at 20 deg C\n", + "\n", + "S = 0.81 # specific gravity of kerosene\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "# Solution\n", + "\n", + "# calculating direction of flow\n", + "\n", + "p1 = (P1+g*z*S)*1000 # point 1\n", + "\n", + "p2 = (P2)*1000 # point 2\n", + "\n", + "# direction of flow is from point 1-2\n", + "\n", + "# shear stress\n", + "\n", + "Sp = -((p1-p2)/sqrt(L**2+z**2))\n", + "\n", + "r = d/2\n", + "\n", + "Tau_max = r*Sp/2\n", + "\n", + "print \"(a) Maximum shear stress =\",round(Tau_max,3),\"N/m**2\"\n", + "\n", + "# maximum velocity\n", + "\n", + "Vmax = r**2*Sp/(4*mu)\n", + "\n", + "print \"(b) Maximum velocity =\",round(Vmax,3),\"m/s\"\n", + "\n", + "# discharge\n", + "\n", + "Q = pi*r**4*Sp/(8*mu)\n", + "\n", + "print \"(c) Discharge = \",round(Q,7),\"m**3/s\"\n", + "\n", + "# calculate reynolds number\n", + "\n", + "V = Vmax/2\n", + "\n", + "R = rho*V*d*S/mu\n", + "\n", + "print \"Reynolds number =\",round(R,0),\"is less than 2000, the flow is laminar and the calculations are valid\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example no 8.2 Page no 289" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R = 1299.0 is lesss than 2000 , the flow is laminar\n", + "Head loss = 3.77 cm of water\n" + ] + } + ], + "source": [ + "# Determine the head loss\n", + "\n", + "# Given\n", + "\n", + "d = 0.02 # diameter of the pipe in m\n", + "\n", + "l = 30 # length of the pipe in m\n", + "\n", + "v = 0.1 # velocity in m/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# for water at 5 deg C\n", + "\n", + "nu = 1.54*10**-6 # kinematic viscosity of water in m**2/s\n", + "\n", + "# Solution\n", + "\n", + "R = v*d/nu\n", + "\n", + "print \"R = \",round(R,0),\"is lesss than 2000 , the flow is laminar\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = f*l*v**2/(2*g*d) # head loss due to friction\n", + "\n", + "H=Hf*100\n", + "\n", + "print \"Head loss = \",round(H,2),\"cm of water\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.3 Page no 290" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R = 40.07 is less than 2000 and hence flow is laminar\n", + "Horse power required to pump the oil = 10.6\n" + ] + } + ], + "source": [ + "# Horsepower required to pump 50 tons of oil\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "# oil properties\n", + "\n", + "S = 0.92 # specific gravity\n", + "\n", + "gma = S*62.4 # density in lbs/ft**3\n", + "\n", + "nu=0.0205 # viscosity in ft**2/s\n", + "\n", + "W = 50 # weight of oil\n", + "\n", + "d = 9 # diameter of the pipe in inches\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "# Solution\n", + "\n", + "Q = W*2000/(gma*3600) # discharge in ft**3/s\n", + "\n", + "A = pi*d**2/(4*144) # area of pipe\n", + "\n", + "V = Q*1000/(A) # velocity in ft/s\n", + "\n", + "R = V*0.75/(nu*1000) # Reynolds number\n", + "\n", + "print \"R =\",round(R,2),\"is less than 2000 and hence flow is laminar\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = (f*5280*(V/1000)**2)/(2*g*0.75)\n", + "\n", + "Hp = gma*Q*Hf/(550)\n", + "\n", + "print \"Horse power required to pump the oil = \",round(Hp,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.4 Page no 291" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Viscosity of the liquid = 0.0182 poise\n" + ] + } + ], + "source": [ + "# Viscosity of the liquid in poise\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "V = 50 # Volume in m**3\n", + "\n", + "d = 5 # diameter in m\n", + "\n", + "d1 = 0.1 # diameter of bore\n", + "\n", + "l = 10 # length of the tube\n", + "\n", + "t = 20*60 # time in seconds\n", + "\n", + "rho = 0.88 # density in g/cm**3\n", + "\n", + "H1 = 5 # height from the base in m\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "a = pi*d1**2/4\n", + "\n", + "# Solution\n", + "\n", + "# From derivation we obtain a equation for T\n", + "\n", + "H2 = H1-(V/A)\n", + "\n", + "mu = t*rho*a*(0.1)*98.1/(32*A*10*log(H1/H2))\n", + "\n", + "print \"Viscosity of the liquid =\",round(mu,4),\"poise\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.5 Page no 297" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge q = 0.013 per unit ft of the plate\n", + "Shear stress on the plate = 0.086 lbs/ft**2 and resisting the motion of the plate\n" + ] + } + ], + "source": [ + "# Velocity distribution; Discharge ; shear on the upper plate\n", + "\n", + "# Given\n", + "\n", + "from math import *\n", + "\n", + "# properties of kerosene oil at 20 deg C\n", + "\n", + "S = 0.81 # specific gravity of oil\n", + "\n", + "mu = 4*10**-5 # viscosity of oil in lb.s/ft**2\n", + "\n", + "gma = 62.4*S # density in lbs/ft**3\n", + "\n", + "p1 = 6.51 # pressure at point 1 in psia\n", + "\n", + "p2 = 8 # pressure at point 2 in psia\n", + "\n", + "h = 0.006 # distance between the plate in ft\n", + "\n", + "l = 4 # length of the plate in ft\n", + "\n", + "theta = pi/6 # angle of inclination\n", + "\n", + "# Solution\n", + "\n", + "# point 1\n", + "\n", + "P1 = p1*144 + gma*l*sin(theta)\n", + "\n", + "# point 2\n", + "\n", + "P2 = p2*144\n", + "\n", + "# flow is taking from poont 2-1\n", + "\n", + "Sp = (P2-P1)/4\n", + "\n", + "# equation for u = 2154.75*y-359125*y**2\n", + "\n", + "y = h\n", + "\n", + "# discharge per ft width\n", + "\n", + "q = (2154.75*y**2/2) - (359125*y**3/3)\n", + "\n", + "print \"Discharge q = \",round(q,3),\"per unit ft of the plate\"\n", + "\n", + "# to find shear at the top of the plate take du/dy = 0\n", + "\n", + "dV = 2154.75 - 718250*h\n", + "\n", + "# shear stress\n", + "\n", + "T = -mu*dV\n", + "\n", + "print \"Shear stress on the plate = \",round(T,3),\"lbs/ft**2 and resisting the motion of the plate\"\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics_by_Irfan_A_Khan/Chapter9.ipynb b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter9.ipynb new file mode 100755 index 00000000..279e480a --- /dev/null +++ b/Fluid_Mechanics_by_Irfan_A_Khan/Chapter9.ipynb @@ -0,0 +1,847 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Chapter 9 : Turbulent flow in Pipes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.1 Page no 308" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It is a laminar flow\n", + "(a) Head loss due to flow for glycerine = 17.1 m \n", + "The flow is turbulent\n", + "(a) Head loss due to flow for water = 5.42 m \n" + ] + } + ], + "source": [ + "# Determine Head loss\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "mu = 0.826 # kinematic viscosity in Ns/m**2\n", + "\n", + "# for water\n", + "\n", + "rho = 998 # density of water in kg/m**3\n", + "\n", + "mu1 = 1.005*10**-3 # viscosity in Ns/m**2\n", + "\n", + "# for glycerine\n", + "\n", + "rho1 = S*rho # density of glycerine in kg/m**3\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "d1 = 0.2 # diameter in m\n", + "\n", + "A = pi*d1**2/4 # area in m**2\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "l =100 # length of the pipe\n", + "\n", + "# Solution\n", + "\n", + "V = Q/A\n", + "\n", + "R = rho1*V*d1/mu\n", + "\n", + "print \"It is a laminar flow\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = f*l*V**2/(2*g*d1) # head loss due to friction\n", + "\n", + "print \"(a) Head loss due to flow for glycerine =\",round(Hf,1),\"m \"\n", + "\n", + "R1 = rho*V*d1/mu1\n", + "\n", + "print \"The flow is turbulent\"\n", + "\n", + "e = 0.025\n", + "\n", + "r = e/(d1*100)\n", + "\n", + "f = 0.021\n", + "\n", + "hf = f*l*V**2/(2*g*d1)\n", + "\n", + "print \"(a) Head loss due to flow for water =\",round(hf,2),\"m \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.2 Page no 311" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.1853324563\n", + "Discharge = 0.1 m**3/s\n" + ] + } + ], + "source": [ + "# Discharge of water\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "# for water\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # for cast iron in cm\n", + "\n", + "L = 100 # length of the pipe in m\n", + "\n", + "D = 0.2 # diameter in m\n", + "\n", + "hf = 5.43 # head loss due to friction\n", + "\n", + "r = e/(D*100)\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "A = sqrt(2*g*D*hf/L)\n", + "\n", + "B = D/nu\n", + "\n", + "f = 0.021 # from moodys diagram\n", + "\n", + "V = A/sqrt(f)\n", + "\n", + "print V\n", + "\n", + "R = B*f\n", + "\n", + "A = pi*D**2/4\n", + "\n", + "Q = A*V\n", + "\n", + "print \"Discharge =\",round(Q,2),\"m**3/s\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.3 Page no 314" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence the convergence is attained, D= 0.2 m\n" + ] + } + ], + "source": [ + "# Size of the case iron\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q =0.1 # discharge in m**3/s\n", + "\n", + "hf = 5.43 # friction loss head in m\n", + "\n", + "L = 100 # length of pipe\n", + "\n", + "nu = 1.00*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # for cast iron in cm\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "A = 8*L*Q**2/(hf*g*pi**2)\n", + "\n", + "B = 4*Q/(pi*nu)\n", + "\n", + "# for D = 0.172 ; f=0.01\n", + "D = 0.172\n", + "\n", + "r = e/D\n", + "\n", + "Re = B/D\n", + "\n", + "f = 0.022 # for Re and r\n", + "\n", + "# for D1=0.199 ; f=0.021\n", + "\n", + "D1 = 0.199\n", + "\n", + "r1 = e/D1\n", + "\n", + "R = B/D1\n", + "\n", + "f = 0.021 # for R and r\n", + "\n", + "print \"Hence the convergence is attained, D=\",round(D1,1),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.4 Page no 318" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Head loss = 2.0 ft\n" + ] + } + ], + "source": [ + "# Head loss \n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "L = 500 # length of the pipe in ft\n", + "\n", + "D= 9*2.54/100 # diameter in cm\n", + "\n", + "C = 100 # constant\n", + "\n", + "S = 0.004\n", + "\n", + "# Solution\n", + "\n", + "Hf = S*L\n", + "\n", + "print \"Head loss =\",round(Hf,0),\"ft\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.5 Page no 319" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Head loss of water = 3.2 m\n" + ] + } + ], + "source": [ + "# Head loss of water\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q = 0.1 # water flow rate in m**3/s\n", + "\n", + "d = 30 # diameter in m\n", + "\n", + "l = 500 # length in m\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# Solution\n", + "\n", + "r = log(d/e,10)\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.3)**(2.5)\n", + " \n", + "S = (Q/K)**2\n", + "\n", + "hf = S*l\n", + "\n", + "print \"Head loss of water =\",round(hf,1),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.6 Page no 319" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Head loss of water = 0.1 m**3/s\n" + ] + } + ], + "source": [ + "# Head loss by conveyance method\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "Q = 0.1 # water flow rate in m**3/s\n", + "\n", + "d = 20 # diameter in cm\n", + "\n", + "l = 500 # length in m\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "S = 5.43 \n", + "\n", + "# Solution\n", + "\n", + "r = log(d/e,10)\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.2)**2.5\n", + "\n", + "Q=K*sqrt(S/100)\n", + "\n", + "print \"Head loss of water =\",round(Q,2),\"m**3/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.7 Page no 320" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "K = 0.432 from trial and error\n" + ] + } + ], + "source": [ + "# Solve using the conveyence method\n", + "\n", + "from math import *\n", + "\n", + "# given\n", + "\n", + "eps = 0.025*10**-2 # for cast iron epsilon = 0.0025 cm\n", + "\n", + "# we get the value of K = 0.432 m**2/s\n", + "# we need to do trial and error to find the value of D\n", + "\n", + "# we use the value of D = 0.2 m\n", + "\n", + "D = 0.2 # value in m\n", + "\n", + "g = 9.81\n", + "\n", + "# Solution\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*log10(D/(eps))+1.14)*D**(2.5)\n", + "\n", + "print \"K = \",round(K,3),\" from trial and error\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.8 Page no 326" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total head loss = 83.7 m\n" + ] + } + ], + "source": [ + "# Determine head loss\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "d = 0.1 # diameter of the pipe\n", + "\n", + "Q= 0.075 # discharge in m**3/s\n", + "\n", + "L = 30 # length in m\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "# for water\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025\n", + "\n", + "r = e/(10*d)\n", + "\n", + "# Solution\n", + "\n", + "V = Q/A\n", + "\n", + "Re = V*d/nu\n", + "\n", + "f = 0.025 # firction factor from moodys diagram\n", + "\n", + "hf = f*L*V**2/(2*g*d) \n", + "\n", + "K= 0.5 # contraction constant\n", + "\n", + "hc = K*V**2/(2*g) \n", + "\n", + "K1 =10 # loss of the globe valve\n", + "\n", + "hg = K1*V**2/(2*g)\n", + "\n", + "Th = hf+hc+hg\n", + "\n", + "print \"Total head loss =\",round(Th,1),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.9 Page no 328" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge through the pipe = 0.067 m**3/s\n" + ] + } + ], + "source": [ + "# discharge through the pipe\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "# for water\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "d1 = 0.3 # diameter of pipe 1 in m\n", + "\n", + "d2 = 0.15 # diameter of pipe 2 in m\n", + "\n", + "d3 = 0.08 # diameter of pipe 3 in m\n", + "\n", + "g = 9.81 # acclelration due to gravity in m/s**2\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "f1 = 0.019 # foe e/d1\n", + "\n", + "f2 = 0.022 # foe e/d2\n", + "\n", + "# Solution\n", + "\n", + "V3 = sqrt(2*g*100/((8.4*(f1)+268.85*(f2)+4.85)))\n", + "\n", + "V1 = (d3/d1)**2*V3\n", + "\n", + "V2 = (d3/d2)**2*V3\n", + "\n", + "# reynolds number for pipe BC\n", + "\n", + "R1 = V1*d1/nu\n", + "\n", + "R2 = V2*d2/nu\n", + "\n", + "Q = V3*pi*d3**2/4\n", + "\n", + "print \"Discharge through the pipe =\",round(Q,3),\"m**3/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.10 Page no 332" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Replacement of the flow system = 94.3 m\n" + ] + } + ], + "source": [ + "# Replace the flow system\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "D = 0.2 # diameter of pipe 1\n", + "\n", + "D1 = 0.15 # diameter of pipe 2\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # e for cast iron\n", + "\n", + "r = e/(100*D) \n", + "\n", + "# Solution\n", + "\n", + "V = Q/(pi*(0.2)**2/4)\n", + "\n", + "R = V*D/nu\n", + "\n", + "f = 0.021 # from moodys law\n", + "\n", + "r2 = e/D1\n", + "\n", + "V1 = Q/(pi*D1**2/4)\n", + "\n", + "R1 = V*D1/nu\n", + "\n", + "f2 = 0.023 # from moodys law\n", + "\n", + "L2 = 28562*D1**5/f2\n", + "\n", + "print \"Replacement of the flow system =\",round(L2,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.11 Page no 335" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Discharge through branch 1 = 1.35 m**3/s\n", + "Discharge through branch 2 = 0.566 m**3/s\n", + "Discharge through branch 3 = 0.082 m**3/s\n", + "It is found that hf1=hf2=hf3 = 43.5 The distribution od discharge is correct\n" + ] + } + ], + "source": [ + "# Discharge through each branch\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "e = 0.025 # in cm\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "Q1 = 0.5 # discharge in m**3/s\n", + "\n", + "D1 = 50\n", + "\n", + "L1 = 500 # length in m\n", + "\n", + "g = 9.81\n", + "\n", + "# Pipe 1\n", + "\n", + "r1 = e/D # r1 for pipe 1\n", + "\n", + "V1 = Q1/(pi*(0.5)**2/4)\n", + "\n", + "R = V*(0.5)/nu\n", + "\n", + "f1 = 0.018 # for the reynolds no\n", + "\n", + "hf1 = f*L1*V1**2/(2*g*D1)\n", + "\n", + "# pipe 2\n", + "\n", + "hf2 = hf1\n", + "\n", + "L2 =200 # length in m\n", + "\n", + "D2 = 0.3 # diameter in m\n", + "\n", + "r2 = e/D2\n", + "\n", + "f2 = 0.02 \n", + "\n", + "V2 = 0.419/sqrt(f2) \n", + "\n", + "R2 = V2*D2/nu\n", + "\n", + "Q2 = V2*(pi*D2**2/4)\n", + "\n", + "#pipe 3\n", + "\n", + "hf3=hf1\n", + "\n", + "L3 = 300 # length of pipe 3 in m\n", + "\n", + "D3 =0.15 # diameter of pipe 3 in m\n", + "\n", + "r3 = e/D3 \n", + "\n", + "f = 0.022 # from moody's law\n", + "\n", + "V3 = 0.242/sqrt(f2)\n", + "\n", + "R3 = V3*D3/nu\n", + "\n", + "Q3 = V3*(pi*D3**2/4)\n", + "\n", + "Td = Q1+Q2+Q3\n", + "\n", + "q1 = Q1*(2.0/Td)\n", + "\n", + "q2 = Q2*(2.0/Td)\n", + "\n", + "q3 = Q3*(2.0/Td)\n", + "\n", + "print \"Discharge through branch 1 =\",round(q1,2),\"m**3/s\"\n", + "\n", + "print \"Discharge through branch 2 =\",round(q2,3),\"m**3/s\"\n", + "\n", + "print \"Discharge through branch 3 =\",round(q3,3),\"m**3/s\"\n", + "\n", + "# Actual head loss\n", + "\n", + "d = 0.5\n", + "\n", + "v1 = q1/(pi*(d)**2/4)\n", + "\n", + "R4 = v1*d/nu\n", + "\n", + "r4 = 0.0005 # ratio of e/D\n", + "\n", + "f = 0.018\n", + "\n", + "Hf1 = f*L1*v1**2/(2*g*d)\n", + "\n", + "print \"It is found that hf1=hf2=hf3 =\",round(Hf1,1),\"The distribution od discharge is correct\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 9.14 Page no 349" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum depth = 17.6 ft\n" + ] + } + ], + "source": [ + "# Find minimum depth below the ridge\n", + "\n", + "from math import *\n", + "\n", + "# Given\n", + "\n", + "e = 0.00015 # from moody's chart\n", + "\n", + "D = 2 # depth in ft\n", + "\n", + "r = e/D\n", + "\n", + "z1 = 100 # elevation in ft\n", + "\n", + "mu = 1.084*10**-5 # viscosity in Ns/ft**2\n", + "\n", + "p1 = 34 # pressure head in ft\n", + "\n", + "p2 = 10 # pressure head in ft\n", + "\n", + "g = 32.2 # acclelration due to gravity in ft/s**2\n", + "\n", + "L = 1000 # length in ft\n", + "\n", + "# Solution\n", + "\n", + "f = 0.011 # assume\n", + "\n", + "V = sqrt(100/(10000/(2*2*g)))/sqrt(f)\n", + "\n", + "R = V*D/mu\n", + "\n", + "V1 = 10.15\n", + "\n", + "f1 = 0.0125\n", + "\n", + "Q = V1*pi*D**2/4\n", + "\n", + "x = p1-p2-(V1**2/(2*g))-(f1*L*V1**2/(2*g*D))\n", + "\n", + "Dp = 30 - x\n", + "\n", + "print \"Minimum depth =\",round(Dp,2),\"ft\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [] + } + ], + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Fluid_Mechanics/screenshots/plot1.png b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot1.png Binary files differindex caf0a78f..caf0a78f 100755 --- a/Fluid_Mechanics/screenshots/plot1.png +++ b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot1.png diff --git a/Fluid_Mechanics/screenshots/plot2.png b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot2.png Binary files differindex 35633e7f..35633e7f 100755 --- a/Fluid_Mechanics/screenshots/plot2.png +++ b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot2.png diff --git a/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot3.png Binary files differindex 03ac1d9d..03ac1d9d 100755 --- a/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png +++ b/Fluid_Mechanics_by_Irfan_A_Khan/screenshots/plot3.png diff --git a/Fluid_Mechanics/Chapter_1.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_1.ipynb index a2dd3e26..a2dd3e26 100755 --- a/Fluid_Mechanics/Chapter_1.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_1.ipynb diff --git a/Fluid_Mechanics/Chapter_10.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_10.ipynb index 510f6bab..510f6bab 100755 --- a/Fluid_Mechanics/Chapter_10.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_10.ipynb diff --git a/Fluid_Mechanics/Chapter_11.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_11.ipynb index ac453318..ac453318 100755 --- a/Fluid_Mechanics/Chapter_11.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_11.ipynb diff --git a/Fluid_Mechanics/Chapter_12.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_12.ipynb index 745a2241..745a2241 100755 --- a/Fluid_Mechanics/Chapter_12.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_12.ipynb diff --git a/Fluid_Mechanics/Chapter_13.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_13.ipynb index 664b4abf..664b4abf 100755 --- a/Fluid_Mechanics/Chapter_13.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_13.ipynb diff --git a/Fluid_Mechanics/Chapter_14.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_14.ipynb index 2e55c7c8..2e55c7c8 100755 --- a/Fluid_Mechanics/Chapter_14.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_14.ipynb diff --git a/Fluid_Mechanics/Chapter_15.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_15.ipynb index 95bd78ec..95bd78ec 100755 --- a/Fluid_Mechanics/Chapter_15.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_15.ipynb diff --git a/Fluid_Mechanics/Chapter_16.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_16.ipynb index 73f04778..73f04778 100755 --- a/Fluid_Mechanics/Chapter_16.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_16.ipynb diff --git a/Fluid_Mechanics/Chapter_17.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_17.ipynb index 2791e2c2..2791e2c2 100755 --- a/Fluid_Mechanics/Chapter_17.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_17.ipynb diff --git a/Fluid_Mechanics/Chapter_2.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_2.ipynb index 835909e1..835909e1 100755 --- a/Fluid_Mechanics/Chapter_2.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_2.ipynb diff --git a/Fluid_Mechanics/Chapter_20.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_20.ipynb index f24f7af6..f24f7af6 100755 --- a/Fluid_Mechanics/Chapter_20.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_20.ipynb diff --git a/Fluid_Mechanics/Chapter_22.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_22.ipynb index 2c113fed..2c113fed 100755 --- a/Fluid_Mechanics/Chapter_22.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_22.ipynb diff --git a/Fluid_Mechanics/Chapter_23.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_23.ipynb index 8cb510fa..8cb510fa 100755 --- a/Fluid_Mechanics/Chapter_23.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_23.ipynb diff --git a/Fluid_Mechanics/Chapter_24.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_24.ipynb index ef4fb925..ef4fb925 100755 --- a/Fluid_Mechanics/Chapter_24.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_24.ipynb diff --git a/Fluid_Mechanics/Chapter_25.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_25.ipynb index 9b08e6f3..9b08e6f3 100755 --- a/Fluid_Mechanics/Chapter_25.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_25.ipynb diff --git a/Fluid_Mechanics/Chapter_3.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_3.ipynb index 68980a40..68980a40 100755 --- a/Fluid_Mechanics/Chapter_3.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_3.ipynb diff --git a/Fluid_Mechanics/Chapter_4.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_4.ipynb index 9429e481..9429e481 100755 --- a/Fluid_Mechanics/Chapter_4.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_4.ipynb diff --git a/Fluid_Mechanics/Chapter_5.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_5.ipynb index b12249f7..b12249f7 100755 --- a/Fluid_Mechanics/Chapter_5.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_5.ipynb diff --git a/Fluid_Mechanics/Chapter_6.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_6.ipynb index 5cde4008..5cde4008 100755 --- a/Fluid_Mechanics/Chapter_6.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_6.ipynb diff --git a/Fluid_Mechanics/Chapter_7.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_7.ipynb index 95848de2..95848de2 100755 --- a/Fluid_Mechanics/Chapter_7.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_7.ipynb diff --git a/Fluid_Mechanics/Chapter_8.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_8.ipynb index cd940a0c..cd940a0c 100755 --- a/Fluid_Mechanics/Chapter_8.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_8.ipynb diff --git a/Fluid_Mechanics/Chapter_9.ipynb b/Fluid_Mechanics_by_John_F_Douglas/Chapter_9.ipynb index 5d9fe9d6..5d9fe9d6 100755 --- a/Fluid_Mechanics/Chapter_9.ipynb +++ b/Fluid_Mechanics_by_John_F_Douglas/Chapter_9.ipynb diff --git a/Fluid_Mechanics/README.txt b/Fluid_Mechanics_by_John_F_Douglas/README.txt index d96dbe87..d96dbe87 100755 --- a/Fluid_Mechanics/README.txt +++ b/Fluid_Mechanics_by_John_F_Douglas/README.txt diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/Screenshot_from_2014-04-24_10_11_42.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/Screenshot_from_2014-04-24_10_11_42.png Binary files differnew file mode 100755 index 00000000..03ac1d9d --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/Screenshot_from_2014-04-24_10_11_42.png diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch11.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch11.png Binary files differnew file mode 100755 index 00000000..7f1e98ab --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch11.png diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch3.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch3.png Binary files differnew file mode 100755 index 00000000..1b4c7079 --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch3.png diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch5.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch5.png Binary files differnew file mode 100755 index 00000000..66f3995c --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/ch5.png diff --git a/Fluid_Mechanics/screenshots/incresepressure.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/incresepressure.png Binary files differindex aaeed6e9..aaeed6e9 100755 --- a/Fluid_Mechanics/screenshots/incresepressure.png +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/incresepressure.png diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot1.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot1.png Binary files differnew file mode 100755 index 00000000..caf0a78f --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot1.png diff --git a/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot2.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot2.png Binary files differnew file mode 100755 index 00000000..35633e7f --- /dev/null +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/plot2.png diff --git a/Fluid_Mechanics/screenshots/veldistrtn.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn.png Binary files differindex 1b513465..1b513465 100755 --- a/Fluid_Mechanics/screenshots/veldistrtn.png +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn.png diff --git a/Fluid_Mechanics/screenshots/veldistrtn_1.png b/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn_1.png Binary files differindex 359a0fa5..359a0fa5 100755 --- a/Fluid_Mechanics/screenshots/veldistrtn_1.png +++ b/Fluid_Mechanics_by_John_F_Douglas/screenshots/veldistrtn_1.png diff --git a/Fluid_Power_With_Applications_by_A._Esposito/README.txt b/Fluid_Power_With_Applications_by_A._Esposito/README.txt index 05eb1920..05eb1920 100644..100755 --- a/Fluid_Power_With_Applications_by_A._Esposito/README.txt +++ b/Fluid_Power_With_Applications_by_A._Esposito/README.txt diff --git a/Fluid_mechanics/Chapter_10.ipynb b/Fluid_mechanics_by_Pao/Chapter_10.ipynb index bdfb09f7..bdfb09f7 100755 --- a/Fluid_mechanics/Chapter_10.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_10.ipynb diff --git a/Fluid_mechanics/Chapter_11.ipynb b/Fluid_mechanics_by_Pao/Chapter_11.ipynb index ec13c1a6..ec13c1a6 100755 --- a/Fluid_mechanics/Chapter_11.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_11.ipynb diff --git a/Fluid_mechanics/Chapter_2.ipynb b/Fluid_mechanics_by_Pao/Chapter_2.ipynb index f518cad4..f518cad4 100755 --- a/Fluid_mechanics/Chapter_2.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_2.ipynb diff --git a/Fluid_mechanics/Chapter_3.ipynb b/Fluid_mechanics_by_Pao/Chapter_3.ipynb index 8d368fbf..8d368fbf 100755 --- a/Fluid_mechanics/Chapter_3.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_3.ipynb diff --git a/Fluid_mechanics/Chapter_4.ipynb b/Fluid_mechanics_by_Pao/Chapter_4.ipynb index 49f2ce7e..49f2ce7e 100755 --- a/Fluid_mechanics/Chapter_4.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_4.ipynb diff --git a/Fluid_mechanics/Chapter_5.ipynb b/Fluid_mechanics_by_Pao/Chapter_5.ipynb index 3591a061..3591a061 100755 --- a/Fluid_mechanics/Chapter_5.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_5.ipynb diff --git a/Fluid_mechanics/Chapter_6.ipynb b/Fluid_mechanics_by_Pao/Chapter_6.ipynb index 424aea7a..424aea7a 100755 --- a/Fluid_mechanics/Chapter_6.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_6.ipynb diff --git a/Fluid_mechanics/Chapter_7.ipynb b/Fluid_mechanics_by_Pao/Chapter_7.ipynb index 26326ec8..26326ec8 100755 --- a/Fluid_mechanics/Chapter_7.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_7.ipynb diff --git a/Fluid_mechanics/Chapter_8.ipynb b/Fluid_mechanics_by_Pao/Chapter_8.ipynb index 76c114d3..76c114d3 100755 --- a/Fluid_mechanics/Chapter_8.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_8.ipynb diff --git a/Fluid_mechanics/Chapter_9.ipynb b/Fluid_mechanics_by_Pao/Chapter_9.ipynb index f131ead9..f131ead9 100755 --- a/Fluid_mechanics/Chapter_9.ipynb +++ b/Fluid_mechanics_by_Pao/Chapter_9.ipynb diff --git a/Fluid_mechanics/README.txt b/Fluid_mechanics_by_Pao/README.txt index fe81edb3..fe81edb3 100755 --- a/Fluid_mechanics/README.txt +++ b/Fluid_mechanics_by_Pao/README.txt diff --git a/Fluid_mechanics/screenshots/chap2.png b/Fluid_mechanics_by_Pao/screenshots/chap2.png Binary files differindex c7186e17..c7186e17 100755 --- a/Fluid_mechanics/screenshots/chap2.png +++ b/Fluid_mechanics_by_Pao/screenshots/chap2.png diff --git a/Fluid_mechanics/screenshots/chap3.png b/Fluid_mechanics_by_Pao/screenshots/chap3.png Binary files differindex ea5bf942..ea5bf942 100755 --- a/Fluid_mechanics/screenshots/chap3.png +++ b/Fluid_mechanics_by_Pao/screenshots/chap3.png diff --git a/Fluid_mechanics/screenshots/chap4.png b/Fluid_mechanics_by_Pao/screenshots/chap4.png Binary files differindex 440b52f2..440b52f2 100755 --- a/Fluid_mechanics/screenshots/chap4.png +++ b/Fluid_mechanics_by_Pao/screenshots/chap4.png diff --git a/Fluidization_Engineering/README.txt b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/README.txt index a043f776..a043f776 100755 --- a/Fluidization_Engineering/README.txt +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/README.txt diff --git a/Fluidization_Engineering/ch10.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch10.ipynb index e44d1ebe..e44d1ebe 100755 --- a/Fluidization_Engineering/ch10.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch10.ipynb diff --git a/Fluidization_Engineering/ch11.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch11.ipynb index 48b679d6..48b679d6 100755 --- a/Fluidization_Engineering/ch11.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch11.ipynb diff --git a/Fluidization_Engineering/ch12.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch12.ipynb index 1fc80a09..1fc80a09 100755 --- a/Fluidization_Engineering/ch12.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch12.ipynb diff --git a/Fluidization_Engineering/ch13.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch13.ipynb index 18536015..18536015 100755 --- a/Fluidization_Engineering/ch13.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch13.ipynb diff --git a/Fluidization_Engineering/ch14.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch14.ipynb index 24a0ffbb..24a0ffbb 100755 --- a/Fluidization_Engineering/ch14.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch14.ipynb diff --git a/Fluidization_Engineering/ch15.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch15.ipynb index 09c02451..09c02451 100755 --- a/Fluidization_Engineering/ch15.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch15.ipynb diff --git a/Fluidization_Engineering/ch16.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch16.ipynb index e835e890..e835e890 100755 --- a/Fluidization_Engineering/ch16.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch16.ipynb diff --git a/Fluidization_Engineering/ch17.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch17.ipynb index 77951e94..77951e94 100755 --- a/Fluidization_Engineering/ch17.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch17.ipynb diff --git a/Fluidization_Engineering/ch18.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch18.ipynb index 281bc4a5..281bc4a5 100755 --- a/Fluidization_Engineering/ch18.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch18.ipynb diff --git a/Fluidization_Engineering/ch3.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch3.ipynb index 72abab33..72abab33 100755 --- a/Fluidization_Engineering/ch3.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch3.ipynb diff --git a/Fluidization_Engineering/ch4.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch4.ipynb index cbd2e1e4..cbd2e1e4 100755 --- a/Fluidization_Engineering/ch4.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch4.ipynb diff --git a/Fluidization_Engineering/ch5.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch5.ipynb index 791c6af2..791c6af2 100755 --- a/Fluidization_Engineering/ch5.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch5.ipynb diff --git a/Fluidization_Engineering/ch6.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch6.ipynb index 9c4f2311..9c4f2311 100755 --- a/Fluidization_Engineering/ch6.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch6.ipynb diff --git a/Fluidization_Engineering/ch7.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch7.ipynb index aafc2f66..aafc2f66 100755 --- a/Fluidization_Engineering/ch7.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch7.ipynb diff --git a/Fluidization_Engineering/ch8.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch8.ipynb index 9fed0363..9fed0363 100755 --- a/Fluidization_Engineering/ch8.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch8.ipynb diff --git a/Fluidization_Engineering/ch9.ipynb b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch9.ipynb index 5087d780..5087d780 100755 --- a/Fluidization_Engineering/ch9.ipynb +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch9.ipynb diff --git a/Fluidization_Engineering/screenshots/plotkbckbedb.png b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/plotkbckbedb.png Binary files differindex b7c9004b..b7c9004b 100755 --- a/Fluidization_Engineering/screenshots/plotkbckbedb.png +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/plotkbckbedb.png diff --git a/Fluidization_Engineering/screenshots/relationnubedrep.png b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/relationnubedrep.png Binary files differindex 8919a070..8919a070 100755 --- a/Fluidization_Engineering/screenshots/relationnubedrep.png +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/relationnubedrep.png diff --git a/Fluidization_Engineering/screenshots/relationshebdrep.png b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/relationshebdrep.png Binary files differindex 173822d6..173822d6 100755 --- a/Fluidization_Engineering/screenshots/relationshebdrep.png +++ b/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/screenshots/relationshebdrep.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter01.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter01.ipynb index 8e50e4de..8e50e4de 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter01.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter01.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter02.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter02.ipynb index 1aa8a278..1aa8a278 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter02.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter02.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter03.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter03.ipynb index 34a44d60..34a44d60 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter03.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter03.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter04.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter04.ipynb index a58b3c75..a58b3c75 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter04.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter04.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter05.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter05.ipynb index fa4db685..fa4db685 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter05.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter05.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter06.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter06.ipynb index 09f324b0..09f324b0 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter06.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter06.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter07.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter07.ipynb index ee25427a..ee25427a 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter07.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter07.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter08.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter08.ipynb index e40c1b43..e40c1b43 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter08.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter08.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter09.ipynb index 11735b92..11735b92 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter09.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter10.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter10.ipynb index 1a017d08..1a017d08 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter10.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter10.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter11.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter11.ipynb index 0e00f235..0e00f235 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter11.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter11.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter12.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter12.ipynb index 54918fbb..54918fbb 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter12.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter12.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter13.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter13.ipynb index b303ee94..b303ee94 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter13.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter13.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter14.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter14.ipynb index 12a1734c..12a1734c 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter14.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter14.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter15.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter15.ipynb index 21b14f41..21b14f41 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter15.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter15.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter16.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter16.ipynb index ab91ce85..ab91ce85 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter16.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter16.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter17.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter17.ipynb index 7967d054..7967d054 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter17.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter17.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter18.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter18.ipynb index c422da50..c422da50 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter18.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter18.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter19.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter19.ipynb index bbaf1a5b..bbaf1a5b 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter19.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter19.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter20.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter20.ipynb index adaadc6f..adaadc6f 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter20.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter20.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter21.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter21.ipynb index 2b76d2a2..2b76d2a2 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter21.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter21.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter22.ipynb b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter22.ipynb index 53a104bf..53a104bf 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/Chapter22.ipynb +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/Chapter22.ipynb diff --git a/Fundamental_of_Computing_and_Programming_in_C/README.txt b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/README.txt index 9bed1b50..9bed1b50 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/README.txt +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/README.txt diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Calculation.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Calculation.png Binary files differindex 54b0ef8a..54b0ef8a 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Calculation.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Calculation.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even.png Binary files differindex ba866766..ba866766 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_1.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_1.png Binary files differindex ba866766..ba866766 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_1.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_1.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_2.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_2.png Binary files differindex ba866766..ba866766 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_2.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_2.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_3.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_3.png Binary files differindex ba866766..ba866766 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Decision_Making_Odd_or_Even_3.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Decision_Making_Odd_or_Even_3.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line.png Binary files differindex 19625214..19625214 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_1.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_1.png Binary files differindex 19625214..19625214 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_1.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_1.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_2.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_2.png Binary files differindex 19625214..19625214 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_2.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_2.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_3.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_3.png Binary files differindex 19625214..19625214 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_3.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_3.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_4.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_4.png Binary files differindex 19625214..19625214 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Slope_and_Midpoint_of_a_line_4.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Slope_and_Midpoint_of_a_line_4.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Standard_Deviation.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Standard_Deviation.png Binary files differindex a448529e..a448529e 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Standard_Deviation.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Standard_Deviation.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi.png Binary files differindex 88aee856..88aee856 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi_1.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi_1.png Binary files differindex 88aee856..88aee856 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/Tower_of_Honoi_1.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/Tower_of_Honoi_1.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers.png Binary files differindex 05bef403..05bef403 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers.png diff --git a/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers_with_A.png b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers_with_A.png Binary files differindex 2c6a1efe..2c6a1efe 100755 --- a/Fundamental_of_Computing_and_Programming_in_C/screenshots/add_two_numbers_with_A.png +++ b/Fundamental_of_Computing_and_Programming_in_C_by_V_Ramesh_Babu_R_Samyuktha_M_Munirathnam/screenshots/add_two_numbers_with_A.png diff --git a/Fundamentals_Of_Thermodynamics/Chapter11.ipynb b/Fundamentals_Of_Thermodynamics/Chapter11.ipynb deleted file mode 100755 index f7ce9d5a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter11.ipynb +++ /dev/null @@ -1,424 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:099777bd4d735e894f7949924f63dca34258026e1381262643494860b41717f6"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter11:Power and Refrigeration Systems\u2014With Phase Change"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.1:Pg-425"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Ques 1\n",
- "#To determine the efficiency of Rankine cycle\n",
- "\n",
- "#1-Inlet state of pump\n",
- "#2-Exit state of pump\n",
- "P2=2000;#Exit pressure in kPa\n",
- "P1=10;#Inlet pressure in kPa\n",
- "v=0.00101;#specific weight of water in m^3/kg\n",
- "wp=v*(P2-P1);#work done in pipe in kJ/kg\n",
- "h1=191.8;#Enthalpy in kJ/kg from table\n",
- "h2=h1+wp;#enthalpy in kJ/kg\n",
- "#2-Inlet state for boiler\n",
- "#3-Exit state for boiler\n",
- "h3=2799.5;#Enthalpy in kJ/kg\n",
- "#3-Inlet state for turbine\n",
- "#4-Exit state for turbine\n",
- "#s3=s4(Entropy remain same)\n",
- "s4=6.3409;#kJ/kg\n",
- "sf=0.6493;#Entropy at liquid state in kJ/kg\n",
- "sfg=7.5009;#Entropy difference for vapor and liquid state in kJ/kg\n",
- "x4=(s4-sf)/sfg;#x-factor\n",
- "hfg=2392.8;#Enthalpy difference in kJ/kg for turbine\n",
- "h4=h1+x4*hfg;#Enthalpy in kJ/kg\n",
- "\n",
- "nth=((h3-h2)-(h4-h1))/(h3-h2);\n",
- "print\" Percentage efficiency =\",round(nth*100,1)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Percentage efficiency = 30.3\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.2:Pg-429"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Ques 2\n",
- "#To determine the efficiency of Rankine cycle\n",
- "\n",
- "#1-Inlet state of pump\n",
- "#2-Exit state of pump\n",
- "P2=4000;#Exit pressure in kPa\n",
- "P1=10;#Inlet pressure in kPa\n",
- "v=0.00101;#specific weight of water in m^3/kg\n",
- "wp=v*(P2-P1);#work done in pipe in kJ/kg\n",
- "h1=191.8;#Enthalpy in kJ/kg from table\n",
- "h2=h1+wp;#enthalpy in kJ/kg\n",
- "#2-Inlet state for boiler\n",
- "#3-Exit state for boiler\n",
- "h3=3213.6;#Enthalpy in kJ/kg from table\n",
- "#3-Inlet state for turbine\n",
- "#4-Exit state for turbine\n",
- "#s3=s4(Entropy remain same)\n",
- "s4=6.7690;#Entropy in kJ/kg from table\n",
- "sf=0.6493;#Entropy at liquid state in kJ/kg from table\n",
- "sfg=7.5009;#Entropy difference for vapor and liquid state in kJ/kg from table\n",
- "x4=(s4-sf)/sfg;#x-factor\n",
- "hfg=2392.8;#Enthalpy difference in kJ/kg for turbine\n",
- "h4=h1+x4*hfg;#Enthalpy in kJ/kg\n",
- "\n",
- "nth=((h3-h2)-(h4-h1))/(h3-h2);\n",
- "print\"Percentage efficiency =\",round(nth*100,1)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Percentage efficiency = 35.3\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.3:Pg-433"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Ques 3\n",
- "#To determine the efficiency of a cycle\n",
- "\n",
- "#1-Inlet state of pump\n",
- "#2-Exit state of pump\n",
- "P2=4000;#Exit pressure in kPa\n",
- "P1=10;#Inlet pressure in kPa\n",
- "v=0.00101;#specific weight of water in m^3/kg\n",
- "wp=v*(P2-P1);#work done in pipe in kJ/kg\n",
- "h1=191.8;#Enthalpy in kJ/kg from table\n",
- "h2=h1+wp;#enthalpy in kJ/kg\n",
- "#2-Inlet state for boiler\n",
- "#3-Exit state for Boiler\n",
- "h3=3213.6;#Enthalpy in kJ/kg from table\n",
- "#3-Inlet state for high pressure turbine\n",
- "#4-Exit state for high pressure turbine\n",
- "#s3=s4(Entropy remain same)\n",
- "s4=6.7690;#Entropy in kJ/kg from table\n",
- "sf=1.7766;#Entropy at liquid state in kJ/kg from table\n",
- "sfg=5.1193;#Entropy difference for vapor and liquid state in kJ/kg from table\n",
- "x4=(s4-sf)/sfg;#x-factor\n",
- "hf=604.7#Enthalpy of liquid state in kJ/kg\n",
- "hfg=2133.8;#Enthalpy difference in kJ/kg for turbine\n",
- "h4=hf+x4*hfg;#Enthalpy in kJ/kg\n",
- "#5-Inlet state for low pressure turbine\n",
- "#6-Exit pressure for low pressure turbine\n",
- "sf=0.6493;#Entropy in liquid state in kJ/kg for turbine\n",
- "h5=3273.4;#enthalpy in kJ/kg \n",
- "s5=7.8985;#Entropy in kJ/kg\n",
- "sfg=7.5009;#entropy diff in kJ/kg \n",
- "x6=(s5-sf)/sfg;#x-factor\n",
- "hfg=2392.8;#enthalpy difference for low pressure turbine in kj/kg\n",
- "h6=h1+x6*hfg;#entropy in kg/kg\n",
- "wt=(h3-h4)+(h5-h6);#work output in kJ/kg\n",
- "qh=(h3-h2)+(h5-h4);\n",
- "\n",
- "nth=(wt-wp)/qh;\n",
- "print\" Percentage efficiency =\",round(nth*100,1)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Percentage efficiency = 35.9\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.4:Pg-438"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques4\n",
- "#Efficiency of Refrigeration cycle\n",
- "\n",
- "#from previous examples\n",
- "h1=191.8;#kJ/kg\n",
- "h5=3213.6;#kg/kg\n",
- "h6=2685.7;#kJ/kg\n",
- "h7=2144.1;#kJ/kg\n",
- "h3=604.7;#kJ/kg\n",
- "#1-Inlet state of pump\n",
- "#2-Exit state of pump\n",
- "P2=400;#Exit pressure in kPa\n",
- "P1=10; #Inlet pressure in kPa\n",
- "v=0.00101;#specific weight of water in m^3/kg\n",
- "wp1=v*(P2-P1);#work done for low pressure pump in kJ/kg\n",
- "h1=191.8;#Enthalpy in kJ/kg from table\n",
- "h2=h1+wp1;#enthalpy in kJ/kg\n",
- "#5-Inlet state for turbine\n",
- "#6,7-Exit state for turbine\n",
- "y=(h3-h2)/(h6-h2);#extraction fraction\n",
- "wt=(h5-h6)+(1-y)*(h6-h7);#turbine work in kJ/kg\n",
- "#3-Inlet for high pressure pump\n",
- "#4-Exit for high pressure pump\n",
- "P3=400;#kPa\n",
- "P4=4000;#kPa\n",
- "v=0.001084;#specific heat for 3-4 process in m^3/kg\n",
- "wp2=v*(P4-P3);#work done for high pressure pump\n",
- "h4=h3+wp2;#Enthalpy in kJ/kg\n",
- "wnet=wt-(1-y)*wp1-wp2;\n",
- "qh=h5-h4;#Heat output in kJ/kg\n",
- "nth=wnet/qh;\n",
- "print\" Refrigerator Efficiency =\",round(nth*100,1)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Refrigerator Efficiency = 37.5\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.5:Pg-443"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques5\n",
- "#To determine thermal efficiency of cycle\n",
- "\n",
- "#5-Inlet state for turbine\n",
- "#6-Exit state for turbine\n",
- "#h-Enthalpy at a state \n",
- "#s-Entropy at a state\n",
- "#from steam table\n",
- "h5=3169.1;#kJ/kg\n",
- "s5=6.7235;#kJ/kg\n",
- "s6s=s5;\n",
- "sf=0.6493;#Entropy for liquid state in kJ/kg\n",
- "sfg=7.5009;#Entropy difference in kJ/kg\n",
- "hf=191.8;#kJ/kg\n",
- "hfg=2392.8;#Enthalpy difference in kJ/kg\n",
- "x6s=(s6s-sf)/sfg;#x-factor\n",
- "h6s=hf+x6s*hfg;#kJ/Kg at state 6s\n",
- "nt=0.86;#turbine efficiency given\n",
- "wt=nt*(h5-h6s);\n",
- "#1-Inlet state for pump\n",
- "#2-Exit state for pump\n",
- "np=0.80;#pump efficiency given\n",
- "v=0.001009;#specific heat in m^3/kg\n",
- "P2=5000;#kPa\n",
- "P1=10;#kPa\n",
- "wp=v*(P2-P1)/np;#Work done in pump in kJ/kg\n",
- "wnet=wt-wp;#net work in kJ/kg\n",
- "#3-Inlet state for boiler\n",
- "#4-Exit state for boiler\n",
- "h3=171.8;#in kJ/kg from table\n",
- "h4=3213.6;#kJ/kg from table\n",
- "qh=h4-h3;\n",
- "nth=wnet/qh;\n",
- "print \"Cycle Efficiency =\",round(nth*100,1)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Cycle Efficiency = 29.2\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.6:Pg-451"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques6\n",
- "#to determine the rate of refrigeration\n",
- "\n",
- "# refer to fig 11.21 in book\n",
- "mdot=0.03 # mass flow rate in Kg/s\n",
- "T1=-20 # temperature in evaporator in celsius\n",
- "T3=40 #temperature in evaporator in Celsius\n",
- "P2=1017 # saturation pressure in KPa\n",
- "\n",
- "# from table of R-134a refrigerant\n",
- "h1=386.1 # enthalpy at state 1 in kJ/kg,\n",
- "S1=1.7395 # entropy at state 1 in kJ/kg.K\n",
- "S2=S1 # isentropic process\n",
- "T2=47.7# corresponding value to S2 in table of R-134a in degree celsius\n",
- "h2=428.4 # corresponding value to S2 in table of R-134a in kJ/kg\n",
- "wc=h2-h1 # work done in compressor in kJ/kg\n",
- "h4=h3=256.5 #enthalpy at state 4 and 3 in kJ/kg\n",
- "qL=h1-h4 #Heat rejected in kJ/kg\n",
- "\n",
- "B=qL/wc # COP\n",
- "\n",
- "print\" the COP of the plant is\",round(B,2)\n",
- "print\" the refrigeration rate is\",round(mdot*qL,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " the COP of the plant is 3.06\n",
- " the refrigeration rate is 3.89\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.7:Pg-454"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques7\n",
- "#to determine the COP of cycle\n",
- "\n",
- "P1=125 # pressure at state 1 in kPa\n",
- "P2=1.2 # pressure at state 2 in MPa\n",
- "P3=1.19 # pressure at state 3 in MPa,\n",
- "P4=1.16 # pressure at state 4 in MPa,\n",
- "P5=1.15 # pressure at state 5 in MPa,\n",
- "P6=P7=140 # pressure at state 6 and 7 in kPa,\n",
- "P8=130 # pressure at state 8 in kPa,\n",
- "T1=-10 #temperaure at state 1 in \u25e6C\n",
- "T2=100 #temperaure at state 2 in \u25e6C\n",
- "T3=80 #temperaure at state 3 in \u25e6C\n",
- "T4=45 #temperaure at state 4 in \u25e6C\n",
- "T5=40 #temperaure at state 5 in \u25e6C\n",
- "T8=-20 #temperaure at state 8 in \u25e6C\n",
- "q=-4 # heat transfer in kJ/Kg\n",
- "\n",
- "#x6=x7 quality condition given in question\n",
- "\n",
- "\n",
- "# the following values are taken from table for refrigerant R-134a\n",
- "h1=394.9 # enthalpy at state 1 in kJ/kg\n",
- "h2=480.9 # enthalpy at state 2 in kJ/kg\n",
- "h8=386.6 # enthalpy at state 8 in kJ/kg\n",
- "wc=h2-h1-q # from first law\n",
- "h5=h6=h7=256.4 # as x6=x7 and from table at state 5 in Kj/Kg\n",
- "qL=h8-h7 # from first law \n",
- "B=qL/wc # COP\n",
- "print\" the COP of the plant is\",round(B,3)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " the COP of the plant is 1.447\n"
- ]
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter12.ipynb b/Fundamentals_Of_Thermodynamics/Chapter12.ipynb deleted file mode 100755 index 75910c56..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter12.ipynb +++ /dev/null @@ -1,486 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:e3e9cb7f43080b67fa2a22d273814843783e7598e3258877edb209ca16f99bdc"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "CHAPTER13:Gas Mixtures"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.1:Pg-480"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques1\n",
- "#Standard brayton cycle\n",
- "\n",
- "#1-Inlet for compressor\n",
- "#2-Exit for compressor\n",
- "#T-Temperature at a state\n",
- "#P-Pressure at a state\n",
- "T1=288.2;#K\n",
- "P2=1000.0;#kPa\n",
- "P1=100.0;#kPa\n",
- "k=1.4;\n",
- "T2=T1*(P2/P1)**(1.0-1/k);#K\n",
- "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n",
- "wc=Cp*(T2-T1);#compressor work in kJ/kg;\n",
- "print\" Temperature T2 =\",round(T2,2),\"K\"\n",
- "print\" Compressor work =\",round(wc,1),\"kJ/kg\"\n",
- "#3-Turbine Inlet\n",
- "#4-Turbine Exit\n",
- "P4=P1;\n",
- "P3=P2;\n",
- "T3=1373.2;#K\n",
- "T4=T3*(P4/P3)**(1-1/k);#K\n",
- "wt=Cp*(T3-T4);\n",
- "wnet=wt-wc;\n",
- "print\" Temperature T3 =\",round(T3,2),\" K\"\n",
- "print\" Temperature T4 =\",round(T4),\"K\"\n",
- "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n",
- "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n",
- "#2-Also high temperature heat exchanger Inlet\n",
- "#3-(-do-) Exit\n",
- "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n",
- "#4-high temp heat exchanger inlet\n",
- "#1-(-do-) Exit\n",
- "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n",
- "nth=wnet/qh;\n",
- "print\" Thermal Efficiency of cycle =\",round(nth*100,2),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Temperature T2 = 556.43 K\n",
- " Compressor work = 269.3 kJ/kg\n",
- " Temperature T3 = 1373.2 K\n",
- " Temperature T4 = 711.0 K\n",
- " Turbine work = 664.6 kJ/kg\n",
- " Net work = 395.3 kJ/kg\n",
- " Thermal Efficiency of cycle = 48.21 %\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.2:Pg-481"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Calculation mistake in book\n",
- "#ques2\n",
- "#Standard brayton cycle\n",
- "\n",
- "#Calculation mistake in book\n",
- "#1-Inlet for compressor\n",
- "#2-Exit for compressor\n",
- "#T-Temperature at a state\n",
- "#P-Pressure at a state\n",
- "T1=288.2;#K\n",
- "P2=1000.0;#kPa\n",
- "P1=100.0;#kPa\n",
- "k=1.4;\n",
- "T2s=T1*(P2/P1)**(1-1/k);#K\n",
- "nc=.80;#Compressor Efficiency\n",
- "T2=T1+(T2s-T1)/0.80;\n",
- "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n",
- "wc=Cp*(T2-T1);#compressor work in kJ/kg\n",
- "wc=round(wc)\n",
- "print\" Temperature T2 =\",round(T2,2),\"K\"\n",
- "print\" Compressor work =\",(wc),\"kJ/kg\"\n",
- "#3-Turbine Inlet\n",
- "#4-Turbine Exit\n",
- "P4=P1;\n",
- "P3=P2;\n",
- "T3=1373.2;#K\n",
- "T4s=T3*(P4/P3)**(1-1.0/k);#K\n",
- "nt=0.85;#turbine Efficiency\n",
- "T4=T3-(T3-T4s)*0.85;\n",
- "wt=Cp*(T3-T4);\n",
- "wnet=wt-wc;\n",
- "print\" Temperature T3 =\",round(T3,1),\"K\"\n",
- "print\" Temperature T4 =\",round(T4,1),\"K\"\n",
- "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n",
- "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n",
- "#2-Also high temperature heat exchanger Inlet\n",
- "#3-(-do-) Exit\n",
- "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n",
- "#4-high temp heat exchanger inlet\n",
- "#1-(-do-) Exit\n",
- "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n",
- "nth=wnet/qh;\n",
- "print\" Thermal Efficiency of cycle =\",round(nth*100),\"percent\"\n",
- "#some answers are have acceptable difference beacause of approximization in book but here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Temperature T2 = 623.48 K\n",
- " Compressor work = 337.0 kJ/kg\n",
- " Temperature T3 = 1373.2 K\n",
- " Temperature T4 = 810.5 K\n",
- " Turbine work = 564.91 kJ/kg\n",
- " Net work = 227.91 kJ/kg\n",
- " Thermal Efficiency of cycle = 30.0 percent\n"
- ]
- }
- ],
- "prompt_number": 22
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.3:Pg-486"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques3\n",
- "#efficiency of the cycle\n",
- "\n",
- "wnet=395.2;#kJ/kg from example no 1\n",
- "#Tx=T4\n",
- "Tx=710.8;#K from example no 1\n",
- "T3=1373.2;#K from example no 1\n",
- "Cp=1.004;#specific heat in kJ/kg \n",
- "qh=Cp*(T3-Tx);\n",
- "nth=wnet/qh;\n",
- "print\" Thermal efficiency =\",round(nth*100,1),\" percent\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Thermal efficiency = 59.4 percent\n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.4:Pg-486"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques4\n",
- "#Calculation of work in the given cycle\n",
- "import math\n",
- "R=0.287;#gas constant \n",
- "T1=288.2;#compressor temperature K\n",
- "T2=1373.2;#K turbine temperature K\n",
- "#Pe/Pi=c=10, Pi/Pe=1/c from example 12.1\n",
- "c=10.0;\n",
- "wc=-R*T1*math.log(c);\n",
- "print\" Isothermal work in compressor =\",round(wc,1),\"kJ/kg\"\n",
- "wt=-R*T2*math.log(1/c);\n",
- "print\" Isothermal work in turbine =\",round(wt,1),\"kJ/kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Isothermal work in compressor = -190.5 kJ/kg\n",
- " Isothermal work in turbine = 907.5 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 26
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.5:Pg-491"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques5\n",
- "#air standard cycle for jet repulsion\n",
- "import math\n",
- "#1-compressor inlet\n",
- "#2-Compressor exit\n",
- "#P-Pressure at given point\n",
- "#T-Temperature at given point\n",
- "P1=100;#kPa\n",
- "P2=1000;#kPa\n",
- "T1=288.2;#K\n",
- "T2=556.8;#K\n",
- "wc=269.5;#from ex 12.1 work done in compressor in kJ/kg\n",
- "#2-Burner inlet\n",
- "#3-Burner exit\n",
- "P3=1000;#kPa\n",
- "T3=1373.2;#K\n",
- "#wc=wt\n",
- "Cp=1.004;#specific enthalpy of heat at constant pressure in kJ/kg\n",
- "k=1.4;\n",
- "T4=T3-wc/Cp;\n",
- "P4=P3*(T4/T3)**(1-1/k);\n",
- "#from s4=s5 and h4=h5+v2/2 we get\n",
- "T5=710.8#K, from second law\n",
- "v=math.sqrt(2*Cp*1000*(T4-T5));#m/s\n",
- "print\" Velocity of air leaving the nozel =\",round(v),\"m/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Velocity of air leaving the nozel = 889.0 m/s\n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.6:Pg-494"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques6\n",
- "#air standard refrigeration cycle\n",
- "\n",
- "#1-compressor inlet\n",
- "#2-compressor exit\n",
- "P1=100;#kPa\n",
- "P2=500;#kPa\n",
- "k=1.4;\n",
- "rp=P2/P1;\n",
- "cop=(rp**(1-1/k)-1)**-1;\n",
- "print\" Coefficient of performance =\",round(cop,2)\n",
- "#3-Expander inlet\n",
- "#4-Expander exit\n",
- "P3=P2;\n",
- "P4=P1;\n",
- "T3=288.23;#K, given and fixed\n",
- "T4=T3/(P3/P4)**(1-1/k);\n",
- "T1=253.2;#K, given\n",
- "Cp=1.004;#Specific heat at cons pressure in kJ/kg\n",
- "ql=Cp*(T1-T4);#heat released in kJ/kg\n",
- "P=1#power required in kW \n",
- "ms=P/ql;#kg/s\n",
- "print\" Rate at which the air enter the compressor =\",round(ms,3),\"kg/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Coefficient of performance = 1.71\n",
- " Rate at which the air enter the compressor = 0.014 kg/s\n"
- ]
- }
- ],
- "prompt_number": 36
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.7:Pg-498"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques7\n",
- "#the otto cycle\n",
- "\n",
- "#1-compressor inlet\n",
- "#2-compressor exit\n",
- "P1=100.0;#kPa\n",
- "T1=288.2;#K\n",
- "R=0.287;#gas constant\n",
- "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n",
- "rv=10.0;#compression ratio given\n",
- "k=1.4;#constant\n",
- "T2=T1*rv**(k-1);#K\n",
- "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n",
- "P2=P1*rv**k;#kPa\n",
- "print\" Pressure at compressor exit, P2 =\",round(P2/1000,2),\"MPa\"\n",
- "v2=v1/rv;#specific heat at exit in m^3/kg\n",
- "#23-heat addition process\n",
- "#q23=Cv*(T3-T2)=1800 kJ/kg given\n",
- "q23=1800.0;#kJ/kg heat addition, given\n",
- "Cv=0.717;#specific heat at constant volume in kJ/kg\n",
- "T3=T2+q23/Cv;#K\n",
- "print\" Initial Temperature during heat additon process, T3 =\",round(T3,2),\"K\"\n",
- "P3=P2*(T3/T2);#kPa\n",
- "print\" Initial pressure during heat addition process, P3 =\",round(P3/1000,3),\"MPa\"\n",
- "r=10.0;#k=V4/V3=P3/P4\n",
- "T4=T3*(1/r)**(k-1);\n",
- "print\" Final temperature during heat addition process, T4 =\",round(T4,3),\"K\";\n",
- "P4=P3/r**k;#kPa\n",
- "print\" Final pressure during heat addition process, P4 =\",round(P4/1000,4),\"MPa\"\n",
- "nth=1-1/r**(k-1);#thermal efficiency\n",
- "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"\n",
- "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n",
- "wnet=q23+q41;\n",
- "mep=wnet/(v1-v2);#effective mean pressure n kPa\n",
- "print\" Mean effective pressure =\",round(mep,2),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Temperature at compressor exit, T2 = 723.9 K\n",
- " Pressure at compressor exit, P2 = 2.51 MPa\n",
- " Initial Temperature during heat additon process, T3 = 3234.39 K\n",
- " Initial pressure during heat addition process, P3 = 11.223 MPa\n",
- " Final temperature during heat addition process, T4 = 1287.632 K\n",
- " Final pressure during heat addition process, P4 = 0.4468 MPa\n",
- " Thermal efficiency = 60.2 percent\n",
- " Mean effective pressure = 1455.37 kPa\n"
- ]
- }
- ],
- "prompt_number": 42
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.8:Pg-501"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques8\n",
- "#the diesel cycle\n",
- "\n",
- "#1-compressor inlet\n",
- "#2-compressor exit\n",
- "P1=100;#kPa\n",
- "T1=288.2;#K\n",
- "R=0.287;#gas constant\n",
- "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n",
- "rv=20;#compression ratio given\n",
- "k=1.4;#constant\n",
- "T2=T1*rv**(k-1);#K\n",
- "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n",
- "P2=P1*rv**k;#kPa\n",
- "print\" Pressure at compressor exit, P2 =\",round(P2/1000,3),\" MPa\"\n",
- "v2=v1/rv;#specific heat at exit in m^3/kg\n",
- "#23-heat addition process\n",
- "#q23=Cv*(T3-T2)=1800 kJ/kg given\n",
- "q23=1800;#kJ/kg heat addition, given\n",
- "Cv=.717;\n",
- "Cp=1.004;#specific heat at constant pressure in kJ/kg\n",
- "T3=T2+q23/Cp;#K\n",
- "print\" Initial Temperature during heat addition process, T3 =\",round(T3,2),\"K\"\n",
- "r=T3/T2;#T3/T2=V3/V2=r\n",
- "v3=r*v2;\n",
- "T4=T3/(v1/v3)**(k-1);\n",
- "print\" Final temperature during heat addition process, T4 =\",round(T4),\"K\"\n",
- "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n",
- "wnet=q23+q41;\n",
- "mep=wnet/(v1-v2);#effective mean pressure in kPa\n",
- "qh=1800;#heat transfer in kJ/kg\n",
- "nth=wnet/qh;#thermal efficiency\n",
- "\n",
- "print\" Thermal efficiency =\",round(nth*100,1),\"percent\"\n",
- "print\" Mean effective pressure =\",round(mep,2),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Temperature at compressor exit, T2 = 955.2 K\n",
- " Pressure at compressor exit, P2 = 6.629 MPa\n",
- " Initial Temperature during heat addition process, T3 = 2748.05 K\n",
- " Final temperature during heat addition process, T4 = 1265.0 K\n",
- " Thermal efficiency = 61.1 percent\n",
- " Mean effective pressure = 1399.18 kPa\n"
- ]
- }
- ],
- "prompt_number": 47
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter13.ipynb b/Fundamentals_Of_Thermodynamics/Chapter13.ipynb deleted file mode 100755 index 95893bd9..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter13.ipynb +++ /dev/null @@ -1,262 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:6cc89f09586fc1fc226ee69c300e69ecaeae3fbafe1ae419c1c6cbc4ae7dcf83"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "CHAPTER13:Gas Mixtures"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.3:Pg-533"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques3\n",
- "#calculating humidity ratio, dew point,mass of air, mass of vapor\n",
- "\n",
- "r=0.70;#relative humidity\n",
- "Pg=5.628;#saturation pressure in kPa\n",
- "Pv=r*Pg;#vapour pressure in kPa\n",
- "P=100;#net pressure kPa \n",
- "Pa=P-Pv;#Partial pressure of air\n",
- "w=0.622*Pv/Pa;#humidity ratio formula\n",
- "V=100;#volume in m^3\n",
- "Ra=0.287;#gas constant for water vapour\n",
- "T=308.2;#Temperature in K\n",
- "ma=Pa*V/(Ra*T);#mass in kg\n",
- "mv=w*ma;#mass of vapour\n",
- "print\" Mass of vapour is\",round(mv,3),\"Kg \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Mass of vapour is 2.77 Kg \n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.4:Pg-534"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques4 \n",
- "#calculating amount of water vapour condensed on cooling\n",
- "\n",
- "#from example 3\n",
- "w1=0.0255;#w1=w, humidity ratio at initial temperature\n",
- "ma=108.6;#mass of air in kg\n",
- "P=100;#kPa net pressure\n",
- "#at 5 C mixture is saturated so Pv2=Pg2\n",
- "Pg2=0.8721;\n",
- "Pv2=Pg2;\n",
- "w2=0.622*Pv2/(P-Pg2);\n",
- "mc=ma*(w1-w2);\n",
- "print\"Mass of vapour condense is \",round(mc,3),\"kg \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Mass of vapour condense is 2.175 kg \n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.5:Pg-536"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques5\n",
- "#calculating heat transfer per kilogram of dry air\n",
- "\n",
- "#1-inlet state\n",
- "#2-Exit state\n",
- "r1=0.80;#realtive humidity at state 1\n",
- "Pg1=4.246;#saturation pressure of vapour in kPa\n",
- "P1=105.0;#net pressure at state 1 in kPa\n",
- "P2=100.0;#net pressure at state 2 in kPa\n",
- "Pv1=r1*Pg1;#partial pressure of vapour in kPa\n",
- "w1=0.622*Pv1/(P1-Pv1);#humidity ratio at state 1\n",
- "r2=0.95;#relative humidity at state 2\n",
- "Pg2=1.7051;#saturation pressure of vapour in kPa\n",
- "Pv2=r2*Pg2;#partial pressure of vapour in kPa\n",
- "w2=0.622*Pv2/(P2-Pv2);#humidity ratio at state 2\n",
- "T1=30.0;#C\n",
- "T2=15.0;#C\n",
- "Cp=1.004;#specific heat of water vapour in kJ/kg\n",
- "hv2=2528.9;#enthalpy of vapourisation of vapour in kJ/kg\n",
- "hv1=2556.3;#enthalpy of vapourisation of vapour in kJ/kg\n",
- "hl2=62.99;#enthalpy of \n",
- "q=Cp*(T2-T1)+w2*hv2-w1*hv1+hl2*(w1-w2);#kJ/kg\n",
- "print\" Heat transferred per unit mass =\",round(q,1),\"kJ/kg of dry air\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Heat transferred per unit mass = -41.7 kJ/kg of dry air\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.6:Pg-537"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques6\n",
- "#calculating heat transferred in gas vapour mixture\n",
- "\n",
- "#n-Nitrogen\n",
- "#v-water vapour\n",
- "Pn2=1995;#Pressure of nitrogen in kPa\n",
- "V=0.5;#Volume in m^3\n",
- "Rn2=0.2968;#Gas constant for nitrogen in kJ/kg.K\n",
- "Rv=0.4615;#gas constant for vapour\n",
- "T1=323.2;#Temperature in K\n",
- "T2=283.2;#Temperature in K\n",
- "Pv1=5;#Pressure of water vapour in kPa at state 1\n",
- "Pv2=1.2276;#Pressure of water vapour in kPa at state 2\n",
- "mn2=Pn2*V/(Rn2*T1);#mass of nitrogen\n",
- "mv1=Pv1*V/(Rv*T1);#mass of vapour in kg\n",
- "mv2=Pv2*V/(Rv*T2);#mass of vapour in kg\n",
- "ml2=mv1-mv2;#mass of liquid condensed n kg\n",
- "uv1=2443.1;#specific internal energy of vapour in kJ/kg at state 1\n",
- "uv2=2389.2;#specific internal energy of vapour in kJ/kg at state 2\n",
- "ul2=42.0;#specific internal energy of liquid water in kJ/kg\n",
- "Cv=0.745;#specific heat at constant volume in kJ/kg.K\n",
- "Q=mn2*Cv*(T2-T1)+mv2*uv2+ml2*ul2-mv1*uv1;\n",
- "print\"Heat transferred =\",round(Q,2),\"kJ \"\n",
- "\n",
- "#the answer is different in book due to intermediate approximization "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Heat transferred = -339.1 kJ \n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.7:Pg-539"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques7\n",
- "#calculating humidity ratio and relative humidity \n",
- "\n",
- "#1-Inlet state\n",
- "#2-Exit state\n",
- "P=100;#net pressure n kPa \n",
- "#it is steady state adiabatic process\n",
- "#water vapour leaving is saturated so Pv2=Pg2\n",
- "Pg2=2.339;#saturation pressure of vapour in kPa\n",
- "Pv2=Pg2;#partial pressure of vapour\n",
- "w2=0.622*Pv2/(P-Pg2);\n",
- "Cpa=1.004;#specific heat n kJ/kg/K\n",
- "T2=20;# final temp in C\n",
- "T1=30;# initial temp in C\n",
- "Hfg2=2454.1;#specific heat difference at state 2 in kJ/kg\n",
- "hv1=2556.3;#enthalpy of water vapour at state 1 in kJ/kg\n",
- "hl2=83.96;#enthalpy of liquid water in kJ/kg\n",
- "w1=(Cpa*(T2-T1)+w2*Hfg2)/(hv1-hl2);\n",
- "print \" Relative humidity =\",round(w1,4)\n",
- "#also w1=0.622*Pv1/(100-Pv2)\n",
- "Pv1=100*w1/(0.622+w1);\n",
- "Pg1=4.246;#saturation pressure at state 1 in kPa\n",
- "r=Pv1/Pg1;#humidity ratio\n",
- "print\" Humidity ratio =\",round(r,4)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Relative humidity = 0.0107\n",
- " Humidity ratio = 0.3993\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter14.ipynb b/Fundamentals_Of_Thermodynamics/Chapter14.ipynb deleted file mode 100755 index 6654362c..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter14.ipynb +++ /dev/null @@ -1,295 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:b6f84d510db3595ba71244d9d44f7e9987d44c62ba0d0520a72da2384551019e"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter14:THERMODYNAMIC RELATIONS"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.1:Pg-567"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques1\n",
- "#to determine the sublimation pressure of water\n",
- "import math\n",
- "#from table in appendix B.1.5\n",
- "T1=213.2;#K, Temperature at state 1\n",
- "P2=0.0129;#kPa, pressure at state 2\n",
- "T2=233.2;#K, Temperature at state 2\n",
- "hig=2838.9;#kJ/kg, enthalpy of sublimation \n",
- "R=.46152;#Gas constant \n",
- "#using relation log(P2/P1)=(hig/R)*(1/T1-1/T2) \n",
- "P1=P2*math.exp(-hig/R*(1/T1-1/T2));\n",
- "print\" Sublimation Pressure \",round(P1,5),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Sublimation Pressure 0.00109 kPa\n"
- ]
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.4:Pg-579"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques4\n",
- "#Volume expansivity, Isothermal and Adiabatic compressibility\n",
- "\n",
- "#known data\n",
- "ap=5*10**-5;#K^-1 Volume expansivity\n",
- "bt=8.6*10**-12;#m^2/N, Isothermal compressibility\n",
- "v=0.000114;#m^3/kg, specific volume\n",
- "P2=100*10**6;#pressure at state 2 in kPa\n",
- "P1=100;#pressure at state 1 in kPa\n",
- "w=-v*bt*(P2**2-P1**2)/2;#work done in J/kg\n",
- "#q=T*ds and ds=-v*ap*(P2-P1)\n",
- "#so q=-T*v*ap*(P2-P1)\n",
- "T=288.2;#Temperature in K\n",
- "q=-T*v*ap*(P2-P1);#heat in J/kg\n",
- "du=q-w;#change in internal energy in J/kg\n",
- "print\" Change in internal energy =\",round(du,3),\"J/kg\"\n",
- "\n",
- "#the answer is correct within given limts\n",
- " "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Change in internal energy = -159.372 J/kg\n"
- ]
- }
- ],
- "prompt_number": 22
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.5:Pg-586"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques5\n",
- "#adiabatic steady state processes\n",
- "\n",
- "#from table A.2\n",
- "P1=20;#pressure at state 1 in MPa\n",
- "P2=2;#pressure at state 2 in MPa\n",
- "T1=203.2;#Temperature at state 1 in K\n",
- "Pr1=P1/3.39;#Reduced pressure at state 1\n",
- "Pr2=P2/3.39;#Reduced pressure at state 2\n",
- "Tr1=T1/126.2;#Reduced temperature\n",
- "#from compressibility chart h1*-h1=2.1*R*Tc\n",
- "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n",
- "#h2*-h2=0.5*R*Tc\n",
- "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.5*R*Tc\n",
- "R=0.2968;#gas constant for given substance\n",
- "Tc=126.2;#K, Constant temperature\n",
- "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n",
- "T2=146;#temperature at state 2\n",
- "dh=-1.6*R*Tc+Cp*(T1-T2);#\n",
- "print\" Enthalpy change =\",round(dh,3),\"kJ/kg \\n\"\n",
- "print\" Since Enthalpy change is nearly \",-round(dh),\"kJ/kg so Temperature =\",round(T2,3),\"K\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Enthalpy change = -0.35 kJ/kg \n",
- "\n",
- " Since Enthalpy change is nearly 0.0 kJ/kg so Temperature = 146.0 K\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.6:Pg-589"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques6\n",
- "#isothermal steady state processes\n",
- "import math\n",
- "#from table A.2\n",
- "P1=8;#pressure at state 1 in MPa\n",
- "P2=0.5;#pressure at state 2 in MPa\n",
- "T1=150.0;#Temperature at state 1 in K\n",
- "Pr1=P1/3.39;#Reduced pressure at state 1\n",
- "Pr2=P2/3.39;#Reduced pressure at state 2\n",
- "Tr1=T1/126.2;#Reduced temperature\n",
- "T2=125.0;#temperature at state 2\n",
- "#from compressibility chart h1*-h1=2.1*R*Tc\n",
- "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n",
- "#h2*-h2=0.5*R*Tc\n",
- "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.15*R*Tc\n",
- "R=0.2968;#gas constant for given substance\n",
- "Tc=126.2;#K, Constant temperature\n",
- "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n",
- "dh=(2.35)*R*Tc+Cp*(T2-T1);#\n",
- "print\" Enthalpy change =\",round(dh),\"kJ/kg\"\n",
- "#change in entropy \n",
- "#ds= -(s2*-s2)+(s2*-s1*)+(s1*-s1)\n",
- "#s1*-s1=1.6*R\n",
- "#s2*-s2=0.1*R\n",
- "#s2*-s1*=Cp*log(T2/T1)-R*log(P2/P1)\n",
- "#so\n",
- "ds=1.6*R-0.1*R+Cp*math.log(T2/T1)-R*math.log(P2/P1);\n",
- "print\" Entropy Change =\",round(ds,3),\"kJ/kg.K \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Enthalpy change = 62.0 kJ/kg\n",
- " Entropy Change = 1.078 kJ/kg.K \n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.7:Pg-596"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques7\n",
- "#percent deviation using specific volume calculated by kays rule and vander waals rule\n",
- "import math\n",
- "\n",
- "#a-denotes C02\n",
- "#b-denotes CH4\n",
- "T=310.94;#Temperature of mixture K\n",
- "P=86.19;#Pressure of mixture in MPa\n",
- "#Tc- critical Temperature\n",
- "#Pc-critical pressure\n",
- "Tca=304.1;#K\n",
- "Tcb=190.4;#K\n",
- "Pca=7.38;#MPa\n",
- "Pcb=4.60;#MPa\n",
- "Ra=0.1889;#gas constant for a in kJ/kg.K\n",
- "Rb=0.5183;#gas constant for b in kJ/kg.K\n",
- "xa=0.8;#fraction of CO2\n",
- "xb=0.2;#fraction of CH4\n",
- "Rm=xa*Ra+xb*Rb;#mean gas constant in kJ/kg.K\n",
- "Ma=44.01;#molecular mass of a\n",
- "Mb=16.043;#molecular mass of b\n",
- "#1.Kay's rule\n",
- "ya=xa/Ma/(xa/Ma+xb/Mb);#mole fraction of a\n",
- "yb=xb/Mb/(xa/Ma+xb/Mb);#mole fraction of b\n",
- "Tcm=ya*Tca+yb*Tcb;#mean critical temp in K\n",
- "Pcm=ya*Pca+yb*Tcb;#mean critical pressure n MPa\n",
- "#therefore pseudo reduced property of mixture\n",
- "Trm=T/Tcm;\n",
- "Prm=P/Pcm;\n",
- "Zm=0.7;#Compressiblity from generalised compressibility chart\n",
- "vc=Zm*Rm*T/P/1000;#specific volume calculated in m^3/kg\n",
- "ve=0.0006757;#experimental specific volume in m^3/kg\n",
- "pd1=(ve-vc)/ve*100;#percent deviation\n",
- "print\" Percentage deviation in specific volume using Kays rule =\",round(pd1,1),\"percent \\n\"\n",
- "\n",
- "#2. using vander waals equation\n",
- "#values of vander waals constant\n",
- "Aa=27*(Ra**2)*(Tca**2)/(64*Pca*1000);\n",
- "Ba=Ra*Tca/(8*Pca*1000);\n",
- "Ab=27*(Rb**2)*(Tcb**2)/(64*Pcb*1000);\n",
- "Bb=Rb*Tcb/(8*Pcb*1000);\n",
- "#mean vander waals constant\n",
- "Am=(xa*math.sqrt(Aa)+xb*math.sqrt(Ab))**2;\n",
- "Bm=(xa*Ba+xb*Bb);\n",
- "#using vander waals equation we get cubic equation \n",
- "#solving we get\n",
- "vc=0.0006326;#calculated specific volume in m^3/kg\n",
- "pd2=((ve-vc)/ve)*100;\n",
- "print\" Percentage deviation in specific volume using vander waals eqn =\",round(pd2,1),\"percent\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Percentage deviation in specific volume using Kays rule = 4.8 percent \n",
- "\n",
- " Percentage deviation in specific volume using vander waals eqn = 6.4 percent\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter15.ipynb b/Fundamentals_Of_Thermodynamics/Chapter15.ipynb deleted file mode 100755 index 18f2c842..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter15.ipynb +++ /dev/null @@ -1,248 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:49d323999697626f705831867b32f6c520c5287d76ed00656f7259e6db65356e"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter15:CHEMICAL REACTIONS"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex15.1:Pg-621"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques1\n",
- "#theoratical air-fuel ratio for combustion of octane\n",
- "#combustion equation is\n",
- "#C8H18 + 12.5O2 + 12.5(3.76) N2 \u2192 8 CO2 + 9H2O + 47.0N2\n",
- "rm=(12.5+47.0)/1;#air fuel ratio on mole basis\n",
- "rma=rm*28.97/114.2;#air fuel ratio on mass basis;\n",
- "print \"Theoratical air fuel ratio on mass basis is\",round(rma),\"kg air/kg fuel\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Theoratical air fuel ratio on mass basis is 15.0 kg air/kg fuel\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex15.6:Pg-629"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques6\n",
- "#determining heat transfer per kilomole of fuel entering combustion chamber\n",
- "\n",
- "#1-CH4\n",
- "#2-CO2\n",
- "#3-H2O\n",
- "#hf-standard enthalpy of given substance\n",
- "hf1=-74.873;#kJ\n",
- "hf2=-393.522;#kJ\n",
- "hf3=-285.830;#kJ\n",
- "Qcv=hf2+2*hf3-hf1;#kJ\n",
- "print \"Heat transfer per kilomole of fuel entering combustion chamber is\",round(Qcv,3),\"kJ\"\n",
- "#the answers in the book is different as they have not printed the decimals in values"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Heat transfer per kilomole of fuel entering combustion chamber is -890.309 kJ\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex15.7:Pg-631"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques7\n",
- "#calculating enthalpy of water at given pressure and temperature\n",
- "\n",
- "#1.Assuming steam to be an ideal gas with value of Cp\n",
- "T1=298.15;#Initial temperature in K\n",
- "T2=573.15;#final temperature in K\n",
- "T=(T1+T2)/2;#average temperature in K\n",
- "Cp=1.79+0.107*T/1000+0.586*(T/1000)**2-.20*(T/1000)**3;#specific heat at constant pressure in kj/kg.K\n",
- "M=18.015;#mass in kg\n",
- "dh=M*Cp*(T2-T1);#enthalpy change in kJ/kmol\n",
- "ho=-241.826;#enthalpy at standard temperature and pressure in kJ/mol\n",
- "htp1=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n",
- "print \" 1. Enthalpy of water at given pressure and temperature using value of Cp =\",round(htp1,3),\"kJ/kmol\"\n",
- "\n",
- "#2..Assuming steam to be an ideal gas with value for dh\n",
- "dh=9359;#enthalpy change from table A.9 in kJ/mol\n",
- "htp2=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n",
- "print \" 2. Enthalpy of water at given pressure and temperature assuming value od dh =\",round(htp2,3),\"kJ/kmol \"\n",
- "\n",
- "#3. Using steam table\n",
- "dh=M*(2977.5-2547.2);#enthalpy change for gases in kJ/mol\n",
- "htp3g=dh/1000+ho;\n",
- "dh=M*(2977.5-104.9);#enthalpy change for liquid in kJ/mol\n",
- "hl=-285.830;#standard enthalpy for liquid in kJ/kmol\n",
- "htp31=hl+dh/1000.0;#enthalpy at given temp and pressure in kJ/kmol\n",
- "print \" 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp31,3),\"kJ/kmol \"\n",
- "print \" 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp3g,3),\"kJ/kmol \"\n",
- "#4.using generalised charts\n",
- "#htp=ho-(h2*-h2)+(h2*-h1*)+(h1*-h1);\n",
- "#h2*-h2=Z*R*Tc,\n",
- "#h2*-h1*=9539 kJ/mol, from part 2\n",
- "#h1*-h1=0 ,as ideal gas \n",
- "Z=0.21;#from chart\n",
- "R=8.3145;#gas constant in SI units\n",
- "Tc=647.3;#critical temperature in K\n",
- "htp4=ho+9539/1000-Z*R*Tc/1000;#enthalpy at given temp and pressure in kJ/kmol\n",
- "print \" 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = \",round(htp4,3),\"kJ/kmol\"\n",
- "#the answers in book are different as they have not printed the decimals in values"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " 1. Enthalpy of water at given pressure and temperature using value of Cp = -232.258 kJ/kmol\n",
- " 2. Enthalpy of water at given pressure and temperature assuming value od dh = -232.826 kJ/kmol \n",
- " 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.08 kJ/kmol \n",
- " 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.074 kJ/kmol \n",
- " 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = -233.956 kJ/kmol\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex15.15:Pg-649"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques15\n",
- "#calculatng reversible elecromotive force \n",
- "\n",
- "#1-H2O\n",
- "#2-H2\n",
- "#3-O2\n",
- "#hf-standard enthalpy \n",
- "#sf-standard entropy\n",
- "hf1=-285.830;#kJ\n",
- "hf2=0;#kJ\n",
- "hf3=0;#kJ\n",
- "sf1=69.950;#kJ/K\n",
- "sf2=130.678;#kJ/K\n",
- "sf3=205.148;#kJ/K\n",
- "dH=2*hf1-2*hf2-hf3;#change in enthalpy in kJ\n",
- "dS=2*sf1-2*sf2-sf3;#change in entropy in kJ/K\n",
- "T=298.15;#temperature in K\n",
- "dG=dH-T*dS/1000;#change in gibbs free energy in kJ\n",
- "E=-dG*1000/(96485*4);#emf in V\n",
- "print\" Reversible electromotive Force =\",round(E,3),\" V\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Reversible electromotive Force = 1.229 V\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex15.17:Pg-654"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques17\n",
- "#efficiency of generator and plant\n",
- "\n",
- "q=325000*(3398.3-856.0);#heat transferred to H2O/kg fuel in kJ/kg\n",
- "qv=26700.0*33250;#higher heating value in kJ/kg\n",
- "nst=q/qv*100;#efficiency of steam generator\n",
- "w=81000.0*3600;#net work done in kJ/kg\n",
- "nth=w/qv*100.0;#thermal efficiency\n",
- "print\" Efficiency of generator =\",round(nst,1),\"percent\\n\"\n",
- "print\" Thermal Efficiency =\",round(nth,1),\" percent\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Efficiency of generator = 93.1 percent\n",
- "\n",
- " Thermal Efficiency = 32.8 percent\n"
- ]
- }
- ],
- "prompt_number": 20
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter16.ipynb b/Fundamentals_Of_Thermodynamics/Chapter16.ipynb deleted file mode 100755 index 6a07737d..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter16.ipynb +++ /dev/null @@ -1,128 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:7c7e50fa2880e870c4aa1630bafd7d049a3cb3c4e646a0d88068a55be4a3d00f"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 16:INTRODUCTION TO PHASE AND CHEMICAL EQUILIBRIUM"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex16.2:PG-681"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques2\n",
- "#to determine change in gibbs free energy\n",
- "\n",
- "#1-H2\n",
- "#2-O2\n",
- "#3-H2O\n",
- "\n",
- "#at T=298 K\n",
- "T1=298.0;#K\n",
- "Hf1=0;#Enthalpy of formation of H2 at 298 K\n",
- "Hf2=0;#Enthalpy of formation of O2 at 298 K\n",
- "Hf3=-241826;#enthalpy of formation of H2O at 298 K in kJ\n",
- "dH=2*Hf1+Hf2-2*Hf3;#Change in enthalpy in kJ\n",
- "Sf1=130.678;#Entropy of H2 at 298 K n kJ/K\n",
- "Sf2=205.148;#Entropy of O2 at 298 K in kJ/K\n",
- "Sf3=188.834;#entropy of H2O at 298 K in kJ/K\n",
- "dS=2*Sf1+Sf2-2*Sf3;#Change in entropy in kJ/K\n",
- "dG1=dH-T1*dS;#change n gibbs free energy in kJ\n",
- "print\" Change in gibbs free energy at\",T1,\"kelvin is\",round(dG1),\"kJ \"\n",
- "#at T=2000 K\n",
- "T2=2000.0;#K\n",
- "Hf1=52942-0;#Enthalpy of formation of H2 at 2000 K\n",
- "Hf2=59176-0;#Enthalpy of formation of O2 at 2000 K\n",
- "Hf3=-241826+72788;#enthalpy of formation of H2O at 2000 K in kJ\n",
- "dH=2*Hf1+Hf2-2*Hf3;#Change in enthalpy in kJ\n",
- "Sf1=188.419;#Entropy of H2 at 2000 K n kJ/K\n",
- "Sf2=268.748;#Entropy of O2 at 2000 K in kJ/K\n",
- "Sf3=264.769;#entropy of H2O at 2000 K in kJ/K\n",
- "dS=2*Sf1+Sf2-2*Sf3;#Change in entropy in kJ/K\n",
- "dG2=dH-(T2*dS);#change n gibbs free energy in kJ\n",
- "print\" Change in gibbs free energy at\",T2,\"kelvin is\",round(dG2),\" kJ \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Change in gibbs free energy at 298.0 kelvin is 457179.0 kJ \n",
- " Change in gibbs free energy at 2000.0 kelvin is 271040.0 kJ \n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex16.3:PG-683"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques3\n",
- "#calculating equilibrium constant \n",
- "\n",
- "dG1=-457.166;#change in gibbs free energy at temp 298 K from example2 in kJ\n",
- "dG2=-271.040;#change in gibbs free energy at temp 2000 K from example2 n kJ\n",
- "T1=298;#K\n",
- "T2=2000;#K\n",
- "R=8.3145;#gas constant\n",
- "K1=dG1*1000/(R*T1);\n",
- "K2=dG2*1000/(R*T2);\n",
- "print\" Equilibrium constant at \",T1,\"K = \",round(K1,2)\n",
- "print\" Equilibrium constant at \",T2,\"K = \",round(K2,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Equilibrium constant at 298 K = -184.51\n",
- " Equilibrium constant at 2000 K = -16.299\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter17.ipynb b/Fundamentals_Of_Thermodynamics/Chapter17.ipynb deleted file mode 100755 index 4ae8005b..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter17.ipynb +++ /dev/null @@ -1,434 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:70b7f86a423a7c9685f997491946441e1c53cfe8fe328afd6e5b37a44e4dce11"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 17: COMPRESSIBLE FLOW"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex17.1:PG-710"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques1\n",
- "#to determine isentropic stagnation pressure and temperature \n",
- "\n",
- "T=300;#Temperature of air in K\n",
- "P=150;#Pressure of air in kPa\n",
- "v=200;#velocity of air flow n m/s\n",
- "Cp=1.004;#specific heat at constant pressure in kJ/kg\n",
- "To=v**2/(2000*Cp)+T;#stagnation temperature in K\n",
- "k=1.4;#constant\n",
- "Po=P*(To/T)**(k/(k-1));#stagnation pressure in kPa\n",
- "print 'Stagnation Temperature is ',round(To,1),' K \\n'\n",
- "print 'Stagnation Pressure is ',round(Po,2),'kPa \\n'"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Stagnation Temperature is 319.9 K \n",
- "\n",
- "Stagnation Pressure is 187.85 kPa \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex17.2:PG-713"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques2\n",
- "#to determine the force\n",
- "\n",
- "#initializing variables\n",
- "mdot=-1 # mass flow rate out of control volume in kg/s\n",
- "Vx=-1 # x component of velocity of control volume in m/s\n",
- "Vy=10 # y component of velocity of control volume in m/s\n",
- "\n",
- "Fx=mdot*Vx # Force in X direction\n",
- "\n",
- "Fy=mdot*Vy # Force in Y direction\n",
- "\n",
- "print \"the force the man exert on the wheelbarrow\",round(Fx),\"N\"\n",
- "print \"the force the floor exerts on the wheelbarrow\",round(Fy),\"N\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "the force the man exert on the wheelbarrow 1.0 N\n",
- "the force the floor exerts on the wheelbarrow -10.0 N\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex17.3:PG-715"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques3\n",
- "#determining the thrust acting on a control surface\n",
- "\n",
- "#i-inlet\n",
- "#e-exit\n",
- "#using momentum equation on control surface in x direction\n",
- "me=20.4;#mass exiting in kg\n",
- "mi=20;#mass entering in kg\n",
- "ve=450;#exit velocity in m/s\n",
- "vi=100;#inlet velocity in m/s\n",
- "Pi=95;#Pressure at inlet in kPa\n",
- "Pe=125;#Pressure at exit in kPa\n",
- "Po=100;#surrounding pressure in kPa\n",
- "Ai=0.2;#inlet area in m^2\n",
- "Ae=0.1;#exit area in m^2\n",
- "Rx=(me*ve-mi*vi)/1000-(Pi-Po)*Ai+(Pe-Po)*Ae;#thrust in x direction in kN\n",
- "\n",
- "print \"Thrust acting in x direction is \",round(Rx,2),\"kN\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Thrust acting in x direction is 10.68 kN\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex17.4:PG-717"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques4\n",
- "#to determine increase in enthalpy\n",
- "#initializing variables\n",
- "#i-inlet\n",
- "#e-exit\n",
- "\n",
- "T=25+273 # temperature in kelvin\n",
- "v=0.001003 # specific volume of water in kg/m^3 at 25 *c from table B.1.1 \n",
- "ve=7;#exit velocity in m/s\n",
- "vi=30;#inlet velocity in m/s\n",
- "Pi=350;#Pressure at inlet in kPa\n",
- "Pe=600;#Pressure at exit in kPa\n",
- "\n",
- "#using momentum equation on control surface \n",
- "Pes= (vi**2-ve**2)/(2*v*1000)+Pi # exit pressure for reversible diffuser\n",
- "delH=(vi**2-ve**2)/(2*1000.0) # change in enthalpy from first law in kJ/kg\n",
- "delU=delH-v*(Pe-Pi) # change in internal energy in kJ/kg\n",
- "delS=delU/T # change in entropy in kJ/kg.K\n",
- "print\"the exit pressure for reversible diffuser is \",round(Pes),\"kPa\"\n",
- "print\"the increase in enthalpy is \",round(delH,5),\"kJ/kg\"\n",
- "print\"the increase in internal energy is \",round(delU,5),\"kJ/kg\"\n",
- "print\"the increase in entropy is \",round(delS,6),\"kJ/kg.K\"\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "the exit pressure for reversible diffuser is 774.0 kPa\n",
- "the increase in enthalpy is 0.4255 kJ/kg\n",
- "the increase in internal energy is 0.17475 kJ/kg\n",
- "the increase in entropy is 0.000586 kJ/kg.K\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex17.5:PG-720"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques5\n",
- "#determining velocity of sound in air\n",
- "import math\n",
- "k=1.4;#constant\n",
- "R=0.287;#gas constant\n",
- "#at 300K\n",
- "T1=300;# temperature in kelvin\n",
- "c1=math.sqrt(k*R*T1*1000)\n",
- "print \"Speed of sound at 300 K is\",round(c1,1),\" m/s\" \n",
- "#at 1000K\n",
- "T2=1000;# temperature in kelvin\n",
- "c2=math.sqrt(k*R*T2*1000)\n",
- "print \"Speed of sound at 1000 K is\",round(c2,1),\" m/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Speed of sound at 300 K is 347.2 m/s\n",
- "Speed of sound at 1000 K is 633.9 m/s\n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex17.6:PG-727"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques6\n",
- "#determining mass flow rate through control volume\n",
- "import math\n",
- "k=1.4;#constant\n",
- "R=0.287;#gas constant\n",
- "To=360;#stagnation Temperature in K \n",
- "T=To*0.8333;#Temperature of air in K, 0.8333 stagnation ratio from table\n",
- "v=math.sqrt(k*R*T*1000);#velocity in m/s\n",
- "P=528;#stagnation pressure in kPa\n",
- "d=P/(R*T);#stagnation density in kg/m^3\n",
- "A=500*10**-6;#area in m^2\n",
- "ms=d*A*v;#mass flow rate in kg/s\n",
- "print\" Mass flow rate at the throat section is\",round(ms,4),\"kg/s\"\n",
- "#e-exit state\n",
- "Te=To*0.9381;#exit temperature in K, ratio from table\n",
- "ce=math.sqrt(k*R*Te*1000);#exit velocity of sound in m/s\n",
- "Me=0.573;#Mach number\n",
- "ve=Me*ce;\n",
- "Pe=800;#exit pressure in kPa\n",
- "de=Pe/R/Te;\n",
- "mse=de*A*ve;\n",
- "print\" Mass flow rate at the exit section is\",round(mse,4),\" kg/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " Mass flow rate at the throat section is 1.0646 kg/s\n",
- " Mass flow rate at the exit section is 0.8711 kg/s\n"
- ]
- }
- ],
- "prompt_number": 30
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex17.7:PG-728"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques7\n",
- "#determining exit properties in a control volume\n",
- "import math\n",
- "Po=1000;#stagnation pressure in kPa\n",
- "To=360;#stagnation temperature in K\n",
- "\n",
- "#when diverging section acting as nozzle\n",
- "\n",
- "Pe1=0.0939*Po;#exit pressure of air in kPa\n",
- "Te1=0.5089*To;#exit temperature in K\n",
- "k=1.4;#constant\n",
- "R=0.287;#gas constant for air\n",
- "ce=math.sqrt(k*R*Te1*1000);#velocity of sound in exit section in m/s\n",
- "Me=2.197;#mach number from table\n",
- "ve1=Me*ce;#velocity of air at exit section in m/s\n",
- "print \"When diverging section act as a nozzle :-\"\n",
- "print \"Exit pressure is\",round(Pe1,4),\" kPa\"\n",
- "print \"Exit Temperature\",round(Te1,1),\" K\"\n",
- "print \"Exit velocity is\",round(ve1,1),\" m/s \"\n",
- "\n",
- "#when diverging section act as diffuser\n",
- "\n",
- "Me=0.308;\n",
- "Pe2=0.0936*Po;#exit pressure of air in kPa\n",
- "Te2=0.9812*To;#exit temperature in K\n",
- "ce=math.sqrt(k*R*Te2*1000);#velocity of sound in exit section in m/s\n",
- "ve2=Me*ce;\n",
- "print \"When diverging section act as a diffuser :-\"\n",
- "print \"Exit pressure is\",round(Pe2,1),\" kPa\"\n",
- "print \"Exit Temperature\",round(Te2,2),\" K\"\n",
- "print \"Exit velocity is\",round(ve2,),\" m/s \"\n",
- "\n",
- "# The value of Exit pressure when diverging section acts as diffuser is wrong\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "When diverging section act as a nozzle :-\n",
- "Exit pressure is 93.9 kPa\n",
- "Exit Temperature 183.2 K\n",
- "Exit velocity is 596.1 m/s \n",
- "When diverging section act as a diffuser :-\n",
- "Exit pressure is 93.6 kPa\n",
- "Exit Temperature 353.23 K\n",
- "Exit velocity is 116.0 m/s \n"
- ]
- }
- ],
- "prompt_number": 39
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex17.9:PG-733"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#ques9\n",
- "#determining exit plane properties in control volume\n",
- "\n",
- "#x-inlet\n",
- "#y-exit\n",
- "Mx=1.5;#mach number for inlet\n",
- "My=0.7011;#mach number for exit\n",
- "Px=272.4;#inlet pressure in kPa\n",
- "Tx=248.3;#inlet temperature in K\n",
- "Tox=360 # stagnation temperature in Kelvin\n",
- "Pox=1000.0;#stagnation pressure for inlet\n",
- "Py=2.4583*Px;# Pressure at 1.5 mach in kPa\n",
- "Ty=1.320*Tx;# temperature at 1.5 mach in K\n",
- "Poy=0.9298*Pox;# pressure at 1.5 mach in kPa\n",
- "\n",
- "Toy=Tox # constant\n",
- "Me=0.339 # from table with A/A*=1.860 and M < 1\n",
- "Pe=0.9222*Py;#Exit Pressure in kPa\n",
- "Te=0.9771*Toy;#Exit temperature in K\n",
- "Poe=0.9222*Poy;#Exit pressure in kPa\n",
- "\n",
- "print \"Exit Mach no.=\",Me\n",
- "print \"Exit temperature =\",round(Te,2),\"K \"\n",
- "print \"Exit pressure =\",round(Poe,1),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Exit Mach no.= 0.339\n",
- "Exit temperature = 351.76 K \n",
- "Exit pressure = 857.5 kPa\n"
- ]
- }
- ],
- "prompt_number": 50
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 45
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter2.ipynb b/Fundamentals_Of_Thermodynamics/Chapter2.ipynb deleted file mode 100755 index 95850873..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter2.ipynb +++ /dev/null @@ -1,314 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:eb1b6239947f111d6ea8f1bcaafe0bb84b121b2561bbb9f5f8a8bdec77169fd2"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter2:SOME CONCEPTS AND DEFINITIONS"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.1:pg-19"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#weight of a person\n",
- "\n",
- "\n",
- "m=1 #kg\n",
- "g=9.75 #acc.due to gravity in m/s^2\n",
- "F=m*g #weight of 1 kg mass in N\n",
- "print\"\\n hence,weight of person is\",round(F,2),\" N\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,weight of person is 9.75 N\n"
- ]
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.2:pg-24"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#average volume and density\n",
- "\n",
- "Vliq=0.2 #volume of liquid in m^3\n",
- "dliq=997 #density of liquid in kg/m^3\n",
- "Vstone=0.12 #volume of stone in m^3\n",
- "Vsand=0.15 #volume of sand in m^3\n",
- "Vair=0.53 #vo;ume of air in m^3\n",
- "mliq=Vliq*dliq #mass of liquid in kg\n",
- "dstone=2750 #density of stone in kg/m^3\n",
- "dsand=1500 #density of sand in kg/m^3\n",
- "mstone=Vstone*dstone #volume of stone in m^3\n",
- "msand=Vsand*dsand #volume of sand in m^3\n",
- "Vtot=1 #total volume in m^3\n",
- "dair=1.1 #density of air in kg/m^3\n",
- "mair=Vair*dair #mass of air\n",
- "mtot=mair+msand+mliq+mstone #total mass in kg\n",
- "v=Vtot/mtot #specific volume in m^3/kg\n",
- "d=1/v #overall density in kg/m^3\n",
- "print\"\\n hence,average specific volume is\",round(v,6),\"m^3/kg\" \n",
- "print\"\\n and overall density is\", round(d),\"kg/m^3\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,average specific volume is 0.001325 m^3/kg\n",
- "\n",
- " and overall density is 755.0 kg/m^3\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.3:pg-26"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#calculating the required force\n",
- "import math\n",
- "\n",
- "Dcyl=0.1 #cylinder diameter in m\n",
- "Drod=0.01 #rod diameter in m\n",
- "Acyl=math.pi*Dcyl**2/4 #cross sectional area of cylinder in m^2\n",
- "Arod=math.pi*Drod**2/4 #cross sectional area of rod in m^2\n",
- "Pcyl=250000 #inside hydaulic pressure in Pa\n",
- "Po=101000 #outside atmospheric pressure in kPa\n",
- "g=9.81 #acc. due to gravity in m/s^2\n",
- "mp=25 #mass of (rod+piston) in kg\n",
- "F=Pcyl*Acyl-Po*(Acyl-Arod)-mp*g #the force that rod can push within the upward direction in N\n",
- "print\"\\n hence,the force that rod can push within the upward direction is\",round(F,1),\" N\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the force that rod can push within the upward direction is 932.9 N\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.4:pg-28"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#Calculating atmospheric pressure \n",
- "\n",
- "dm=13534 #density of mercury in kg/m^3\n",
- "H=0.750 #height difference between two columns in metres\n",
- "g=9.80665 #acc. due to gravity in m/s^2\n",
- "Patm=dm*H*g/1000 #atmospheric pressure in kPa\n",
- "print\"\\n hence, atmospheric pressure is\",round(Patm,2),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, atmospheric pressure is 99.54 kPa\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.5:pg-28"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#pressure inside vessel\n",
- "\n",
- "dm=13590 #density of mercury in kg/m^3\n",
- "H=0.24 #height difference between two columns in metres\n",
- "g=9.80665 #acc. due to gravity in m/s^2\n",
- "dP=dm*H*g #pressure difference in Pa\n",
- "Patm=13590*0.750*9.80665 #Atmospheric Pressure in Pa\n",
- "Pvessel=dP+Patm #Absolute Pressure inside vessel in Pa\n",
- "Pvessel=Pvessel/101325 #Absolute Pressure inside vessel in atm\n",
- "print\"\\n hence, the absolute pressure inside vessel is\",round(Pvessel,3),\"atm\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, the absolute pressure inside vessel is 1.302 atm\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.6:pg-29"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#calculating pressure\n",
- "\n",
- "dg=750 #density of gaasoline in kg/m^3\n",
- "dR=1206 #density of R-134a in kg/m^3\n",
- "H=7.5 #height of storage tank in metres\n",
- "g=9.807 #acc. due to gravity in m/s^2\n",
- "dP1=dg*g*H/1000 #in kPa\n",
- "Ptop1=101 #atmospheric pressure in kPa\n",
- "P1=dP1+Ptop1\n",
- "print\"hence,pressure at the bottom of storage tank if fluid is gasoline is\",round(P1,1),\"kPa\" \n",
- "dP2=dR*g*H/1000 #in kPa\n",
- "Ptop2=1000 #top surface pressure in kPa\n",
- "P2=dP2+Ptop2\n",
- "print\"\\n hence, pressure at the bottom of storage tank if liquid is R-134a is\",round(P2),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "hence,pressure at the bottom of storage tank if fluid is gasoline is 156.2 kPa\n",
- "\n",
- " hence, pressure at the bottom of storage tank if liquid is R-134a is 1089.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.7:pg-29"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#calculating balancing force\n",
- "\n",
- "Po=100#Outside atmospheric pressure in kPa\n",
- "F1=25 #net force on the smallest piston in kN\n",
- "A1=0.01 #cross sectional area of lower piston in m^2\n",
- "P1=Po+F1/A1 #fluid pressure in kPa\n",
- "d=900 #density of fluid in kg/m^3\n",
- "g=9.81 #acc. due to gravity in m/s^2\n",
- "H=6 #height of second piston in comparison to first one in m\n",
- "P2=P1-d*g*H/1000 #pressure at higher elevation on piston 2 in kPa\n",
- "A2=0.05 #cross sectional area of higher piston in m^3\n",
- "F2=(P2-Po)*A2 #balancing force on second piston in kN\n",
- "print\"\\n hence, balancing force on second larger piston is\",round(F2,1),\"N\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, balancing force on second larger piston is 122.4 N\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter3.ipynb b/Fundamentals_Of_Thermodynamics/Chapter3.ipynb deleted file mode 100755 index 7447d700..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter3.ipynb +++ /dev/null @@ -1,403 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:6916c81bc8c1ac256991650a35c94801d5197d3ce593f7738220895278cf5f8b"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter3:PROPERTIES OF A PURE SUBSTANCE"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.3:pg-59"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#determining the quality and specific volume\n",
- "\n",
- "v1=0.5 #given specific volume in m^3/kg\n",
- "vf=0.001073 #specific volume when only liquid phase is present in m^3/kg\n",
- "vfg=0.60475 #in m^3/kg\n",
- "x=(v1-vf)/vfg #quality\n",
- "print\"For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is\",round(x,3)\n",
- "\n",
- "v2=1 #given specific volume in m^3/kg\n",
- "\n",
- " # using the method of interplotation\n",
- "T=((400-300)*(1.0-0.8753))/(1.0315-0.8753)+300 #temperature of the water\n",
- "print\"For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is\",round(T,1)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is 0.825\n",
- "For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is 379.8\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.4:pg-60"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- " #example 4\n",
- "#percentage of vapor \n",
- "\n",
- "vliq=0.1 #volume of saturated liquid in m^3\n",
- "vf=0.000843 #in m^3/kg\n",
- "vvap=0.9 #volume of saturated vapor R-134a in equilbrium\n",
- "vg=0.02671 #in m^3/kg\n",
- "mliq=vliq/vf #mass of liquid in kg \n",
- "mvap=vvap/vg #mass of vapor in kg\n",
- "m=mliq+mvap #total mass in kg\n",
- "x=mvap*100/m #percentage of vapor on mass basis\n",
- "print\"hence,% vapor on mass basis is\",round(x,1),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "hence,% vapor on mass basis is 22.1 %\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.6:pg-61"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#Determinig the missing property\n",
- "\n",
- "T1=273-53.2 #given temperature in K\n",
- "P1=600 #given pressure in kPa\n",
- "print\"This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\"\n",
- "T2=100 #given temp. in K\n",
- "v2=0.008 #given specific volume in m^3/kg\n",
- "vf=0.001452 #in m^3/kg\n",
- "vg=0.0312 #in m^3/kg\n",
- "Psat=779.2 #saturation pressure in kPa\n",
- "vfg=vg-vf #in m^3/kg\n",
- "x=(v2-vf)/vfg #quality\n",
- "print\"\\n hence, the pressure is\",round(Psat,1),\"kPa\"\n",
- "print\"\\n and quality is\",round(x,4),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\n",
- "\n",
- " hence, the pressure is 779.2 kPa\n",
- "\n",
- " and quality is 0.2201 %\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.7:pg-62"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#determining the pressure of water\n",
- "\n",
- "vg=0.12736 #specific volume in m^3/kg for water at 200C\n",
- "v=0.4 #specific volume in m^3/kg\n",
- "P1=500 #in kPa\n",
- "v1=0.42492 #specific volume at P1 in m^3/kg\n",
- "P2=600 #in kPa\n",
- "v2=0.35202 #specific volume at P2 in m^3/kg\n",
- "P=P1+(P2-P1)*(v-v1)/(v2-v1) #calculating pressure by interplotation\n",
- "print \"hence,the pressure of water is\",round(P,1),\" kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " hence,the pressure of water is 534.2 kPa\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.8:pg-66"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8\n",
- "#calculating mass of air\n",
- "\n",
- "P=100 #pressure in kPa\n",
- "V=6*10*4 #volume of room in m^3\n",
- "R=0.287 #in kN-m/kg-K\n",
- "T=25 #temperature in Celsius\n",
- "m=P*V/(R*(T+273.1)) #mass of air contained in room\n",
- "print\"\\n hence, mass of air contained in room is\",round(m,1),\"kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, mass of air contained in room is 280.5 kg\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.9:pg-67"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9\n",
- "#calculating pressure inside tank\n",
- "\n",
- "V=0.5 #volumr of tank in m^3\n",
- "m=10 #mass of ideal gas in kg\n",
- "T=25 #temperature of tank in Celsius\n",
- "M=24 #molecular mass of gas in kg/kmol\n",
- "Ru=8.3145 #universal gas constant in kN-m/kmol-K\n",
- "R=Ru/M #gas constant for given ideal gas in kN-m/kg-K\n",
- "P=m*R*(T+273.2)/V #pressure inside tank\n",
- "print\"\\n hence,pressure inside tank is\",round(P),\"kpa\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,pressure inside tank is 2066.0 kpa\n"
- ]
- }
- ],
- "prompt_number": 30
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.10:pg-67"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10\n",
- "#mass flow rate\n",
- "\n",
- "dt=185 #time period in seconds over which there is incrrease in volume \n",
- "dV=0.75 #increase in volume in 0.75 in m^3\n",
- "V=dV/dt #volume flow rate in m^3/s\n",
- "P=105 #pressure inside gas bell kPa\n",
- "T=21 #temperature in celsius\n",
- "R=0.1889 #ideal gas constant in kJ/kg-K\n",
- "m=P*V/(R*(T+273.15)) #mass flow rate of the flow in kg/s\n",
- "print\"\\n hence,mass flow rate is\",round(m,5),\"kg/s\"\n",
- "print\"\\n and volume flow rate is\",round(V,5),\"m^3/s\"\n",
- "#The answer of volume flow rate in the book is wrong."
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,mass flow rate is 0.00766 kg/s\n",
- "\n",
- " and volume flow rate is 0.00405 m^3/s\n"
- ]
- }
- ],
- "prompt_number": 40
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.12:pg-71"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12\n",
- "#determining specific using diffenet laws\n",
- "\n",
- "T=100.0 #given temp.in 100 celsius\n",
- "P=3.0 #given pressure in MPa\n",
- "v1=0.0065 #specific volume in m^3/kg using table\n",
- "print\"\\n hence,the specific volume for R-134a using R-134a tables is\",round(v1,3),\"m^3/kg\"\n",
- "M=102.3 #molecular mass in kg\n",
- "R=8.3145 #in kJ/K\n",
- "Ru=R/M #in kJ/K-kg\n",
- "v2=Ru*(T+273)/(P*1000) #specific volume assuming R-134a to be ideal gas in m^3/kg\n",
- "print\"\\n hence,the specific volume for R-134a using R-134a the ideal gas laws is\",round(v2,5),\"m^3/kg\"\n",
- "Tr=373.2/374.2 #reduced temperature using generalized chart\n",
- "Pr=3.0/4.06 #reduced pressure using generalized chart\n",
- "Z=0.67 #compressibility factor \n",
- "v3=Z*v2 # specific volume using generalized chart in m^3/kg\n",
- "print\"\\n hence,the specific volume for R-134a using the generalized chart is\",round(v3,5),\"m^3/kg\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the specific volume for R-134a using R-134a tables is 0.006 m^3/kg\n",
- "\n",
- " hence,the specific volume for R-134a using R-134a the ideal gas laws is 0.01011 m^3/kg\n",
- "\n",
- " hence,the specific volume for R-134a using the generalized chart is 0.00677 m^3/kg\n"
- ]
- }
- ],
- "prompt_number": 51
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.13:pg-71"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13\n",
- "#calculating mass of gas\n",
- "\n",
- "Pc=4250 #critical pressure of propane in kPa\n",
- "Tc=369.8 #critical temperature in K\n",
- "T=15 #temperature of propane in celsius\n",
- "Tr=T/Tc #reduced temperature\n",
- "Prsat=0.2 # reduced pressure \n",
- "P=Prsat*Pc #pressure in kPa\n",
- "x=0.1 #given quality\n",
- "Zf=0.035 #from graph\n",
- "Zg=0.83 #from graph\n",
- "Z=(1-x)*Zf+x*Zg #overall compressibility factor\n",
- "V=0.1 #volume of steel bottle in m^3\n",
- "R=0.1887 #in kPa-m^3/kg-K\n",
- "m=P*V/(Z*R*(T+273)) #total propane mass in kg\n",
- "print\"\\n hence,the total propane mass is\",round(m,2),\"kg\"\n",
- "print\"\\n and pressure is\",round(P,2),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the total propane mass is 13.66 kg\n",
- "\n",
- " and pressure is 850.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 44
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter4.ipynb b/Fundamentals_Of_Thermodynamics/Chapter4.ipynb deleted file mode 100755 index eed9d20a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter4.ipynb +++ /dev/null @@ -1,198 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:da3557673ab31ece618ad10f5b0d3ef78112ff36bd0b260e508d99211060a1c9"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 4:WORK AND HEAT"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.1:PG-96"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#work done during different processes\n",
- "import math\n",
- "\n",
- "P1=200 #initial pressure inside cylinder in kPa\n",
- "V2=0.1 #in m^3\n",
- "V1=0.04 #initial volume of gas in m^3\n",
- "\n",
- "W1=P1*(V2-V1) #work done in isobaric process in kJ\n",
- "print\"\\n hence,the work done during the isobaric process is\",round(W1,2),\"kJ. \\n\"\n",
- "\n",
- "W2=P1*V1*math.log(V2/V1) #work done in isothermal process in kJ\n",
- "print\"\\n hence,the work done in isothermal process is\",round(W2,2),\"kJ. \\n\"\n",
- "\n",
- "P2=P1*(V1/V2)**(1.3) #final pressure according to the given process\n",
- "W3=(P2*V2-P1*V1)/(1-1.3)\n",
- "print\"\\n hence,the work done during the described process is\",round(W3,2),\"kJ. \\n\"\n",
- "\n",
- "W4=0 #work done in isochoric process\n",
- "print\"\\n hence,the work done in the isochoric process is\",round(W4,3),\"kJ. \\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the work done during the isobaric process is 12.0 kJ. \n",
- "\n",
- "\n",
- " hence,the work done in isothermal process is 7.33 kJ. \n",
- "\n",
- "\n",
- " hence,the work done during the described process is 6.41 kJ. \n",
- "\n",
- "\n",
- " hence,the work done in the isochoric process is 0.0 kJ. \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.3:PG-99"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "\n",
- "#work produced\n",
- "\n",
- "Psat=190.2 #in kPa\n",
- "P1=Psat #saturation pressure in state 1\n",
- "vf=0.001504 #in m^3/kg\n",
- "vfg=0.62184 #in m^3/kg\n",
- "x1=0.25 #quality\n",
- "v1=vf+x1*vfg #specific volume at state 1 in m^3/kg\n",
- "v2=1.41*v1 #specific volume at state 2 in m^3/kg\n",
- "P2=600 #pressure in state 2 in kPa from Table B.2.2\n",
- "m=0.5 #mass of ammonia in kg\n",
- "W=m*(P1+P2)*(v2-v1)/2 #woork produced by ammonia in kJ\n",
- "print \"The final pressure is\",round(P2),\"kPa\\n\"\n",
- "print \"hence,work produced by ammonia is\",round(W,2),\"kJ\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The final pressure is 600.0 kPa\n",
- "\n",
- "hence,work produced by ammonia is 12.71 kJ\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.4:PG-100"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "\n",
- "#calculating work done\n",
- "\n",
- "v1=0.35411 #specific volume at state 1 in m^3/kg\n",
- "v2=v1/2 \n",
- "m=0.1 #mass of water in kg\n",
- "P1=1000 #pressure inside cylinder in kPa\n",
- "W=m*P1*(v2-v1) #in kJ\n",
- "print \"the work in the overall process is\",round(W,1),\"kJ\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "the work in the overall process is -17.7 kJ\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.7:PG-108"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#heat transfer\n",
- "k=1.4 #conductivity of glass pane in W/m-K\n",
- "A=0.5 #total surface area of glass pane\n",
- "dx=0.005 #thickness of glasspane in m\n",
- "dT1=20-12.1 #temperature difference between room air and outer glass surface temperature in celsius\n",
- "Q=-k*A*dT1/dx #conduction through glass slab in W\n",
- "h=100 #convective heat transfer coefficient in W/m^2-K \n",
- "dT=12.1-(-10) #temperature difference between warm room and colder ambient in celsius\n",
- "Q2=h*A*dT #heat transfer in convective layer in W\n",
- "#result\n",
- "print \"the rate of heat transfer in the glass and convective layer is\",round(Q2),\"kW.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "the rate of heat transfer in the glass and convective layer is 1105.0 kW.\n"
- ]
- }
- ],
- "prompt_number": 1
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter5.ipynb b/Fundamentals_Of_Thermodynamics/Chapter5.ipynb deleted file mode 100755 index 24351fdb..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter5.ipynb +++ /dev/null @@ -1,469 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:8e29dcea16eab605fcf93b95197200be339c1be6076d5413e7d70418a9a6df29"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter5:THE FIRST LAW OF THERMODYNAMICS"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.1:pg-131"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#calculating height\n",
- "\n",
- "m=1100 #mass of car in kg\n",
- "ke=400 #kinetic energy of car in kJ\n",
- "V=(2*ke*1000/m)**0.5 #velocity of car in m/s\n",
- "g=9.807 #acc. due to gravity in m/s^2\n",
- "H=ke*1000/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n",
- "print\"hence,the car should be raised to a height is\",round(H,1),\"m\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "hence,the car should be raised to a height is 37.1 m\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.2:pg-134"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#change in internal energy\n",
- "\n",
- "W=-5090 #work input to paddle wheel in kJ\n",
- "Q=-1500 #heat transfer from tank in kJ\n",
- "dU=Q-W #change in internal energy in kJ\n",
- "print\"hence,change in internal energy is\",round(dU),\"kj\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "hence,change in internal energy is 3590.0 kj\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.3:pg-134"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#analysis of energy transfer\n",
- "\n",
- "g=9.806 #acceleration due to gravity in m/s^2\n",
- "m=10 #mass of stone in kg\n",
- "H1=10.2 #initial height of stone above water in metres\n",
- "H2=0 #final height in metres\n",
- "dKE1=-m*g*(H2-H1) #change in kinetic energy when stone enters state 2 in J\n",
- "dPE1=-1 #change in potential energy when stone enters state 2 in J\n",
- "print\"\\n hence,when stone is \",round(dKE1),\"J\"\n",
- "print\"\\n and change in potential energy is \",round(dPE1),\"J\"\n",
- "dPE2=0 #change in potential energy when stone enters state 3 in JQ2=0 //no heat transfer when stone enters state 3 in J\n",
- "W2=0 #no work done when stone enters state 3 in J\n",
- "dKE2=-1 #change in kinetic energy when stone enters state 3\n",
- "dU2=-dKE2 #change in internal energy when stone enters state 3 in J\n",
- "print\"\\n hence,when stone has just come to rest in the bucket is \",round(dKE2),\"J\" \n",
- "print\"\\n and dU is\",round(dU2),\"J\" \n",
- "dKE3=0 #change in kinetic energy when stone enters state 4\n",
- "dPE=0 #change in potential energy when stone enters state 4 in J\n",
- "W3=0 #no work done when stone enters state 4 in J\n",
- "dU3=-1 #change in internal energy when stone enters state 4 in J\n",
- "Q3=dU3 #heat transfer when stone enters state 4 in J\n",
- "print\"\\n hence,when stone has entered state 4 is\",round(dU3),\"J\" \n",
- "print\"\\n and Q3 is \",round(Q3),\"J\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " hence,when stone is 1000.0 J\n",
- "\n",
- " and change in potential energy is -1.0 J\n",
- "\n",
- " hence,when stone has just come to rest in the bucket is -1.0 J\n",
- "\n",
- " and dU is 1.0 J\n",
- "\n",
- " hence,when stone has entered state 4 is -1.0 J\n",
- "\n",
- " and Q3 is -1.0 J\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.4:pg-136"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#Determinig the missing properties \n",
- "\n",
- "T1=300 #given temp. in Celsius\n",
- "u1=2780 #given specific internal enrgy in kJ/kg\n",
- "print\"From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\" #hiven pressure in kPa\n",
- "u2=2000 #given specific intrernal energy in kJ/kg\n",
- "print\"at P=2000 kPa\"\n",
- "uf=906.4 #in kJ/kg\n",
- "ug=2600.3 #in kJ/kg \n",
- "x2=(u2-906.4)/(ug-uf) \n",
- "print\"Also, under the given conditions\"\n",
- "vf=0.001177 #in m^3/kg \n",
- "vg=0.099627 #in m^3/kg\n",
- "v2=vf+x2*(vg-vf)#Specific volume for water in m^3/kg\n",
- "print\"\\n hence,specific volume for water is \",round(v2,5),\"m^3/kg\" \n",
- "print\"\\n Therefore ,this state is \",round(x2,4),\"N\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\n",
- "at P=2000 kPa\n",
- "Also, under the given conditions\n",
- "\n",
- " hence,specific volume for water is 0.06474 m^3/kg\n",
- "\n",
- " Therefore ,this state is 0.6456 N\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.5:pg-138"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#calculating heat transfer for the given process\n",
- "\n",
- "Vliq=0.05 #volume of saturated liquid in m^3\n",
- "vf=0.001043 #in m^3/kg\n",
- "Vvap=4.95 #volume of saturated water vapour in m^3\n",
- "vg=1.6940 #in m^3/kg\n",
- "m1liq=Vliq/vf #mass of liquid in kg\n",
- "m1liq=round(m1liq,2)\n",
- "m1vap=Vvap/vg #mass of vapors in kg\n",
- "m1vap=round(m1vap,2)\n",
- "u1liq=417.36 #specific internal energy of liquid in kJ/kg\n",
- "u1vap=2506.1 #specific internal energy of vapors in kJ/kg\n",
- "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in kJ\n",
- "m=m1liq+m1vap #total mass in kg\n",
- "V=5.0 #total volume in m^3\n",
- "v2=V/m #final specific volume in m^3/kg\n",
- "print\"by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\"\n",
- "u2=2600.5 #specific internal energy at final state in kJ/kg\n",
- "U2=m*u2 #internal energy at final state in kJ\n",
- "Q=U2-U1 #heat transfer for the process in kJ\n",
- "print\"\\n hence,heat transfer for the process is\",round(Q),\"kJ\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\n",
- "\n",
- " hence,heat transfer for the process is 104935.0 kJ\n"
- ]
- }
- ],
- "prompt_number": 36
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.6:pg-143"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#calculating work and heat transfer for the process\n",
- "\n",
- "V1=0.1 #volume of cylinder in m^3\n",
- "m=0.5 #mass of steam in kg\n",
- "v1=V1/m #specific volume of steam in m^3/kg\n",
- "vf=0.001084 #m^3/kg\n",
- "vfg=0.4614 #m^3/kg\n",
- "x1=(v1-vf)/vfg #quality\n",
- "hf=604.74 #kJ/kg\n",
- "hfg=2133.8#kJ/kg\n",
- "h2=3066.8 #final specific heat enthalpy in kJ/kg\n",
- "h1=hf+x1*hfg #initial specific enthalpy in kJ/kg\n",
- "Q=m*(h2-h1) #heat transfer for this process in kJ\n",
- "P=400 #pressure inside cylinder in kPa\n",
- "v2=0.6548 #specific enthalpy in m^3/kg\n",
- "W=m*P*(v2-v1) #work done for the process in kJ\n",
- "print\"\\n hence, work done for the process is\",round(W),\"kJ\" \n",
- "print\"\\n and heat transfer is \",round(Q,1),\"kJ\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, work done for the process is 91.0 kJ\n",
- "\n",
- " and heat transfer is 771.1 kJ\n"
- ]
- }
- ],
- "prompt_number": 38
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.8:pg-151"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8\n",
- "#calculating change in enthalpy\n",
- "import math\n",
- "\n",
- "h1=273.2 #specific heat enthalpy for oxygen at 300 K\n",
- "h2=1540.2 #specific heat enthalpy for oxygen at 1500 K\n",
- "T1=300 #initial temperature in K\n",
- "T2=1500 #final temparature in K\n",
- "\n",
- "dh1=h2-h1 #this change in specific heat enthalpy is calculated using ideal gas tables \n",
- "dh3=0.922*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 300K\n",
- "dh4=1.0767*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 900K i.e mean of initial and final temperature\n",
- "print\"\\n Hence,change in specific heat enthalpy if ideal gas tables are used is \",round(dh1,1),\"kJ/kg\"\n",
- "print\"\\n if specific heat is assumed to be constant and using its value at T1 is\",round(dh3,1),\"kJ/kg\"\n",
- "print\"\\n if specific heat is assumed to be constant at its value at (T1+T2)/2 is\",round(dh4,1),\"kJ/kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Hence,change in specific heat enthalpy if ideal gas tables are used is 1267.0 kJ/kg\n",
- "\n",
- " if specific heat is assumed to be constant and using its value at T1 is 1106.4 kJ/kg\n",
- "\n",
- " if specific heat is assumed to be constant at its value at (T1+T2)/2 is 1292.0 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.9:pg-152"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9\n",
- "#determining amount of heat transfer\n",
- "\n",
- "P=150 #pressure of nitrogen in cylinder in kPa\n",
- "V=0.1 #initial volume of cylinder in m^3\n",
- "T1=25 #initial temperature of nitrogen in celsius\n",
- "T2=150 #final tempareture of nitrogen in celsius\n",
- "R=0.2968 #in kJ/kg-K\n",
- "m=P*V/(R*(T1+273)) #mass of nitrogen in kg\n",
- "Cv=0.745 #constant volume specific heat for nitrogen in kJ/kg-K\n",
- "W=-20 #work done on nitrogen gas in kJ\n",
- "Q=m*Cv*(T2-T1)+W #heat transfer during the process in kJ\n",
- "print\"\\n hence,the heat transfer for the above process is\",round(Q,1),\"kJ\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the heat transfer for the above process is -4.2 kJ\n"
- ]
- }
- ],
- "prompt_number": 43
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.10:pg-155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10\n",
- "#calculating rate of increase of internal energy\n",
- "\n",
- "W=-12.8*20 #power consumed in J/s\n",
- "Q=-10 #heat transfer rate from battery in J/s\n",
- "r=Q-W #rate of increase of internal energy\n",
- "print\"\\n hence,the rate of increase of internal energy is\",round(r),\"J/s\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the rate of increase of internal energy is 246.0 J/s\n"
- ]
- }
- ],
- "prompt_number": 45
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.11:pg-155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11\n",
- "#rate of change of temperature\n",
- "\n",
- "Q=1500.0 #power produced by burning wood in J/s\n",
- "mair=1 #mass of air in kg\n",
- "mwood=5 #mass of soft pine wood in kg \n",
- "miron=25 #mass of cast iron in kg\n",
- "Cvair=0.717 #constant volume specific heat for air in kJ/kg\n",
- "Cwood=1.38 #constant volume specific heat for wood in kJ/kg\n",
- "Ciron=0.42 #constant volume specific heat for iron in kJ/kg\n",
- "dT=75-20 #increase in temperature in Celsius\n",
- "T=(Q/1000)/(mair*Cvair+mwood*Cwood+miron*Ciron) #rate of change of temperature in K/s\n",
- "dt=(dT/T)/60 #in minutes\n",
- "print\" hence,the rate of change of temperature is\",round(T,4),\"k/s\" \n",
- "print\" and time taken to reach a temperature of T is\",round(dt),\"min\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " hence,the rate of change of temperature is 0.0828 k/s\n",
- " and time taken to reach a temperature of T is 11.0 min\n"
- ]
- }
- ],
- "prompt_number": 49
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter6.ipynb deleted file mode 100755 index 2548c7ee..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter6.ipynb +++ /dev/null @@ -1,566 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:084379625b3dc39247a3be2201f659a82e58d8004d66338e0ef15cb00bca073d"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter6:FIRST-LAW ANALYSIS FOR A CONTROL VOLUME"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.1:pg-182"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#calculating mass flow rate in kg/s\n",
- "import math\n",
- "R=0.287 #in kJ/kg-K\n",
- "T=25 #temperature in celsius\n",
- "P=150 #pressure in kPa\n",
- "v=R*(T+273.15)/P #specific volume in m^3/kg\n",
- "D=0.2 #diameter of pipe in metre\n",
- "A=math.pi*D**2/4 #cross sectional area in m^2\n",
- "V=0.1 #velocity of air in m/s\n",
- "m=V*A/v #mass flow rate in kg/s\n",
- "print\"\\n hence,the mass flow rate is\",round(m,4),\"kg/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the mass flow rate is 0.0055 kg/s\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.2:pg-184"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#work done for adding the fluid\n",
- "\n",
- "P=600 #pressure in kPa\n",
- "m=1 #in kg\n",
- "v=0.001 #specific volume in m^3/kg\n",
- "W=P*m*v #necessary work in kJ for adding the fluid \n",
- "print\" \\n hence,the work involved in this process is\",round(W,4),\"kJ\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " hence,the work involved in this process is 0.6 kJ\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.3:pg-188"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#rate of flow of water\n",
- "\n",
- "hir=441.89 #in kJ/kg for refrigerant using steam table \n",
- "her=249.10 #in kJ/kg for refrigerant using steam table\n",
- "hiw=42 #in kJ/kg for water using steam table\n",
- "hew=83.95 #in kJ/kg for water using steam table\n",
- "mr=0.2 #the rate at which refrigerant enters the condenser in kg/s\n",
- "mw=mr*(hir-her)/(hew-hiw) #rate of flow of water in kg/s\n",
- "print\"\\n hence,the rate at which cooling water flows thorugh the condenser is\",round(mw,3),\"kg/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the rate at which cooling water flows thorugh the condenser is 0.919 kg/s\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.4:pg-190"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#determining quality of steam\n",
- "\n",
- "hi=2850.1 #initial specific heat enthalpy for steam in kJ/kg\n",
- "Vi=50 #initial velocity of steam in m/s\n",
- "Ve=600 #final velocity of steam in m/s\n",
- "he=hi+Vi**2/(2*1000)-Ve**2/(2*1000) #final specific heat enthalpy for steam in kJ/kg\n",
- "hf=467.1 #at final state in kJ/kg\n",
- "hfg=2226.5 #at final state in kJ/kg\n",
- "xe=(he-hf)/hfg #quality of steam in final state\n",
- "print\" \\n hence, the quality is\",round(xe,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " hence, the quality is 0.99\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.5:pg-193"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#quality of ammonia leaving expansion valve\n",
- "\n",
- "hi=346.8 #specific heat enthalpy for ammonia at initial state in kJ/kg\n",
- "he=hi #specific heat enthalpy for ammonia at final state will be equal that at initial state because it is a throttling process\n",
- "hf=134.4 #at final state in kJ/kg\n",
- "hfg=1296.4#at final state in kJ/kg\n",
- "xe=(he-hf)*100/hfg #quality at final state\n",
- "print\"\\n hence,quality of the ammonia leaving the expansion valve is\",round(xe,2),\"%\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,quality of the ammonia leaving the expansion valve is 16.38 %\n"
- ]
- }
- ],
- "prompt_number": 23
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.6:pg-194"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#power output of turbine in kW\n",
- "\n",
- "hi=3137 #initial specific heat of enthalpy in kJ/kg\n",
- "he=2675.5 #final specific heat of enthalpy in kJ/kg\n",
- "Vi=50.0 #initial velocity of steam in m/s\n",
- "Ve=100 #final velocity of steam in m/s\n",
- "Zi=6 #height of inlet conditions in metres\n",
- "Ze=3 #height of exit conditions in metres\n",
- "m=1.5 #mass flow rate of steam in kg/s\n",
- "g=9.8066 #acc. due to gravity in m/s^2\n",
- "Qcv=-8.5 #heat transfer rate from turbine in kW\n",
- "Wcv=Qcv+m*(hi+Vi**2/(2*1000)+g*Zi/1000)-m*(he+Ve**2/(2*1000)+g*Ze/1000) #power output of turbine in kW\n",
- "print\"\\n hence,the power output of the turbine is\",round(Wcv,1),\"kW\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the power output of the turbine is 678.2 kW\n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.7:pg-196"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#heat transfer rate in aftercooler\n",
- "\n",
- "V1=0 #we assume initial velocity to be zero because its given that it enters with a low velocity\n",
- "V2=25.0 #final velocity with which carbon dioxide exits in m/s\n",
- "h2=401.52 #final specific enthalpy of heat when carbon dioxide exits in kJ/kg\n",
- "h1=198 #initial specific enthalpy of heat in kJ/kg\n",
- "w=h1-h2-V2**2/(2*1000) #in kJ/kg\n",
- "Wc=-50 #power input to the compressor in kW\n",
- "m=Wc/w #mass flow rate of carbon dioxide in kg/s\n",
- "h3=257.9 #final specific enthalpy of heat when carbon dioxide flows into a constant pressure aftercooler\n",
- "Qcool=-m*(h3-h2) #heat transfer rate in the aftercooler in kW\n",
- "print\" \\n hence,heat transfer rate in the aftercooler is\",round(Qcool,1),\"kW\" \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " hence,heat transfer rate in the aftercooler is 35.2 kW\n"
- ]
- }
- ],
- "prompt_number": 30
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.8:pg-197"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8\n",
- "#Required pump work\n",
- "\n",
- "m=1.5 #mass flow rate of water in kg/s\n",
- "g=9.807 #acceleration due to gravity in m/s^2\n",
- "Zin=-15 #depth of water pump in well in metres\n",
- "Zex=0 #in metres\n",
- "v=0.001001 #specific volume in m^3/kg\n",
- "Pex=400+101.3 #exit pressure in kPa\n",
- "Pin=90 #in kPa\n",
- "W=m*(g*(Zin-Zex)*0.001-(Pex-Pin)*v) #power input in kW\n",
- "print\" \\n Hence, the pump requires power of input is\",-round(W,2),\"kW\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " Hence, the pump requires power of input is 0.84 kW\n"
- ]
- }
- ],
- "prompt_number": 39
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.9:pg-198"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9\n",
- "#heat tranfer in simple steam power plant\n",
- "\n",
- "h1=3023.5 #specific heat of enthalpy of steam leaving boiler in kJ/kg\n",
- "h2=3002.5 #specific heat of enthalpy of steam entering turbine in kJ/kg\n",
- "x=0.9 #quality of steam entering condenser\n",
- "hf=226 #in kJ/kg\n",
- "hfg=2373.1 #in kJ/kg\n",
- "h3=hf+x*hfg #specific heat of enthalpy of steam entering condenser in kJ/kg\n",
- "h4=188.5 #specific heat of enthalpy of steam entering pump in kJ/kg\n",
- "q12=h2-h1 #heat transfer in line between boiler and turbine in kJ/kg\n",
- "w23=h2-h3 #turbine work in kJ/kg\n",
- "q34=h4-h3 #heat transfer in condenser\n",
- "w45=-4 #pump work in kJ/kg\n",
- "h5=h4-w45 #in kJ/kg\n",
- "q51=h1-h5 #heat transfer in boiler in kJ/kg\n",
- "print\"\\n hence, heat transfer in line between boiler and turbine is\",round(q12,1),\"kJ/kg\" \n",
- "print\"\\n hence, turbine work is\",round(w23,1),\"kJ/kg\" \n",
- "print\"\\n hence, heat transfer in condenser is \",round(q34,1),\"kJ/kg\" \n",
- "print\"\\n hence, heat transfer in boiler is \",round(q51,1),\"kJ/kg\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, heat transfer in line between boiler and turbine is -21.0 kJ/kg\n",
- "\n",
- " hence, turbine work is 640.7 kJ/kg\n",
- "\n",
- " hence, heat transfer in condenser is -2173.3 kJ/kg\n",
- "\n",
- " hence, heat transfer in boiler is 2831.0 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 43
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.10:pg-200"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10\n",
- "#analysis of refrigerator\n",
- "\n",
- "hf4=167.4 #in kJ/kg\n",
- "hfg4=215.6 #in kJ/kg\n",
- "h3=241.8 #specific heat of enthalpy of R-134a entering expansion valve\n",
- "h4=h3 #specific heat of enthalpy of R-134a leaving expansion valve\n",
- "h1=387.2 #in kJ/kg\n",
- "h2=435.1 #in kJ/kg\n",
- "x4=(h3-hf4)/hfg4 #quality of R-134a at evaporator inlet\n",
- "m=0.1 #mass flow rate in kg/s\n",
- "Qevap=m*(h1-h4) #rate of heat transfer to the evaporator\n",
- "Wcomp=-5 #power input to compressor in kW\n",
- "Qcomp=m*(h2-h1)+Wcomp #rate of heat transfer from compressor\n",
- "print\"\\n hence, the quality at the evaporator inlet is \",round(x4,3), \n",
- "print\"\\n hence, the rate of heat transfer to the evaporator is \",round(Qevap,2),\n",
- "print\"\\n hence, rate of heat transfer from the compressor is\",round(Qcomp,2), "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, the quality at the evaporator inlet is 0.345 \n",
- " hence, the rate of heat transfer to the evaporator is 14.54 \n",
- " hence, rate of heat transfer from the compressor is -0.21\n"
- ]
- }
- ],
- "prompt_number": 45
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.11:pg-204"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11\n",
- "#Determining the final temperature of steam\n",
- "\n",
- "u2=3040.4 #final internal energy in kJ/kg\n",
- "hi=u2 #in kJ/kg\n",
- "P2=1.4 #final Pressure in MPa\n",
- "print\"Since, the final pressure is given as 1.4 MPa,we know two properties at the final state and hence,final state can be determined.The temperature corresponding to a pressure of 1.4 MPa and an internal energy of 3040.4 kJ/kg is found to be \"\n",
- "T2=452 #final temperature in Celsius"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Since, the final pressure is given as 1.4 MPa,we know two properties at the final state and hence,final state can be determined.The temperature corresponding to a pressure of 1.4 MPa and an internal energy of 3040.4 kJ/kg is found to be \n"
- ]
- }
- ],
- "prompt_number": 46
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.12:pg-206"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12\n",
- "#Calculating mass flow of steam in tank\n",
- "\n",
- "V1=0.4 #initial volume fo tank in m^3\n",
- "v1=0.5243 #initial specific volume in m^3/kg\n",
- "h1=3040.4 #initial specific enthalpy in kJ/kg\n",
- "u1=2548.9 #initial specific internal energy in kJ/kg\n",
- "m1=V1/v1 #initial mass of steam in tank in kg\n",
- "V2=0.4 #final volume in m^3\n",
- "print\"let x=V*(h1-u2)/v2-m1*(h1-u1).If we assume T2=300C, then v2=0.1823m^3/kg ,u2=2785.2kJ/kg and x=+ve.If we assume T2=350C,then v2=0.2003 m^3/kg, u2=2869.1kJ/kg and x=-ve.Hence,actualt T2 must be between these two assumed values in order that x=0.By interplotation\" \n",
- "T2=342 #final temperature in Celsius\n",
- "v2=0.1974 #final specific volume in m^3/kg\n",
- "m2=V2/v2 #final mass of the steam in the tank in kg\n",
- "m=m2-m1 #mass of steam that flowsinto the tank\n",
- "print\" \\n Hence,mass of the steam that flows into the tank is\",round(m,3),\"kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "let x=V*(h1-u2)/v2-m1*(h1-u1).If we assume T2=300C, then v2=0.1823m^3/kg ,u2=2785.2kJ/kg and x=+ve.If we assume T2=350C,then v2=0.2003 m^3/kg, u2=2869.1kJ/kg and x=-ve.Hence,actualt T2 must be between these two assumed values in order that x=0.By interplotation\n",
- " \n",
- " Hence,mass of the steam that flows into the tank is 1.263 kg\n"
- ]
- }
- ],
- "prompt_number": 48
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.13:pg-207"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13\n",
- "#Calculating mass flow of steam in tank\n",
- "\n",
- "vf1=0.001725 #in m^3/kg\n",
- "vf2=0.0016 #in m^3/kg\n",
- "uf1=368.7 #in kJ/kg\n",
- "uf2=226 #in kJ/kg\n",
- "vg1=0.08313 #in m^3/kg\n",
- "vfg2=0.20381\n",
- "ug1=1341 #in kJ/kg\n",
- "ufg2=1099.7 #in kJ/kg\n",
- "Vf=1 #initial volume of liquid in m^3\n",
- "Vg=1 #initial volume of vapor in m^3\n",
- "mf1=Vf/vf1 #initial mass of liquid in kg\n",
- "mg1=Vg/vg1 #initial mass of vapor in kg\n",
- "m1=mf1+mg1 #initial mass of liquid in kg\n",
- "he=1461.1 #in kJ/kg\n",
- "V=2 #volume of tank in m^3\n",
- "print\"m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.00160+0.20381*x2) and u2=uf2+x2*ufg2=226.0+1099.7*x2.\"\n",
- "print\"Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\"\n",
- "x2=((2*1461.1)-(2*226)-(0.00160*634706))/((634706*0.20381)+(2*1099.7)) #quality of ammonia\n",
- "v2=0.00160+(0.20381*x2) #final specific volume in m^3/kg\n",
- "m2=V/v2 #final mass of ammonia in kg\n",
- "m=m1-m2 #mass of ammonia withdrawn\n",
- "print\" \\n Hence,mass of ammonia withdrawn is\",round(m,1),\"kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "m1u1=mf1*uf1+mg1*ug1.If x2 is the quality,then m2=V/v2=2/(0.00160+0.20381*x2) and u2=uf2+x2*ufg2=226.0+1099.7*x2.\n",
- "Also,m2*(he-u2)=m1*he-m1u1.From this equation,we will get an equation for x2.\n",
- " \n",
- " Hence,mass of ammonia withdrawn is 72.7 kg\n"
- ]
- }
- ],
- "prompt_number": 50
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter7.ipynb b/Fundamentals_Of_Thermodynamics/Chapter7.ipynb deleted file mode 100755 index 8b49a808..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter7.ipynb +++ /dev/null @@ -1,188 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:eaab49a206212133280afcf75d94d2c8dc077f30ee178c5c537c49bf39ade08a"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter7:THE SECOND LAW OF THERMODYNAMICS"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.1:pg-241"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#rate of fuel consumption\n",
- "\n",
- "W=136*0.7355 #output of automobile engine in kW\n",
- "neng=0.3 #thermal efficiency of automobile engine\n",
- "Qh=W/neng #energy output of fuel in kW\n",
- "Q1=Qh-W #total rate of energy rejected to the ambient\n",
- "qh=35000.0 #energy output of fuel in kJ/kg\n",
- "m=Qh/qh #rate of fuel consumption in kg/s\n",
- "print\"\\n hence,total rate of energy rejected is\",round(Q1),\"kW\" \n",
- "print\"\\n and rate of fuel consumption is\",round(m,4),\"kg/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,total rate of energy rejected is 233.0 kW\n",
- "\n",
- " and rate of fuel consumption is 0.0095 kg/s\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.2:pg-243"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#coefficient of performance of refrigerator\n",
- "\n",
- "Qh=400 #heat rejected to kitchen air in W\n",
- "W=150.0 #electrical input power in W\n",
- "Q1=Qh-W #rate of energy taken out to cold space in W\n",
- "B=Ql/W #coefficicent of performnace of refrigerator\n",
- "print\"\\n hence,rate of energy taken out of the cold space is\",round(Q1),\"W\"\n",
- "print\"\\n and coefficient of performance of the refrigerator is\",round(B,2),"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,rate of energy taken out of the cold space is 250.0 W\n",
- "\n",
- " and coefficient of performance of the refrigerator is 1.67\n"
- ]
- }
- ],
- "prompt_number": 22
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.4:pg-260"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#comparison of ideal carnot heat engine with actual heat engine\n",
- "\n",
- "Qh=1000.0 #rate of heat transfer to heat engine in kW\n",
- "W=450.0 #rate of production of work in kW\n",
- "Ql=Qh-W #rate of heat rejected by heat engine in kW\n",
- "nthermal=W/Qh #efficiency from the definition of efficiency\n",
- "Tl=300 #temperature of surroundings in K\n",
- "Th=550.0 #temperature of heat source in Celsius\n",
- "ncarnot=1-Tl/(Th+273.15) #efficiency if heat engine is considered to be ideal carnot heat engine\n",
- "W2=ncarnot*Qh #rate of work production if heat engine is assumed to be ideal carnot heat engine in kW\n",
- "Q12=Qh-W2 #rate of heat rejected by heat engine in kW if heat engine is assumed to be ideal carnot heat engine\n",
- "print\"\\n hence,energy discarded to the ambient surroundings iS\",round(Q12,4),\"kw\"\n",
- "print\"\\n and the engine efficiency is\",round(ncarnot,4),"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,energy discarded to the ambient surroundings iS 364.4536 kw\n",
- "\n",
- " and the engine efficiency is 0.6355\n"
- ]
- }
- ],
- "prompt_number": 53
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.5:pg-261"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#calculating required work\n",
- "\n",
- "Tl=24+273.15 #room temperature in Kelvins\n",
- "Th=35+273.15 #atmospheric temperature in Kelvins\n",
- "Ql=4 #rate of heat rejection from room\n",
- "B=Tl/(Th-Tl) #coefficient of performance of air conditioner\n",
- "W=Ql/B #required work in kW\n",
- "print\"\\n hence,the magnitude of reqiured work is\",round(W,2),\"kw\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the magnitude of reqiured work is 0.15 kw\n"
- ]
- }
- ],
- "prompt_number": 40
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter8.ipynb b/Fundamentals_Of_Thermodynamics/Chapter8.ipynb deleted file mode 100755 index b1b6e75a..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter8.ipynb +++ /dev/null @@ -1,452 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:e95f45030ec153dab9aa085b0a83755a3b429532b4c58448d37853e1ca968b64"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter8:ENTROPY"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.1:pg-290"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#coefficient of performance of refrigerator\n",
- "\n",
- "Th=60 #temperature at which heat is rejected from R-134a\n",
- "Tl=0 #temperature at which heat is absorbed into the R-134a \n",
- "s1=1.7262 #specific entropy at 0 Celsius\n",
- "s2=s1 #process of state change from 1-2 is isentropic \n",
- "s3=1.2857 #specific entropy at 60 celsius\n",
- "s4=s3 #process of state change from 3-4 is isentropic\n",
- "print\"if Pressure is 1400 kPa,then s=1.7360 kJ/kg-K and if P=1600 kPa,then s=1.7135 kJ/kg-K.Therefore\"\n",
- "P2=1400+(1600-1400)*(1.7262-1.736)/(1.7135-1.736) #pressure after compression in kPa\n",
- "B=(Th+273.15)/(Th-Tl) #coefficient of performance of refrigerator\n",
- "print\" \\n hence,pressure after compression is \",round(P2,1),\"kPa\"\n",
- "print\"\\n and coefficient of performance of refrigerator is\",round(B,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "if Pressure is 1400 kPa,then s=1.7360 kJ/kg-K and if P=1600 kPa,then s=1.7135 kJ/kg-K.Therefore\n",
- " \n",
- " hence,pressure after compression is 1487.1 kPa\n",
- "\n",
- " and coefficient of performance of refrigerator is 5.55\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.2:pg-290"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2 \n",
- "#heat transfer in a given process\n",
- "\n",
- "u1=87.94 #specific internal energy of R-12 at state 1 in kJ/kg\n",
- "u2=276.44 #specific internal energy of R-12 at state 2 in kJ/kg\n",
- "s1=0.3357 #specific entropy at state 1 in kJ/kg-K\n",
- "s2=1.2108 #specific entropy at state 2 in kJ/kg-K\n",
- "V=0.001 #volume of saturated liquid in m^3\n",
- "v1=0.000923 #specific volume in m^3/kg\n",
- "m=V/v1 #mass of saturated liquid in kg\n",
- "T=20 #temperature of liquid in celsius\n",
- "Q12=m*(T+273.15)*(s2-s1) #heat transfer in kJ to accomplish the process\n",
- "W12=m*(u1-u2)+Q12 #work required to accomplish the process\n",
- "print\" \\n hence,work required to accomplish the process is\",round(W12,1),\"KJ\"\n",
- "print\" \\n and heat transfer is\",round(Q12,1),\"KJ\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " hence,work required to accomplish the process is 73.7 KJ\n",
- " \n",
- " and heat transfer is 277.9 KJ\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.3:pg-293"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#entropy change\n",
- "import math\n",
- "C=4.184 # specific heat of water in kJ/kg-K\n",
- "T1=20 #initial temperature of water in celsius\n",
- "T2=90 #final temperature of water in celsius\n",
- "dS1=C*math.log((T2+273.2)/(T1+273.2)) #change in entropy in kJ/kg-K\n",
- "dS2=1.1925-0.2966 #in kJ/kg-K using steam tables\n",
- "print\"\\n hence,change in entropy assuming constant specific heat is\",round(dS1,4),\"KJ/kg-k\" \n",
- "print\"\\n using steam table is\",round(dS2,4),\"KJ/kg-k\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,change in entropy assuming constant specific heat is 0.8958 KJ/kg-k\n",
- "\n",
- " using steam table is 0.8959 KJ/kg-k\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.4:pg-295"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#entropy change with different assumptions\n",
- "import math\n",
- "T1=300 #initial temperature in kelvins\n",
- "T2=1500 #final temperature in kelvins\n",
- "P1=200.0 #initial pressure in kPa\n",
- "P2=150.0 #final pressure in kPa\n",
- "R=0.2598 # in kJ/kg-K\n",
- "Cp=0.922 #specific heat in kJ/kg-K at constant pressure\n",
- "dsT2=8.0649 #in kJ/kg-K\n",
- "dsT1=6.4168 #in kJ/kg-K\n",
- "dS1=dsT2-dsT1-R*math.log(P2/P1) #entropy change calculated using ideal gas tables\n",
- "dS3=Cp*math.log(T2/T1)-R*math.log(P2/P1) #entropy change assuming constant specific heat in kJ/kg-K\n",
- "dS4=1.0767*math.log(T2/T1)+0.0747 #entropy change assuming specific heat is constant at its value at 990K\n",
- "print\"\\n hence,change in entropy using ideal gas tables is\",round(dS1,4),\"KJ/kg-k\"\n",
- "print\"\\n hence,change in entropy using the value of specific heat at 300K is\",round(dS3,4),\"KJ/kg-k\"\n",
- "print\"\\n hence,change in entropy assuming specific heat is constant at its value at 900K is \",round(dS4,4),\"KJ/kg-k\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,change in entropy using ideal gas tables is 1.7228 KJ/kg-k\n",
- "\n",
- " hence,change in entropy using the value of specific heat at 300K is 1.5586 KJ/kg-k\n",
- "\n",
- " hence,change in entropy assuming specific heat is constant at its value at 900K is 1.8076 KJ/kg-k\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.5:pg-296\n"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#entropy change\n",
- "import math\n",
- "Cp=1.004 #specific heat at constant pressure in kJ/kg-K\n",
- "R=0.287 #gas constant in kJ/kg-K\n",
- "P1=400.0 #initial pressure in kPa\n",
- "P2=300.0 #final pressure in kPa\n",
- "T1=300 #initial temperature in K\n",
- "T2=600 #final temperature in K\n",
- "dS1=Cp*math.log(T2/T1)-R*math.log(P2/P1) #entropy change assuming constant specific heat\n",
- "s1=6.8693 #specific entropy at T1\n",
- "s2=7.5764 #specific entropy at T2\n",
- "dS2=s2-s1-R*math.log(P2/P1) #entropy change assuming variable specific heat\n",
- "print\"\\n hence,entropy change assuming constant specific heat is\",round(dS1,4),\"KJ/kg-k\" \n",
- "print\"\\n and assuming variable specific heat is\",round(dS2,4),\"KJ/kg-k\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,entropy change assuming constant specific heat is 0.7785 KJ/kg-k\n",
- "\n",
- " and assuming variable specific heat is 0.7897 KJ/kg-k\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.6:pg-297"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#work done by air\n",
- "import math\n",
- "T1=600 #initial temperature of air in K\n",
- "P1=400.0 #intial pressure of air in kPa\n",
- "P2=150.0 #final pressure in kPa\n",
- "u1=435.10 #specific internal energy at temperature T1 in kJ/kg\n",
- "sT1=7.5764 #specific entropy at temperature T1 in kJ/kg-K\n",
- "R=0.287 #gas constant in kJ/kg-K\n",
- "ds=0\n",
- "sT2=ds+sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n",
- "print\"we know the values of s and P for state 2.So,in order to fully determine the state,we will use steam table\"\n",
- "T2=457 #final temperature in K\n",
- "u2=328.14 #specific internal energy at temperature T2 in kJ/kg\n",
- "w=u1-u2 #work done by air in kJ/kg\n",
- "print\"\\n hence,work done by air is\",round(w,4),\"KJ/kg\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "we know the values of s and P for state 2.So,in order to fully determine the state,we will use steam table\n",
- "\n",
- " hence,work done by air is 106.96 KJ/kg\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.7:pg-300"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#work and heat transfer\n",
- "\n",
- "P2=500 #final pressure in cylinder in kPa\n",
- "P1=100 #initial pressure in cylinder in kPa\n",
- "T1=20+273.2 #initial temperature inside cylinder in Kelvins\n",
- "n=1.3 \n",
- "T2=(T1)*(P2/P1)**((n-1)/n) #final temperature inside cylinder in K\n",
- "R=0.2968 #gas constant in kJ/kg-K\n",
- "w12=R*(T2-T1)/(1-n) #work in kJ/kg\n",
- "Cvo=0.745 #specific heat at constant volume in kJ/kg-K\n",
- "q12=Cvo*(T2-T1)+w12 #heat transfer in kJ/kg\n",
- "print\" \\n hence,work done is\",round(w12,2),\"KJ/kg\" \n",
- "print\"\\n and heat transfer are\",round(q12,1),\"KJ/kg\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " hence,work done is -130.47 KJ/kg\n",
- "\n",
- " and heat transfer are -32.2 KJ/kg\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.8:pg-308"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#calculating increase in entropy\n",
- "\n",
- "m=1 #mass of saturated water vapour\n",
- "sfg=6.0480 #in kJ/K\n",
- "T=25 #temperature of surrounding air in celsius\n",
- "dScm=-m*sfg #change in entropy of control mass in kJ/K\n",
- "hfg=2257.0 #in kJ/kg\n",
- "Qtosurroundings=m*hfg #heat transferred to surroundings in kJ\n",
- "dSsurroundings=Qtosurroundings/(T+273.15) #in kJ/K\n",
- "dSnet=dScm+dSsurroundings #net increase in entropy in kJ/K\n",
- "print\" hence,net increase in entropy of water plus surroundings is \",round(dSnet,3),\"KJ/k\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " hence,net increase in entropy of water plus surroundings is 1.522 KJ/k\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.9:pg-309"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9\n",
- "#entropy generation\n",
- "\n",
- "Qout=1.0 #value of heat flux generated by 1kW of electric power\n",
- "T=600.0 #temperature of hot wire surface in K\n",
- "Sgen=Qout/T #entropy generation in kW/K\n",
- "print\"\\n hence,entropy generation is\",round(Sgen,5),\"KW/k\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,entropy generation is 0.00167 KW/k\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.10:pg-310"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10\n",
- "#Determiining the entropy generated\n",
- "\n",
- "B=4.0#COP of air conditioner\n",
- "W=10.0 #power input of air conditioner in kW\n",
- "Qh=B*W #in kW\n",
- "Ql=Qh-W #in kW\n",
- "Thigh=323 #in Kelvin\n",
- "Tlow=263 #in Kelvin\n",
- "SgenHP=(Qh*1000/Thigh)-(Ql*1000/Tlow) #in W/K\n",
- "Tl=281 # in K\n",
- "Th=294 #in K\n",
- "SgenCV1=Ql*1000/Tlow-Ql*1000/Tl #in W/K\n",
- "SgenCV2=Qh*1000/Th-Qh*1000/Thigh #in W/K\n",
- "SgenTOT=SgenCV1+SgenCV2+SgenHP #in W/K\n",
- "print\" \\n Hence,Total entropy generated is\",round(SgenTOT,1),\"W/k\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " Hence,Total entropy generated is 29.3 W/k\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter9.ipynb b/Fundamentals_Of_Thermodynamics/Chapter9.ipynb deleted file mode 100755 index c1f858fc..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter9.ipynb +++ /dev/null @@ -1,519 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:7638f00c0629ff24b9e3c96e6eb43a103a0583de57d4e01375fbb8aa638bef10"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter9:SECOND-LAW ANALYSIS FOR A CONTROL VOLUME"
- ]
- },
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Ex9.1:pg-336"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#work done by steam\n",
- "\n",
- "hi=3051.2 #initial specific heat of enthalpy of steam in kJ/kg\n",
- "si=7.1228 #initial specific entropy of steam in kJ/kg-K\n",
- "Pe=0.15 #final pressure in MPa\n",
- "se=si #specific entropy in final state in kJ/kg-K\n",
- "sf=1.4335 #in kJ/kg-K\n",
- "sfg=5.7897 #in kJ/kg-K\n",
- "vi=50.0 #velocity with which steam enters turbine in m/s\n",
- "ve=200.0 #velocity with which steam leaves the turbine in m/s\n",
- "xe=(se-sf)/sfg #quality of steam in final state\n",
- "hf=467.1 #in kJ/kg\n",
- "hfg=2226.5 #in kJ/kg\n",
- "he=hf+xe*hfg #final specific heat of enthalpy of steam in kJ/kg\n",
- "w=hi+vi**2/(2*1000)-he-ve**2/(2*1000) #work of steam for isentropic process in kJ/kg\n",
- "print\"\\n hence, work per kilogram of steam for this isentropic process is\",round(w,1),\"KJ/kg\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, work per kilogram of steam for this isentropic process is 377.5 KJ/kg\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.2:pg-337"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#exit velocity of steam from nozzle\n",
- "\n",
- "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n",
- "si=7.1228 #initial specific entropy in kJ/kg-K\n",
- "se=si #final specific entropy \n",
- "Pe=0.3 #final pressure in MPa\n",
- "print\"from steam table,various properties at final state are\"\n",
- "he=2780.2 #final specific heat of enthalpy in kJ/kg-K\n",
- "Te=159.1 #final temperature in celsius\n",
- "vi=30.0 #velocity with which steam enters the nozzle in m/s\n",
- "ve=((2*(hi-he)+(vi**2/1000))*1000)**0.5 #final velocity of steam with which it exits in m/s\n",
- "print\"\\n hence,exit velocity of the steam from the nozzle is\",round(ve),\"m/s\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "from steam table,various properties at final state are\n",
- "\n",
- " hence,exit velocity of the steam from the nozzle is 737.0 m/s\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.3:pg-340"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#violation of second law\n",
- "\n",
- "print\"from R-134a tables\"\n",
- "se=1.7148 #specific entropy in final state in kJ/kg-K\n",
- "si=1.7395 #initial specific entropy in kJ/kg-K \n",
- "print\"therefore,se<si,whereas for this process the second law requires that se>=si.The process described involves a violation of the second law and thus would be impossible.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "from R-134a tables\n",
- "therefore,se<si,whereas for this process the second law requires that se>=si.The process described involves a violation of the second law and thus would be impossible.\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.4:pg-340"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#calculating required specific work\n",
- "\n",
- "Cp=1.004 #specific heat of air at constant pressure in kJ/kg-K\n",
- "Ti=290 #initial temperature in kelvins\n",
- "Pi=100 #initial pressure in kPa\n",
- "Pe=1000 #final pressure in kPa\n",
- "k=1.4 \n",
- "Te=Ti*(Pe/Pi)**((k-1)/k) #final temperature in kelvins\n",
- "we=Cp*(Ti-Te) #required specific work in kJ/kg\n",
- "print\"\\n hence,specific work required is\",round(we),\"kJ/kg\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,specific work required is -271.0 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.5:pg-342"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#entropy generation\n",
- "\n",
- "h1=2865.54 #specific heat of enthalpy at state 1 in kJ/kg\n",
- "h2=83.94 #specific heat of enthalpy at state 2 in kJ/kg\n",
- "h3=2725.3 #specific heat of enthalpy at state 3 in kJ?kg\n",
- "s1=7.3115 #specific entropy at state 1 in kJ/kg-K\n",
- "s2=0.2966 #specific entropy at state 2 in kJ/kg-K\n",
- "s3=6.9918 #specific entropy at state 3in kJ/kg-K\n",
- "m1=2 #mass flow rate at state 1 in kg/s\n",
- "m2=m1*(h1-h3)/(h3-h2) #mass flow rate at state 2 in kg/s\n",
- "m3=m1+m2 #mass flow rate at state 3 in kg/s\n",
- "Sgen=m3*s3-m1*s1-m2*s2 #entropy generation in the process\n",
- "print\"\\n hence,entropy generated in this process is \",round(Sgen,3),\"kW/K\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,entropy generated in this process is 0.072 kW/K\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.6:pg-344"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#work required to fill the tank\n",
- "import math\n",
- "T1=17+273 #initial temperature of tank in Kelvins\n",
- "sT1=6.83521 #specific entropy in kJ/kg-K\n",
- "R=0.287 #gas constant in kJ/kg-K\n",
- "P1=100 #initial pressure in kPa\n",
- "P2=1000 #final pressure in kPa\n",
- "sT2=sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n",
- "T2=555.7 #from interplotation \n",
- "V1=0.04 #volume of tank in m^3\n",
- "V2=V1 #final volume is equal to initial volume\n",
- "m1=P1*V1/(R*T1) #initial mass of air in tank in kg\n",
- "m2=P2*V2/(R*T2) #final mass of air in tank in kg\n",
- "Min=m2-m1 #in kg\n",
- "u1=207.19 #initial specific heat of enthalpy in kJ/kg\n",
- "u2=401.49 #final specific heat of enthalpy in kJ/kg\n",
- "hin=290.43 #in kJ/kg\n",
- "W12=Min*hin+m1*u1-m2*u2 #work required to fill the tank in kJ\n",
- "print\"\\n hence,the total amount of work required to fill the tank is\",round(W12,1),\"kJ\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the total amount of work required to fill the tank is -31.9 kJ\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.7:pg-347"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#work required to pump water isentropically \n",
- "\n",
- "P1=100 #initial pressure in kPa\n",
- "P2=5000 #final pressure in kPa\n",
- "v=0.001004 #specific volume in m^3/kg\n",
- "w=v*(P2-P1) #work required to pump water isentropically\n",
- "print\"\\n hence,work required to pump water isentropically is \",round(w,2),\"kJ/kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,work required to pump water isentropically is 4.92 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.8:pg-348"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8\n",
- "#Velocity in exit flow\n",
- "\n",
- "print\"From Steam Tables, for liquid water at 20 C\"\n",
- "vf=0.001002 #in m^3/kg\n",
- "v=vf\n",
- "Pi=300 #Line pressure in kPa\n",
- "Po=100 #in kPa\n",
- "Ve=(2*v*(Pi-Po)*1000)**0.5 #velocity in the exit flow\n",
- "print\" \\n Hence, an ideal nozzle can generate upto \",round(Ve),\"m/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "From Steam Tables, for liquid water at 20 C\n",
- " \n",
- " Hence, an ideal nozzle can generate upto 20.0 m/s\n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.9:pg-351"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9\n",
- "#Rate of Entropy Generation\n",
- "\n",
- "print\"From R-410a tables,we get\"\n",
- "hi=280.6 #in kJ/kg\n",
- "he=307.8 #in kJ/kg\n",
- "si=1.0272 #in kJ/kg\n",
- "se=1.0140 #in kJ/kg\n",
- "m=0.08 #flow rate of refrigerant in kg/s\n",
- "P=3 #electrical power input in kW\n",
- "Qcv=m*(he-hi)-P #in kW\n",
- "To=30 #in Celsius\n",
- "Sgen=m*(se-si)-Qcv/(To+273.2) #rate of entropy generation \n",
- "print\"\\n Hence,the rate of entropy generation for this process is\",round(Sgen,5),\"kW/K\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "From R-410a tables,we get\n",
- "\n",
- " Hence,the rate of entropy generation for this process is 0.00166 kW/K\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.10:pg-353"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10\n",
- "#turbine efficiency\n",
- "\n",
- "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n",
- "si=7.1228 #initial specific entropy in kJ/kg-K\n",
- "sf=0.7548 #in kJ/kg-K\n",
- "sfg=7.2536 #in kJ/kg-K\n",
- "ses=si #final specific entropy is same as the initial\n",
- "xes=(si-sf)/sfg #quality of steam when it leaves the turbine\n",
- "hf=225.9 #in kJ/kg\n",
- "hfg=2373.1 #in kJ/kg\n",
- "hes=hf+xes*hfg #final specific heat of enthalpy in kJ/kg\n",
- "ws=hi-hes #work output of turbine calculated ideally in kJ/kg\n",
- "wa=600 #actual work output of turbine in kJ/kg\n",
- "nturbine=wa/ws #efiiciency of turbine \n",
- "print\"\\n hence,efficiency of the turbine is\",round(nturbine*100,1),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,efficiency of the turbine is 80.9 %\n"
- ]
- }
- ],
- "prompt_number": 32
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.11:pg-355"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11\n",
- "#turbine inlet pressure\n",
- "import math\n",
- "hi=1757.3 #initial specific heat of enthalpy of air in kJ/kg\n",
- "si=8.6905 #initial specifc entropy of airin kJ/kg-K\n",
- "he=855.3 #final specific heat of enthalpy of air in kJ/kg\n",
- "w=hi-he #actual work done by turbine in kJ/kg\n",
- "n=0.85 #efficiency of turbine \n",
- "ws=w/n #ideal work done by turbine in kJ/kg\n",
- "hes=hi-ws #from first law of isentropic process\n",
- "Tes=683.7 #final temperature in kelvins from air tables\n",
- "ses=7.7148 #in kJ/kg-K\n",
- "R=0.287 #gas constant in kJ/kg-K\n",
- "Pi=100/math.e**((si-ses)/-R) #turbine inlet pressure in kPa\n",
- "print\"\\n hence,turbine inlet pressure is\",round(Pi),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,turbine inlet pressure is 2995.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 36
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.12:pg-357"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12\n",
- "#required work input\n",
- "\n",
- "Pe=150.0 #final pressure of air in kPa\n",
- "Pi=100.0 #initial presure of air in kPa\n",
- "k=1.4\n",
- "Ti=300.0 #initial temperature of air in kelvis\n",
- "Tes=Ti*(Pe/Pi)**((k-1)/k) #from second law\n",
- "ws=1.004*(Ti-Tes) #from first law of isentropic process\n",
- "n=0.7 #efficiency of automotive supercharger \n",
- "w=ws/n #real work input in kJ/kg\n",
- "Te=Ti-w/1.004 #temperature at supercharger exit in K\n",
- "print\"\\n hence,required work input is \",round(w),\"kJ/kg\"\n",
- "print\"\\n and exit temperature is \",round(Te,1),\"K\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,required work input is -53.0 kJ/kg\n",
- "\n",
- " and exit temperature is 352.6 K\n"
- ]
- }
- ],
- "prompt_number": 44
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/chapter10.ipynb b/Fundamentals_Of_Thermodynamics/chapter10.ipynb deleted file mode 100755 index e985ae83..00000000 --- a/Fundamentals_Of_Thermodynamics/chapter10.ipynb +++ /dev/null @@ -1,474 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:498eddefb3635fb861c09bdd97718d2b72fb04f4d3b083cedbf9f6de28a92b4e"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter10:IRREVERSIBILITY AND AVAILABILITY"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.1:pg-386"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#Calculating reversible work\n",
- "#Form the Steam Tables,the inlet and the exit state properties are \n",
- "\n",
- "hi=171.95 #initial specific heat of enthalpy in kJ/kg\n",
- "si=0.5705 #initial specific entropy in kJ/kg-K\n",
- "se=2.1341 #final specific entropy in kJ/kg-K\n",
- "he=765.34 #final specific heat of enthalpy in kJ/kg-K\n",
- "m=5 #mass flow rate of feedwater in kg/s\n",
- "q1=900/m #heat added by one of the sources in kJ/kg\n",
- "q2=he-hi-q1 #second heat transfer in kJ/kg\n",
- "To=25+273.3 #Temp. of the surroundings in K\n",
- "T1=100+273.2 #temp. of reservoir of one of the source in K\n",
- "T2=200+273.2 #temp. of reservoir of second source in K\n",
- "wrev=To*(se-si)-(he-hi)+q1*(1-To/T1)+q2*(1-To/T2) #reversible work in kJ/kg\n",
- "print\"\\n Hence, the irreversibility is\",round(wrev),\"kJ/kg\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Hence, the irreversibility is 62.0 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.2:pg-387"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#Calculating reversible work\n",
- "#Form the Steam Tables,the inlet and the exit state properties are\n",
- "\n",
- "hi=298.6 #initial specific heat of enthalpy in kJ/kg\n",
- "si=6.8631 #initial specific entropy in kJ/kg-K\n",
- "se=7.4664 #final specific entropy in kJ/kg-K\n",
- "he=544.7 #final specific heat of enthalpy in kJ/kg-K\n",
- "q=-50 #heat lost to surroundings in kJ/kg\n",
- "w=hi-he+q #work in kJ/kg\n",
- "To=25+273.2 #Temp. of the surroundings in K\n",
- "P1=100 #Pressure of ambient air in kPa\n",
- "P2=1000 #Final pressure of air after compression in kPa\n",
- "R=0.287 #Universal gas constant in kJ/kg-K\n",
- "wrev=To*(se-si-R*log(P2/P1))-(he-hi)+q*(1-To/To)#reversible work for the given change of state in kJ/kg\n",
- "i=wrev-w #irreversibility in kJ/kg\n",
- "print\"\\n Hence,the irreversibility is\",round(i,1),\"kJ/kg\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Hence,the irreversibility is 32.8 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.2E:pg-388"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2E\n",
- "#Calculating reversible work\n",
- "#Form the Steam Tables,the inlet and the exit state properties are\n",
- "\n",
- "hi=129.18 #initial specific heat of enthalpy in Btu/lbm\n",
- "si=1.6405 #initial specific entropy in Btu/lbm R\n",
- "se=1.7803 #final specific entropy in Btu/lbm R\n",
- "he=231.20 #final specific heat of enthalpy in Btu/lbm\n",
- "q=-22 #heat lost to surroundings in Btu/lbm\n",
- "w=hi-he+q #work in Btu/lbm\n",
- "To=539.7 #Temp. of the surroundings in R\n",
- "P1=14.7 #Pressure of ambient air in lbf/in^2\n",
- "P2=150 #Final pressure of air after compression in lbf/in^2\n",
- "R=0.06855 #Universal gas constant in Btu/lbm R\n",
- "wrev=To*(se-si-R*log(P2/P1))-(he-hi)+q*(1-To/To)#reversible work for the given change of state in Btu/lbm\n",
- "i=wrev-w #irreversibility in Btu/lbm\n",
- "print\"\\n Hence,the irreversibility is\",round(i,2),\"Btu/lbm\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Hence,the irreversibility is 11.52 Btu/lbm\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.3:pg-390"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#Calculating reversible work and irreversibility\n",
- "#Form the Steam Tables at state 1\n",
- "\n",
- "u1=1243.5 #initial specific internal energy in kJ/kg\n",
- "s1=4.4819 #initial specific entropy in kJ/kg-K\n",
- "v1=28.895 #initial specific volume in m^3/kg\n",
- "v2=2*v1 #final specific volume in kg/m^3\n",
- "u2=u1 #initial specific internal energy in kJ/kg\n",
- "#These two independent properties, v2 and u2 , fix state 2.The final temp. is calculated by interplotation using the data for T2=5C and v2,x=0/3928 and u=948.5 kJ/kg. For T2=10C and v2, x=0.5433 and u=1317 kJ/kg\n",
- "T2=9.1+273.2 #final temp. in K\n",
- "x2=0.513 #quality in final state\n",
- "s2=4.644 #final specific entropy in kJ/kg\n",
- "V1=1 #volume of part of A in m^3\n",
- "m=V1/v1 #mass flow rate in kg/s\n",
- "To=20+273.2 #Room temperature in K\n",
- "Wrev=To*m*(s2-s1) #reversible work in kJ\n",
- "I=Wrev #irreversibility of the process\n",
- "print\"\\n The irreversibility is\",round(I,3),\"kJ\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " The irreversibility is 1.645 kJ\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.4:pg-391"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#calculating the final mass in the tank and the irreversibility in the process\n",
- "#From the ammonia tables, the initial and line state properties are\n",
- "\n",
- "V=1#volume of the rigid tank in m^3\n",
- "v1=0.6995#initial specific volume in m^3/kg\n",
- "u1=1369.5#initial specific internal energy in kJ/kg\n",
- "s1=5.927#initial specific entropy in kJ/kg K\n",
- "h1=134.41#initial specific heat of enthalpy in kJ/kg\n",
- "si=0.5408#in kJ/kg K\n",
- "m1=V/v1#initial mass in kg\n",
- "x2=0.007182\n",
- "v2=(0.001534 + x2 * 0.41684)#in m^3/kg\n",
- "v2=round(v2,7)\n",
- "s2=0.5762#final specific entropy in kJ/kg\n",
- "m2=V/v2#the final mass in kg\n",
- "mi=m2-m1#in kg\n",
- "mi=round(mi,3)\n",
- "T=293.15# in K\n",
- "S2gen=(m2*s2-m1*s1-mi*si)#in kJ/kg\n",
- "S2gen=round(S2gen,3)\n",
- "Icv=T*S2gen#in kJ\n",
- "print\"\\n the final mass is \",round(m2,2),\"kg\"\n",
- "print\"\\n the irreversiblity is\",round(Icv,3),\"kJ\"\n",
- "\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " the final mass is 220.86 kg\n",
- "\n",
- " the irreversiblity is 34.885 kJ\n"
- ]
- }
- ],
- "prompt_number": 31
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.5:pg-396"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#calculating the availability per kilogram of the steam entering and at both points at which steam leaves the turbine,\n",
- "#the isentropic efficiency,the second-law efficiency for this process\n",
- "#For the ideal isentropic turbine,\n",
- "\n",
- "h0=104.9#in kJ/kg\n",
- "s0=0.3674#entropy at state0 in kJ/kgK\n",
- "m1=30#mass at state1 in kg\n",
- "phi1=1109.6#in kJ/kg\n",
- "h1=3115.3#enthalpy at state1 in kJ/kg\n",
- "m2=5#mass at state2 in kg\n",
- "phi2=755.3#in kJ/kg\n",
- "h2=2855.4#enthalpy at state2 For the actual turbine in kJ/kg\n",
- "m3=25#mass at state3 in kg\n",
- "phi3=195.0#in kJ/kg\n",
- "S2s=6.7428#entropy in kJ/kg K at state2\n",
- "x2s=(6.7428-1.8606)/4.906# dryness factor at state2 \n",
- "x2s=round(x2s,4)\n",
- "h2s=640.2+(x2s*2108.5)#entropy at state2 for the ideal isentropic turbine\n",
- "S3s=6.7428#entropy in kJ/kg K\n",
- "x3s=(6.7428-0.7549)/7.2536# dryness factor at state3\n",
- "x3s=round(x3s,4)\n",
- "h3s=225.9+(x3s*2373.1)#enthalpy in kJ/kg\n",
- "h3=2361.8#enthalpy at state3 For the actual turbine in kJ/kg\n",
- "Ws=(m1*h1-m2*h2s-m3*h3s)#workdone for the ideal isentropic turbine in kW\n",
- "W=(m1*h1-m2*h2-m3*h3)#workdone For the actual turbine in kW\n",
- "W2=(m1*phi1-m2*phi2-m3*phi3)#workdone for the second ideal isentropic turbine in kW\n",
- "eta1=W/Ws#The isentropic efficiency\n",
- "eta2=W/W2#he second-law efficiency\n",
- "print\"\\n the workdone for the ideal isentropic turbine is \",round(Ws),\"kW\"\n",
- "print\"\\n the workdone for the actual turbine is \",round(W),\"kg\"\n",
- "print\"\\n the workdone for the second ideal isentropic turbine is \",round(W2),\"kW\"\n",
- "print\"\\n the isentropic efficiency is \",round(eta1,3)\n",
- "print\"\\n the second-law efficiency is \",round(eta2,3)\n",
- "#The answer of the x2s in the book is wrong.\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " the workdone for the ideal isentropic turbine is 25145.0 kW\n",
- "\n",
- " the workdone for the actual turbine is 20137.0 kg\n",
- "\n",
- " the workdone for the second ideal isentropic turbine is 24637.0 kW\n",
- "\n",
- " the isentropic efficiency is 0.801\n",
- "\n",
- " the second-law efficiency is 0.817\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.6:pg-399"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#calculate the second-law efficiency for this process and the irreversibility per kilogram of water evaporated\n",
- "\n",
- "he1=2950#enthalpy in kJ/kg\n",
- "hi1=632.2#enthalpy in kJ/kg\n",
- "he2=599.5#enthalpy in kJ/kg\n",
- "hi2=1199#enthalpy in kJ/kg\n",
- "#r=mp/mh\n",
- "r=(he1-hi1)/(hi2-he2)#the ratio of the mass flow of water\n",
- "T0=298.15#in K\n",
- "S1=1.8418#entropy at state1 in kJ/kgK\n",
- "S2=7.0384#entropy at state2 in kJ/kgK\n",
- "S3=7.8751#entropy at state3 in kJ/kgK\n",
- "S4=7.3173#entropy at state4 in kJ/kgK\n",
- "#phi=phi2-phi1\n",
- "phi=(he1-hi1)-T0*(S2-S1)#The increase in availability of the water is, per kilogram of water in kJ/kg\n",
- "#w=(mp2/mh2)*(phi3-phi4)\n",
- "w=r*((hi2-he2)-T0*(S3-S4))#The decrease in availability of the products, per kilogram of water in kJ/kg\n",
- "eta=phi/w#the second-law efficiency\n",
- "#i=I/mh\n",
- "i=phi+w#the process irreversibility per kilogram of water in kJ/kg\n",
- "#e=I2/mh2\n",
- "e=(T0*(S2-S1)+(T0*r*(S4-S3)))#The total irreversibility in kJ/kg\n",
- "print\"\\n the second law efficiency is \",round(eta,3)\n",
- "print\"\\n the total irreversibility is \",round(e,2),\"kJ/kg\"\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " the second law efficiency is 0.459\n",
- "\n",
- " the total irreversibility is 906.38 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.7:pg-403"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#calculate the heater\u2019s second-law efficiency\n",
- "\n",
- "h0=104.87#enthalpy in kJ/kg\n",
- "s0=0.3673#entropy in kJ/kg K\n",
- "h1=171.97#in kJ/kg\n",
- "he=765.25#in kJ/kg\n",
- "s1=0.5705#in kJ/kg K\n",
- "T0=298.2#in C\n",
- "se=2.1341#in kJ/kg K\n",
- "shi1=(h1-h0)-T0*(s1-s0)#in kJ/kg\n",
- "shie=(he-h0)-T0*(se-s0)#in kJ/kg\n",
- "T1=373.2#in C\n",
- "T2=473.2#in C\n",
- "q1=180#heat at state1 in kJ\n",
- "q2=413.28#heat at state2 in kJ\n",
- "phisource1=(1-T0/T1)*q1#in kJ/kg\n",
- "phisource2=(1-T0/T2)*q2#in kJ/kg\n",
- "phisource=phisource1+phisource2#in kJ/kg\n",
- "Icv=phisource+shi1-shie#in kJ/kg\n",
- "eta2law=(phisource-Icv)/phisource#the heater\u2019s second-law efficiency\n",
- "print\"\\n the heater\u2019s second-law efficiency is\",round(eta2law,2)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " the heater\u2019s second-law efficiency is 0.67\n"
- ]
- }
- ],
- "prompt_number": 53
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.8:pg-404"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8\n",
- "#calculate any heat transfer downward, and follow the flux of exergy, and find the exergy destruction in the process.\n",
- "Qout=500.0#in W\n",
- "Qin=500.0#in W\n",
- "Tsurf=1000.0#in K\n",
- "T0=298.15#in K\n",
- "Sgen1=Qout/Tsurf#in W/K\n",
- "phides=(T0*Sgen1)#in W\n",
- "phitrans=((1-T0/Tsurf)*Qout)#in W\n",
- "Ttop=500#in K\n",
- "Sgen2=(Qout/Ttop)-(Qin/Tsurf)#in W/K\n",
- "Te=phitrans-phides-((1-T0/Ttop)*Qout)#the exergy destruction in the process\n",
- "print\"\\n the exergy destruction in the process is\",round(Te)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " the exergy destruction in the process is 0.0\n"
- ]
- }
- ],
- "prompt_number": 77
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Fundamentals_Of_Thermodynamics/Chapter10.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter10_6.ipynb index 59bbb80a..59bbb80a 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter10.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter10_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter11_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter11_6.ipynb index 814dd14b..814dd14b 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter11_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter11_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter12_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter12_6.ipynb index e2686e4a..e2686e4a 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter12_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter12_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter13_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter13_6.ipynb index 5863fc4c..5863fc4c 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter13_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter13_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter14_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter14_6.ipynb index 8c5a5922..8c5a5922 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter14_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter14_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter15_6.ipynb index 1c9182a7..1c9182a7 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter15_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter16_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter16_6.ipynb index c155fdc6..c155fdc6 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter16_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter16_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter17_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter17_6.ipynb index 11b9507c..11b9507c 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter17_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter17_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter2_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter2_6.ipynb index 08e192fe..08e192fe 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter2_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter2_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter3_6.ipynb index 64998280..64998280 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter3_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter4_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter4_6.ipynb index eed9d20a..eed9d20a 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter4_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter4_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter5_6.ipynb index 5a9734bc..5a9734bc 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter5_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter6_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter6_6.ipynb index 953e821b..953e821b 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter6_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter6_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter7_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter7_6.ipynb index 02425dea..02425dea 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter7_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter7_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter8_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter8_6.ipynb index dce4d1fa..dce4d1fa 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter8_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter8_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter9_6.ipynb index db80c9d5..db80c9d5 100755 --- a/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/Chapter9_6.ipynb diff --git a/Fundamentals_Of_Thermodynamics/README.txt b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/README.txt index f9822be5..f9822be5 100755 --- a/Fundamentals_Of_Thermodynamics/README.txt +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/README.txt diff --git a/Fundamentals_Of_Thermodynamics/screenshots/heat_transfer_6.png b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/heat_transfer_6.png Binary files differindex c7a00e18..c7a00e18 100755 --- a/Fundamentals_Of_Thermodynamics/screenshots/heat_transfer_6.png +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/heat_transfer_6.png diff --git a/Fundamentals_Of_Thermodynamics/screenshots/reversible_work_6.png b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/reversible_work_6.png Binary files differindex d4cf4f76..d4cf4f76 100755 --- a/Fundamentals_Of_Thermodynamics/screenshots/reversible_work_6.png +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/reversible_work_6.png diff --git a/Fundamentals_Of_Thermodynamics/screenshots/velocity_6.png b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/velocity_6.png Binary files differindex 1533cad6..1533cad6 100755 --- a/Fundamentals_Of_Thermodynamics/screenshots/velocity_6.png +++ b/Fundamentals_Of_Thermodynamics_by_B_Claus_And_R_E_Sonntag/screenshots/velocity_6.png diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables_1.ipynb new file mode 100755 index 00000000..25aca7a9 --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables_1.ipynb @@ -0,0 +1,536 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12 High Voltage cables "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_1 pgno403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Radius = cm 4.8\n",
+ "\n",
+ " Inner radial thickness = cm 2.8\n",
+ "\n",
+ " Outer radial thickness = cm 0.2\n",
+ "\n",
+ " Vpeak of outer dielectric = kV 70.0374989883\n",
+ "\n",
+ " Vpeak of inner dielectric = kV 4.89863934243\n",
+ "\n",
+ " Peak voltage of cable = kV 74.9361383307\n",
+ "\n",
+ " Safe opearating voltage = kV 53.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12, Exmaple 1, page 403\n",
+ "#Calculate radial thickness of insulating layer\n",
+ "from math import log\n",
+ "#based on equation 12.15 and v1alues of E1 and E2 \n",
+ "E1 = 40. # kV/cm\n",
+ "E2 = 25. # kV/cm\n",
+ "ep1 = 6. # permittives of the material\n",
+ "ep2 = 4. #permittives of the material\n",
+ "d1 = 4. # cm\n",
+ "d2 = 10. # cm\n",
+ "r1 = 2. # cm\n",
+ "r2 = (E1*ep1*2)/(E2*ep2)\n",
+ "inner = r2-(d1/2)\n",
+ "outer = (d2/2)-r2\n",
+ "#based on equation 12.16\n",
+ "V1peak = E1*r1*log(r2/r1) # inner dielectric\n",
+ "V2peak = E2*r2*log(d2/(2*r2)) # outter dielectric\n",
+ "Vcab = V1peak+V2peak # Peak volatge of cable\n",
+ "rms = Vcab/(2)**0.5\n",
+ "print\"\\n Radius = cm \",r2\n",
+ "print\"\\n Inner radial thickness = cm \",inner\n",
+ "print\"\\n Outer radial thickness = cm\",outer\n",
+ "print\"\\n Vpeak of outer dielectric = kV\", V1peak\n",
+ "print\"\\n Vpeak of inner dielectric = kV\", V2peak\n",
+ "print\"\\n Peak voltage of cable = kV\", Vcab\n",
+ "print\"\\n Safe opearating voltage = kV\", round(rms)\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_2 pgno404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Radius = cm 2.57\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12, Exmaple 2, page 404\n",
+ "#Calculate optimum value of r\n",
+ "\n",
+ "#Based on equation 12.17\n",
+ "V1 = 100 # kV\n",
+ "V2 = 55 # kV\n",
+ "r = V1*(2)**0.5/V2\n",
+ "print\"\\n Radius = cm \",round(r,2)\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_3 pgno406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Resistivity of insulation material = 10**10 ohm/m 4.53\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12, Exmaple 3, page 406\n",
+ "#Calculate resistivity\n",
+ "from math import log,pi\n",
+ "l = 10**4 # cable length in m\n",
+ "Rr = 3/1.5 # R/r ratio\n",
+ "ins = 0.5*10**6 # insulation in ohms\n",
+ "p = 2*pi*l*ins/log(Rr)\n",
+ "print\"\\n Resistivity of insulation material = 10**10 ohm/m \",round(p/10**10,2)\n",
+ "\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_4 pgno406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " C4 = mircoF 5.0\n",
+ "\n",
+ " Line charging current = A 18.1379936423\n",
+ "\n",
+ " Charging = kVA 314.16\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12, Exmaple 4, page 406\n",
+ "#Calculate resistivity\n",
+ "from math import pi\n",
+ "# Baased on Equation 12.1*10**2\n",
+ "c4 = 0.5*10**2/10 # micro F\n",
+ "Ic = 2*10**4*2*pi*5*50*10**-6/(3)**0.5\n",
+ "C = ((3)**0.5*10000*Ic)*(10**-9*10**6)\n",
+ "print\"\\n C4 = mircoF \",c4\n",
+ "print\"\\n Line charging current = A \",Ic\n",
+ "print\"\\n Charging = kVA \",round(C,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_5 pgno408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " C2 = mircoF/Km 0.25\n",
+ "\n",
+ " C3 = mircoF/Km 0.65\n",
+ "\n",
+ " C4 = mircoF/Km 0.45\n",
+ "\n",
+ " Carging = kVAr 3079.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12,Example 5, page 408\n",
+ "#Calculate capasitance and kVAr \n",
+ "from math import pi\n",
+ "#(a) Using the notations used in FiVgs. 12.15 and 12.16\n",
+ "C2 = 0.75/3 # microF/km\n",
+ "C3 = (0.6*3-2*C2)/2 # microF/km\n",
+ "C4 = (C2+C3)/2 # microF/km\n",
+ "print\"\\n C2 = mircoF/Km \",C2\n",
+ "print\"\\n C3 = mircoF/Km \",C3\n",
+ "print\"\\n C4 = mircoF/Km \",C4\n",
+ "#(b)Capacitance of 10 km between 2 cores\n",
+ "V = 33*10**3\n",
+ "w = 2*pi*50\n",
+ "C = 2*V**2*w*C4*10*10**-9\n",
+ "print\"\\n Carging = kVAr \",round(C,1)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_6 pgno409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Conductor resistance = ohm 0.105\n",
+ "\n",
+ " Conductor resistance for the whole leangth (Rc) = ohm 8.925\n",
+ "\n",
+ " Resistance of sheath (Rsh) = ohm/Km 22.8257125656\n",
+ "\n",
+ " Conductor to sheath mutual inductive reactance (Xm)= ohm/m 5.70302447331\n",
+ "\n",
+ " Effective AC resistance(Ref) = ohm 10.2661818113\n",
+ "\n",
+ " Reactance with sheaths open-circuit(Xc) = ohm 11.1\n",
+ "\n",
+ " Effective reactance per cable(Xef) = ohm 11.0412424998\n",
+ "\n",
+ " Sheath loss/conductor loss = 0.150272471857\n",
+ "\n",
+ " emf induced per sheath(emf) = kV 2.28\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12,Example 6, page 409\n",
+ "#Determine the efective electrical parameters \n",
+ "from math import pi,log\n",
+ "rc = 0.0875*(1+0.004*50) # conductor resistance in ohm/km\n",
+ "Rc = 0.105*85 # ohm\n",
+ "w = 2*pi*50\n",
+ "Rsh = 23.2*10**-6*85*10**5/(pi*(3**2-2.5**2)) # Resistance of sheath\n",
+ "D = 8.\n",
+ "rsh = 1./2.*(2.5+3)\n",
+ "Xm = w*2*log(D/rsh)*10**-7*85000\n",
+ "Ref = Rc + Xm**2*Rsh/(Rsh**2+Xm**2) # Effective AC resistance \n",
+ "Xc = 11.1# reactance with sheaths open-circuit\n",
+ "Xef = Xc-(Xm**2/(Rsh**2+Xm**2)) #Effective reactance per cable\n",
+ "SlCl = Rsh*Xm**2/(Rc*(Rsh**2+Xm**2)) # Sheath loss/conductor loss\n",
+ "I = 400 # A\n",
+ "emf = Xm*I # emf induced per sheath\n",
+ "print\"\\n Conductor resistance = ohm\",rc\n",
+ "print\"\\n Conductor resistance for the whole leangth (Rc) = ohm\",Rc\n",
+ "print\"\\n Resistance of sheath (Rsh) = ohm/Km \",Rsh\n",
+ "print\"\\n Conductor to sheath mutual inductive reactance (Xm)= ohm/m \",Xm\n",
+ "print\"\\n Effective AC resistance(Ref) = ohm \",Ref\n",
+ "print\"\\n Reactance with sheaths open-circuit(Xc) = ohm \",Xc\n",
+ "print\"\\n Effective reactance per cable(Xef) = ohm \",Xef\n",
+ "print\"\\n Sheath loss/conductor loss = \",SlCl\n",
+ "print\"\\n emf induced per sheath(emf) = kV\",round(emf/1000,2)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_7 pgno410"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Induced sheath voltage per Km = V/km 26.6\n",
+ "\n",
+ " If the sheaths are bonded at one end, the voltage between them at the other end = = V/km 46.1318808794\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12,Example 7, page 410\n",
+ "#Determine the induced sheath voltage \n",
+ "from math import log\n",
+ "D = 15. # cm\n",
+ "rsh = 5.5/2 # Sheath diameter converted to radius in cm\n",
+ "I = 250. # A\n",
+ "E = 2*10**-7*314*I*log(D/rsh)*10**3\n",
+ "\n",
+ "print\"\\n If the sheaths are bonded at one end, the voltage between them at the other end = = V/km\",E*(3)**0.5\n",
+ "print\"\\n Induced sheath voltage per Km = V/km\",round(E,1)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_9 pgno412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " V1 = kV/cm 45.562691669\n",
+ "\n",
+ " V2 = kV/cm 23.2040739531\n",
+ "\n",
+ " Emax = kV/cm 47.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12,Example 9, page 412\n",
+ "#Determine the maximum stress \n",
+ "from math import log\n",
+ "Emax = 47.5 # kV\n",
+ "b = 2.65 # cm\n",
+ "a = 1. # cm\n",
+ "ba = 0.55*3 # 1/3(b-a)\n",
+ "r1 = 1.55 # cm\n",
+ "r2 = 2.1 # cm2Vr = 2.65 # cm \n",
+ "V = 53.8 # kV\n",
+ "alpha = ba**(1/3)\n",
+ "# based on the example 12_8 \n",
+ "#calculating VEmax1, Emax2, Emax3 \n",
+ "x = 1/(a*log(r1/a))\n",
+ "y = 1/(r1*log(r2/r1))\n",
+ "z = 1/(r2*log(b/r2))\n",
+ "VV1 = Emax/x\n",
+ "V1V2 = Emax/y\n",
+ "V2 = Emax/z\n",
+ "V1 = V2+(Emax/y)\n",
+ "\n",
+ "print\"\\n V1 = kV/cm\",V1\n",
+ "print\"\\n V2 = kV/cm\",V2\n",
+ "print\"\\n Emax = kV/cm\",Emax\n",
+ "# Answers may vary due to round off error.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_8 pgno411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Peak voltage of the conductor V = kV 53.8887743412\n",
+ "\n",
+ " V1 = kV 41.1\n",
+ "\n",
+ " V2 = kV 23.9\n",
+ "\n",
+ " Maximum stress without sheaths = kV/cm 26.258912261\n",
+ "\n",
+ " Minimum stress without sheaths = kV/cm 41.7324619433\n",
+ "\n",
+ " Maximum stress with sheaths = kV/cm 26.258912261\n",
+ "\n",
+ " Minimum stress with sheaths = kV/cm 26.258912261\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12,Example 8, page 411\n",
+ "#Determine the maximum stress \n",
+ "from math import log\n",
+ "ba = 5.3/2 # b/a\n",
+ "alpha = ba**(1/3)\n",
+ "r1 = 1.385 # cm\n",
+ "r2 = 1.92 # cm\n",
+ "r = 2.65 # cm\n",
+ "V = 66*(2)**0.5/(3)**0.5\n",
+ "V2 = 23.9#V/(1+(1/alpha)+(1/alpha**2))\n",
+ "V1 = 41.1#(1+1/alpha)*V2\n",
+ "#calculating maximim and minimum stress without sheaths\n",
+ "Emax0 = V/1*log(r/1)\n",
+ "Emin0 = V/(r*log(r))\n",
+ "#calculating max and min stress with the sheaths\n",
+ "Emax = Emax0*3/(1+(alpha)+(alpha**2))\n",
+ "Emin = Emax/alpha\n",
+ "print\"\\n Peak voltage of the conductor V = kV\",V\n",
+ "print\"\\n V1 = kV\",V1\n",
+ "print\"\\n V2 = kV\",V2\n",
+ "print\"\\n Maximum stress without sheaths = kV/cm\",Emax0/2\n",
+ "print\"\\n Minimum stress without sheaths = kV/cm\",Emin0*2\n",
+ "print\"\\n Maximum stress with sheaths = kV/cm\",Emax/2\n",
+ "print\"\\n Minimum stress with sheaths = kV/cm\",Emin/2\n",
+ "\n",
+ "# Answers vary due to round off errors.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_10 pgno412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " E1max = kV/cm 51.5\n",
+ "\n",
+ " E2max = kV/cm 38.69\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 12,Example 10, page 412\n",
+ "#Determine the maximum stress \n",
+ "from math import log,e\n",
+ "a = 1 #cm\n",
+ "r1 = 2 # cm\n",
+ "b = 2.65 # cm\n",
+ "er1 = 4.5\n",
+ "er2 = 3.6\n",
+ "V = 53.8 # kV\n",
+ "ba = 5.3/2 # b/a\n",
+ "alpha = 1.325\n",
+ "E1max = V/(log(r1)+(er1/er2)*log(alpha))\n",
+ "E2max = V/((r1*(er2/er1)*log(r1))+log(alpha))\n",
+ "print\"\\n E1max = kV/cm\",round(E1max,1)\n",
+ "print\"\\n E2max = kV/cm\",round(E2max,2) # answer vary from the text\n",
+ "\n",
+ "# Answer vary from the text due to round off \n",
+ "\n",
+ "\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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration_1.ipynb new file mode 100755 index 00000000..23418ebe --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration_1.ipynb @@ -0,0 +1,749 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16 High Voltage Generation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_1 pgno:556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Part (a)\n",
+ "\n",
+ " Ripple Voltage = V 2000.0\n",
+ "\n",
+ " Part (b)\n",
+ "\n",
+ " Voltage drop = V 11000.0\n",
+ "\n",
+ " Part (c)\n",
+ "\n",
+ " Average output voltage = kV 271.842712475\n",
+ "\n",
+ " Part (d)\n",
+ "\n",
+ " Ripple Factor in percentage = 3.88908729653\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Chapter 16,Example 1, page 556\n",
+ "#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor \n",
+ "\n",
+ "I1 = 5*10**-3 # A\n",
+ "C2 = 0.05*10**-6 # F\n",
+ "C1 = 0.01*10**-6 # F\n",
+ "Vs = 100 # kV\n",
+ "f = 50 # Hz \n",
+ "\n",
+ "from math import sqrt\n",
+ "# (a) Ripple voltage\n",
+ "print\"\\n Part (a)\"\n",
+ "delV = I1/(C2*f)\n",
+ "print\"\\n Ripple Voltage = V\", delV\n",
+ "# (b) Voltage drop \n",
+ "print\"\\n Part (b)\"\n",
+ "Vd = I1/f*((1/C1)+(1/(2*C2)))\n",
+ "print\"\\n Voltage drop = V\", Vd\n",
+ "# (c) Average output voltage \n",
+ "print\"\\n Part (c)\"\n",
+ "Vav = 2*Vs*sqrt(2)-Vd*10**-3\n",
+ "print\"\\n Average output voltage = kV\", round(Vav,1)\n",
+ "# (d) Ripple factor \n",
+ "print\"\\n Part (d)\"\n",
+ "RF = Vd*10**-3/(2*Vs*sqrt(2)) \n",
+ "print\"\\n Ripple Factor in percentage = \", round(RF*100,2)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_2 pgno:556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Part (a)\n",
+ "\n",
+ " Ripple Voltage = kV 21.0\n",
+ "\n",
+ " Part (b)\n",
+ "\n",
+ " Voltage drop = kV 12.5\n",
+ "\n",
+ " Part (c)\n",
+ "\n",
+ " Average output voltage = kV 411.76\n",
+ "\n",
+ " Part (d)\n",
+ "\n",
+ " Ripple Factor in percentage = 2.95\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 2, page 556\n",
+ "#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor \n",
+ "\n",
+ "I1 = 5*10**-3 # A\n",
+ "C3 = 0.10*10**-6 # F\n",
+ "C2 = 0.05*10**-6 # F\n",
+ "C1 = 0.01*10**-6 # F\n",
+ "Vs = 100 # kV\n",
+ "f = 50 # Hz \n",
+ "\n",
+ "from math import sqrt\n",
+ "# (a) Ripple voltage\n",
+ "print\"\\n Part (a)\"\n",
+ "delV = I1/f*((2/C1)+(1/C3))\n",
+ "print\"\\n Ripple Voltage = kV\", delV*10**-3\n",
+ "# (b) Voltage drop \n",
+ "print\"\\n Part (b)\"\n",
+ "Vd = I1/f*((1/C2)+(1/C1)+(1/(2*C3)))\n",
+ "print\"\\n Voltage drop = kV\", round(Vd*10**-3,1)\n",
+ "# (c) Average output voltage \n",
+ "print\"\\n Part (c)\"\n",
+ "Vav = 3*Vs*sqrt(2)-Vd*10**-3\n",
+ "print\"\\n Average output voltage = kV\", round(Vav,2)\n",
+ "# (d) Ripple factor \n",
+ "print\"\\n Part (d)\"\n",
+ "RF = Vd*10**-3/(3*Vs*sqrt(2)) \n",
+ "print\"\\n Ripple Factor in percentage = \", round(RF*100,2)\n",
+ "\n",
+ "# Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_3 pgno:557"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Part (a)\n",
+ "\n",
+ " Ripple Voltage = kV 52.0\n",
+ "\n",
+ " Part (b)\n",
+ "\n",
+ " Voltage drop = kV 872.0\n",
+ "\n",
+ " Part (c)\n",
+ "\n",
+ " Average output voltage = kV 6715.55843272\n",
+ "\n",
+ " Part (d)\n",
+ "\n",
+ " Ripple Factor in percentage = 10.704810993\n",
+ "\n",
+ " Part (e)\n",
+ "\n",
+ " Optimum number of stages = stages 21.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 3, page 557\n",
+ "#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor (e)optimum number of stages\n",
+ "\n",
+ "I1 = 5*10**-3 # A\n",
+ "C = 0.15*10**-6 # F\n",
+ "Vs = 200 # kV\n",
+ "f = 50 # Hz \n",
+ "n = 12\n",
+ "from math import sqrt\n",
+ "# (a) Ripple voltage\n",
+ "print\"\\n Part (a)\"\n",
+ "delV = I1*n*(n+1)/(f*C*2)\n",
+ "print\"\\n Ripple Voltage = kV\", delV*10**-3\n",
+ "# (b) Voltage drop \n",
+ "print\"\\n Part (b)\"\n",
+ "a = I1/(f*C)\n",
+ "Vd = a*((2/3*n**3)+(n**2/2)-(n/6)+(n*(n+1)/4))\n",
+ "print\"\\n Voltage drop = kV\", Vd*10**-3*12\n",
+ "# (c) Average output voltage \n",
+ "print\"\\n Part (c)\"\n",
+ "Vav = 2*n*Vs*sqrt(2)-Vd*10**-3\n",
+ "print\"\\n Average output voltage = kV\", Vav\n",
+ "# (d) Ripple factor \n",
+ "print\"\\n Part (d)\"\n",
+ "RF = Vd*10**-3/(2*n*Vs*sqrt(2))*10 \n",
+ "print\"\\n Ripple Factor in percentage = \", RF*100\n",
+ "# (e) Optimum number of stages\n",
+ "print\"\\n Part (e)\"\n",
+ "nopt = sqrt(Vs*sqrt(2)*10**3*f*C/I1) \n",
+ "print\"\\n Optimum number of stages = stages\", round(nopt)\n",
+ "\n",
+ "# Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_4 pgno:558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Reactance of the cable = k ohm 125.0\n",
+ "\n",
+ " Leakage reactance of the transformer = k ohm 50.0\n",
+ "\n",
+ " Additional series reactance = k ohm 75.0\n",
+ "\n",
+ " Inductance of required series inductor = H 238.732414638\n",
+ "\n",
+ " Total circuit resistance = k ohm 21.875\n",
+ "\n",
+ " maximum current that can be supplied by the transformer = A 0.4\n",
+ "\n",
+ " Exciting voltage of transformer secondary = kV 8.75\n",
+ "\n",
+ " Input voltage of transformer primary = V 7.7\n",
+ "\n",
+ " Input power of the transformer = kW 3.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 4, page 558\n",
+ "#Determine the input voltage and power\n",
+ "from math import pi\n",
+ "Vc = 500*10**3 # V\n",
+ "A = 4 # A\n",
+ "Xl = 8./100. # in percentage \n",
+ "kV = 250.\n",
+ "Xc = Vc/A # Reactance of the cable\n",
+ "XL = Xl*(kV**2/100)*10**3 # Leakage reactance of the transformer\n",
+ "Radd = Xc-XL # Additional series reactance\n",
+ "Ind = Radd/(2*pi*XL) # Inductance of required series inductor\n",
+ "R = 3.5/100.*(kV**2/100)*10**3 # Total circuit resistance\n",
+ "Imax = 100./250. # maximum current that can be supplied by the transformer\n",
+ "Vex = Imax*R # Exciting voltage of transformer secondary\n",
+ "Vin = Vex*220/kV # Input voltage of transformer primary\n",
+ "P = Vin*100./220. # Input power of the transformer\n",
+ "print\"\\n Reactance of the cable = k ohm\", Xc*10**-3\n",
+ "print\"\\n Leakage reactance of the transformer = k ohm\", XL*10**-3\n",
+ "print\"\\n Additional series reactance = k ohm\", Radd*10**-3\n",
+ "print\"\\n Inductance of required series inductor = H\", Ind*10**3\n",
+ "print\"\\n Total circuit resistance = k ohm\", R*10**-3\n",
+ "print\"\\n maximum current that can be supplied by the transformer = A\", Imax\n",
+ "print\"\\n Exciting voltage of transformer secondary = kV\", Vex*10**-3\n",
+ "print\"\\n Input voltage of transformer primary = V\", Vin*10**-3\n",
+ "print\"\\n Input power of the transformer = kW\", P*10**-3\n",
+ "\n",
+ "# Answers may vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_5 pgno:559"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Charging current= micro A 0.5\n",
+ "\n",
+ " Potential difference = MV 50.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 5,page 559\n",
+ "#Determine the charging current and potential difference\n",
+ "\n",
+ "ps = 0.5*10**-6 # C/m**2\n",
+ "u = 10 # m/s\n",
+ "w = 0.1 # m\n",
+ "I = ps*u*w \n",
+ "Rl = 10**14 # ohm\n",
+ "V = I*Rl*10**-6\n",
+ "print\"\\n Charging current= micro A\", I*10**6\n",
+ "print\"\\n Potential difference = MV\", V\n",
+ "\n",
+ "# Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_6 pgno:560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Theta = micro S 4.94772675074\n",
+ "\n",
+ " Neta = 0.986880297225\n",
+ "\n",
+ " Alpha = 6.96319779479\n",
+ "\n",
+ " T1 = microS 1.11048978183\n",
+ "\n",
+ " T2 = microS 49.9720401825\n",
+ "\n",
+ " Generated lighting impulse = wave 0.0222222222222\n",
+ "\n",
+ " alpha1 = microS 0.0145885577162\n",
+ "\n",
+ " alpha2 = microS 2.80011732464\n",
+ "\n",
+ " e(t) = * (e**t - f**t) 99.721740833 -0.015 -2.8\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 6,page 560\n",
+ "#Determine the wave generated\n",
+ "\n",
+ "# With refrence to table 16.1\n",
+ "C1 = 0.125*10**-6 # F\n",
+ "C2 = 1*10**-9 # F\n",
+ "R1 = 360. # ohm\n",
+ "R2 = 544. # ohm\n",
+ "V0 = 100. # kV\n",
+ "from math import sqrt\n",
+ "theta = sqrt(C1*C2*R1*R2)\n",
+ "neta = 1/(1+(1+R1/R2)*C2/C1)\n",
+ "alpha = R2*C1/(2*theta*neta)\n",
+ "print\"\\n Theta = micro S\",theta*10**6\n",
+ "print\"\\n Neta = \",neta\n",
+ "print\"\\n Alpha = \",alpha\n",
+ "# Coresponding to alpha the following can be deduced from Fig 16.12\n",
+ "T2 = 10.1*theta*10**6\n",
+ "T1 = T2/45\n",
+ "imp = T1/T2 # generated lighting impulse\n",
+ "# From equations 16.41 and 16.42\n",
+ "a1 = (alpha-sqrt(alpha**2-1))*10**-6/(theta) \n",
+ "a2 = (alpha+sqrt(alpha**2-1))*10**-6/theta \n",
+ "print\"\\n T1 = microS\", T1\n",
+ "print\"\\n T2 = microS\", T2\n",
+ "print\"\\n Generated lighting impulse = wave\", imp\n",
+ "print\"\\n alpha1 = microS\", a1\n",
+ "print\"\\n alpha2 = microS\", a2\n",
+ "# According to equation 16.40\n",
+ "et = neta*(alpha*V0)/sqrt(alpha**2-1)\n",
+ "print\"\\n e(t) = * (e**t - f**t)\",et,round(-a1,3),round(-a2,2) # Equation of the wave form generated by the impulese\n",
+ "\n",
+ "#Answers may vary due to round off error \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_7 pgno:561"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Theta = micro S 4.94772675074\n",
+ "\n",
+ " Neta = 0.598886775171\n",
+ "\n",
+ " Alpha = 11.4743604205\n",
+ "\n",
+ " T1 = microS 0.670004664163\n",
+ "\n",
+ " T2 = microS 80.4005596995\n",
+ "\n",
+ " alpha1 = microS 0.00882394544921\n",
+ "\n",
+ " alpha2 = microS 4.62941134867\n",
+ "\n",
+ " e(t) = * (e**t - f**t) 60.1174165831 -0.0088 -4.63\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 6,page 561\n",
+ "#Determine the wave generated\n",
+ "\n",
+ "C1 = 0.125*10**-6 # F\n",
+ "C2 = 1*10**-9 # F\n",
+ "R1 = 360. # ohm\n",
+ "R2 = 544. # ohm\n",
+ "V0 = 100. # kV\n",
+ "from math import sqrt\n",
+ "theta = sqrt(C1*C2*R1*R2)\n",
+ "neta = 1/(1+R1/R2+C2/C1)\n",
+ "alpha = R2*C1/(2*theta*neta)\n",
+ "print\"\\n Theta = micro S\",theta*10**6\n",
+ "print\"\\n Neta = \",neta\n",
+ "print\"\\n Alpha = \",alpha\n",
+ "# Coresponding to alpha the following can be deduced from Fig 16.12\n",
+ "T2 = 16.25*theta*10**6\n",
+ "T1 = T2/120\n",
+ "# From equations 16.41 and 16.42\n",
+ "a1 = (alpha-sqrt(alpha**2-1))*10**-6/(theta) \n",
+ "a2 = (alpha+sqrt(alpha**2-1))*10**-6/theta \n",
+ "print\"\\n T1 = microS\", T1 # Answer given in the text is wrong\n",
+ "print\"\\n T2 = microS\", T2 \n",
+ "print\"\\n alpha1 = microS\", a1\n",
+ "print\"\\n alpha2 = microS\", a2\n",
+ "# According to equation 16.40\n",
+ "et = neta*(alpha*V0)/sqrt(alpha**2-1)\n",
+ "print\"\\n e(t) = * (e**t - f**t)\",et,round(-a1,4),round(-a2,2) # Equation of the wave form generated by the impulese\n",
+ "\n",
+ "#Answers may vary due to round off error \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_8 pgno:562"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Theta = micro S 416.666666667\n",
+ "\n",
+ " X = 0.063\n",
+ "\n",
+ " R1 = k Ohm 53.3539946227\n",
+ "\n",
+ " R2 = k Ohm 26.0315820533\n",
+ "\n",
+ " neta = 0.976\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 8,page 562\n",
+ "#Determine the circuit efficiency\n",
+ "\n",
+ "C1 = 0.125*10**-6 # F\n",
+ "C2 = 1*10**-9 # F\n",
+ "T2 = 2500.\n",
+ "T1 = 250.\n",
+ "from math import sqrt\n",
+ "# Bsaed on Figure 16.12\n",
+ "T2T1 = T2/T1\n",
+ "a = 4. # alpha\n",
+ "theta = T2/6.\n",
+ "# From table 16.1\n",
+ "X = (1/a**2)*(1+C2/C1)\n",
+ "R1 = (a*theta*10**-6/C2)*(1-sqrt(1-X))\n",
+ "R2 = (a*theta*10**-6/(C1+C2))*(1+sqrt(1-X))\n",
+ "neta = 1/(1+(1+R1/R2)*C2/C1)\n",
+ "print\"\\n Theta = micro S\", theta\n",
+ "print\"\\n X = \", X\n",
+ "print\"\\n R1 = k Ohm\", R1*10**-3\n",
+ "print\"\\n R2 = k Ohm\", R2*10**-3\n",
+ "print\"\\n neta = \", round(neta,3)\n",
+ "\n",
+ "# Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_9 pgno:563"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Theta = micro S 5.26315789474\n",
+ "\n",
+ " X = 0.025634765625\n",
+ "\n",
+ " V0 = 960.0\n",
+ "\n",
+ " R1 = Ohm 434.546374554\n",
+ "\n",
+ " R2 = Ohm 3187.32736562\n",
+ "\n",
+ " R1/n = Ohm 54.3182968192\n",
+ "\n",
+ " R2/n = Ohm 398.415920703\n",
+ "\n",
+ " neta = 0.946237811669\n",
+ "\n",
+ " Maximum output voltage = kV 908.388299202\n",
+ "\n",
+ " Energy rating = J 9216.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 9,page 563\n",
+ "#Determine the maximum output voltage and energy rating\n",
+ "\n",
+ "n = 8.\n",
+ "C1 = 0.16/n # micro F\n",
+ "C2 = 0.001 # micro F\n",
+ "T2 = 50.\n",
+ "T1 = 1.2\n",
+ "from math import sqrt\n",
+ "# beased on figure 16.12\n",
+ "a = 6.4 # alpha\n",
+ "theta = T2/9.5\n",
+ "X = (1/a**2)*(1+C2/C1)\n",
+ "R1 = (a*theta*10**-6/C2)*(1-sqrt(1-X))\n",
+ "R2 = (a*theta*10**-6/(C1+C2))*(1+sqrt(1-X))\n",
+ "R1n = R1/n\n",
+ "R2n = R2/n\n",
+ "V0 = n*120 \n",
+ "neta = 1/(1+(1+R1/R2)*C2/C1)\n",
+ "V = neta*V0\n",
+ "E = 1./2.*C1*V0**2 \n",
+ "print\"\\n Theta = micro S\", theta\n",
+ "print\"\\n X = \", X\n",
+ "print\"\\n V0 = \", V0\n",
+ "print\"\\n R1 = Ohm\", R1*10**6 \n",
+ "print\"\\n R2 = Ohm\", R2*10**6 \n",
+ "print\"\\n R1/n = Ohm\", R1n*10**6\n",
+ "print\"\\n R2/n = Ohm\", R2n*10**6\n",
+ "print\"\\n neta = \", neta\n",
+ "print\"\\n Maximum output voltage = kV\", V\n",
+ "print\"\\n Energy rating = kJ\", E/1000\n",
+ "\n",
+ "# Answers greatly vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_10 pgno:564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " R1 = Ohm 840\n",
+ "\n",
+ " R2 = Ohm 4800\n",
+ "\n",
+ " Theta = microS 6.48074069841\n",
+ "\n",
+ " Neta = 0.912408759124\n",
+ "\n",
+ " Alpha = 4.22791178896\n",
+ "\n",
+ " T1 = microS 1.81\n",
+ "\n",
+ " T2 = microS 45.37\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 10,page 564\n",
+ "#Determine the from and tail times\n",
+ "\n",
+ "n = 12\n",
+ "C1 = 0.125*10**-6/n # micro F\n",
+ "C2 = 0.001*10**-6 # micro F\n",
+ "R1 = 70*n # ohm\n",
+ "R2 = 400*n # ohm\n",
+ "from math import sqrt\n",
+ "# beased on figure 16.15\n",
+ "theta = sqrt(C1*C2*R1*R2)\n",
+ "neta = 1/(1+R1/R2+C2/C1)\n",
+ "a = R2*C1/(2*theta*neta) # alpha\n",
+ "T2 = 7*theta*10**6\n",
+ "T1 = T2/25\n",
+ "print\"\\n R1 = Ohm\", R1 \n",
+ "print\"\\n R2 = Ohm\", R2 \n",
+ "print\"\\n Theta = microS\",theta*10**6\n",
+ "print\"\\n Neta = \",neta\n",
+ "print\"\\n Alpha = \",a\n",
+ "print\"\\n T1 = microS\", round(T1,2) \n",
+ "print\"\\n T2 = microS\", round(T2,2) \n",
+ "\n",
+ "# Answers greatly vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16_ 11pgno:564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " R = ohm 1.97423402868\n",
+ "\n",
+ " y = s**-1 123389.626793\n",
+ "\n",
+ " I(t) = * exp(t) * sin(t) A 15.625 -12.33896 20000.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 16,Example 11,page 564\n",
+ "#Determine the equation generated by impulse\n",
+ "from math import sqrt\n",
+ "w = 0.02*10**6 # s**-1 obtained by solving eq 16.47 iteratively\n",
+ "R = sqrt(4-(sqrt(8*8*4)*0.02)**2) # solved the simplified equation\n",
+ "L = 8*10**-6\n",
+ "V = 25*10**3\n",
+ "# In equation 16.46\n",
+ "y = R/(2*L)\n",
+ "# Deriving the equation\n",
+ "a = V/(w*L)\n",
+ "print\"\\n R = ohm\",R\n",
+ "print\"\\n y = s**-1\",y\n",
+ "print\"\\n I(t) = * exp(t) * sin(t) A\",a/10000,round(-y,1)/10000,w\n",
+ "\n",
+ "# Answers may vary due to round off error\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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries__1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries__1.ipynb new file mode 100755 index 00000000..16682b1d --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries__1.ipynb @@ -0,0 +1,398 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19 Applications of High Voltage Engineering in Industries "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_1 pgno:665"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " The seperation between the particles = m 1.63265306122\n"
+ ]
+ }
+ ],
+ "source": [
+ " #Chapter 19,Example 1,page 665\n",
+ "#Determine the sepration between the particles\n",
+ "\n",
+ "# Based on the equations 19.6, 19.7, 19.8, 19.9 and 19.10\n",
+ "E = 8*10**5 # V/m\n",
+ "qm = 10*10**-6 # C/kg, qm = q/m\n",
+ "y = -1 # m\n",
+ "t = (1*2/9.8)\n",
+ "x = 1./2.*qm*E*t\n",
+ "print\"\\n The seperation between the particles = m\",round(2*x,3)\n",
+ "\n",
+ "# Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_2 pgno:667"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " The pumping pressure P = N/m**2 900.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 19,Example 2,page 667\n",
+ "#Determine the pumping pressure\n",
+ "\n",
+ "p0 = 30*10**-3 # C/m**3\n",
+ "V = 30*10**3 # V\n",
+ "P = p0*V\n",
+ "print\"\\n The pumping pressure P = N/m**2\",P\n",
+ "# Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_4 pgno:670"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " The vertical displacement of the drop = m 0.0029\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 19,Example 4,page 670\n",
+ "#Determine the vertical displacement of the drop\n",
+ "\n",
+ "d = 0.03*10**-3 # m\n",
+ "p = 2000 # kg/m**3\n",
+ "q = 100*10**-15 # C\n",
+ "V0 = 3500. # V\n",
+ "d2 = 2*10**-3 # m\n",
+ "L1 = 15*10**-3 # m\n",
+ "L2 = 12*10**-3 # m\n",
+ "Vz = 25. # m/s\n",
+ "from math import pi\n",
+ "m = 4./3.*pi*(1./2.*d)**3*p\n",
+ "t0 = L1/Vz\n",
+ "Vx0 = q*V0*t0/(m*d2)\n",
+ "x0 = 1./2.*Vx0*t0\n",
+ "t1 = (L1+L2)/Vz\n",
+ "x1 = x0+Vx0*(t1-t0)\n",
+ "\n",
+ "print\"\\n The vertical displacement of the drop = m\",round(x1,4)\n",
+ " \n",
+ "# Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_5 pgno672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Ea = V/m 902570.520843\n",
+ "\n",
+ " Eb = V/m 300856.840281\n",
+ "\n",
+ " Charge density = C/m**2 2.65957446809e-06\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 19,Example 5,page 672\n",
+ "#Determine the electric stress and charge density\n",
+ "\n",
+ "a = 25*10**-6 # m\n",
+ "b = 75*10**-6 # m\n",
+ "Er = 2.8\n",
+ "ps = 25*10**-6 # C/m**3\n",
+ "E0 = 8.84*10**-12\n",
+ "\n",
+ "Ea = (b*ps)/(ps*E0+b*Er*E0)\n",
+ "Eb = (a*ps)/(ps*E0+b*Er*E0) # the negative noation is removed to obtain positive answer as in the book \n",
+ "psc = E0*Eb\n",
+ "\n",
+ "print\"\\n Ea = V/m\",Ea\n",
+ "print\"\\n Eb = V/m\",Eb\n",
+ "print\"\\n Charge density = C/m**2\",psc\n",
+ "\n",
+ "# Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_6 pgno:675"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Current density = A/m**2 5.304e-08\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 19,Example 6,page 675\n",
+ "#Determine the current density\n",
+ "\n",
+ "\n",
+ "E0 = 8.84*10**-12\n",
+ "Us = 1.5*10**-3*10**-4\n",
+ "V = 100\n",
+ "d3 = 10**-6 # d**3\n",
+ "J = 4*E0*Us*V**2/d3\n",
+ "print\"\\n Current density = A/m**2\",J\n",
+ "\n",
+ "# Answer may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_7 pgno:676"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Thickness of the dust layer = m 0.00177\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 19,Example 7,page 676\n",
+ "#Determine the thickness of dust layer\n",
+ "\n",
+ "Edb = 3*10**6\n",
+ "E0 = 8.84*10**-12\n",
+ "p0 = 15*10**-3\n",
+ "d = Edb*E0/p0\n",
+ "print\"\\n Thickness of the dust layer = m\",round(d,5)\n",
+ "\n",
+ "# Answers may vary due to round off errors\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_8 pgno:676"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Ion velocity = m/s 71010.8899112\n",
+ "\n",
+ " Populsion force = N 0.0197152859477\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 19,Example 8,page 676\n",
+ "#Determine the velocity of the ejected ions and propolsion force\n",
+ "from math import sqrt\n",
+ "mi = 133*1.67*10**-27 # kg\n",
+ "qi = 1.6*10**-19 # C\n",
+ "Va = 3500 # V\n",
+ "I = 0.2 # A\n",
+ "vi = sqrt(2*qi*Va/mi)\n",
+ "F = vi*mi*I/qi\n",
+ "print\"\\n Ion velocity = m/s\",vi\n",
+ "print\"\\n Populsion force = N\",F\n",
+ "\n",
+ "# Answers may vary due to round off errors\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_9 pgno:667"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Velocity = m/s2 2.0\n",
+ "\n",
+ " Position of the particle = m 0.24\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 19,Example 9,page 677\n",
+ "#Determine the position of the particle \n",
+ "\n",
+ "V = 120*10**3 # applied voltage in V\n",
+ "d = 0.6 # space b/w the plates in m\n",
+ "vd = 1.2 # vertical dimention in m \n",
+ "qm = 10*10**-6 # charge to mass C/kg \n",
+ "y = 4.9\n",
+ "from math import sqrt\n",
+ "t0 = sqrt(vd/y)\n",
+ "# based on eq 19.51 and 19.52\n",
+ "dx2 = qm*V/d\n",
+ "x = t0**2\n",
+ "print\"\\n Velocity = m/s2\",dx2\n",
+ "print\"\\n Position of the particle = m\",round(x,2)\n",
+ "\n",
+ "# Answer may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19_10 pgno:679"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " The minimum voltage required for gnerating drops witha charge of 50 pC per drop = kV 11.81\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 19,Example 10,page 679\n",
+ "#Determine the minimum voltage required for gnerating drops witha charge of 50 pC per drop\n",
+ "from math import pi,log\n",
+ "q = 50*10**-12\n",
+ "a = 25*10**-6\n",
+ "b = 750*10**-6\n",
+ "E0 = 8.84*10**-12\n",
+ "r = 50*10**-6 \n",
+ "V = (3*q*b**2*log(b/a))/(7*pi*E0*r**3)\n",
+ "print\"\\n The minimum voltage required for gnerating drops witha charge of 50 pC per drop = kV\",round(V*10**-6,2)\n",
+ "\n",
+ "# Answers may vary due to round off error\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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields_1.ipynb new file mode 100755 index 00000000..20fc2d8a --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields_1.ipynb @@ -0,0 +1,310 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2 Electric Fields"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_5 pgno:65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum field = V/m per volt 4.20643156401\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 2, Example 5, page 65\n",
+ "#Calculate the maximum field at the sphere surface\n",
+ "#Calulating Field at surface E based on figure 2.31 and table 2.3\n",
+ "from math import pi\n",
+ "Q1 = 0.25\n",
+ "e0 = 8.85418*10**-12 #Epselon nought\n",
+ "RV1= ((1/0.25**2)+(0.067/(0.25-0.067)**2)+(0.0048/(0.25-0.067)**2))\n",
+ "RV2= ((0.25+0.01795+0.00128)/(0.75-0.067)**2)\n",
+ "RV= RV1+RV2\n",
+ "E = (Q1*RV)/(4*pi*e0*10**10)\n",
+ "print\"Maximum field = V/m per volt\",E\n",
+ "\n",
+ "#Answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_6 pgno:66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Part a\t\n",
+ "Equivalent radius = m 0.0887411967465\n",
+ "Charge per bundle = uC/m 4.88704086264e-06\n",
+ "Charge per sunconducter = uC/m 2.44352043132e-06\n",
+ "\tPart b\n",
+ "\tSub part 1\t\n",
+ "Maximum feild = V/m \t2607466.95017\n",
+ "Maximum feild = V/m \t2412255.52075\n",
+ "Maximum feild = V/m \t2509861.23546\n",
+ "\tSub part 2\t\n",
+ "EO1 = V/m \t2597956.83558\n",
+ "EO2 = V/m \t2597429.47744\n",
+ "EI1 = V/m \t2402709.21273\n",
+ "EI2 = V/m \t2402258.0563\n",
+ "\tPart c\t\n",
+ "The average of the maximum gradient = V/m \t2597693.15651\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 2, Exmaple 6, page 66\n",
+ "#calculation based on figure 2.32\n",
+ "\n",
+ "#(a)Charge on each bundle\n",
+ "print\"Part a\\t\"\n",
+ "req = (0.0175*0.45)**0.5\n",
+ "print\"Equivalent radius = m \", req\n",
+ "from math import log\n",
+ "from math import pi\n",
+ "V = 400*10**3 #Voltage\n",
+ "H = 12. #bundle height in m\n",
+ "d = 9. #pole to pole spacing in m\n",
+ "e0 = 8.85418*10**-12 #Epselon nought\n",
+ "Hd = ((2*H)**2+d**2)**0.5#2*H**2 + d**2\n",
+ "Q = V*2*pi*e0/(log((2*H/req))-log((Hd/d)))\n",
+ "q = Q/2\n",
+ "print\"Charge per bundle = uC/m \",Q #micro C/m\n",
+ "print\"Charge per sunconducter = uC/m \",q #micro C/m\n",
+ "\n",
+ "#(b part i)Maximim & average surface feild\n",
+ "print\"\\tPart b\"\n",
+ "print\"\\tSub part 1\\t\"\n",
+ "r = 0.0175 #subconductor radius\n",
+ "R = 0.45 #conductor to subconductor spacing\n",
+ "MF = (q/(2*pi*e0))*((1/r)+(1/R)) # maximum feild\n",
+ "print\"Maximum feild = V/m \\t\",MF\n",
+ "MSF = (q/(2*pi*e0))*((1/r)-(1/R)) # maximum surface feild\n",
+ "print\"Maximum feild = V/m \\t\",MSF\n",
+ "ASF = (q/(2*pi*e0))*(1/r) # Average surface feild\n",
+ "print\"Maximum feild = V/m \\t\",ASF\n",
+ "\n",
+ "#(b part ii) Considering the two sunconductors on the left\n",
+ "print\"\\tSub part 2\\t\"\n",
+ "#field at the outer point of subconductor #1 \n",
+ "drO1 = 1/(d+r)\n",
+ "dRrO1 = 1/(d+R+r)\n",
+ "EO1 = MF -((q/(2*pi*e0))*(drO1+dRrO1))\n",
+ "print\"EO1 = V/m \\t\",EO1\n",
+ "#field at the outer point of subconductor #2 \n",
+ "drO2 = 1/(d-r)\n",
+ "dRrO2 = 1/(d-R-r)\n",
+ "EO2 = MF -((q/(2*pi*e0))*(dRrO2+drO2))\n",
+ "print\"EO2 = V/m \\t\",EO2\n",
+ "\n",
+ "#field at the inner point of subconductor #1 \n",
+ "drI1 = 1/(d-r)\n",
+ "dRrI1 = 1/(d+R-r)\n",
+ "EI1 = MSF -((q/(2*pi*e0))*(drI1+dRrI1))\n",
+ "print\"EI1 = V/m \\t\",EI1\n",
+ "#field at the inner point of subconductor #2 \n",
+ "drI2 = 1/(d+r)\n",
+ "dRrI2 = 1/(d-R+r)\n",
+ "EI2 = MSF -((q/(2*pi*e0))*(dRrI2+drI2)) \n",
+ "print\"EI2 = V/m \\t\",EI2\n",
+ "\n",
+ "#(part c)Average of the maximim gradient\n",
+ "print\"\\tPart c\\t\"\n",
+ "Eavg = (EO1+EO2)/2\n",
+ "print\"The average of the maximum gradient = V/m \\t\",Eavg\n",
+ "\n",
+ "\n",
+ "#Answers might vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_7 pgno:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Electric Feild = V/m \t30015596280.4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 2, Exmaple 7, page 69\n",
+ "#Electric feild induced at x\n",
+ "from math import pi\n",
+ "e0 = 8.85418*10**-12 #Epselon nought\n",
+ "q = 1 # C/m\n",
+ "C = (q/(2*pi*e0))\n",
+ "#Based on figure 2.33\n",
+ "E = C-(C*(1./3.+1./7.))+(C*(1+1./5.+1./9.))+(C*(1./5.+1./9.))-(C*(1./3.+1./7.))\n",
+ "print\"Electric Feild = V/m \\t\",E\n",
+ "\n",
+ "#Answers might vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_8 pgno:70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Thickness of graded design= cm 4.24264068712\n",
+ "Curve = cm**2 62.4264068712\n",
+ "V1 = cm**3 47402.906725\n",
+ "Thickness of regular design = cm 14.684289433\n",
+ "V2 = cm**3 8619.45\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 2, Exmaple 8, page 70\n",
+ "#Calculate the volume of the insulator\n",
+ "#Thinkness of graded design\n",
+ "from math import e\n",
+ "from math import pi\n",
+ "V = 150*(2)**0.5\n",
+ "Ebd = 50\n",
+ "T = V/Ebd\n",
+ "print\"\\nThickness of graded design= cm \",T\n",
+ "#Based on figure 2.24\n",
+ "r = 2 # radius of the conductor\n",
+ "l = 10 #length of graded cylinder; The textbook uses 10 instead of 20\n",
+ "zr = l*(T+r)\n",
+ "print\"Curve = cm**2 \",zr\n",
+ "#Volume of graded design V1\n",
+ "V1 = 4*pi*zr*(zr-r)\n",
+ "print\"V1 = cm**3 \",V1 #Unit is wrong in the textbook\n",
+ "#Thickness of regular design as obtained form Eq.2.77\n",
+ "pow = V/(2*Ebd)\n",
+ "t = 2*(e**pow-1)\n",
+ "print\"Thickness of regular design = cm \",t\n",
+ "#Volume of regular design V2\n",
+ "V2 = pi*((2+t)**2-4)*10\n",
+ "print\"V2 = cm**3 \",round(V2,2)#unit not mentioned in textbook\n",
+ " \n",
+ "#Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_11 pgno:75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The values of Phi2 and Phi4 are: [[ 3.6568 -326.5 ]\n",
+ " [-261.92857143 4.37537287]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 2, Exmaple 11, page 75\n",
+ "#Calculate the potential within the mesh\n",
+ "#Based on figure 2.38(b)\n",
+ "#equations are obtained using Eq.2.46\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "A1 = 1/2*(0.54+0.16)\n",
+ "A2 = 1/2*(0.91+0.14)\n",
+ "S = numpy.matrix([[0.5571, -0.4571, -0.1],[-0.4751, 0.828, 0.3667],[-0.1, 0.667, 0.4667]])\n",
+ "#By obtaining the elements of the global stiffness matrix(Sadiku,1994)\n",
+ "#and by emplying the Eq.2.49(a)\n",
+ "S1 = numpy.matrix([[1.25, -0.014],[-0.014, 0.8381]])\n",
+ "S2 = numpy.matrix([[-0.7786, -0.4571],[-0.4571, -0.3667]])\n",
+ "Phi13 = numpy.matrix([[0], [10]])\n",
+ "val1 = S2*Phi13\n",
+ "Phi24 = val1/S1\n",
+ "print\"The values of Phi2 and Phi4 are:\",-Phi24\n",
+ "\n",
+ "#Answers may vary due to round of error \n",
+ "\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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases_1.ipynb new file mode 100755 index 00000000..da216aac --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases_1.ipynb @@ -0,0 +1,699 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3 Ionization and Deionization Processes in Gases"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_1 pgno:130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity of Oxygen (O2)= m^2/s^2 102978\n",
+ "Velocity of Oxygen (O)= m/s 320.901854155\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 1, page 103\n",
+ "#Movement of oxygen molecule\n",
+ "\n",
+ "#using equation 3.3\n",
+ "R = 3814 # J/Kg.mol.K\n",
+ "T = 300 # K\n",
+ "M = 32 # mol^-1\n",
+ "V2 = 3*R*(T/M)\n",
+ "V = (V2)**0.5\n",
+ "print\"Velocity of Oxygen (O2)= m^2/s^2\",V2\n",
+ "#Since Oxygen is a diatomic gas\n",
+ "print\"Velocity of Oxygen (O)= m/s\",V\n",
+ "#Velocity of oxygen is about 300 m/s\n",
+ "\n",
+ "#Answer given in the textbook is wrong\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_2 pgno:104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "G = m^3\t0.001563967325\n",
+ "K.E = J\t157.960699825\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 2, page 104\n",
+ "#Kinetic energy of oxygen molecule\n",
+ "#from Eq.3.2\n",
+ "G = (2*10**-3/32)*(8314*298*1.01*10**5)*10**-10\n",
+ "print\"\\nG = m^3\\t\",G # Answer is is wrong in the text \n",
+ "#From equation 3.1\n",
+ "mv2 = 3/2*1.01*10**5 # 1/2*m0*v^2\n",
+ "KE = mv2*G#total transalational K.E\n",
+ "print\"K.E = J\\t\",KE\n",
+ "#Answer may varry due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_3 pgno:104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "N = 3.63168110755e-20\n",
+ "\n",
+ "Pressure = N/m**2 0.196\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 3, page 104\n",
+ "#Maximum pressure in the chamber\n",
+ "from math import pi\n",
+ "#Making use of equation 3.10\n",
+ "N1 = (4*pi*1.7*1.7*0.10*10**-10*10**-10)\n",
+ "N = 1/N1\n",
+ "#Using equation 3.2\n",
+ "R = 8314 # J/Kg*mol*K \n",
+ "M = 28 # Mol**-1\n",
+ "N = 220*10**-8 # Kg\n",
+ "T = 300 # K\n",
+ "p = N/M*R*T\n",
+ "print\"\\nN = \",N1\n",
+ "print\"\\nPressure = N/m**2\",round(p,3)\n",
+ "\n",
+ "#Answer vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_4 pgno:105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "K.E = J 1.6e-19\n",
+ "\n",
+ "Temperature = K 7729.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 4, page 105\n",
+ "#Temperature & Average K.E of He atom\n",
+ "\n",
+ "m0 = 1\n",
+ "v2 = 1.6*10**-19 # V**2\n",
+ "KE = m0*v2\n",
+ "#Using equation 3.3\n",
+ "T = 2*KE/(3*1.38*10**-23) \n",
+ "print\"\\nK.E = J\",KE\n",
+ "print\"\\nTemperature = K\",round(T)\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_5 pgno:105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Volume of He = m^3 11.15\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 5, page 105\n",
+ "#Volume of Helium \n",
+ "\n",
+ "# Using equation 3.2\n",
+ "G = (1*8314*273)/(2.016*1.01*10**5)\n",
+ "print\"\\nVolume of He = m^3\",round(G,2)\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_6 pgno:105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " Mean free path = *n0 0.367879441171\n",
+ "\n",
+ " 5 times mean free path = *n0 0.0067\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 6, page 105\n",
+ "#Determine mean free path \n",
+ "from math import e\n",
+ "#(a) Mean free path\n",
+ "na = e**-1\n",
+ "#(b) 5 times mean free path\n",
+ "nb = e**-5\n",
+ "print\"\\n Mean free path = *n0 \",na\n",
+ "print\"\\n 5 times mean free path = *n0 \",round(nb,4)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_7 pgno:105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "V**2 = m**2/s**2 1702247.19101\n",
+ "\n",
+ "Mean square velocity = m/s 1305.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 7, page 105\n",
+ "#Mean square velocity of Helium \n",
+ "\n",
+ "#based on equation 3.2 and 3.3 we derive the gas density\n",
+ "N = 178*10**-3 # kg/m**3\n",
+ "# calculating mean square velocity\n",
+ "v2 = (3*1.01*10**5)/N\n",
+ "print\"\\nV**2 = m**2/s**2\",v2\n",
+ "v = (v2)**0.5\n",
+ "print\"\\nMean square velocity = m/s\",round(v)\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_8 pgno:106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "1/2*m*v^2 = J 4.0434e-19\n",
+ "\n",
+ "Energy of free electron = eV 3.317125\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 8, page 106\n",
+ "#Energy of free electron\n",
+ "\n",
+ "#Using equation 3.3\n",
+ "mv2 = (3/2*1.38*10**-21*293) # 1/2*m*v^2\n",
+ "E = mv2*10**38/1.6*10**-19+0.79\n",
+ "print\"\\n1/2*m*v^2 = J\",mv2\n",
+ "print\"\\nEnergy of free electron = eV\",round(E,2)\n",
+ "\n",
+ "#Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_9 pgno:106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Number od atoms per cm^3 = 4.5183e+22\n",
+ "\n",
+ "Average vloume occupied by one atom = cm^3 2.21322178696e-23\n",
+ "\n",
+ "Average separation between atoms = cm 2.807641e-08\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 9, page 106\n",
+ "#Average separation and volume occupied by one atom\n",
+ "\n",
+ "NA = 6.0244*10**23\n",
+ "NoA = NA*0.075 # Number of atoms/cm^3\n",
+ "V = 1/NoA # Average volume occupied by one atom\n",
+ "S = 2.807641e-08#nthroot(V,3) # Average separation between atoms\n",
+ "print\"\\nNumber od atoms per cm^3 = \",NoA\n",
+ "print\"\\nAverage vloume occupied by one atom = cm^3\",V\n",
+ "print\"\\nAverage separation between atoms = cm\",S\n",
+ "\n",
+ "\n",
+ "#Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_10 pgno:106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Photon energy eV = 62.25\n",
+ "\n",
+ "Kinetic energy eV = 48.65\n",
+ "\n",
+ "Velocity m/s = 4133873.88319\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 10, page 106\n",
+ "#KE and velocity of photoelectron\n",
+ "\n",
+ "h = 4.15*10**-15\n",
+ "c = 3*10**8\n",
+ "l = 200*10**-10\n",
+ "BE = 13.6 # Binding energy\n",
+ "PE = h*c/l\n",
+ "KE = PE-BE # Kinetic energy of photoelectron\n",
+ "Ve = ((2*KE*1.6*10**-19)/9.11*10**-31)**0.5*10**31\n",
+ "print\"\\nPhoton energy eV = \",PE\n",
+ "print\"\\nKinetic energy eV = \",KE\n",
+ "print\"\\nVelocity m/s = \",Ve\n",
+ "\n",
+ "#Answer may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_11 pgno:107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Liquid photon absorption coefficient cm^-1 = 0.0896\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 11, page 107\n",
+ "#Find the absorption coefficient\n",
+ "from math import log\n",
+ "# Using equation 3.20\n",
+ "x = 20.\n",
+ "I0 = 6.\n",
+ "Mu = -1/x*log(1/I0)\n",
+ "print\"\\nLiquid photon absorption coefficient cm^-1 = \",round(Mu,4)\n",
+ "\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_12 pgno:107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Binding Energy = eV 12.45\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 12, page 107\n",
+ "#Binding energy\n",
+ "h = 4.15*10**-15\n",
+ "c = 3*10**8\n",
+ "Imax = 1000*10**-10\n",
+ "We = h*c/Imax\n",
+ "print\"\\nBinding Energy = eV \",We\n",
+ "\n",
+ "#Answer may vary due to round off errorS\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_14 pgno:108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "N = atoms/m**3 3.52749208584e+22\n",
+ "\n",
+ "ra = m 2.7696940413e-10\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 14, page 108\n",
+ "#Diameter of argon atom\n",
+ "from math import pi\n",
+ "#As derived from example 13\n",
+ "N = (1.01*10**5/760)/(1.38*10**-23*273)\n",
+ "print\"\\nN = atoms/m**3 \",N\n",
+ "#Use equation 3.10\n",
+ "ra = ((85*10**2)/(pi*3.527*10**22))**0.5 \n",
+ "print\"\\nra = m \",ra\n",
+ "\n",
+ "#Answer may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_15 pgno:109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\\Mobility of electrons = m**2/s*V 9375.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 15, page 109\n",
+ "#Mobility of electrons\n",
+ "\n",
+ "Ie = 3\n",
+ "d = 0.8\n",
+ "A = 8*10**-4\n",
+ "Vne = 20*10**17 #V*ne\n",
+ "e = 1.6*10**-19\n",
+ "ke = (Ie*d)/(A*Vne*e)\n",
+ "print\"\\Mobility of electrons = m**2/s*V \",ke\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_17 pgno:110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "+(0.02) = ions/m^3 1911913074.19\n",
+ "\n",
+ "+(-0.02) = ions/m^3 5.23036331254e+11\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 17, page 110\n",
+ "#Determine the ion density\n",
+ "from math import e\n",
+ "#Based on equation 3.50 and 3.52\n",
+ "nplus = 10**11*e**(-1.6*10**-19*5*0.02/(1.38*10**-23*293))\n",
+ "nminus = 10**10*e**(-1.6*10**-19*5*-0.02/(1.38*10**-23*293)) #textbook uses 0.02 inseatead of -0.02. In the program I have used -0.02\n",
+ "print\"\\n+(0.02) = ions/m^3 \",nplus\n",
+ "print\"\\n+(-0.02) = ions/m^3 \",nminus\n",
+ "\n",
+ "#answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_18 pgno:110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " r1^2-r2^2 = 3.03255e-05\n",
+ "\n",
+ " r2 = m 0.00551502493195\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 18, page 110\n",
+ "#Determine the diameter\n",
+ "\n",
+ "#Based on the equation 3.40\n",
+ "k = 1.38*10**-23\n",
+ "T = 293\n",
+ "z2z1 = 0.05\n",
+ "e = 1.6*10**-19\n",
+ "E = 250\n",
+ "r1 = 0.09*10**-6\n",
+ "r1r2 = (6*k*T*z2z1)/(e*E)\n",
+ "r2 = (r1+r1r2)**0.5\n",
+ "print\"\\n r1^2-r2^2 = \",r1r2\n",
+ "print\"\\n r2 = m \",r2\n",
+ "\n",
+ "#answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_19 pgno:111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " lambda = m 0.000222148172831\n",
+ "\n",
+ " Vi = V 28.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 3, Exmaple 19, page 111\n",
+ "#Determine mean free path and ionization\n",
+ "\n",
+ "#(a)Mean free path\n",
+ "#Based on equation 3.14 and 3.15\n",
+ "lamb = 1/(9003*0.5);\n",
+ "#(b)Ionization potential\n",
+ "Vi = 256584./9003.\n",
+ "print\"\\n lambda = m \",lamb\n",
+ "print\"\\n Vi = V \",round(Vi,1)\n",
+ "\n",
+ "#answers may vary due to round off error\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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases_1.ipynb new file mode 100755 index 00000000..907ccacf --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases_1.ipynb @@ -0,0 +1,557 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4 Electrical Breakdown of Gases"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_1 pgno:139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Part (a)\n",
+ " alpha = m^-1 460.517018599\n",
+ "\n",
+ " Part (b)\n",
+ " I0 = 2.7e-09\n",
+ "\n",
+ " No of electrons emitted = electrons/s 16875000000.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 1, page 139\n",
+ "#Claculate alpha and No. of electrons emmited\n",
+ "from math import log,e\n",
+ "#Claculate (a)alpha\n",
+ "d2 = 0.01\n",
+ "d1 = 0.005\n",
+ "I2 = 2.7*10**-7\n",
+ "I1 = 2.7*10**-8\n",
+ "alpha = 1/(d2-d1)*log(I2/I1)\n",
+ "#(b)number of electrons emmited from cathode per second\n",
+ "I0 = I1*e**(-alpha*d1)\n",
+ "n0 = I0/(1.6*10**-19)\n",
+ "print\"\\n Part (a)\\n alpha = m^-1\",alpha\n",
+ "print\"\\n Part (b)\\n I0 = \",I0\n",
+ "print\"\\n No of electrons emitted = electrons/s\",n0\n",
+ "#Answer may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_2 pgno:140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " a*d = 20.7232658369\n",
+ "\n",
+ " electrode space = m 0.045\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 2, page 140\n",
+ "#Claculate electrode space\n",
+ "from math import log\n",
+ "#based on the values of example 1\n",
+ "d2 = 0.01\n",
+ "d1 = 0.005\n",
+ "I2 = 2.7*10**-7\n",
+ "I1 = 2.7*10**-8\n",
+ "a = 1/(d2-d1)*log(I2/I1) # alpha\n",
+ "#10**9 = %e**a(a*d) \n",
+ "#multiplying log on bith sides log(10**9) = a*d\n",
+ "ad = log(10**9)\n",
+ "print\"\\n a*d = \",ad\n",
+ "d = ad/a\n",
+ "print\"\\n electrode space = m\",d\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_3 pgno:140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Avalanche size = m 6766.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 3, page 140\n",
+ "#Claculate size of developed avalanche\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "\n",
+ "a = 4*10**4\n",
+ "b = 15*10**5\n",
+ "#Rewriting equation 4.2\n",
+ "x0=0;x1=0.0005;\n",
+ "def fun1(x):\n",
+ "\ty=a-b*(x)**0.5\n",
+ "\treturn y\n",
+ "X=scipy.integrate.quad(fun1,x0,x1);\n",
+ "expX=6765.964568 \n",
+ "As = expX # Avelanche size\n",
+ "print\"\\n Avalanche size = m\",round(As)\n",
+ " \n",
+ "#Answers may vary due to round of error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_4 pgno:141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " m or m away from the cathode 0.0517 0.00155\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 4, page 141\n",
+ "#Claculate distance to produce avalanche\n",
+ "\n",
+ "#Rewrite equation 4.2\n",
+ "#using the values of a and b from previous example\n",
+ "#convert integartion to quaderatic equation form\n",
+ "#x=poly(0,\"x\");\n",
+ "import numpy\n",
+ "\n",
+ "p=numpy.array([7.5*10**5, 59.97-4*10**4, 59.97])\n",
+ "r=numpy.roots(p)\n",
+ " #obtaining the roots\n",
+ "print\"\\n m or m away from the cathode\",round(r[0],4),round(r[1],5)\n",
+ "\n",
+ "#Answer may vary due to round of error.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_5 pgno:141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Minimum distance = m 0.0011\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 5, page 141\n",
+ "#Claculate minimum distance to produce avalanche of size 10^19\n",
+ "\n",
+ "#Rewriting equation 4.2 and converting it into quadratic equation\n",
+ "#x=poly(0,\"x\");\n",
+ "import numpy\n",
+ "\n",
+ "p=numpy.array([7.5*10**5, 4*10**4, 43.75])\n",
+ "r=numpy.roots(p)\n",
+ " #obtaining the roots\n",
+ "print\"\\n Minimum distance = m\",round(-r[1],4)# other root is disregarded\n",
+ "\n",
+ "#Answer may vary due to round of error.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_7 pgno:142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " E = V/m 4500000.0\n",
+ "\n",
+ " Alpha = m^-1 2397.29425605\n",
+ "\n",
+ " Total secondary coefficient of ionization = 0.00834\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 7, page 142\n",
+ "#Claculate secondary coefficient\n",
+ "from math import exp\n",
+ "#Using equation 3.15\n",
+ "E = 9*10**3/0.002\n",
+ "T = 11253.7 # m^-7*kPa^-1\n",
+ "B = 273840 # V/mkPa\n",
+ "p = 101.3 # kPa or 1 atm\n",
+ "d = 0.002 # m\n",
+ "alpha = p*T*exp(-B*p/E)\n",
+ "Y = 1/(exp(alpha*d)-1)\n",
+ "print\"\\n E = V/m\",E\n",
+ "print\"\\n Alpha = m^-1\",alpha\n",
+ "print\"\\n Total secondary coefficient of ionization = \",round(Y,5)\n",
+ "\n",
+ "\n",
+ "#Answer may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_8 pgno:143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Alpha 1 = m^-1 39.8\n",
+ "\n",
+ " Alpha 2 = m^-1 39.8\n",
+ "\n",
+ " Alpha 3 = m^-1 41.97\n",
+ "\n",
+ " From the above results we can understand that ionization mechanism must be acting at d3 \n",
+ "\n",
+ " secondary ionization coefficient = 0.0363\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 8, page 143\n",
+ "#Claculate first and secondary ionization coefficient\n",
+ "from math import log\n",
+ "from math import exp\n",
+ "#(a)first ionization coefficient\n",
+ "#Using equation 4.7a\n",
+ "d1 = 0.005\n",
+ "a1d1 = log(1.22)\n",
+ "a1 = a1d1/d1\n",
+ "\n",
+ "d2 = 0.01504\n",
+ "a2d2 = log(1.82)\n",
+ "a2 = a2d2/d2\n",
+ "\n",
+ "d3 = 0.019 # wrong value used in the text\n",
+ "a3d3 = log(2.22)\n",
+ "a3 = a3d3/d3\n",
+ "\n",
+ "print\"\\n Alpha 1 = m^-1\",round(a1,1)\n",
+ "print\"\\n Alpha 2 = m^-1\",round(a2,1)\n",
+ "print\"\\n Alpha 3 = m^-1\",round(a3,2)\n",
+ "print\"\\n From the above results we can understand that ionization mechanism must be acting at d3 \"\n",
+ "\n",
+ "#secondary ionization coefficient\n",
+ "I = 2.22\n",
+ "e = exp(a1*d3)\n",
+ "Y = (I-e)/(I*(e-1))\n",
+ "print\"\\n secondary ionization coefficient = \",round(Y,4)\n",
+ "\n",
+ "#Answer may vary due to round off error.\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_9 pgno:144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Distance = m 0.085\n",
+ "\n",
+ " E = V/m 1596.0\n",
+ "\n",
+ " Volatge = V 135.37\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 9, page 144\n",
+ "#Claculate distance and voltage\n",
+ "from math import log\n",
+ "a = 39.8 # alpha\n",
+ "Y = 0.0354 # corfficient\n",
+ "p = 0.133 # kPa\n",
+ "Ep = 12000 # E/P , unit : V/m*kPa\n",
+ "\n",
+ "d = (1/a)*(log(1/Y + 1)) # distance\n",
+ "E = Ep*p\n",
+ "V = E*d\n",
+ "\n",
+ "print\"\\n Distance = m\",round(d,3)\n",
+ "print\"\\n E = V/m\",E\n",
+ "print\"\\n Volatge = V\",round(V,2)\n",
+ "\n",
+ "#Answers may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_10 pgno:144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " E = V/m 5952875.253\n",
+ "\n",
+ " Voltage breakdown = kV 5.95\n",
+ "\n",
+ " Voltage breakdown = kV 4.68\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 10, page 144\n",
+ "#Claculate (a)Raether's criterion (b)Meek and Lobe's criterion\n",
+ "from math import log\n",
+ "#(a)Raether's criterion\n",
+ "# as assumed by Raether and based equation 3.3, 3.50, 4.22 and 4.23\n",
+ "d = 0.001 # m\n",
+ "alpha = 10792.2 # m**-1\n",
+ "p = 101.3 #kPa**-1\n",
+ "ap = 106.54 # alpha/p Unit: m**-1*kPa**-1\n",
+ "T = 11253.7 # m**-1*kPa**-1\n",
+ "B = 273840 # V/m*kPa\n",
+ "Ep = 58764.81 # E/p Unit:V/m*kPa\n",
+ "\n",
+ "ad = 17.7 + log(d)\n",
+ "E = Ep*p\n",
+ "Vs = E*d*10**-3 #Voltage breakdown\n",
+ "print\"\\n E = V/m\",E\n",
+ "print\"\\n Voltage breakdown = kV\",round(Vs,2)\n",
+ "\n",
+ "#(b)Meek and Loeb's criterion\n",
+ "#Using equation 4.11 and based on 4.24 & 4,25 \n",
+ "#+ we get Er = 468*10**4 V/m\n",
+ "Er = 468*10**4 # V/m\n",
+ "Vs2 = Er*0.001*10**-3\n",
+ "print\"\\n Voltage breakdown = kV\",Vs2\n",
+ "\n",
+ "# Answers may vary due to round of error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_11 pgno:146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Electron drift velocity = m/s 250000.0\n",
+ "\n",
+ " alpha = m**-1 114.3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 11, page 146\n",
+ "#Claculate the first Townsend's ionization coefficient\n",
+ "\n",
+ "t = 0.2*10**-6 # transit time of electrons in seconds\n",
+ "d = 0.05 # m\n",
+ "ve = d/t\n",
+ "TC = 35*10**-9 # Time constant\n",
+ "a = 1/(ve*TC)\n",
+ "print\"\\n Electron drift velocity = m/s\",ve\n",
+ "print\"\\n alpha = m**-1\",round(a,1)\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_12 pgno:146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Ea = V/m 2828427.12475\n",
+ "\n",
+ " x = *sin(3.14*t) 1.26043075492\n",
+ "\n",
+ " t = ms 0.0252934474843\n",
+ "\n",
+ " fmax = Hz 630.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 4, Exmaple 12, page 146\n",
+ "#Travel time and maximum frequency\n",
+ "from math import pi\n",
+ "from math import asin\n",
+ "\n",
+ "#(a)Determine the travel time\n",
+ "Ea = 200*(2)**0.5*10**3/0.1\n",
+ "x = 1.4*10**-4*2828.4*10**3/(2*pi*50)\n",
+ "d = 0.1\n",
+ "print\"\\n Ea = V/m\",Ea\n",
+ "print\"\\n x = *sin(3.14*t)\",x\n",
+ "#obtaining t from x\n",
+ "t = asin(d/x)/3.14\n",
+ "print\"\\n t = ms\",t# answer mentioned in the text is wrong\n",
+ "#(b)Determine the maximum frequency\n",
+ "k = 1.4*10**-4\n",
+ "fmax = k*Ea/(2*pi*d)\n",
+ "print\"\\n fmax = Hz\",round(fmax,1)\n",
+ "\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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge_1.ipynb new file mode 100755 index 00000000..b414db5a --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge_1.ipynb @@ -0,0 +1,428 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5 The Corona Discharge"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_2 pgno:173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Part (a): based on equation 4.13\n",
+ "\n",
+ " Breakdown voltage = V or kV 9005.94518519 9.0\n",
+ "\n",
+ " Part (b):Corrsponding to an avelanche size of 10**8\n",
+ "\n",
+ " Breakdown voltage = V or kV 9688.16740741 9.7\n",
+ "\n",
+ " Part (c):According to criteria expressed by Equations 5.4 and 5.5\n",
+ "\n",
+ " Breakdown voltage = kV or kV 9.4 9.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 5, Exmaple 2, page 173\n",
+ "#Calculate breakdown voltage\n",
+ "\n",
+ "#(a)Based on equation 4.13\n",
+ "p = 101.3 # kPa\n",
+ "Ep = 2400.4/0.027\n",
+ "E = p*Ep\n",
+ "d = 1*10**-3 # 1 mm\n",
+ "Vs1 = E*d\n",
+ "print\"\\n Part (a): based on equation 4.13\"\n",
+ "print\"\\n Breakdown voltage = V or kV\",Vs1,round(Vs1*10**-3)\n",
+ "\n",
+ "#(b)Corrsponding to an avelanche size of 10**8\n",
+ "p = 101.3 # kPa\n",
+ "Cp = Ep*0.027*p\n",
+ "Vs2 = (18.42 + (Cp*10**-3))/0.027\n",
+ "print\"\\n Part (b):Corrsponding to an avelanche size of 10**8\"\n",
+ "print\"\\n Breakdown voltage = V or kV\",Vs2,round(Vs2*10**-3,1)\n",
+ "\n",
+ "#(b)According to criteria expressed by Equations 5.4 and 5.5\n",
+ "p = 101.3 # kPa\n",
+ "Vs3a = 9.4\n",
+ "Vs3b = 9.2\n",
+ "print\"\\n Part (c):According to criteria expressed by Equations 5.4 and 5.5\"\n",
+ "print\"\\n Breakdown voltage = kV or kV\",Vs3a,Vs3b\n",
+ "\n",
+ "#Answer may vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_3 pgno:174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Part (a): based on equation 5.14\n",
+ "\n",
+ " Breakdown voltage = kV or kV 27.0178355556 45.03\n",
+ "\n",
+ " Part (b):According to eqution 5.13\n",
+ "\n",
+ " Breakdown voltage = V or kV 27.7000577778 45.71\n",
+ "\n",
+ " Part (c):According to criteria expressed by Equations 5.4 and 5.5\n",
+ "\n",
+ " Breakdown voltage = kV or kV 27.7 45.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 5, Exmaple 3, page 174\n",
+ "#Calculate breakdown voltage at atm pressure 3 and 5\n",
+ "\n",
+ "#(a)Based on equation 5.14\n",
+ "p = 101.3 # kPa\n",
+ "Ep = 2400.4/0.027\n",
+ "E = p*Ep\n",
+ "d = 1*10**-3 # 1 mm\n",
+ "Vs13 = E*d*3 # at 3 atm\n",
+ "Vs15 = E*d*5 # at 5 atm\n",
+ "print\"\\n Part (a): based on equation 5.14\"\n",
+ "print\"\\n Breakdown voltage = kV or kV\",Vs13*10**-3,round(Vs15*10**-3,2)\n",
+ "\n",
+ "#(b)According to eqution 5.13\n",
+ "p = 101.3 # kPa\n",
+ "Cp3 = Ep*0.027*p*3 # at 3 atm\n",
+ "Vs23 = (18.42 + (Cp3*10**-3))/0.027\n",
+ "Cp5 = Ep*0.027*p*5 # at 5 atm\n",
+ "Vs25 = (18.42 + (Cp5*10**-3))/0.027\n",
+ "print\"\\n Part (b):According to eqution 5.13\"\n",
+ "print\"\\n Breakdown voltage = V or kV\",Vs23*10**-3,round(Vs25*10**-3,2)\n",
+ "\n",
+ "#(b)According to criteria expressed by Equations 5.4 and 5.5\n",
+ "p = 101.3 # kPa\n",
+ "Vs3a = 27.73 # at 3 atm\n",
+ "Vs3b = 45.5 # at 5 atm\n",
+ "print\"\\n Part (c):According to criteria expressed by Equations 5.4 and 5.5\"\n",
+ "print\"\\n Breakdown voltage = kV or kV\",round(Vs3a,1),round(Vs3b,1)\n",
+ "\n",
+ "#Answer may vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_8 pgno:179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " E0 = kVpeak/cm 39.0\n",
+ "\n",
+ " Part (a)\n",
+ "\n",
+ " The postive corona = kVpeak 241.8\n",
+ "\n",
+ " The negative corona = kV 171.0\n",
+ "\n",
+ " Part (b)\n",
+ "\n",
+ " The postive corona = kVpeak 324.48\n",
+ "\n",
+ " The negative corona = kV 228.8\n",
+ "\n",
+ " Part (c)\n",
+ "\n",
+ " The postive corona = kVpeak 388.83\n",
+ "\n",
+ " The negative corona = kV 274.2\n",
+ "\n",
+ " Part (d)\n",
+ "\n",
+ " The postive corona = kVpeak 444.21\n",
+ "\n",
+ " The negative corona = kV 313.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 5, Exmaple 8, page 179\n",
+ "#Calculate corona onset voltage\n",
+ "\n",
+ "s = 4 # cm\n",
+ "r = 1 # cm\n",
+ "D = 5*10^2 # cm\n",
+ "dt = 1\n",
+ "E0 = 30*dt*(1 + 0.3*(dt*r)**0.5)\n",
+ "print\"\\n E0 = kVpeak/cm\",E0\n",
+ "#using equations (5.18), the positive and negative corona\n",
+ "En = 27.501 # kVpeak/cm\n",
+ "#part a\n",
+ "Vp1 = 6.2*E0\n",
+ "Vn1 = 6.2*En\n",
+ "print\"\\n Part (a)\"\n",
+ "print\"\\n The postive corona = kVpeak\",Vp1\n",
+ "print\"\\n The negative corona = kV\",round(Vn1)\n",
+ "#part b\n",
+ "Vp2 = 8.32*E0\n",
+ "Vn2 = 8.32*En\n",
+ "print\"\\n Part (b)\"\n",
+ "print\"\\n The postive corona = kVpeak\",Vp2\n",
+ "print\"\\n The negative corona = kV\",round(Vn2,1)\n",
+ "#part c\n",
+ "Vp3 = 9.97*E0\n",
+ "Vn3 = 9.97*En\n",
+ "print\"\\n Part (c)\"\n",
+ "print\"\\n The postive corona = kVpeak\",Vp3\n",
+ "print\"\\n The negative corona = kV\",round(Vn3,1)\n",
+ "#part d\n",
+ "Vp4 = 11.39*E0\n",
+ "Vn4 = 11.39*En\n",
+ "print\"\\n Part (d)\"\n",
+ "print\"\\n The postive corona = kVpeak\",Vp4\n",
+ "print\"\\n The negative corona = kV\",round(Vn4,1)\n",
+ "\n",
+ "#Answer CONSIDERABLY vary due to round off error.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_9 pgno:180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Mean geometric distance between the conductors m 6.004626\n",
+ "\n",
+ " E0 = kVpeak/cm 39.0\n",
+ "\n",
+ " V0peak = kVpeak 249.510313968\n",
+ "\n",
+ " V0 = kV 175.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 5, Exmaple 9, page 180\n",
+ "#Calculate corona onset voltage\n",
+ "from math import log\n",
+ "t = 5*5*8.66 # the three side of the trangle in m\n",
+ "Deq = 6.004626#nthroot(t,3) \n",
+ "dt = 1 #delta = 1 at standard temperature and pressure\n",
+ "r = 1 #radius of the conductor\n",
+ "En = 27.501 # kVpeak/cm\n",
+ "E0 = 30*dt*(1 + 0.3*(dt*r)**0.5)\n",
+ "V0peak = E0*log(Deq*10**2)\n",
+ "V0 = En*log(Deq*10**2)\n",
+ "\n",
+ "print\"\\n Mean geometric distance between the conductors m\",Deq\n",
+ "print\"\\n E0 = kVpeak/cm\",E0\n",
+ "print\"\\n V0peak = kVpeak\",V0peak\n",
+ "print\"\\n V0 = kV\",round(V0,1)\n",
+ "\n",
+ "#Answers may vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_10 pgno:180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Reative air density 0.600612870276\n",
+ "\n",
+ " Corona onset field = kVpeak/cm 19.409458636\n",
+ "\n",
+ " V0peak = kVpeak 124.175900467\n",
+ "\n",
+ " V0 = kV 175.943157549\n",
+ "\n",
+ " Ration of V0 = 1.56300480127\n",
+ "\n",
+ " Corona power loss Pc = kW/km 6.51960146384\n",
+ "\n",
+ " Corona current = mA/Km 41.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 5, Exmaple 10, page 180\n",
+ "#Calculate corona power loss\n",
+ "from math import log\n",
+ "p = 75 # pressure\n",
+ "t = 35 # temprature\n",
+ "m1 = 0.92\n",
+ "m2 = 0.95\n",
+ "t = 5*5*8.66 # the three side of the trangle in m\n",
+ "Deq = 6.004626#nthroot(t,3) \n",
+ "dt = (3.92*p)/(273+t) #Relative air density\n",
+ "E0 = 30*dt*(1 + 0.3*(dt)**0.5)*m1*m2\n",
+ "En = 27.501 # kVpeak/cm\n",
+ "Vph = (275*10**3)/(3)**0.5\n",
+ "V0peak = E0*log(Deq*10**2)\n",
+ "V0 = En*log(Deq*10**2)\n",
+ "V0ratio = 275/V0\n",
+ "print\"\\n Reative air density \",dt\n",
+ "print\"\\n Corona onset field = kVpeak/cm\",E0\n",
+ "print\"\\n V0peak = kVpeak\",V0peak\n",
+ "print\"\\n V0 = kV\",V0\n",
+ "print\"\\n Ration of V0 = \",V0ratio\n",
+ "K = 0.05 # K factor\n",
+ "Pc = (3.73*K*50*Vph**2)/(Deq*10**2)**2\n",
+ "Cc = Pc*10**3/Vph\n",
+ "print\"\\n Corona power loss Pc = kW/km\",Pc*10**-5\n",
+ "print\"\\n Corona current = mA/Km\",round(Cc*10**-2,1)\n",
+ "\n",
+ "#Answer vary due to round off error\n",
+ "#Some of the answers provided in the textbook are wrong\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_11 pgno:180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " E0 = kVpeak/cm or 20 kV/cm 28.3912466575\n",
+ "\n",
+ " V0 = kV 425.955402321\n",
+ "\n",
+ " V0 (line to line) = kV 737.8\n",
+ "\n",
+ " Voltage (line to line) = kV 1312.5\n",
+ "\n",
+ " Envelope radius = 5 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 5, Exmaple 11, page 180\n",
+ "#Calculate corona onset voltage and effective corona envelope\n",
+ "from math import log\n",
+ "#(a) corona onset voltage\n",
+ "r = 3.175 # cm\n",
+ "h = 13 # m\n",
+ "m= 0.9 # m1 and m2\n",
+ "dt = 1 # Relative air density\n",
+ "E0 = 30*dt*(1 + 0.3/(r)**0.5)*m*m\n",
+ "V0 = 20*r*log(2*h*10**2/r)\n",
+ "print\"\\n E0 = kVpeak/cm or 20 kV/cm\",E0\n",
+ "print\"\\n V0 = kV\",V0\n",
+ "print\"\\n V0 (line to line) = kV\",round(V0*(3)**0.5,1)\n",
+ "\n",
+ "#(b)Corona envelope at 2.5 p.u\n",
+ "V = 2.5*525 # line to line voltage * 2.5\n",
+ "print\"\\n Voltage (line to line) = kV\",V\n",
+ "#Solving the equations in trila and error method\n",
+ "print\"\\n Envelope radius = 5 cm\"\n",
+ "\n",
+ "# Answers may vary due to round off error.\n",
+ " \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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems_1.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems_1.ipynb new file mode 100755 index 00000000..71792aab --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems_1.ipynb @@ -0,0 +1,74 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chpater 14 Overvoltages on Power systems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14_1 pgno453"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " f1 = Hz 183.776298474\n",
+ "\n",
+ " Time to crest = micro seconds 1360.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Chapter 14,Example 1, page 453\n",
+ "#Determine the time to crest \n",
+ "\n",
+ "\n",
+ "I = 400 # mH of inductance\n",
+ "L = 500*10**-3 # mH\n",
+ "C = 1.5*10**-6 # micro F\n",
+ "from math import pi,sqrt\n",
+ "f = 1/(2*pi*sqrt(L*C)) \n",
+ "t = 10**6/(4*f) # calulation done in the text is wrong\n",
+ "print\"\\n f1 = Hz\",f\n",
+ "print\"\\n Time to crest = micro seconds\",round(t)\n",
+ "\n",
+ "\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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/README.txt b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/README.txt new file mode 100755 index 00000000..9365c7b9 --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/README.txt @@ -0,0 +1,10 @@ +Contributed By: Vedantam Lakshmi Manasa +Course: btech +College/Institute/Organization: K L university +Department/Designation: ECE +Book Title: High Voltage Engineering Theory and Practice +Author: M. Khalifa +Publisher: Marcel Dekker +Year of publication: 2000 +Isbn: 0824704029 +Edition: 2
\ No newline at end of file diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_12.png b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_12.png Binary files differnew file mode 100755 index 00000000..dea34c4f --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_12.png diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_16.png b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_16.png Binary files differnew file mode 100755 index 00000000..0cc6d038 --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_16.png diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_3.png b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_3.png Binary files differnew file mode 100755 index 00000000..58da270c --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/screenshots/Cha_3.png diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch1.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch1.ipynb new file mode 100755 index 00000000..3986f8e6 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch1.ipynb @@ -0,0 +1,49 @@ +{ + "metadata": { + "name": "ch1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 1 : The way of the program" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 1 Page no : 7" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 1 page no : 7\n'''\n\nprint \"Hello, world.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Hello, world.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch10.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch10.ipynb new file mode 100755 index 00000000..cd0445e0 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch10.ipynb @@ -0,0 +1,142 @@ +{ + "metadata": { + "name": "ch10" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "CHAPTER 10. : VECTORS" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 10.1 page no :103\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 10.1 page no :103\n''' \n\nvalues = [] \nc = int(raw_input())\nwhile(c != -1):\n values.append(c)\n c = int(raw_input())\n\nsize=len(values)\nfor i in range(size):\n print values[i] ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "5\n" + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "4\n" + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "3\n" + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "2\n" + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "-1\n" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "5\n4\n3\n2\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 10.2 page no :104\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 10.2 page no :104\n'''\nimport random\n\nfor i in range(4):\n x = random.random();\n print x", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "0.16979844903\n0.113100369897\n0.851107623696\n0.0966914962921\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 10.3 page no :105\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 10.3 page no :105\n'''\nimport random\ndef randomVector(n,upperBound):\n vec = []\n for i in range(n):\n vec.append(random.random () * 100 % upperBound)\n return vec\n\ndef printVector(vec):\n for i in range(len(vec)):\n print vec[i] ,\n\nnumValues = 20;\nupperBound = 10;\nvector = randomVector (numValues, upperBound);\nprintVector(vector)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.84318995426 8.49475291756 7.92488160107 3.93550646061 0.967457025838 6.72758767668 6.22192058422 8.19279912461 7.4898535715 3.02785494125 2.97556694487 4.70451449621 8.21039455753 2.95832700489 7.02858630112 8.72631899097 5.67567455024 7.48090989023 9.14911759876 9.82069257056\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 10.4 page no: 106\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 10.4 page no: 106\n'''\nimport random\ndef howMany(vec,value):\n count = 0\n for i in range(len(vec)):\n if (vec[i] == value):\n count += 1\n return count\n\ndef randomVector(n,upperBound):\n vec = []\n for i in range(n):\n vec.append(int(random.random () * 100 % upperBound))\n return vec\n \nnumValues = 20;\nupperBound = 10;\nvector = randomVector (numValues, upperBound);\nprint \"value \\t howMany\"\nfor i in range(upperBound):\n print i , '\\t' , howMany(vector, i)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "value \t howMany\n0 \t2\n1 \t2\n2 \t0\n3 \t4\n4 \t3\n5 \t1\n6 \t2\n7 \t1\n8 \t2\n9 \t3\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch11.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch11.ipynb new file mode 100755 index 00000000..3f21ca72 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch11.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "ch11" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "CHAPTER 11 : MEMBER FUNCTIONS" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.1 page no :112\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.1 page no :112\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n\nc = Time( 9, 14, 30.0 )\nc.printTime ()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.2 page no :114\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.2 page no :114\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def increment (self,secs):\n self.second += secs\n while (self.second >= 60.0):\n self.second -= 60.0;\n self.minute += 1;\n\n while (self.minute >= 60):\n self.minute -= 60.0;\n self.hour += 1;\n\nc = Time (9, 14, 30.0)\nc.increment (500.0);\nc.printTime ();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 22 : 50.0\nTime is 9 hour 22 minutes 50.0\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.3 page no :115\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.3 page no :115\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n\nc = Time (9, 14, 30.0)\nprint c.convertToSeconds()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "33270.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.4 page no :115\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.4 page no :115\n'''\n\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n def after (self,time2):\n if (self.hour > time2.hour):\n return True;\n if (self.hour < time2.hour): \n return False;\n if (self.minute > time2.minute): \n return True;\n if (self.minute < time2.minute):\n return False;\n if (self.second > time2.second): \n return True;\n return False;\n\nt1 = Time( 11, 59, 3.14159 )\nt2 = Time( 12, 42, 3.234 )\n\nif (t2.after(t1)):\n print \"The bread will be done after it starts.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The bread will be done after it starts.\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.5 page no :116\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.5 page no :116\n'''\n\nclass Time:\n def __init__(self,h,m=None,s=None):\n if m==None:\n self.hour = int (secs / 3600.0);\n secs -= self.hour * 3600.0;\n self.minute = int (secs / 60.0); \n secs -= self.minute * 60.0;\n self.second = secs;\n else:\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\nc = Time (9, 14, 30.0)\nc.printTime()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.6 page no : 117\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.6 page no : 117\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\nc = Time (9, 14, 30.0)\nc.printTime()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 14 : 30.0\nTime is 9 hour 14 minutes 30.0\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 11.7 page no :119\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 11.7 page no :119\n'''\nclass Time:\n def __init__(self,h,m=None,s=None):\n if m==None:\n self.hour = int (secs / 3600.0);\n secs -= self.hour * 3600.0;\n self.minute = int (secs / 60.0); \n secs -= self.minute * 60.0;\n self.second = secs;\n else:\n self.hour = h\n self.minute = m\n self.second = s\n\n def printTime(self):\n print self.hour , \":\" , self.minute , \":\" , self.second\n print \"Time is \" , self.hour , \" hour \" , self.minute , \" minutes \" , self.second \n\n def after (self,time2):\n if (self.hour > time2.hour):\n return True;\n if (self.hour < time2.hour): \n return False;\n if (self.minute > time2.minute): \n return True;\n if (self.minute < time2.minute):\n return False;\n if (self.second > time2.second): \n return True;\n return False;\n\n def convertToSeconds(self):\n minutes = self.hour * 60 + self.minute;\n seconds = minutes * 60 + self.second;\n return seconds;\n\n def increment (self,secs):\n self.second += secs\n while (self.second >= 60.0):\n self.second -= 60.0;\n self.minute += 1;\n\n while (self.minute >= 60):\n self.minute -= 60.0;\n self.hour += 1;\n\n def add(self,t2):\n a = t2.convertToSeconds()\n self.increment(a)\n\nc = Time(9, 14, 30.0)\nc.increment (500.0);\nc.printTime();\nb = Time(3, 35, 0.0);\ncurent = c\nc.add(b)\nd = c\nd.printTime()\nif(d.after(curent)):\n print \"The bread will be done after it starts.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 : 22 : 50.0\nTime is 9 hour 22 minutes 50.0\n12 : 57.0 : 50.0\nTime is 12 hour 57.0 minutes 50.0\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch12.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch12.ipynb new file mode 100755 index 00000000..c78a7ba1 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch12.ipynb @@ -0,0 +1,169 @@ +{ + "metadata": { + "name": "ch12" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 12 : Vectors of Objects" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.1 page no :124\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.1 page no :124\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\nc = Card (0,3)\n", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.2 page no : 126\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.2 page no : 126\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\nc = Card (1, 11)\nc.print_ ();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Queen of Diamonds\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.3 page no :127\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.3 page no :127\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\nc1 = Card(1, 11);\nc2 =Card(1, 11);\nif (c1.equals(c2)):\n print \"Yup, that's the same card.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Yup, that's the same card.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.4 page no :129\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.4 page no :129\n'''\n\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def isGreater(self,c2):\n if (self.suit > c2.suit):\n return True;\n if (selfsuit < c2.suit):\n return False;\n if (self.rank > c2.rank):\n return True;\n if (self.rank < c2.rank):\n return False;\n return False;\n\nc1 = Card(2, 11)\nc2 = Card(1, 11)\nif (c1.isGreater (c2)):\n c1.print_()\n print \"is greater than\" \n c2.print_();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Queen of Hearts\nis greater than\nQueen of Diamonds\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.5 page no :130\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.5 page no :130\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n\ndef printDeck(deck):\n for i in range(len(deck)):\n deck[i].print_()\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nprintDeck(deck)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.6 page no : 131\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.6 page no : 131\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n \n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def find(self,deck):\n for i in range(len(deck)):\n if (self.equals(deck[i])):\n return i;\n return -1;\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nindex = deck[17].find (deck)\nprint \"I found the card at index = \" , index ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "I found the card at index = 17\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 12.7 page no : 133\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 12.7 page no : 133\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n \n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n\n def find(self,deck):\n for i in range(len(deck)):\n if (self.equals(deck[i])):\n return i;\n return -1;\n \n def isGreater(self,c2):\n if (self.suit > c2.suit):\n return True;\n if (self.suit < c2.suit):\n return False;\n if (self.rank > c2.rank):\n return True;\n if (self.rank < c2.rank):\n return False;\n return False;\n \ndef findBisect(deck,card,low,high):\n print low , \", \" , high \n if (high < low):\n return -1;\n mid = (high + low) / 2\n if (card.equals(deck[mid])):\n return mid;\n if (deck[mid].isGreater (card)):\n return findBisect (deck, card,low, mid-1);\n else:\n return findBisect (deck,card, mid+1, high)\n\n\ndeck = []\n\nfor suit in range(3):\n for rank in range(13):\n a = Card(suit,rank)\n deck.append(a)\n\nprint findBisect (deck, deck[23], 0, 51)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "0 , 51\n0 , 24\n13 , 24\n19 , 24\n22 , 24\n23\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch13.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch13.ipynb new file mode 100755 index 00000000..f9a283c6 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch13.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "ch13" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 13 : Objects of Vectors" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.1 page no: 137\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.1 page no: 137\n'''\nclass Suit:\n CLUBS = 0\n DIAMOND = 1\n HEARTS = 2\n SPADES = 3\n\nclass Rank: \n ACE=1\n TWO = 2\n THREE = 3\n FOUR =4\n FIVE = 5\n SIX = 6\n SEVEN = 7\n EIGHT = 8\n NINE= 9\n TEN = 10\n JACK = 11 \n QUEEN = 12\n KING =13\n \nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\ndeck = []\n\nfor suit in range(Suit.SPADES):\n for rank in range(Rank.KING):\n a = Card(suit,rank)\n deck.append(a)\n \n\nfor i in deck:\n i.print_() ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.2 page no : 140\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.2 page no : 140\n'''\nclass Suit:\n CLUBS = 0\n DIAMOND = 1\n HEARTS = 2\n SPADES = 3\n\nclass Rank: \n ACE=1\n TWO = 2\n THREE = 3\n FOUR =4\n FIVE = 5\n SIX = 6\n SEVEN = 7\n EIGHT = 8\n NINE= 9\n TEN = 10\n JACK = 11 \n QUEEN = 12\n KING =13\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n \n for suit in range(Suit.SPADES):\n for rank in range(Rank.KING):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n\nd = Deck(52)\nd.print_()\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ace of Clubs\n2 of Clubs\n3 of Clubs\n4 of Clubs\n5 of Clubs\n6 of Clubs\n7 of Clubs\n8 of Clubs\n9 of Clubs\n10 of Clubs\nJack of Clubs\nQueen of Clubs\nKing of Clubs\nAce of Diamonds\n2 of Diamonds\n3 of Diamonds\n4 of Diamonds\n5 of Diamonds\n6 of Diamonds\n7 of Diamonds\n8 of Diamonds\n9 of Diamonds\n10 of Diamonds\nJack of Diamonds\nQueen of Diamonds\nKing of Diamonds\nAce of Hearts\n2 of Hearts\n3 of Hearts\n4 of Hearts\n5 of Hearts\n6 of Hearts\n7 of Hearts\n8 of Hearts\n9 of Hearts\n10 of Hearts\nJack of Hearts\nQueen of Hearts\nKing of Hearts\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.3 page no : 142\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.3 page no : 142\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n\nd = Deck()\na = Card(1,11)\nprint a.find(d)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "24\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.4 page no :144\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.4 page no :144\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n return\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n \n def subdeck(self,low,high):\n sub = Deck(high-low+1)\n for i in range(len(sub.cards)):\n sub.cards.append(self.cards[low+i])\n return sub;\n\ndeck = Deck()\nhand1 = deck.subdeck (0, 4);\nhand2 = deck.subdeck (5, 9);\npack = deck.subdeck (10, 51);\n\n", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 13.5 page no : 146\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 13.5 page no : 146\n'''\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def print_(self):\n suits = [\"Clubs\",\"Diamonds\",\"Hearts\",\"Spades\"]\n ranks = [\"Ace\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"Jack\",\"Queen\",\"King\"]\n print ranks[self.rank] , \" of \" , suits[self.suit] \n\n def equals(self,c2):\n return (self.rank == c2.rank and self.suit == c2.suit);\n \n def find(self,deck):\n for i in range(len(deck.cards)):\n if self.equals(deck.cards[i]):\n return i\n return -1;\n\nclass Deck:\n def __init__(self,n=None):\n self.cards = []\n if n ==None:\n size = 52\n else:\n size = n\n return\n \n for suit in range(4):\n for rank in range(13):\n a = Card(suit,rank)\n self.cards.append(a)\n\n def print_(self):\n for i in self.cards:\n i.print_()\n \n def merge(self,d2):\n # create a new deck big enough for all the cards\n result = Deck (len(d1.cards)+ len(d2.cards));\n # use the index i to keep track of where we are in\n # the first deck, and the index j for the second deck\n i = 0;\n j = 0;\n # the index k traverses the result deck\n return result;", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch14.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch14.ipynb new file mode 100755 index 00000000..124b0855 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch14.ipynb @@ -0,0 +1,130 @@ +{ + "metadata": { + "name": "ch14" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 14 : Classes and invariants" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.1 page no :149\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.1 page no :149\n'''\n\nclass Card:\n def __init__(self,s=None,r=None):\n if s==None:\n self.suit = 0\n self.rank = 0\n else:\n self.suit = s; \n self.rank = r;\n\n def getRank (self):\n return self.rank\n \n def getSuit (self):\n return self.suit\n \n def setRank(self,r):\n self.rank = r \n\n def setSuit (self, s):\n self.suit = s", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.2 page no :151\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.2 page no :151\ndefining class \n'''\n\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n pass\n else:\n self.real = r\n self.imag = i", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.3 page no : 152\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.3 page no : 152\n'''\nimport math\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n\n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def calculateCartesian (self):\n self.real = self.mag * math.cos(self.theta);\n self.imag = self.mag * math.sin (self.theta); \n self.cartesian = True;\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def printPolar(self):\n print self.mag , \" e^ \" , self.theta , \"i\"\n\n\nc1 = Complex(2.0, 3.0);\nc1.printCartesian();\nc1.printPolar();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "2.0 + 3.0 i\n0 e^ 0 i\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.4 page no : 155\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.4 page no : 155\n'''\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n\n def add(self,b):\n real = self.getReal() + b.getReal();\n imag = self.getImag() + b.getImag();\n s = Complex(real, imag);\n return s\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\nc1 = Complex(2.0, 3.0);\nc2 = Complex(3.0, 4.0);\ns = c1.add (c2);\ns.printCartesian();", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "5.0 + 7.0 i\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.5 page no :156\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.5 page no :156\n'''\nimport math\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def calculateCartesian (self):\n self.real = self.mag * math.cos(self.theta);\n self.imag = self.mag * math.sin (self.theta); \n self.cartesian = True;\n\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def mult(self,b):\n mag = self.mag * b.mag\n theta = self.theta + b.theta\n product = Complex()\n product.setPolar (mag, theta);\n return product;\n\n def setPolar(self,m,t):\n self.mag = m\n self.theta = t;\n self.cartesian = False\n self.polar = True;\n\n", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 14.6 page no :159\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 14.6 page no :159\ndefining class Complex\n'''\n\nclass Complex:\n def __init__(self,r=None,i=None):\n if r==None:\n self.real = 0\n self.imag = 0\n self.polar = False\n self.cartesian = False\n else:\n self.real = r\n self.imag = i\n self.cartesian = True\n self.polar = True\n self.mag = 0\n self.theta = 0\n \n def getReal (self):\n if (self.cartesian == False):\n self.calculateCartesian ();\n return self.real;\n \n def getImag(self):\n return self.imag\n\n def printCartesian (self):\n print self.getReal() , \" + \" , self.getImag() , \"i\"\n\n def mult(self,b):\n mag = self.mag * b.mag\n theta = a.theta + b.theta\n product = Complex()\n product.setPolar (mag, theta);\n return product;\n\n def setPolar(self,m,t):\n self.mag = m\n self.theta = t;\n self.cartesian = False\n self.polar = true;\n", + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch15.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch15.ipynb new file mode 100755 index 00000000..cc4b221f --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch15.ipynb @@ -0,0 +1,127 @@ +{ + "metadata": { + "name": "ch15" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 15 : File Input/Output and apmatrixes" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 15.1 page no : 162\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 15.1 page no : 162\n'''\ntry:\n fileName = \"a.txt\"\n f = open(fileName,\"r\")\nexcept:\n print \"Unable to open the file named \" , fileName;\n import sys\n sys.exit(0)\n\n# reading file line by line\n \nfor i in f.readlines():\n print i\n\nf.close() ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SystemExit", + "evalue": "0", + "output_type": "pyerr", + "traceback": [ + "An exception has occurred, use %tb to see the full traceback.\n", + "\u001b[1;31mSystemExit\u001b[0m\u001b[1;31m:\u001b[0m 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "Unable to open the file named a.txt\n" + }, + { + "output_type": "stream", + "stream": "stderr", + "text": "To exit: use 'exit', 'quit', or Ctrl-D.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 15.2 page no : 163\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 15.2 page no : 163\n'''\n\ntry:\n fileName = \"a.txt\"\n outputFile = \"b.txt\"\n f = open(fileName,\"r\")\n w = open(outputFile,\"w\")\nexcept:\n print \"Unable to open the file named \" , fileName;\n import sys\n sys.exit(0)\n\n# reading file line by line\n \nfor i in f.readlines():\n w.write(i)\n print i\n \nf.close()\nw.close() ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SystemExit", + "evalue": "0", + "output_type": "pyerr", + "traceback": [ + "An exception has occurred, use %tb to see the full traceback.\n", + "\u001b[1;31mSystemExit\u001b[0m\u001b[1;31m:\u001b[0m 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": "Unable to open the file named a.txt\n" + }, + { + "output_type": "stream", + "stream": "stderr", + "text": "To exit: use 'exit', 'quit', or Ctrl-D.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 15.3 page no : 167\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 15.3 page no : 167\n'''\n\nclass Set:\n def __init__(self,n):\n self.elements = []\n self.numElements = 0\n\n def getNumElements(self):\n return self.numElements\n\n def getElement(self,i):\n if (i < self.numElements):\n return slef.elements[i];\n else:\n print \"Set index out of range.\" \n import sys\n sys.exit(0)\n\n def find(self,s):\n for i in range(self.numElements):\n if (self.elements[i] == s): \n return i;\n return -1;\n\n def add(self,s):\n # if the element is already in the set, return its index\n index = self.find(s);\n if (index != -1):\n return index;\n # if the apvector is full, double its size\n # add the new elements and return its index\n self.elements.append(s)\n self.numElements += 1\n return self.numElements - 1;\n\ncities= Set (2);\ncity1 = 'ahmedabad'\ncity2 = 'rajkot'\nindex1 = cities.add(city1);\nindex2 = cities.add(city2)\nprint index1, index2", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "0 1\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch2.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch2.ipynb new file mode 100755 index 00000000..b12d669c --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch2.ipynb @@ -0,0 +1,112 @@ +{ + "metadata": { + "name": "ch2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 2 : Variables and types" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 2.1 Page no : 11" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 2.1 page no :11\n'''\n\nprint \"Hello, world.\" \nprint \"How are you?\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Hello, world.\nHow are you?\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 2.2 Page no : 11/12" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 2.2 page no : 11/12\n'''\n\nprint \"Goodbye, \";\nprint \"cruel world!\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Goodbye, \ncruel world!\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 2.3 page no : 14\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 2.3 page no : 14\n'''\nhour = 11;\nminute = 59;\ncolon = ':';\nprint \"The current time is \",\nprint hour,colon,minute", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The current time is 11 : 59\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 2.4 page no : 16\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 2.4 page no : 16\n'''\n\nhour = 11;\nminute = 59;\nprint \"Number of minutes since midnight: \",\nprint hour*60 + minute \nprint \"Fraction of the hour that has passed: \",\nprint minute/60", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Number of minutes since midnight: 719\nFraction of the hour that has passed: 0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch3.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch3.ipynb new file mode 100755 index 00000000..303271a9 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch3.ipynb @@ -0,0 +1,133 @@ +{ + "metadata": { + "name": "ch3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 3 : Function" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.1 page no :25" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 3.1 page no :25\n'''\n\ndef newLine ():\n print ''\n\n\nprint \"First Line.\" \nnewLine ()\nprint \"Second Line.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "First Line.\n\nSecond Line.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.2 page no :25" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 3.2 page no :25\n'''\ndef newLine ():\n print ''\n\nprint \"First Line.\" \nnewLine ()\nnewLine ()\nnewLine ()\nprint \"Second Line.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "First Line.\n\n\n\nSecond Line.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.3 page no :26" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 3.3 page no :26\n'''\n\n\ndef newLine ():\n print ''\n\n\ndef threeLine ():\n newLine (); \n newLine ();\n newLine ();\n \nprint \"First Line.\" \nthreeLine()\nprint \"Second Line.\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "First Line.\n\n\n\nSecond Line.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.4 page no :28" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# -*- coding: UTF-8 -*-\n'''\nexample 3.4 page no :28\n'''\n\ndef printTwice (phil):\n print phil , phil\n\n\nprintTwice ('a');\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "a a\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 3.5 page no :28" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# -*- coding: UTF-8 -*-\n'''\nexample 3.5 page no :28\n'''\n\n\ndef printTwice (phil):\n print phil , phil\n\nargument = 'b' \nprintTwice (argument);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "b b\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch4.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch4.ipynb new file mode 100755 index 00000000..08fbd2a9 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch4.ipynb @@ -0,0 +1,112 @@ +{ + "metadata": { + "name": "ch4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 4 : Conditionals and recursion" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 4.1 page no :34" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 4.1 page no :34\n'''\n\ndef printParity (x):\n if (x%2 == 0):\n print \"x is even\" \n else:\n print \"x is odd\" \n\nprintParity (17)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "x is odd\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 4.2 page no :36" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 4.2 page no :36\n'''\nimport math\n\ndef printLogarithm (x):\n if (x <= 0.0):\n print \"Positive numbers only, please.\" \n return;\n result = math.log(x);\n print \"The log of x is \" , result;\n\nprintLogarithm(-1)\nprintLogarithm(5)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Positive numbers only, please.\nThe log of x is 1.60943791243\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 4.3 page no : 37" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 4.3 page no : 37\n'''\n\ndef countdown (n):\n if (n == 0):\n print \"Blastoff!\" \n else:\n print n\n countdown (n-1)\n\ncountdown(5)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "5\n4\n3\n2\n1\nBlastoff!\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 4.4\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 4.4\n'''\nimport math\ndef printLogarithm(x):\n if (x <= 0.0):\n print \"Positive numbers only, please.\" << endl;\n return;\n result = math.log(x)\n print \"The log of x is \" , result;\n\ndef countdown (n) :\n if (n == 0):\n print \"Blastoff!\"\n else:\n print n\n countdown (n-1);\n\n\ncountdown (3);\nprintLogarithm(10)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3\n2\n1\nBlastoff!\nThe log of x is 2.30258509299\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch5.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch5.ipynb new file mode 100755 index 00000000..a55d763d --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch5.ipynb @@ -0,0 +1,229 @@ +{ + "metadata": { + "name": "ch5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 5 : Fruitful functions" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.1 page no :41\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.1 page no :41\n'''\nimport math\ndef area (radius):\n area = math.pi * radius * radius;\n return area;\n\nprint area(3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "28.2743338823\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.2 page no :42\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.2 page no :42\n'''\n\ndef absoluteValue (x):\n if (x < 0):\n return -x\n else:\n return x\n\nprint absoluteValue(-3) \nprint absoluteValue(3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3\n3\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.3 page no :44\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.3 page no :44\n'''\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n print \"dx is \" , dx\n print \"dy is \" , dy \n return 0.0\n\ndistance(10,10,20,20) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "dx is 10\ndy is 10\n" + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 3, + "text": "0.0" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.4 page no :44\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.4 page no :44\n'''\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n print \"dsquared is \" , dsquared\n return 0.0;\n\ndistance(10,10,20,20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "dsquared is 200\n" + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 4, + "text": "0.0" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.5 page no :45\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.5 page no :45\n'''\nimport math\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n return math.sqrt(dsquared)\n \nprint distance(10,10,20,20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "14.1421356237\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.6 page no :45\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.6 page no :45\n'''\n\nimport math\ndef area (radius):\n area = math.pi * radius * radius;\n return area;\n\ndef distance (x1, y1,x2,y2):\n dx = x2 - x1\n dy = y2 - y1;\n dsquared = dx*dx + dy*dy;\n return math.sqrt(dsquared)\n \ndef fred(xc, yc, xp,yp):\n radius = distance (xc, yc, xp, yp);\n result = area (radius);\n return result;\n\nprint fred(10,10,20,20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "628.318530718\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.7 page no :48\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.7 page no :48\n'''\ndef isSingleDigit(x):\n if (x >= 0 and x < 10):\n return True\n else:\n return False;\n\nprint isSingleDigit(11)\nprint isSingleDigit(4)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "False\nTrue\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.8 page no :51/53\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.8 page no :51/53\n'''\n\ndef factorial (n):\n if (n == 0):\n return 1;\n else:\n recurse = factorial (n-1)\n result = n * recurse\n return result;\n\nprint factorial(5)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "120\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 5.9 page no :53\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 5.9 page no :53\n'''\ndef fibonacci (n):\n if (n == 0 or n == 1):\n return 1\n else:\n return fibonacci (n-1) + fibonacci (n-2)\n\nprint fibonacci(5)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "8\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch6.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch6.ipynb new file mode 100755 index 00000000..3b13a110 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch6.ipynb @@ -0,0 +1,265 @@ +{ + "metadata": { + "name": "ch6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 6 : Iteration" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.1 page no :56\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.1 page no :56\n'''\n\ndef countdown (n):\n while (n > 0):\n print n\n n = n-1\n print \"Blastoff!\"\n return 0\n \ncountdown(5) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "5\n4\n3\n2\n1\nBlastoff!\n" + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": "0" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.2 page no :57\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.2 page no :57\n'''\n\ndef sequence (n):\n while (n != 1):\n print n\n if (n%2 == 0):\n n = n / 2\n else:\n n = n*3 + 1\n \nsequence(10)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "10\n5\n16\n8\n4\n2\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.3 page no :58\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.3 page no :58\n'''\nimport math\nx = 1.0\nwhile (x < 10.0):\n print x , \"\\t\" , math.log(x)\n x = x + 1.0", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.0 \t0.0\n2.0 \t0.69314718056\n3.0 \t1.09861228867\n4.0 \t1.38629436112\n5.0 \t1.60943791243\n6.0 \t1.79175946923\n7.0 \t1.94591014906\n8.0 \t2.07944154168\n9.0 \t2.19722457734\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.4 page no :59\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.4 page no :59\n'''\nimport math\nx = 1.0\nwhile (x < 10.0):\n print x , \"\\t\" , math.log(x) / math.log(2.0) \n x = x + 1.0\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.0 \t0.0\n2.0 \t1.0\n3.0 \t1.58496250072\n4.0 \t2.0\n5.0 \t2.32192809489\n6.0 \t2.58496250072\n7.0 \t2.80735492206\n8.0 \t3.0\n9.0 \t3.16992500144\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.5 page no :59\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.5 page no :59\n'''\nimport math\nx = 1.0;\nwhile (x < 100.0):\n print x , \"\\t\" , math.log(x) / math.log(2.0)\n x = x * 2.0", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.0 \t0.0\n2.0 \t1.0\n4.0 \t2.0\n8.0 \t3.0\n16.0 \t4.0\n32.0 \t5.0\n64.0 \t6.0\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.6 page no: 60\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.6 page no: 60\n'''\n\ni = 1;\nwhile (i <= 6):\n print 2*i ,\n i = i + 1;\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "2 4 6 8 10 12\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.7 page no:60\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.7 page no:60\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n \nprintMultiples(3) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3 6 9 12 15 18\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.8 page no:61\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.8 page no:61\n'''\n\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ni = 1;\nwhile (i <= 6):\n printMultiples (i);\n i = i + 1;", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n5 10 15 20 25 30 \n6 12 18 24 30 36 \n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.9 page no: 62\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.9 page no: 62\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ndef printMultTable ():\n i = 1;\n while (i <= 6):\n printMultiples (i)\n i = i + 1\n\nprintMultTable()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n5 10 15 20 25 30 \n6 12 18 24 30 36 \n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.10 page no :63\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.10 page no :63\n'''\n\ndef printMultiples (n):\n i = 1\n while (i <= 6):\n print n*i,\n i = i + 1;\n print '' \n\ndef printMultTable (high):\n i = 1;\n while (i <= high):\n printMultiples (i);\n i = i + 1;\n \nprintMultTable(4) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1 2 3 4 5 6 \n2 4 6 8 10 12 \n3 6 9 12 15 18 \n4 8 12 16 20 24 \n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 6.11 page no :64\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 6.11 page no :64\n'''\n\ndef printMultiples(n,high):\n i = 1;\n while (i <= high):\n print n*i ,\n i = i + 1;\n print ''\n\ndef printMultTable (high):\n i = 1; \n while (i <= high):\n printMultiples (i, high)\n i = i + 1;\n\nprintMultTable(5) ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1 2 3 4 5 \n2 4 6 8 10 \n3 6 9 12 15 \n4 8 12 16 20 \n5 10 15 20 25 \n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch7.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch7.ipynb new file mode 100755 index 00000000..e0a37b49 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch7.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "ch7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 7 : Strings and things" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 7.1 page no : 69\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 7.1 page no : 69\n'''\n\nfruit = \"banana\"\nindex = 0\nwhile(index < len(fruit)):\n letter = fruit[index]\n print letter\n index = index + 1", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "b\na\nn\na\nn\na\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 7.2 page no :71\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 7.2 page no :71\n'''\n\ndef find(s,c,i):\n while (i<len(s)):\n if (s[i] == c): return i\n i = i + 1\n return -1;\n \nprint find(\"banana\",'b',0)\nprint find(\"banana\",'b',3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "0\n-1\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 7.3 page no : 71\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 7.3 page no : 71\n'''\n\nfruit = \"banana\"\nlength = len(fruit)\ncount = 0\nindex = 0\nwhile (index < length):\n if (fruit[index] == 'a'):\n count = count + 1\n index = index + 1\nprint count ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 7.4 page no : 72\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 7.4 page no : 72\n'''\n\nfruit = \"banana\";\nbakedGood = \" nut bread\";\ndessert = fruit + bakedGood;\nprint dessert", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "banana nut bread\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 7.5 page no :73\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 7.5 page no :73\n'''\n\nsuffix = \"ack\"\nletter = 'J'\nwhile (letter <= 'Q'):\n print letter + suffix \n c = ord(letter) + 1\n letter = chr(c)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Jack\nKack\nLack\nMack\nNack\nOack\nPack\nQack\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 7.6 page no :74\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 7.6 page no :74\n'''\nword = \"Zebra\"\n\nif (word < \"banana\"):\n print \"Your word, \" , word , \", comes before banana.\"\nelif (word > \"banana\"):\n print \"Your word, \" , word , \", comes after banana.\" \nelse:\n print \"Yes, we have no bananas!\" ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Your word, Zebra , comes before banana.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "Example 7.7 page no : 75" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "a = 'a'\nprint a.upper()", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "A\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch8.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch8.ipynb new file mode 100755 index 00000000..75cf53be --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch8.ipynb @@ -0,0 +1,239 @@ +{ + "metadata": { + "name": "ch8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 8 : Structures" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.1 page no :77\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.1 page no :77\n'''\n\nclass Point:\n def __init__(self):\n self.x = 0.0\n self.y = 0.0\n\n\nb = Point()\nb.x = 3.0\nb.y = 4.0\n\nprint b.x , \", \" , b.y \ndistance = b.x * b.x + b.y * b.y\nprint \"Distance : \" , distance", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3.0 , 4.0\nDistance : 25.0\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.2 page no :79\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.2 page no :79\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\np1 = Point(3.0, 4.0)\np2 = p1\nprint p2.x , \", \" , p2.y ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "3.0 , 4.0\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.3 page no : 80\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.3 page no : 80\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n \np1 = Point(3.0, 4.0)\nprintPoint(p1)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "( 3.0 , 4.0 )\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.4 page no : 80\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.4 page no : 80\n'''\n\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef distance(p1,p2):\n dx = p2.x - p1.x\n dy = p2.y - p1.y\n import math\n return math.sqrt(dx*dx + dy*dy)\n \np1 = Point(3.0, 4.0)\np2 = Point(4.0,5.0)\nprint distance(p1,p2)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "1.41421356237\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.5 page no : 81\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.5 page no : 81\n'''\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\ndef reflect(p):\n temp = p.x\n p.x = p.y\n p.y = temp\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n\nblank = Point(3.0, 4.0)\nprintPoint (blank)\nreflect (blank)\nprintPoint (blank)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "( 3.0 , 4.0 )\n( 4.0 , 3.0 )\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.6 page no : 84\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.6 page no : 84\n'''\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\nclass Rectangle:\n def __init__(self,p,x,y):\n self.corner = p\n self.width = x\n self.height = y\n\nc = Point(0.0, 0.0)\nb = Rectangle( c, 100.0, 200.0 )\nb.width += 50.0\nprint b.height ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "200.0\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.7 page no : 84\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.7 page no : 84\n'''\n\n\nclass Point:\n def __init__(self,x,y):\n self.x = x\n self.y = y\n\nclass Rectangle:\n def __init__(self,p,x,y):\n self.corner = p\n self.width = x\n self.height = y\n\ndef findCenter(box):\n x = box.corner.x + box.width/2\n y = box.corner.y + box.height/2\n result = Point(x, y)\n return result\n\ndef printPoint(p):\n print \"(\" , p.x , \", \" , p.y , \")\" \n\nbox = Rectangle( Point(0.0, 0.0), 100, 200)\ncenter = findCenter (box);\nprintPoint (center);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "( 50.0 , 100.0 )\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.8 page no : 84\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.8 page no : 84\n'''\n\ndef swap(x,y):\n temp = x[0]\n x[0] = y[0]\n y[0] = temp\n\ni = [7]\nj = [9]\nswap (i, j)\nprint i[0] , j[0]", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "9 7\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 8.9 page no : 85\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 8.9 page no : 85\n'''\n\n# prompt the user for input86\nprint \"Enter an integer: \",\n# get input\ntry:\n x = int(raw_input())\n print x \n# check and see if the input statement succeeded\nexcept:\n print \"That was not an integer.\" \n\n# print the value we got from the user\n\nprint \"What is your name? \" , \nname = raw_input()\nprint name", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter an integer: " + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "a\n" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": " That was not an integer.\nWhat is your name? " + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": "abc\n" + }, + { + "output_type": "stream", + "stream": "stdout", + "text": " abc\n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch9.ipynb b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch9.ipynb new file mode 100755 index 00000000..25f763ca --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/ch9.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "ch9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "CHAPTER 9. : MORE STRUCTURES" + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.1 page no :90\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.1 page no :90\n'''\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\nt = Time( 11, 59, 3.14159 )\nprintTime(t)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "11 : 59 : 3.14159\nTime is 11 hour 59 minutes 3.14159\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.2 page no : 91\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.2 page no : 91\n'''\n\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\ndef after(time1,time2):\n if (time1.hour > time2.hour):\n return True\n if (time1.hour < time2.hour): \n return False;\n if (time1.minute > time2.minute):\n return True\n if (time1.minute < time2.minute): \n return False;\n if (time1.second > time2.second): \n return True\n return False;\n\nt1 = Time( 11, 59, 3.14159 )\nt2 = Time( 12, 42, 3.234 )\nprint after(t1,t2)\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "False\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.3 page no : 91\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.3 page no : 91\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n return Time(hour,minute,second)\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.4 page no : 92\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.4 page no : 92\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n if (second >= 60.0):\n second -= 60.0;\n minute += 1\n if (minute >= 60):\n minute -= 60;\n hour += 1;\n return Time(hour,minute,second)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.5 page no : 93\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.5 page no : 93\nincorrect version\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef increment (time,secs):\n time.second += secs\n if (time.second >= 60.0):\n time.second -= 60.0;\n time.minute += 1;\n if (time.minute >= 60):\n time.minute -= 60;\n time.hour += 1;\n\n\ndef addTime(t1,t2):\n hour = t1.hour + t2.hour;\n minute = t1.minute + t2.minute;\n second = t1.second + t2.second;\n if (second >= 60.0):\n second -= 60.0;\n minute += 1\n if (minute >= 60):\n minute -= 60;\n hour += 1;\n return Time(hour,minute,second)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.6 page no : 94\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.6 page no : 94\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef addTimeFill(t1,t2,s):\n s.hour = t1.hour + t2.hour;\n s.minute = t1.minute + t2.minute;\n s.second = t1.second + t2.second;\n if (s.second >= 60.0):\n s.second -= 60.0;\n s.minute += 1;\n if (s.minute >= 60):\n s.minute -= 60;\n s.hour += 1;\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = Time(0,0,0)\naddTimeFill (c, b,doneTime);\nprintTime(doneTime)\n\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": "example 9.7 page no : 97\n" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "'''\nexample 9.7 page no : 97\n'''\nclass Time:\n def __init__(self,h,m,s):\n self.hour = h\n self.minute = m\n self.second = s\n\ndef printTime(t):\n print t.hour , \":\" , t.minute , \":\" , t.second\n print \"Time is \" , t.hour , \" hour \" , t.minute , \" minutes \" , t.second \n\ndef convertToSeconds (t):\n minutes = t.hour * 60 + t.minute;\n seconds = minutes * 60 + t.second;\n return seconds;\n\ndef makeTime(secs):\n hour = int (secs / 3600.0);\n secs -= hour * 3600.0;\n minute = int (secs / 60.0);\n secs -= minute * 60;\n second = secs;\n return Time(hour,minute,second)\n\ndef addTime (t1,t2):\n seconds = convertToSeconds (t1) + convertToSeconds (t2);\n return makeTime(seconds)\n\n\nc = Time( 9, 14, 30.0 )\nb = Time ( 3, 35, 0.0 )\ndoneTime = addTime (c, b);\nprintTime(doneTime)\n\n\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "12 : 49 : 30.0\nTime is 12 hour 49 minutes 30.0\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/15FileIO&apmatrixes.png b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/15FileIO&apmatrixes.png Binary files differnew file mode 100755 index 00000000..a580b1d0 --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/15FileIO&apmatrixes.png diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/2Variables&Types.png b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/2Variables&Types.png Binary files differnew file mode 100755 index 00000000..ccf4eb8a --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/2Variables&Types.png diff --git a/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/9MoreStructures.png b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/9MoreStructures.png Binary files differnew file mode 100755 index 00000000..7657553e --- /dev/null +++ b/How_to_think_like_a_computer_scientist_by_Allen_B_Downey/screenshots/9MoreStructures.png diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb index fcb27dd5..fcb27dd5 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb index 72b71ee5..72b71ee5 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb index c582fb8a..c582fb8a 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb index 8d01f358..8d01f358 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb index 12505d05..12505d05 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb index 2a99912c..2a99912c 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb index 65492a55..65492a55 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb index e738fc3b..e738fc3b 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb index bd78b4da..bd78b4da 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb index a51e7673..a51e7673 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb index 1b036c13..1b036c13 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png Binary files differindex cb53c9e2..cb53c9e2 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png Binary files differindex f62bb213..f62bb213 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png Binary files differindex 4f12027a..4f12027a 100644..100755 --- a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt index 25e8a098..25e8a098 100644..100755 --- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt index 2ee78ece..2ee78ece 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb index 426aba7c..426aba7c 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb index fc827ec7..fc827ec7 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb index 29458bda..29458bda 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb index f32d6a55..f32d6a55 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb index 9f145af9..9f145af9 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png Binary files differindex f8cdc02f..f8cdc02f 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png Binary files differindex cab9046c..cab9046c 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png Binary files differindex 4da21eda..4da21eda 100644..100755 --- a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb index 2405c51a..2405c51a 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb index 312fe166..312fe166 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb index b9621365..b9621365 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb index e735f6b6..e735f6b6 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb index 61efb299..61efb299 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb index 5e237f72..5e237f72 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb index 2e6b4737..2e6b4737 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb index e0682810..e0682810 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb index 5f3fdd00..5f3fdd00 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb index 6fc6acfe..6fc6acfe 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb index a01b23cc..a01b23cc 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb index 0c64319b..0c64319b 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png Binary files differindex 4b357c81..4b357c81 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png Binary files differindex 5f67689f..5f67689f 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png diff --git a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png Binary files differindex 29986cea..29986cea 100644..100755 --- a/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt index 92535d29..92535d29 100644..100755 --- a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt index dbce3060..dbce3060 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb index aee962a5..aee962a5 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb index 6a6e6a2c..6a6e6a2c 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb index f4d8bc9d..f4d8bc9d 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb index f4d8bc9d..f4d8bc9d 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb index edc47614..edc47614 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb index edc47614..edc47614 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb index f55e341a..f55e341a 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb index f55e341a..f55e341a 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb index c5a4b2dd..c5a4b2dd 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb index c5a4b2dd..c5a4b2dd 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb index 59b5d071..59b5d071 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb index 59b5d071..59b5d071 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb index 4cb73dad..4cb73dad 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb index 4cb73dad..4cb73dad 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb index 11ccf93e..11ccf93e 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb index 11ccf93e..11ccf93e 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb index 32d7ab84..32d7ab84 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb index 32d7ab84..32d7ab84 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb index 72e1d5c9..72e1d5c9 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb index 72e1d5c9..72e1d5c9 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb index a51714d4..a51714d4 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb index a51714d4..a51714d4 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb index 9eb5c1ee..9eb5c1ee 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb index 9eb5c1ee..9eb5c1ee 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb index 3e27009a..3e27009a 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb index 3e27009a..3e27009a 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb index 7e800205..7e800205 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb index 18b7f145..18b7f145 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb index a473df61..a473df61 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb index 5a51e2fc..5a51e2fc 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_1.ipynb index 23b46e1d..23b46e1d 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb index 23b46e1d..23b46e1d 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb index 595c81ff..595c81ff 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb index 595c81ff..595c81ff 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png Binary files differindex 8fbdd9ad..8fbdd9ad 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png Binary files differindex 8fbdd9ad..8fbdd9ad 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png Binary files differindex 6fd8ed7e..6fd8ed7e 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png Binary files differindex 6fd8ed7e..6fd8ed7e 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png Binary files differindex c3a01497..c3a01497 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png Binary files differindex c3a01497..c3a01497 100644..100755 --- a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb index 50e40e46..50e40e46 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb index fe244fef..fe244fef 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb index 06ace2b9..06ace2b9 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb index 75a2b6a6..75a2b6a6 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb index 6aae196e..6aae196e 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb index 4b5636a7..4b5636a7 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb index a1dee947..a1dee947 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb index 00e88ef0..00e88ef0 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb index 6159910d..6159910d 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb index 0aaf0dd3..0aaf0dd3 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb index 9008b311..9008b311 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png Binary files differindex c66ac130..c66ac130 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png Binary files differindex 0967671c..0967671c 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png Binary files differindex 37ace619..37ace619 100644..100755 --- a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png diff --git a/Magnifying_C/Chapter_10.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_10_3.ipynb index 1a4d1459..1a4d1459 100755 --- a/Magnifying_C/Chapter_10.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_10_3.ipynb diff --git a/Magnifying_C/Chapter_11.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_11_3.ipynb index 16b27feb..16b27feb 100755 --- a/Magnifying_C/Chapter_11.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_11_3.ipynb diff --git a/Magnifying_C/Chapter_12.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_12_3.ipynb index 4fec3405..4fec3405 100755 --- a/Magnifying_C/Chapter_12.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_12_3.ipynb diff --git a/Magnifying_C/Chapter_2.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_2_3.ipynb index 7144ab92..7144ab92 100755 --- a/Magnifying_C/Chapter_2.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_2_3.ipynb diff --git a/Magnifying_C/Chapter_3.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_3_3.ipynb index 9e566fc1..9e566fc1 100755 --- a/Magnifying_C/Chapter_3.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_3_3.ipynb diff --git a/Magnifying_C/Chapter_4.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_4_3.ipynb index a071712d..a071712d 100755 --- a/Magnifying_C/Chapter_4.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_4_3.ipynb diff --git a/Magnifying_C/Chapter_5.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_5_3.ipynb index b4cb2db2..b4cb2db2 100755 --- a/Magnifying_C/Chapter_5.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_5_3.ipynb diff --git a/Magnifying_C/Chapter_6.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_6_3.ipynb index 690f5ef0..690f5ef0 100755 --- a/Magnifying_C/Chapter_6.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_6_3.ipynb diff --git a/Magnifying_C/Chapter_7.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_7_3.ipynb index 73eec220..73eec220 100755 --- a/Magnifying_C/Chapter_7.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_7_3.ipynb diff --git a/Magnifying_C/Chapter_8.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_8_3.ipynb index ccafa905..ccafa905 100755 --- a/Magnifying_C/Chapter_8.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_8_3.ipynb diff --git a/Magnifying_C/Chapter_9.ipynb b/Magnifying_C_by_Arpita_Goyal/Chapter_9_3.ipynb index acb61edf..acb61edf 100755 --- a/Magnifying_C/Chapter_9.ipynb +++ b/Magnifying_C_by_Arpita_Goyal/Chapter_9_3.ipynb diff --git a/Magnifying_C/README.txt b/Magnifying_C_by_Arpita_Goyal/README.txt index 2ec7deb7..2ec7deb7 100755 --- a/Magnifying_C/README.txt +++ b/Magnifying_C_by_Arpita_Goyal/README.txt diff --git a/Magnifying_C/screenshots/chapter_10.png b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_10.png Binary files differindex 26daa2e1..26daa2e1 100755 --- a/Magnifying_C/screenshots/chapter_10.png +++ b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_10.png diff --git a/Magnifying_C/screenshots/chapter_2.png b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_2.png Binary files differindex c7b049ba..c7b049ba 100755 --- a/Magnifying_C/screenshots/chapter_2.png +++ b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_2.png diff --git a/Magnifying_C/screenshots/chapter_6.png b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_6.png Binary files differindex 585a8ed4..585a8ed4 100755 --- a/Magnifying_C/screenshots/chapter_6.png +++ b/Magnifying_C_by_Arpita_Goyal/screenshots/chapter_6.png diff --git a/Magnifying_C/screenshots/ss_1.png b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_1.png Binary files differindex c9ed06ce..c9ed06ce 100755 --- a/Magnifying_C/screenshots/ss_1.png +++ b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_1.png diff --git a/Magnifying_C/screenshots/ss_2.png b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_2.png Binary files differindex 5fc014e9..5fc014e9 100755 --- a/Magnifying_C/screenshots/ss_2.png +++ b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_2.png diff --git a/Magnifying_C/screenshots/ss_3.png b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_3.png Binary files differindex bd465ad3..bd465ad3 100755 --- a/Magnifying_C/screenshots/ss_3.png +++ b/Magnifying_C_by_Arpita_Goyal/screenshots/ss_3.png diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/README.txt b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/README.txt index 08a8b02e..08a8b02e 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/README.txt +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/README.txt diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1_1.ipynb index fb4044c1..fb4044c1 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1_1.ipynb +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1_1.ipynb diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2_1.ipynb index 7f859872..7f859872 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2_1.ipynb +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2_1.ipynb diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3_1.ipynb index 01a8b457..01a8b457 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3_1.ipynb +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3_1.ipynb diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5_1.ipynb index 3d8ceeb9..3d8ceeb9 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5_1.ipynb +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5_1.ipynb diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6_1.ipynb index 12c3c24a..12c3c24a 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6_1.ipynb +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6_1.ipynb diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7_1.ipynb index 654b76cc..654b76cc 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7_1.ipynb +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7_1.ipynb diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8_1.ipynb b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8_1.ipynb index f50c5551..f50c5551 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8_1.ipynb +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8_1.ipynb diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch2_normalized_freq.png b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch2_normalized_freq.png Binary files differindex 661cbc33..661cbc33 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch2_normalized_freq.png +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch2_normalized_freq.png diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch3_refractive_index.png b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch3_refractive_index.png Binary files differindex e0cc5daa..e0cc5daa 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch3_refractive_index.png +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch3_refractive_index.png diff --git a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch6_ext_eff.png b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch6_ext_eff.png Binary files differindex 19a006f2..19a006f2 100644..100755 --- a/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch6_ext_eff.png +++ b/Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch6_ext_eff.png diff --git a/Oscillations_and_Waves_by_S._Prakash/README.txt b/Oscillations_and_Waves_by_S._Prakash/README.txt index f20b94b1..f20b94b1 100644..100755 --- a/Oscillations_and_Waves_by_S._Prakash/README.txt +++ b/Oscillations_and_Waves_by_S._Prakash/README.txt diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_10_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_10_3.ipynb new file mode 100755 index 00000000..a1e99a45 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_10_3.ipynb @@ -0,0 +1,283 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Power Supplies"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 10.1, Page No. 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Voltage regulation and % change in output voltage per unit of load current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vfl = 24 # full load voltage\n",
+ "Vnl = 24.5 # no load voltage\n",
+ "Ifl = 2 # full load current\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "VR = (Vnl-Vfl)/Vfl\n",
+ "#(b)\n",
+ "x = VR*100/Ifl\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Voltage regulation = %.4f or %.2f%%\\n(b) %%tage change in output voltage per unit load current = %.2f%%\"%(VR,VR*100,x))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Voltage regulation = 0.0208 or 2.08%\n",
+ "(b) %tage change in output voltage per unit load current = 1.04%\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 10.2, Page No. 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Redulation in percent V\n",
+ "\n",
+ "\n",
+ "import math\n",
+ "Vout = 0.3 # change in output voltage when input change\n",
+ "Vin = 4 # input voltage change\n",
+ "V = 15 # rated ouutput voltage\n",
+ "\n",
+ "#calculations\n",
+ "lr = (Vout/V)*100/Vin\n",
+ "print(\"%% line regulation = %.1f%% V\"%lr)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "% line regulation = 0.5% V\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 10.3, Page No. 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# output voltage, load current, zener curretn\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vi = 15.0 # input voltage\n",
+ "beta_dc = 50.0 # transistor gain\n",
+ "Rl = 1000.0 # load resistor\n",
+ "Vz = 6.0 # zener voltage\n",
+ "Ri = 500.0 # input voltage\n",
+ "Vbe = 0.7 # voltage drop across transistor base-emitter\n",
+ "\n",
+ "#Calculations\n",
+ "Vo = Vz-Vbe\n",
+ "Il = Vo/Rl\n",
+ "Vce = Vi-Vo\n",
+ "I = (V-Vz)/Ri\n",
+ "Ib = Il/beta_dc\n",
+ "Iz = I-Ib\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vo = %.1fV\\nLoad current = %.1f mA\\nZener current = %.3f mA\"%(Vo,Il*1000,Iz*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vo = 5.3V\n",
+ "Load current = 5.3 mA\n",
+ "Zener current = 17.894 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 10.4, Page No. 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#output voltage(referring fig.10.2)\n",
+ "\n",
+ "import math\n",
+ "Vz = 6.0 # zener voltage\n",
+ "R1 = 10.0*10**3 # resistance 1\n",
+ "R2 = 15.0*10**3 # resistance 2\n",
+ "\n",
+ "#Calculations\n",
+ "Vo = (1+(R2/R1))*Vz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vo = %d V\"%Vo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vo = 15 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 10.5, Page No. 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# finding Vo, Io, Ic (referring fig.10.1)\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vz = 9.0 # zener voltage\n",
+ "R1 = 1.5*10**3 # resistance 1\n",
+ "R2 = 3.0*10**3 # resistance 2, value used in calculations\n",
+ "Rl = 2.0*10**3 # load resistance\n",
+ "Rs = 200 # source resistance\n",
+ "Vin = 30 # input oltage\n",
+ "\n",
+ "#Calculations\n",
+ "Vo = (1+(R2/R1))*Vz\n",
+ "Is =(Vin - Vo)/Rs\n",
+ "Io = Vo/Rl\n",
+ "Ic = Is -Io\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vo = %d V\\nIo = %.1f mA\\nIc = %.1f mA\"%(Vo,Io*1000,Ic*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vo = 27 V\n",
+ "Io = 13.5 mA\n",
+ "Ic = 1.5 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 10.6, Page No. 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Minimum and maximum output voltage\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "Iadj = 40*10**-6 # current\n",
+ "Vref = 1.25 # reference voltage\n",
+ "R1 = 2*10**3 # resistance R1\n",
+ "R2min = 0 # minimum value of R2 resistor\n",
+ "R2max = 20.0*10**3 # maximum value of R2 resistor\n",
+ "\n",
+ "#calculations\n",
+ "Vo1 = (Vref*(1+(R2max/R1)))+Iadj*R2max\n",
+ "Vo2 = Vref*(1+(R2min/R1))\n",
+ "\n",
+ "#Result\n",
+ "print(\"When R2 = %d k-ohm\\nVo = %.2f V\"%(R2max/1000,Vo1))\n",
+ "print(\"\\nWhen R2 = %d k-ohm\\nVo = %.2f V\"%(R2min/1000,Vo2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When R2 = 20 k-ohm\n",
+ "Vo = 14.55 V\n",
+ "\n",
+ "When R2 = 0 k-ohm\n",
+ "Vo = 1.25 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_12_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_12_3.ipynb new file mode 100755 index 00000000..46f69125 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_12_3.ipynb @@ -0,0 +1,1030 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: Integrated Citcuits and Operational Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.1, Page No.442"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# dc currents and voltage of differential amplifier\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "Vcc = 12 # collector voltage\n",
+ "Vee = -12 # emitter voltage\n",
+ "Rc = 4.1*10**3 # Collector resistance\n",
+ "Re = 3.8*10**3 # emitter resistance\n",
+ "Vbe = 0.7 # voltage across base-emitter junction\n",
+ "\n",
+ "#Calculations\n",
+ "Ie = (Vcc-Vbe)/Re\n",
+ "Ic = 0.5*Ie\n",
+ "Vo = Vcc-Ic*Rc\n",
+ "\n",
+ "#Result\n",
+ "print(\"Ie = %.4f mA\\nIc = %.3f mA\\nVo = %.1f V\"%(Ie*1000,Ic*1000,Vo))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ie = 2.9737 mA\n",
+ "Ic = 1.487 mA\n",
+ "Vo = 5.9 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.2, Page No.442"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Differential amplifier parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc = 12 # collector voltage\n",
+ "Vee = -12 # emitter voltage\n",
+ "Rc = 1*10**6 # Collector resistance\n",
+ "Re = 1*10**6 # emitter resistance\n",
+ "Vbe = 0.7 # voltage across base-emitter junction\n",
+ "vi = 2.1*10**-3 # AC input voltage\n",
+ "beta = 75 \n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Ie = (Vcc-Vbe)/Re\n",
+ "ie = 0.5*Ie\n",
+ "re = (25*10**-3)/ie\n",
+ "re_dash = 4420.0#value used in the book\n",
+ "#(b)\n",
+ "g = Rc/(2*re_dash)\n",
+ "g = math.floor(g*10)/10\n",
+ "#(c)\n",
+ "vo = g*vi\n",
+ "vo = math.floor(vo*10000)/10000\n",
+ "#(d)\n",
+ "Zi = 2*beta*re\n",
+ "#(e)\n",
+ "cmg = Rc/(re+2*Re)\n",
+ "cmg = math.ceil(cmg*1000)/1000\n",
+ "#(f)\n",
+ "cmrr = g/cmg\n",
+ "#(g)\n",
+ "cmrr_db = 20*math.log10(cmrr)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) re = %d ohm\\n(b) voltage gain for differential input = %.1f\\n(c) AC output voltage = %.4f V\"%(re,g,vo))\n",
+ "print(\"(d) input impedance = %d k-ohm\\n(e) CMRR = %.2f\\n(g) CMRR' = %.1f dB\"%(Zi/1000,cmrr,cmrr_db))\n",
+ "\n",
+ "#Answer for re is wong in the book "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) re = 4424 ohm\n",
+ "(b) voltage gain for differential input = 113.1\n",
+ "(c) AC output voltage = 0.2375 V\n",
+ "(d) input impedance = 663 k-ohm\n",
+ "(e) CMRR = 226.65\n",
+ "(g) CMRR' = 47.1 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.3, Page No. 447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Op-amp with negative feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ag = 100000.0 # open loop gain of Op-amp\n",
+ "fb = 0.01 # feed back factor\n",
+ "vi = 2*10**-3 # input voltage\n",
+ "\n",
+ "#Calculations\n",
+ "# a\n",
+ "g = Ag/(1+(fb*Ag))\n",
+ "# b\n",
+ "v = vi*g\n",
+ "# c\n",
+ "Ev = v/Ag\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Closed loop gain = %.1f \\n(b) Output = %.4f V\\n(c) Error voltage = %.3f*10^-6 V\"%(g,v,Ev*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Closed loop gain = 99.9 \n",
+ "(b) Output = 0.1998 V\n",
+ "(c) Error voltage = 1.998*10^-6 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.4, Page No. 447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Op-amp with negative feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ag = 15000.0 # open loop gain of Op-amp\n",
+ "fb = 0.01 # feed back factor\n",
+ "vi = 2*10**-3 # input voltage\n",
+ "\n",
+ "#Calculations\n",
+ "# a\n",
+ "g = Ag/(1+(fb*Ag))\n",
+ "# b\n",
+ "v = vi*g\n",
+ "# c\n",
+ "Ev = v/Ag\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Closed loop gain = %.3f \\n(b) Output = %.4f V\\n(c) Error voltage = %.3f*10^-5 V\"%(g,v,Ev*10**5))\n",
+ "print(\"\\nComparison conclusion:\\nA decrease in open loop gain causes a corresponding increase in error voltage,\")\n",
+ "print(\"thus keeping the output voltage nearly constant.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Closed loop gain = 99.338 \n",
+ "(b) Output = 0.1987 V\n",
+ "(c) Error voltage = 1.325*10^-5 V\n",
+ "\n",
+ "Comparison conclusion:\n",
+ "A decrease in open loop gain causes a corresponding increase in error voltage,\n",
+ "thus keeping the output voltage nearly constant.\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.5, Page No. 448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input/output impedances\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "g = 100000.0 # open loop gain\n",
+ "Zi = 2*10**6 # input impedance\n",
+ "Zo = 75 # output impedance\n",
+ "beta = 0.01 # feedback factor\n",
+ "\n",
+ "#Calculations\n",
+ "D = 1+ beta*g\n",
+ "Zi_cl = Zi*D\n",
+ "Zo_cl = Zo/D\n",
+ "\n",
+ "#Result\n",
+ "print(\"Closed loop input impedance = %.0f M-ohm\\nClosed loop output impedance = %.4f ohm\"%(Zi_cl/10**6,Zo_cl))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Closed loop input impedance = 2002 M-ohm\n",
+ "Closed loop output impedance = 0.0749 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.6, Page No.448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# closed loop gain and disensitivity\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "g = 100000.0 # open loop gain\n",
+ "beta = 0.001 # feedback factor\n",
+ "\n",
+ "#calculations\n",
+ "clg = g/(1+ beta*g)\n",
+ "D = 1+g*beta\n",
+ "\n",
+ "# Result\n",
+ "print(\"Closed loop gain = %.1f \\nDesensitivity = %.0f \"%(clg,D))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Closed loop gain = 990.1 \n",
+ "Desensitivity = 101 \n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.7, Page No.448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# closed loop gain and upper cut off frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f = 10**6 # unity gain frequency\n",
+ "alg = 100000.0 # open loop gain\n",
+ "b1 = 0.001 # feedback factor in case 1\n",
+ "b2 = 0.01 # feedback factor in case 2\n",
+ "b3 = 0.1 # feedback factor in case 3\n",
+ "\n",
+ "#calculations\n",
+ "# a\n",
+ "f1 = f/alg\n",
+ "# b\n",
+ "g2 = alg/(1+alg*b1)\n",
+ "f2 = f/g2\n",
+ "# c\n",
+ "g3 = alg/(1+alg*b2)\n",
+ "f3 = f/g3\n",
+ "# d\n",
+ "g4 = alg/(1+alg*b3)\n",
+ "f4 = f/g4\n",
+ "\n",
+ "#Result\n",
+ "print(\"Open loop,\\tgain = %.0f \\tf2 = %d Hz\"%(alg,f1))\n",
+ "print(\"Closed loop,\\tgain = %.1f \\tf2 = %d Hz\"%(g2,f2))\n",
+ "print(\"Closed loop,\\tgain = %.1f \\tf2 = %d Hz\"%(g3,f3))\n",
+ "print(\"Closed loop,\\tgain = %.3f \\tf2 = %d Hz\"%(g4,f4))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Open loop,\tgain = 100000 \tf2 = 10 Hz\n",
+ "Closed loop,\tgain = 990.1 \tf2 = 1010 Hz\n",
+ "Closed loop,\tgain = 99.9 \tf2 = 10010 Hz\n",
+ "Closed loop,\tgain = 9.999 \tf2 = 100010 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.8, Page No.449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Slew rating\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Imax = 10*10**-6 # maximum current\n",
+ "C = 4000*10**-12 # capacitance in pF\n",
+ "\n",
+ "#Calculations\n",
+ "sr = Imax/C\n",
+ "\n",
+ "#Result\n",
+ "print(\"Slew rate = %.1f V/ms\"%(sr/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Slew rate = 2.5 V/ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.9, Page No. 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# slew rate distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "sr = 0.4 # Slew rate\n",
+ "V = 6 # peak value of voltage\n",
+ "f = 10*10**3 # frequency\n",
+ "\n",
+ "#Calculations\n",
+ "slope = 2*math.pi*f*V\n",
+ "\n",
+ "#Result\n",
+ "print(\"Initial slope of sine wave =%.5f V/micro-sec\"%(slope/10**6))\n",
+ "print(\"\\nSince the slew rate of amplifier is %.1f V/micro-sec, there is no slew rate distortion.\"%(sr))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Initial slope of sine wave =0.37699 V/micro-sec\n",
+ "\n",
+ "Since the slew rate of amplifier is 0.4 V/micro-sec, there is no slew rate distortion.\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.10, Page No. 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Slew rate distortion \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "sr = 0.5*10**6 # slew rate\n",
+ "V = 10 # peak value of input signal\n",
+ "f = 10*10**3 # frequency\n",
+ "\n",
+ "#calculations\n",
+ "# a\n",
+ "slope = 2*math.pi*f*V\n",
+ "# b\n",
+ "Vp = sr/(2*math.pi*f)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Initial slope of sine wave = %.3f V/micro-sec\"%(slope/10**6))\n",
+ "print(\"Since initial slope is more than the slew rate of amplifier, slew rate distortion will occur.\")\n",
+ "print(\"\\n(b) To eliminate slew rate distortion,\\n Vp = %.2f V\"%Vp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Initial slope of sine wave = 0.628 V/micro-sec\n",
+ "Since initial slope is more than the slew rate of amplifier, slew rate distortion will occur.\n",
+ "\n",
+ "(b) To eliminate slew rate distortion,\n",
+ " Vp = 7.96 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.11, Page No.451"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# inverting amplifier\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A = 100000.0 # open loop gain\n",
+ "Zo = 75.0 # output impedance\n",
+ "f = 1.0*10**6 # unity gain frequency\n",
+ "R1 = 1.0*10**3 # Source Resistance \n",
+ "Rf = 100.0*10**3 # feedback resistance\n",
+ "\n",
+ "#Calculations\n",
+ "# a\n",
+ "g = -Rf/R1\n",
+ "# b\n",
+ "beta = R1/(R1+Rf)\n",
+ "D = 1+(A*beta)\n",
+ "# c\n",
+ "f2 = beta*f\n",
+ "# d\n",
+ "Zi_cl = R1\n",
+ "\n",
+ "#result\n",
+ "print(\"(a) Gain = %f\\n(b) disensitivity = %.1f\"%(g,D))\n",
+ "print(\"(c) closed loop upper cut off frequency = %.1f*10^3 Hz\\n(d) closed loop input impedance = %.0f ohm\"%(f2/1000,Zi_cl))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Gain = -100.000000\n",
+ "(b) disensitivity = 991.1\n",
+ "(c) closed loop upper cut off frequency = 9.9*10^3 Hz\n",
+ "(d) closed loop input impedance = 1000 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.12, Page No. 453"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# closed loop voltage gain, input/output impedance(refering to fig 12.11)\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "R2 = 100.0*10**3 # Resistance R2\n",
+ "R1 = 100.0 # Resistance R1\n",
+ "A = 100000.0 # open loop gain\n",
+ "Zin = 2*10**6 # input impedance\n",
+ "Zo = 75 # output impedance\n",
+ "\n",
+ "# Calculations\n",
+ "g = (R1+R2)/R1\n",
+ "beta = R1/(R1+R2)\n",
+ "Zi_dash = (1+A*beta)*Zin\n",
+ "Zo_dash = Zo/(1+A*beta)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Closed loop gain = %.0f \\nClosed loop input impedance = %.1f M-ohm\\nClosed loop output impedance = %.3f ohm\"%(g,Zi_dash/10**6,Zo_dash))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Closed loop gain = 1001 \n",
+ "Closed loop input impedance = 201.8 M-ohm\n",
+ "Closed loop output impedance = 0.743 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 84
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.13, Page No.454"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Op-amp parameters(refering to fig. 12.13)\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A = 100000.0 # open loop gain\n",
+ "f = 1.0*10**6 # unity gain frequency\n",
+ "R3 = 150 *10**3 # Resistance R3\n",
+ "Ci = 1*10**-6 # inpuut capacitor\n",
+ "R2 = 100*10**3 # Resistance R2\n",
+ "Cb = 1*10**-6 # Bias capacitor\n",
+ "R1 = 1.0*10**3 # Resistance R1\n",
+ "Co = 1*10**-6 # output capacitance\n",
+ "Rl = 15*10**3 # load resistance\n",
+ "\n",
+ "#Calculations\n",
+ "# a\n",
+ "A = (R1+R2)/R1\n",
+ "# b\n",
+ "beta = 1/A\n",
+ "f2 = f/A\n",
+ "# c\n",
+ "fc1 = 1/(2*math.pi*Ci*R3)\n",
+ "fc2 = 1/(2*math.pi*Cb*Rl)\n",
+ "fc3 = 1/(2*math.pi*Co*R1)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Avf = %.0f \\n\\n(b) f2' =%.1f*10^3 Hz\"%(A,f2/1000))\n",
+ "print(\"\\n(c) The critical frequencies are,\\n fc = %.3f Hz\\n fc = %.2f Hz\\n fc = %.2f Hz\"%(fc1,fc2,fc3))\n",
+ "print(\"\\n(d) Evidently the lower cut off frequency is the highest of the above three critical frequencies, i.e. %.2f Hz\"%fc3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Avf = 101 \n",
+ "\n",
+ "(b) f2' =9.9*10^3 Hz\n",
+ "\n",
+ "(c) The critical frequencies are,\n",
+ " fc = 1.061 Hz\n",
+ " fc = 10.61 Hz\n",
+ " fc = 159.15 Hz\n",
+ "\n",
+ "(d) Evidently the lower cut off frequency is the highest of the above three critical frequencies, i.e. 159.15 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 93
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.14, Page No.455"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# output voltage(referring fig.12.14)\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "v1 = 0.5 # input voltage 1\n",
+ "v2 = 1.5 # input voltage 2\n",
+ "v3 = 0.2 # input voltage 3\n",
+ "R1 = 10.0*10**3 # resistance R1\n",
+ "R2 = 10.0*10**3 # resistance R2\n",
+ "R3 = 10.0*10**3 # resistance R3\n",
+ "Rf = 50.0*10**3 # feedback resistance\n",
+ "\n",
+ "#Calculations\n",
+ "vo = -Rf*((v1/R1)+(v2/R2)+(v3/R3))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Output Voltage = %.0f V\"%vo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output Voltage = -11 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.15, Page No.455"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 96
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.16, Page No.456"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.17, Page No. 457"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# difference amplifier(referring fig. 12.18)\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1 = 50.0*10**3 # Resistance R1\n",
+ "R2 = 10.0*10**3 # Resistance R2\n",
+ "Vs1 = 4.5 # input voltage at channel 1\n",
+ "Vs2 = 5.0 # input voltage at channel 2\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "vo = R1*(Vs2-Vs1)/R2\n",
+ "\n",
+ "#Result\n",
+ "print(\"Output voltage = %.1f V\"%vo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = 2.5 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.18, Page No.458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# CMRR in dB\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A = 50.0 # gain of difference amplifier\n",
+ "v = 2.0 # input voltage\n",
+ "vo = 5.0*10**-3 # output voltage \n",
+ "\n",
+ "#Calculations\n",
+ "Vcom = 0.5*(v+v)\n",
+ "Acom = vo/Vcom\n",
+ "cmrr = A/Acom\n",
+ "cmrr = 20*math.log10(cmrr)\n",
+ "\n",
+ "#Result\n",
+ "print(\"CMRR = %.2f dB\"%(cmrr))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "CMRR = 86.02 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 101
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.19, Page No.458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical Example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical Example\n"
+ ]
+ }
+ ],
+ "prompt_number": 102
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.20, Page No.459"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical Example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical Example\n"
+ ]
+ }
+ ],
+ "prompt_number": 103
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.21, Page No.466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# two pole high pass filter(referring fig. 12.32)\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1 = 10.0*10**3 # Resistance R1\n",
+ "R2 = 5.6*10**3 # Resistance R2\n",
+ "R = 1.0*10**3 # Resistance R\n",
+ "C = 0.01 *10**-6 # capacitance \n",
+ "vi = 1.6*10**-3 # input voltage \n",
+ "\n",
+ "#Calculations\n",
+ "# a\n",
+ "A = 1+(R2/R1)\n",
+ "# b\n",
+ "vo = A*vi\n",
+ "# c\n",
+ "pi = math.ceil(math.pi*10000)/10000\n",
+ "fc = 1/(2*pi*R*C)\n",
+ "# d\n",
+ "gain = 0.707*A\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) midband gain = %.2f\\n(b) output voltage = %.3f mV\\n(c) fc = %.2f Hz\\n(d) Gain = %.3f\"%(A,vo*1000,fc,gain))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) midband gain = 1.56\n",
+ "(b) output voltage = 2.496 mV\n",
+ "(c) fc = 15915.46 Hz\n",
+ "(d) Gain = 1.103\n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.22, Page No. 466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Low pass filter(referring fig. 12.30)\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "vi = 1.1*10**-3 # input voltage\n",
+ "R = 10*10**3 # Resistance\n",
+ "C = 0.001*10**-6 # Capacitance\n",
+ "R1 = 10*10**3 # Resistance R1\n",
+ "R2 = 5.6*10**3 # Resistance R2\n",
+ "\n",
+ "#Calculations\n",
+ "# a\n",
+ "A = (R1+R2)/R1\n",
+ "vo1 = A*vi\n",
+ "# b\n",
+ "fc = 1/(2*math.pi*R*C)\n",
+ "# c\n",
+ "vo = 0.707*vo1\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Avf = %.2f\\n Vo = %.3f*10^-3 V\\n(b) fc = %.3f*10^3 Hz\\n(c) at f = fc,\\nVo = %.3f* 10^-3 V\"%(A,vo1*1000,fc/1000,vo*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Avf = 1.56\n",
+ " Vo = 1.716*10^-3 V\n",
+ "(b) fc = 15.915*10^3 Hz\n",
+ "(c) at f = fc,\n",
+ "Vo = 1.213* 10^-3 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 12.23, Page No.466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_13_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_13_3.ipynb new file mode 100755 index 00000000..2e5b592a --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_13_3.ipynb @@ -0,0 +1,965 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: Number Systems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.1, Page No. 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Decimal to binary conversion: 10\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "N = 10 # decimal no to be convered to binary\n",
+ "k = N\n",
+ "#Calculations\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0]\n",
+ "while(N!=0):\n",
+ " b[i] = N%2\n",
+ " N = N/2\n",
+ " i = i+1 \n",
+ "\n",
+ "#Result\n",
+ "print(\"Binary equivalent of decimal %d is %d%d%d%d\"%(k,b[3],b[2],b[1],b[0]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Binari equivalent of decimal 10 is 1010\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.2, Page No.474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Decimal to binary conversion: 25\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "N = 25 # decimal no to be convered to binary\n",
+ "\n",
+ "#Calculations\n",
+ "k = N\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0]\n",
+ "while(N!=0):\n",
+ " b[i] = N%2\n",
+ " N = N/2\n",
+ " i = i+1 \n",
+ "\n",
+ "#Result\n",
+ "print(\"Binary equivalent of decimal %d is %d%d%d%d%d\"%(k,b[4],b[3],b[2],b[1],b[0]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Binari equivalent of decimal 25 is 11001\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.3, Page No. 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Binary to decimal:101110\n",
+ "\n",
+ "import math\n",
+ "b0 = 0 # bit 0\n",
+ "b1 = 1 # bit 1\n",
+ "b2 = 1 # bit 2\n",
+ "b3 = 1 # bit 3\n",
+ "b4 = 0 # bit 4\n",
+ "b5 = 1 # bit 5\n",
+ "\n",
+ "#Calculations\n",
+ "D = (2**0)*b0+(2**1)*b1+(2**2)*b2+(2**3)*b3+(2**4)*b4+(2**5)*b5\n",
+ "\n",
+ "#Result\n",
+ "print(\"Decimal no is %d\"%D)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Decimal no is 46\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.4, Page No. 475"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Decimal to binary conversion: 15,31\n",
+ "\n",
+ "import math\n",
+ "#######################################################################################\n",
+ "# for N = 15\n",
+ "#variable declaration\n",
+ "N = 15 # decimal no to be convered to binary\n",
+ "\n",
+ "#Calculations\n",
+ "k = N\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0]\n",
+ "while(N!=0):\n",
+ " b[i] = N%2\n",
+ " N = N/2\n",
+ " i = i+1 \n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nBinary equivalent of decimal %d is %d%d%d%d%d\"%(k,b[4],b[3],b[2],b[1],b[0]))\n",
+ "\n",
+ "########################################################################################\n",
+ "\n",
+ "# For N =31\n",
+ "#variable declaration\n",
+ "N = 31 # decimal no to be convered to binary\n",
+ "\n",
+ "#Calculations\n",
+ "k = N\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0]\n",
+ "while(N!=0):\n",
+ " b[i] = N%2\n",
+ " N = N/2\n",
+ " i = i+1 \n",
+ "\n",
+ "#Result\n",
+ "print(\"Binary equivalent of decimal %d is %d%d%d%d%d\"%(k,b[4],b[3],b[2],b[1],b[0]))\n",
+ "##########################################################################################\n",
+ "#Addition\n",
+ "c= bin(15+31)[2:]\n",
+ "print(\"(b) Addition of 15 and 31 is %s in binary. Decimal equivalent of %s is %d\"%(c,c,int(c,2)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Binari equivalent of decimal 15 is 01111\n",
+ "Binari equivalent of decimal 31 is 11111\n",
+ "(b) Addition of 15 and 31 is 101110 in binary. Decimal equivalent of 101110 is 46\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.5, Page No.475"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Binary subtraction\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "n1 = 11001 # first number\n",
+ "n2 = 10001 # second number\n",
+ "\n",
+ "#calculations\n",
+ "n1 = int(str(n1),2)\n",
+ "n2 = int(str(n2),2)\n",
+ "c = bin(n1-n2)[2:]\n",
+ "\n",
+ "#Result\n",
+ "print(\"Subtraction result in binary = %s\"%c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Subtraction result in binary = 1000\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.6, Page No.475"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Binary subtraction\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "n1 = 1010 # first number\n",
+ "n2 = 111 # second number\n",
+ "\n",
+ "#calculations\n",
+ "n1 = int(str(n1),2)\n",
+ "n2 = int(str(n2),2)\n",
+ "c = bin(n1-n2)[2:]\n",
+ "\n",
+ "#Result\n",
+ "print(\"Subtraction result in binary = %s\"%c)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Subtraction result in binary = 11\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.7, Page No. 476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 16- bit signed binary representation\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a = 8\n",
+ "b = -8\n",
+ "c = 165\n",
+ "d = -165\n",
+ "\n",
+ "#Calculations\n",
+ "#c = bin(d)\n",
+ "a = format(a,'#018b')[2:]\n",
+ "b = format(b,'#018b')[3:]\n",
+ "c = format(c,'#018b')[2:]\n",
+ "d = format(d,'#018b')[3:]\n",
+ "str = '1'\n",
+ "#Result\n",
+ "print(\"In the leading bit we will have 1 to represent '-' sign\\n\")\n",
+ "print(\"(a) +8 --> %s\"%(a))\n",
+ "print(\"(b) -8 --> %s%s\"%(str,b))\n",
+ "print(\"(c) +167 --> %s\"%(c))\n",
+ "print(\"(d) -167 --> %s%s\"%(str,d))\n",
+ "\n",
+ "a = format(-167%(1<<16),'016b')\n",
+ "b = format(167%(1<<16),'016b')\n",
+ "print a\n",
+ "print b"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In the leading bit we will have 1 to represent '-' sign\n",
+ "\n",
+ "(a) +8 --> 0000000000001000\n",
+ "(b) -8 --> 1000000000001000\n",
+ "(c) +167 --> 0000000010100101\n",
+ "(d) -167 --> 1000000010100101\n",
+ "1111111101011001\n",
+ "0000000010100111\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.8, Page No.477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 2's complement\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "a = int('00011111',2)\n",
+ "b = int('11100101',2)\n",
+ "c = int('11110111',2)\n",
+ "\n",
+ "#Calculations\n",
+ "a = format(-a%(1<<8),'08b')\n",
+ "b = format(-b%(1<<8),'08b')\n",
+ "c = format(-c%(1<<8),'08b')\n",
+ "print(\"(a) 2's complement of 00011111 --> %s \" %a)\n",
+ "print(\"(b) 2's complement of 11100101 --> %s \" %b)\n",
+ "print(\"(c) 2's complement of 11110111 --> %s \" %c)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) 2's complement of 00011111 --> 11100001 \n",
+ "(b) 2's complement of 11100101 --> 00011011 \n",
+ "(c) 2's complement of 11110111 --> 00001001 \n"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.9, Page No. 13.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 8-bit number range\n",
+ "\n",
+ "import math\n",
+ "#calculations\n",
+ "a = int('01111111',2)\n",
+ "b = int('10000000',2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"largest positive 8-bit no in %d and smallest negative number is -%d\"%(a,b))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "largest positive 8-bit no in 127 and smallest negative number is -128\n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.10, Page No.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 2's complement and addition,subtraction\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A = -24\n",
+ "B = 16\n",
+ "#Calculations\n",
+ "#2's complement\n",
+ "a = format(A%(1<<8),'08b')\n",
+ "b = format(-B%(1<<8),'08b')\n",
+ "# addition\n",
+ "c = bin(A+B)[3:]\n",
+ "c = format(-int(c,2)%(1<<8),'08b')\n",
+ "#Subtraction\n",
+ "d = bin(A-B)[3:]\n",
+ "d = format(-int(d,2)%(1<<8),'08b')\n",
+ "#Result\n",
+ "print(\"(a)\\n2's complement of -24 --> %s \" %a)\n",
+ "print(\"2's complement of 16 --> %s \" %b)\n",
+ "print(\"(b) A+B = %s\"%c) \n",
+ "print(\"(c) A-B = %s\"%d)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "2's complement of -24 --> 11101000 \n",
+ "2's complement of 16 --> 11110000 \n",
+ "(b) A+B = 11111000\n",
+ "(c) A-B = 11011000\n"
+ ]
+ }
+ ],
+ "prompt_number": 116
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.11, Page No. 479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 2's complement and addition,subtraction\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A = -60\n",
+ "B = -28\n",
+ "#Calculations\n",
+ "#2's complement\n",
+ "a = format(A%(1<<8),'08b')\n",
+ "b = format(B%(1<<8),'08b')\n",
+ "# addition\n",
+ "c = bin(A+B)[3:]\n",
+ "c = format(-int(c,2)%(1<<8),'08b')\n",
+ "#Subtraction\n",
+ "x = B-A\n",
+ "d = bin(B-A)[2:]\n",
+ "d = format(int(d,2),'08b')\n",
+ "#Result\n",
+ "print(\"(a)\\n2's complement of A --> %s \" %a)\n",
+ "print(\"2's complement of B --> %s \" %b)\n",
+ "print(\"(b) B+A = %s\"%c) \n",
+ "print(\"(c) B-A = %s\"%d)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "2's complement of A --> 11000100 \n",
+ "2's complement of B --> 11100100 \n",
+ "(b) B+A = 10101000\n",
+ "(c) B-A = 00100000\n"
+ ]
+ }
+ ],
+ "prompt_number": 130
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.12, Page No. 479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# decimal to binary\n",
+ "\n",
+ "# For N = 0.6875\n",
+ "#variable declaration\n",
+ "N = 0.6875 # decimal no to be convered to binary\n",
+ "\n",
+ "#Calculations\n",
+ "k = N\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0,0,0,0,0,0,0]\n",
+ "while(N!=0):\n",
+ " N = N*2\n",
+ " #print N\n",
+ " b[i]=0\n",
+ " #print b[i]\n",
+ " if (N>1) or(N==1):\n",
+ " N =N-1\n",
+ " b[i]=1\n",
+ " i=i+1\n",
+ " \n",
+ "#Result\n",
+ "print(\"Binary equivalent of decimal %f is 0.%d%d%d%d \"%(k,b[0],b[1],b[2],b[3]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Binary equivalent of decimal 0.687500 is 0.1011 \n"
+ ]
+ }
+ ],
+ "prompt_number": 230
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.13, Page No.480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# decimal to binary\n",
+ "\n",
+ "# For N = 0.634\n",
+ "#variable declaration\n",
+ "N = 0.634 # decimal no to be convered to binary\n",
+ "\n",
+ "#Calculations\n",
+ "k = N\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0,0,0,0,0,0,0]\n",
+ "while(i!=7):\n",
+ " N = N*2\n",
+ " #print N\n",
+ " b[i]=0\n",
+ " #print b[i]\n",
+ " if (N>1) or(N==1):\n",
+ " N =N-1\n",
+ " b[i]=1\n",
+ " i=i+1\n",
+ "\n",
+ "#Result \n",
+ "#Result\n",
+ "print(\"Binary equivalent of decimal %f is 0.%d%d%d%d%d%d%d \"%(k,b[0],b[1],b[2],b[3],b[4],b[5],b[6]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Binary equivalent of decimal 0.634000 is 0.1010001 \n"
+ ]
+ }
+ ],
+ "prompt_number": 222
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.14, Page No.480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# decimal to binary\n",
+ "\n",
+ "# For N = 0.634\n",
+ "#variable declaration\n",
+ "N = 39.12 # decimal no to be convered to binary\n",
+ "\n",
+ "N1 = 39\n",
+ "k = N1\n",
+ "#Calculations\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0,0,0]\n",
+ "while(N1!=0):\n",
+ " b[i] = N1%2\n",
+ " N1 = N1/2\n",
+ " i = i+1 \n",
+ "\n",
+ "#Result\n",
+ "print(\"Binary equivalent of decimal %d is %d%d%d%d%d%d%d\"%(k,b[6],b[5],b[4],b[3],b[2],b[1],b[0]))\n",
+ "\n",
+ "\n",
+ "N2 =0.12\n",
+ "#Calculations\n",
+ "k = N2\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0,0,0,0,0,0,0]\n",
+ "while(i!=7):\n",
+ " N2 = N2*2\n",
+ " #print N\n",
+ " b[i]=0\n",
+ " #print b[i]\n",
+ " if (N2>1) or(N2==1):\n",
+ " N2 =N2-1\n",
+ " b[i]=1\n",
+ " i=i+1\n",
+ " \n",
+ "#Result\n",
+ "print(\"Binary equivalent of decimal %f is 0.%d%d%d%d%d%d%d \"%(k,b[0],b[1],b[2],b[3],b[4],b[5],b[6]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Binary equivalent of decimal 39 is 0100111\n",
+ "Binary equivalent of decimal 0.120000 is 0.0001111 \n"
+ ]
+ }
+ ],
+ "prompt_number": 225
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.15, Page No.481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# binary Addition\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a1 = int('101101',2) # integer part of first no\n",
+ "a2 = int('0101',2) # fractiona part of first no\n",
+ "b1 = int('10001',2) # integer part of second no\n",
+ "b2 = int('1010',2) # fractiona part of second no(in fraction we can add any no of 0s)\n",
+ "\n",
+ "#Calculations\n",
+ "c1= bin(a1+b1)[2:]\n",
+ "c2 = bin(a2+b2)[2:]\n",
+ "\n",
+ "print(\"Addition --> %s.%s\"%(c1,c2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Addition --> 111110.1111\n"
+ ]
+ }
+ ],
+ "prompt_number": 227
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.16, Page No. 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# binary to decimal conversion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "i0 = 1 # LSB of integer\n",
+ "i1 = 0\n",
+ "i2 = 0\n",
+ "i3 = 1\n",
+ "i4 = 1 # MSB of integer\n",
+ "f1 = 0\n",
+ "f2 = 0\n",
+ "f3 = 1\n",
+ "f4 = 0\n",
+ "f5 = 1\n",
+ "f6 = 1\n",
+ "\n",
+ "#Calculations\n",
+ "D = i0*(2**0)+i1*(2**1)+i2*(2**2)+i3*(2**3)+i4*(2**4)+f1*(2**-1)+f2*(2**-2)+f3*(2**-3)+f4*(2**-4)+f5*(2**-5)+f6*(2**-6)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Decimal equivalent = %f\"%D)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Decimal equivalent = 25.171875\n"
+ ]
+ }
+ ],
+ "prompt_number": 231
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.17, Page No. 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Hexadecimal to decimal\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "a = 3\n",
+ "b = 10 # decimal equivalent of A\n",
+ "c = 8\n",
+ "#Calculations\n",
+ "# binary equvalent of 8 A 3 \n",
+ "# 1000 1010 0011\n",
+ "# a\n",
+ "Da = (1*2**0)+(1*2**1)+(0*2**2)+(0*2**3)+(0*2**4)+(1*2**5)+(0*2**6)+(1*2**7)+(0*2**8)+(0*2**9)+(0*2**10)+(1*2**11)\n",
+ "print(\"(a) Decimal equivalent of 8A3 is %d\"%Da)\n",
+ "# b \n",
+ "Db = (a*(16**0))+(b*(16**1))+(c*(16**2))\n",
+ "print(\"(b) Decimal equivalent of 8A3 is %d\"%Db)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Decimal equivalent of 8A3 is 2211\n",
+ "(b) Decimal equivalent of 8A3 is 2211\n"
+ ]
+ }
+ ],
+ "prompt_number": 236
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.18, Page No. 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# decimal to hexadecimal\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "N = 268 # no to be converted into hexadecimal\n",
+ "\n",
+ "N1 = 268\n",
+ "k = N1\n",
+ "#Calculations\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0,0,0]\n",
+ "while(N1!=0):\n",
+ " b[i] = N1%16\n",
+ " N1 = N1/16\n",
+ " i = i+1 \n",
+ "\n",
+ "#Result\n",
+ "print(\"Remainder1: %d = C\\nRemainder2: %d\\nRemainder3: %d\\n\\nHexaecimal equivalent of %d = 10C\"%(b[0],b[1],b[2],k))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Remainder1: 12 = C\n",
+ "Remainder2: 0\n",
+ "Remainder3: 1\n",
+ "\n",
+ "Hexaecimal equivalent of 268 = 10C\n"
+ ]
+ }
+ ],
+ "prompt_number": 260
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.19, Page No.483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# decimal to hexadecimal\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "N = 5741 # no to be converted into hexadecimal\n",
+ "\n",
+ "N1 = 5741\n",
+ "k = N1\n",
+ "#Calculations\n",
+ "i = 0\n",
+ "b =[0,0,0,0,0,0,0,0]\n",
+ "while(N1!=0):\n",
+ " b[i] = N1%16\n",
+ " N1 = N1/16\n",
+ " i = i+1 \n",
+ "\n",
+ "#Result\n",
+ "print(\"Remainder1: %d = D\\nRemainder2: %d\\nRemainder3: %d\\nRemainder4: %d\\n\\nHexaecimal equivalent of %d =166D\"%(b[0],b[1],b[2],b[3],k))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Remainder1: 13 = D\n",
+ "Remainder2: 6\n",
+ "Remainder3: 6\n",
+ "Remainder4: 1\n",
+ "\n",
+ "Hexaecimal equivalent of 5741 =166D\n"
+ ]
+ }
+ ],
+ "prompt_number": 259
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 13.20, Page No.483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Hexadecimal to decimal\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "a = 0\n",
+ "b = 7\n",
+ "c = 13 # decimal equivalent of D\n",
+ "#Calculations\n",
+ "D = (a*(16**0))+(b*(16**1))+(c*(16**2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"(b) Decimal equivalent of 8A3 is %d\"%D)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(b) Decimal equivalent of 8A3 is 3440\n"
+ ]
+ }
+ ],
+ "prompt_number": 262
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_1_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_1_3.ipynb new file mode 100755 index 00000000..47f33435 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_1_3.ipynb @@ -0,0 +1,449 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Power Diodes And Transistors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 1.1, Page No. 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# stored charge and peak reverse current\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "t = 2.5*10**-6 # reverese recovery time to diode\n",
+ "di_by_dt = 35*10**6 # di/dt in A/S\n",
+ "\n",
+ "#Calculations\n",
+ "Q= 0.5*(t**2)*di_by_dt\n",
+ "I= math.sqrt(2*Q*di_by_dt)\n",
+ "\n",
+ "#result\n",
+ "print(\"(a) Stored charge\\n Q = %.3f * 10^-6 C\\n\\n(b) Peak reverse current\\nI = %.1f A\"%(Q*10**6,I))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Stored charge\n",
+ " Q = 109.375 * 10^-6 C\n",
+ "\n",
+ "(b) Peak reverse current\n",
+ "I = 87.5 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 1.2, Page No.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Vrrm rating for diode in full wave rectifire\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "V= 12 # secondary peak voltage\n",
+ "sf = 1.4 # safety factor\n",
+ "\n",
+ "#calculations\n",
+ "# For fullwave rectifier with transformer secondary voltage 12-0-12, each diode will experience Vrrm equal to 2 x sqrt(2)x 12\n",
+ "r = math.sqrt(2)\n",
+ "r = math.floor(r*1000)/1000 \n",
+ "V = 2*r*V # Actual value of Vrrm for each diode\n",
+ "Vrrm= V*sf\n",
+ "\n",
+ "# result\n",
+ "print(\"Vrrm rating for each diode with safety factor of %.1f is %.2fV\\n\\n\"%(sf,Vrrm))\n",
+ "#Answer in the book for Vrrm rating is wrong\n",
+ "\n",
+ "#%pylab inline\n",
+ "import matplotlib.pyplot as plt\n",
+ "from numpy import arange,sin,pi\n",
+ "%matplotlib inline\n",
+ "#fig -1\n",
+ "t = arange(0.0,4,0.01)\n",
+ "S = sin(math.pi*t)\n",
+ "plt.subplot(411)\n",
+ "plt.title(\"Secondary Voltage\")\n",
+ "plt.plot(t,S)\n",
+ "#fig -2\n",
+ "plt.subplot(412)\n",
+ "plt.title(\"Load Voltage\")\n",
+ "t1 = arange(0.0,1,0.01)\n",
+ "t2 = arange(1.0,2.0,0.01)\n",
+ "t3 = arange(2.0,3.0,0.01)\n",
+ "t4 = arange(3.0,4.0,0.01)\n",
+ "s1 = sin((pi*t1))\n",
+ "s2 = sin((pi*t1))\n",
+ "s3 = sin(pi*t1)\n",
+ "s4 = sin(pi*t1)\n",
+ "\n",
+ "plt.plot(t1,s1)\n",
+ "plt.plot(t2,s2)\n",
+ "plt.plot(t3,s3)\n",
+ "plt.plot(t4,s4)\n",
+ "#fig -3\n",
+ "plt.subplot(413)\n",
+ "plt.title(\"Voltage across D1\")\n",
+ "plt.axis([0,4,0,1])\n",
+ "plt.plot(t1,s1)\n",
+ "plt.plot(t3,s3)\n",
+ "#fig -4\n",
+ "plt.subplot(414)\n",
+ "plt.title(\"Voltage across D2\")\n",
+ "plt.axis([0,4,-1,0])\n",
+ "s2 = sin((pi*t1)-pi)\n",
+ "s4 = sin(pi*t1-pi)\n",
+ "plt.plot(t2,s2)\n",
+ "plt.plot(t4,s4)\n",
+ "#Result\n",
+ "plt.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vrrm rating for each diode with safety factor of 1.4 is 47.51V\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEKCAYAAAD6q1UVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdYU9cbx79BrMoeskVRQGUIqCiitWItDhT3rts6667V\narXgHlSrldbRqnVr1Z9iFdDWghP3FhFBkOUABJkCCe/vj6OpSICQdQPcz/PcR5N7cs43h+TNvee8\nQ0BEBB4eHh6eGoUG1wJ4eHh4eFQPb/x5eHh4aiC88efh4eGpgfDGn4eHh6cGwht/Hh4enhoIb/x5\neHh4aiC88eepEfzxxx/o2LEj1zIqxMbGBmfPnuVaBk8NgDf+PArh4sWLaN++PQwMDGBsbIxPP/0U\nN27c4FqWyjl48CAaN25c6nmhUAhTU1MEBweX+3qBQACBQAAA8Pf3x8iRI5Wik4eHN/48cpOVlYVe\nvXph5syZyMjIQHJyMvz8/FCnTh2upSkEkUgkddt+/fohMzMT586dK/F8aGgoatWqhe7duytaHg+P\nTPDGn0duoqOjIRAIMGTIEAgEAtStWxfe3t5o0aKFuM2OHTvg6OgIIyMjdO/eHQkJCeJzDx8+hLe3\nN4yNjWFubo5Vq1YBAAoKCjBr1ixYWVnBysoKs2fPRmFhIQAgPDwcDRo0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qIYw589gMBjVkP8DYQvKpBZyZSsAAAAASUVORK5C\nYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x53d47f0>"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 1.3, Page No. 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Average, peak and rms current\n",
+ "\n",
+ "import math\n",
+ "#variable declaration(from the waveform)\n",
+ "Ip = 20.0 # Peak current\n",
+ "\n",
+ "#calculations\n",
+ "Iavg = (Ip*1.0)/3.0\n",
+ "Irms = math.sqrt((Ip**2)*1.0/3.0)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Peak Current = %d A\\nAverage Current = %.3f A\\nrms Current = %.3f A\"%(Ip,Iavg,Irms))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak Current = 20 A\n",
+ "Average Current = 6.667 A\n",
+ "rms Current = 11.547 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 1.4, Page No. 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#power BJT\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "Vcc =220.0 # collector voltage\n",
+ "Vce_sat = 1.0 # Vce saturation voltage\n",
+ "Rb =6.0 # base resisror\n",
+ "Rl = 8.0 # load resisotr\n",
+ "hfe = 15.0 # gain\n",
+ "Vbe = 0.7 # base-emiter voltage drop\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "Ic = (Vcc-Vce_sat)/Rl\n",
+ "Ib=Ic/hfe\n",
+ "#(b)\n",
+ "Vbb= Ib*Rb+Vbe\n",
+ "#(c)\n",
+ "Pc = Ic*Vce_sat\n",
+ "Pb = Ib*Vbe\n",
+ "Pt = Pc+Pb\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Base current, Ib = %.3f A\\n(b) Vbb = %.2f V\\n(c) Total power dissipation in BJT = %.4f W\"%(Ib,Vbb,Pt))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Base current, Ib = 1.825 A\n",
+ "(b) Vbb = 11.65 V\n",
+ "(c) Total power dissipation in BJT = 28.6525 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 1.5, Page No. 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Load current and losses in BJT\n",
+ "\n",
+ "import math\n",
+ "# variable declaration(with reference to example 1.4)\n",
+ "Vbb_org = 11.65 # original Vbb\n",
+ "fall =0.85 # 85% fall in original value\n",
+ "Vce_sat = 1.0 # Vce saturation voltage\n",
+ "Rb =6.0 # base resisror\n",
+ "hfe = 15.0 # gain\n",
+ "Vbe = 0.7 # base-emiter voltage drop\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "Vbb = fall* Vbb_org\n",
+ "Ib = (Vbb-Vbe)/Rb\n",
+ "Ic = Ib*hfe\n",
+ "Pc =Ic*Vce_sat\n",
+ "Pb = Ib* Vbe\n",
+ "Pt = Pc+Pb\n",
+ "\n",
+ "#Result\n",
+ "print(\"Load current = %.3f A\\nLosses in BJT = %.2f W\"%(Ib,Pt))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load current = 1.534 A\n",
+ "Losses in BJT = 24.08 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 1.6, Page No. 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Power loss in BJT\n",
+ "\n",
+ "import math\n",
+ "#variable declaration(with reference to example 1.4)\n",
+ "Vcc = 240 # New value of collector current\n",
+ "Ic = 27.375 # collector current,from example 1.4\n",
+ "Pb = 1.2775 # base power dissipation,from example 1.4\n",
+ "Rl = 8.0 # load resisotr\n",
+ "\n",
+ "#Calculations\n",
+ "Vce = Vcc-(Ic*Rl)\n",
+ "Pc = Vce* Ic\n",
+ "Pt = Pb+ Pc\n",
+ "\n",
+ "#result\n",
+ "print(\"Total power dissipation = %.4f W\"%Pt)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total power dissipation = 576.1525 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 1.7, Page No. 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# BJT switching frequency\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "# variable declaration\n",
+ "I = 80 # maximum current, from swiching characteristics\n",
+ "t1 = 40 *10**-6 # rise time, from swiching characteristics\n",
+ "t2 = 60* 10**-6 # falll time, from swiching characteristics\n",
+ "V = 200 # collector-emitter voltage\n",
+ "Pavg =250 # average power loss\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "# switching ON\n",
+ "ic = I/t1\n",
+ "def f(x):\n",
+ " return (ic*x)*(V-(V/t1)*x)\n",
+ "t_lower =0\n",
+ "t_upper = t1\n",
+ "val_on = quad(f,t_lower,t_upper)\n",
+ "\n",
+ "# switching OFF\n",
+ "ic = I-I/t1\n",
+ "Vc = V/t2\n",
+ "def f1(x):\n",
+ " return (I-(I/t2)*x)*(Vc*x)\n",
+ "t_lower =0\n",
+ "t_upper = t2\n",
+ "val_off = quad(f1,t_lower,t_upper)\n",
+ "\n",
+ "loss= val_on[0]+val_off[0]\n",
+ "loss= math.floor(loss*10000)/10000\n",
+ "f =Pavg/loss\n",
+ "\n",
+ "# Result\n",
+ "#print(\"(a) Switching ON:\\nEnergy losses during switching on = %.4f J\"%(val_on[0]))\n",
+ "#print(\"\\n(b)Switching OFF\\nEnergy losses during switching off of BJT =%.2f J\"%(val_off[0]))\n",
+ "print(\"\\nSwitching frequency = %.1f Hz\"%f)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Switching frequency = 937.7 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 1.8, Page No. 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Turn ON loss of power transistor\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vmax = 300 # voltage during start\n",
+ "Imax = 200 # full current after start\n",
+ "t = 1* 10**-6 # starting time \n",
+ "\n",
+ "#calculation\n",
+ "E_loss = Vmax*Imax*t/6 #formula\n",
+ "\n",
+ "#Result\n",
+ "print(\"Energy loss = %.2f Joules\"%E_loss)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy loss = 0.01 Joules\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_2_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_2_3.ipynb new file mode 100755 index 00000000..6e52e316 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_2_3.ipynb @@ -0,0 +1,2357 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Thyristors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.1, Page No.39 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Anode current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "alfa_1 = 0.35 # Gain of PNP transistor of two transistor model\n",
+ "alfa_2 = 0.40 # Gain of NPN transistor of two transistor model\n",
+ "Ig = 40*10**-3 # Gate current\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Ia = (alfa_2*Ig)/(1-(alfa_1+alfa_2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Anode current = %d * 10^-3 A\"%(Ia*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Anode current = 64 * 10^-3 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.2, Page No.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Equivalent capacitor\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "dv_by_dt = 190 # in Volt per micro-sec\n",
+ "Ic= 8 *10**-3 # Capacitive current\n",
+ "\n",
+ "#Calculation\n",
+ "C = Ic/(dv_by_dt*10**6)\n",
+ "\n",
+ "#Result\n",
+ "print(\"C = %.1f * 10^12 F\"%(C*10**12))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C = 42.1 * 10^12 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.3, Page No. 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Thyristor\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "Vt = 0.75 # Thyristor trigger voltage\n",
+ "It = 7*10**-3 # Thyristor trigger current\n",
+ "Vcc = 20 # Suppy voltage, given data\n",
+ "Rg = 2000 # gate resistor, given data\n",
+ "R = 200 # input resistor\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "V0 = 20 # when thyristor is not conducting, there is no current through it.\n",
+ "#(b)\n",
+ "Vs = Vt+It*Rg\n",
+ "#(c)\n",
+ "i= 5*10**-3 #to have holding curernt\n",
+ "v1= i*R\n",
+ "#(d)\n",
+ "drop =0.7 # voltage drop across thyristor\n",
+ "v2=v1+drop\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) V0 = %d\\n(b) Vs = %.2f\\n(c) Vcc should be reduced to less than %d V if thyristor is ideal.\\n(d) Vcc should be reduced to less than %.1f V\"%(V0,Vs,v1,v2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) V0 = 20\n",
+ "(b) Vs = 14.75\n",
+ "(c) Vcc should be reduced to less than 1 V if thyristor is ideal.\n",
+ "(d) Vcc should be reduced to less than 1.7 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.4, Page No.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculation of Vg,Ig and Rg\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vs = 25 # gate signal amplitude\n",
+ "Pavg_loss = 0.6 # Avg power loss\n",
+ "\n",
+ "#Calculations\n",
+ "P_loss = Pavg_loss*2*math.pi/math.pi\n",
+ "Ig =(-1+(math.sqrt(1**2-4*9*(-1.2))))/(2*9) #alfa=(-b+sqrt(b^2-4ac))/2a-->solution for quadratic equation\n",
+ "Ig = math.ceil(Ig*1000)/1000\n",
+ "Vg = 1+9*Ig #given data\n",
+ "Rg = (24-9*Ig)/Ig\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"Vg = %.3f \\nIg = %.3f\\nRg = %.2f\"%(Vg,Ig,Rg))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vg = 3.826 \n",
+ "Ig = 0.314\n",
+ "Rg = 67.43\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.5, Page No.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Minimum width of gate pulse\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 100 # DC supply voltage\n",
+ "L = 10 # Inductance\n",
+ "i = 80*10**-3 # latching current of thyristor\n",
+ "\n",
+ "#Calculations\n",
+ "t = L*i/V\n",
+ "\n",
+ "#Result\n",
+ "print(\"Width of pulse should be more than %d milli-second.\"%(t*10**3))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of pulse should be more than 8 milli-second.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.6, Page No. 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Minimum width of gate pulse\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 100 # DC supply voltage\n",
+ "R = 10 # Resistance\n",
+ "L = 5 # Inductance\n",
+ "i = 50*10**-3 # latching current of thyristor\n",
+ "\n",
+ "#Calculation\n",
+ "t = math.log((1-(i*R)/V))/((-R/L)*math.log(math.e)) # i = (V/R)*(1-e^(-R*t/L))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Minimum width of gate pulse is %.1f milli-second.\"%(t*10**3))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum width of gate pulse is 2.5 milli-second.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.7, Page No. 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resistor value\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 90.0 # DC supply voltage\n",
+ "i = 40*10**-3 # latching current of thyristor\n",
+ "t = 40* 10**-6 # pulse width\n",
+ "R = 25.0 # load Resistance\n",
+ "L = 0.5 # Inductance\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "i2 = (V/R)*(1-math.e**(-R*t/L))\n",
+ "\n",
+ "#(b)\n",
+ "R = V/(i-i2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nAt the end of the gate pulse, i = %.4f A\"%i2)\n",
+ "print(\"Since the current is less than latching current, thyristor will not turn on.\")\n",
+ "print(\"\\n(b)\\nR should be less than %d ohm.\"%math.ceil(R))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "At the end of the gate pulse, i = 0.0072 A\n",
+ "Since the current is less than latching current, thyristor will not turn on.\n",
+ "\n",
+ "(b)\n",
+ "R should be less than 2744 ohm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.8, Page No.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Resistor value\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 100.0 # DC supply voltage\n",
+ "i = 50*10**-3 # holding current of thyristor\n",
+ "t = 50* 10**-6 # pulse width\n",
+ "R = 20.0 # load Resistance\n",
+ "L = 0.5 # Inductance\n",
+ "\n",
+ "#Calculations\n",
+ "i2 = (V/R)*(1-math.e**(-R*t/L))\n",
+ "Rmax = V/(i-i2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"When firing pulse ends, i = %.2f mA\"%(i2*10**3))\n",
+ "print(\"Since this current is less than holding current, the thyristor will not remain on and return to off state.\")\n",
+ "print(\"Maximum value of R = %.3f ohm\"%(math.floor(Rmax*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When firing pulse ends, i = 9.99 mA\n",
+ "Since this current is less than holding current, the thyristor will not remain on and return to off state.\n",
+ "Maximum value of R = 2499.375 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.9, Page No.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# triggering angle \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 240 # AC supply voltage\n",
+ "f = 50 # supply frequency\n",
+ "R = 5 # load resistance\n",
+ "L = 0.05 # inductance\n",
+ "\n",
+ "#Calculation\n",
+ "theta = math.atan(2*math.pi*f*L/R)\n",
+ "theta = theta*180/math.pi\n",
+ "fi = theta+90\n",
+ "print(\"theta = %.2f\u00b0\"%(theta))\n",
+ "print(\"\\nCurrent transient is maximun(worst) if\\nsin(fi-theta) = 1\")\n",
+ "print(\"therefore, fi-%.2f\u00b0 = 90\u00b0\"%theta)\n",
+ "print(\"fi = %.2f\u00b0\"%fi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "theta = 72.34\u00b0)\n",
+ "\n",
+ "Current transient is maximun(worst) if\n",
+ "sin(fi-theta) = 1\n",
+ "therefore, fi-72.34\u00b0 = 90\u00b0\n",
+ "fi = 162.34\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.10, Page No.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example \")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example \n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.11, Page No.50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example \")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example \n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.12, Page No. 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# rms current and form factor\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "I = 120 # Current in Ampere\n",
+ "gamma = 180.0 # in degrees, thyristor conducts between alfa and alfa+gamma in each 360\u00b0 \n",
+ "\n",
+ "# calculations\n",
+ "#(a)-- formulas\n",
+ "#(b)\n",
+ "Irms = I*math.sqrt(gamma/360)\n",
+ "Iavg = I*(gamma/360)\n",
+ "ff = Irms/Iavg\n",
+ "\n",
+ "#result\n",
+ "print(\"RMS curent = %.2f A\\nAverage Current = %.0f A\\nForm factor = %.3f\"%(Irms,Iavg,ff))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS curent = 84.85 A\n",
+ "Average Current = 60 A\n",
+ "Form factor = 1.414\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.13, Page No.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Power supplied to the load and average load current\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "# variable declaration\n",
+ "R = 100.0 # load resistance\n",
+ "V = 230.0 # Supply Voltage\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "def f(x):\n",
+ " return math.sin(x)**2\n",
+ "wt_lower=math.pi/3\n",
+ "wt_upper =math.pi\n",
+ "val = quad(f,wt_lower,wt_upper)\n",
+ "I = ((math.sqrt(2)*V/R)**2)*val[0]/(2*math.pi)\n",
+ "Irms = math.sqrt(I)\n",
+ "P =(Irms**2)*R\n",
+ "\n",
+ "#(b)\n",
+ "def f(x):\n",
+ " return math.sin(x)**2\n",
+ "wt_lower2=math.pi/4\n",
+ "wt_upper2 =math.pi\n",
+ "val2 = quad(f,wt_lower2,wt_upper2)\n",
+ "x = (math.sqrt(2)*V/R)\n",
+ "x = math.floor(x*100)/100\n",
+ "I2 = (x**2)*val2[0]/(2*math.pi)\n",
+ "Irms2 = math.sqrt(I2)\n",
+ "P2 =(Irms2**2)*R\n",
+ "\n",
+ "#(c)\n",
+ "def f(x):\n",
+ " return (3.25/(2*math.pi))*math.sin(x)\n",
+ "wt_lower3=math.pi/3\n",
+ "wt_upper3 =math.pi\n",
+ "val3 = quad(f,wt_lower3,wt_upper3)\n",
+ "wt_lower4=math.pi/4\n",
+ "wt_upper4 =math.pi\n",
+ "val4 = quad(f,wt_lower4,wt_upper4)\n",
+ "\n",
+ "\n",
+ "print(\"(a)\\nRMS current = %.2f A\\nPower supplied to load = %d W\"%(Irms,math.ceil(P)))\n",
+ "print(\"\\n\\n(b)\\nRMS current = %f A\\nPower supplied to load = %f W\"%(Irms2,P2))\n",
+ "print(\"\\n(c)\\nWhen firing angle is 60\u00b0, Average current = %.3f A\" %val3[0])\n",
+ "print(\"When firing angle is 45\u00b0, Average current = %.3f A\" %val4[0])\n",
+ "# for (b) answer matches to the book if val2[0] = 1.4255"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "RMS current = 1.46 A\n",
+ "Power supplied to load = 213 W\n",
+ "\n",
+ "\n",
+ "(b)\n",
+ "RMS current = 1.549431 A\n",
+ "Power supplied to load = 240.073727 W\n",
+ "\n",
+ "(c)\n",
+ "When firing angle is 60\u00b0, Average current = 0.776 A\n",
+ "When firing angle is 45\u00b0, Average current = 0.883 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.14, Page No.54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# average power loss in thyristor\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "Iavg = 200 # Average current\n",
+ "v1 = 1.8 # voltage drop across thyristor for 200A current\n",
+ "v2 = 1.9 # voltage drop across thyristor for 400A current\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "A1 = Iavg # amplitude of rectangular current wave\n",
+ "P1 = A1*v1\n",
+ "#(b)\n",
+ "A2 = 2*Iavg\n",
+ "P2 = A2*v2*math.pi/(2*math.pi)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Average power loss = %d W\"%P1)\n",
+ "print(\"(b) Average power loss = %d W\"%P2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Average power loss = 360 W\n",
+ "(b) Average power loss = 380 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 83
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.15, Page No.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# average on state current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "I = 40 # rms on state current\n",
+ "f = 50 # frequency\n",
+ "cp_a =170 # conduction period\n",
+ "cp_b =100 # conduction period\n",
+ "cp_c =40 # conduction period\n",
+ "\n",
+ "#Calculations\n",
+ "alfa_a = 180-cp_a\n",
+ "alfa_b = 180-cp_b\n",
+ "alfa_c = 180-cp_c\n",
+ "Im_a = math.sqrt(((I**2)*2*math.pi)/(((math.pi-alfa_a*math.pi/180)/2)+math.sin(2*alfa_a*math.pi/180)/4))\n",
+ "Iv_a = 0.316*Im_a\n",
+ "Im_b = math.sqrt(((I**2)*2*math.pi)/(((math.pi-alfa_b*math.pi/180)/2)+math.sin(2*alfa_b*math.pi/180)/4))\n",
+ "Iv_b = 0.1868*Im_b\n",
+ "Im_c = math.sqrt(((I**2)*2*math.pi)/(((math.pi-alfa_c*math.pi/180)/2)+math.sin(2*alfa_c*math.pi/180)/4))\n",
+ "Iv_c = 0.0372*Im_c\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Iavg = %.3f A\"%(math.ceil(Iv_a*1000)/1000))\n",
+ "print(\"(b) Iavg = %.2f A\"%Iv_b)\n",
+ "print(\"(c) Iavg = %.2f A\"%(math.floor(Iv_c*100)/100))\n",
+ "#answer for(b) is not matching with the answer given in the book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Iavg = 25.295 A\n",
+ "(b) Iavg = 19.13 A\n",
+ "(c) Iavg = 11.62 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.16, page No. 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# power dissiopation\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#variable declaration\n",
+ "It = 20 # constant current\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Vt = 0.9+ 0.02*It\n",
+ "P1 = Vt*It\n",
+ "#(b)\n",
+ "def f(x):\n",
+ " return (0.9+0.02*(20*math.pi*math.sin(x)))*(20*math.pi*math.sin(x))/(2*math.pi)\n",
+ "# if denominator math.pi value is taken as 3.14, then answer for P2 =37.75\n",
+ "theta_lower = 0\n",
+ "theta_upper = math.pi\n",
+ "val = quad(f,theta_lower,theta_upper)\n",
+ "P2 = val[0]\n",
+ "#(c)\n",
+ "P3 = P1/2\n",
+ "#(d)\n",
+ "P4 = P1/3\n",
+ "\n",
+ "#result\n",
+ "print(\"(a) Power dissipation = %d W\"%P1)\n",
+ "print(\"(b) Mean Power dissipation = %.2f W\"%P2)\n",
+ "print(\"(c) Mean Power dissipation = %d W\"%P3)\n",
+ "print(\"(d) Mean Power dissipation = %.2f W\"%P4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Power dissipation = 26 W\n",
+ "(b) Mean Power dissipation = 37.74 W\n",
+ "(c) Mean Power dissipation = 13 W\n",
+ "(d) Mean Power dissipation = 8.67 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 115
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.17, Page No. 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# I^2t rating \n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "Is = 2000.0 # half cycle surge current rating for SCR\n",
+ "f = 50.0 # operating AC frequency\n",
+ "\n",
+ "#Calculation\n",
+ "T = 1/f\n",
+ "t_half = T/2\n",
+ "t = t_half/2\n",
+ "I = math.sqrt((Is**2)*t/t_half)\n",
+ "rating = (I**2)*t_half\n",
+ "\n",
+ "#Result\n",
+ "print(\"I^2t rating = %d A^2 secs\"%rating)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I^2t rating = 20000 A^2 secs\n"
+ ]
+ }
+ ],
+ "prompt_number": 138
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.18, Page No. 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Resistance and average power loss\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "P = 6 #peak power loss\n",
+ "d = 0.3 # duty cylce \n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "#solution of equation 9Ig^2+Ig-6 = 0\n",
+ "Ig =(-1+(math.sqrt(1**2-4*9*(-6))))/(2*9) #alfa=(-b+sqrt(b^2-4ac))/2a-->solution for quadratic equation\n",
+ "Ig = math.ceil(Ig*1000)/1000\n",
+ "Rg = (11/Ig)-9 #from KVL equation of gate circuit\n",
+ "#(b)\n",
+ "Pavg = P*d\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nIg = %.3f A \\nRg = %.3f ohm\"%(Ig,Rg))\n",
+ "print(\"\\n(b) Average power loss = %.1f W \"%Pavg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Ig = 0.763 A \n",
+ "Rg = 5.417 ohm\n",
+ "\n",
+ "(b) Average power loss = 1.8 W \n"
+ ]
+ }
+ ],
+ "prompt_number": 144
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.19, Page No. 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# trigger current and voltage for gate power dissipation\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vs = 12 # supply voltage\n",
+ "P = 0.3 # Power dissipation\n",
+ "Rs = 100 # load line slope i.e. source resistance\n",
+ "\n",
+ "#Calculation\n",
+ "#solution for equation 100Ig^2-12Ig+0.3 = 0\n",
+ "Ig =(-(-Vs)-(math.sqrt((-Vs)**2-4*Rs*(P))))/(2*Rs) #alfa=(-b(+/-)sqrt(b^2-4ac))/2a-->solution for quadratic equation\n",
+ "Vg = P/Ig\n",
+ "print(\"Ig = %.1f mA\\nVg = %.2f V\"%(Ig*1000,Vg))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ig = 35.5 mA\n",
+ "Vg = 8.45 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 150
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.20, Page No. 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Finding values of resistors\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Es = 12.0 # Supply voltage\n",
+ "V = 800.0 # SCR voltage rating\n",
+ "I = 110.0 # SCR currert rating\n",
+ "imax = 250*10**-3 # Maximum permissible current through battery\n",
+ "isc = 600*10**-3 # short circuit current of the battery\n",
+ "Vg = 2.4 # required gate voltage\n",
+ "Ig = 50*10**-3 # required gate current\n",
+ "Vgmax = 3 # maximum gate voltage\n",
+ "Igmax = 100*10**-3 # maximum gate current\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Rs = Es/isc\n",
+ "#considering R2 is not connected\n",
+ "R1 =(Es/imax)-Rs\n",
+ "#R1 must be 28 or more so that battery curenrt doesnot exceeds 250mA\n",
+ "R1min = Es/Igmax-Rs\n",
+ "R1max = ((Es-Vg)/Ig)-Rs\n",
+ "R1 = 125 #selected \n",
+ "R2 = Vgmax*(Rs+R1)/(Es-Vgmax)\n",
+ "\n",
+ "# Result\n",
+ "print(\"Rs = %d ohm \\n\\nR1 must be more than %.0f ohm and must be less than %.0f ohm.\\nTherefore, select R1 = %.0f \"%(Rs,R1min,R1max,R1))\n",
+ "print(\"\\nR2 should be less than %.3f ohm.\\nTherefore, select R2 = %.0f ohm\"%(R2,math.floor(R2)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rs = 20 ohm \n",
+ "\n",
+ "R1 must be more than 100 ohm and must be less than 172 ohm.\n",
+ "Therefore, select R1 = 125 \n",
+ "\n",
+ "R2 should be less than 48.333 ohm.\n",
+ "Therefore, select R2 = 48 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.21, Page No. 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Surface temperature\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "l = 0.2 # length of aluminium rod\n",
+ "w = 0.01 # width of aluminium rod\n",
+ "d = 0.01 # depth of aluminium rod\n",
+ "tc = 220 # thermal conductivity\n",
+ "T1 = 30 # temperature at far end\n",
+ "P = 3 # injected heat\n",
+ "\n",
+ "#Calculation\n",
+ "theta = l/(tc*w*d)\n",
+ "T2 = P*theta+T1\n",
+ "\n",
+ "#Result\n",
+ "print(\"Temperature of the surface where heat is injected is %.2f\u00b0C\"%T2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of the surface where heat is injected is 57.27\u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.22, Page No. 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Power losses\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "l = 2*10**-3 # lengthh of aluminium plate\n",
+ "a = 12*10**-4 # cross-section area\n",
+ "tc = 220 # thermal conductivity\n",
+ "td = 4 # desired thermal drop along length\n",
+ "\n",
+ "#Calculations\n",
+ "theta = l/(a*tc)\n",
+ "theta = math.floor(theta*10**6)/10**6\n",
+ "P_loss = td/theta\n",
+ "\n",
+ "#Result\n",
+ "print(\"power losses = %.2f W\"%P_loss)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power losses = 528.05 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.23, Page No. 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#thermal resistance of heat sink\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "P = 30.0 # power dissipation\n",
+ "T1 =125.0 # max junction temperature\n",
+ "T2 = 50.0 # max ambient temperature\n",
+ "tr1 =1.0 # thermal resistance of thyristor\n",
+ "tr2 = 0.3 # therrmal resistance of insuulator\n",
+ "\n",
+ "#calculations\n",
+ "Tr = (T1-T2)/P\n",
+ "Tr_hs = Tr-tr1-tr2\n",
+ "\n",
+ "#Result\n",
+ "print(\"Thermal resistance of heat sink = %.1f\u00b0C/W\"%Tr_hs)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal resistance of heat sink = 1.2\u00b0C/W\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.24, Page No.68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Junction temperature\n",
+ "\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "tr = 0.627 # thermal resistance of device\n",
+ "T = 93 # heat sink temperature\n",
+ "V = 3 # voltage at junction\n",
+ "I = 25 # current at junction\n",
+ "\n",
+ "#calculation\n",
+ "T_junction = tr*V*I+T\n",
+ "\n",
+ "#Result\n",
+ "print(\"Junction Temperature = %d\u00b0C\"%T_junction)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Junction Temperature = 140\u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.25, Page No. 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Thermal resistance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "P = 40.0 #steady power loss in an SCR\n",
+ "Tr_hs = 0.8 # heat sink resistance\n",
+ "T1 = 120.0 # Maximumm junction temperature\n",
+ "T2 = 35.0 # ambient temperature\n",
+ "\n",
+ "#calculation\n",
+ "Tr = (T1-T2)/P\n",
+ "Rsh = Tr - Tr_hs\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance of heat sink = %.3f\u00b0C/W\"%Rsh)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance of heat sink = 1.325\u00b0C/W\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.26, Page No. 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# power loss and % increase in rating\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "Tj = 125 # maximum junction temperature\n",
+ "Ts1 = 80 # max heat sink temperature\n",
+ "tr_jc = 0.7 # thermal resistance from junction to case \n",
+ "tr_cs = 0.4 # thermal resistance from case to sink\n",
+ "Ts2 = 50 # decreased heat sink temperature \n",
+ "#calculations\n",
+ "#(a)\n",
+ "Pav1 = (Tj-Ts1)/(tr_jc+tr_cs)\n",
+ "#(b)\n",
+ "Pav2 =(Tj-Ts2)/(tr_jc+tr_cs)\n",
+ "rating = 100*(math.sqrt(Pav2)-math.sqrt(Pav1))/math.sqrt(Pav1)\n",
+ "rating = math.floor(rating*100)/100\n",
+ "# result\n",
+ "print(\"(a)\\nAverage power loss = %.2fW\"%Pav1)\n",
+ "print(\"\\n(b)\\nAverage power loss = %.2fW\\n%% increase in rating = %.2f%%\"%(Pav2,rating))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Average power loss = 40.91W\n",
+ "\n",
+ "(b)\n",
+ "Average power loss = 68.18W\n",
+ "% increase in rating = 29.09%\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.27, Page No. 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Minnimum and maximum firing angle of triac\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vs = 230.0 # Supply voltage\n",
+ "f = 50.0 # supply frequency\n",
+ "Vc = 25.0 # breakdown voltage\n",
+ "C = 0.6*10**-6 # capacitance\n",
+ "Rmin = 2000 # minimum resistance \n",
+ "Rmax = 20000 # maximum resistance\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "pi = math.ceil(math.pi*10**4)/10**4\n",
+ "Xc = 1/(2*pi*f*C)\n",
+ "Xc = math.floor(Xc*100)/100\n",
+ "Z1_m = math.sqrt(Rmin**2+Xc**2)\n",
+ "Z1_angle=math.atan(Xc/Rmin)\n",
+ "I1_m = Vs/Z1_m\n",
+ "I1_m = math.ceil(I1_m*10**5)/10**5\n",
+ "I1_angle = Z1_angle\n",
+ "Vc_m = I1_m*Xc\n",
+ "Vc_m = math.ceil(Vc_m*100)/100\n",
+ "Vc_angle = I1_angle*(180/math.pi)-90\n",
+ "alfa1 = (180/math.pi)*math.asin(Vc/(math.sqrt(2)*Vc_m))+(-Vc_angle)\n",
+ "\n",
+ "#(b)\n",
+ "Z2_m = math.sqrt(Rmax**2+Xc**2)\n",
+ "Z2_m = math.floor(Z2_m*10)/10\n",
+ "Z2_angle=math.atan(Xc/Rmax)\n",
+ "I2_m = Vs/Z2_m\n",
+ "I2_m = math.floor(I2_m*10**6)/10**6\n",
+ "I2_angle = Z2_angle\n",
+ "V2c_m = I2_m*Xc\n",
+ "V2c_m = math.ceil(V2c_m*100)/100\n",
+ "V2c_angle = I2_angle*(180/math.pi)-90\n",
+ "alfa2 = (180/math.pi)*math.asin(Vc/(math.sqrt(2)*V2c_m))+(-V2c_angle)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Xc = %.2f ohms\"%Xc)\n",
+ "print(\"\\n(a) When R = %d ohms\\n Z(magnitude) = %.2f\\t\\tZ(angle) = %.2f\u00b0\"%(Rmin,Z1_m,-Z1_angle*(180/math.pi)))\n",
+ "print(\" I(magnitude) = %.5f\\t\\tI(angle) = %.2f\u00b0\"%(I1_m,I1_angle*(180/math.pi)))\n",
+ "print(\"\\nVoltage across capacitor,\\nV(magnitude) = %.2f\\t\\tV(angle) = %.2f\u00b0\"%(Vc_m,Vc_angle))\n",
+ "print(\"\\nMinimum firing angle = %.2f\u00b0\"%alfa1)\n",
+ "\n",
+ "print(\"\\n(b) When R = %d ohms\\n Z(magnitude) = %.2f\\t\\tZ(angle) = %.2f\u00b0\"%(Rmax,Z2_m,-Z2_angle*(180/math.pi)))\n",
+ "print(\" I(magnitude) = %f\\t\\tI(angle) = %.2f\u00b0\"%(I2_m,I2_angle*(180/math.pi)))\n",
+ "print(\"\\nVoltage across capacitor,\\nV(magnitude) = %.2f\\t\\tV(angle) = %.2f\u00b0\"%(V2c_m,V2c_angle))\n",
+ "print(\"\\nMaximum firing angle = %.2f\u00b0\"%(math.ceil(alfa2*10)/10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Xc = 5305.15 ohms\n",
+ "\n",
+ "(a) When R = 2000 ohms\n",
+ " Z(magnitude) = 5669.62\t\tZ(angle) = -69.34\u00b0\n",
+ " I(magnitude) = 0.04057\t\tI(angle) = 69.34\u00b0\n",
+ "\n",
+ "Voltage across capacitor,\n",
+ "V(magnitude) = 215.23\t\tV(angle) = -20.66\u00b0\n",
+ "\n",
+ "Minimum firing angle = 25.37\u00b0\n",
+ "\n",
+ "(b) When R = 20000 ohms\n",
+ " Z(magnitude) = 20691.60\t\tZ(angle) = -14.86\u00b0\n",
+ " I(magnitude) = 0.011115\t\tI(angle) = 14.86\u00b0\n",
+ "\n",
+ "Voltage across capacitor,\n",
+ "V(magnitude) = 58.97\t\tV(angle) = -75.14\u00b0\n",
+ "\n",
+ "Maximum firing angle = 92.60\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 88
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.28, Page no. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# UJT relaxation circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 32.0 #voltage\n",
+ "h = 0.63 # voltage gain\n",
+ "Ip = 10*10**-6 # current \n",
+ "Vv = 3.5 # voltage drop\n",
+ "Iv = 10*10**-3 # current through the circuit\n",
+ "Vf = 0.5 # forward voltage drop across p-n junction\n",
+ "f = 50.0 # frequency of ascillation \n",
+ "t = 50.0*10**-6 # width of triggering pulse(given value is 50ms but used value is 50 micro-sec) \n",
+ "C = 0.4*10**-6 # Capacitance(assumed)\n",
+ "\n",
+ "#Calculations\n",
+ "T = 1/f\n",
+ "Vp = V*h+Vf\n",
+ "Rmax = (V-Vp)/Ip # R should be less than the given value\n",
+ "Rmin = (V-Vv)/Iv # R should be more than the given value\n",
+ "R = T/(C*math.log(1/(1-h)))\n",
+ "R4 = t/C\n",
+ "R3 = 10**4/(h*V)\n",
+ "\n",
+ "#Result\n",
+ "print(\"The value of R = %.2f*10^3 ohm is within the Rmax = %.3f*10^6 ohm and Rmin = %.2f*10^3 ohm\"%(R*10**-3,Rmax*10**-6,Rmin*10**-3))\n",
+ "print(\"Hence the value is suitable.\\n\\nR4 = %d ohm \\nR3 = %d ohm\"%(R4,R3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of R = 50.29*10^3 ohm is within the Rmax = 1.134*10^6 ohm and Rmin = 2.85*10^3 ohm\n",
+ "Hence the value is suitable.\n",
+ "\n",
+ "R4 = 125 ohm \n",
+ "R3 = 496 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 101
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.29, Page No. 81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#values of various components of circuit(referring to fig.2.36(a))\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "f = 2.0*10**3 # ouutput frequency\n",
+ "Vdc = 10 # input voltage\n",
+ "h = 0.6 # voltage gain\n",
+ "I = 0.005 # peak discharge current\n",
+ "v = 0.5 # voltage drop across p-n junction(assumed)\n",
+ "\n",
+ "#Calculation\n",
+ "Vp = (Vdc*h)+v\n",
+ "R = (Vdc-Vp)/I # R should be less than this value\n",
+ "T = 1.0/f\n",
+ "C1 = 0.5*10**-6 # capacitance(assumed)\n",
+ "R1 = (T)/(C1*math.log(1/(1-h)))\n",
+ "\n",
+ "C2 = 1.0*10**-6 # capacitance(assumed)\n",
+ "R2 = (T)/(C2*math.log(1/(1-h)))\n",
+ "\n",
+ "#Result\n",
+ "print(\"for C = %.1f micro-F, R = %d Ohm. \\nThis value of R is not suitable because R must be less than %d ohm.\"%(C1*10**6,R1,R))\n",
+ "print(\"\\nfor C = %.1f micro-F, R = %.1f Ohm.\\nThis value is suitable because R is less than %d ohm\"%(C2*10**6,R2,R))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for C = 0.5 micro-F, R = 1091 Ohm. \n",
+ "This value of R is not suitable because R must be less than 700 ohm.\n",
+ "\n",
+ "for C = 1.0 micro-F, R = 545.7 Ohm.\n",
+ "This value is suitable because R is less than 700 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.30, Page No. 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Range of firing angle\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vs = 230.0 # supply voltage\n",
+ "Rmin= 1000.0 # minimum value of R1 resistor\n",
+ "Rmax = 22*10**3 # maximum value of R1 resistor\n",
+ "Vg = 2.0 # gate triggering voltage\n",
+ "C = 0.47*10**-6 # capacitor value\n",
+ "f = 50.0 # frequency\n",
+ "#Calculations\n",
+ "# For Rmin\n",
+ "theta = (180/math.pi)*math.atan(2*math.pi*f*C*Rmin)\n",
+ "theta = math.ceil(theta*10)/10\n",
+ "Vc = Vs*math.cos(theta*math.pi/180)\n",
+ "Vc = math.floor(Vc*100)/100\n",
+ "alfa = ((180/math.pi)*math.asin(Vg/(math.sqrt(2)*Vc)))+theta\n",
+ "alfa = math.floor(alfa*10)/10\n",
+ "\n",
+ "# for Rmax\n",
+ "theta2 = (180/math.pi)*math.atan(2*math.pi*f*C*Rmax)\n",
+ "theta2 = math.ceil(theta2*10)/10\n",
+ "Vc2 = Vs*math.cos(theta2*math.pi/180)\n",
+ "Vc2 = math.floor(Vc2*100)/100\n",
+ "alfa2 = ((180/math.pi)*math.asin(Vg/(math.sqrt(2)*Vc2)))+theta2\n",
+ "alfa2 = math.ceil(alfa2*10)/10\n",
+ "\n",
+ "#Result\n",
+ "print(\"Minimum firing angle = %.1f\u00b0\"%alfa)\n",
+ "print(\"Maximum firing angle = %.1f\u00b0\"%alfa2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum firing angle = 8.7\u00b0\n",
+ "Maximum firing angle = 74.1\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 137
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.31, Page No. 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# UJT relaxation oscillator design(reffering to fig.2.40)\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "f = 50.0 # frequency of supply\n",
+ "Vbb = 12.0 # typical input vpltage\n",
+ "P = 300*10**3 # maximumm average power dissipation\n",
+ "Rbb = 5.6*10**3 # base resistor\n",
+ "Iv = 4*10**-3 # Valley point voltage\n",
+ "h = 0.63 # intrinsic stand off ratio\n",
+ "Vd = 0.5 # drop across p-n junction\n",
+ "Vv = 2.0 # Valley point voltage\n",
+ "Ip = 5*10**-6 # peak point current\n",
+ "v = 0.18 # minimum voltage for which SCR will not trigger\n",
+ "\n",
+ "#calculation\n",
+ "T = 1/f\n",
+ "#operating point should be on the left of valley point\n",
+ "R_1 = (Vbb-Vv)/Iv # R should be greater than this value\n",
+ "Vp = (h*Vbb)+Vd\n",
+ "#operation point should lie in the negative resistance region of characteristics of UJT\n",
+ "R_2 = (Vbb-Vp)/Ip # R should be less than this value\n",
+ "C = 0.02*10**-6 # assumed\n",
+ "R_3 = T/(C*math.log(1/(1-h)))\n",
+ "\n",
+ "C2 = 0.04*10**-6 # assumed\n",
+ "R_4 = T/(C2*math.log(1/(1-h)))\n",
+ "R = 500*10**3 # assumed\n",
+ "Rmax = R+R_1\n",
+ "R3_1 = (10**4)/(h*Vbb)\n",
+ "R3 = 1200 # assumed\n",
+ "R4_1 = v*(R3+Rbb)/(Vbb-v) # R4 value should be less than this value\n",
+ "R4 = 100 # assumed \n",
+ "tw = R4*C2\n",
+ "tow_min = R_1*C2*math.log(1/(1-h))\n",
+ "alfa_min = tow_min*(360/T)\n",
+ "tow_max = Rmax*C2*math.log(1/(1-h))\n",
+ "alfa_max = tow_max*(360/T)\n",
+ "\n",
+ "#Result\n",
+ "print(\"For C = %.2f micro F, R = %.2f k-ohm\\nThis value of R is more than maximum of %d k-ohm.\"%(C*10**6,R_3/1000,R_2/1000) )\n",
+ "print(\"Hence not suitable.\")\n",
+ "print(\"\\nFor C = %.2f micro F, R = %.2f K-ohm.\"%(C2*10**6,R_4/1000))\n",
+ "print(\"As this is less than max value. It is suitable. \\nLets assume R = %d k-ohm\"%(R/1000))\n",
+ "print(\"Rmax = %.1f k-ohm\"%(Rmax/1000))\n",
+ "print(\"\\nR3 = %.2f k-ohm. so take nearest value R3 = %.1f k-ohm\"%(R3_1/1000,R3/1000.0))\n",
+ "print(\"\\nR4 = %.2f ohm. so take nearest value R4 = %.1f ohm\"%(R4_1,R4))\n",
+ "print(\"\\nMinimum firing angle = %.2f\u00b0\"%alfa_min)\n",
+ "print(\"Maximum firing angle = %.1f\u00b0\"%alfa_max)\n",
+ "print(\"\\nThough maximum firing angle available is %.1f\u00b0, it will not be needed\"%alfa_max)\n",
+ "print(\"because in a single phase full wave converter the maximum firing angle is 180\u00b0\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For C = 0.02 micro F, R = 1005.78 k-ohm\n",
+ "This value of R is more than maximum of 788 k-ohm.\n",
+ "Hence not suitable.\n",
+ "\n",
+ "For C = 0.04 micro F, R = 502.89 K-ohm.\n",
+ "As this is less than max value. It is suitable. \n",
+ "Lets assume R = 500 k-ohm\n",
+ "Rmax = 502.5 k-ohm\n",
+ "\n",
+ "R3 = 1.32 k-ohm. so take nearest value R3 = 1.2 k-ohm\n",
+ "\n",
+ "R4 = 103.55 ohm. so take nearest value R4 = 100.0 ohm\n",
+ "\n",
+ "Minimum firing angle = 1.79\u00b0\n",
+ "Maximum firing angle = 359.7\u00b0\n",
+ "\n",
+ "Though maximum firing angle available is 359.7\u00b0, it will not be needed\n",
+ "because in a single phase full wave converter the maximum firing angle is 180\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 166
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.32, Page No.92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# conduction time of thyristor\n",
+ "\n",
+ "import math\n",
+ "#variable declaratrion\n",
+ "R =0.8 # load resistance\n",
+ "L = 10*10**-6 # inductance\n",
+ "C = 50*10**-6 # capacitance\n",
+ "\n",
+ "#calculations\n",
+ "R1 = math.sqrt(4*L/C) # R should be less than this value\n",
+ "t = math.pi/(math.sqrt((1/(L*C))-((R**2)/(4*L**2))))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Value of sqrt(4L/C) is %.4f and give R = %.1f\\nTherefore, the circuit is underdamped.\"%(R1,R))\n",
+ "print(\"\\nt0 = %.2f*10**-6 seconds\"%(t*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of sqrt(4L/C) is 0.8944 and give R = 0.8\n",
+ "Therefore, the circuit is underdamped.\n",
+ "\n",
+ "t0 = 157.08*10**-6 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 169
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.33, Page No. 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Values of L and C\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "I = 8.0 # load current\n",
+ "V = 90.0 # Supply voltage\n",
+ "t = 40.0*10**-6 # turn off time\n",
+ "\n",
+ "#calculation\n",
+ "#print(\"Assume peak value of capacitor current to be twice the load cuuren.\")\n",
+ "C_by_L = (2*I/V)**2 # using eq 2.33\n",
+ "#print(\"Assume that thyristor is reverse biased for one-fourth period of resonant circuit.\")\n",
+ "CL = (t*2/math.pi)**2\n",
+ "# (2*I/V)^2*L^2 =(t*2/math.pi)^2\n",
+ "\n",
+ "L = math.sqrt(CL/C_by_L)\n",
+ "C =C_by_L*L\n",
+ "\n",
+ "print(\"L = %.2f*10**-6 H\\nC = %.3f*10**-6 F\"%(L*10**6,C*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L = 143.24*10**-6 H\n",
+ "C = 4.527*10**-6 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 173
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.34, Page No. 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Value of C for commutation\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "R = 10 # load resistace\n",
+ "V = 100 # supply voltage \n",
+ "t = 50 * 10**-6 # turn off time\n",
+ "\n",
+ "#Calculations\n",
+ "C = t/(R*math.log(2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"C = %.2f*10^-6 F\"%(C*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C = 7.21*10^-6 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 176
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.35, Page No. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# L and C of commutation circuit\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "V = 100 # supply voltage\n",
+ "I = 40 # maximumm load current\n",
+ "T = 40*10**-6 # turn off time\n",
+ "t = 1.5 # extra 50% tolerance\n",
+ "\n",
+ "#Calculation\n",
+ "T = T*t\n",
+ "C = I*T/V\n",
+ "L = (V**2)*C/(I**2)\n",
+ "Ip = V*math.sqrt(C/L)\n",
+ "L2 = 2* 10**-4 # assume\n",
+ "Ip2 = V*math.sqrt(C/L2)\n",
+ "print(\"C = %.0f*10^-6 F\\nL = %.1f*10^-4 H\\nPeak capacitor current = %d A\"%(C*10**6,L*10**4,Ip))\n",
+ "print(\"\\nPeak capacitor current should be less than maximum load currentof %d A. If L is selected as %d *10^-4 H,\"%(I,L2*10**4))\n",
+ "print(\"the peak capacitor current will be %.1f A. Since this is less than %d A, this value of L is satisfactory.\"%(Ip2,I))\n",
+ "print(\"\\nHence,\\nC = %.0f*10^-6 F\\nL = %.1f*10^-4 H\"%(C*10**6,L2*10**4))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C = 24*10^-6 F\n",
+ "L = 1.5*10^-4 H\n",
+ "Peak capacitor current = 40 A\n",
+ "\n",
+ "Peak capacitor current should be less than maximum load currentof 40 A. If L is selected as 2 *10^-4 H,\n",
+ "the peak capacitor current will be 34.6 A. Since this is less than 40 A, this value of L is satisfactory.\n",
+ "\n",
+ "Hence,\n",
+ "C = 24*10^-6 F\n",
+ "L = 2.0*10^-4 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 187
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.36, Page No. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# current rating of the thyristor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vdc = 100.0 # input voltage\n",
+ "L = 0.1 *10**-3 # Inductance\n",
+ "C = 10*10**-6 # capacitance\n",
+ "Vc = 100.0 # iinitial voltage on capacitor\n",
+ "t = 25.0*10**-6 # thyristor turn offf time\n",
+ "I = 10.0 # Thyristor load current\n",
+ "\n",
+ "#Calculations\n",
+ "t_off = Vc*C/I\n",
+ "Ic = Vdc*math.sqrt(C/L)\n",
+ "\n",
+ "# Result\n",
+ "print(\"t_off = %d *10^-6 S\\nt_off is more than thyristor turn off time and is thus sufficient to commutate the main circuit.\"%(t_off*10**6))\n",
+ "print(\"\\nPeak capacitor current = %.2fA \"%Ic)\n",
+ "print(\"Maximum current rating of thyristor should be more than %.2fA\"%Ic)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "t_off = 100 *10^-6 S\n",
+ "t_off is more than thyristor turn off time and is thus sufficient to commutate the main circuit.\n",
+ "\n",
+ "Peak capacitor current = 31.62A \n",
+ "Maximum current rating of thyristor should be more than 31.62A\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.37, Page No. 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# value of R and C for snubber circuit\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "dv_by_dt = 25*10**6 # Thyristor's dv/dt rating\n",
+ "L = 0.2 *10**-3 # source inductance\n",
+ "V = 230 # Supply voltage\n",
+ "df = 0.65 # damping factor\n",
+ "\n",
+ "#Calculation\n",
+ "Vm = V*math.sqrt(2) \n",
+ "C = (1/(2*L))*(0.564*Vm/dv_by_dt)**2\n",
+ "R = 2*df*math.sqrt(L/C)\n",
+ "\n",
+ "#Result\n",
+ "print(\"C = %.2f*10^-9 F\\n\\nR = %.1f ohm\"%(C*10**9,R))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C = 134.62*10^-9 F\n",
+ "\n",
+ "R = 50.1 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.38, Page No.97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# snuubber circuit parameters\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 300.0 # input voltage\n",
+ "Rl = 10.0 # load resistance\n",
+ "f = 2000.0 # operating frequency otf the circuit\n",
+ "dv_by_dt = 100.0*10**6 # required dv/dt rating of the circuit\n",
+ "I = 100.0 # discharge current\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "R = V/I\n",
+ "C = (1-(1/math.e))*Rl*V/(dv_by_dt*((R+Rl)**2))\n",
+ "C = math.floor(C*10**9)/10**9\n",
+ "#(b)\n",
+ "P = (C*V**2*f)/2\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nR = %f ohm\\nC = %.3f*10^-6 F\"%(R,C*10**6))\n",
+ "print(\"\\n(b)\\nSnubber power loss = %.2f W\"%P)\n",
+ "print(\"\\nAll the energy stored in capacitor C is dissipated in resistance R. Hence power rating of R is %.2f W.\"%P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "R = 3.000000 ohm\n",
+ "C = 0.112*10^-6 F\n",
+ "\n",
+ "(b)\n",
+ "Snubber power loss = 10.08 W\n",
+ "\n",
+ "All the energy stored in capacitor C is dissipated in resistance R. Hence power rating of R is 10.08 W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.39, Page No.98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# maximum permissiible values of dv/dt and di/dt\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "R = 4.0 # resistance\n",
+ "L = 6.0*10**-6 # inductance\n",
+ "C = 6.0*10**-6 # capacitance\n",
+ "V = 300.0 # Supply voltage\n",
+ "\n",
+ "#calculations\n",
+ "di_dt = V/L\n",
+ "Isc = V/R\n",
+ "dv_dt =(R* di_dt)+(Isc/C)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Maximum di/dt = %.0f*10^6 A/s\\n\\nmaximum permissible dv/dt = %.1f*10^6 V/s\"%(di_dt*10**-6,dv_dt*10**-6))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum di/dt = 50*10^6 A/s\n",
+ "\n",
+ "maximum permissible dv/dt = 212.5*10^6 V/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.40, Page No.98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# snubber circuit designe\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "\n",
+ "Rl = 8.0 # load resistance\n",
+ "V = 230.0 # supply voltage\n",
+ "I = 200.0 # repititive peak current \n",
+ "di_dt = 40.0*10**6 # max. di/di rating\n",
+ "dv_dt = 150.0*10**6 # max. dv/dv rating\n",
+ "sf = 2.0 # safety factor for thyristor\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "I1 = I/2.0\n",
+ "di_dt2 = di_dt/2.0\n",
+ "dv_dt2 = dv_dt/2\n",
+ "Vp = V*math.sqrt(2)\n",
+ "#Vp = math.floor((Vp*10)/10)\n",
+ "L2 = Vp/di_dt2\n",
+ "L2 = math.floor(L2*10**8)/10**8\n",
+ "R2 = L2*dv_dt2/Vp\n",
+ "Ip = Vp/Rl\n",
+ "Ic = (math.floor(Vp*10)/10)/R2\n",
+ "It = math.floor(Ip*100)/100+Ic\n",
+ "Ic_max = I1 - Ip\n",
+ "Ic_max = math.ceil(Ic_max*100)/100\n",
+ "R = Vp /Ic_max\n",
+ "R = math.ceil(R)\n",
+ "h = 0.65 #assumed \n",
+ "C = 4*(h**2)*L2/R**2\n",
+ "dv_dt3 = Vp/((R+Rl)*C)\n",
+ "\n",
+ "#Result\n",
+ "print(\"when safety factor is 2 ,maximum permisible ratings are:\")\n",
+ "print(\"max. di/dt = %.0f*10^6 A/s\\nmax. dv/dt = %.0f*10^6 V/s\"%(di_dt2*10**-6,dv_dt2*10**-6))\n",
+ "print(\"\\nPeak value of input voltage = %.1f V\"%(math.floor(Vp*10)/10))\n",
+ "print(\"L = %.2f*10^-6 H \\nR = %.2f ohm\"%(L2*10**6,R2))\n",
+ "print(\"Peak load current = %.2fA\\nPeak capacitor discharge current = %.2f A\"%(math.floor(Ip*100)/100,Ic))\n",
+ "print(\"Total current through capacitor = %.2f\"%It)\n",
+ "print(\"\\nSince total current through capacitor is more than permissible vale. Hence max capacitor discharge current = %.2fA\"%Ic_max)\n",
+ "print(\"R = %.0f ohm\\nC = %.4f*10^-6F\"%(R,C*10**6))\n",
+ "print(\"dv/dt = %.2f*10^6 V/s\\nSince this value is within specified limit the design is safe. \"%(math.floor(dv_dt3*10**-4)/100))\n",
+ "print(\"Hence, R = %d ohm, C = %.4f micro-F and L = %.2f micro-H\"%(R,C*10**6,L2*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when safety factor is 2 ,maximum permisible ratings are:\n",
+ "max. di/dt = 20*10^6 A/s\n",
+ "max. dv/dt = 75*10^6 V/s\n",
+ "\n",
+ "Peak value of input voltage = 325.2 V\n",
+ "L = 16.26*10^-6 H \n",
+ "R = 3.75 ohm\n",
+ "Peak load current = 40.65A\n",
+ "Peak capacitor discharge current = 86.74 A\n",
+ "Total current through capacitor = 127.39\n",
+ "\n",
+ "Since total current through capacitor is more than permissible vale. Hence max capacitor discharge current = 59.35A\n",
+ "R = 6 ohm\n",
+ "C = 0.7633*10^-6F\n",
+ "dv/dt = 30.43*10^6 V/s\n",
+ "Since this value is within specified limit the design is safe. \n",
+ "Hence, R = 6 ohm, C = 0.7633 micro-F and L = 16.26 micro-H\n"
+ ]
+ }
+ ],
+ "prompt_number": 83
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.41, Page No. 100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Fault clearing time(referring to fig.2.59)\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "I2t = 30 # I2t rating of thyristor\n",
+ "V = 230 # supply voltage\n",
+ "#For resistor values refer to fig 2.59\n",
+ "R1 = 2.0\n",
+ "R2 = 1.0\n",
+ "R3 = 5.0\n",
+ "R4 = 6.0\n",
+ "R5 = 5.0 \n",
+ "#calculation\n",
+ "Rnet = R1+(R3*R2)/R4\n",
+ "If = math.sqrt(2)*V/Rnet\n",
+ "tc = I2t/(If**2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"tc = %.3f*10^-3 seconds \"%(math.ceil(tc*1000*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tc = 2.277*10^-3 seconds \n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.42, Page No.103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# number of thyristors in series and parallel\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 3*10**3 # supply voltage\n",
+ "I = 750.0 # supply current\n",
+ "V1 = 800.0 # Thyristor voltage rating\n",
+ "I1 = 175.0 # Thyristor current rating\n",
+ "d = 0.25 # derating\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "np = I/((1-d)*I1)\n",
+ "ns = V/((1-d)*V1)\n",
+ "print(\"np = %.2f or %d\"%(np,math.ceil(np)))\n",
+ "print(\"ns = %d\"%(math.ceil(ns)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "np = 5.71 or 6\n",
+ "ns = 5\n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.43, Page No. 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Value of R and C\n",
+ "\n",
+ "import math\n",
+ "#variable declaration(referring to example 2.42)\n",
+ "V = 3*10**3 # supply voltage\n",
+ "I = 750.0 # supply current\n",
+ "V1 = 800.0 # Thyristor voltage rating\n",
+ "I1 = 175.0 # Thyristor current rating\n",
+ "d = 0.25 # derating\n",
+ "Ib = 8*10**-3 # maximum forward leakage current\n",
+ "del_Q = 30*10**-6 # recovery charge difference\n",
+ "ns = 5 # number of series thyristors \n",
+ "\n",
+ "#Calculations\n",
+ "R = ((ns*V1)-V)/((ns-1)*Ib)\n",
+ "C = (ns-1)*del_Q/(ns*V1-V)\n",
+ "\n",
+ "#Result\n",
+ "print(\"R = %.2f*10^3 ohm\\nC = %.2f*10^-6 F\"%(R/1000,C*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R = 31.25*10^3 ohm\n",
+ "C = 0.12*10^-6 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.44, Page No. 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# series resistance\n",
+ "\n",
+ "import math\n",
+ "# variabe declaration\n",
+ "I1 = 200 # thyristor1 current rating\n",
+ "I2 = 300 # thyristor2 current rating\n",
+ "V1 = 1.5 # on state voltage drop of thyristor1 \n",
+ "V2 = 1.2 # on state voltage drop of thyristor2\n",
+ "\n",
+ "#Calculations\n",
+ "R = (V1-V2)/(I2-I1)\n",
+ "\n",
+ "#Result\n",
+ "print(\"R = %.3f ohm\"%R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R = 0.003 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 100
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.45, Page No.104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Thyristor parameters\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "ns = 12 # no of series thyristors\n",
+ "V = 16*10**3 # maximum DC voltage rating\n",
+ "Ib = 10*10**-3 # maximum leakage current of thyristor\n",
+ "del_Q = 150 *10**-6 # recovery charge differences of thyristors\n",
+ "R = 56*10**3 # resistance\n",
+ "C = 0.5 *10**-6 # Capacitance\n",
+ "\n",
+ "#Calculations\n",
+ "Vd1 = (V+(ns-1)*R*Ib)/ns\n",
+ "ssvd = 1-(V/(ns*Vd1))\n",
+ "Vd2 = (V+((ns-1)*del_Q/C))/ns\n",
+ "tsvd = 1-(V/(ns*Vd2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Maximum steady state voltage rating = %.2f V\"%Vd1)\n",
+ "print(\"(b) Steady state voltage derating = %.3f or %.1f%%\"%(ssvd,ssvd*100))\n",
+ "print(\"(c) Maximum transient state voltage rating = %.2f V\"%Vd2)\n",
+ "print(\"(d) Transient state voltage derating = %.3f or %.1f%%\"%(tsvd,tsvd*100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Maximum steady state voltage rating = 1846.67 V\n",
+ "(b) Steady state voltage derating = 0.278 or 27.8%\n",
+ "(c) Maximum transient state voltage rating = 1608.33 V\n",
+ "(d) Transient state voltage derating = 0.171 or 17.1%\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.46, Page No.104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# No of Thyristor\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 500.0 # single thyristor voltage rating\n",
+ "I = 75.0 # single thyristor current rating\n",
+ "Vmax = 7.5*10**3 # overall voltage rating of the circuit\n",
+ "Imax = 1.0*10**3 # overall current rating of the circuit\n",
+ "df = 0.14 # derating factor\n",
+ "\n",
+ "#Calcaulations\n",
+ "ns = Vmax/((1-df)*V)\n",
+ "np = Imax/((1-df)*I)\n",
+ "\n",
+ "#Result\n",
+ "print(\"No of thyristors in series, ns = %.2f say %d\"%(ns,math.ceil(ns)))\n",
+ "print(\"No of thyristors in parallel, np = %.2f say %d\"%(np,math.ceil(np)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No of thyristors in series, ns = 17.44 say 18\n",
+ "No of thyristors in parallel, np = 15.50 say 16\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.47, Page No. 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Turn off voltage and discharge current through SCR\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vmax = 8.0*10**3 # max voltage rating of the circuit\n",
+ "R = 20.0*10**3 # static equalising resistance \n",
+ "Rc = 25.0 # Resistace of dynamic equalising circuit\n",
+ "C = 0.1*10**-6 # Capacitance of dynamic equalising circuit\n",
+ "Ib1 = 22.0*10**-3 # leakage current of thyristor1\n",
+ "Ib2 = 20.0*10**-3 # leakage current of thyristor2\n",
+ "Ib3 = 18.0*10**-3 # leakage current of thyristor3\n",
+ "\n",
+ "\n",
+ "#Calculations \n",
+ "#(a)\n",
+ "I = ((Vmax/R)+(Ib1+Ib2+Ib3))/3\n",
+ "V1 = (I-Ib1)*R\n",
+ "V2 = (I-Ib2)*R\n",
+ "V3 = (I-Ib3)*R\n",
+ "#(b)\n",
+ "I1 = V1/Rc\n",
+ "I2 = V2/Rc\n",
+ "I3 = V3/Rc\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage across SCR 1 = %.1fV\"%(math.floor(V1*10)/10))\n",
+ "print(\"Voltage across SCR 2 = %.1fV\"%(math.floor(V2*10)/10))\n",
+ "print(\"Voltage across SCR 3 = %.1fV\"%(math.floor(V3*10)/10))\n",
+ "print(\"Discharge current through SCR 1 = %.2fA\"%(math.floor(I1*100)/100))\n",
+ "print(\"Discharge current through SCR 2 = %.2fA\"%(math.floor(I2*100)/100))\n",
+ "print(\"Discharge current through SCR 3 = %.2fA\"%(math.floor(I3*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage across SCR 1 = 2626.6V\n",
+ "Voltage across SCR 2 = 2666.6V\n",
+ "Voltage across SCR 3 = 2706.6V\n",
+ "Discharge current through SCR 1 = 105.06A\n",
+ "Discharge current through SCR 2 = 106.66A\n",
+ "Discharge current through SCR 3 = 108.26A\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_3_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_3_3.ipynb new file mode 100755 index 00000000..8f24e4d1 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_3_3.ipynb @@ -0,0 +1,2276 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Controlled Rectifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.1, Page No. 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.2, Page No. 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.3, Page No. 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Half wave diode rectifier\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#Variable declaration\n",
+ "V = 12.0 # Voltage of the battery to be charged\n",
+ "B = 150.0 # battery capacity in Wh\n",
+ "I = 4.0 # average current requirement\n",
+ "t = 4.0 # transformer primary to secondary ratio \n",
+ "Vi = 230.0 # voltage at transformer primary\n",
+ "\n",
+ "# Calculations\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vp = Vi*sqrt_2/t\n",
+ "#(a)\n",
+ "alfa = (180/math.pi)*(math.asin(V/Vp))\n",
+ "ang_c = (180-alfa)-alfa\n",
+ "ang_c = math.floor(ang_c*100)/100\n",
+ "#(b)\n",
+ "def f(wt):\n",
+ " return ((Vp*math.sin(wt))-V)/(2*math.pi*I)\n",
+ "wt_lower=(alfa*math.pi/180)\n",
+ "wt_upper =math.pi-(alfa*math.pi/180)\n",
+ "val1 = quad(f,wt_lower,wt_upper)\n",
+ "R = val1[0]\n",
+ "R = math.floor(R*100)/100\n",
+ "#(c)\n",
+ "def g(wt):\n",
+ " return (((Vp*math.sin(wt))-V)**2)/(2*math.pi*(R**2))\n",
+ "val2 = quad(g,wt_lower,wt_upper)\n",
+ "Irms = val2[0]\n",
+ "Irms = math.floor(math.sqrt(Irms)*100)/100\n",
+ "P = (Irms**2)*R\n",
+ "#(d)\n",
+ "T = B/(V*I)\n",
+ "#(e)\n",
+ "eff = (V*I)/((V*I)+P)\n",
+ "#(f)\n",
+ "PIV = Vp+V\n",
+ "\n",
+ "#Results\n",
+ "print(\"(a) Conduction angle = %.2f\u00b0\\n(b) R = %.2f ohm\\n(c) Irms = %.2f A\\n Resistor power rating = %.1f W\"%(ang_c,R,Irms,P))\n",
+ "print(\"(d) Time of charging = %.3f hours\\n(e) Rectifier efficiency = %.4f or %.2f%%\\n(f) PIV = %.3f V\"%(T,eff,eff*100,PIV))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Conduction angle = 163.02\u00b0\n",
+ "(b) R = 5.04 ohm\n",
+ "(c) Irms = 6.58 A\n",
+ " Resistor power rating = 218.2 W\n",
+ "(d) Time of charging = 3.125 hours\n",
+ "(e) Rectifier efficiency = 0.1803 or 18.03%\n",
+ "(f) PIV = 93.305 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.4, Page No. 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Full wave centre tapped rectifier\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "Vm = 100.0 # transformer secondary voltage from mid point to each end\n",
+ "R = 5.0 # resistance\n",
+ "\n",
+ "#Calculation\n",
+ "#(b)\n",
+ "Idc = 2*Vm/(math.pi*R)\n",
+ "Idc = math.floor(Idc*1000)/1000\n",
+ "Vdc = Idc*R\n",
+ "Irms = 0.707*Vm/R\n",
+ "Pdc = R*Idc**2\n",
+ "Pdc = math.ceil(Pdc*100)/100\n",
+ "Pac = R*Irms**2\n",
+ "Pac = math.ceil(Pac*10)/10\n",
+ "eff = Pdc/Pac\n",
+ "FF = math.floor(((0.707*Vm*math.pi)/(2*Vm))*100)/100\n",
+ "RF = math.sqrt((FF**2)-1)\n",
+ "TUF = (((2/math.pi)**2)/(2*0.707*0.5))*100\n",
+ "PIV =2*Vm\n",
+ "\n",
+ "# Result\n",
+ "print(\"Idc = %.3f A\\nVdc = %.2f V\\nIrms = %.2f A\\nPdc = %.2f\\nPac = %.1f\\nEfficiency = %.3f\"%(Idc,Vdc,Irms,Pdc,Pac,eff))\n",
+ "print(\"FF = %.2f\\nRF = %.3f\\nTUF = %.2f%%\\nPIV = %d\\nCF = %f\"%(FF,RF,TUF,PIV,math.sqrt(2)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Idc = 12.732 A\n",
+ "Vdc = 63.66 V\n",
+ "Irms = 14.14 A\n",
+ "Pdc = 810.52\n",
+ "Pac = 999.7\n",
+ "Efficiency = 0.811\n",
+ "FF = 1.11\n",
+ "RF = 0.482\n",
+ "TUF = 57.32%\n",
+ "PIV = 200\n",
+ "CF = 1.414214\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.5, Page No.133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.6, Page No.135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase diode bridge rectifier\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vm = 100.0 # Peak input voltage\n",
+ "R = 5.0 # load resistance\n",
+ "\n",
+ "#Calculation\n",
+ "#(b)\n",
+ "Idc = 2*Vm/(math.pi*R)\n",
+ "Idc = math.floor(Idc*1000)/1000\n",
+ "Vdc = Idc*R\n",
+ "Irms = 0.707*Vm/R\n",
+ "Pdc = R*Idc**2\n",
+ "Pdc = math.ceil(Pdc*100)/100\n",
+ "Pac = R*Irms**2\n",
+ "Pac = math.ceil(Pac*10)/10\n",
+ "eff = Pdc/Pac\n",
+ "FF = math.floor(((0.707*Vm*math.pi)/(2*Vm))*100)/100\n",
+ "RF = math.sqrt((FF**2)-1)\n",
+ "PIV =Vm\n",
+ "\n",
+ "# Result\n",
+ "print(\"Idc = %.3f A\\nVdc = %.2f V\\nIrms = %.2f A\\nPdc = %.2f\\nPac = %.1f\\nEfficiency = %.3f\"%(Idc,Vdc,Irms,Pdc,Pac,eff))\n",
+ "print(\"FF = %.2f\\nRF = %.3f\\nPIV = %d\\nCF = %f\"%(FF,RF,PIV,math.sqrt(2)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Idc = 12.732 A\n",
+ "Vdc = 63.66 V\n",
+ "Irms = 14.14 A\n",
+ "Pdc = 810.52\n",
+ "Pac = 999.7\n",
+ "Efficiency = 0.811\n",
+ "FF = 1.11\n",
+ "RF = 0.482\n",
+ "PIV = 100\n",
+ "CF = 1.414214\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.7, Page No.135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.8, Page No.138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase half wave rectifier circuit\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "Vm = 400 # amplitude of output sine wave\n",
+ "alfa = 30 # thyristor firing angle\n",
+ "R = 50 # Load resistance\n",
+ "\n",
+ "#Calculations\n",
+ "alfa = alfa*math.pi/180\n",
+ "Vdc = Vm*(1+math.cos(alfa))/(2*math.pi)\n",
+ "I = Vdc/R\n",
+ "Vrms = Vm*math.sqrt(((math.pi-alfa)/(4*math.pi))+(math.sin(2*alfa)/(8*math.pi)))\n",
+ "Irms = Vrms/R\n",
+ "\n",
+ "#Result\n",
+ "print(\"Average DC voltage = %.1f V\\nAverage load current = %.3f A\"%(Vdc,I))\n",
+ "print(\"RMS voltage = %.1f V\\nRMS current = %.3f A\"%(Vrms,Irms))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average DC voltage = 118.8 V\n",
+ "Average load current = 2.376 A\n",
+ "RMS voltage = 197.1 V\n",
+ "RMS current = 3.942 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.9, Page No. 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Average current in the circuit\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#Variable declaration\n",
+ "Vm = 100.0 # peak input voltage\n",
+ "V = 50.0 # voltage of battery to be charged\n",
+ "R = 10.0 # load resistance\n",
+ "\n",
+ "#Calculations\n",
+ "wt = math.asin(V/Vm)\n",
+ "wt2= math.pi-wt\n",
+ "def f(wt):\n",
+ " return ((Vm*math.sin(wt))-V)/(2*math.pi*R)\n",
+ "wt_lower=wt\n",
+ "wt_upper =wt2\n",
+ "val = quad(f,wt_lower,wt_upper)\n",
+ "i = val[0]\n",
+ "\n",
+ "#Result\n",
+ "print(\"Average current in the circuit = %.2f A\"%i)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average current in the circuit = 1.09 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.10, Page No. 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Average current\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#Variable declaration\n",
+ "Vm = 110.0 # peak input voltage\n",
+ "f = 50.0 # input frequency\n",
+ "Ra = 10.0 # motor armature resistance\n",
+ "E = 55.5 # back emf of the motor\n",
+ "\n",
+ "#Calculations\n",
+ "wt = math.asin(E/(Vm*math.sqrt(2)))\n",
+ "wt2 = math.pi-wt\n",
+ "def f(wt):\n",
+ " return ((math.sqrt(2)*Vm*math.sin(wt))-E)/(2*math.pi*Ra)\n",
+ "wt_lower=wt\n",
+ "wt_upper =wt2\n",
+ "val = quad(f,wt_lower,wt_upper)\n",
+ "i = val[0]\n",
+ "\n",
+ "#Result\n",
+ "print(\"Average current in the circuit = %.3f A\"%i)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average current in the circuit = 2.495 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.11, Page No. 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase half wave rectifier\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "R = 15.0 # load resistance\n",
+ "V = 230.0 # supply voltage\n",
+ "alfa = math.pi/2 # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "Vm = math.sqrt(2)*V\n",
+ "Vm = math.floor(Vm*10)/10\n",
+ "#(a)\n",
+ "Vdc = Vm*(1+math.cos(alfa))/(2*math.pi)\n",
+ "Vdc = math.ceil(Vdc*100)/100\n",
+ "Idc = Vdc/R\n",
+ "Idc = math.floor(Idc*100)/100\n",
+ "Vrms = Vm*math.sqrt(((math.pi-alfa)/(4*math.pi))+((math.sin(2*alfa))/(8*math.pi)))\n",
+ "Vrms = math.ceil(Vrms*100)/100\n",
+ "Irms =Vrms/R\n",
+ "Irms = math.floor(Irms*100)/100\n",
+ "#(b)\n",
+ "Pdc = Vdc*Idc\n",
+ "Pac = Vrms*Irms\n",
+ "eff = Pdc/Pac\n",
+ "#(c)\n",
+ "FF = Vrms/Vdc\n",
+ "RF = math.sqrt((FF**2)-1)\n",
+ "#(d)\n",
+ "VA = V*Irms\n",
+ "TUF = Pdc/VA\n",
+ "#(e)\n",
+ "PIV = Vm\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nVdc = %.2f V\\nIdc = %.2fA\\nVrms = %.2f V\\nIrms = %.2f A\"%(Vdc,Idc,Vrms,Irms))\n",
+ "print(\"\\n(b)\\nRectification Efficiency = %.3f\"%eff)\n",
+ "print(\"\\n(c)\\nForm Factor = %.2f\\nRipple Factor = %.3f\\n\\n(d)\\nTransformer utilization factor =%.4f\\n\\n(e)PIV = %.1f V\"%(FF,RF,TUF,PIV))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Vdc = 51.76 V\n",
+ "Idc = 3.45A\n",
+ "Vrms = 114.98 V\n",
+ "Irms = 7.66 A\n",
+ "\n",
+ "(b)\n",
+ "Rectification Efficiency = 0.203\n",
+ "\n",
+ "(c)\n",
+ "Form Factor = 2.22\n",
+ "Ripple Factor = 1.984\n",
+ "\n",
+ "(d)\n",
+ "Transformer utilization factor =0.1014\n",
+ "\n",
+ "(e)PIV = 325.2 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.12, Page No.146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase full wave rectifier\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 150.0 # input rms value\n",
+ "R = 30.0 # load resistance\n",
+ "alfa =(math.pi/180)*45 # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vdc = V*sqrt_2*(1+math.cos(alfa))/math.pi\n",
+ "I = Vdc/R\n",
+ "Vrms = V*sqrt_2*math.sqrt(((math.pi-alfa)/(2*math.pi))+((math.sin(2*alfa))/(4*math.pi)))\n",
+ "Irms =Vrms/R\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vdc = %.2f V\\nAverage load current = %.2f A\\nVrms = %d V\\nRMS load current = %.3f A\"%(Vdc,I,Vrms,Irms))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vdc = 115.25 V\n",
+ "Average load current = 3.84 A\n",
+ "Vrms = 143 V\n",
+ "RMS load current = 4.767 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.13, Page No. 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Transformer and thyristor parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input to transformer primary\n",
+ "f = 50.0 # input frequency\n",
+ "Vdc = 100.0 # Average values of load voltage\n",
+ "Idc = 15.0 # Average value of load current\n",
+ "alfa = 30*(math.pi/180) # firing angle\n",
+ "d = 1.7 # drop across thyristor\n",
+ "\n",
+ "\n",
+ "#caculatios\n",
+ "#(a)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = ((Vdc+d)*math.pi)/(2*math.cos(alfa))\n",
+ "Vm = math.floor(Vm*100)/100\n",
+ "Vrms = Vm/1.4109#math.sqrt(2)::to match the ans in book\n",
+ "N = V/Vrms\n",
+ "#(b)\n",
+ "Irms = math.sqrt((Idc**2)/2)\n",
+ "Irms = math.ceil(Irms*100)/100\n",
+ "Tr = 2*Vrms*Irms\n",
+ "\n",
+ "#(c)\n",
+ "PIV = 2*Vm\n",
+ "#(d)\n",
+ "It = Irms\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nVm = %.2f V\\nRMS voltage of each half cycle of secondary = %.2f V\\nTurn ratio of transformer = %.2f\"%(Vm,Vrms,N))\n",
+ "print(\"\\n(b)Transformer VA rating = %.1f VA\\n\\n(c)PIV = %.2f V\\n\\n(d)RMS value of thyristor current = %.2f A\"%(Tr,PIV,It))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Vm = 184.46 V\n",
+ "RMS voltage of each half cycle of secondary = 130.74 V\n",
+ "Turn ratio of transformer = 1.76\n",
+ "\n",
+ "(b)Transformer VA rating = 2774.3 VA\n",
+ "\n",
+ "(c)PIV = 368.92 V\n",
+ "\n",
+ "(d)RMS value of thyristor current = 10.61 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.14, Page No.148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# thyristor rated voltage\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "P = 10.0*10**3 # rectifier powwer rating\n",
+ "I = 50.0 # thyristor current rating\n",
+ "sf = 2 # safety factor\n",
+ "\n",
+ "#Calculations\n",
+ "Idc = I\n",
+ "#(a)\n",
+ "Vdc = P/Idc\n",
+ "Vm = Vdc*math.pi/2\n",
+ "PIV = 2*Vm\n",
+ "Vt = 2*PIV\n",
+ "#(a)\n",
+ "Vt2 = 2*Vm\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Full wave centre tapped recifier:\\n Thyristor voltage rating = %.2f V\"%Vt)\n",
+ "print(\"\\n(b) Full wave bridge rectifier:\\n Thyristor voltage rating = %.2f V\"%Vt2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Full wave centre tapped recifier:\n",
+ " Thyristor voltage rating = 1256.64 V\n",
+ "\n",
+ "(b) Full wave bridge rectifier:\n",
+ " Thyristor voltage rating = 628.32 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.15, Page No. 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# output voltage, firing angle, load current\n",
+ "\n",
+ "import math\n",
+ "from numpy import poly1d\n",
+ "#variable declaaration\n",
+ "V = 230.0 # input voltage\n",
+ "P = 1000.0 # output power rating\n",
+ "Pl = 800.0 # Actual power delivered\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Vrms = math.sqrt((Pl*V**2)/P)\n",
+ "Vrms = math.ceil(Vrms*100)/100\n",
+ "#(b)\n",
+ "#After solving equation using taylor seris of X, we got following coefficient. \n",
+ "P = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-2*math.pi*(1-(Vrms/V)**2))], variable = 'x')\n",
+ "x = P.r[(P.order+1)/2]*180/math.pi\n",
+ "alfa = math.ceil(x.real)\n",
+ "#(c)\n",
+ "I = Pl/Vrms\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Vrms = %.2f V\\n(b) firing angle = %.0f\u00b0\\n(c) Load current(rms value) = %.3f A\"%(Vrms,alfa,I))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Vrms = 205.72 V\n",
+ "(b) firing angle = 61\u00b0\n",
+ "(c) Load current(rms value) = 3.889 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.16, Page No.149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Average power output\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 800.0 # thyristor peak voltage rating\n",
+ "I = 30.0 # average forward current\n",
+ "sf = 2.5 # safety factor\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Vm = V/(2*sf)\n",
+ "Vdc = 2*Vm/math.pi\n",
+ "Vdc = math.ceil(Vdc*100)/100\n",
+ "Idc = I/sf\n",
+ "P = Idc*Vdc\n",
+ "#(b)\n",
+ "Vm2 = V/sf\n",
+ "Vdc2 = 2*Vm2/math.pi\n",
+ "Vdc2 = math.ceil(Vdc2*100)/100\n",
+ "Idc2 = I/sf\n",
+ "P2 = Idc2*Vdc2\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) In a mid point converter:\\n Average output power = %.2f W\"%P)\n",
+ "print(\"(b) In a Bridge converter:\\n Average output power = %.2f W\"%P2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) In a mid point converter:\n",
+ " Average output power = 1222.32 W\n",
+ "(b) In a Bridge converter:\n",
+ " Average output power = 2444.64 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.17, Page No.150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Bridge converter parameters\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "R = 10.0 # load resistance\n",
+ "alfa = 30*math.pi/180 # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "#(b)\n",
+ "Vm = math.sqrt(2)*V\n",
+ "def f(wt):\n",
+ " return math.sin(wt)\n",
+ "wt_lower1 = alfa\n",
+ "wt_upper1 = math.pi\n",
+ "wt_lower2 = math.pi\n",
+ "wt_upper2 = 2*math.pi\n",
+ "val1 = quad(f,wt_lower1,wt_upper1)\n",
+ "val2 = quad(f,wt_lower2,wt_upper2)\n",
+ "Vo =math.floor(((Vm/(2*math.pi))*(val1[0]-val2[0]))*10)/10\n",
+ "I = Vo/R\n",
+ "P = Vo*I\n",
+ "#result\n",
+ "print(\"DC power output = %.3f W\"%P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "DC power output = 4004.001 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.18, Page No. 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# output voltage and power\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "R = 10.0 # load resistance\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vo = 2*sqrt_2*V/math.pi\n",
+ "Vo = math.floor(Vo*100)/100\n",
+ "I = Vo/R\n",
+ "P = Vo*I\n",
+ "\n",
+ "#Result\n",
+ "print(\"DC power = %.2f W\"%P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "DC power = 4286.56 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.19, Page No.154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase bridge converter circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "f = 50.0 # input frequency\n",
+ "I = 15.0 # constant load current\n",
+ "R = 0.5 # load resistance\n",
+ "L = 0.3 # inductance\n",
+ "E1 = 100 # back emf for case 1\n",
+ "E2 = -100 # back emf for case 2 \n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "alfa1 = (math.acos((E1+I*R)*math.pi/(2*Vm)))*(180/math.pi)\n",
+ "#(b)\n",
+ "alfa2 = (math.acos((E2+I*R)*math.pi/(2*Vm)))*(180/math.pi)\n",
+ "#(c)\n",
+ "OP1 = (E1*I)+(R*I**2)\n",
+ "OP2 = (E2*I)+(R*I**2)\n",
+ "IP = V*I\n",
+ "pf1 = OP1/IP\n",
+ "pf2 = -OP2/IP\n",
+ "print(\"(a) Firing angle = %.2f\u00b0\"%(math.ceil(alfa1*100)/100))\n",
+ "print(\"(b) Firing angle = %.2f\u00b0\"%alfa2)#Answer in the book is wrong\n",
+ "print(\"(c) when E = %d : input power factor= %.3f lagging\\n When E = %d: input power factor= %.3f lagging\"%(E1,pf1,E2,pf2)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Firing angle = 58.73\u00b0\n",
+ "(b) Firing angle = 116.54\u00b0\n",
+ "(c) when E = 100 : input power factor= 0.467 lagging\n",
+ " When E = -100: input power factor= 0.402 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.20, Page No.155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Average load current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "f = 50.0 # frequency\n",
+ "R = 5.0 # load resistance\n",
+ "L = 8*10**-3 # inductance\n",
+ "E = 50.0 # back emf\n",
+ "alfa = 40*(math.pi/180) # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "I = ((2*Vm*math.cos(alfa)/math.pi)-E)/R\n",
+ "\n",
+ "#Result\n",
+ "print(\"Average load current = %.2f A\"%I)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average load current = 21.72 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.21, Page No. 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Transformer and thyristor parameters for full bridge circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input to transformer primary\n",
+ "f = 50.0 # input frequency\n",
+ "Vdc = 100.0 # Average values of load voltage\n",
+ "Idc = 15.0 # Average value of load current\n",
+ "alfa = 30*(math.pi/180) # firing angle\n",
+ "d = 1.7 # drop across thyristor\n",
+ "\n",
+ "\n",
+ "#caculatios\n",
+ "#(a)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = ((Vdc+2*d)*math.pi)/(2*math.cos(alfa))\n",
+ "Vrms = Vm/sqrt_2\n",
+ "N = V/Vrms\n",
+ "#(b)\n",
+ "Irms = Idc\n",
+ "Tr = Vrms*Irms\n",
+ "#(c)\n",
+ "PIV = Vm\n",
+ "#(d)\n",
+ "Itrms = Idc/sqrt_2\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nVm = %.2f V\\nRMS voltage of secondary = %.2f V\\nTurn ratio of transformer = %.3f\"%(Vm,Vrms,N))\n",
+ "print(\"\\n(b)Transformer VA rating = %.1f VA\\n\\n(c) PIV = %.2f V\\n\\n(d)RMS value of thyristor current = %.2f A\"%(math.ceil(Tr*10)/10,PIV,Itrms))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Vm = 187.55 V\n",
+ "RMS voltage of secondary = 132.64 V\n",
+ "Turn ratio of transformer = 1.734\n",
+ "\n",
+ "(b)Transformer VA rating = 1989.6 VA\n",
+ "\n",
+ "(c) PIV = 187.55 V\n",
+ "\n",
+ "(d)RMS value of thyristor current = 10.61 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 80
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.22, Page No. 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase semi-converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "f = 50.0 # frequency\n",
+ "alfa = 90*math.pi/180 # firing angle\n",
+ "\n",
+ "# Calculation\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "Vm = math.floor(Vm*10)/10\n",
+ "Vdc = Vm*(1+math.cos(alfa))/math.pi\n",
+ "Vrms = (Vm/sqrt_2)*math.sqrt(((math.pi-alfa)+((math.sin(2*alfa))/2))/math.pi)\n",
+ "FF = Vrms/Vdc\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vdc = %.2f V\\nVrms = %.1f V\\nForm factor = %.3f \"%(Vdc,Vrms,FF))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vdc = 103.51 V\n",
+ "Vrms = 162.6 V\n",
+ "Form factor = 1.571 \n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.23, Page No.160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase semi-converter Bridge circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "f = 50 # frequency\n",
+ "alfa = 90*math.pi/180 # firing angle\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "print(\"(a) Theoretical Section\")\n",
+ "#(b)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "Vdc = Vm*(1+math.cos(alfa))/math.pi\n",
+ "Vdc = math.floor(Vdc*100)/100\n",
+ "pi = math.floor(math.pi*1000)/1000\n",
+ "Vrms = (Vm/sqrt_2)*math.sqrt(((math.pi-alfa)+((math.sin(2*alfa))/2))/pi)\n",
+ "Is = math.sqrt(1-((alfa)/math.pi)) \n",
+ "Is1 = 2*sqrt_2*math.cos(alfa/2)/math.pi\n",
+ "HF = math.sqrt((Is/Is1)**2-1)\n",
+ "theta = -alfa/2\n",
+ "DF = math.cos(theta)\n",
+ "Pf = Is1*math.cos(theta)/Is\n",
+ "\n",
+ "#Result\n",
+ "print(\"(b)\\nVdc = %.2f V\\nVrms = %.2f V\\nHarmonic factor = %.3f\"%(Vdc,Vrms,HF))\n",
+ "print(\"Displacement factor = %.4f\\nInput power factor = %.4f lagging\"%(DF,Pf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Theoretical Section\n",
+ "(b)\n",
+ "Vdc = 103.52 V\n",
+ "Vrms = 162.65 V\n",
+ "Harmonic factor = 0.484\n",
+ "Displacement factor = 0.7071\n",
+ "Input power factor = 0.6365 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.24, Page No.162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phasefull converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "f = 50 # frequency\n",
+ "alfa = math.pi/3 # firing angle\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "print(\"(a) Theoretical Section\")\n",
+ "#(b)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "Vdc = 2*Vm*math.cos(alfa)/math.pi\n",
+ "Vdc = math.floor(Vdc*100)/100\n",
+ "Vrms = V\n",
+ "Is = 1\n",
+ "Is1 = 2*sqrt_2/math.pi\n",
+ "HF = math.sqrt((Is/Is1)**2-1)\n",
+ "theta = -alfa\n",
+ "DF = math.cos(theta)\n",
+ "Pf = Is1*math.cos(theta)/Is\n",
+ "\n",
+ "#Result\n",
+ "print(\"(b)\\nVdc = %.2f V\\nVrms = %d V\\nHarmonic factor = %.3f\"%(Vdc,Vrms,HF))\n",
+ "print(\"Displacement factor = %.1f\\nInput power factor = %.2f lagging\"%(DF,Pf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Theoretical Section\n",
+ "(b)\n",
+ "Vdc = 103.52 V\n",
+ "Vrms = 230 V\n",
+ "Harmonic factor = 0.484\n",
+ "Displacement factor = 0.5\n",
+ "Input power factor = 0.45 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 108
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.25, Page No.164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase fully controlled bridge converter\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "alfa = 30*math.pi/180 # firing angle\n",
+ "I = 4 # Constant load current\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "Vdc = math.floor((2*Vm*math.cos(alfa)/math.pi)*10)/10\n",
+ "R = Vdc/I\n",
+ "Il = math.floor((2*sqrt_2*I/math.pi)*10)/10\n",
+ "APi = V*Il*math.cos(alfa)\n",
+ "RPi = V*Il*math.sin(alfa)\n",
+ "App_i = V*Il\n",
+ "#(b)\n",
+ "Vdc1 = Vm*(1+math.cos(alfa))/3.1414#To adjust\n",
+ "Vdc1 = math.ceil(Vdc1*1000)/1000\n",
+ "Il1 = math.ceil((Vdc1/R)*100)/100\n",
+ "Il_2 = math.ceil((2*sqrt_2*Il1*math.cos(alfa/2)/math.pi)*100)/100\n",
+ "APi1 = V*Il_2*math.cos(alfa/2)\n",
+ "RPi1 = V*Il_2*math.sin(alfa/2)\n",
+ "App_i1 = V*Il_2\n",
+ "#(c)\n",
+ "Vdc3 = V*(1+math.cos(alfa))/(math.pi*sqrt_2)\n",
+ "Idc = math.floor((Vdc3/R)*100)/100\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\n Vdc = %.1f V\\n Load resistance = %.3f ohm\\n Active power input = %.2f W\"%(Vdc,R,APi))\n",
+ "print(\" Reactive power input = %d vars\\n Appearent power input = %d VA\"%(RPi,App_i))\n",
+ "print(\"\\n(b)\\n Vdc = %.3f V\\n Load current = %.2f A\\n Active power input = %.1f W\"%(Vdc1,Il_2,APi1))\n",
+ "print(\" Reactive power input = %.2f vars\\n Appearent power input = %.1f VA\"%(RPi1,App_i1))\n",
+ "print(\"\\n(c)\\n Vdc = %.3f V\\n Average dc output current = %.2f A\"%(Vdc3,Idc))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " Vdc = 179.3 V\n",
+ " Load resistance = 44.825 ohm\n",
+ " Active power input = 717.07 W\n",
+ " Reactive power input = 413 vars\n",
+ " Appearent power input = 828 VA\n",
+ "\n",
+ "(b)\n",
+ " Vdc = 193.185 V\n",
+ " Load current = 3.75 A\n",
+ " Active power input = 833.1 W\n",
+ " Reactive power input = 223.23 vars\n",
+ " Appearent power input = 862.5 VA\n",
+ "\n",
+ "(c)\n",
+ " Vdc = 96.615 V\n",
+ " Average dc output current = 2.15 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 147
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.26, Page No. 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # single phase fully controlled bridge converter with R-L load\n",
+ " \n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230 # input voltage\n",
+ "alfa = 30*math.pi/180 # firing angle\n",
+ "I = 10 # constant load current\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "Vdc = math.floor((2*Vm*math.cos(alfa)/math.pi)*10)/10\n",
+ "#(b)\n",
+ "Irms = I\n",
+ "#(c)\n",
+ "Is = I\n",
+ "Is1 = 2*sqrt_2*I/math.pi\n",
+ "#(d)\n",
+ "DF = math.cos(-alfa)\n",
+ "#(e)\n",
+ "pf = math.floor((Is1*DF/Is)*1000)/1000\n",
+ "#(f)\n",
+ "HF = math.sqrt(((Is/Is1)**2)-1)\n",
+ "#(g)\n",
+ "FF = V/Vdc\n",
+ "RF = math.ceil((math.sqrt(FF**2-1))*1000)/1000\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) DC output voltage = %.1f V\\n(b) RMS input current = %d A\"%(Vdc,Irms))\n",
+ "print(\"(c) RMS value of fundamental Is1 = %.0f A\\n(d) Displacement factor = %.3f \"%(Is1,DF))\n",
+ "print(\"(e) Input power factor = %.3f lagging\\n(f) Harmonic factor = %.3f\\n(g) Form Factor = %.3f\\t\\tRipple Factor = %.3f\"%(pf,HF,FF,RF))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) DC output voltage = 179.3 V\n",
+ "(b) RMS input current = 10 A\n",
+ "(c) RMS value of fundamental Is1 = 9 A\n",
+ "(d) Displacement factor = 0.866 \n",
+ "(e) Input power factor = 0.779 lagging\n",
+ "(f) Harmonic factor = 0.484\n",
+ "(g) Form Factor = 1.283\t\tRipple Factor = 0.804\n"
+ ]
+ }
+ ],
+ "prompt_number": 165
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.27, Page No.166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Half controlled bridge converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "alfa = 60*math.pi/180 # firing angle\n",
+ "V = 240 # input voltage\n",
+ "R = 10 # Load current\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "Vdc = Vm*(1+math.cos(alfa))/math.pi\n",
+ "#(b)\n",
+ "I = math.floor((Vdc/R)*1000)/1000\n",
+ "Is = I*(1-alfa/math.pi)**(0.5)\n",
+ "#(c)\n",
+ "Is1 = 2*sqrt_2*I*math.cos(alfa/2)/math.pi\n",
+ "fi = -alfa/2\n",
+ "DF =math.cos(fi)\n",
+ "pf = Is1*DF/Is\n",
+ "#(d)\n",
+ "P = I**2*R\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Vdc = %.2f\\n(b) Load current = %.3f A\\n(c) Displacement factor = %.3f\\n Input power factor = %.3f\"%(Vdc,I,DF,pf))\n",
+ "print(\"(d) Average power dissipated in load = %.2f W\"%P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Vdc = 162.03\n",
+ "(b) Load current = 16.203 A\n",
+ "(c) Displacement factor = 0.866\n",
+ " Input power factor = 0.827\n",
+ "(d) Average power dissipated in load = 2625.37 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 170
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.28, Page No. 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Fully controlled three-phase bridge rectifier\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "I = 200.0 # AC line current\n",
+ "Vac = 400.0 # AC line voltage\n",
+ "Vdc = 360.0 # DC voltage\n",
+ "var = 0.1 # 10% line volatge variation\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "alfa = math.acos(Vdc*math.pi*math.sqrt(3)/(3*math.sqrt(3)*Vac*math.sqrt(2)))*(180/math.pi)\n",
+ "#(b)\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "S = I*Vac*sqrt_3\n",
+ "P = S*math.ceil(math.cos(alfa*math.pi/180)*10000)/10000\n",
+ "Q = math.sqrt(S**2-P**2)\n",
+ "#(c)\n",
+ "Vac1 = (1+var)*Vac\n",
+ "alfa2 =math.acos(Vdc/(3*Vac1*math.sqrt(2)/math.pi))*180/math.pi\n",
+ "Vac2 = (1-var)*Vac\n",
+ "alfa3 =math.acos(Vdc/(3*Vac2*math.sqrt(2)/math.pi))*180/math.pi\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) firing angle = %.1f\u00b0\\n(b) P = %.1f W\\n Q = %.1f vars\"%(S,P,Q))\n",
+ "print(\"(c) When ac line voltage is %d V : alfa = %.1f\u00b0\\n When ac line voltage is %d V : alfa = %.1f\u00b0\"%(Vac1,alfa2,Vac2,alfa3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) firing angle = 138560.0\u00b0\n",
+ "(b) P = 92350.2 W\n",
+ " Q = 103297.2 vars\n",
+ "(c) When ac line voltage is 440 V : alfa = 52.7\u00b0\n",
+ " When ac line voltage is 360 V : alfa = 42.2\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 188
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.29, Page No.170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-phase full converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400.0 # 3-phase input voltage\n",
+ "I = 150.0 # Average load current\n",
+ "alfa = 60*math.pi/180 # firing angle\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "Vm = math.ceil((sqrt_2*V/sqrt_3)*100)/100\n",
+ "Vdc =269.23#3*math.sqrt(3)*Vm*math.cos(alfa)/math.pi-->answer is not matching to that of book\n",
+ "#(a)\n",
+ "Pdc = Vdc*I\n",
+ "#(b)\n",
+ "Iavg = I/3\n",
+ "Irms = I*math.sqrt(2.0/6)\n",
+ "Vp = math.sqrt(2)*V\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Output power = %.1f W\\n(b)\\nAverage thyristor current = %d A\\nRMS value of thyristor current = %.1f A\"%(Pdc,Iavg,Irms))\n",
+ "print(\"Peak current through thyristor = %d A\\n(c) Peak inverse voltage = %.1f V\"%(I,math.floor(Vp*10)/10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Output power = 40384.5 W\n",
+ "(b)\n",
+ "Average thyristor current = 50 A\n",
+ "RMS value of thyristor current = 86.6 A\n",
+ "Peak current through thyristor = 150 A\n",
+ "(c) Peak inverse voltage = 565.6 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 258
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.30, Page No.170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-phase fully controlled bridge converter\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 400.0 # line to line input voltage\n",
+ "R = 100.0 # load resistance\n",
+ "P = 400.0 # power supplied to load\n",
+ "\n",
+ "#Calculations\n",
+ "Vrms = math.sqrt(V*R)\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "Vm = math.ceil((sqrt_2*V/sqrt_3)*100)/100\n",
+ "#(a)\n",
+ "alfa = math.acos((((Vrms/(sqrt_3*Vm))**2)-0.5)*(4*math.pi/(3*sqrt_3)))\n",
+ "alfa= (alfa/2)*(180/math.pi)\n",
+ "#(b)\n",
+ "I = math.sqrt(V/R)\n",
+ "Is = math.floor(math.sqrt(2*120.0/180.0)*100)/100\n",
+ "#(c)\n",
+ "app_i=sqrt_3*V*Is\n",
+ "#(d)\n",
+ "pf = V/app_i\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) alfa = %.1f\u00b0\\n(b) RMS value of input current = %.2f A\"%(alfa,Is))\n",
+ "print(\"(c) Input apparent power = %.2f VA\\n(d) power factor = %.1f lagging\"%(app_i,pf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) alfa = 77.5\u00b0\n",
+ "(b) RMS value of input current = 1.15 A\n",
+ "(c) Input apparent power = 796.72 VA\n",
+ "(d) power factor = 0.5 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 276
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.31, Page No.171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# six pulse thyristor converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vac = 415.0 # input AC voltage\n",
+ "Vdc = 460.0 # DC output voltage\n",
+ "I = 200.0 # load current\n",
+ "\n",
+ "#Calculation\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "#(a)\n",
+ "Vm = math.floor((sqrt_2*Vac/sqrt_3)*10)/10\n",
+ "alfa =math.ceil((Vdc*math.pi/(Vm*3*sqrt_3))*1000)/1000\n",
+ "alfa = math.acos(alfa)*(180/math.pi)\n",
+ "#(b)\n",
+ "P = Vdc*I\n",
+ "#(c)\n",
+ "Iac = I*(120.0/180.0)**(0.5)\n",
+ "#(d)\n",
+ "Irms =I*(120.0/360.0)**(0.5)\n",
+ "#(e)\n",
+ "Iavg =math.floor(I*100/3)/100\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) alfa = %.2f\u00b0\\n(b) DC power = %d kW\\n(c) AC line current = %.1f A\"%(alfa,P/1000,Iac))\n",
+ "print(\"(d) RMS thyristor current = %.1f A\\n(e) Average thyristor current = %.2f A\"%(Irms,Iavg))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) alfa = 34.81\u00b0\n",
+ "(b) DC power = 92 kW\n",
+ "(c) AC line current = 163.3 A\n",
+ "(d) RMS thyristor current = 115.5 A\n",
+ "(e) Average thyristor current = 66.66 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 294
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.32, Page No. 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Firing angle and input power factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "E = 200.0 # battery emf\n",
+ "R = 0.5 # battery internal resistance\n",
+ "I = 20.0 # current\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "#(a)\n",
+ "Vm = math.floor((sqrt_2*V/sqrt_3)*10)/10\n",
+ "Vdc = E+I*R\n",
+ "pi = math.floor(math.pi*1000)/1000\n",
+ "alfa =Vdc*pi/(Vm*3*sqrt_3)\n",
+ "alfa = math.acos(alfa)*(180/math.pi)\n",
+ "alfa = math.ceil(alfa*100)/100\n",
+ "P = (E*I)+(I**2*R)\n",
+ "Is = ((I**2)*120.0/180.0)**(0.5)\n",
+ "pf = P/(sqrt_3*V*Is)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Firing angle = %.2f\u00b0\\nInput power factor = %.3f lagging\"%(alfa,pf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Firing angle = 47.45\u00b0\n",
+ "Input power factor = 0.646 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 336
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.33, Page No.175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-phase semi-converter bridge circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400.0 # input voltage\n",
+ "R = 10.0 # load resistance\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n",
+ "#(a)\n",
+ "alfa = (math.pi)/3 #as load current continuous\n",
+ "Vdc1 = 3*1.7267*Vm*(1+math.cos(alfa))/(2*math.pi)#To match the answer to book's ans\n",
+ "Vdc1 = math.floor(Vdc1*100)/100 \n",
+ "Vmax = 3*1.7267*Vm*(1+math.cos(0))/(2*math.pi)\n",
+ "Vmax = math.floor(Vmax*100)/100\n",
+ "Vdc = Vmax/2\n",
+ "alfa2 = math.acos((Vdc*2*math.pi/(3*sqrt_3*Vm))-1)\n",
+ "#(b)\n",
+ "Idc = Vdc/R\n",
+ "#(c)\n",
+ "Vrms = sqrt_3*Vm*((3.0/(4*math.pi))*(math.pi-alfa2+(math.sin(2*alfa2))/2.0))**(0.5)\n",
+ "Vrms = 345.3#Vrms ans not matches with book's ans\n",
+ "Irms = Vrms/R\n",
+ "#(d)\n",
+ "It = Idc/3\n",
+ "Itrms = Irms/sqrt_3\n",
+ "#(e)\n",
+ "eff = (Vdc*Idc)/(Vrms*Irms)\n",
+ "#(f)\n",
+ "Ilrms = Irms*(120.0/180.0)**(0.5)\n",
+ "VA = Ilrms*V*3/sqrt_3\n",
+ "TUF = (Vdc*Idc)/(VA)\n",
+ "#(g)\n",
+ "APO = Irms**2*R\n",
+ "pf = APO/VA\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Firing angle = %.0f\u00b0\\n(b) Vdc = %.3fV\\n Idc = %.2f A\\n(c) Vrms = %.1f V\\tIrms = %.2f A\"%(alfa2*180/math.pi,Vdc,Idc,Vrms,Irms))\n",
+ "print(\"(d) Average thyristor current = %.2f A\\t RMS thyristor current = %.2f A\"%(It,Itrms))\n",
+ "print(\"(e) rectification efficiency = %.3f or %.1f%%\\n(f) TUF = %.2f\\n(g) Input power factor = %.2f lagging\"%(eff,eff*100,TUF,pf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Firing angle = 90\u00b0\n",
+ "(b) Vdc = 269.225V\n",
+ " Idc = 26.92 A\n",
+ "(c) Vrms = 345.3 V\tIrms = 34.53 A\n",
+ "(d) Average thyristor current = 8.97 A\t RMS thyristor current = 19.94 A\n",
+ "(e) rectification efficiency = 0.608 or 60.8%\n",
+ "(f) TUF = 0.37\n",
+ "(g) Input power factor = 0.61 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.34, Page No.176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-phase fully controlled bridge converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400.0 # input voltage\n",
+ "R = 10.0 # load resistance\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n",
+ "#(a)\n",
+ "alfa = (math.pi)/3 #as load current continuous\n",
+ "Vdc = 3*1.7267*Vm*(math.cos(alfa))/(math.pi)#To match the answer to book's ans\n",
+ "Vdc = math.ceil(Vdc*100)/100 \n",
+ "#(b)\n",
+ "Idc = Vdc/R\n",
+ "#(c)\n",
+ "Vrms = sqrt_3*Vm*(0.5+((3*1.7321*math.cos(2*alfa))/(4*math.pi)))**(0.5)\n",
+ "Vrms = 305.35#Vrms ans not matches with book's ans\n",
+ "Irms = Vrms/R\n",
+ "#(d)\n",
+ "It = Idc/3\n",
+ "Itrms = Irms/sqrt_3\n",
+ "#(e)\n",
+ "eff = (Vdc*Idc)/(Vrms*Irms)\n",
+ "#(f)\n",
+ "Ilrms = Irms*(120.0/180.0)**(0.5)\n",
+ "VA = Ilrms*V*3/sqrt_3\n",
+ "TUF = math.floor(((Vdc*Idc)/(VA))*1000)/1000\n",
+ "#(g)\n",
+ "APO = Irms**2*R\n",
+ "pf = APO/VA\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Vdc = %.2fV\\n(b) Idc = %.2f A\\n(c) Vrms = %.2f V\\tIrms = %.2f A\"%(Vdc,Idc,Vrms,Irms))\n",
+ "print(\"(d) Average thyristor current = %.2f A\\t RMS thyristor current = %.2f A\"%(It,Itrms))\n",
+ "print(\"(e) rectification efficiency = %.3f or %.1f%%\\n(f) TUF = %.3f\\n(g) Input power factor = %.2f lagging\"%(eff,eff*100,TUF,pf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Vdc = 269.23V\n",
+ "(b) Idc = 26.92 A\n",
+ "(c) Vrms = 305.35 V\tIrms = 30.54 A\n",
+ "(d) Average thyristor current = 8.97 A\t RMS thyristor current = 17.63 A\n",
+ "(e) rectification efficiency = 0.777 or 77.7%\n",
+ "(f) TUF = 0.419\n",
+ "(g) Input power factor = 0.54 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.34, Page No.177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical Example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical Example\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.35, Page No.179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical Example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical Example\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.37, Page No. 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Firing angle of converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400.0 # input voltage\n",
+ "E = 300.0 # back emf of the motor\n",
+ "\n",
+ "#Calculations\n",
+ "Vm = math.sqrt(2)*V\n",
+ "alfa = math.acos(E*2*math.pi/(3*math.sqrt(3)*Vm))\n",
+ "alfa = alfa*(180/math.pi)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Firing angle, alfa = %.1f\u00b0\"%alfa)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Firing angle, alfa = 50.1\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.38, Page No.183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Overlap angle\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400.0 # input voltage\n",
+ "f = 50 # input frequency\n",
+ "I = 200.0 # load current\n",
+ "L = 0.2 *10**-3 # Source inductance\n",
+ "alfa1 = 20*math.pi/180 # firing angle for case 1\n",
+ "alfa2 = 30*math.pi/180 # firing angle for case 2\n",
+ "alfa3 = 60*math.pi/180 # firing angle for case 3\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n",
+ "E = 3*2*math.pi*f*L*I/math.pi\n",
+ "Vo = 3*sqrt_3*Vm/math.pi\n",
+ "#(a)\n",
+ "mu1 = math.acos((Vo*math.cos(alfa1)-E)/Vo)-alfa1\n",
+ "mu1 = mu1*180/math.pi\n",
+ "mu1 = math.ceil(mu1*10)/10\n",
+ "#(b)\n",
+ "mu2 = math.acos((Vo*math.cos(alfa2)-E)/Vo)-alfa2\n",
+ "mu2 = mu2*180/math.pi\n",
+ "#(a)\n",
+ "mu3 = math.acos((Vo*math.cos(alfa3)-E)/Vo)-alfa3\n",
+ "mu3 = mu3*180/math.pi\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) for alfa = %.0f\u00b0:\\n\\t mu = %.1f\u00b0\"%(alfa1*180/math.pi,mu1))\n",
+ "print(\"\\n(b) for alfa = %.0f\u00b0:\\n\\t mu = %.2f\u00b0\"%(alfa2*180/math.pi,mu2))\n",
+ "print(\"\\n(c) for alfa = %.0f\u00b0:\\n\\t mu = %.2f\u00b0\"%(alfa3*180/math.pi,mu3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) for alfa = 20\u00b0:\n",
+ "\t mu = 3.5\u00b0\n",
+ "\n",
+ "(b) for alfa = 30\u00b0:\n",
+ "\t mu = 2.46\u00b0\n",
+ "\n",
+ "(c) for alfa = 60\u00b0:\n",
+ "\t mu = 1.46\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.39, Page No.188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# peak circulating current and peak current of converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # Input voltage\n",
+ "f = 50 # frequency\n",
+ "R = 15 # load resistance\n",
+ "a1 = 60*math.pi/180 # firing angle 1\n",
+ "a2 = 120*math.pi/180 # firing angle 2\n",
+ "L = 50*10**-3 # inductance\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vm = math.sqrt(2)*V\n",
+ "w = 2*math.pi*f\n",
+ "wl = w*L\n",
+ "wt = 2*math.pi\n",
+ "ir = 2*Vm*(math.cos(wt)-math.cos(a1))/wl\n",
+ "ir = math.floor(ir*10)/10\n",
+ "Ip = Vm/R\n",
+ "I = ir+Ip\n",
+ "\n",
+ "#Result\n",
+ "print(\"Peak circulating current = %.1f A\\nPeak current of converter 1 = %.2f A\"%(ir,I))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak circulating current = 20.7 A\n",
+ "Peak current of converter 1 = 42.38 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.40, Page No. 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# single phase circulating current dualconverter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "f = 50 # frequency\n",
+ "a1 = 30*math.pi/180 # firing angle 1\n",
+ "a2 = 150*math.pi/180 # firing angle 2 \n",
+ "R = 10 # Load resistance\n",
+ "I = 10.2 # Peak current\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "Vm = math.sqrt(2)*V\n",
+ "w = 2*math.pi*f\n",
+ "wt = 2*math.pi\n",
+ "L = 2*Vm*(math.cos(wt)-math.cos(a1))/(w*I)\n",
+ "#(b)\n",
+ "Ip = Vm/R\n",
+ "I1 = math.floor((I+Ip)*100)/100\n",
+ "\n",
+ "#Result\n",
+ "print(\"L = %.4f H\\npeak current of converter 1 = %.2f A\"%(L,I1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L = 0.0272 H\n",
+ "peak current of converter 1 = 42.72 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.41, Page No.188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# single phase circulating current dualconverter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "f = 50 # frequency\n",
+ "a1 = 45*math.pi/180 # firing angle 1\n",
+ "a2 = 135*math.pi/180 # firing angle 2 \n",
+ "I = 39.7 # Peak current of converter\n",
+ "Ic = 11.5 # peak circulating current \n",
+ "#Calculation\n",
+ "#(a)\n",
+ "Vm = math.sqrt(2)*V\n",
+ "Vm = math.floor(Vm*10)/10\n",
+ "w = 2*math.pi*f\n",
+ "wt = 2*math.pi\n",
+ "x = math.floor(math.cos(a1)*1000)/1000\n",
+ "L = 2*Vm*(math.cos(wt)-x)/(w*Ic)\n",
+ "#(b)\n",
+ "Ip = I-Ic\n",
+ "R = Vm/Ip\n",
+ "\n",
+ "#Result\n",
+ "print(\"L = %.4f H\\nR = %.3f Ohm\"%(L,R))\n",
+ "#answer for L is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L = 0.0527 H\n",
+ "R = 11.532 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.42, Page No. 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-phase dual converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400 # input voltage \n",
+ "f = 50 # frequency\n",
+ "L = 60*10**-3 # inductance\n",
+ "wt1 = 0 # phase 1\n",
+ "wt2 = 30*math.pi/180 # phase 2\n",
+ "wt3 = 90*math.pi/180 # phase 3 \n",
+ "alfa = 0 # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n",
+ "wl = 2*math.pi*f*L\n",
+ "ir1 = 3*Vm*(math.sin(wt1-wt2)-math.sin(alfa))/wl\n",
+ "ir2 = 3*Vm*(math.sin(wt2-wt2)-math.sin(alfa))/wl\n",
+ "ir3 = 3*Vm*(math.sin(wt3-wt2)-math.sin(alfa))/wl\n",
+ "ir4 = 3*Vm*(math.sin(wt3)-math.sin(alfa))/wl\n",
+ "\n",
+ "#Result\n",
+ "print(\"For wt = %.0f anf alfa = %d, ir = %.3f A\"%(wt1*180/math.pi,alfa,ir1))\n",
+ "print(\"For wt = %.0f anf alfa = %d, ir = %.0f A\"%(wt2*180/math.pi,alfa,ir2))\n",
+ "print(\"For wt = %.0f anf alfa = %d, ir = %.0f A\"%(wt3*180/math.pi,alfa,ir3))\n",
+ "print(\"Peak value of circulaing current, ir = %.2f A\"%(ir4))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For wt = 0 anf alfa = 0, ir = -25.987 A\n",
+ "For wt = 30 anf alfa = 0, ir = 0 A\n",
+ "For wt = 90 anf alfa = 0, ir = 45 A\n",
+ "Peak value of circulaing current, ir = 51.97 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 3.43, Page No.191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-phase circulating current dual converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400.0 #input voltage\n",
+ "f = 50.0 # frequency\n",
+ "I = 42.0 # peak value of circulating current\n",
+ "alfa = 0 # firing angle\n",
+ "a1 = 30*math.pi/180 #\n",
+ "wt = 120*math.pi/180 # wt for max current\n",
+ "#Calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3 =math.floor(math.sqrt(3)*1000)/1000\n",
+ "Vm = math.ceil((V*sqrt_2/sqrt_3)*100)/100\n",
+ "w = 2*math.pi*f\n",
+ "L = 3*Vm*(math.sin(wt-a1)-math.sin(alfa))/(w*I)\n",
+ "\n",
+ "#Result\n",
+ "print(\"L = %.3f H\"%L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L = 0.074 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_4_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_4_3.ipynb new file mode 100755 index 00000000..c5ad12df --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_4_3.ipynb @@ -0,0 +1,983 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: Inverters"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.1, Page No.205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Maximum output frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R = 80.0 # serries inverter resistance\n",
+ "L = 8*10**-3 # serries inverter inductance\n",
+ "C = 1.2*10**-6 # serries inverter capacitance\n",
+ "\n",
+ "#Calculations\n",
+ "X =(4*L)/C\n",
+ "f = math.sqrt((1/(L*C))-((R**2)/(4*L**2)))\n",
+ "f = math.ceil(f)\n",
+ "#Result\n",
+ "print(\"R^2 = %.0f\\n4L/C = %.0f\"%(R*R,X))\n",
+ "print(\"Since (R^2)<(4L/C), circuit is underdamped and it will work as a series inverter.\")\n",
+ "print(\"\\nMaximum frequency = %.4f*10^4 rad/sec or %.2f Hz\"%(f/10000,f/(2*math.pi)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R^2 = 6400\n",
+ "4L/C = 26667\n",
+ "Since (R^2)<(4L/C), circuit is underdamped and it will work as a series inverter.\n",
+ "\n",
+ "Maximum frequency = 0.8898*10^4 rad/sec or 1416.16 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.2, Page No. 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# output frequency(refering example 4.1)\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R = 80.0 # serries inverter resistance\n",
+ "L = 8*10**-3 # serries inverter inductance\n",
+ "C = 1.2*10**-6 # serries inverter capacitance\n",
+ "t = 14*10**-6 # turn off time of thyristor\n",
+ "Fmax = 1416.16 # frequency as calculated in ex 4.1\n",
+ "\n",
+ "#Calculation\n",
+ "T =1/Fmax\n",
+ "T = math.floor(T*10**6)/10**6\n",
+ "k = 1/0.000734\n",
+ "f =1/(T+2*t)\n",
+ "\n",
+ "#Result\n",
+ "print(\"frequency = %.1f Hz\"%f)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency = 1362.4 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.3, Page No.205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# circuit turn off time and max frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "L = 50.0*10**-6 # Inductance\n",
+ "C = 6.0*10**-6 # capacitance\n",
+ "R = 4.0 # Resistance\n",
+ "V = 200.0 # input voltage\n",
+ "f = 6000.0 # output frequency\n",
+ "t = 6.0*10**-6 # SCR turn off time\n",
+ "\n",
+ "#calculations\n",
+ "x = 4*L/C\n",
+ "wr = math.sqrt((1/(L*C))-((R**2)/(4*L**2)))\n",
+ "wr = math.floor(wr*10)/10\n",
+ "fr = wr/(2*math.pi)\n",
+ "#(a)\n",
+ "x1 = math.pi/wr\n",
+ "x1= math.floor(x1*10**7)/10**7\n",
+ "toff = (math.pi/(2*math.pi*f))-(x1)\n",
+ "#(b)\n",
+ "fmax = 1/(2*((x1)+t))\n",
+ "\n",
+ "#result\n",
+ "print(\"(a) Available circuit turn off time = %.2f micro-sec\\n(b) fmax = %.1f Hz\"%(toff*10**6,fmax))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Available circuit turn off time = 7.93 micro-sec\n",
+ "(b) fmax = 6142.5 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.4, Page No. 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# thyristor ratings\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 40.0 # input DC voltage\n",
+ "Vo = 230.0 # output voltage\n",
+ "f = 50.0 # output frequency\n",
+ "Il = 2.0 # peak load current\n",
+ "t = 50.0*10**-6 # turn off time\n",
+ "\n",
+ "#calculations\n",
+ "Il_r = Vo*2/V\n",
+ "#after solving (i),(ii)\n",
+ "C=((t*3/math.pi)**2)*(((2*Vo)/(V**2))**2)\n",
+ "C = math.sqrt(C)\n",
+ "C = math.ceil(C*10**8)/10**8\n",
+ "L = ((t*3/math.pi)**2)/C\n",
+ "# OR\n",
+ "#L= C/(((2*Vo)/(V**2))**2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"L = %.2f *10^-6 H\\nC = %.2f *10^-6 F\"%(L*10**6,C*10**6))\n",
+ "print(\"\\nFinal SCR rating is 100V,20A, turn off time 50 micro-sec\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L = 166.04 *10^-6 H\n",
+ "C = 13.73 *10^-6 F\n",
+ "\n",
+ "Final SCR rating is 100V,20A, turn off time 50 micro-sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.5, Page No. 213"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Single phase half bridge inverter\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "R = 3.0 # load resistance\n",
+ "V = 30.0 # input DC voltage\n",
+ "\n",
+ "#Calculations\n",
+ "#(a) for n=1;\n",
+ "V1rms = 2*V/(math.sqrt(2)*math.pi)\n",
+ "#(b)\n",
+ "Vl = V/2\n",
+ "P = (Vl**2)/R\n",
+ "#(c)\n",
+ "Ip = Vl/R\n",
+ "#(d)\n",
+ "Iavg = Ip/2\n",
+ "#(e)\n",
+ "Vr = 2*Vl\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) RMS value V1 = %.1f V\\n(b) Output power = %.0f W\\n(c) Peak current in each thyristor = %.0f A\"%(V1rms,P,Ip))\n",
+ "print(\"(d)Each thyristor conducts for 50%% of time,\\n Average current = %.1f A\"%(Iavg))\n",
+ "print(\"(e) Peak reverse blocking voltage = %.0f V\"%Vr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) RMS value V1 = 13.5 V\n",
+ "(b) Output power = 75 W\n",
+ "(c) Peak current in each thyristor = 5 A\n",
+ "(d)Each thyristor conducts for 50% of time,\n",
+ " Average current = 2.5 A\n",
+ "(e) Peak reverse blocking voltage = 30 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.6, Page No. 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# full bridge inverter\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "R = 3.0 # load resistance\n",
+ "V = 30.0 # input DC voltage\n",
+ "\n",
+ "#Calculations\n",
+ "#(a) for n=1;\n",
+ "V1rms = 4*V/(math.sqrt(2)*math.pi)\n",
+ "#(b)\n",
+ "Vl = V\n",
+ "P = (Vl**2)/R\n",
+ "#(c)\n",
+ "Ip = Vl/R\n",
+ "#(d)\n",
+ "Iavg = Ip/2\n",
+ "#(e)\n",
+ "Vr = Vl\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) RMS value V1 = %.1f V\\n(b) Output power = %.0f W\\n(c) Peak current in each thyristor = %.0f A\"%(V1rms,P,Ip))\n",
+ "print(\"(d)Each thyristor conducts for 50%% of time,\\n Average current = %.1f A\"%(Iavg))\n",
+ "print(\"(e) Peak reverse blocking voltage = %.0f V\"%Vr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) RMS value V1 = 27.0 V\n",
+ "(b) Output power = 300 W\n",
+ "(c) Peak current in each thyristor = 10 A\n",
+ "(d)Each thyristor conducts for 50% of time,\n",
+ " Average current = 5.0 A\n",
+ "(e) Peak reverse blocking voltage = 30 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.7, Page No. 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Full bridge inverter circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 200.0 # input voltage\n",
+ "R = 10.0 # resistance\n",
+ "L = 20.0*10**-3 # Inductance\n",
+ "C = 100.0*10**-6 # capacitance\n",
+ "f = 50.0 # inverter frequency\n",
+ "\n",
+ "#(a)\n",
+ "Z1_r = R\n",
+ "Z1_i = (2*math.pi*f*L)-(1/(2*math.pi*f*C))\n",
+ "Z1_i = math.floor(Z1_i*100)/100\n",
+ "Z1_mag = math.sqrt((Z1_r**2) + (Z1_i**2)) \n",
+ "Z1_angle =math.atan(Z1_i/Z1_r)*(180/math.pi) \n",
+ "Z1_angle = math.floor(Z1_angle*100)/100\n",
+ "\n",
+ "Z3_r = R\n",
+ "Z3_i = (3*2*math.pi*f*L)-(1/(3*2*math.pi*f*C))\n",
+ "Z3_i = math.floor(Z3_i*100)/100\n",
+ "Z3_mag = math.sqrt((Z3_r**2) + (Z3_i**2)) \n",
+ "Z3_angle =math.atan(Z3_i/Z3_r)*(180/math.pi) \n",
+ "Z3_angle = math.floor(Z3_angle*100)/100\n",
+ "\n",
+ "Z5_r = R\n",
+ "Z5_i = (5*2*math.pi*f*L)-(1/(5*2*math.pi*f*C))\n",
+ "Z5_i = math.floor(Z5_i*100)/100\n",
+ "Z5_mag = math.sqrt((Z5_r**2) + (Z5_i**2)) \n",
+ "Z5_angle =math.atan(Z5_i/Z5_r)*(180/math.pi) \n",
+ "#Z5_angle = math.floor(Z5_angle*100)/100\n",
+ "\n",
+ "Z7_r = R\n",
+ "Z7_i = (7*2*math.pi*f*L)-(1/(7*2*math.pi*f*C))\n",
+ "Z7_i = math.floor(Z7_i*100)/100\n",
+ "Z7_mag = math.sqrt((Z7_r**2) + (Z7_i**2)) \n",
+ "Z7_angle =math.atan(Z7_i/Z7_r)*(180/math.pi) \n",
+ "Z7_angle = math.floor(Z7_angle*100)/100\n",
+ "\n",
+ "Z9_r = R\n",
+ "Z9_i = (9*2*math.pi*f*L)-(1/(9*2*math.pi*f*C))\n",
+ "Z9_i = math.floor(Z9_i*100)/100\n",
+ "Z9_mag = math.sqrt((Z9_r**2) + (Z9_i**2)) \n",
+ "Z9_angle =math.atan(Z9_i/Z9_r)*(180/math.pi) \n",
+ "Z9_angle = math.floor(Z9_angle*100)/100\n",
+ "\n",
+ "x = 4*V/(math.pi)\n",
+ "w = 2*math.pi*f\n",
+ "\n",
+ "#(b)\n",
+ "I1 = math.floor(x*100/Z1_mag)/100\n",
+ "I3 = math.floor(x*100/(3*Z3_mag))/100\n",
+ "I5 = math.ceil(x*100/(5*Z5_mag))/100\n",
+ "I7 = math.ceil(x*1000/(7*Z7_mag))/1000\n",
+ "I9 = math.ceil(x*1000/(9*Z9_mag))/1000\n",
+ "If = I1/math.sqrt(2)\n",
+ "If = math.floor(If*100)/100\n",
+ "#(c)\n",
+ "Ip =math.sqrt(I1**2+I3**2+I5**2+I7**2+I9**2)\n",
+ "#(d)\n",
+ "Ihc = math.sqrt(Ip**2- I1**2)/math.sqrt(2)\n",
+ "Thd = math.sqrt(Ip**2- I1**2)/I1\n",
+ "#(e)\n",
+ "Ilrms = Ip/math.sqrt(2)\n",
+ "P = R*Ilrms**2\n",
+ "Pf = R*If**2\n",
+ "#(f)\n",
+ "Iavg = P/V\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nZ1 = %.3f < %.2f\u00b0\"%(Z1_mag,Z1_angle))\n",
+ "print(\"Z3 = %.2f < %.2f\u00b0\"%(Z3_mag,Z3_angle))\n",
+ "print(\"Z5 = %.2f < %.2f\u00b0\"%(Z5_mag,Z5_angle))\n",
+ "print(\"Z7 = %.2f < %.2f\u00b0\"%(Z7_mag,Z7_angle))\n",
+ "print(\"Z9 = %.2f < %.2f\u00b0\"%(Z9_mag,Z9_angle))\n",
+ "print(\"Vl = %.2fsin(%.2ft)+%.2fsin(3*%.2ft)+%.2fsin(5*%.2ft)+%.2fsin(7*%.2ft)+%.2fsin(9*%.2ft)\"%(x,w,x/3,w,x/5,w,x/7,w,x/9,w))\n",
+ "print(\"Il = %.2fsin(%.2ft%.2f\u00b0)+%.2fsin(3*%.2ft-%.2f\u00b0)+%.2fsin(5*%.2ft-%.2f\u00b0)+%.3fsin(7*%.2ft-%.2f\u00b0)+%.3fsin(9*%.2ft-%.2f\u00b0)\"%(I1,w,Z1_angle,I3,w,Z3_angle,I5,w,Z5_angle,I7,w,Z7_angle,I9,w,Z9_angle))\n",
+ "\n",
+ "print(\"\\n(b) RMS load current at fundamental frequency = %.2f A\"%If)\n",
+ "print(\"\\n(c) Peak value of load current = %.2f A\"%Ip)\n",
+ "print(\"\\n(d) RMS harmonic current = %.3f A\\n Total harmonic distortion = %.3f or %.1f%%\"%(Ihc,Thd,Thd*100))\n",
+ "print(\"\\n(e) RMS value of load current = %.3f A\\n Total output power = %.1f W\\n Fundamental component of power = %.3f W\"%(Ilrms,P,Pf))\n",
+ "print(\"\\n(f) Average input current = %.4f A\\n Peak thyristor current = %.2f A\"%(Iavg,Ip))\n",
+ "#Some values are accurate only upto 1 or 2 decimal places"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Z1 = 27.437 < -68.63\u00b0\n",
+ "Z3 = 12.95 < 39.45\u00b0\n",
+ "Z5 = 26.96 < 68.23\u00b0\n",
+ "Z7 = 40.68 < 75.76\u00b0\n",
+ "Z9 = 53.94 < 79.31\u00b0\n",
+ "Vl = 254.65sin(314.16t)+84.88sin(3*314.16t)+50.93sin(5*314.16t)+36.38sin(7*314.16t)+28.29sin(9*314.16t)\n",
+ "Il = 9.28sin(314.16t-68.63\u00b0)+6.55sin(3*314.16t-39.45\u00b0)+1.89sin(5*314.16t-68.23\u00b0)+0.895sin(7*314.16t-75.76\u00b0)+0.525sin(9*314.16t-79.31\u00b0)\n",
+ "\n",
+ "(b) RMS load current at fundamental frequency = 6.56 A\n",
+ "\n",
+ "(c) Peak value of load current = 11.56 A\n",
+ "\n",
+ "(d) RMS harmonic current = 4.876 A\n",
+ " Total harmonic distortion = 0.743 or 74.3%\n",
+ "\n",
+ "(e) RMS value of load current = 8.175 A\n",
+ " Total output power = 668.3 W\n",
+ " Fundamental component of power = 430.336 W\n",
+ "\n",
+ "(f) Average input current = 3.3417 A\n",
+ " Peak thyristor current = 11.56 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.8, Page No. 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Value of C for proper load communication\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "R = 2 # resistance\n",
+ "Xl = 10 # inductive reactance\n",
+ "f = 4*10**3 # operating frequency\n",
+ "T = 12*10**-6 # turn off time of thyristor\n",
+ "tol = 1.5 # 50% tolerance in circuit turn off time\n",
+ "\n",
+ "#Calculations\n",
+ "T = T*tol\n",
+ "theta = 2*math.pi*f*T #radians\n",
+ "#theta = theta*180/math.pi\n",
+ "Xc = 2*math.tan(theta)+Xl\n",
+ "C = 1/(Xc*2*math.pi*f)\n",
+ "\n",
+ "#Result\n",
+ "print(\"C = %.2f*10^-6 F\"%(C*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C = 3.63*10^-6 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.9, Page No. 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Full bridge inverter\n",
+ "\n",
+ "import math\n",
+ "#variable declaratrion\n",
+ "R = 10 # resistance\n",
+ "L = 50*10**-3 # inductance\n",
+ "f = 50 # frequency\n",
+ "V = 100 # input voltage\n",
+ "\n",
+ "#Calculation \n",
+ "\n",
+ "#(a)\n",
+ "Z1_r = R\n",
+ "Z1_i = (2*math.pi*f*L)\n",
+ "Z1_i = math.floor(Z1_i*100)/100\n",
+ "Z1_mag = math.sqrt((Z1_r**2) + (Z1_i**2)) \n",
+ "Z1_mag = math.ceil(Z1_mag*100)/100\n",
+ "Z1_angle =math.atan(Z1_i/Z1_r)*(180/math.pi) \n",
+ "Z1_angle = math.floor(Z1_angle*100)/100\n",
+ "\n",
+ "Z3_r = R\n",
+ "Z3_i = (3*2*math.pi*f*L)\n",
+ "Z3_i = math.floor(Z3_i*100)/100\n",
+ "Z3_mag = math.sqrt((Z3_r**2) + (Z3_i**2)) \n",
+ "Z3_angle =math.atan(Z3_i/Z3_r)*(180/math.pi) \n",
+ "Z3_angle = math.floor(Z3_angle*100)/100\n",
+ "\n",
+ "Z5_r = R\n",
+ "Z5_i = (5*2*math.pi*f*L)\n",
+ "Z5_i = math.floor(Z5_i*100)/100\n",
+ "Z5_mag = math.sqrt((Z5_r**2) + (Z5_i**2)) \n",
+ "Z5_mag = math.ceil(Z5_mag*100)/100\n",
+ "Z5_angle =math.atan(Z5_i/Z5_r)*(180/math.pi) \n",
+ "Z5_angle = math.ceil(Z5_angle*100)/100\n",
+ "\n",
+ "Z7_r = R\n",
+ "Z7_i = (7*2*math.pi*f*L)\n",
+ "Z7_i = math.floor(Z7_i*100)/100\n",
+ "Z7_mag = math.sqrt((Z7_r**2) + (Z7_i**2)) \n",
+ "Z7_mag = math.ceil(Z7_mag*100)/100\n",
+ "Z7_angle =math.atan(Z7_i/Z7_r)*(180/math.pi) \n",
+ "Z7_angle = math.floor(Z7_angle*100)/100\n",
+ "\n",
+ "x = 4*V/(math.pi)\n",
+ "w = 2*math.pi*f\n",
+ "#(b)\n",
+ "I1 = math.ceil(x*100/Z1_mag)/100\n",
+ "I3 = math.floor(x*1000/(3*Z3_mag))/1000\n",
+ "I5 = math.floor(x*100/(5*Z5_mag))/100\n",
+ "I7 = math.ceil(x*1000/(7*Z7_mag))/1000\n",
+ "\n",
+ "Ip =math.sqrt(I1**2+I3**2+I5**2+I7**2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vl = %.2fsin(%.2ft)+%.2fsin(%.2ft)+%.2fsin(%.2ft)+%.2fsin(%.2ft)\"%(x,w,x/3,3*w,x/5,5*w,x/7,7*w))\n",
+ "\n",
+ "print(\"\\nLoad impedances for various harmonics are:\")\n",
+ "print(\"Z1 = %.2f < %.1f\u00b0\"%(Z1_mag,Z1_angle))\n",
+ "print(\"Z3 = %.2f < %.0f\u00b0\"%(Z3_mag,Z3_angle))\n",
+ "print(\"Z5 = %.2f < %.2f\u00b0\"%(Z5_mag,Z5_angle))\n",
+ "print(\"Z7 = %.2f < %.2f\u00b0\"%(Z7_mag,Z7_angle))\n",
+ "\n",
+ "print(\"\\nIl = %.2fsin(%.2ft-%.1f\u00b0)+%.3fsin(%.2ft-%.0f\u00b0)+%.2fsin(%.2ft-%.2f\u00b0)+%.3fsin(%.2ft-%.1f\u00b0)\"%(I1,w,Z1_angle,I3,3*w,Z3_angle,I5,5*w,Z5_angle,I7,7*w,Z7_angle))\n",
+ "\n",
+ "print(\"\\nPeak load current = %.2f A\"%Ip)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vl = 127.32sin(314.16t)+42.44sin(942.48t)+25.46sin(1570.80t)+18.19sin(2199.11t)\n",
+ "\n",
+ "Load impedances for various harmonics are:\n",
+ "Z1 = 18.62 < 57.5\u00b0\n",
+ "Z3 = 48.17 < 78\u00b0\n",
+ "Z5 = 79.17 < 82.75\u00b0\n",
+ "Z7 = 110.41 < 84.80\u00b0\n",
+ "\n",
+ "Il = 6.84sin(314.16t-57.5\u00b0)+0.881sin(942.48t-78\u00b0)+0.32sin(1570.80t-82.75\u00b0)+0.165sin(2199.11t-84.8\u00b0)\n",
+ "\n",
+ "Peak load current = 6.91 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 117
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.10, Page No. 217"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# single phase Full bridge inverter\n",
+ "\n",
+ "import math\n",
+ "#variable declaratrion\n",
+ "R = 20 # resistance\n",
+ "L = 10*10**-3 # inductance\n",
+ "f = 50.0 # frequency\n",
+ "V = 100 # input voltage\n",
+ "\n",
+ "#Calculation \n",
+ "#(a)\n",
+ "Vrms = V\n",
+ "#(b)\n",
+ "Z1_r = R\n",
+ "Z1_i = (2*math.pi*f*L)\n",
+ "Z1_i = math.floor(Z1_i*100)/100\n",
+ "Z1_mag = math.sqrt((Z1_r**2) + (Z1_i**2)) \n",
+ "Z1_mag = math.floor(Z1_mag*100)/100\n",
+ "Z1_angle =math.atan(Z1_i/Z1_r)*(180/math.pi) \n",
+ "Z1_angle = math.floor(Z1_angle*100)/100\n",
+ "\n",
+ "Z3_r = R\n",
+ "Z3_i = (3*2*math.pi*f*L)\n",
+ "Z3_i = math.floor(Z3_i*100)/100\n",
+ "Z3_mag = math.sqrt((Z3_r**2) + (Z3_i**2)) \n",
+ "Z3_angle =math.atan(Z3_i/Z3_r)*(180/math.pi) \n",
+ "Z3_angle = math.floor(Z3_angle*100)/100\n",
+ "\n",
+ "Z5_r = R\n",
+ "Z5_i = (5*2*math.pi*f*L)\n",
+ "Z5_i = math.floor(Z5_i*100)/100\n",
+ "Z5_mag = math.sqrt((Z5_r**2) + (Z5_i**2)) \n",
+ "Z5_mag = math.ceil(Z5_mag*100)/100\n",
+ "Z5_angle =math.atan(Z5_i/Z5_r)*(180/math.pi) \n",
+ "Z5_angle = math.floor(Z5_angle*100)/100\n",
+ "\n",
+ "Z7_r = R\n",
+ "Z7_i = (7*2*math.pi*f*L)\n",
+ "Z7_i = math.floor(Z7_i*100)/100\n",
+ "Z7_mag = math.sqrt((Z7_r**2) + (Z7_i**2)) \n",
+ "Z7_mag = math.floor(Z7_mag*100)/100\n",
+ "Z7_angle =math.atan(Z7_i/Z7_r)*(180/math.pi) \n",
+ "Z7_angle = math.floor(Z7_angle*100)/100\n",
+ "\n",
+ "x = 4*V/(math.pi)\n",
+ "w = 2*math.pi*f\n",
+ "\n",
+ "I1 = math.floor(x*100/Z1_mag)/100\n",
+ "I3 = math.floor(x*1000/(3*Z3_mag))/1000\n",
+ "I5 = math.floor(x*1000/(5*Z5_mag))/1000\n",
+ "I7 = math.floor(x*1000/(7*Z7_mag))/1000\n",
+ "\n",
+ "#(c)\n",
+ "Ip =math.sqrt(I1**2+I3**2+I5**2+I7**2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) RMS load voltage %d V\"%Vrms)\n",
+ "print(\"\\n(b)\\n\\nVl = %.2fsin(%.2ft)+%.2fsin(%.2ft)+%.2fsin(%.2ft)+%.2fsin(%.2ft)\"%(x,w,x/3,3*w,x/5,5*w,x/7,7*w))\n",
+ "\n",
+ "print(\"\\nLoad impedances for various harmonics are:\")\n",
+ "print(\"Z1 = %.2f < %.2f\u00b0\"%(Z1_mag,Z1_angle))\n",
+ "print(\"Z3 = %.1f < %.2f\u00b0\"%(Z3_mag,Z3_angle))\n",
+ "print(\"Z5 = %.2f < %.2f\u00b0\"%(Z5_mag,Z5_angle))\n",
+ "print(\"Z7 = %.2f < %.2f\u00b0\"%(Z7_mag,Z7_angle))\n",
+ "\n",
+ "print(\"\\nIl = %.2fsin(%.2ft-%.2f\u00b0)+%.2fsin(%.2ft-%.2f\u00b0)+%.3fsin(%.2ft-%.2f\u00b0)+%.3fsin(%.2ft-%.2f\u00b0)\"%(I1,w,Z1_angle,I3,3*w,Z3_angle,I5,5*w,Z5_angle,I7,7*w,Z7_angle))\n",
+ "print(\"\\nRMS value of fundamental component of load current = %.3f A\"%(I1/math.sqrt(2)))\n",
+ "print(\"\\n(c) Peak load current = %.2f A\"%Ip)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) RMS load voltage 100 V\n",
+ "\n",
+ "(b)\n",
+ "\n",
+ "Vl = 127.32sin(314.16t)+42.44sin(942.48t)+25.46sin(1570.80t)+18.19sin(2199.11t)\n",
+ "\n",
+ "Load impedances for various harmonics are:\n",
+ "Z1 = 20.24 < 8.92\u00b0\n",
+ "Z3 = 22.1 < 25.22\u00b0\n",
+ "Z5 = 25.43 < 38.13\u00b0\n",
+ "Z7 = 29.72 < 47.71\u00b0\n",
+ "\n",
+ "Il = 6.29sin(314.16t-8.92\u00b0)+1.92sin(942.48t-25.22\u00b0)+1.001sin(1570.80t-38.13\u00b0)+0.612sin(2199.11t-47.71\u00b0)\n",
+ "\n",
+ "RMS value of fundamental component of load current = 4.448 A\n",
+ "\n",
+ "(c) Peak load current = 6.68 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 152
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.11, Page No.229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-phase bridge inverter with 120\u00b0 mode of operation\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400.0 # supply voltage\n",
+ "R = 10.0 # per phase resistor\n",
+ "\n",
+ "#Calculations\n",
+ "Ip = V/(2*R)\n",
+ "Irms = math.sqrt(((2*R)**2)*(2.0/3.0))\n",
+ "P = Irms**2*R*3\n",
+ "Iavg = 2*R/3\n",
+ "Itrms = math.sqrt((2*R)**2/3)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Peak value of load current = %d A\\nRMS load current = %.2f A\\nPower output = %.0f W\"%(Ip,Irms,P))\n",
+ "print(\"Average thyristor current = %.2f A\\nRMS value of thyristor current = %.2f A\"%(Iavg,Itrms))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak value of load current = 20 A\n",
+ "RMS load current = 16.33 A\n",
+ "Power output = 8000 W\n",
+ "Average thyristor current = 6.67 A\n",
+ "RMS value of thyristor current = 11.55 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 156
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.12, Page No. 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-phase bridge inverter with 180\u00b0 mode of operation\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 400.0 # supply voltage\n",
+ "R = 10.0 # per phase resistor\n",
+ "\n",
+ "#Calculations\n",
+ "Rl = 1.5*R\n",
+ "i1 = V/Rl\n",
+ "Irms = math.sqrt((1/(2*math.pi))*(((i1**2*(2*math.pi/3)))+((i1/2)**2*((2*math.pi)-(2*math.pi/3)))))\n",
+ "P =Irms**2*R*3\n",
+ "Iavg = ((i1*math.pi/3)+(i1*math.pi/3))/(2*math.pi)\n",
+ "Itrms = math.sqrt(((i1**2*math.pi/3)+((i1/2)**2*2*math.pi/3))/(2*math.pi))\n",
+ "\n",
+ "#Result\n",
+ "print(\"RMS load current = %.3f A\\nPower output = %.2f A\\nPeak thyristor current = %.2f A\"%(Irms,P,i1))\n",
+ "print(\"Average current of thyristor = %.2f A\\nRMS current of thyristor = %.2f A\"%(Iavg,Itrms))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS load current = 18.856 A\n",
+ "Power output = 10666.67 A\n",
+ "Peak thyristor current = 26.67 A\n",
+ "Average current of thyristor = 8.89 A\n",
+ "RMS current of thyristor = 13.33 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 164
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.13, Page No.230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# RMS value of load current and RMS value of thyristor current\n",
+ "\n",
+ "import math\n",
+ "#variaable declaration\n",
+ "V = 450.0 # supply voltage\n",
+ "R = 10.0 # per phase load resistance\n",
+ "mode = 180 # conduction mode\n",
+ "\n",
+ "#calculation\n",
+ "Rl = 1.5*R\n",
+ "i1 = V/Rl\n",
+ "#(a)\n",
+ "Irms = math.sqrt((1/(2*math.pi))*(((i1**2*(2*math.pi/3)))+((i1/2)**2*((2*math.pi)-(2*math.pi/3)))))\n",
+ "Ip = i1\n",
+ "Itrms = math.sqrt((1/(2*math.pi))*(((i1**2*(math.pi/3)))+((i1/2)**2*((math.pi)-(math.pi/3)))))\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) RMS load current = %.2f A\\n(b) Peak current of thyristor = %.0f A\\n(c) RMS current of thyristor = %.0f A\"%(Irms,Ip,Itrms))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) RMS load current = 21.21 A\n",
+ "(b) Peak current of thyristor = 30 A\n",
+ "(c) RMS current of thyristor = 15 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 167
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.14, Page No. 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase full bridge inverter\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 200.0 # input voltage\n",
+ "w = 30.0 # width of each pulse\n",
+ "n = 5.0 # no of pulses each cycle\n",
+ "i =1.1 # factor by whic input is to be increased\n",
+ "w1= 33.0 # maximum width of pulse\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Vl = V*math.sqrt(n*w/180.0)\n",
+ "Vl = math.floor(Vl*100)/100\n",
+ "Vl1 = 182.52 #value used in the book for calculations\n",
+ "#(b)\n",
+ "Vi = V*i\n",
+ "sig=(180*(Vl1/Vi)**2)/n\n",
+ "#(c)\n",
+ "V = Vl1/math.sqrt(n*w1/180.0)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Vl = %.2f V\\n(b) Pulse-width = %.2f\u00b0\\n(c) V = %.2f V\"%(Vl,sig,V))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Vl = 182.57 V\n",
+ "(b) Pulse-width = 24.78\u00b0\n",
+ "(c) V = 190.64 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 186
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.15, Page No.234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase full bridge inverter\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 200.0 #input voltage\n",
+ "w = 120.0 # width of signal\n",
+ "\n",
+ "#Calculations\n",
+ "Vl = V*math.sqrt(w/180)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vl = %.1f V\"%Vl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vl = 163.3 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 190
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 4.16, Page No. 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Inverter controlled by sinusoidal pulse-width modulation\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "V = 150.0 # input DC voltage\n",
+ "w1 = 20.0 # reference signal is more than control signal from 20\u00b0 to 40\u00b0\n",
+ "w2 = 60.0 # reference signal is more than control signal from 60\u00b0 to 120\u00b0\n",
+ "w3 = 20.0 # reference signal is more than control signal from 140\u00b0 to 160\u00b0\n",
+ "\n",
+ "#Calculations\n",
+ "Vl = V*math.sqrt((w1/180)+(w2/180)+(w3/180))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vl = %.1f V\"%Vl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vl = 111.8 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 192
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_5_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_5_3.ipynb new file mode 100755 index 00000000..eed0454a --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_5_3.ipynb @@ -0,0 +1,1095 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: Choppers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.1, Page No. 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# chopper parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vi = 200.0 # input voltage\n",
+ "Vo = 150.0 # output voltage\n",
+ "R = 10.0 # resistance\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "alfa = Vo/Vi\n",
+ "#(b)\n",
+ "Iavg = Vo/R\n",
+ "Irms = math.sqrt(alfa)*Vi/R\n",
+ "#(c)\n",
+ "Irms_t = Irms\n",
+ "#(d)\n",
+ "Iavg_i = Iavg\n",
+ "#(e)\n",
+ "Reff = R/alfa\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Alfa = %.2f \"%alfa)\n",
+ "print(\"(b) Average load current = %.0f A\\n RMS load current = %.2f A\"%(Iavg,Irms))\n",
+ "print(\"(c) RMS thyristor current = %.2f A\"%Irms_t)\n",
+ "print(\"(d) Average input current = %.0f A\"%Iavg_i)\n",
+ "print(\"(e) Effective input resistance = %.3f ohm\"%Reff)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Alfa = 0.75 \n",
+ "(b) Average load current = 15 A\n",
+ " RMS load current = 17.32 A\n",
+ "(c) RMS thyristor current = 17.32 A\n",
+ "(d) Average input current = 15 A\n",
+ "(e) Effective input resistance = 13.333 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# periods of conduction and blocking in each cycle\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vi = 230.0 # input voltage\n",
+ "Vav = 150.0 # output voltage\n",
+ "f = 1000.0 # frequency\n",
+ "\n",
+ "# Calculation\n",
+ "T = 1/f\n",
+ "Ton = Vav*T/Vi\n",
+ "Toff = T -Ton\n",
+ "\n",
+ "#Result\n",
+ "print(\"Conduction Period = %.3f*10^-3 s\\nBlocking period = %.3f*10^-3 s\"%(Ton*1000,Toff*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Conduction Period = 0.652*10^-3 s\n",
+ "Blocking period = 0.348*10^-3 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.3, Page No. 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# periods of conduction and blocking\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ra = 0.06 # armature resistance\n",
+ "Rf = 0.03 # field resistance\n",
+ "I = 15.0 # Average circuit current\n",
+ "f = 500.0 # chopper frequency\n",
+ "Be = 100 # back emf of motor\n",
+ "Vi = 200 # input voltage\n",
+ "\n",
+ "#Calculations\n",
+ "Vav = I*(Ra+Rf)+Be\n",
+ "T = 1/f\n",
+ "Ton = Vav*T/Vi\n",
+ "Toff = T -Ton\n",
+ "\n",
+ "#Result\n",
+ "print(\"Conduction Period = %.4f*10^-3 s\\nBlocking period = %.4f*10^-3 s\"%(Ton*1000,Toff*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Conduction Period = 1.0135*10^-3 s\n",
+ "Blocking period = 0.9865*10^-3 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.4, Page No.250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Duty Cycle\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "N = 800.0 # rated speed in rpm\n",
+ "I = 20 # rated current\n",
+ "Ra = 0.5 # armature resistanc\n",
+ "V = 240.0 # supply voltage\n",
+ "N1 = 600.0 # motor speed\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Be_800 = V- I*Ra\n",
+ "Be_600 = Be_800*N1/N\n",
+ "Vav = Be_600 + I*Ra\n",
+ "D1 = Vav/V\n",
+ "#(b)\n",
+ "Ia = I/2.0\n",
+ "Vav2 = Be_600+Ia*Ra\n",
+ "D2 = Vav2/V\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Since torque is constant,Ia is also constant, i.e. %d A\\n Duty cycle = %.4f \"%(I,D1))\n",
+ "print(\"(b) Since torque is reduced to half and flux is constant,armature current is reduced to half, i.e. %d A\\n Duty cycle = %.4f \"%(Ia,D2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Since torque is constant,Ia is also constant, i.e. 20 A\n",
+ " Duty cycle = 0.7604 \n",
+ "(b) Since torque is reduced to half and flux is constant,armature current is reduced to half, i.e. 10 A\n",
+ " Duty cycle = 0.7396 \n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.5, Page No.256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# chopper parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 200.0 # input voltage\n",
+ "R = 8.0 # load resistance\n",
+ "Vt = 2.0 # voltage drop across thyristor\n",
+ "f = 800.0 # chopper frequency\n",
+ "d = 0.4 # duty cycle\n",
+ "alfa = 0.5 # duty cycle for case 5\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Vav = d*(V-Vt)\n",
+ "#(b)\n",
+ "Vl = math.sqrt(d)*(V-Vt)\n",
+ "#(c)\n",
+ "Po = (Vl**2)/R\n",
+ "Pi = d*V*(V-Vt)/R\n",
+ "eff = Po/Pi\n",
+ "#(d)\n",
+ "Ri = R/d\n",
+ "#(e)\n",
+ "Vl2 = 2*(V-Vt)/math.pi\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "V1 = Vl2/sqrt_2\n",
+ "V1 = math.floor(V1*1000)/1000\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Vav = %.1f V\\n(b) Vl = %.3f V\\n(c) Chopper efficiency = %.0f%%\\n(d) Input resistance = %.0f ohm\"%(Vav,Vl,eff*100,Ri))\n",
+ "print(\"(e)\\nThe fundamental component (n=1) is,\\nVl = %.2fsin(%d*pi*t)\\nThe rms value of fundamental component is, V1 = %.3f V\"%(Vl2,2*f,V1))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Vav = 79.2 V\n",
+ "(b) Vl = 125.226 V\n",
+ "(c) Chopper efficiency = 99%\n",
+ "(d) Input resistance = 20 ohm\n",
+ "(e)\n",
+ "The fundamental component (n=1) is,\n",
+ "Vl = 126.05sin(1600*pi*t)\n",
+ "The rms value of fundamental component is, V1 = 89.144 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.6, Page No. 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# chopping frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declartion\n",
+ "V = 400 # input voltage\n",
+ "R = 0 # resistance\n",
+ "L = 0.05 # inductance\n",
+ "alfa = 0.25 # duty cycle of chopper\n",
+ "I = 10 # load current\n",
+ "\n",
+ "#Calculation\n",
+ "Vav = V*alfa\n",
+ "Ton = L*I/(V-Vav)\n",
+ "T = Ton/alfa\n",
+ "f = 1/T\n",
+ "\n",
+ "#Result\n",
+ "print(\"Chopper frequency = %d pulses/s\"%(f))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Chopper frequency = 150 pulses/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.7, Page No. 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# chopper parameters\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "R = 4.0 # resistance\n",
+ "L = 6*10**-3 # inductance\n",
+ "V = 200.0 # voltage\n",
+ "alfa = 0.5 # duty cycle\n",
+ "f = 1000.0 # frequency\n",
+ "E = 0 # back emf \n",
+ "#calculations\n",
+ "T = 1/f\n",
+ "#(a)\n",
+ "x = R*T/L\n",
+ "Imax = ((V/R)*((1-math.e**(-alfa*x))/(1-math.e**(-x))))-(E/R)\n",
+ "Imax = math.ceil(Imax*100)/100\n",
+ "Imin = ((V/R)*(((math.e**(alfa*x))-1)/((math.e**(x))-1)))-(E/R)\n",
+ "Imin = math.floor(Imin*100)/100\n",
+ "#(b)\n",
+ "ripple = V/(f*R*L)\n",
+ "#(c)\n",
+ "Iavg = (Imax+Imin)/2\n",
+ "#(d)\n",
+ "Il = math.sqrt((Imin**2)+(((Imax-Imin)**2)/3)+(Imin*(Imax-Imin)))\n",
+ "Il = math.floor(Il*100)/100\n",
+ "#(e)\n",
+ "Iavg_i =0.5*Iavg\n",
+ "#(f)\n",
+ "Irms_i = Il*math.sqrt(0.5)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Imax = %.2f A\\tImin = %.2f A\"%(Imax,Imin))\n",
+ "print(\"(b) Maximum Ripple = %.2f A\\n(c) Average load current = %.0f A\"%(ripple,Iavg))\n",
+ "print(\"(d) rms load current = %.2f A\\n(e) Average input current = %.1f A\\n(f) RMS input current = %.3f A\"%(Il,Iavg_i,Irms_i))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Imax = 29.13 A\tImin = 20.87 A\n",
+ "(b) Maximum Ripple = 8.33 A\n",
+ "(c) Average load current = 25 A\n",
+ "(d) rms load current = 25.11 A\n",
+ "(e) Average input current = 12.5 A\n",
+ "(f) RMS input current = 17.755 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.8, Page No.258 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Load inductance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 300 # input voltage\n",
+ "R = 5 # load resistance\n",
+ "f = 250.0 # chopping frequency\n",
+ "r = 0.20 # 20% ripple\n",
+ "I = 30 # Average load current\n",
+ "\n",
+ "#Calculations\n",
+ "x = r*I\n",
+ "L = V/(4*f*x)\n",
+ "\n",
+ "#Result\n",
+ "print(\"L = %.0f *10^-3 H\"%(L*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L = 50 *10^-3 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.9, Page No.258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Current at the instannce of turn off of thryster and 5 msec after turn off\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R = 0.5 # Armature resistance\n",
+ "L = 16*10**-3 # Arature inductance\n",
+ "V = 200.0 # DC input voltage\n",
+ "Be = 100.0 # Back emf\n",
+ "Imin = 10.0 # minimum load current\n",
+ "Toff = 2*10**-3 # thyristor turn off time\n",
+ "delay = 5*10**-3 # current at the to be calculated 5 msec after turn off\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "x = R/L\n",
+ "i = (((V-Be)/R)*(1-math.e**(-x*Toff)))+Imin*(math.e**(-x*Toff))\n",
+ "i = math.floor(i*100)/100\n",
+ "#(b)\n",
+ "i2 = i*(math.e**(-x*delay))\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Current at the instance of turn off of thyristor = %.2f A\"%i)\n",
+ "print(\"(b) After the turn off of thyristor,the current freewheels 5 ms.\\n\\ti = %.2f A\"%i2)\n",
+ "# answers in the book are wrong:12.12+9.39=21.41"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Current at the instance of turn off of thyristor = 21.51 A\n",
+ "(b) After the turn off of thyristor,the current freewheels 5 ms.\n",
+ "\ti = 18.40 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 88
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.10, Page No. 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Speed of the motor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 220.0 # input voltage\n",
+ "Ra = 1.0 # armature resistance\n",
+ "N = 1000.0 # no load speed of the motor\n",
+ "alfa = 0.6 # duty cycle\n",
+ "I = 20 # motor current\n",
+ "E = 220.0 # back emf at no load\n",
+ "\n",
+ "# Calculations\n",
+ "Vi = V*alfa\n",
+ "Be = Vi-Ra*I\n",
+ "N1 = Be*N/V\n",
+ "\n",
+ "#Result\n",
+ "print(\"Speed of the motor = %.1f rpm\"%N1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of the motor = 509.1 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.11, Page No.259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Average load voltage of the chopper\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vi = 230.0 # input voltage\n",
+ "Ton = 25 # on time in ms\n",
+ "Toff = 10 # off time in ms\n",
+ "\n",
+ "#Calculations\n",
+ "V = Vi*Ton/(Ton+Toff)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Average load voltage = %.3f V\"%V)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average load voltage = 164.286 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 84
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.12, Page No. 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# max, min and average load current and load voltage\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 100.0 # applied voltage\n",
+ "Be = 0 # back emf\n",
+ "L = 1.0*10**-3 # inductance\n",
+ "R = 0.5 # Resistance\n",
+ "T = 3*10**-3 # Ton + Toff\n",
+ "Ton = 1*10**-3 # Ton\n",
+ "\n",
+ "#Calculations\n",
+ "alfa = Ton/T\n",
+ "x = T*R/L\n",
+ "#(a)\n",
+ "Imax = (V/R)*((1- math.e**(-alfa*x))/(1-math.e**(-x)))\n",
+ "#(b)\n",
+ "Imin = (V/R)*((math.e**(alfa*x)-1)/(math.e**(x)-1))\n",
+ "#(c)\n",
+ "Vavg = alfa*V\n",
+ "\n",
+ "#Result\n",
+ "print(\" Imax = %.2f A\\n Imin = %.1f A\\n Average load current = %.1f A\\n Average output voltage = %.2f V\"%(Imax,Imin,(Imax+Imin)/2,Vavg))\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Imax = 101.30 A\n",
+ " Imin = 37.3 A\n",
+ " Average load current = 69.3 A\n",
+ " Average output voltage = 33.33 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.13, Page No.259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# In One quadrant chopper, output voltage and current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 100.0 # applied voltage\n",
+ "Be = 12.0 # back emf\n",
+ "L = 0.8*10**-3 # inductance\n",
+ "R = 0.2 # Resistance\n",
+ "T = 2.4*10**-3 # Ton + Toff\n",
+ "Ton = 1*10**-3 # Ton\n",
+ "\n",
+ "#Calculations\n",
+ "alfa = Ton/T\n",
+ "x = T*R/L\n",
+ "#(a)\n",
+ "Imax = (V/R)*((1- math.e**(-alfa*x))/(1-math.e**(-x)))\n",
+ "#(b)\n",
+ "Imin = (V/R)*((math.e**(alfa*x)-1)/(math.e**(x)-1))\n",
+ "#(c)\n",
+ "Vavg = alfa*V\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Imax = %.2f A\\n(b) Imin = %.1f A\\n(c) Average output voltage = %.2f V\"%(Imax,Imin,Vavg))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Imax = 245.13 A\n",
+ "(b) Imin = 172.7 A\n",
+ "(c) Average output voltage = 41.67 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.14, Page No. 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Series inductance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f = 400.0 # chopping frequency\n",
+ "V = 500.0 # input voltage\n",
+ "I = 10 # maximum current swing\n",
+ "\n",
+ "#calculations\n",
+ "L = V/(4*f*I)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Series Inductance, L = %.2f*10^-3 H \"%(L*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Series Inductance, L = 31.25*10^-3 H \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.15, Pager No.260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Motor speed and current swing\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 800.0 # input voltage\n",
+ "P = 300.0 # motor power rating in HP\n",
+ "eff = 0.9 # motor efficiency\n",
+ "R = 0.1 # total armature and field resistance\n",
+ "L = 100*10**-3 # inductance\n",
+ "alfa = 0.2 # duty cycle\n",
+ "N = 900.0 # motor rated speed \n",
+ "f = 400.0 # chopping frequency\n",
+ "\n",
+ "#Calculations\n",
+ "Po = P*735.5/1000\n",
+ "Pi = Po/eff\n",
+ "I = Pi*1000/V\n",
+ "Be = V-(I*R)\n",
+ "Be_duty = (alfa*V)-(I*R)\n",
+ "N2 = N*Be_duty/Be\n",
+ "di = (V- (alfa*V))*alfa/(L*f)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Motor speed = %.2f rpm\\nCurrent swing = %.1f A\"%(N2,di))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Motor speed = 151.32 rpm\n",
+ "Current swing = 3.2 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.16, Page No. 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.17, Page No. 262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.18, Page No. 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# step down chopper parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 200.0 # input voltage\n",
+ "R = 2.0 # resistance\n",
+ "L = 10*10**-3 # inductance\n",
+ "E = 20.0 # back emf\n",
+ "T = 1000*10**-6 # chopping cycle\n",
+ "Ton =300*10**-6 # Ton time of thyrister\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "f = 1/T\n",
+ "x = (R*T)/L\n",
+ "alfa_min =(math.log(1+((E/V)*(math.e**(x)-1))))/x\n",
+ "alfa = Ton/T\n",
+ "#(b)\n",
+ "Imax = ((V/R)*((1-math.e**(-alfa*x))/(1-math.e**(-x))))-(E/R)\n",
+ "Imax = math.floor(Imax*10)/10\n",
+ "Imin = ((V/R)*((math.e**(alfa*x)-1)/(math.e**(x)-1)))-(E/R)\n",
+ "Imin = math.floor(Imin*100)/100\n",
+ "#(c)\n",
+ "Il = (alfa*V-E)/R\n",
+ "#(d)\n",
+ "x1 = alfa*V\n",
+ "x2 = (V*math.sin(math.pi*2*alfa))/math.pi\n",
+ "x3 = (V/math.pi)*(1-math.cos(alfa*2*math.pi))\n",
+ "x4 = (V*math.sin(math.pi*2*2*alfa))/(math.pi*2)\n",
+ "x5 = (V/(2*math.pi))*(1-math.cos(alfa*2*2*math.pi))\n",
+ "x6 = (V*math.sin(math.pi*3*2*alfa))/(math.pi*3)\n",
+ "x7 = (V/(3*math.pi))*(1-math.cos(alfa*2*3*math.pi))\n",
+ "d = f*2*math.pi\n",
+ "#(e)\n",
+ "Iavg = (alfa*(V-E)/R)-(L*(Imax-Imin)/(R*T))\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Minimum required value of alfa = %.4f\\n Actual value of alfa = %.1f\"%(alfa_min,alfa))\n",
+ "print(\" Since actual value is more than minimum required for continuous current,the load current is continuous.\")\n",
+ "print(\"\\n(b) Imax = %.1f A\\tImin = %.2f A\"%(Imax,Imin))\n",
+ "print(\"\\n(c) Average load current = %.0f A\"%Il)\n",
+ "print(\"\\n(d) Vl = %d + %.2fcos(%.1ft) + %.2fsin(%.1ft)%.2fcos(%.1ft) + %.2fsin(%.1ft)%.2fcos(%.1ft) + %.2fsin(%.1ft)+....\"%(x1,x2,d,x3,d,x4,2*d,x5,2*d,x6,3*d,x7,3*d))\n",
+ "print(\"\\n(e) Average Input current = %.2f A\"%Iavg)\n",
+ "# answer for Imin is slightly greater than the answer given in book and hence answer for avg input current"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Minimum required value of alfa = 0.1095\n",
+ " Actual value of alfa = 0.3\n",
+ " Since actual value is more than minimum required for continuous current,the load current is continuous.\n",
+ "\n",
+ "(b) Imax = 22.1 A\tImin = 17.92 A\n",
+ "\n",
+ "(c) Average load current = 20 A\n",
+ "\n",
+ "(d) Vl = 60 + 60.55cos(6283.2t) + 83.33sin(6283.2t)-18.71cos(12566.4t) + 57.58sin(12566.4t)-12.47cos(18849.6t) + 4.05sin(18849.6t)+....\n",
+ "\n",
+ "(e) Average Input current = 6.10 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.19, Page No.266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# load current values\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 200.0 # input voltage\n",
+ "R = 4.0 # resistance\n",
+ "L = 10*10**-3 # inductance\n",
+ "T = 1000*10**-6 # chopping cycle\n",
+ "Ton =300*10**-6 # Ton time of thyrister\n",
+ "\n",
+ "#Calculations\n",
+ "f = 1/T\n",
+ "alfa = Ton/T\n",
+ "x1 = alfa*V\n",
+ "x2 = (V*math.sin(math.pi*2*alfa))/math.pi\n",
+ "x2 = math.ceil(x2*100)/100\n",
+ "x3 = (V/math.pi)*(1-math.cos(alfa*2*math.pi))\n",
+ "x3 = math.floor(x3*100)/100\n",
+ "x4 = (V*math.sin(math.pi*2*2*alfa))/(math.pi*2)\n",
+ "x4 = math.floor(x4*100)/100\n",
+ "x5 = (V/(2*math.pi))*(1-math.cos(alfa*2*2*math.pi))\n",
+ "x5 = math.floor(x5*100)/100\n",
+ "x6 = (V*math.sin(math.pi*3*2*alfa))/(math.pi*3)\n",
+ "x6 = math.ceil(x6*100)/100\n",
+ "x7 = (V/(3*math.pi))*(1-math.cos(alfa*2*3*math.pi))\n",
+ "x7 = math.floor(x7*100)/100\n",
+ "\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "V1 = math.sqrt((x2**2+x3**2))/sqrt_2\n",
+ "V2 = math.sqrt((x4**2+x5**2))/sqrt_2\n",
+ "V3 = math.sqrt((x6**2+x7**2))/sqrt_2\n",
+ "Z1_mag = math.sqrt(R**2+(2*math.pi*f*L)**2)\n",
+ "Z1_angle = math.tan((2*math.pi*f*L)/R)\n",
+ "I1 = V1/Z1_mag\n",
+ "\n",
+ "Z2_mag = math.sqrt(R**2+(2*2*math.pi*f*L)**2)\n",
+ "Z2_angle = math.tan((2*2*math.pi*f*L)/R)\n",
+ "I2 = V2/Z2_mag\n",
+ "\n",
+ "Z3_mag = math.sqrt(R**2+(3*2*math.pi*f*L)**2)\n",
+ "Z3_angle = math.tan((3*2*math.pi*f*L)/R)\n",
+ "I3 = V3/Z3_mag\n",
+ "\n",
+ "Iavg = alfa*V/4\n",
+ "Irms = math.sqrt(Iavg**2+I1**2+I2**2+I3**2)\n",
+ "\n",
+ "print(\"RMS value of first harmonic component of load current = %.3f A\"%I1)\n",
+ "print(\"RMS value of second harmonic component of load current = %.4f A\"%I2)\n",
+ "print(\"RMS value of third harmonic component of load current = %.4f A\"%I3)\n",
+ "print(\"RMS value of load current = %.4f A\"%Irms)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS value of first harmonic component of load current = 1.157 A\n",
+ "RMS value of second harmonic component of load current = 0.3406 A\n",
+ "RMS value of third harmonic component of load current = 0.0492 A\n",
+ "RMS value of load current = 15.0485 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.20, Page No.273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# L and C of the auxiliary commutation circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 200 # input voltage\n",
+ "I = 50 # average current\n",
+ "Il = 60 # peak load current\n",
+ "Toff = 15*10**-6 # thyristor turn off current\n",
+ "l = 1.5 # max current limit of 150%\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "C = Toff*Il/V # C should be greater than this value\n",
+ "C1 = 5 *10**-6 # assumed\n",
+ "Ic = Il*l-Il\n",
+ "L = (V**2*(C1))/(Ic**2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"C > %.1f*10^-6, Therefore assume C = %.1f*10^6 F\"%(C*10**6,C1*10**6))\n",
+ "print(\"L = %.2f*10^-6 H\"%(L*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C > 4.5*10^-6, Therefore assume C = 5.0*10^6 F\n",
+ "L = 222.22*10^-6 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.21, Page No.277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# period of conduction\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 200.0 # input voltage \n",
+ "Vav = 250.0 # output voltage\n",
+ "Toff = 0.6*10**-3 # blocking period\n",
+ "\n",
+ "#calculation\n",
+ "Ton = (Vav*Toff/V) - Toff\n",
+ "\n",
+ "#Result\n",
+ "print(\"Ton = %.2f*10^-3 second\"%(Ton*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ton = 0.15*10^-3 second\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 5.22, Page No.277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# period of conduction\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 150.0 # input voltage \n",
+ "Vav = 250.0 # output voltage\n",
+ "Toff = 1*10**-3 # blocking period\n",
+ "\n",
+ "#calculation\n",
+ "Ton = (Vav*Toff/V) - Toff\n",
+ "\n",
+ "#Result\n",
+ "print(\"Ton = %.4f*10^-3 second\"%(Ton*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ton = 0.6667*10^-3 second\n"
+ ]
+ }
+ ],
+ "prompt_number": 83
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_6_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_6_3.ipynb new file mode 100755 index 00000000..9456765e --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_6_3.ipynb @@ -0,0 +1,852 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: AC Regulators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.1, Page No.286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input/output power, input power factor, average and rms vales of thyristor\n",
+ "\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#variable declaration\n",
+ "nc = 36.0 # conduction cycles\n",
+ "no = 64.0 # off cycles\n",
+ "V = 150.0 # input voltage\n",
+ "Rl = 8.0 # load resistance\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "alfa = nc/(nc+no)\n",
+ "Vl = V*math.sqrt(alfa)\n",
+ "#(b)\n",
+ "P = (Vl**2)/Rl\n",
+ "#(d)\n",
+ "Il = Vl/Rl\n",
+ "va_i = V*Il\n",
+ "pf_i = P/va_i\n",
+ "#(e)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Ip = sqrt_2*V/Rl\n",
+ "\n",
+ "def f(x):\n",
+ " return (alfa/(2*math.pi))*Ip*(math.sin(x))\n",
+ "wt_lower=0\n",
+ "wt_upper =math.pi\n",
+ "val = quad(f,wt_lower,wt_upper)\n",
+ "\n",
+ "val2 =Ip*math.sqrt(alfa)/2.0\n",
+ "\n",
+ "#result\n",
+ "print(\"(a) rms output voltage, Vl = %.0f V\\n(b) Power output = %.1f W\"%(Vl,P))\n",
+ "print(\"(c) Since losses are neglected, input power = Output power = %.1f W\"%(P))\n",
+ "print(\"(d) input power factor = %.1f lagging\\n(e)\\tPeak thyristor current = %.4f A \"%(pf_i,Ip))\n",
+ "print(\"\\tAverage thyristor current = %.3f A\\n\\tRMS thyristor current = %.2f A\"%(val[0],val2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) rms output voltage, Vl = 90 V\n",
+ "(b) Power output = 1012.5 W\n",
+ "(c) Since losses are neglected, input power = Output power = 1012.5 W\n",
+ "(d) input power factor = 0.6 lagging\n",
+ "(e)\tPeak thyristor current = 26.5125 A \n",
+ "\tAverage thyristor current = 3.038 A\n",
+ "\tRMS thyristor current = 7.95 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.2, Page No.288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# single phase half wave regulator parameter\n",
+ "\n",
+ "import math\n",
+ "#vaariable declaration\n",
+ "V = 150.0 # input voltage\n",
+ "Rl = 8.0 # load resistance\n",
+ "theta = 60.0 # thyristor firing angle in degrees\n",
+ "\n",
+ "# Calculations\n",
+ "Vm =math.sqrt(2)*V\n",
+ "Vm = math.floor(Vm*10)/10\n",
+ "#(a)\n",
+ "Vo = Vm*(math.cos(theta*math.pi/180)-1)/(2*math.pi)\n",
+ "#(b)\n",
+ "Vl = Vm*math.sqrt(((2*math.pi)-(theta*math.pi/180)+(math.sin(2*theta*math.pi/180)/2))/(4*math.pi))\n",
+ "Vl = math.ceil(Vl*100)/100\n",
+ "#(c)\n",
+ "Po = (Vl**2)/Rl\n",
+ "#(d)\n",
+ "I = Vl/Rl\n",
+ "va = V*I\n",
+ "pf = Po/va\n",
+ "#(e)\n",
+ "Iavg = Vo/Rl\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Average output voltage = %.1f V\\n This is negative because only a part of positive half cycle appears at the output\"%Vo)\n",
+ "print(\" whereas the whole negative cycle appears at the output.\")\n",
+ "print(\"\\n(b) Vl = %.2f V\\n\\n(c) Power output = %.2f W\\n\\n(d) Input pf = %.2f lagging\"%(Vl,Po,pf))\n",
+ "print(\"\\n(e) Average input current = Average output current = %.2f A \"%(Iavg))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Average output voltage = -16.9 V\n",
+ " This is negative because only a part of positive half cycle appears at the output\n",
+ " whereas the whole negative cycle appears at the output.\n",
+ "\n",
+ "(b) Vl = 142.46 V\n",
+ "\n",
+ "(c) Power output = 2536.86 W\n",
+ "\n",
+ "(d) Input pf = 0.95 lagging\n",
+ "\n",
+ "(e) Average input current = Average output current = -2.11 A \n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.3, Page No.293"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase full wave regulator parameters\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#variable declaration\n",
+ "V = 150.0 # input voltage\n",
+ "Rl = 8.0 # load resistance\n",
+ "theta = 60.0 # thyristor firing angle in degrees\n",
+ "\n",
+ "#calculations\n",
+ "Vm =math.sqrt(2)*V\n",
+ "Vm = math.floor(Vm*10)/10\n",
+ "#(a)\n",
+ "Vav = Vm*(math.cos(theta*math.pi/180)+1)/(math.pi)\n",
+ "#(b)\n",
+ "Vl = Vm*math.sqrt(((3.14)-(3.14/3)+(math.sin(2*theta*3.14/180)/2))/(2*3.141))\n",
+ "Vl = math.ceil(Vl*100)/100\n",
+ "#(c)\n",
+ "Io = Vl/Rl\n",
+ "Po = (Io**2)*Rl\n",
+ "#(d)\n",
+ "va = V*Io\n",
+ "pf = Po/va\n",
+ "#(e)\n",
+ "def f(x):\n",
+ " return math.sin(x)\n",
+ "wt_lower = math.pi/3 \n",
+ "wt_upper = math.pi\n",
+ "val = quad(f,wt_lower,wt_upper)\n",
+ "Iavg = val[0]*Vm/(2*math.pi*Rl)\n",
+ "\n",
+ "def g(x):\n",
+ " return math.sin(x)**2\n",
+ "wt_lower1 = math.pi/3\n",
+ "wt_upper1 = math.pi\n",
+ "val1 = quad(g,wt_lower1,wt_upper1)\n",
+ "Irms = (Vm/(Rl))*math.sqrt(val1[0]/(math.pi*2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Average output voltage = %.2f V\\n \"%Vav)\n",
+ "print(\"\\n(b) Vl = %.2f V\\n\\n(c) Power output = %.2f W\\n\\n(d) Input pf = %.3f lagging\"%(Vl,Po,pf))\n",
+ "print(\"\\n(e) Average thyristor current= %.2f A\\n RMS thyristor current = %.2f A \"%(Iavg,Irms))\n",
+ "\n",
+ "#(b) For Vl calculation, value of pi is used different at different place. if math.pi is used then Vl = 134.53V\n",
+ "#(c) answer in the book is misprinted"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Average output voltage = 101.27 V\n",
+ " \n",
+ "\n",
+ "(b) Vl = 134.52 V\n",
+ "\n",
+ "(c) Power output = 2261.95 W\n",
+ "\n",
+ "(d) Input pf = 0.897 lagging\n",
+ "\n",
+ "(e) Average thyristor current= 6.33 A\n",
+ " RMS thyristor current = 11.89 A \n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.4, Page No. 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase full wave ac voltage regulator\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#variable declaration\n",
+ "V = 120.0 # input voltage\n",
+ "Rl = 10.0 # load resistance\n",
+ "alfa = 90.0 # thyristor firing angle in degrees\n",
+ "\n",
+ "#Calculations\n",
+ "Vm =math.sqrt(2)*V\n",
+ "#Vm = math.floor(Vm*10)/10\n",
+ "#(a)\n",
+ "Vo = Vm*math.sqrt(((math.pi)-(alfa*math.pi/180)+(math.sin(2*alfa*math.pi/180)/2.0))/(2*math.pi))\n",
+ "#Vo = 60*math.sqrt(2) \n",
+ "#(b)\n",
+ "Il = Vo/Rl\n",
+ "Po = (Il**2)*Rl\n",
+ "VA = Il*V\n",
+ "pf = Po/VA\n",
+ "#(c)\n",
+ "def f(x):\n",
+ " return math.sin(x)\n",
+ "wt_lower = math.pi/2\n",
+ "wt_upper = math.pi\n",
+ "val = quad(f,wt_lower,wt_upper)\n",
+ "Iav = Vm*val[0]/(2*math.pi*Rl)\n",
+ " \n",
+ "#(d)\n",
+ "Irms = Il/math.sqrt(2)\n",
+ "#(e)\n",
+ "Irmsl = Vo/Rl\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) RMS output voltage = %f V\\n(b) Input p.f. = %.3f lagging\\n(c) Average thyristor current = %.1f A\"%(Vo,pf,Iav))\n",
+ "print(\"(d) RMS thyristor current = %.1f A\\n(e) RMS load current =%f A\"%(Irms,Irmsl))\n",
+ "# Answer for \"RMS output voltage\" and \"RMS load current\" is wrong in the book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) RMS output voltage = 84.852814 V\n",
+ "(b) Input p.f. = 0.707 lagging\n",
+ "(c) Average thyristor current = 2.7 A\n",
+ "(d) RMS thyristor current = 6.0 A\n",
+ "(e) RMS load current =8.485281 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.5, Page No. 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# rms output voltage and average power\n",
+ "\n",
+ "import math\n",
+ "R = 400.0 # load resistance\n",
+ "V = 110.0 # input voltage\n",
+ "alfa = 60.0 # firing angle\n",
+ "\n",
+ "# calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = sqrt_2*V\n",
+ "Vo = Vm*math.sqrt(((math.pi)-(alfa*math.pi/180)+(math.sin(2*alfa*math.pi/180)/2.0))/(2*math.pi))\n",
+ "P = (Vo**2)/R\n",
+ "\n",
+ "#Result\n",
+ "print(\"RMS output voltage = %.2f V\\nAverage power = %.2f W\"%(Vm,P))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS output voltage = 155.54 V\n",
+ "Average power = 24.33 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.6, Page No.294 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Firing angle\n",
+ "\n",
+ "import math\n",
+ "from numpy import poly1d\n",
+ "# variable declaration\n",
+ "a1 = 0.80 # % of maximum power value1\n",
+ "a2 = 0.30 # % of maximum power value2\n",
+ "\n",
+ "#Calculation\n",
+ "#After solving equation using taylor seris of X, we got following coefficient. \n",
+ "P1 = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-2*math.pi*(1-a1))], variable = 'x')\n",
+ "P2 = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-math.pi*1.525)], variable = 'x')\n",
+ "# hardcoded value used to match the answer to the book\n",
+ "x1 = P1.r[(P1.order+1)/2]*180/math.pi\n",
+ "x2 = P2.r[(P1.order+1)/2]*180/math.pi\n",
+ "alfa1 = x1.real\n",
+ "alfa2 = x2.real\n",
+ "print(\"(a) alfa1 = %.1f\u00b0\"%(x1.real))\n",
+ "print(\"(b) alfa2 = %.1f\u00b0\"%(x2.real))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) alfa1 = 60.5\u00b0\n",
+ "(b) alfa2 = 108.6\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 98
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.7, Page No.295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# single phase AC regulator\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 230.0 # Single phase supply voltage\n",
+ "f = 50.0 # supply frequency\n",
+ "R = 15.0 # load resistance\n",
+ "alfa = 30.0 # firing angle\n",
+ "\n",
+ "#calculations\n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = V*sqrt_2\n",
+ "alfa = alfa*math.pi/180 #degree to radians\n",
+ "#(a)\n",
+ "#-Theoretical\n",
+ "Iavg = Vm*(1+ math.cos(alfa))/(2*math.pi*R)\n",
+ "Irms = (Vm/R)*math.sqrt(((math.pi - alfa)/(4*math.pi))+(math.sin(2*alfa)/(8*math.pi)))\n",
+ "#(b)\n",
+ "a1 = (Vm)*(math.cos(2*alfa)-1)/(2*math.pi)\n",
+ "b1 = (Vm)*((math.pi-alfa)+((math.sin(2*alfa))/2.0))/(math.pi)\n",
+ "Va = math.sqrt(a1**2 + b1**2)\n",
+ "Vrms = Va/sqrt_2\n",
+ "Vrms = math.floor(Vrms*1000)/1000\n",
+ "#(e)\n",
+ "P = (Vrms**2)/R\n",
+ "#(f)\n",
+ "Vl = Vm*math.sqrt((math.pi -alfa+((math.sin(2*alfa))/2.0))/(2*math.pi))\n",
+ "Vl =math.floor(Vl*1000)/1000\n",
+ "#(g)\n",
+ "Pt = (Vl**2)/R\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Average thyristor current = %.2f A\\n RMS thyristor current = %.3f A\"%(Iavg,Irms))\n",
+ "print(\"\\n(b) Amplitude of fundamental component of load voltage = %.1f V\\n RMS value = %.3f V\"%(math.floor(Va*10)/10,Vrms))\n",
+ "print(\"\\n(c) Since load is purely resistive, the load current rises from 0 to peak value instantaneously at alfa.\")\n",
+ "print(\" Hence max.(di/dt) is infinite\")\n",
+ "print(\"\\n(d) Maximum forward or reverse voltage across thyristor = %.2f V \"%(Vm))#math.pi =1.414\n",
+ "print(\"\\n\\n(e) Power delevered to load by fundamental component of load voltage = %.2f W\"%P)\n",
+ "print(\"\\n\\n(f) Load voltage = %.3f V\"%Vl)\n",
+ "print(\"\\n\\n(g) Total power output = %.2f W\"%Pt)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Average thyristor current = 6.44 A\n",
+ " RMS thyristor current = 10.683 A\n",
+ "\n",
+ "(b) Amplitude of fundamental component of load voltage = 316.9 V\n",
+ " RMS value = 224.116 V\n",
+ "\n",
+ "(c) Since load is purely resistive, the load current rises from 0 to peak value instantaneously at alfa.\n",
+ " Hence max.(di/dt) is infinite\n",
+ "\n",
+ "(d) Maximum forward or reverse voltage across thyristor = 325.22 V \n",
+ "\n",
+ "\n",
+ "(e) Power delevered to load by fundamental component of load voltage = 3348.53 W\n",
+ "\n",
+ "\n",
+ "(f) Load voltage = 226.625 V\n",
+ "\n",
+ "\n",
+ "(g) Total power output = 3423.93 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.8, Page No. 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase full wave regulator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 150 # input voltage\n",
+ "R = 4 # resistance of the circuit\n",
+ "L = 22*10**-3 # Inductance\n",
+ "f = 50 # frequency \n",
+ "alfa = 60 # firing angle\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "w = 2*math.pi*f\n",
+ "theta = (180/math.pi)*math.atan(w*L/R)\n",
+ "beta = 180+alfa\n",
+ "#(b)\n",
+ "alfa = alfa*math.pi/180\n",
+ "Vm = V*math.sqrt(2)\n",
+ "Vm = math.floor(Vm*10)/10\n",
+ "Vl = Vm*math.sqrt((math.pi-((math.sin(2*beta*math.pi/180))/2)+((math.sin(2*alfa))/2.0))/(2*math.pi))\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\ntheta = %.0f\u00b0\\nAs alfa = theta, (beta-alfa) = Conduction angle= pi\\ntherefore, Beta = %d\u00b0\"%(theta,beta))\n",
+ "print(\"\\n(b)\\n Vl = %.0f V\"%Vl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "theta = 60\u00b0\n",
+ "As alfa = theta, (beta-alfa) = Conduction angle= pi\n",
+ "therefore, Beta = 240\u00b0\n",
+ "\n",
+ "(b)\n",
+ " Vl = 150 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.9, Page No. 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Single phase full wave regulator parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230 # input voltage\n",
+ "f = 50 # frequency\n",
+ "R = 5 # resistance of the circuit\n",
+ "L = 20*10**-3 # inductance\n",
+ "\n",
+ "#Calculations\n",
+ "w = 2*math.pi*f\n",
+ "theta = (180/math.pi)*math.atan(R/(2*math.pi*f*L))\n",
+ "theta = math.ceil(theta*100)/100\n",
+ "Il = V/math.sqrt((R**2)+((w**2)*(L**2)))\n",
+ "Il = math.floor(Il*100)/100\n",
+ "P =R*Il**2\n",
+ "ipf = (P)/(V*Il)\n",
+ "\n",
+ "#Result\n",
+ "print(\"theta = %.2f\u00b0\"%theta)\n",
+ "print(\"\\n(a) The minimum value of firing angle(alfa) is theta. Therefore, range of firing angle is %.2f\u00b0 to 180\u00b0.\"%theta)\n",
+ "print(\"\\n(b) Conduction period of each thyristor is 180\u00b0.\")\n",
+ "print(\"\\n(c)\\n Load current = %.2f A\\n Power output = %.2f W\\n Input power factor = %.3f lagging\"%(Il,P,ipf)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "theta = 38.52\u00b0\n",
+ "\n",
+ "(a) The minimum value of firing angle(alfa) is theta. Therefore, range of firing angle is 38.52\u00b0 to 180\u00b0.\n",
+ "\n",
+ "(b) Conduction period of each thyristor is 180\u00b0.\n",
+ "\n",
+ "(c)\n",
+ " Load current = 28.64 A\n",
+ " Power output = 4101.25 W\n",
+ " Input power factor = 0.623 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.10, Page No. 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Singal phase full wave regulator circuit parameters\n",
+ "\n",
+ "import math\n",
+ "from scipy.integrate import quad\n",
+ "#Variable declaration\n",
+ "R = 9 # resistance of the circuit\n",
+ "L = 0.03 # inductance\n",
+ "V = 240 # input voltage\n",
+ "f = 50 # frequency\n",
+ "alfa1 = 0 # firing angle case a\n",
+ "alfa2 = 60 # firing angle case b\n",
+ "alfa3 = 90 # firing angle case c\n",
+ "\n",
+ "#calculations\n",
+ "RbyL = R/L\n",
+ "alfa1 = 0*math.pi/180\n",
+ "alfa2 = 60*math.pi/180\n",
+ "alfa3 = 90*math.pi/180 \n",
+ "alfa4 = 13.7*math.pi/180 \n",
+ "sqrt_2 =math.floor(math.sqrt(2)*1000)/1000\n",
+ "w = 2*math.pi*f\n",
+ "Z_mag = math.sqrt((R**2)+(w**2)*(L**2))\n",
+ "Z_angle = math.floor((math.atan(w*L/R))*1000)/1000\n",
+ "x=math.floor(math.cos(Z_angle)*10000)/10000\n",
+ "\n",
+ "#(a)\n",
+ "Il = (V*math.sqrt(2)/Z_mag)#*math.sin((w/f)-(Z_angle*math.pi/180))\n",
+ "Il = math.floor(Il*100)/100\n",
+ "P = V*Il*x/sqrt_2\n",
+ "#b\n",
+ "k1 = math.ceil((Il*math.sin(alfa2-Z_angle))*100)/100\n",
+ "def h(t):\n",
+ " return ((V*sqrt_2*math.sin(w*t*alfa2))*((Il*math.sin((w*t)+(alfa2-Z_angle)))-(k1*math.e**(-RbyL*t))))\n",
+ "t2 = 0.00919\n",
+ "t1 = 0\n",
+ "val = quad(h,t1,t2)\n",
+ "P2 = val[0]/0.01\n",
+ "#c\n",
+ "k2 = math.floor((Il*math.sin(alfa3-Z_angle))*100)/100\n",
+ "def g(t):\n",
+ " return ((V*sqrt_2*math.sin(w*t*alfa3))*((Il*math.sin((w*t)+(alfa3-Z_angle)))-(k2*math.e**(-RbyL*t))))\n",
+ "t2 = 0.00733\n",
+ "t1 = 0\n",
+ "val2 = quad(g,t1,t2)\n",
+ "P3 = val2[0]/0.01\n",
+ "\n",
+ "angle1 = math.ceil((Z_angle*180/math.pi)*10)/10\n",
+ "angle2 = (alfa2-Z_angle)*180/math.pi\n",
+ "angle3 = (alfa3-Z_angle)*180/math.pi\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nCurrent waveform--> i = %.2fsin(2pi*%dt-%.1f\u00b0) A\\nPower delivered = %.1f W\"%(Il,f,angle1,P))\n",
+ "print(\"(b)\\nCurrent waveform--> i = %.2fsin(2pi*%dt+%.1f\u00b0)-%.2fe^(-%dt) A\\nPower delivered = %.1f W\"%(Il,f,angle2,k1,RbyL,P2))\n",
+ "print(\"(c)\\nCurrent waveform--> i = %.2fsin(2pi*%dt+%.1f\u00b0)-%.2fe^(-%dt) A\\nPower delivered = %.1f W\"%(Il,f,angle3,k2,RbyL,P3))\n",
+ "#Power answer for (b) and (c) do not match with the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Current waveform--> i = 26.04sin(2pi*50t-46.3\u00b0) A\n",
+ "Power delivered = 3053.6 W\n",
+ "(b)\n",
+ "Current waveform--> i = 26.04sin(2pi*50t+13.7\u00b0)-6.17e^(-300t) A\n",
+ "Power delivered = 3885.4 W\n",
+ "(c)\n",
+ "Current waveform--> i = 26.04sin(2pi*50t+43.7\u00b0)-17.99e^(-300t) A\n",
+ "Power delivered = 2138.7 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 200
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.11, Page No. 304"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Current and voltage ratings\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "V = 415 # 3-phase input voltage\n",
+ "f = 50 # frequency\n",
+ "P = 20*10**3 # output power\n",
+ "sf = 1.5 # safety factor\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Il = P/(math.sqrt(3)*V)\n",
+ "Irms = Il*sf\n",
+ "Irms = math.floor(Irms*100)/100\n",
+ "Vrms = V*sf\n",
+ "#(b)\n",
+ "Irms_thyristor = Il*sf/math.sqrt(2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\n Line Current = %.2f A\\n RMS rating of each triac = %.2f A\\n rms voltage rating = %.1f V\"%(Il,Irms,Vrms))\n",
+ "print(\"\\n(b)\\n Line Current = %.2f A\\n RMS rating of each thyristor = %.2f A\\n rms voltage rating = %.1f V\"%(Il,Irms_thyristor,Vrms))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " Line Current = 27.82 A\n",
+ " RMS rating of each triac = 41.73 A\n",
+ " rms voltage rating = 622.5 V\n",
+ "\n",
+ "(b)\n",
+ " Line Current = 27.82 A\n",
+ " RMS rating of each thyristor = 29.51 A\n",
+ " rms voltage rating = 622.5 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.12, Page No.305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# output parameters of 3-phase AC regulator\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "V = 415 # 3-phase input voltage\n",
+ "R = 15 # load resistance per phase\n",
+ "alfa = 30 # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Vrms = V/math.sqrt(3)\n",
+ "Vl = math.sqrt(3)*(math.sqrt(2)*Vrms)*math.sqrt(((math.pi/6)-((alfa*math.pi)/(180*4))+(math.sin(2*alfa*math.pi/180)/8))/(math.pi))\n",
+ "Vl = math.floor(Vl*10)/10\n",
+ "#(b)\n",
+ "P = (3*Vl**2)/R\n",
+ "#(c)\n",
+ "Il = Vl/R\n",
+ "#(d)\n",
+ "VA = 3*Vrms*Il\n",
+ "ipf = P/VA\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) rms value of input phase voltage = %.1f V\\n Vl = %.1f V\"%(Vrms,Vl))\n",
+ "print(\"\\n(b) Output power = %.1f W or %.4f kW\\n\\n(c) Line Current = %.2fA\\n\\n(d) input p.f. = %.3f lagging\"%(P,P/1000,Il,ipf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) rms value of input phase voltage = 239.6 V\n",
+ " Vl = 234.3 V\n",
+ "\n",
+ "(b) Output power = 10979.3 W or 10.9793 kW\n",
+ "\n",
+ "(c) Line Current = 15.62A\n",
+ "\n",
+ "(d) input p.f. = 0.978 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 88
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 6.13, Page No. 305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# output parameters of 3-phase AC regulator\n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "V = 415 # 3-phase input voltage\n",
+ "R = 15 # load resistance per phase\n",
+ "alfa = 60 # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "Vrms = V/math.sqrt(3)\n",
+ "#Vrms = math.floor(Vrms*10)/10\n",
+ "Vl = math.sqrt(3)*(1.414*Vrms)*math.sqrt(((3.141/6)-((alfa*3.141)/(180*4))+(math.sin(2*alfa*3.141/180)/8))/(math.pi))\n",
+ "#pi value = 3.141 to match the answer in the book\n",
+ "Vl = math.floor(Vl*100)/100\n",
+ "#(b)\n",
+ "P = (3*Vl**2)/R\n",
+ "#(c)\n",
+ "Il = Vl/R\n",
+ "#(d)\n",
+ "VA = 3*Vrms*Il\n",
+ "ipf = P/VA\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) rms value of input phase voltage = %f V\\n Vl = %f V\"%(Vrms,Vl))\n",
+ "print(\"\\n(b) Output power = %.2f W or %.5f kW\\n\\n(c) Line Current = %.3fA\\n\\n(d) input p.f. = %.2f lagging\"%(P,P/1000,Il,ipf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) rms value of input phase voltage = 239.600362 V\n",
+ " Vl = 201.390000 V\n",
+ "\n",
+ "(b) Output power = 8111.59 W or 8.11159 kW\n",
+ "\n",
+ "(c) Line Current = 13.426A\n",
+ "\n",
+ "(d) input p.f. = 0.84 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 109
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_7_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_7_3.ipynb new file mode 100755 index 00000000..7288e1e0 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_7_3.ipynb @@ -0,0 +1,204 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Cycloconverters"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 7.1, Page No.319"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input voltage, SCR ratings and input power factors\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 250 # single phase supply voltage \n",
+ "I = 50 # supply current\n",
+ "pf = 0.8 # lagging power factor\n",
+ "alfa = 0 # ideal SCR\n",
+ "\n",
+ "#calculations\n",
+ "x = math.sqrt(2)\n",
+ "x = math.floor(x*1000)/1000\n",
+ "Vm = (V*math.pi*x)/(3*math.sin(math.pi/3))\n",
+ "Vrms = Vm/math.sqrt(2)\n",
+ "Irms = I*math.sqrt(2)/math.sqrt(3)\n",
+ "y = math.sqrt(3)\n",
+ "y = math.floor(y*1000)/1000\n",
+ "piv = y*Vm\n",
+ "piv = math.floor(piv*100)/100\n",
+ "Ii = math.sqrt((I**2)/3)\n",
+ "pipp = V*I*pf/3.0\n",
+ "pf_i = pipp/(Vrms*Ii)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vm = %f V\\nrms current rating of thyristor = %.1f A\\nPIV = %.2fV\\nRMS value of input current = %.1f A\"%(Vm,math.ceil(Irms),piv,Ii))\n",
+ "print(\"Power input per phase = %.2f W\\nInput power factor = %.3f lagging.\"%(pipp,pf_i))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vm = 427.452050 V\n",
+ "rms current rating of thyristor = 41.0 A\n",
+ "PIV = 740.34V\n",
+ "RMS value of input current = 28.9 A\n",
+ "Power input per phase = 3333.33 W\n",
+ "Input power factor = 0.382 lagging.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 7.2, Page No. 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#output voltage(referring ex 7.1)\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 250 # single phase supply voltage \n",
+ "theta1 = 30 # firing angle 1\n",
+ "theta2 = 45 # firing angle 2\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "v1 = V*math.cos(theta1*math.pi/180)\n",
+ "#(b)\n",
+ "v2 = V*math.cos(theta2*math.pi/180)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) RMS value of output voltage = %.1f V\"%v1)\n",
+ "print(\"(b) RMS value of output voltage = %.2f V\"%v2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) RMS value of output voltage = 216.5 V\n",
+ "(b) RMS value of output voltage = 176.78 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 7.3, Page No.320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Output voltage for different firing angle\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vrms = 230 # input voltage\n",
+ "theta1 = 0 # firing angle 1\n",
+ "theta2 = 30 # firing angle 2\n",
+ "\n",
+ "#calculation\n",
+ "#(a)\n",
+ "v1 = 6*math.sqrt(2)*Vrms*math.sin(math.pi/6)*math.cos(theta1*math.pi/180)/(math.pi*math.sqrt(2))\n",
+ "#(b)\n",
+ "v2 = 6*math.sqrt(2)*Vrms*math.sin(math.pi/6)*math.cos(theta2*math.pi/180)/(math.pi*math.sqrt(2))\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Vo = %.2f V\\n(b) Vo = %.1f V\"%(v1,v2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Vo = 219.63 V\n",
+ "(b) Vo = 190.2 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 7.4, Page No.320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# supply voltage\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vo = 200 # output voltage\n",
+ "\n",
+ "#Calculation\n",
+ "Vi = Vo*(math.pi/3)/math.sin(math.pi/3)\n",
+ "\n",
+ "#Result\n",
+ "print(\"RMS value of input voltage = %.2f V \"%Vi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS value of input voltage = 241.84 V \n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_8_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_8_3.ipynb new file mode 100755 index 00000000..2f3270f0 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_8_3.ipynb @@ -0,0 +1,576 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Applications of Thyristors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.1, Page No. 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Crowbar circuit(refering to fig8.2)\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vz = 14.8 # zener breakdown voltage\n",
+ "Vt = 0.85 # thyristor trigger voltage\n",
+ "\n",
+ "# Calculations \n",
+ "Vi = Vz+Vt\n",
+ "\n",
+ "#Result \n",
+ "print(\"Thyrister will be turned on when voltage across R is %.2f V.\"%Vt)\n",
+ "print(\"Since zener breakdown at %.1f V, the crowbar circuit will be turned on when\\nVi = %.2f V\"%(Vz,Vi))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thyrister will be turned on when voltage across R is 0.85 V.\n",
+ "Since zener breakdown at 14.8 V, the crowbar circuit will be turned on when\n",
+ "Vi = 15.65 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.2, Page No. 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Crowbar circuit(refering to fig.8.2) \n",
+ "\n",
+ "import math\n",
+ "Rz = 15.0 # resistance of zener diode under breakdown condition\n",
+ "Ig = 20*10**-3 # gate triggering current of thyristor\n",
+ "Vz = 14.8 # zener breakdown voltage\n",
+ "Vt = 0.85 # thyristor trigger voltage\n",
+ "R = 50.0 # resistance\n",
+ "\n",
+ "#Calculations\n",
+ "Rt = (R*Rz)/(R+Rz)\n",
+ "V = Rt*Ig\n",
+ "Vi = Vz+Vt+V\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vi = %.3f V\"%Vi)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vi = 15.881 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.3, Page No. 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Values of R and C (refering to fig.8.3)\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 200 # input voltage\n",
+ "Il = 10 # load current\n",
+ "Toff1 = 15*10**-6 # turn off time\n",
+ "Ih = 4*10**-3 # thyristor holding current\n",
+ "\n",
+ "#Calculations\n",
+ "R = V/Ih\n",
+ "Rl = V/Il\n",
+ "C = Toff1/(Rl*math.log(2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"R = %.0f k-ohm\\nC = %.3f*10^-6 F\"%(R/1000,C*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R = 50 k-ohm\n",
+ "C = 1.082*10^-6 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.4, Page No. 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# duty cycle and Ton/Toff ratio\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "R = 60.0 # load resistance\n",
+ "P1 = 400.0 # output ppower in case 1\n",
+ "P2 = 700.0 # output ppower in case 2\n",
+ "\n",
+ "#Calculations\n",
+ "Pmax = (V**2)/R\n",
+ "#(a)\n",
+ "alfa = P1/Pmax\n",
+ "Ton = alfa\n",
+ "Toff= 1-Ton\n",
+ "r = Ton/Toff\n",
+ "#(b)\n",
+ "alfa2 = P2/Pmax\n",
+ "Ton2 = alfa2\n",
+ "Toff2= 1-Ton2\n",
+ "r2= Ton2/Toff2\n",
+ "\n",
+ "#Result\n",
+ "print(\"Maximum power output = %.2f W\\n\\n(a)\\n Duty cycle = %.4f\\n Ton/Toff = %.4f\"%(Pmax,alfa,math.ceil(r*10000)/10000))\n",
+ "print(\"\\n(b)\\n Duty cycle = %.3f\\n Ton/Toff = %.3f\"%(alfa2,math.ceil(r2*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum power output = 881.67 W\n",
+ "\n",
+ "(a)\n",
+ " Duty cycle = 0.4537\n",
+ " Ton/Toff = 0.8305\n",
+ "\n",
+ "(b)\n",
+ " Duty cycle = 0.794\n",
+ " Ton/Toff = 3.854\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.5, Page No.333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Output RMS voltage\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "Ton = 12.0 # circuit is on for 12 cycles\n",
+ "Toff = 19.0 # circuit is on for 19 cycles\n",
+ "V = 230.0 # input voltage\n",
+ "\n",
+ "#calcualtions\n",
+ "d = Ton/(Ton+Toff)\n",
+ "Vrms = V*math.sqrt(d)\n",
+ "\n",
+ "#Result\n",
+ "print(\"RMS output voltage = %.1f V\"%Vrms)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RMS output voltage = 143.1 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.6, Page No. 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Power supplied to heater\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230 # input voltage\n",
+ "R = 50 # load resistance\n",
+ "alfa1 = 90 # firing angle for case 1\n",
+ "alfa2 = 120 # firing angle for case 2\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = V*sqrt_2\n",
+ "\n",
+ "#(a)\n",
+ "Vl = Vm*math.sqrt((math.pi-(alfa1*math.pi/180)+((math.sin(2*alfa1*math.pi/180))/2.0))/(2*math.pi))\n",
+ "P = (Vl**2)/R\n",
+ "\n",
+ "#(b)\n",
+ "Vl2 = Vm*math.sqrt((math.pi-(alfa2*math.pi/180)+((math.sin(2*alfa2*math.pi/180))/2.0))/(2*math.pi))\n",
+ "P2 = (Vl**2)/R\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) when alfa = %.0f\u00b0,\\n Power = %.2fW\"%(alfa1,Vl))\n",
+ "print(\"\\n(b) when alfa = %.0f\u00b0,\\n Power = %.2fW\"%(alfa2,Vl2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) when alfa = 90\u00b0,\n",
+ " Power = 162.61W\n",
+ "\n",
+ "(b) when alfa = 120\u00b0,\n",
+ " Power = 101.68W\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.7, Page No.333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# finding firing angle\n",
+ "\n",
+ "import math\n",
+ "from numpy import poly1d\n",
+ "#variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "R = 10 # load resistance\n",
+ "P1 = 2645 # power supplied to heater in case a\n",
+ "P2 = 1587 # power supplied to heater in case b\n",
+ "\n",
+ "#Calculations\n",
+ "Pmax = (V**2)/R\n",
+ "#(a)\n",
+ "Vl1 = math.floor((math.sqrt(P1*R))*100)/100\n",
+ "#After solving equation using taylor seris of X, we got following coefficient. \n",
+ "P1 = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-2*math.pi*(1-(Vl1/V)**2))], variable = 'x')\n",
+ "x1 = P1.r[(P1.order+1)/2]*180/math.pi\n",
+ "alfa1 = x1.real\n",
+ "#(b)\n",
+ "Vl2 = math.floor((math.sqrt(P2*R))*1000)/1000\n",
+ "P2 = poly1d([128.0/math.factorial(7),0,-32.0/math.factorial(5),0,8.0/math.factorial(3),0,0,(-2*math.pi*0.762500)], variable = 'x')\n",
+ "# hardcoded value used to match the answer to the book\n",
+ "x2 = P2.r[(P2.order+1)/2]*180/math.pi\n",
+ "alfa2 = x2.real\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) firing angle = %.0f\u00b0\"%math.ceil(alfa1))\n",
+ "print(\"(b) firing angle = %.1f\u00b0\"%(alfa2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) firing angle = 90\u00b0\n",
+ "(b) firing angle = 108.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.8, Page No. 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# current rating and Peak Inverse Voltage of each thyristor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400 # 3-phase input voltage\n",
+ "P = 20*10**3 # load \n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "# since load is resistive, theta = 0\u00b0,therefore, cos(theta) = 1\n",
+ "I = P/(math.sqrt(3)*V)\n",
+ "PIV = V*math.sqrt(2)\n",
+ "PIV = math.floor(PIV*10)/10\n",
+ "#(b)\n",
+ "Ir = I/math.sqrt(2)\n",
+ "Ir = math.ceil(Ir*100)/100\n",
+ "#Result\n",
+ "print(\"(a)\\n I = %.2f A\\n During off state, line to line voltage can appear across triac. Hence current rating is %.2f A and\"%(I,I))\n",
+ "print(\" peak inverse voltage = %.1f V\"%PIV)\n",
+ "print(\"\\n(b)\\n Each thyristor conducts for every half cycle.\\n current rating = %.2f A\\n Peak inverse voltage is the same i.e. %.1f V\"%(Ir,PIV))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " I = 28.87 A\n",
+ " During off state, line to line voltage can appear across triac. Hence current rating is 28.87 A and\n",
+ " peak inverse voltage = 565.6 V\n",
+ "\n",
+ "(b)\n",
+ " Each thyristor conducts for every half cycle.\n",
+ " current rating = 20.42 A\n",
+ " Peak inverse voltage is the same i.e. 565.6 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.9, Page No.338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# applied voltage and current\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "t = 5*10**-2 # insulating slab thickness\n",
+ "A = 100*10**-4 # insulating slab area\n",
+ "P = 300 # power \n",
+ "f = 10*10**6 # frequency\n",
+ "eps = 8.85*10**-12 # permitivity of free space\n",
+ "eps_r = 4.5 # relative permitivity\n",
+ "pf = 0.05 # power factor\n",
+ "\n",
+ "#Calculation\n",
+ "C = eps*eps_r*A/t\n",
+ "pi =math.floor(math.pi*100)/100\n",
+ "w = 2*pi*f\n",
+ "fi = (math.acos(pf))*(180/math.pi)\n",
+ "sig =90-fi\n",
+ "sig = math.ceil(sig*1000)/1000\n",
+ "sig = sig*math.pi/180\n",
+ "V = math.sqrt(P/(w*C*math.tan(sig)))\n",
+ "I = P/(V*pf)\n",
+ "\n",
+ "#Result\n",
+ "print(\"V = %.1f V\\nI = %.2f A\"%(V,I))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V = 3461.2 V\n",
+ "I = 1.73 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.10, Page No. 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# power input and current\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "t = 1*10**-2 # insulating slab thickness\n",
+ "A = 50*10**-4 # insulating slab area\n",
+ "V = 400 # input voltage \n",
+ "f = 20*10**6 # frequency\n",
+ "eps = 8.85*10**-12 # permitivity of free space\n",
+ "eps_r = 5 # relative permitivity\n",
+ "pf = 0.05 # power factor\n",
+ "\n",
+ "#Calculation\n",
+ "C = eps*eps_r*A/t\n",
+ "w = 2*math.pi*f\n",
+ "fi = (math.acos(pf))*(180/math.pi)\n",
+ "sig =90-fi\n",
+ "sig = math.ceil(sig*1000)/1000\n",
+ "sig = sig*math.pi/180\n",
+ "P = (V**2)*(w*C*math.tan(sig))\n",
+ "I = P/(V*pf)\n",
+ "\n",
+ "#Result\n",
+ "print(\"P = %.2f W\\nI = %.4f A\"%(P,I))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P = 22.27 W\n",
+ "I = 1.1135 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 8.11, Page No. 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# voltage of the source and current input\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "t = 2 # insulating slab thickness\n",
+ "A = 75 # insulating slab area\n",
+ "T1 = 20 # lower temperature\n",
+ "T2 = 50 # Higher temperature\n",
+ "Time = 7*60 # time \n",
+ "f = 20*10**6 # frequency\n",
+ "eps = 8.85*10**-12 # permitivity of free space\n",
+ "eps_r =6.5 # relative permitivity\n",
+ "sh = 0.25 # specific heat\n",
+ "den = 0.55 # density\n",
+ "pf = 0.04 # power factor\n",
+ "\n",
+ "#Calculations\n",
+ "C = eps*eps_r*A*10**-4/(t*10**-2)\n",
+ "w = 2*math.pi*f\n",
+ "fi = (math.acos(pf))*(180/math.pi)\n",
+ "sig =90-fi\n",
+ "sig = math.ceil(sig*1000)/1000\n",
+ "sig = sig*math.pi/180\n",
+ "\n",
+ "m = A*t*den\n",
+ "H = m*sh*(T2-T1)\n",
+ "TH = H/0.9\n",
+ "Ei = TH*4.186\n",
+ "P = Ei/Time\n",
+ "P = math.floor(P*100)/100\n",
+ "V = math.sqrt(P/(w*C*pf))\n",
+ "V = math.ceil(V*100)/100\n",
+ "I = P/(V*pf)\n",
+ "I = math.floor(I*1000)/1000\n",
+ "#Result\n",
+ "print(\"V = %.2f V\\nI = %.3f A\"%(V,I))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V = 251.35 V\n",
+ "I = 0.681 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 86
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_9_3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_9_3.ipynb new file mode 100755 index 00000000..9cc8b752 --- /dev/null +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/Power_electronics_ch_9_3.ipynb @@ -0,0 +1,1255 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9: DC and AC Motor Drives"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.1, Page No. 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Field current, firing angle and power factor\n",
+ "\n",
+ "import math\n",
+ "# Variable delcaration\n",
+ "V= 230.0 # input supply voltage\n",
+ "f = 50.0 # supply frequency\n",
+ "alfa_f = 0 # firing angle for semi-converter for field\n",
+ "Rf = 200.0 # field resistance\n",
+ "Ra = 0.3 # Armature resistance\n",
+ "T = 50.0 # torque\n",
+ "r = 900.0 # rpm\n",
+ "vc = 0.8 # voltage constant\n",
+ "tc = 0.8 # torque constant\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = V*sqrt_2\n",
+ "Vf = (2*Vm/math.pi)*math.cos(alfa_f)\n",
+ "If = Vf/Rf\n",
+ "If = math.floor(If*10**4)/10**4\n",
+ "#(b)\n",
+ "Ia = T/(tc*If)\n",
+ "Ia = math.ceil(Ia*1000)/1000\n",
+ "w = r*2*math.pi/60\n",
+ "w = math.ceil(w*1000)/1000\n",
+ "back_emf =vc*w*If\n",
+ "back_emf = math.floor(back_emf*100)/100\n",
+ "Va = back_emf+Ia*Ra\n",
+ "Va = math.floor(Va*1000)/1000\n",
+ "alfa = math.acos((Va*math.pi/(Vm))-1)\n",
+ "alfa_a = alfa*180/math.pi\n",
+ "alfa_a = math.floor(alfa_a*1000)/1000\n",
+ "#(c)\n",
+ "P = Va*Ia\n",
+ "Ii = Ia*math.sqrt((180-alfa_a)/180)\n",
+ "Ii = math.floor(Ii*100)/100\n",
+ "VA = V*Ii\n",
+ "pf = P/VA\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Field current = %.4f A\\n(b) Alfa_a = %.3f\u00b0\\n(c) Input power factor = %.3f lagging\"%(If,alfa_a,pf))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Field current = 1.0352 A\n",
+ "(b) Alfa_a = 94.076\u00b0\n",
+ "(c) Input power factor = 0.605 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.2, Page No.378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Torque developed and motor speed\n",
+ "\n",
+ "import math\n",
+ "# Variable delcaration\n",
+ "V= 230.0 # input supply voltage\n",
+ "f = 50.0 # supply frequency\n",
+ "alfa_f = 0 # firing angle of converter in the field\n",
+ "Rf = 200.0 # field resistance\n",
+ "Ra = 0.25 # Armature resistance\n",
+ "Ia = 50 # Armature current\n",
+ "vc = 1.1 # voltage constant\n",
+ "tc = 1.1 # torque constant\n",
+ "alfa_a = 45 # firing angle of armature ciruit\n",
+ "\n",
+ "#Calculations\n",
+ "alfa_a = alfa_a*math.pi/180\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = V*sqrt_2\n",
+ "Vf = 2*Vm*math.cos(alfa_f)/math.pi\n",
+ "Va = 2*Vm*math.cos(alfa_a)/math.pi\n",
+ "If = Vf/Rf\n",
+ "If = math.floor(If*10**4)/10**4\n",
+ "T = tc*Ia*If\n",
+ "bemf = Va- Ia*Ra - 2\n",
+ "w = bemf/(vc*If)\n",
+ "N = w*60/(2*math.pi)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Torque = %.3f N-m\\n\\nMotor Speed = %.1f rpm\"%(T,N))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Torque = 56.936 N-m\n",
+ "\n",
+ "Motor Speed = 1106.1 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.3, Page No. 378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# firing angle of the converter in the armature circuit\n",
+ "\n",
+ "import math\n",
+ "V = 400 # input 3-phase supply\n",
+ "alfa_f = 0 # firing angle of field converter\n",
+ "Ra = 0.3 # Armature resistance\n",
+ "Rf = 250 # field resistance\n",
+ "Ia = 50 # Armature current\n",
+ "vc = 1.3 # motor voltage constant\n",
+ "N = 1200 # speed in rpm\n",
+ "\n",
+ "#Calculations\n",
+ "Vf = 3*math.sqrt(3)*V*math.sqrt(2)*math.cos(alfa_f)/(math.sqrt(3)*math.pi)\n",
+ "If = Vf/Rf\n",
+ "w = N*2*math.pi/60\n",
+ "Eb = vc*If*w\n",
+ "Va = Eb+Ia*Ra\n",
+ "alfa_a = math.acos(Va*math.sqrt(3)*math.pi/(3*V*math.sqrt(2)*math.sqrt(3)))\n",
+ "alfa_a = alfa_a*180/math.pi\n",
+ "alfa_a = math.ceil(alfa_a*100)/100\n",
+ "#Result\n",
+ "print(\"Alfa_a = %.2f\u00b0\"%alfa_a)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Alfa_a = 47.07\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.4, Page No. 378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input power, speed and torque\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "V = 500 # input supply voltage\n",
+ "Ra = 0.1 # Armature resistance\n",
+ "Ia = 200.0 # Armature current\n",
+ "vc = 1.4 # Volatage constant\n",
+ "tc = 1.4 # Torque constant\n",
+ "If = 2 # Field current\n",
+ "d = 0.5 # chopper duty cycle\n",
+ "\n",
+ "# Calculations\n",
+ "#(a)\n",
+ "Pi = d*V*Ia\n",
+ "#(b)\n",
+ "Va = V*d\n",
+ "Eb = Va - Ia*Ra\n",
+ "w = Eb/(vc*If)\n",
+ "w = math.floor(w*100)/100\n",
+ "N = w*60/(2*math.pi)\n",
+ "#(c)\n",
+ "T = tc*Ia*If\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Power input = %.0f kW \\n(b) Speed = %.2f rpm\\n(c) Torque = %.0f N-m\"%(Pi/1000,N,T))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Power input = 50 kW \n",
+ "(b) Speed = 784.38 rpm\n",
+ "(c) Torque = 560 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.5, Page No. 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Braking DC motor using one quadrant chopper\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ra = 0.1 # Armature resistance\n",
+ "Rb = 7.5 # Breaking resistance\n",
+ "vc = 1.4 # voltage constant\n",
+ "Ia = 120 # armature current\n",
+ "If = 1.6 # field current\n",
+ "d = 0.35 # chopper duty cycle\n",
+ "\n",
+ "#calculations\n",
+ "#(a)\n",
+ "Vavg = Rb*Ia*(1-d)\n",
+ "#(b)\n",
+ "Pb = (Ia**2)*Rb*((1-d)**2)\n",
+ "#(c)\n",
+ "Eb = Vavg+Ra*Ia\n",
+ "w = Eb/(vc*If)\n",
+ "w = math.ceil(w*100)/100\n",
+ "N = w*60/(2*math.pi)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) Average voltage across chopper = %.0f V\\n(b) Pb = %.0f W\\n(c) Speed = %.4f rpm \"%(Vavg,Pb,N))\n",
+ "#Answer for Pb and Speed is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Average voltage across chopper = 585 V\n",
+ "(b) Pb = 45630 W\n",
+ "(c) Speed = 2545.0785 rpm \n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.6, Page No. 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Speed -Torque characteristics\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 220.0 # per phase input voltage\n",
+ "f = 50 # frequency\n",
+ "L = 0.012 # motor inductance\n",
+ "R = 0.72 # Resistance\n",
+ "a = 2 # Armature constant\n",
+ "alfa = 90 # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "sqrt_2=math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3=math.floor(math.sqrt(3)*1000)/1000\n",
+ "Va = 3*sqrt_3*V*sqrt_2*(1+math.cos(alfa*math.pi/180))/(2*math.pi)\n",
+ "Va = math.floor(Va*100)/100\n",
+ "Ia1 = 5 # Armature current for case 1\n",
+ "T1 = Ia1*a\n",
+ "Eb1 =Va-Ia1*R\n",
+ "Speed1 = Eb1*60/(a*2*math.pi) \n",
+ "Speed1 = math.floor(Speed1*100)/100\n",
+ "\n",
+ "Ia2 = 10 # Armature current for case 2\n",
+ "T2 = Ia2*a\n",
+ "Eb2 =Va-Ia2*R\n",
+ "Speed2 = Eb2*60/(a*2*math.pi) \n",
+ "Speed2 = math.floor(Speed2*100)/100\n",
+ "\n",
+ "Ia3 = 20 # Armature current for case 3\n",
+ "T3 = Ia3*a\n",
+ "Eb3 =Va-Ia3*R\n",
+ "Speed3 = Eb3*60/(a*2*math.pi) \n",
+ "Speed3 = math.floor(Speed3*100)/100\n",
+ "\n",
+ "Ia4 = 30 # Armature current for case 4\n",
+ "T4 = Ia4*a\n",
+ "Eb4 =Va-Ia4*R\n",
+ "Speed4 = Eb4*60/(a*2*math.pi) \n",
+ "Speed4 = math.floor(Speed4*100)/100\n",
+ "\n",
+ "#Result\n",
+ "print(\"Armature Voltage =%f V\"%Va)\n",
+ "print(\"For Ia =0%d A, Torque = %d N-m and Speed = %.2f rpm\"%(Ia1,T1,Speed1))\n",
+ "print(\"For Ia =%d A, Torque = %d N-m and Speed = %.2f rpm\"%(Ia2,T2,Speed2))\n",
+ "print(\"For Ia =%d A, Torque = %d N-m and Speed = %.2f rpm\"%(Ia3,T3,Speed3))\n",
+ "print(\"For Ia =%d A, Torque = %d N-m and Speed = %.2f rpm\"%(Ia4,T4,Speed4))\n",
+ "#################-----PLOT-----#####################\n",
+ "%matplotlib inline\n",
+ "import matplotlib.pyplot as plt\n",
+ "t = [T1, T2, T3, T4]\n",
+ "S = [Speed1, Speed2, Speed3, Speed4 ]\n",
+ "plt.plot(t,S)\n",
+ "plt.plot(t,S,'ro')\n",
+ "plt.axis([0,70,0,1500])\n",
+ "plt.xlabel('Torque(N-m)')\n",
+ "plt.ylabel('Speed(RPM)')\n",
+ "plt.title('Speed torque characteristics')\n",
+ "plt.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Armature Voltage =257.250000 V\n",
+ "For Ia =05 A, Torque = 10 N-m and Speed = 1211.08 rpm\n",
+ "For Ia =10 A, Torque = 20 N-m and Speed = 1193.90 rpm\n",
+ "For Ia =20 A, Torque = 40 N-m and Speed = 1159.52 rpm\n",
+ "For Ia =30 A, Torque = 60 N-m and Speed = 1125.14 rpm\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEZCAYAAABrUHmEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVOW+B/DvAKN44SKog8ygY4DCyEUUcevxMqaAWqJp\nUpiKl2qbu9LsnLROFnYBup3SdrS74GW7My/1hGZKmIpaGhhgbEUTERSGSykgIiAC7/mDzQoUZIEw\nMPr9PM88z7qv3xplfedd6501CiGEABERkQxmHV0AERGZDoYGERHJxtAgIiLZGBpERCQbQ4OIiGRj\naBARkWwMDeqU9Ho9oqOjO7qMdnU3HWNERASeeOKJVq1rZWWFrKysti2I2g1Dgxr48ccfMXr0aNja\n2sLe3h5jxozBL7/8YvQ6FAoFFApFo/PCwsIwb948I1fU9m53jMa0YMECrF69+o628eKLL+Kzzz5r\ndrnGgvLq1avQarV3tH8yHouOLoA6j5KSEjz44IP45JNPEBwcjOvXr+PIkSPo2rVrR5fWpqqrq2Fu\nbt7RZbSpmpoamJl1zGfAlryfnSEk6Q4Jov84fvy4sLW1bXL+hg0bxOjRo8XTTz8tbGxshJubm9i/\nf780v7i4WCxatEj069dPqNVq8fLLL4vq6mppfnR0tHB3dxe9evUSgYGB4sKFC9K8uLg4MXjwYGFj\nYyOefvppMX78ePH555/fUsPevXtFly5dhFKpFD179hRDhw4VQghhMBjEtGnThJ2dnXB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
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.7, Page No. 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Firing angle and no load speed\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400 # input 3-phase voltage\n",
+ "f = 50 # frequency\n",
+ "Ia = 50 # motor armature current\n",
+ "Ra = 0.1 # armature resistance\n",
+ "bec = 0.3 # back emf constant\n",
+ "alfa = 30.0 # firing angle\n",
+ "Inl = 5 # no load current\n",
+ "n = 1600 # speed in rpm \n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "sqrt_2=math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3=math.floor(math.sqrt(3)*100)/100\n",
+ "Va = 3*sqrt_3*V*sqrt_2*(1+math.cos(alfa*math.pi/180))/(sqrt_3*2*math.pi)\n",
+ "Bemf = Va-Inl*Ra\n",
+ "Speed = Bemf/bec\n",
+ "#(b)\n",
+ "Bemf2 = n*bec\n",
+ "Vi = Bemf2+(Ra*Ia)\n",
+ "alfa2= math.acos((Vi/(3*sqrt_3*V*sqrt_2/(sqrt_3*2*math.pi)))-1)\n",
+ "alfa2 = alfa2*180/math.pi\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nAverage output voltage of rectifier = %.1f V\\nBack emf = %.1f V\\nSpeed = %d rpm\"%(math.floor(Va*10)/10,Bemf,Speed))\n",
+ "print(\"\\n(b)\\nBack emf = %.0f V\\nInput voltage to motor = %.0f V\\nfiring angle = %.2f\u00b0\"%(Bemf2,Vi,alfa2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Average output voltage of rectifier = 503.9 V\n",
+ "Back emf = 503.4 V\n",
+ "Speed = 1678 rpm\n",
+ "\n",
+ "(b)\n",
+ "Back emf = 480 V\n",
+ "Input voltage to motor = 485 V\n",
+ "firing angle = 37.26\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 147
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.8, Page No. 381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#firing angle of converter and power fed back to source(refering ex.9.2)\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V= 230.0 # input supply voltage\n",
+ "f = 50.0 # supply frequency\n",
+ "alfa_f = 0 # firing angle of converter in the field\n",
+ "Rf = 200.0 # field resistance\n",
+ "Ra = 0.25 # Armature resistance\n",
+ "Ia = 50 # Armature current\n",
+ "vc = 1.1 # voltage constant\n",
+ "tc = 1.1 # torque constant\n",
+ "alfa_a = 45 # firing angle of armature ciruit\n",
+ "\n",
+ "#Calculations\n",
+ "alfa_a = alfa_a*math.pi/180\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vm = V*sqrt_2\n",
+ "Vf = 2*Vm*math.cos(alfa_f)/math.pi\n",
+ "Va1 = 2*Vm*math.cos(alfa_a)/math.pi\n",
+ "bemf = Va1- Ia*Ra - 2\n",
+ "Eg = -bemf\n",
+ "Va = Eg + Ia*Ra +2\n",
+ "alfa = math.acos(Va*math.pi/(2*sqrt_2*V))\n",
+ "alfa = alfa*180/math.pi\n",
+ "P = -Va*Ia\n",
+ "\n",
+ "#Result\n",
+ "print(\"When field current is reversed, the direction of back emf is reversed. The motor now acts as generator.\\n\\nEg = %f\"%Eg)\n",
+ "print(\"\\nAlfa = %.2f\u00b0\\n\\nPower fed back to source = %d W\"%(alfa,P))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When field current is reversed, the direction of back emf is reversed. The motor now acts as generator.\n",
+ "\n",
+ "Eg = -131.900436\n",
+ "\n",
+ "Alfa = 124.54\u00b0\n",
+ "\n",
+ "Power fed back to source = 5870 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 152
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.9, Page No.381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Half controlled single phase bridge converter\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "V = 240 # input DC voltage\n",
+ "alfa = 100 # firing angle \n",
+ "Ra = 6 # armature Resistance\n",
+ "Ia = 1.8 # armature current\n",
+ "\n",
+ "#Calculations\n",
+ "alfa = alfa*math.pi/180\n",
+ "sqrt_2=math.floor(math.sqrt(2)*1000)/1000\n",
+ "Vdc = sqrt_2*V*(1+math.cos(alfa))/math.pi\n",
+ "Vdc = math.floor(Vdc*100)/100\n",
+ "Bemf = Vdc-Ra*Ia\n",
+ "\n",
+ "#Result\n",
+ "print(\"Back emf = %.2f V\"%Bemf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Back emf = 78.46 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 96
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.10, Page No.381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Speed and Torue\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 230.0 # input voltage\n",
+ "N = 1500.0 # rpm \n",
+ "Ra = 1.0 # armature resistance\n",
+ "Ia = 10 # Armature current\n",
+ "T1 = 5 # Torque for case-1\n",
+ "alfa1 = 30 # Firing angle for case-1\n",
+ "N2 = 950.0 # rpm in case-2\n",
+ "alfa2 = 45 # Firing angle for case-2\n",
+ "\n",
+ "#Calculations\n",
+ "w = N*2*math.pi/60\n",
+ "k = (V-Ia*Ra)/w\n",
+ "k = math.floor(k*10)/10\n",
+ "#(a)\n",
+ "Ia1 = T1/k\n",
+ "V1 = 2*V*math.sqrt(2)*math.cos(alfa1*math.pi/180)/math.pi\n",
+ "V1 = math.floor(V1*10)/10\n",
+ "w1 = (V1-Ia1*Ra)/k\n",
+ "w1 = w1*60/(2*math.pi)\n",
+ "#(b)\n",
+ "V2 = 2*V*math.sqrt(2)*math.cos(alfa2*math.pi/180)/math.pi\n",
+ "V2 = math.ceil(V2*100)/100\n",
+ "Ia2 = V2-(k*N2*2*math.pi/60)\n",
+ "#Ia2 = math.floor(Ia2*100)/100\n",
+ "T2 = k*Ia2\n",
+ "\n",
+ "#Result\n",
+ "print(\"k - Torque constant = %.1f N-m/A\"%k)\n",
+ "print(\"\\n(a) Speed = %.1f rpm\\n\\n(b) Torque = %f N-m\"%(w1,T2))\n",
+ "#Answer for torque is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "k - Torque constant = 1.4 N-m/A\n",
+ "\n",
+ "(a) Speed = 1198.6 rpm\n",
+ "\n",
+ "(b) Torque = 10.013816 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 177
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.11, Page No.382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# rms source, rms and average thyristor current and power factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 500.0 # Morot max. voltage rating\n",
+ "N = 1500.0 # motor max. speed in rpm\n",
+ "Ia = 100.0 # Motor max. current\n",
+ "Vi = 350.0 # 3-phase input supply voltage\n",
+ "Ra = 1.1 # armature resistance\n",
+ "alfa = 45 # firing angle\n",
+ "N1 = 1200.0 # actual speed \n",
+ "\n",
+ "#Calculations\n",
+ "w = N*2*math.pi/60\n",
+ "w1 = N1*2*math.pi/60\n",
+ "k = (V-Ia*Ra)/w\n",
+ "k = math.floor(k*10**4)/10**4\n",
+ "sqrt_2=math.floor(math.sqrt(2)*1000)/1000\n",
+ "sqrt_3=math.floor(math.sqrt(3)*100)/100\n",
+ "Va = 3*sqrt_3*Vi*sqrt_2*(1+math.cos(alfa*math.pi/180))/(sqrt_3*2*3.142)#--math.pi = 3.142 to match the ans\n",
+ "Va = math.ceil(Va*100)/100\n",
+ "Ia = (Va -k*w1)/Ra\n",
+ "Ia = math.ceil(Ia*100)/100\n",
+ "Irms_i = Ia*math.sqrt(120.0/180.0)\n",
+ "Iavg = Ia/3\n",
+ "Irms = Ia/math.sqrt(3)\n",
+ "pf = (Ia*Va)/(sqrt_3*Vi*Irms_i)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Torque constant, k = %.2f V-s/rad\\n\\n(a)\\nConverter output voltage = %.2f V\\nIa = %.2f A \"%(k,Va,Ia))\n",
+ "print(\"\\n(b)\\nRMS input current = %.2f A\\nAverage thyristor current = %.2f A\\nRMS thyristor current = %.2f A\"%(Irms_i,Iavg,Irms))\n",
+ "print(\"Input power factor = %.3f lagging\"%(math.floor(pf*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Torque constant, k = 2.48 V-s/rad\n",
+ "\n",
+ "(a)\n",
+ "Converter output voltage = 403.34 V\n",
+ "Ia = 83.04 A \n",
+ "\n",
+ "(b)\n",
+ "RMS input current = 67.80 A\n",
+ "Average thyristor current = 27.68 A\n",
+ "RMS thyristor current = 47.94 A\n",
+ "Input power factor = 0.815 lagging\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.12, Page No.383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# time taken by motor to reach 1000rpm speed\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "T = 40 # Load torque\n",
+ "N = 500.0 # motor speed \n",
+ "i = 0.01 # inertia of the drive\n",
+ "T1 = 100.0 # increased value of torque\n",
+ "N1 = 1000.0 # speed value\n",
+ "\n",
+ "#Calculations\n",
+ "w = N*2*math.pi/60\n",
+ "w1 = N1*2*math.pi/60\n",
+ "A = -w/((T1-T)/i)\n",
+ "t = (w1/((T1-T)/i))+A\n",
+ "t = math.floor(t*10**6)/10**6\n",
+ "\n",
+ "#Result\n",
+ "print(\"Time taken by motor to reach 1000 rpm speed = %f seconds\"%t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time taken by motor to reach 1000 rpm speed = 0.008726 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.13, Page No.384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# motor parameters:motor driven by DC chopper\n",
+ "\n",
+ "import math\n",
+ "#Variavble declaration\n",
+ "f = 400.0 # chopper operating frequency\n",
+ "V = 200.0 # input voltage\n",
+ "T = 30.0 # load torque\n",
+ "N = 1000.0 # speed in rpm\n",
+ "Ra = 0.2 # motor resistance\n",
+ "L = 2*10**-3 # motor inductance\n",
+ "emf = 1.5 # emf\n",
+ "k = 1.5 # torque constant\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "w = N*math.pi*2/60\n",
+ "Ia = T/k\n",
+ "Be = emf*w\n",
+ "Be = math.ceil(Be*100)/100\n",
+ "alfa = (Be+Ia*Ra)/V\n",
+ "\n",
+ "t = 1/f\n",
+ "Ton = alfa*t\n",
+ "Toff = t-Ton\n",
+ "x = t*Ra/L\n",
+ "b1 = (1-(math.e**(-alfa*x)))\n",
+ "b1 = math.ceil(b1*10**4)/10**4\n",
+ "b2 = (1-(math.e**(-x)))\n",
+ "b2 = math.ceil(b2*10**4)/10**4\n",
+ "Imax = ((V/Ra)*(b1/b2))-(Be/Ra)\n",
+ "Imin= ((V/Ra)*(((math.e**(alfa*x))-1)/(((math.e**(x))-1))))-(Be/Ra)\n",
+ "x1 = (V-Be)/Ra\n",
+ "x2 = Ra/L\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\nImax = %.3f A\\nImin = %d A\\n\\n(b) Excursion of armature current = %.3f A\"%(Imax,Imin,Imax))\n",
+ "print(\"\\n(c)\\nVariation of cuurent during on period of chopper is \\ni = %.1f*(1-e^(-%d*t'))\"%(x1,x2))\n",
+ "print(\"\\nVariation of cuurent during off period of chopper is \\ni = %.3f*e^(-%d*t')-%.1f*(1-e^(-%d*t'))\"%(Imax,x2,Be/Ra,x2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "Imax = 39.193 A\n",
+ "Imin = 0 A\n",
+ "\n",
+ "(b) Excursion of armature current = 39.193 A\n",
+ "\n",
+ "(c)\n",
+ "Variation of cuurent during on period of chopper is \n",
+ "i = 214.6*(1-e^(-100*t'))\n",
+ "\n",
+ "Variation of cuurent during off period of chopper is \n",
+ "i = 39.193*e^(-100*t')-785.4*(1-e^(-100*t'))\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.14, Page No.391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Average motor current and speed\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "f = 50.0 # input frequency\n",
+ "V = 230 # input voltage\n",
+ "Ra = 1.5 # armature resistance\n",
+ "Rf = 1.5 # field resistance\n",
+ "K = 0.25 # torque constant\n",
+ "TL = 25 # load torque\n",
+ "emf = 0.25 # emf constant\n",
+ "\n",
+ "#Calculations\n",
+ "Vo = 2*math.sqrt(2)*V/math.pi\n",
+ "Vo = math.floor(Vo)\n",
+ "Ia = math.sqrt(T/K)\n",
+ "Ia = math.floor(Ia)\n",
+ "w = (Vo-Ia*Ra)/(emf*Ia)\n",
+ "N =w*60/(2*math.pi)\n",
+ "N = math.floor(N*100)/100\n",
+ "\n",
+ "#Result\n",
+ "print(\"Ia = %d A\\nN = %.2f RPM\"%(Ia,N))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ia = 10 A\n",
+ "N = 733.38 RPM\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.15, Page No.391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Armature current and firing angle of semi-converter\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vo = 675.0 # transformer secondary voltage\n",
+ "alfa1 = 90.5 # case 1 firing angle\n",
+ "N1 = 350.0 # case 1 motor speed in rpm\n",
+ "Ia1 = 30.0 # case 1 armature current\n",
+ "N2 = 500.0 # expected speed\n",
+ "Ra = 0.22 # armature resistance\n",
+ "Rf = 0.22 # field resistance\n",
+ "\n",
+ "#Calculations\n",
+ "Ia2 = Ia1*N2/N1\n",
+ "Ia2 = math.ceil(Ia2*100)/100\n",
+ "Va1 = Vo*math.sqrt(2)*(1+math.cos(alfa1*math.pi/180))/math.pi\n",
+ "Eb1 = Va1-(Ia1*(Ra+Rf))\n",
+ "Va2 = (Eb1/((Ia1*N1)/(Ia2*N2)))+Ia2*(Ra+Rf)\n",
+ "alfa2 = math.acos(((Va2*math.pi)/(math.sqrt(2)*Vo))-1)\n",
+ "alfa2 = alfa2*180/math.pi\n",
+ "\n",
+ "#Result\n",
+ "print(\"Armature current = %.2f A\\n\\nFiring Angle = %.2f\u00b0\"%(Ia2,alfa2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Armature current = 42.86 A\n",
+ "\n",
+ "Firing Angle = 4.77\u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.16, Page No. 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Torque and armature current\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "P = 15.0 # motor power rating\n",
+ "V = 220.0 # motor voltage rating\n",
+ "N = 1500.0 # motor max. speed\n",
+ "Vi = 230.0 # input voltage\n",
+ "emf = 0.03 # emf constant\n",
+ "K = 0.03 # Torque constant\n",
+ "alfa =45 # firing angle\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "alfa = alfa*math.pi/180\n",
+ "Vm = Vi*sqrt_2\n",
+ "N = N*2*math.pi/60\n",
+ "T = (4*emf*(Vm**2)*(math.cos(alfa)**2))/(((math.pi)**2)*(K*N)**2)\n",
+ "Ia = math.sqrt(T/K)\n",
+ "Ia = math.floor(Ia*100)/100\n",
+ "#(b)\n",
+ "Ia2 = Vm*(1+math.cos(alfa))/(math.pi*K*N)\n",
+ "Ia2 = math.floor(Ia2*10)/10\n",
+ "T2 = K*Ia2**2\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a)\\n Torque = %.2f N-m\\n Armature current = %.2f A\"%(T,Ia))\n",
+ "print(\"\\n(b)\\n Armature current = %.1f A\\n Torque = %.4f N-m\"%(Ia2,T2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " Torque = 28.96 N-m\n",
+ " Armature current = 31.06 A\n",
+ "\n",
+ "(b)\n",
+ " Armature current = 37.5 A\n",
+ " Torque = 42.1875 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.17, Page No.392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# motor current and Torque \n",
+ "\n",
+ "import math\n",
+ "# variable declaration\n",
+ "Pr = 15.0 # motor power rating\n",
+ "Vr = 220.0 # motor voltage rating\n",
+ "N = 1000.0 # motor max. speed\n",
+ "R = 0.2 # total armature and series resistance\n",
+ "Vi = 230.0 # input voltage\n",
+ "Ks = 0.03 # speed constant\n",
+ "K = 0.03 # Torque constant\n",
+ "alfa = 30 # Firing angle\n",
+ "\n",
+ "#Calculation\n",
+ "sqrt_2 = math.floor(math.sqrt(2)*1000)/1000\n",
+ "alfa = alfa*math.pi/180\n",
+ "Vm = Vi*sqrt_2\n",
+ "N = N*2*math.pi/60\n",
+ "N = math.ceil(N*100)/100\n",
+ "V = Vm*(1+math.cos(alfa))/math.pi\n",
+ "V = math.floor(V*100)/100\n",
+ "Ia = V/((Ks*N)+R)\n",
+ "Ia = math.floor(Ia*1000)/1000\n",
+ "T = K*(Ia*Ia)\n",
+ "\n",
+ "# Result\n",
+ "print(\"Armature current = %.3f A\\n\\nTorque = %.2f N-m\"%(Ia,T))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Armature current = 57.807 A\n",
+ "\n",
+ "Torque = 100.25 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.18, Page No. 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# load torque, rotor current and stator voltage\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "V = 400.0 # motor voltage rating\n",
+ "p = 4.0 # no of poles\n",
+ "f = 50.0 # frequency\n",
+ "r1 = 0.64 # Stator resistance \n",
+ "x1 = 1.1 # leakage resistance\n",
+ "r2 = 0.08 # rotor resistance\n",
+ "x2 = 0.12 # leakage resistance\n",
+ "T = 40.0 # Torque at given speed\n",
+ "N1 = 1440.0 # Speed value for given torque\n",
+ "N2 = 1300.0 # Speed value for which torque is asked to calculate\n",
+ "\n",
+ "#Calculations\n",
+ "#(a)\n",
+ "ns = 60*2*f/p\n",
+ "Tl = T*(N2/N1)**2\n",
+ "Tl = math.floor(Tl*10)/10\n",
+ "#(b)\n",
+ "s = (ns -N2)/ns\n",
+ "r2_dash = r2*(2)**2\n",
+ "x2_dash = x2*(2)**2\n",
+ "pi = math.floor(math.pi*100)/100\n",
+ "I2_dash = math.sqrt((Tl*2*pi*s*(ns/60))/(3*r2_dash)) \n",
+ "I2 = 2*I2_dash\n",
+ "#(c)\n",
+ "I1 = I2_dash\n",
+ "V1 = I1*math.sqrt(((r1+r2_dash+r2_dash*((1-s)/s))**2)+(x1+x2_dash)**2)\n",
+ "StV = V1*math.sqrt(3)\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) At %d rpm , Load torque = %.1f N-m\\n(b) Rotor current = %.2f A\\n(c) Stator voltage = %.1f V\"%(N2,Tl,I2,StV))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) At 1300 rpm , Load torque = 32.6 N-m\n",
+ "(b) Rotor current = 53.32 A\n",
+ "(c) Stator voltage = 158.2 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 2.19, Page No. 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# slip for max torque, speed and corresponding max torque\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V = 400.0 # motor voltage rating\n",
+ "p = 4.0 # no of poles\n",
+ "f = 50.0 # frequency\n",
+ "r1 = 0.64 # Stator resistance \n",
+ "x1 = 1.1 # leakage resistance\n",
+ "r2 = 0.08 # rotor resistance\n",
+ "x2 = 0.12 # leakage resistance\n",
+ "T = 40.0 # Torque at given speed\n",
+ "N1 = 1440.0 # Speed value for given torque\n",
+ "N2 = 1300.0 # Speed value for which torque is asked to calculate\n",
+ "f1 = 50 # case 1 frequency\n",
+ "f2 = 25 # case 2 frequency\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "ns = 2*f1/p\n",
+ "r2_dash = r2*(2)**2\n",
+ "x2_dash = x2*(2)**2\n",
+ "s = r2_dash/math.sqrt(r1**2+(x1+x2_dash)**2)\n",
+ "s = math.floor(s*10000)/10000\n",
+ "V1 = V/math.sqrt(3)\n",
+ "V1 = math.ceil(V1*100)/100\n",
+ "Tmax = (1.5*V1**2/(2*math.pi*ns))*(1/(r1+math.sqrt(r1**2+(x1+x2_dash)**2)))\n",
+ "Tmax = math.floor(Tmax*10)/10\n",
+ "n = ns*(1-s)\n",
+ "N = n*60\n",
+ "#(b)\n",
+ "x1_b = x1/2\n",
+ "x2_dash_b = x2_dash/2\n",
+ "s2 = r2_dash/math.sqrt(r1**2+(x1_b+x2_dash_b)**2)\n",
+ "s2 = math.floor(s2*10000)/10000\n",
+ "ns2 = 2*f2/p\n",
+ "V1_b = V1*0.5\n",
+ "Tmax2 = (1.5*V1_b**2/(2*math.pi*ns2))*(1/(r1+math.sqrt(r1**2+(x1_b+x2_dash_b)**2)))\n",
+ "n2 = ns2*(1-s2)\n",
+ "N2 = n2*60\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) for f = %d Hz\\n\\nslip = %.4f\\n\\nTmax = %.1f N-m\\n\\nSpeed corresponds to max torque = %.2f rpm\"%(f1,s,Tmax,N))\n",
+ "print(\"\\n\\n(b) for f = %d Hz\\n\\nslip = %.4f\\n\\nTmax = %.2f N-m\\n\\nSpeed corresponds to max torque = %.3f rpm\"%(f2,s2,Tmax2,N2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) for f = 50 Hz\n",
+ "\n",
+ "slip = 0.1877\n",
+ "\n",
+ "Tmax = 217.2 N-m\n",
+ "\n",
+ "Speed corresponds to max torque = 1218.45 rpm\n",
+ "\n",
+ "\n",
+ "(b) for f = 25 Hz\n",
+ "\n",
+ "slip = 0.3147\n",
+ "\n",
+ "Tmax = 153.72 N-m\n",
+ "\n",
+ "Speed corresponds to max torque = 513.975 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "example 9.20, Page No. 401"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Starting torque\n",
+ "\n",
+ "import math\n",
+ "# Variable declaration\n",
+ "V = 400.0 # motor voltage rating\n",
+ "p = 4.0 # no of poles\n",
+ "f = 50.0 # frequency\n",
+ "r1 = 0.64 # Stator resistance \n",
+ "x1 = 1.1 # leakage resistance\n",
+ "r2 = 0.08 # rotor resistance\n",
+ "x2 = 0.12 # leakage resistance\n",
+ "T = 40.0 # Torque at given speed\n",
+ "N1 = 1440.0 # Speed value for given torque\n",
+ "N2 = 1300.0 # Speed value for which torque is asked to calculate\n",
+ "f1 = 50 # case 1 frequency\n",
+ "f2 = 25 # case 2 frequency\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "ns = 2*f1/p\n",
+ "r2_dash = r2*(2)**2\n",
+ "x2_dash = x2*(2)**2\n",
+ "#s = r2_dash/math.sqrt(r1**2+(x1+x2_dash)**2)\n",
+ "#s = math.floor(s*10000)/10000\n",
+ "V1 = V/math.sqrt(3)\n",
+ "V1 = math.ceil(V1*100)/100\n",
+ "Tstarting = (3*(V1**2)*(r2_dash))/(2*math.pi*ns*((r1+r2_dash)**2+(x1+x2_dash)**2))\n",
+ "#(b)\n",
+ "x1_b = x1/2\n",
+ "x2_dash_b = x2_dash/2\n",
+ "#s2 = math.floor(s2*10000)/10000\n",
+ "ns2 = 2*f2/p\n",
+ "V1_b = V1*0.5\n",
+ "Tstarting_b = (3*(V1_b**2)*(r2_dash))/(2*math.pi*ns2*((r1+r2_dash)**2+(x1_b+x2_dash_b)**2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"(a) for %d Hz,\\nT_starting = %.2f N-m\"%(f1,Tstarting))\n",
+ "print(\"\\n(b) for %d Hz,\\nT_starting = %.2f N-m\"%(f2,Tstarting_b))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) for 50 Hz,\n",
+ "T_starting = 95.37 N-m\n",
+ "\n",
+ "(b) for 25 Hz,\n",
+ "T_starting = 105.45 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics/README.txt b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/README.txt index 95f5f179..95f5f179 100755 --- a/Power_Electronics/README.txt +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/README.txt diff --git a/Power_Electronics/screenshots/Capture.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture.png Binary files differindex fea874d6..fea874d6 100755 --- a/Power_Electronics/screenshots/Capture.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture.png diff --git a/Power_Electronics/screenshots/Capture1.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture1.png Binary files differindex 28481be5..28481be5 100755 --- a/Power_Electronics/screenshots/Capture1.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture1.png diff --git a/Power_Electronics/screenshots/Capture2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture2.png Binary files differindex f52a294c..f52a294c 100755 --- a/Power_Electronics/screenshots/Capture2.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Capture2.png diff --git a/Power_Electronics/screenshots/Chapter2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2.png Binary files differindex 9380fbcb..9380fbcb 100755 --- a/Power_Electronics/screenshots/Chapter2.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2.png diff --git a/Power_Electronics/screenshots/Chapter2_1.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_1.png Binary files differindex 9380fbcb..9380fbcb 100755 --- a/Power_Electronics/screenshots/Chapter2_1.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_1.png diff --git a/Power_Electronics/screenshots/Chapter2_2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_2.png Binary files differindex 9380fbcb..9380fbcb 100755 --- a/Power_Electronics/screenshots/Chapter2_2.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_2.png diff --git a/Power_Electronics/screenshots/Chapter2_3.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_3.png Binary files differindex 9380fbcb..9380fbcb 100755 --- a/Power_Electronics/screenshots/Chapter2_3.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_3.png diff --git a/Power_Electronics/screenshots/Chapter2_4.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_4.png Binary files differindex 9380fbcb..9380fbcb 100755 --- a/Power_Electronics/screenshots/Chapter2_4.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter2_4.png diff --git a/Power_Electronics/screenshots/Chapter3.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3.png Binary files differindex cef740d3..cef740d3 100755 --- a/Power_Electronics/screenshots/Chapter3.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3.png diff --git a/Power_Electronics/screenshots/Chapter3_1.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_1.png Binary files differindex cef740d3..cef740d3 100755 --- a/Power_Electronics/screenshots/Chapter3_1.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_1.png diff --git a/Power_Electronics/screenshots/Chapter3_2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_2.png Binary files differindex cef740d3..cef740d3 100755 --- a/Power_Electronics/screenshots/Chapter3_2.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_2.png diff --git a/Power_Electronics/screenshots/Chapter3_3.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_3.png Binary files differindex cef740d3..cef740d3 100755 --- a/Power_Electronics/screenshots/Chapter3_3.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_3.png diff --git a/Power_Electronics/screenshots/Chapter3_4.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_4.png Binary files differindex cef740d3..cef740d3 100755 --- a/Power_Electronics/screenshots/Chapter3_4.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter3_4.png diff --git a/Power_Electronics/screenshots/Chapter4.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4.png Binary files differindex a1d64cf1..a1d64cf1 100755 --- a/Power_Electronics/screenshots/Chapter4.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4.png diff --git a/Power_Electronics/screenshots/Chapter4_1.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_1.png Binary files differindex a1d64cf1..a1d64cf1 100755 --- a/Power_Electronics/screenshots/Chapter4_1.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_1.png diff --git a/Power_Electronics/screenshots/Chapter4_2.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_2.png Binary files differindex a1d64cf1..a1d64cf1 100755 --- a/Power_Electronics/screenshots/Chapter4_2.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_2.png diff --git a/Power_Electronics/screenshots/Chapter4_3.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_3.png Binary files differindex a1d64cf1..a1d64cf1 100755 --- a/Power_Electronics/screenshots/Chapter4_3.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_3.png diff --git a/Power_Electronics/screenshots/Chapter4_4.png b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_4.png Binary files differindex a1d64cf1..a1d64cf1 100755 --- a/Power_Electronics/screenshots/Chapter4_4.png +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/Chapter4_4.png diff --git a/Power_Electronics/screenshots/ex1_2.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2.PNG Binary files differindex abb82616..abb82616 100755 --- a/Power_Electronics/screenshots/ex1_2.PNG +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2.PNG diff --git a/Power_Electronics/screenshots/ex1_2_1.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2_1.PNG Binary files differindex abb82616..abb82616 100755 --- a/Power_Electronics/screenshots/ex1_2_1.PNG +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_2_1.PNG diff --git a/Power_Electronics/screenshots/ex1_9.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9.PNG Binary files differindex 49309df8..49309df8 100755 --- a/Power_Electronics/screenshots/ex1_9.PNG +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9.PNG diff --git a/Power_Electronics/screenshots/ex1_9_1.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9_1.PNG Binary files differindex 49309df8..49309df8 100755 --- a/Power_Electronics/screenshots/ex1_9_1.PNG +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex1_9_1.PNG diff --git a/Power_Electronics/screenshots/ex9_6.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6.PNG Binary files differindex f5604a90..f5604a90 100755 --- a/Power_Electronics/screenshots/ex9_6.PNG +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6.PNG diff --git a/Power_Electronics/screenshots/ex9_6_1.PNG b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6_1.PNG Binary files differindex f5604a90..f5604a90 100755 --- a/Power_Electronics/screenshots/ex9_6_1.PNG +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/screenshots/ex9_6_1.PNG diff --git a/Power_Electronics/chapter10.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter10.ipynb index cbc3cb90..cbc3cb90 100755 --- a/Power_Electronics/chapter10.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter10.ipynb diff --git a/Power_Electronics/chapter11.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter11.ipynb index d2317d28..d2317d28 100755 --- a/Power_Electronics/chapter11.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter11.ipynb diff --git a/Power_Electronics/chapter12.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter12.ipynb index f8605d69..f8605d69 100755 --- a/Power_Electronics/chapter12.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter12.ipynb diff --git a/Power_Electronics/chapter13.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter13.ipynb index 62d2a926..62d2a926 100755 --- a/Power_Electronics/chapter13.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter13.ipynb diff --git a/Power_Electronics/chapter14.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter14.ipynb index a9c3a3f1..a9c3a3f1 100755 --- a/Power_Electronics/chapter14.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter14.ipynb diff --git a/Power_Electronics/chapter2.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter2.ipynb index 1872c9f4..1872c9f4 100755 --- a/Power_Electronics/chapter2.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter2.ipynb diff --git a/Power_Electronics/chapter3.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter3.ipynb index 2e53ef9d..2e53ef9d 100755 --- a/Power_Electronics/chapter3.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter3.ipynb diff --git a/Power_Electronics/chapter4.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter4.ipynb index 22311574..22311574 100755 --- a/Power_Electronics/chapter4.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter4.ipynb diff --git a/Power_Electronics/chapter5.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter5.ipynb index 1d261f20..1d261f20 100755 --- a/Power_Electronics/chapter5.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter5.ipynb diff --git a/Power_Electronics/chapter6.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter6.ipynb index dff6564b..dff6564b 100755 --- a/Power_Electronics/chapter6.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter6.ipynb diff --git a/Power_Electronics/chapter7.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter7.ipynb index 726160c8..726160c8 100755 --- a/Power_Electronics/chapter7.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter7.ipynb diff --git a/Power_Electronics/chapter8.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter8.ipynb index 721a9faf..721a9faf 100755 --- a/Power_Electronics/chapter8.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter8.ipynb diff --git a/Power_Electronics/chapter9.ipynb b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter9.ipynb index 052c4736..052c4736 100755 --- a/Power_Electronics/chapter9.ipynb +++ b/Power_Electronics_by_Dr_B_R_Gupta_and_V_Singhal/temp/chapter9.ipynb diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter10_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter10_4.ipynb new file mode 100755 index 00000000..cbc3cb90 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter10_4.ipynb @@ -0,0 +1,228 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Cycloconverters"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2, Page No 594"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "R=10.0\n",
+ "a=30.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_or=(V_m/math.sqrt(2))*math.sqrt((1/math.pi)*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2))\n",
+ "I_or=V_or/R \n",
+ "I_s=I_or\n",
+ "pf=(I_or**2*R)/(V_s*I_s) \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of o/p current=%.2f A\" %I_or)\n",
+ "print(\"rms value of o/p current for each convertor=%.2f A\" %(I_or/math.sqrt(2)))\n",
+ "print(\"rms value of o/p current for each thyristor=%.3f A\" %(I_or/2))\n",
+ "print(\"i/p pf=%.4f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of o/p current=22.67 A\n",
+ "rms value of o/p current for each convertor=16.03 A\n",
+ "rms value of o/p current for each thyristor=11.333 A\n",
+ "i/p pf=0.9855\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4, Page No 604"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=400.0\n",
+ "V_ph=V_s/2\n",
+ "a=160.0\n",
+ "\n",
+ "#Calculations\n",
+ "r=math.cos(math.radians(180-a))\n",
+ "m=3\n",
+ "V_or=r*(V_ph*(m/math.pi)*math.sin(math.pi/m)) \n",
+ "R=2\n",
+ "X_L=1.5\n",
+ "th=math.degrees(math.atan(X_L/R))\n",
+ "Z=math.sqrt(R**2+X_L**2)\n",
+ "I_or=V_or/Z \n",
+ "P=I_or**2*R \n",
+ "\n",
+ "#Results\n",
+ "print(\"rms o/p voltage=%.3f V\" %V_or)\n",
+ "print(\"rms o/p current=%.2f A\" %I_or)\n",
+ "print(\"phase angle of o/p current=%.2f deg\" %-th)\n",
+ "print(\"o/p power=%.2f W\" %P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms o/p voltage=155.424 V\n",
+ "rms o/p current=62.17 A\n",
+ "phase angle of o/p current=-36.87 deg\n",
+ "o/p power=7730.11 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5 Page No 604"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=400.0\n",
+ "V_ph=V_s/2\n",
+ "V_l=V_ph*math.sqrt(3)\n",
+ "a=160.0\n",
+ "\n",
+ "#Calculations\n",
+ "r=math.cos(math.radians(180-a))\n",
+ "m=6\n",
+ "V_or=r*(V_l*(m/math.pi)*math.sin(math.pi/m)) \n",
+ "R=2\n",
+ "X_L=1.5\n",
+ "th=math.degrees(math.atan(X_L/R))\n",
+ "Z=math.sqrt(R**2+X_L**2)\n",
+ "I_or=V_or/Z \n",
+ "P=I_or**2*R \n",
+ "\n",
+ "#Results\n",
+ "print(\"rms o/p voltage=%.2f V\" %V_or)\n",
+ "print(\"rms o/p current=%.2f A\" %I_or)\n",
+ "print(\"phase angle of o/p current=%.2f deg\" %-th)\n",
+ "print(\"o/p power=%.2f W\" %P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms o/p voltage=310.85 V\n",
+ "rms o/p current=124.34 A\n",
+ "phase angle of o/p current=-36.87 deg\n",
+ "o/p power=30920.44 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.7, Page No 605"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_l=400.0\n",
+ "V_ml=math.sqrt(2)*V_l\n",
+ "m=6\n",
+ "f=50.0\n",
+ "w=2*math.pi*f\n",
+ "L=.0012\n",
+ "I=40.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_or1=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))\n",
+ "V_omx1=V_or1-3*w*L*I/math.pi\n",
+ "V_rms1=V_omx1/math.sqrt(2) \n",
+ "a2=30.0\n",
+ "V_or2=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))\n",
+ "V_omx2=V_or2-3*w*L*I/math.pi\n",
+ "V_rms2=V_omx2/math.sqrt(2) \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"for firing angle=0deg\")\n",
+ "a1=0\n",
+ "print(\"rms value of load voltage=%.2f V\" %V_rms2)\n",
+ "print(\"for firing angle=30deg\")\n",
+ "print(\"rms value of load voltage=%.2f V\" %V_rms2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for firing angle=0deg\n",
+ "rms value of load voltage=-369.12 V\n",
+ "for firing angle=30deg\n",
+ "rms value of load voltage=-369.12 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter11_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter11_4.ipynb new file mode 100755 index 00000000..d2317d28 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter11_4.ipynb @@ -0,0 +1,299 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 : Some Applications"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1, Page No 622"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=11000.0\n",
+ "V_ml=math.sqrt(2)*V_s\n",
+ "f=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "w=2*math.pi*f\n",
+ "I_d=300\n",
+ "R_d=1\n",
+ "g=20 #g=gamma\n",
+ "a=math.degrees(math.acos(math.cos(math.radians(g))+math.pi/(3*V_ml)*I_d*R_d)) \n",
+ "L_s=.01\n",
+ "V_d=(3/math.pi)*((V_ml*math.cos(math.radians(a)))-w*L_s*I_d) \n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle=%.3f deg\" %a)\n",
+ "print(\"rectifier o/p voltage=%.1f V\" %V_d)\n",
+ "print(\"dc link voltage=%.3f V\" %(2*V_d/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle=16.283 deg\n",
+ "rectifier o/p voltage=13359.3 V\n",
+ "dc link voltage=26.719 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2, Page No 623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_d=(200.0+200)*10**3\n",
+ "P=1000.0*10**6\n",
+ "\n",
+ "#Calculations\n",
+ "I_d=P/V_d\n",
+ " #each thristor conducts for 120deg for a periodicity of 360deg\n",
+ "a=0\n",
+ "V_d=200.0*10**3\n",
+ "V_ml=V_d*math.pi/(3*math.cos(math.radians(a)))\n",
+ "\n",
+ "#Results\n",
+ "print(\"rms current rating of thyristor=%.2f A\" %(I_d*math.sqrt(120/360)))\n",
+ "print(\"peak reverse voltage across each thyristor=%.2f kV\" %(V_ml/2/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms current rating of thyristor=0.00 A\n",
+ "peak reverse voltage across each thyristor=104.72 kV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page No 627"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_m=230.0\n",
+ "V_s=230/math.sqrt(2)\n",
+ "pf=0.8\n",
+ "P=2000.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_m=P/(V_s*pf)\n",
+ "I_Tr=I_m/math.sqrt(2)\n",
+ "I_TA=2*I_m/math.pi\n",
+ "fos=2 #factor of safety\n",
+ "PIV=V_m*math.sqrt(2)\n",
+ "I_Tr=I_m/(2)\n",
+ "I_TA=I_m/math.pi\n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of thyristor current=%.2f A\" %(fos*I_Tr))\n",
+ "print(\"avg value of thyristor current=%.3f A\" %(fos*I_TA))\n",
+ "print(\"voltage rating of thyristor=%.2f V\" %PIV)\n",
+ "print(\"rms value of diode current=%.3f A\" %(fos*I_Tr))\n",
+ "print(\"avg value of diode current=%.3f A\" %(fos*I_TA))\n",
+ "print(\"voltage rating of diode=%.2f V\" %PIV)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of thyristor current=15.37 A\n",
+ "avg value of thyristor current=9.786 A\n",
+ "voltage rating of thyristor=325.27 V\n",
+ "rms value of diode current=15.372 A\n",
+ "avg value of diode current=9.786 A\n",
+ "voltage rating of diode=325.27 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4, Page No 629"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=200.0\n",
+ "I=10.0\n",
+ "\n",
+ "#Calculations\n",
+ "R_L=V/I \n",
+ "I_h=.005 #holding current\n",
+ "R2=V/I_h \n",
+ "t_c=20*10**-6\n",
+ "fos=2 #factor of safety\n",
+ "C=t_c*fos/(R_L*math.log(2)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"value of load resistance=%.0f ohm\" %R_L)\n",
+ "print(\"value of R2=%.0f kilo-ohm\" %(R2/1000))\n",
+ "print(\"value of C=%.3f uF\" %(C*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of load resistance=20 ohm\n",
+ "value of R2=40 kilo-ohm\n",
+ "value of C=2.885 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5 Page No 646"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "u_r=10\n",
+ "f=10000.0 #Hz\n",
+ "p=4.0*10**-8 #ohm-m\n",
+ "\n",
+ "#Calculations\n",
+ "dl=(1/(2*math.pi))*math.sqrt(p*10**7/(u_r*f)) \n",
+ "l=0.12 #length of cylinder\n",
+ "t=20.0 #no of turns\n",
+ "I=100.0\n",
+ "H=t*I/l\n",
+ "P_s=2*math.pi*H**2*math.sqrt(u_r*f*p*10**-7) \n",
+ "d=.02 #diameter\n",
+ "P_v=4*H**2*p/(d*dl) \n",
+ "\n",
+ "#Results\n",
+ "print(\"depth of heat of penetration=%.5f mm\" %(dl*1000))\n",
+ "print(\"heat generated per unit cylinder surface area=%.3f W/m**2\" %P_s)\n",
+ "print(\"heat generated per unit cylinder volume=%.0f W/m**3\" %P_v)\n",
+ " #answer of P_v varies as given in book as value of d is not taken as in formulae. "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "depth of heat of penetration=0.31831 mm\n",
+ "heat generated per unit cylinder surface area=34906.585 W/m**2\n",
+ "heat generated per unit cylinder volume=6981317 W/m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6 Page No 646"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "f=3000.0\n",
+ "\n",
+ "#Calculations\n",
+ "t_qmin=30.0*10**-6\n",
+ "f_r=f/(1-2*t_qmin*f)\n",
+ "R=0.06\n",
+ "L=20.0*10**-6\n",
+ "C=1/(L*((2*math.pi*f_r)**2+(R/(2*L))**2)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"required capacitor size=%.4f F\" %(C*10**6))\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required capacitor size=94.2215 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter12_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter12_4.ipynb new file mode 100755 index 00000000..f8605d69 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter12_4.ipynb @@ -0,0 +1,1997 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12 : Electic Drives"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1, Page No 658"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "T_e=15.0 #Nm\n",
+ "K_m=0.5 #V-s/rad\n",
+ "I_a=T_e/K_m\n",
+ "n_m=1000.0\n",
+ "\n",
+ "#Calculations\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "E_a=K_m*w_m\n",
+ "r_a=0.7\n",
+ "V_t=E_a+I_a*r_a\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=math.degrees(math.acos(2*math.pi*V_t/V_m-1))\n",
+ "print(\"firing angle delay=%.3f deg\" %a)\n",
+ "I_Tr=I_a*math.sqrt((180-a)/360) \n",
+ "print(\"rms value of thyristor current=%.3f A\" %I_Tr)\n",
+ "I_fdr=I_a*math.sqrt((180+a)/360) \n",
+ "print(\"rms value of freewheeling diode current=%.3f A\" %I_fdr)\n",
+ "pf=V_t*I_a/(V_s*I_Tr) \n",
+ "\n",
+ "#Results \n",
+ "print(\"input power factor=%.4f\" %pf)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle delay=65.349 deg\n",
+ "rms value of thyristor current=16.930 A\n",
+ "rms value of freewheeling diode current=24.766 A\n",
+ "input power factor=0.5652\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2, Page No 660"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "E=150.0\n",
+ "R=8.0\n",
+ "\n",
+ "#Calculations\n",
+ "th1=math.sin(math.radians(E/(math.sqrt(2)*V)))\n",
+ "I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180)) \n",
+ "P=E*I_o \n",
+ "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))\n",
+ "P_r=I_or**2*R \n",
+ "pf=(P+P_r)/(V*I_or)\n",
+ "\n",
+ "#Results\n",
+ "print(\"avg charging curent=%.4f A\" %I_o)\n",
+ "print(\"power supplied to the battery=%.2f W\" %P)\n",
+ "print(\"power dissipated by the resistor=%.3f W\" %P_r) \n",
+ "print(\"supply pf=%.3f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg charging curent=3.5679 A\n",
+ "power supplied to the battery=535.18 W\n",
+ "power dissipated by the resistor=829.760 W\n",
+ "supply pf=0.583\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3 Page No 661"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variablesV_s=250\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=30.0\n",
+ "k=0.03 #Nm/A**2\n",
+ "n_m=1000.0\n",
+ "\n",
+ "#Calculations\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "r=.2 #r_a+r_s\n",
+ "V_t=V_m/math.pi*(1+math.cos(math.radians(a)))\n",
+ "I_a=V_t/(k*w_m+r) \n",
+ "print(\"motor armature current=%.2f A\" %I_a)\n",
+ "T_e=k*I_a**2 \n",
+ "print(\"motor torque=%.3f Nm\" %T_e)\n",
+ "I_sr=I_a*math.sqrt((180-a)/180)\n",
+ "pf=(V_t*I_a)/(V_s*I_sr) \n",
+ "\n",
+ "#Results\n",
+ "print(\"input power factor=%.2f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor armature current=57.82 A\n",
+ "motor torque=100.285 Nm\n",
+ "input power factor=0.92\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4, Page No 663"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=400.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "V_f=2*V_m/math.pi\n",
+ "r_f=200.0\n",
+ "I_f=V_f/r_f\n",
+ "T_e=85.0\n",
+ "K_a=0.8\n",
+ "\n",
+ "#Calculations\n",
+ "I_a=T_e/(I_f*K_a) \n",
+ "print(\"rated armature current=%.2f A\" %I_a)\n",
+ "n_m=1200.0\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "r_a=0.2\n",
+ "V_t=K_a*I_f*w_m+I_a*r_a\n",
+ "a=math.degrees(math.acos(V_t*math.pi/(2*V_m)))\n",
+ "print(\"firing angle delay=%.2f deg\" %a)\n",
+ "E_a=V_t\n",
+ "w_mo=E_a/(K_a*I_f)\n",
+ "N=60*w_mo/(2*math.pi)\n",
+ "reg=((N-n_m)/n_m)*100 \n",
+ "print(\"speed regulation at full load=%.2f\" %reg)\n",
+ "I_ar=I_a\n",
+ "pf=(V_t*I_a)/(V_s*I_ar) \n",
+ "print(\"input power factor of armature convertor=%.4f\" %pf)\n",
+ "I_fr=I_f\n",
+ "I_sr=math.sqrt(I_fr**2+I_ar**2)\n",
+ "VA=I_sr*V_s\n",
+ "P=V_t*I_a+V_f*I_f\n",
+ "\n",
+ "#Results\n",
+ "print(\"input power factor of drive=%.4f\" %(P/VA))\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rated armature current=59.01 A\n",
+ "firing angle delay=57.63 deg\n",
+ "speed regulation at full load=6.52\n",
+ "input power factor of armature convertor=0.4821\n",
+ "input power factor of drive=0.5093\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.5 Page No 664"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=400.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "V_f=2*V_m/math.pi\n",
+ "\n",
+ "#Calculations\n",
+ "a1=math.degrees(math.acos(V_t*math.pi/(2*V_m))) \n",
+ "print(\"delay angle of field converter=%.0f deg\" %a1)\n",
+ "r_f=200.0\n",
+ "I_f=V_f/r_f\n",
+ "T_e=85.0\n",
+ "K_a=0.8\n",
+ "I_a=T_e/(I_f*K_a)\n",
+ "n_m=1200.0\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "r_a=0.1\n",
+ "I_a=50.0\n",
+ "V_t=-K_a*I_f*w_m+I_a*r_a\n",
+ "a=math.degrees(math.acos(V_t*math.pi/(2*V_m)))\n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle delay of armature converter=%.3f deg\" %a)\n",
+ "print(\"power fed back to ac supply=%.0f W\" %(-V_t*I_a))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "delay angle of field converter=58 deg\n",
+ "firing angle delay of armature converter=119.260 deg\n",
+ "power fed back to ac supply=8801 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.6 Page No 665"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_t=220.0\n",
+ "n_m=1500.0\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "I_a=10.0\n",
+ "r_a=1.0\n",
+ "\n",
+ "#Calculations\n",
+ "K_m=(V_t-I_a*r_a)/(w_m)\n",
+ "T=5.0\n",
+ "I_a=T/K_m\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=30.0\n",
+ "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n",
+ "w_m=(V_t-I_a*r_a)/K_m\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "\n",
+ "print(\"motor speed=%.2f rpm\" %N)\n",
+ "a=45\n",
+ "n_m=1000\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n",
+ "I_a=(V_t-K_m*w_m)/r_a\n",
+ "T_e=K_m*I_a \n",
+ "\n",
+ "#Results\n",
+ "print(\"torque developed=%.3f Nm\" %T_e)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor speed=1254.22 rpm\n",
+ "torque developed=8.586 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.7, Page No 666"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_t=220.0\n",
+ "n_m=1000.0\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "I_a=60.0\n",
+ "r_a=.1\n",
+ "\n",
+ "#Calculations\n",
+ "K_m=(V_t-I_a*r_a)/(w_m)\n",
+ "V_s=230\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "print(\"for 600rpm speed\")\n",
+ "n_m=600.0\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "a=math.degrees(math.acos((K_m*w_m+I_a*r_a)*math.pi/(2*V_m))) \n",
+ "print(\"firing angle=%.3f deg\" %a)\n",
+ "print(\"for -500rpm speed\")\n",
+ "n_m=-500.0\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "a=math.degrees(math.acos((K_m*w_m+I_a*r_a)*math.pi/(2*V_m)))\n",
+ "print(\"firing angle=%.2f deg\" %a)\n",
+ "I_a=I_a/2\n",
+ "a=150\n",
+ "V_t=2*V_m*math.cos(math.radians(a))/math.pi\n",
+ "w_m=(V_t-I_a*r_a)/K_m\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor speed=%.3f rpm\" %N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for 600rpm speed\n",
+ "firing angle=49.530 deg\n",
+ "for -500rpm speed\n",
+ "firing angle=119.19 deg\n",
+ "motor speed=-852.011 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.8 Page No 672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "K_m=1.5\n",
+ "T_e=50.0\n",
+ "I_a=T_e/K_m\n",
+ "r_a=0.9\n",
+ "a=45.0\n",
+ "V_s=415.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_ml=math.sqrt(2)*V_s\n",
+ "w_m=((3*V_ml*(1+math.cos(math.radians(a)))/(2*math.pi))-I_a*r_a)/K_m\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor speed=%.2f rpm\" %N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor speed=2854.42 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.9 Page No 672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variablesV_t=600\n",
+ "n_m=1500.0\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "I_a=80.0\n",
+ "r_a=1.0\n",
+ "\n",
+ "#Calculations\n",
+ "K_m=(V_t-I_a*r_a)/(w_m)\n",
+ "V_s=400.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "print(\"for firing angle=45deg and speed=1200rpm\")\n",
+ "a=45.0\n",
+ "n_m=1200.0\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "I_a=(3*V_m*(1+math.cos(math.radians(a)))/(2*math.pi)-K_m*w_m)/r_a\n",
+ "I_sr=I_a*math.sqrt(2/3) \n",
+ "print(\"rms value of source current=%.3f A\" %I_sr)\n",
+ "print(\"rms value of thyristor current=%.3f A\" %(I_a*math.sqrt(1/3)))\n",
+ "print(\"avg value of thyristor current=%.2f A\" %I_a*(1/3))\n",
+ "pf=(3/(2*math.pi)*(1+math.cos(math.radians(a)))) \n",
+ "print(\"input power factor=%.3f\" %pf)\n",
+ "\n",
+ "print(\"for firing angle=90deg and speed=700rpm\")\n",
+ "a=90\n",
+ "n_m=700\n",
+ "w_m=2*math.pi*n_m/60\n",
+ "I_a=(3*V_m*(1+math.cos(math.radians(a)))/(2*math.pi)-K_m*w_m)/r_a\n",
+ "I_sr=I_a*math.sqrt(90/180) \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of source current=%.3f A\" %I_sr)\n",
+ "print(\"rms value of thyristor current=%.3f A\" %(I_a*math.sqrt(90.0/360)))\n",
+ "print(\"avg value of thyristor current=%.3f A\" %I_a*(1/3))\n",
+ "pf=(math.sqrt(6)/(2*math.pi)*(1+math.cos(math.radians(a))))*math.sqrt(180/(180-a)) \n",
+ "print(\"input power factor=%.4f\" %pf)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for firing angle=45deg and speed=1200rpm\n",
+ "rms value of source current=0.000 A\n",
+ "rms value of thyristor current=0.000 A\n",
+ "\n",
+ "input power factor=0.815\n",
+ "for firing angle=90deg and speed=700rpm\n",
+ "rms value of source current=0.000 A\n",
+ "rms value of thyristor current=195.558 A\n",
+ "\n",
+ "input power factor=0.5513\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.10 Page No 676"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=400.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=30\n",
+ "V_t=3*V_m*math.cos(math.radians(a))/math.pi\n",
+ "I_a=21.0\n",
+ "r_a=.1\n",
+ "V_d=2.0\n",
+ "K_m=1.6\n",
+ "\n",
+ "#Calculations\n",
+ "w_m=(V_t-I_a*r_a-V_d)/K_m\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "print(\"speed of motor=%.1f rpm\" %N)\n",
+ "\n",
+ "N=2000\n",
+ "w_m=2*math.pi*N/60\n",
+ "I_a=210\n",
+ "V_t=K_m*w_m+I_a*r_a+V_d\n",
+ "a=math.degrees(math.acos(V_t*math.pi/(3*V_m)))\n",
+ "print(\"firing angle=%.2f deg\" %a)\n",
+ "I_sr=I_a*math.sqrt(2.0/3.0)\n",
+ "pf=V_t*I_a/(math.sqrt(3)*V_s*I_sr) \n",
+ "print(\"supply power factor=%.3f\" %pf)\n",
+ "\n",
+ "I_a=21\n",
+ "w_m=(V_t-I_a*r_a-V_d)/K_m\n",
+ "n=w_m*60/(2*math.pi)\n",
+ "reg=(n-N)/N*100 \n",
+ "\n",
+ "#Results\n",
+ "print(\"speed regulation(percent)=%.2f\" %reg)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "speed of motor=2767.6 rpm\n",
+ "firing angle=48.48 deg\n",
+ "supply power factor=0.633\n",
+ "speed regulation(percent)=5.64\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.11, Page No 677"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_t=230.0\n",
+ "V_l=V_t*math.pi/(3*math.sqrt(2))\n",
+ "V_ph=V_l/math.sqrt(3)\n",
+ "V_in=400 #per phase voltage input\n",
+ "\n",
+ "#Calculations\n",
+ "N1=1500.0\n",
+ "I_a1=20.0\n",
+ "r_a1=.6\n",
+ "E_a1=V_t-I_a1*r_a1\n",
+ "n1=1000.0\n",
+ "E_a2=E_a1/1500.0*1000.0\n",
+ "V_t1=E_a1+I_a1*r_a1\n",
+ "a1=math.degrees(math.acos(V_t1*math.pi/(3*math.sqrt(2.0)*V_l)))\n",
+ "I_a2=.5*I_a1\n",
+ "n2=-900.0\n",
+ "V_t2=n2*E_a2/N1+I_a2*r_a1\n",
+ "a2=math.degrees(math.acos(V_t2*math.pi/(3*math.sqrt(2)*V_l))) \n",
+ "\n",
+ "#Results\n",
+ "print(\"transformer phase turns ratio=%.3f\" %(V_in/V_ph))\n",
+ "print(\"for motor running at 1000rpm at rated torque\")\n",
+ "print(\"firing angle delay=%.2f deg\" %a1)\n",
+ "print(\"for motor running at -900rpm at half of rated torque\")\n",
+ "print(\"firing angle delay=%.3f deg\" %a2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transformer phase turns ratio=4.068\n",
+ "for motor running at 1000rpm at rated torque\n",
+ "firing angle delay=0.00 deg\n",
+ "for motor running at -900rpm at half of rated torque\n",
+ "firing angle delay=110.674 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12, Page No 678"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variablesV_s=400\n",
+ "V_ml=math.sqrt(2)*V_s\n",
+ "V_f=3*V_ml/math.pi\n",
+ "R_f=300.0\n",
+ "I_f=V_f/R_f\n",
+ "T_e=60.0\n",
+ "k=1.1\n",
+ "\n",
+ "#Calculations\n",
+ "I_a=T_e/(k*I_f)\n",
+ "N1=1000.0\n",
+ "w_m1=2*math.pi*N1/60\n",
+ "r_a1=.3\n",
+ "V_t1=k*I_f*w_m1+I_a*r_a1\n",
+ "a1=math.degrees(math.acos(V_f*math.pi/(3*V_ml)))\n",
+ "N2=3000\n",
+ "w_m2=2*math.pi*N/60\n",
+ "a2=0\n",
+ "V_t2=3*V_ml*math.cos(math.radians(a))/math.pi\n",
+ "I_f2=(V_t2-I_a*r_a)/(w_m2*k)\n",
+ "V_f2=I_f2*R_f\n",
+ "a2=math.degrees(math.acos(V_f2*math.pi/(3*V_ml)))\n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle=%.3f deg\" %a)\n",
+ "print(\"firing angle=%.3f deg\" %a)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle=48.477 deg\n",
+ "firing angle=48.477 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.13, Page No 679"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ " #after calculating\n",
+ " #t=w_m/6000-math.pi/360\n",
+ "\n",
+ "N=1000.0\n",
+ "\n",
+ "#Calculations\n",
+ "w_m=2*math.pi*N/60\n",
+ "t=w_m/6000-math.pi/360 \n",
+ "\n",
+ "#Results\n",
+ "print(\"time reqd=%.2f s\" %t)\n",
+ " #printing mistake in the answer in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time reqd=0.01 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.14, Page No 679"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I_a=1.0 #supposition\n",
+ "a=60.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_s1=2*math.sqrt(2)/math.pi*I_a*math.sin(math.radians(a))\n",
+ "I_s3=2*math.sqrt(2)/(3*math.pi)*I_a*math.sin(math.radians(3*a))\n",
+ "I_s5=2*math.sqrt(2)/(5*math.pi)*I_a*math.sin(math.radians(5*a))\n",
+ "per3=I_s3/I_s1*100 \n",
+ "print(\"percent of 3rd harmonic current in fundamental=%.2f\" %per3)\n",
+ "per5=I_s5/I_s1*100 \n",
+ "\n",
+ "#Results\n",
+ "print(\"percent of 5th harmonic current in fundamental=%.2f\" %per5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percent of 3rd harmonic current in fundamental=0.00\n",
+ "percent of 5th harmonic current in fundamental=-20.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.15, Page No 680"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I_a=60.0\n",
+ "I_TA=I_a/3 \n",
+ "\n",
+ "#Calculations\n",
+ "print(\"avg thyristor current=%.0f A\" %I_TA)\n",
+ "I_Tr=I_a/math.sqrt(3) \n",
+ "print(\"rms thyristor current=%.3f A\" %I_Tr)\n",
+ "V_s=400\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "I_sr=I_a*math.sqrt(2.0/3)\n",
+ "a=150\n",
+ "V_t=3*V_m*math.cos(math.radians(a))/math.pi\n",
+ "pf=V_t*I_a/(math.sqrt(3)*V_s*I_sr) \n",
+ "print(\"power factor of ac source=%.3f\" %pf)\n",
+ "\n",
+ "r_a=0.5\n",
+ "K_m=2.4\n",
+ "w_m=(V_t-I_a*r_a)/K_m\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "\n",
+ "#Results\n",
+ "print(\"Speed of motor=%.2f rpm\" %N)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg thyristor current=20 A\n",
+ "rms thyristor current=34.641 A\n",
+ "power factor of ac source=-0.827\n",
+ "Speed of motor=-1980.76 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.16, Page No 685"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I_a=300.0\n",
+ "V_s=600.0\n",
+ "a=0.6\n",
+ "V_t=a*V_s\n",
+ "P=V_t*I_a \n",
+ "\n",
+ "#Calculations\n",
+ "print(\"input power from source=%.0f kW\" %(P/1000))\n",
+ "R_eq=V_s/(a*I_a) \n",
+ "print(\"equivalent input resistance=%.3f ohm\" %R_eq)\n",
+ "k=.004\n",
+ "R=.04+.06\n",
+ "w_m=(a*V_s-I_a*R)/(k*I_a)\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "print(\"motor speed=%.1f rpm\" %N)\n",
+ "T_e=k*I_a**2 \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor torque=%.0f Nm\" %T_e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input power from source=108 kW\n",
+ "equivalent input resistance=3.333 ohm\n",
+ "motor speed=2626.1 rpm\n",
+ "motor torque=360 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.17, Page No 686"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "T_on=10.0\n",
+ "T_off=15.0\n",
+ "\n",
+ "#Calculations\n",
+ "a=T_on/(T_on+T_off)\n",
+ "V_s=230.0\n",
+ "V_t=a*V_s\n",
+ "r_a=3\n",
+ "K_m=.5\n",
+ "N=1500\n",
+ "w_m=2*math.pi*N/60\n",
+ "I_a=(V_t-K_m*w_m)/r_a \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor load current=%.3f A\" %I_a)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor load current=4.487 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.18, Page No 686"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "w_m=0 \n",
+ "print(\"lower limit of speed control=%.0f rpm\" %w_m)\n",
+ "I_a=25.0\n",
+ "r_a=.2\n",
+ "V_s=220\n",
+ "K_m=0.08\n",
+ "\n",
+ "#Calculations\n",
+ "a=(K_m*w_m+I_a*r_a)/V_s \n",
+ "print(\"lower limit of duty cycle=%.3f\" %a)\n",
+ "a=1 \n",
+ "print(\"upper limit of duty cycle=%.0f\" %a)\n",
+ "w_m=(a*V_s-I_a*r_a)/K_m \n",
+ "\n",
+ "#Results\n",
+ "print(\"upper limit of speed control=%.1f rpm\" %w_m)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower limit of speed control=0 rpm\n",
+ "lower limit of duty cycle=0.023\n",
+ "upper limit of duty cycle=1\n",
+ "upper limit of speed control=2687.5 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.21, Page No 691"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=0.6\n",
+ "V_s=400.0\n",
+ "V_t=(1-a)*V_s\n",
+ "I_a=300.0\n",
+ "P=V_t*I_a \n",
+ "\n",
+ "#Calculations \n",
+ "print(\"power returned=%.0f kW\" %(P/1000))\n",
+ "r_a=.2\n",
+ "K_m=1.2\n",
+ "R_eq=(1-a)*V_s/I_a+r_a \n",
+ "print(\"equivalent load resistance=%.4f ohm\" %R_eq)\n",
+ "w_mn=I_a*r_a/K_m\n",
+ "N=w_mn*60/(2*math.pi) \n",
+ "print(\"min braking speed=%.2f rpm\" %N)\n",
+ "w_mx=(V_s+I_a*r_a)/K_m\n",
+ "N=w_mx*60/(2*math.pi) \n",
+ "print(\"max braking speed=%.1f rpm\" %N)\n",
+ "w_m=(V_t+I_a*r_a)/K_m\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "\n",
+ "#Results\n",
+ "print(\"max braking speed=%.1f rpm\" %N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power returned=48 kW\n",
+ "equivalent load resistance=0.7333 ohm\n",
+ "min braking speed=477.46 rpm\n",
+ "max braking speed=3660.6 rpm\n",
+ "max braking speed=1750.7 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.22, Page No 699"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "N=1500.0\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"when speed=1455rpm\")\n",
+ "n=1455.0\n",
+ "s1=(N-n)/N\n",
+ "r=math.sqrt(1/3)*(2/3)/(math.sqrt(s1)*(1-s1)) \n",
+ "print(\"I_2mx/I_2r=%.3f\" %r)\n",
+ "print(\"when speed=1350rpm\")\n",
+ "n=1350\n",
+ "s1=(N-n)/N\n",
+ "r=math.sqrt(1/3)*(2/3)/(math.sqrt(s1)*(1-s1)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"I_2mx/I_2r=%.3f\" %r)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when speed=1455rpm\n",
+ "I_2mx/I_2r=0.000\n",
+ "when speed=1350rpm\n",
+ "I_2mx/I_2r=0.000\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.24, Page No 705"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V1=400.0\n",
+ "r1=0.6\n",
+ "r2=0.4\n",
+ "s=1.0\n",
+ "x1=1.6\n",
+ "x2=1.6\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"at starting in normal conditions\")\n",
+ "I_n=V1/math.sqrt((r1+r2/s)**2+(x1+x2)**2) \n",
+ "print(\"current=%.2f A\" %I_n)\n",
+ "pf=(r1+r2)/math.sqrt((r1+r2/s)**2+(x1+x2)**2) \n",
+ "print(\"pf=%.4f\" %pf)\n",
+ "f1=50\n",
+ "w_s=4*math.pi*f1/4\n",
+ "T_en=(3/w_s)*I_n**2*(r2/s) \n",
+ "print(\"\\nTorque developed=%.2f Nm\" %T_en)\n",
+ "print(\"motor is operated with DOL starting\")\n",
+ "I_d=V1/2/math.sqrt((r1+r2/s)**2+((x1+x2)/2)**2) \n",
+ "print(\"current=%.0f A\" %I_d)\n",
+ "pf=(r1+r2)/math.sqrt((r1+r2/s)**2+((x1+x2)/2)**2) \n",
+ "print(\"pf=%.2f\" %pf)\n",
+ "f1=25\n",
+ "w_s=4*math.pi*f1/4\n",
+ "T_ed=(3/w_s)*I_d**2*(r2/s) \n",
+ "print(\"Torque developed=%.3f Nm\" %T_ed)\n",
+ "print(\"at max torque conditions\")\n",
+ "s_mn=r2/math.sqrt((r1)**2+((x1+x2))**2)\n",
+ "I_n=V1/math.sqrt((r1+r2/s_mn)**2+(x1+x2)**2) \n",
+ "print(\"current=%.3f A\" %I_n)\n",
+ "pf=(r1+r2/s_mn)/math.sqrt((r1+r2/s_mn)**2+(x1+x2)**2) \n",
+ "print(\"pf=%.4f\" %pf)\n",
+ "f1=50\n",
+ "w_s=4*math.pi*f1/4\n",
+ "T_en=(3/w_s)*I_n**2*(r2/s_mn) \n",
+ "print(\"Torque developed=%.2f Nm\" %T_en)\n",
+ "print(\"motor is operated with DOL starting\")\n",
+ "s_mn=r2/math.sqrt((r1)**2+((x1+x2)/2)**2)\n",
+ "I_d=V1/2/math.sqrt((r1+r2/s_mn)**2+((x1+x2)/2)**2) \n",
+ "print(\"current=%.3f A\" %I_d)\n",
+ "pf=(r1+r2/s_mn)/math.sqrt((r1+r2/s_mn)**2+((x1+x2)/2)**2) \n",
+ "print(\"\\npf=%.3f\" %pf)\n",
+ "f1=25\n",
+ "w_s=4*math.pi*f1/4\n",
+ "T_en=(3/w_s)*I_d**2*(r2/s_mn) \n",
+ "\n",
+ "\n",
+ "#Results \n",
+ "print(\"Torque developed=%.3f Nm\" %T_en)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "at starting in normal conditions\n",
+ "current=119.31 A\n",
+ "pf=0.2983\n",
+ "\n",
+ "Torque developed=108.75 Nm\n",
+ "motor is operated with DOL starting\n",
+ "current=106 A\n",
+ "pf=0.53\n",
+ "Torque developed=171.673 Nm\n",
+ "at max torque conditions\n",
+ "current=79.829 A\n",
+ "pf=0.7695\n",
+ "Torque developed=396.26 Nm\n",
+ "motor is operated with DOL starting\n",
+ "current=71.199 A\n",
+ "\n",
+ "pf=0.822\n",
+ "Torque developed=330.883 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.25, Page No 709"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "x1=1.0\n",
+ "X_m=50.0\n",
+ "X_e=x1*X_m/(x1+X_m)\n",
+ "V=231.0\n",
+ "V_e=V*X_m/(x1+X_m)\n",
+ "x2=1.0\n",
+ "r2=.4\n",
+ "r1=0\n",
+ "\n",
+ "#Calculations\n",
+ "s_m=r2/(x2+X_e) \n",
+ "print(\"slip at max torque=%.2f\" %s_m)\n",
+ "s_mT=r2/(x2+X_m) \n",
+ "print(\"slip at max torque=%.5f\" %s_mT)\n",
+ "f1=50.0\n",
+ "w_s=4*math.pi*f1/4\n",
+ "print(\"for constant voltage input\")\n",
+ "T_est=(3/w_s)*(V_e/math.sqrt(r2**2+(x2+X_e)**2))**2*(r2) \n",
+ "print(\"starting torque=%.3f Nm\" %T_est)\n",
+ "T_em=(3/w_s)*V_e**2/(2*(x2+X_e)) \n",
+ "print(\"maximum torque developed=%.2f Nm\" %T_em)\n",
+ "print(\"for constant current input\")\n",
+ "I1=28\n",
+ "T_est=(3/w_s)*(I1*X_m)**2/(r2**2+(x2+X_m)**2)*r2 \n",
+ "print(\"starting torque=%.3f Nm\" %T_est)\n",
+ "T_em=(3/w_s)*(I1*X_m)**2/(2*(x2+X_m)) \n",
+ "print(\"maximum torque developed=%.3f Nm\" %T_em)\n",
+ "s=s_mT\n",
+ "i=1\n",
+ "I_m=I1*(r2/s+i*x2)/(r2/s+i*(x2+X_m))\n",
+ "I_m=math.fabs(I_m)\n",
+ "V1=math.sqrt(3)*I_m*X_m \n",
+ "\n",
+ "#Results\n",
+ "print(\"supply voltage reqd=%.1f V\" %V1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "slip at max torque=0.20\n",
+ "slip at max torque=0.00784\n",
+ "for constant voltage input\n",
+ "starting torque=95.988 Nm\n",
+ "maximum torque developed=247.31 Nm\n",
+ "for constant current input\n",
+ "starting torque=5.756 Nm\n",
+ "maximum torque developed=366.993 Nm\n",
+ "supply voltage reqd=1236.2 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.27, Page No 718"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=420.0\n",
+ "V1=V/math.sqrt(3)\n",
+ "T_e=450.0\n",
+ "N=1440.0\n",
+ "n=1000.0\n",
+ "T_L=T_e*(n/N)**2\n",
+ "n1=1500.0\n",
+ "\n",
+ "#Calculations\n",
+ "w_s=2*math.pi*n1/60\n",
+ "w_m=2*math.pi*n/60\n",
+ "a=.8\n",
+ "I_d=T_L*w_s/(2.339*a*V1)\n",
+ "k=0\n",
+ "R=(1-w_m/w_s)*(2.339*a*V1)/(I_d*(1-k)) \n",
+ "print(\"value of chopper resistance=%.4f ohm\" %R)\n",
+ "n=1320.0\n",
+ "T_L=T_e*(n/N)**2\n",
+ "I_d=T_L*w_s/(2.339*a*V1) \n",
+ "print(\"Inductor current=%.3f A\" %I_d)\n",
+ "w_m=2*math.pi*n/60\n",
+ "k=1-((1-w_m/w_s)*(2.339*a*V1)/(I_d*R)) \n",
+ "print(\"value of duty cycle=%.4f\" %k)\n",
+ "s=(n1-n)/n1\n",
+ "V_d=2.339*s*a*V1 \n",
+ "print(\"Rectifed o/p voltage=%.3f V\" %V_d)\n",
+ "P=V_d*I_d\n",
+ "I2=math.sqrt(2/3)*I_d\n",
+ "r2=0.02\n",
+ "Pr=3*I2**2*r2\n",
+ "I1=a*I2\n",
+ "r1=0.015\n",
+ "Ps=3*I1**2*r1\n",
+ "Po=T_L*w_m\n",
+ "Pi=Po+Ps+Pr+P\n",
+ "eff=Po/Pi*100 \n",
+ "\n",
+ "#Results\n",
+ "print(\"Efficiency(in percent)=%.2f\" %eff)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of chopper resistance=2.0132 ohm\n",
+ "Inductor current=130.902 A\n",
+ "value of duty cycle=0.7934\n",
+ "Rectifed o/p voltage=54.449 V\n",
+ "Efficiency(in percent)=88.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.28, Page No 720"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=400.0\n",
+ "V_ph=V/math.sqrt(3)\n",
+ "N_s=1000.0\n",
+ "N=800.0\n",
+ "a=.7\n",
+ "I_d=110\n",
+ "R=2.0\n",
+ "\n",
+ "#Calculations\n",
+ "k=1-((1-N/N_s)*(2.339*a*V_ph)/(I_d*R)) \n",
+ "print(\"value of duty cycle=%.3f\" %k)\n",
+ "P=I_d**2*R*(1-k)\n",
+ "I1=a*I_d*math.sqrt(2/3)\n",
+ "r1=0.1\n",
+ "r2=0.08\n",
+ "Pr=3*I1**2*(r1+r2)\n",
+ "P_o=20000\n",
+ "P_i=P_o+Pr+P\n",
+ "eff=P_o/P_i*100 \n",
+ "print(\"Efficiency=%.2f\" %eff)\n",
+ "I11=math.sqrt(6)/math.pi*a*I_d\n",
+ "th=43\n",
+ "P_ip=math.sqrt(3)*V*I11*math.cos(math.radians(th))\n",
+ "pf=P_ip/(math.sqrt(3)*V*I11) \n",
+ "\n",
+ "#Results\n",
+ "print(\"Input power factor=%.4f\" %pf)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of duty cycle=0.656\n",
+ "Efficiency=70.62\n",
+ "Input power factor=0.7314\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.29, Page No 724"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=420.0\n",
+ "V1=V/math.sqrt(3)\n",
+ "N=1000.0\n",
+ "w_m=2*math.pi*N/60\n",
+ "N_s=1500.0\n",
+ "\n",
+ "#Calculations\n",
+ "s=(N_s-N)/N_s\n",
+ "a=0.8\n",
+ "V_d=2.339*a*s*V1 \n",
+ "print(\"rectified voltage=%.2f V\" %V_d)\n",
+ "T=450.0\n",
+ "N1=1200.0\n",
+ "T_L=T*(N/N1)**2\n",
+ "f1=50\n",
+ "w_s=4*math.pi*f1/4\n",
+ "I_d=w_s*T_L/(2.339*a*V1) \n",
+ "print(\"inductor current=%.2f A\" %I_d)\n",
+ "a_T=-.4\n",
+ "a1=math.degrees(math.acos(s*a/a_T))\n",
+ "print(\"delay angle of inverter=%.2f deg\" %a1)\n",
+ "\n",
+ "P_s=V_d*I_d\n",
+ "P_o=T_L*w_m\n",
+ "R_d=0.01\n",
+ "P_i=I_d**2*R_d\n",
+ "I2=math.sqrt(2/3)*I_d\n",
+ "r2=0.02\n",
+ "r1=0.015\n",
+ "P_rol=3*I2**2*r2\n",
+ "I1=a*I2\n",
+ "P_sol=3*I1**2*r1\n",
+ "P_i=P_o+P_rol+P_sol+P_i\n",
+ "eff=P_o/P_i*100 \n",
+ "print(\"\\nefficiency=%.2f\" %eff)\n",
+ "w_m=w_s*(1+(-a_T/a)*math.cos(math.radians(a1))-w_s*R_d*T_L/(2.339*a*V1)**2)\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "\n",
+ "#Results \n",
+ "print(\"motor speed=%.1f rpm\" %N)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rectified voltage=151.25 V\n",
+ "inductor current=108.18 A\n",
+ "delay angle of inverter=131.81 deg\n",
+ "\n",
+ "efficiency=99.64\n",
+ "motor speed=996.4 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.30, Page No 726"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=700.0\n",
+ "E2=V/math.sqrt(3)\n",
+ "N_s=1500.0\n",
+ "N=1200.0\n",
+ "\n",
+ "#Calculations\n",
+ "s=(N_s-N)/N_s\n",
+ "V_dd=0.7\n",
+ "V_dt=1.5\n",
+ "V_d=3*math.sqrt(6)*s*E2/math.pi-2*V_dd\n",
+ "V1=415.0\n",
+ "a=math.degrees(math.acos((3*math.sqrt(2)*E2/math.pi)**-1*(-V_d+2*V_dt)))\n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle advance=%.2f deg\" %(180-a))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle advance=70.22 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.31, Page No 726"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=700.0\n",
+ "E2=V/math.sqrt(3)\n",
+ "N_s=1500.0\n",
+ "N=1200.0\n",
+ "\n",
+ "#Calculations\n",
+ "s=(N_s-N)/N_s\n",
+ "V_dd=.7\n",
+ "V_dt=1.5\n",
+ "a=0\n",
+ "u=18 #overlap angle in case of rectifier\n",
+ "V_d=3*math.sqrt(6)*s*E2*(math.cos(math.radians(a))+math.cos(math.radians(a+u)))/(2*math.pi)-2*V_dd\n",
+ "V1=415\n",
+ "V_ml=math.sqrt(2)*V1\n",
+ "u=4 #overlap anglein the inverter\n",
+ " #V_dc=-(3*V_ml*(math.cos(math.radians(a))+math.cos(math.radians(a+u)))/(2*math.pi)-2*V_dt)\n",
+ " #V_dc=V_d\n",
+ " #after solving % (1+math.cos(math.radians(u)))*math.cos(math.radians(a))-math.sin(math.radians(u))*math.sin(math.radians(a))=-.6425\n",
+ "a=math.degrees(math.acos(-.6425/(math.sqrt((1+math.cos(math.radians(u)))**2+math.sin(math.radians(u))**2))))-math.degrees(math.asin(math.sin(math.radians(a))/(1+math.cos(math.radians(u)))))\n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle advance=%.2f deg\" %(180-a))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle advance=71.25 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.32, Page No 727"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=700.0\n",
+ "E2=V\n",
+ "N_s=1500.0\n",
+ "N=1200.0\n",
+ "\n",
+ "#Calculations\n",
+ "s=(N_s-N)/N_s\n",
+ "V1=415.0\n",
+ "a_T=s*E2/V1 \n",
+ "\n",
+ "#Results\n",
+ "print(\"voltage ratio of the transformer=%.2f\" %a_T)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage ratio of the transformer=0.34\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.33, Page No 733"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "P=6.0\n",
+ "N_s=600.0\n",
+ "f1=P*N_s/120.0\n",
+ "V=400.0\n",
+ "f=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_t=f1*V/f \n",
+ "print(\"supply freq=%.0f Hz\" %V_t)\n",
+ "T=340.0\n",
+ "N=1000.0\n",
+ "T_L=T*(N_s/N)**2\n",
+ "w_s=2*math.pi*N_s/60\n",
+ "P=T_L*w_s\n",
+ "I_a=P/(math.sqrt(3)*V_t) \n",
+ "print(\"armature current=%.2f A\" %I_a)\n",
+ "Z_s=2\n",
+ "X_s=f1/f*math.fabs(Z_s)\n",
+ "V_t=V_t/math.sqrt(3)\n",
+ "Ef=math.sqrt(V_t**2+(I_a*X_s)**2)\n",
+ "print(\"excitation voltage=%.2f V\" %(math.sqrt(3)*Ef))\n",
+ "dl=math.degrees(math.atan(I_a*X_s/V_t))\n",
+ "print(\"load angle=%.2f deg\" %dl)\n",
+ "T_em=(3/w_s)*(Ef*V_t/X_s) \n",
+ "\n",
+ "#Results\n",
+ "print(\"pull out torque=%.2f Nm\" %T_em)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "supply freq=240 Hz\n",
+ "armature current=18.50 A\n",
+ "excitation voltage=243.06 V\n",
+ "load angle=9.10 deg\n",
+ "pull out torque=773.69 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.34, Page No 736"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "P=4.0\n",
+ "f=50.0\n",
+ "w_s=4*math.pi*f/P\n",
+ "X_d=8.0\n",
+ "X_q=2.0\n",
+ "T_e=80.0\n",
+ "V=400.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_t=V/math.sqrt(3)\n",
+ "dl=(1/2)*math.degrees(math.asin(T_e*w_s/((3/2)*(V_t)**2*(1/X_q-1/X_d)))) \n",
+ "print(\"load angle=%.3f deg\" %dl)\n",
+ "I_d=V_t*math.cos(math.radians(dl))/X_d\n",
+ "I_q=V_t*math.sin(math.radians(dl))/X_q\n",
+ "I_a=math.sqrt(I_d**2+I_q**2) \n",
+ "print(\"armature current=%.2f A\" %I_a)\n",
+ "pf=T_e*w_s/(math.sqrt(3)*V*I_a) \n",
+ "\n",
+ "#Results\n",
+ "print(\"input power factor=%.4f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load angle=0.000 deg\n",
+ "armature current=28.87 A\n",
+ "input power factor=0.6283\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.35, Page No 737"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "T_e=3.0\n",
+ "K_m=1.2\n",
+ "I_a=T_e/K_m\n",
+ "r_a=2.0\n",
+ "V=230.0\n",
+ "\n",
+ "#Calculations\n",
+ "E_a=(0.263*math.sqrt(2)*V-I_a*r_a)/(1-55/180)\n",
+ "w_m=E_a/K_m\n",
+ "N=w_m*60/(2*math.pi) \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor speed=%.2f rpm\" %N)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor speed=640.96 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.36, Page No 738"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "K_m=1.0\n",
+ "N=1360.0\n",
+ "\n",
+ "#Calculations\n",
+ "w_m=2*math.pi*N/60\n",
+ "E_a=K_m*w_m\n",
+ " #after calculations V_t % calculated\n",
+ "V_t=163.45\n",
+ "r_a=4\n",
+ "I_a=(V_t-E_a)/r_a\n",
+ "T_e=K_m*I_a \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor torque=%.4f Nm\" %T_e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor torque=5.2578 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.37, Page No 740"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "K_m=1.0\n",
+ "N=2100.0\n",
+ "\n",
+ "#Calculations\n",
+ "w_m=2*math.pi*N/60\n",
+ "E_a=K_m*w_m\n",
+ " #after calculations V_t % calculated\n",
+ "V_t=227.66\n",
+ "r_a=4\n",
+ "I_a=(V_t-E_a)/r_a\n",
+ "T_e=K_m*I_a \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor torque=%.2f Nm\" %T_e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor torque=1.94 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.38, Page No 742"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "K_m=1.0\n",
+ "N=840.0\n",
+ "\n",
+ "#Calculations\n",
+ "w_m=2*math.pi*N/60\n",
+ "E_a=K_m*w_m\n",
+ "V=230.0\n",
+ "a=75.0\n",
+ "V_t=math.sqrt(2)*V/math.pi*(1+math.cos(math.radians(a)))\n",
+ "r_a=4\n",
+ "I_a=(V_t-E_a)/r_a\n",
+ "T_e=K_m*I_a \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor torque=%.4f Nm\" %T_e)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor torque=10.5922 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.39, Page No 743"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "K_m=1.0\n",
+ "N=1400.0\n",
+ "\n",
+ "#Calculations\n",
+ "w_m=2*math.pi*N/60\n",
+ "E_a=K_m*w_m\n",
+ "V=230.0\n",
+ "a=60.0\n",
+ "a1=212\n",
+ "V_t=math.sqrt(2)*V/math.pi*(math.cos(math.radians(a))-math.cos(math.radians(a1)))+E_a*(180+a-a1)/180\n",
+ "r_a=3\n",
+ "I_a=(V_t-E_a)/r_a\n",
+ "T_e=K_m*I_a \n",
+ "\n",
+ "#Results\n",
+ "print(\"motor torque=%.3f Nm\" %T_e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor torque=5.257 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.40, Page No 745"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "K_m=1.0\n",
+ "N=600.0\n",
+ "w_m=2*math.pi*N/60\n",
+ "E_a=K_m*w_m\n",
+ "V=230.0\n",
+ "a=60.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_t=2*math.sqrt(2)*V/math.pi*(math.cos(math.radians(a)))\n",
+ "r_a=3\n",
+ "I_a=(V_t-E_a)/r_a\n",
+ "T_e=K_m*I_a \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"motor torque=%.3f Nm\" %T_e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "motor torque=13.568 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.41, Page No 745"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "r1=.6\n",
+ "r2=.4\n",
+ "s=0.04\n",
+ "x1=1.6\n",
+ "x2=1.6\n",
+ "Z=(r1+r2/s)+(x1+x2)\n",
+ "V=400.0\n",
+ "I1=V/Z \n",
+ "print(\"source current=%.3f A \" %math.degrees(math.atan(I1.imag/I1.real)))\n",
+ "print(\"and with %.1f deg phase\" %math.fabs(I1))\n",
+ "I2=V/Z\n",
+ "N=1500\n",
+ "w_s=2*math.pi*N/60\n",
+ "T_e=(3/w_s)*abs(I2)**2*r2/s \n",
+ "print(\"motor torque=%.2f Nm\" %T_e)\n",
+ "N_r=N*(1-s)\n",
+ "\n",
+ "f=45\n",
+ "N_s1=120*f/4\n",
+ "w_s=2*math.pi*N_s1/60\n",
+ "s1=(N_s1-N_r)/N_s1\n",
+ "Z=(r1+r2/s1)+(x1+x2)*f/50.0\n",
+ "V=360\n",
+ "I1=V/Z \n",
+ "print(\"source current=%.3f A \" %math.degrees(math.atan(I1.imag/I1.real)))\n",
+ "print(\"and with %.1f deg phase\" %math.fabs(I1))\n",
+ "I2=V/Z\n",
+ "T_e=(3/w_s)*abs(I2)**2*r2/s1 \n",
+ "print(\"motor torque=%.2f Nm\" %T_e)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source current=0.000 A \n",
+ "and with 29.0 deg phase\n",
+ "motor torque=160.46 Nm\n",
+ "source current=-0.000 A \n",
+ "and with 142.9 deg phase\n",
+ "motor torque=-2598.45 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter13_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter13_4.ipynb new file mode 100755 index 00000000..62d2a926 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter13_4.ipynb @@ -0,0 +1,342 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13 : Power Factor Improvement"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.1, Page No 754"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=250.0\n",
+ "R_l=5.0\n",
+ "I_l=20.0\n",
+ "V_l1=math.sqrt(V_s**2-(R_l*I_l)**2)\n",
+ "reg2=(V_s-V_l1)/V_s*100 \n",
+ "pf1=1.0\n",
+ "\n",
+ "#Calculations\n",
+ "P_l1=V_l1*I_l*pf1 #load power\n",
+ "P_r1=V_s*I_l*pf1 #max powwible system rating\n",
+ "utf1=P_l1*100/P_r1 \n",
+ "pf2=0.5\n",
+ " #(.5*V_l)**2+(.866*V_l+R_l*I_l)**2=V_s**2\n",
+ " #after solving\n",
+ "V_l2=158.35 \n",
+ "reg2=(V_s-V_l2)/V_s*100 \n",
+ "P_l2=V_l2*I_l*pf2 #load power\n",
+ "P_r2=V_s*I_l #max powwible system rating\n",
+ "utf2=P_l2*100/P_r2 \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"for pf=1\")\n",
+ "print(\"load voltage=%.2f V\" %V_l1)\n",
+ "print(\"voltage regulation=%.2f\" %reg1)\n",
+ "print(\"system utilisation factor=%.3f\" %utf1)\n",
+ "print(\"energy consumed(in units)=%.1f\" %(P_l1/1000))\n",
+ "print(\"for pf=.5\")\n",
+ "print(\"load voltage=%.2f V\" %V_l2)\n",
+ "print(\"voltage regulation=%.2f\" %reg2)\n",
+ "print(\"system utilisation factor=%.3f\" %utf2)\n",
+ "print(\"energy consumed(in units)=%.2f\" %(P_l2/1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "NameError",
+ "evalue": "name 'reg1' is not defined",
+ "output_type": "pyerr",
+ "traceback": [
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
+ "\u001b[1;32m<ipython-input-2-ffdbe43fd921>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 25\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"for pf=1\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 26\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"load voltage=%.2f V\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mV_l1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 27\u001b[1;33m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"voltage regulation=%.2f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mreg1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 28\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"system utilisation factor=%.3f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[0mutf1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 29\u001b[0m \u001b[1;32mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"energy consumed(in units)=%.1f\"\u001b[0m \u001b[1;33m%\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mP_l1\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m1000\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;31mNameError\u001b[0m: name 'reg1' is not defined"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for pf=1\n",
+ "load voltage=229.13 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.2, Page No 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "f=50.0\n",
+ "V_s=230.0\n",
+ "I_m1=2\n",
+ "pf1=.3\n",
+ "\n",
+ "#Calculations\n",
+ "I_c1=I_m1*math.sin(math.radians(math.degrees(math.acos(pf1))))\n",
+ "C1=I_c1/(2*math.pi*f*V_s) \n",
+ "I_m2=5\n",
+ "pf2=.5\n",
+ "I_c2=I_m2*math.sin(math.radians(math.degrees(math.acos(pf2))))\n",
+ "C2=I_c2/(2*math.pi*f*V_s) \n",
+ "I_m3=10\n",
+ "pf3=.7\n",
+ "I_c3=I_m3*math.sin(math.radians(math.degrees(math.acos(pf3))))\n",
+ "C3=I_c3/(2*math.pi*f*V_s) \n",
+ "\n",
+ "#Results\n",
+ "print(\"at no load\")\n",
+ "print(\"value of capacitance=%.3f uF\" %(C1*10**6))\n",
+ "print(\"at half full load\")\n",
+ "print(\"value of capacitance=%.3f uF\" %(C2*10**6))\n",
+ "print(\"at full load\")\n",
+ "print(\"value of capacitance=%.3f uF\" %(C3*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "at no load\n",
+ "value of capacitance=26.404 uF\n",
+ "at half full load\n",
+ "value of capacitance=59.927 uF\n",
+ "at full load\n",
+ "value of capacitance=98.834 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.3 Page No 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I_c=10.0\n",
+ "f=50.0\n",
+ "V_s=230.0\n",
+ "\n",
+ "#Calculations\n",
+ "C=I_c/(2*math.pi*f*V_s) \n",
+ "I_l=10\n",
+ "L=V_s/(2*math.pi*f*I_l) \n",
+ "\n",
+ "#Results\n",
+ "print(\"value of capacitance=%.3f uF\" %(C*10**6))\n",
+ "print(\"value of inductor=%.3f mH\" %(L*1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of capacitance=138.396 uF\n",
+ "value of inductor=73.211 mH\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.4, Page No 765"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "I_L=10.0\n",
+ "X_L=V_s/I_L\n",
+ "I_f1=6.0\n",
+ " #B=2*a-math.sin(2*a)\n",
+ "B=2*math.pi-I_f1*math.pi*X_L/V_s\n",
+ "a=0\n",
+ "i=1.0\n",
+ "for a in range(1,360):\n",
+ " b=2*a*math.pi/180-math.sin(math.radians(2*a)) \n",
+ " if math.fabs(B-b)<=0.001 : #by hit and trial\n",
+ " i=2\n",
+ " break\n",
+ "print(\"firing angle of TCR = %.1f deg\" %a)\n",
+ " #(a-.01)*180/math.pi)\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle of TCR = 359.0 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.5 Page No 766"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "L=.01\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"for firing angle=90deg\")\n",
+ "a=90*math.pi/180\n",
+ "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n",
+ "print(\"effective inductance=%.0f mH\" %(L_eff*1000))\n",
+ "print(\"for firing angle=120deg\")\n",
+ "a=120*math.pi/180\n",
+ "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n",
+ "print(\"effective inductance=%.3f mH\" %(L_eff*1000))\n",
+ "print(\"for firing angle=150deg\")\n",
+ "a=150*math.pi/180\n",
+ "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n",
+ "print(\"effective inductance=%.2f mH\" %(L_eff*1000))\n",
+ "print(\"for firing angle=170deg\")\n",
+ "a=170*math.pi/180\n",
+ "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n",
+ "print(\"effective inductance=%.3f H\" %L_eff)\n",
+ "print(\"for firing angle=175deg\")\n",
+ "a=175*math.pi/180\n",
+ "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"effective inductance=%.2f H\" %L_eff)\n",
+ "print(\"for firing angle=180deg\")\n",
+ "a=180*math.pi/180\n",
+ "L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a)) \n",
+ "print(\"effective inductance=%.3f H\" %L_eff)\n",
+ " #random value at firing angle =180 is equivalent to infinity as in answer in book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for firing angle=90deg\n",
+ "effective inductance=10 mH\n",
+ "for firing angle=120deg\n",
+ "effective inductance=25.575 mH\n",
+ "for firing angle=150deg\n",
+ "effective inductance=173.40 mH\n",
+ "for firing angle=170deg\n",
+ "effective inductance=4.459 H\n",
+ "for firing angle=175deg\n",
+ "effective inductance=35.51 H\n",
+ "for firing angle=180deg\n",
+ "effective inductance=-128265253940037.750 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.6 Page No 766"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "Q=100.0*10**3\n",
+ "V_s=11.0*10**3\n",
+ "\n",
+ "#Calculations\n",
+ "f=50.0\n",
+ "L=V_s**2/(2*math.pi*f*Q) \n",
+ "\n",
+ "#Results\n",
+ "print(\"effective inductance=%.4f H\" %L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "effective inductance=3.8515 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter14_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter14_4.ipynb new file mode 100755 index 00000000..a9c3a3f1 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter14_4.ipynb @@ -0,0 +1,93 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14 : Miscellaneous Topics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.1, Page No 777"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a1=0\n",
+ "a2=45.0\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"for two single phase series semiconvertors\")\n",
+ "V_0=V_m/math.pi*(2+math.cos(math.radians(a1))+math.cos(math.radians(a2))) \n",
+ "print(\"avg o/p voltage=%.2f V\" %V_0)\n",
+ "V_or=V_s*math.sqrt((1/math.pi)*(4*math.pi-3*a2*math.pi/180+(3/2)*math.sin(math.radians(2*a2)))) \n",
+ "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n",
+ "DF=(3+math.cos(math.radians(a2)))/(math.sqrt(2)*math.sqrt(5+3*math.cos(math.radians(a2)))) \n",
+ "print(\"DF=%.2f\" %DF)\n",
+ "PF=math.sqrt(2/math.pi)*(3+math.cos(math.radians(a2)))/math.sqrt(4*math.pi-3*a2*math.pi/180) \n",
+ "print(\"PF=%.2f\" %PF)\n",
+ "HF=math.sqrt((math.pi*(math.pi-(3/4)*a2*math.pi/180)/(5+3*math.cos(math.radians(a2))))-1) \n",
+ "print(\"HF=%.2f\" %HF)\n",
+ "print(\"for two single phase series full convertors\")\n",
+ "a=45.0\n",
+ "V_0=2*V_m/math.pi*(1+math.cos(math.radians(a))) \n",
+ "print(\"avg o/p voltage=%.2f V\" %V_0)\n",
+ "V_or=2*V_s*math.sqrt((1/math.pi)*(math.pi-a2*math.pi/180+(1/2)*math.sin(math.radians(2*a2)))) \n",
+ "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n",
+ "DF=math.cos(math.radians(a2/2)) \n",
+ "\n",
+ "\n",
+ "#Results \n",
+ "print(\"DF=%.2f\" %DF)\n",
+ "PF=math.sqrt(2/(math.pi*(math.pi-a2*math.pi/180)))*(1+math.cos(math.radians(a2))) \n",
+ "print(\"PF=%.2f\" %PF)\n",
+ "HF=math.sqrt((math.pi*(math.pi-a2*math.pi/180)/(4+4*math.cos(math.radians(a2))))-1) \n",
+ "print(\"HF=%.2f\" %HF)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for two single phase series semiconvertors\n",
+ "avg o/p voltage=383.82 V\n",
+ "rms value of o/p voltage=434.47 V\n",
+ "DF=0.98\n",
+ "PF=0.93\n",
+ "HF=0.62\n",
+ "for two single phase series full convertors\n",
+ "avg o/p voltage=353.50 V\n",
+ "rms value of o/p voltage=398.37 V\n",
+ "DF=0.92\n",
+ "PF=0.89\n",
+ "HF=0.29\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter2_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter2_4.ipynb new file mode 100755 index 00000000..1872c9f4 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter2_4.ipynb @@ -0,0 +1,233 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 02 : Power Semiconductor Diodes and Transistors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1, Page No 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "B=40.0\n",
+ "R_c=10 #ohm\n",
+ "V_cc=130.0 #V\n",
+ "V_B=10.0 #V\n",
+ "V_CES=1.0 #V\n",
+ "V_BES=1.5 #V\n",
+ "\n",
+ "#Calculations\n",
+ "I_CS=(V_cc-V_CES)/R_c #A\n",
+ "I_BS=I_CS/B #A\n",
+ "R_B1=(V_B-V_BES)/I_BS\n",
+ "P_T1=V_BES*I_BS+V_CES*I_CS\n",
+ "ODF=5\n",
+ "I_B=ODF*I_BS\n",
+ "R_B2=(V_B-V_BES)/I_B\n",
+ "P_T2=V_BES*I_B+V_CES*I_CS\n",
+ "B_f=I_CS/I_B\n",
+ "\n",
+ "#Results\n",
+ "print(\"value of R_B in saturated state= %.2f ohm\" %R_B1)\n",
+ "print(\"Power loss in transistor=%.2f W\" %P_T1)\n",
+ "print(\"Value of R_B for an overdrive factor 5 = %.2f ohm\" %R_B2)\n",
+ "print(\"Power loss in transistor = %.2f W\" %P_T2)\n",
+ "print(\"Forced current gain=%.0f\" %B_f)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of R_B in saturated state= 26.36 ohm\n",
+ "Power loss in transistor=13.38 W\n",
+ "Value of R_B for an overdrive factor 5 = 5.27 ohm\n",
+ "Power loss in transistor = 15.32 W\n",
+ "Forced current gain=8\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, Page No 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "I_CEO=2*10**-3 #A\n",
+ "V_CC=220.0 #V\n",
+ "P_dt=I_CEO*V_CC #instant. power loss during delay time\n",
+ "t_d=.4*10**-6 #s\n",
+ "f=5000\n",
+ "P_d=f*I_CEO*V_CC*t_d #avg power loss during delay time\n",
+ "V_CES=2 #V\n",
+ "t_r=1*10**-6 #s\n",
+ "I_CS=80 #A\n",
+ "\n",
+ "#Calculations\n",
+ "P_r=f*I_CS*t_r*(V_CC/2-(V_CC-V_CES)/3) #avg power loss during rise time\n",
+ "t_m=V_CC*t_r/(2*(V_CC-V_CES))\n",
+ "P_rm=I_CS*V_CC**2/(4*(V_CC-V_CES)) #instant. power loss during rise time\n",
+ "\n",
+ "#Results\n",
+ "P_on=P_d+P_r \n",
+ "print(\"Avg power loss during turn on = %.2f W\" %P_on)\n",
+ "P_nt=I_CS*V_CES \n",
+ "print(\"Instantaneous power loss during turn on = %.0f W\" %P_nt)\n",
+ "t_n=50*10**-6\n",
+ "P_n=f*I_CS*V_CES*t_n\n",
+ "print(\"Avg power loss during conduction period = %.0f W\" %P_n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Avg power loss during turn on = 14.93 W\n",
+ "Instantaneous power loss during turn on = 160 W\n",
+ "Avg power loss during conduction period = 40 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3 Page No 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "I_CEO=2*10**-3 #A\n",
+ "V_CC=220 #V\n",
+ "t_d=.4*10**-6 #s\n",
+ "f=5000\n",
+ "V_CES=2 #V\n",
+ "t_r=1*10**-6 #s\n",
+ "I_CS=80 #A\n",
+ "t_n=50*10**-6 #s\n",
+ "t_0=40*10**-6 #s\n",
+ "t_f=3*10**-6 #s\n",
+ "\n",
+ "#Calculations\n",
+ "P_st=I_CS*V_CES # instant. power loss during t_s\n",
+ "P_s=f*I_CS*V_CES*t_f #avg power loss during t_s\n",
+ "P_f=f*t_f*(I_CS/6)*(V_CC-V_CES) #avg power loss during fall time\n",
+ "P_fm=(I_CS/4)*(V_CC-V_CES) #peak instant power dissipation\n",
+ "P_off=P_s+P_f\n",
+ "\n",
+ "#Results\n",
+ "print(\"Total avg power loss during turn off = %.2f W\" %P_off)\n",
+ "P_0t=I_CEO*V_CC\n",
+ "print(\"Instantaneous power loss during t_0 = %.2f W\" %P_0t)\n",
+ "P_0=f*I_CEO*V_CC*t_0 #avg power loss during t_s\n",
+ "P_on=14.9339 #W from previous eg\n",
+ "P_n=40 #W from previous eg\n",
+ "P_T=P_on+P_n+P_off+P_0 \n",
+ "print(\"Total power loss = %.2f W\" %P_T)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total avg power loss during turn off = 44.91 W\n",
+ "Instantaneous power loss during t_0 = 0.44 W\n",
+ "Total power loss = 99.93 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4, Page No 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I_CS=100.0 \n",
+ "V_CC=200.0 \n",
+ "t_on=40*10**-6\n",
+ "\n",
+ "#Calculations\n",
+ "P_on=(I_CS/50)*10**6*t_on*(V_CC*t_on/2-(V_CC*10**6*t_on**2/(40*3))) #energy during turn on\n",
+ "t_off=60*10**-6\n",
+ "P_off=(I_CS*t_off/2-(I_CS/60)*10**6*(t_off**2)/3)*((V_CC/75)*10**6*t_off) #energy during turn off\n",
+ "P_t=P_on+P_off #total energy\n",
+ "P_avg=300.0\n",
+ "f=P_avg/P_t\n",
+ "\n",
+ "#Results\n",
+ "print(\"Allowable switching frequency = %.2f Hz\" %f)\n",
+ "#in book ans is: f=1123.6 Hz. The difference in results due to difference in rounding of of digits"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Allowable switching frequency = 1125.00 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter3_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter3_4.ipynb new file mode 100755 index 00000000..2e53ef9d --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter3_4.ipynb @@ -0,0 +1,1001 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 03 : Diode Circuits and Rectifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, Page No 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=400.0 #V\n",
+ "V_o=100.0 #V\n",
+ "L=100.0 #uH\n",
+ "C=30.0 #uF\n",
+ "\n",
+ "#Calculations\n",
+ "t_o=math.pi*math.sqrt(L*C)\n",
+ "print(\"conduction time of diode = %.2f us\" %t_o)\n",
+ "#in book solution is t_o=54.77 us. The ans is incorrect as %pi is not muliplied in ans. Formulae mentioned in correct.\n",
+ "I_p=(V_s-V_o)*math.sqrt(C/L)\n",
+ "\n",
+ "#Results\n",
+ "print(\"Peak current through diode=%.2f A\" %I_p)\n",
+ "v_D=-V_s+V_o \n",
+ "print(\"Voltage across diode = %.2f V\" %v_D)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conduction time of diode = 172.07 us\n",
+ "Peak current through diode=164.32 A\n",
+ "Voltage across diode = -300.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6, Page No 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "R=10 #ohm\n",
+ "L=0.001 #H\n",
+ "C=5*10**-6 #F\n",
+ "V_s=230 #V\n",
+ "xi=R/(2*L)\n",
+ "\n",
+ "#Calculations\n",
+ "w_o=1/math.sqrt(L*C)\n",
+ "w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)\n",
+ "t=math.pi/w_r \n",
+ "\n",
+ "#Results\n",
+ "print('Conduction time of diode=%.3f us'%(t*10**6))\n",
+ "t=0\n",
+ "di=V_s/L\n",
+ "print('Rate of change of current at t=0 is %.2f A/s' %di)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Conduction time of diode=237.482 us\n",
+ "Rate of change of current at t=0 is 230000.00 A/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7 Page No 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "I_or=100 #A\n",
+ "R=1.0 #assumption\n",
+ "\n",
+ "#Calculations\n",
+ "V_m=I_or*2*R\n",
+ "I_o=V_m/(math.pi*R)\n",
+ "q=200 #Ah\n",
+ "t=q/I_o\n",
+ "\n",
+ "#Results\n",
+ "print(\"time required to deliver charge=%.02f hrs\" %t)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time required to deliver charge=3.14 hrs\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8, Page No 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0 #V\n",
+ "P=1000 #W\n",
+ "R=V_s**2/P\n",
+ "\n",
+ "#Calculations\n",
+ "V_or=math.sqrt(2)*V_s/2\n",
+ "P_h=V_or**2/R \n",
+ "print(\"Power delivered to the heater = %.2f W\" %P_h)\n",
+ "V_m=math.sqrt(2)*230\n",
+ "I_m=V_m/R\n",
+ "\n",
+ "#Results\n",
+ "print(\"Peak value of diode current = %.2f A\" %I_m)\n",
+ "pf=V_or/V_s\n",
+ "print(\"Input power factor=%.2f\" %pf)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power delivered to the heater = 500.00 W\n",
+ "Peak value of diode current = 6.15 A\n",
+ "Input power factor=0.71\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9 Page No 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230 #V\n",
+ "V_m=V_s*math.sqrt(2)\n",
+ "E=150 #V\n",
+ "\n",
+ "#Calculations\n",
+ "theta1=math.degrees(E/(math.sqrt(2)*V_s))\n",
+ "R=8 #ohm\n",
+ "f=50 #Hz\n",
+ "I_o=(1/(2*math.pi*R))*((2*math.sqrt(2)*V_s*math.cos(math.radians(theta1)))-E*(math.pi-2*theta1*math.pi/180))\n",
+ "\n",
+ "#Results\n",
+ "print(\"avg value of charging current=%.2f A\" %I_o)\n",
+ "P_d=E*I_o\n",
+ "print(\"\\npower delivered to battery=%.2f W\" %P_d)\n",
+ "I_or=math.sqrt((1/(2*math.pi*R**2))*((V_s**2+E**2)*(math.pi-2*theta1*math.pi/180)+V_s**2*math.sin(math.radians(2*theta1))-4*V_m*E*math.cos(math.radians(theta1))))\n",
+ "print(\"\\nrms value of the load current=%.2f A\" %I_or)\n",
+ "pf=(E*I_o+I_or**2*R)/(V_s*I_or)\n",
+ "print(\"\\nsupply pf=%.3f\" %pf)\n",
+ "P_dd=I_or**2*R\n",
+ "print(\"\\npower dissipated in the resistor=%.2f W\" %P_dd)\n",
+ "q=1000.00 #Wh\n",
+ "t=q/P_d \n",
+ "print(\"\\ncharging time=%.2f hr\" %t)\n",
+ "n=P_d*100/(P_d+P_dd)\n",
+ "print(\"rectifier efficiency =%.2f \" %n)\n",
+ "PIV=math.sqrt(2)*V_s+E\n",
+ "print(\"PIV of diode=%.2f V\" %PIV)\n",
+ "#solutions have small variations due to difference in rounding off of digits"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg value of charging current=4.97 A\n",
+ "\n",
+ "power delivered to battery=745.11 W\n",
+ "\n",
+ "rms value of the load current=9.29 A\n",
+ "\n",
+ "supply pf=0.672\n",
+ "\n",
+ "power dissipated in the resistor=690.74 W\n",
+ "\n",
+ "charging time=1.34 hr\n",
+ "rectifier efficiency =51.89 \n",
+ "PIV of diode=475.27 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10 Page No 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "V_s=230 #V\n",
+ "t_rr=40*10**-6 #s reverde recovery time\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=2*math.sqrt(2)*V_s/math.pi\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "f=50\n",
+ "V_r1=(V_m/math.pi)*(1-math.cos(math.radians(2*math.pi*f*t_rr*180/math.pi)))\n",
+ "v_avg1=V_r1*100/V_o*10**3\n",
+ "f=2500\n",
+ "V_r2=(V_m/math.pi)*(1-math.cos(math.radians(2*math.pi*f*t_rr*180/math.pi)))\n",
+ "v_avg2=V_r2*100/V_o\n",
+ "\n",
+ "#Results\n",
+ "print(\"when f=50Hz\")\n",
+ "print(\"Percentage reduction in avg o/p voltage=%.2f x 10^-3\" %v_avg1)\n",
+ "print(\"when f=2500Hz\")\n",
+ "print(\"Percentage reduction in avg o/p voltage = %.3f\" %v_avg2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when f=50Hz\n",
+ "Percentage reduction in avg o/p voltage=3.95 x 10^-3\n",
+ "when f=2500Hz\n",
+ "Percentage reduction in avg o/p voltage = 9.549\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11, Page No 79 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230 #V\n",
+ "R=10.0 #ohm\n",
+ "\n",
+ "#Calculations\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "V_o=2*V_m/math.pi\n",
+ "print(\"Avg value of o/p voltage = %.2f V\" %V_o)\n",
+ "I_o=V_o/R\n",
+ "print(\"Avg value of o/p current = %.2f A\" %I_o)\n",
+ "I_DA=I_o/2\n",
+ "print(\"Avg value of diode current=%.2f A\" %I_DA)\n",
+ "I_Dr=I_o/math.sqrt(2) \n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of diode current=%.2f A\" %I_Dr)\n",
+ "print(\"rms value of o/p current = %.2f A\" %I_o)\n",
+ "print(\"rms value of i/p current = %.2f A\" %I_o)\n",
+ "pf=(V_o/V_s)\n",
+ "print(\"supply pf = %.2f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Avg value of o/p voltage = 207.07 V\n",
+ "Avg value of o/p current = 20.71 A\n",
+ "Avg value of diode current=10.35 A\n",
+ "rms value of diode current=14.64 A\n",
+ "rms value of o/p current = 20.71 A\n",
+ "rms value of i/p current = 20.71 A\n",
+ "supply pf = 0.90\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12 Page No 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "V_s=230.0 #V\n",
+ "R=1000.0 #ohm\n",
+ "R_D=20.0 #ohm\n",
+ "\n",
+ "#Calculations\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "I_om=V_m/(R+R_D) \n",
+ "\n",
+ "#Results\n",
+ "print(\"Peak load current = %.2f A\" %I_om)\n",
+ "I_o=I_om/math.pi\n",
+ "print(\"dc load current = %.2f A\" %I_o)\n",
+ "V_D=I_o*R_D-V_m/math.pi\n",
+ "print(\"dc diode voltage = %.2f V\" %V_D)\n",
+ "V_on=V_m/math.pi\n",
+ "print(\"at no load, load voltage = %.2f V\" %V_on)\n",
+ "V_o1=I_o*R \n",
+ "print(\"at given load, load voltage = %.2f V\" %V_o1)\n",
+ "vr=(V_on-V_o1)*100/V_on \n",
+ "print(\"Voltage regulation(in percent)=%.2f\" %vr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak load current = 0.32 A\n",
+ "dc load current = 0.10 A\n",
+ "dc diode voltage = -101.51 V\n",
+ "at no load, load voltage = 103.54 V\n",
+ "at given load, load voltage = 101.51 V\n",
+ "Voltage regulation(in percent)=1.96\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13 Page No 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_L=6.8 #V\n",
+ "V_smax=20*1.2 #V\n",
+ "V_smin=20*.8 #V\n",
+ "I_Lmax=30*1.5 #mA\n",
+ "I_Lmin=30*0.5 #mA\n",
+ "I_z=1 #mA\n",
+ "\n",
+ "#Calculations\n",
+ "R_smax=(V_smax-V_L)/((I_Lmin+I_z)*10**-3)\n",
+ "print(\"max source resistance = %.2f ohm\" %R_smax)\n",
+ "R_smin=(V_smin-V_L)/((I_Lmax+I_z)*10**-3) \n",
+ "print(\"Min source resistance = %.2f ohm\" %R_smin) #in book solution, error is committed in putting the values in formulea(printing error) but solution is correct\n",
+ "R_Lmax=V_L*1000/I_Lmin\n",
+ "print(\"Max load resistance = %.2f ohm\" %R_Lmax)\n",
+ "R_Lmin=V_L*1000/I_Lmax \n",
+ "V_d=0.6 #V\n",
+ "V_r=V_L-V_d\n",
+ "\n",
+ "#Results\n",
+ "print(\"Min load resistance=%.2f ohm\" %R_Lmin)\n",
+ "print(\"Voltage rating of zener diode=%.2f V\" %V_r)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "max source resistance = 1075.00 ohm\n",
+ "Min source resistance = 200.00 ohm\n",
+ "Max load resistance = 453.33 ohm\n",
+ "Min load resistance=151.11 ohm\n",
+ "Voltage rating of zener diode=6.20 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14 Page No 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "I2=200*10**-6 #A\n",
+ "V_z=20 #V\n",
+ "R_G=500.0 #hm\n",
+ "\n",
+ "#Calculations\n",
+ "R2=(V_z/I2)-R_G\n",
+ "print(\"R2=%.2f kilo-ohm\" %(R2/1000))\n",
+ "\n",
+ "V_v=25 #V\n",
+ "I1=I2\n",
+ "R1=(V_v-V_z)/I1\n",
+ "\n",
+ "#Results\n",
+ "print(\"R1=%.0f kilo-ohm\"%(R1/1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R2=99.50 kilo-ohm\n",
+ "R1=25 kilo-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15, Page No 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "V_s=2*230 #V\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=(math.sqrt(2)*V_s)/math.pi\n",
+ "R=60 #ohm\n",
+ "P_dc=(V_o)**2/R\n",
+ "TUF=0.2865\n",
+ "VA=P_dc/TUF\n",
+ "\n",
+ "#RESULTS\n",
+ "print(\"kVA rating of the transformer = %.2f kVA\" %(VA/1000));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "kVA rating of the transformer = 2.49 kVA\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16, Page No 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "tr=0.5 #turns ratio\n",
+ "I_o=10.0\n",
+ "V=230.0\n",
+ "V_s=V/tr\n",
+ "\n",
+ "#Calculations\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "V_o=2*V_m/math.pi\n",
+ "phi1=0\n",
+ "#displacemnt angle=0 as fundamnetal component of i/p source current in phase with source voltage\n",
+ "DF=math.cos(math.radians(phi1))\n",
+ "I_s1=4*I_o/(math.sqrt(2)*math.pi)\n",
+ "I_s=math.sqrt(I_o**2*math.pi/math.pi)\n",
+ "CDF=I_s1/I_o\n",
+ "pf=CDF*DF\n",
+ "HF=math.sqrt((I_s/I_s1)**2-1)\n",
+ "CF=I_o/I_s\n",
+ "\n",
+ "#Results\n",
+ "print(\"o/p voltage = %.2f V\" %V_o)\n",
+ "print(\"distortion factor = %.2f\" %DF)\n",
+ "print(\"i/p pf=%.2f\" %pf)\n",
+ "print(\"Current displacent factor=%.2f\" %CDF)\n",
+ "print(\"Harmonic factor = %.2f\" %HF)\n",
+ "print(\"Creast factor = %.2f\" %CF)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "o/p voltage = 414.15 V\n",
+ "distortion factor = 1.00\n",
+ "i/p pf=0.90\n",
+ "Current displacent factor=0.90\n",
+ "Harmonic factor = 0.48\n",
+ "Creast factor = 1.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17, Page No 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_o=230.0\n",
+ "R=10.0\n",
+ "V_s=V_o*math.pi/(2*math.sqrt(2))\n",
+ "I_o=V_o/R\n",
+ "I_m=math.sqrt(2)*V_s/R\n",
+ "I_DAV=I_m/math.pi\n",
+ "\n",
+ "#Calculations\n",
+ "#avg value of diode current\n",
+ "I_Dr=I_m/2\n",
+ "PIV=math.sqrt(2)*V_s\n",
+ "I_s=I_m/math.sqrt(2)\n",
+ "TF=V_s*I_s\n",
+ "\n",
+ "#Results\n",
+ "print(\"peak diode current=%.2f A\" %I_m)\n",
+ "print(\"I_DAV=%.2f A\" %I_DAV)\n",
+ "print(\"I_Dr=%.2f A\" %I_Dr) #rms value of diode current\n",
+ "print(\"PIV=%.1f V\" %PIV)\n",
+ "print(\"Transformer rating = %.2f kVA\" %(TF/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak diode current=36.13 A\n",
+ "I_DAV=11.50 A\n",
+ "I_Dr=18.06 A\n",
+ "PIV=361.3 V\n",
+ "Transformer rating = 6.53 kVA\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.18, Page No 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "tr=5\n",
+ "V=1100.0\n",
+ "R=10.0\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"In case of 3ph-3pulse type\")\n",
+ "V_ph=V/tr\n",
+ "V_mp=math.sqrt(2)*V_ph\n",
+ "V_o=3*math.sqrt(3)*V_mp/(2*math.pi)\n",
+ "print(\"avg o/p voltage=%.1f V\" %V_o)\n",
+ "I_mp=V_mp/R\n",
+ "I_D=(I_mp/math.pi)*math.sin(math.pi/3) \n",
+ "print(\"\\navg value of diode current=%.3f A\" %I_D)\n",
+ "I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3))) \n",
+ "print(\"\\nrms value of diode current=%.2f A\" %I_Dr)\n",
+ "V_or=V_mp*math.sqrt((3/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3)))\n",
+ "P=(V_or**2)/R \n",
+ "print(\"\\npower delivered=%.1f W\" %P)\n",
+ "print(\"in case of 3ph-M6 type\")\n",
+ "V_ph=V_ph/2\n",
+ "V_mp=math.sqrt(2)*V_ph\n",
+ "V_o=3*V_mp/(math.pi) \n",
+ "I_mp=V_mp/R\n",
+ "I_D=(I_mp/math.pi)*math.sin(math.pi/6) \n",
+ "I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6))) \n",
+ "V_or=V_mp*math.sqrt((6/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6)))\n",
+ "P=(V_or**2)/R \n",
+ "\n",
+ "#Results\n",
+ "print(\"avg o/p voltage=%.2f V\" %V_o)\n",
+ "print(\"\\navg value of diode current=%.2f A\" %I_D)\n",
+ "print(\"\\nrms value of diode current=%.2f A\" %I_Dr)\n",
+ "print(\"\\npower delivered=%.0f W\" %P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In case of 3ph-3pulse type\n",
+ "avg o/p voltage=257.3 V\n",
+ "\n",
+ "avg value of diode current=8.577 A\n",
+ "\n",
+ "rms value of diode current=15.10 A\n",
+ "\n",
+ "power delivered=6841.3 W\n",
+ "in case of 3ph-M6 type\n",
+ "avg o/p voltage=148.55 V\n",
+ "\n",
+ "avg value of diode current=2.48 A\n",
+ "\n",
+ "rms value of diode current=6.07 A\n",
+ "\n",
+ "power delivered=2211 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19, Page No 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_o=400\n",
+ "R=10\n",
+ "\n",
+ "#Calculations\n",
+ "V_ml=V_o*math.pi/3\n",
+ "V_s=V_ml/(math.sqrt(2)*math.sqrt(3))\n",
+ "I_m=V_ml/R\n",
+ "I_s=.7804*I_m\n",
+ "tr=3*V_s*I_s \n",
+ "\n",
+ "#Results\n",
+ "print(\"transformer rating=%.1f VA\" %tr)\n",
+ "I_Dr=.5518*I_m \n",
+ "print(\"\\nrms value of diode current=%.3f A\" %I_Dr)\n",
+ "I_D=I_m/math.pi \n",
+ "print(\"\\navg value of diode current=%.3f A\" %I_D)\n",
+ "print(\"\\npeak diode current=%.2f A\" %I_m)\n",
+ "PIV=V_ml \n",
+ "print(\"\\nPIV=%.2f V\" %PIV)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transformer rating=16770.3 VA\n",
+ "\n",
+ "rms value of diode current=23.114 A\n",
+ "\n",
+ "avg value of diode current=13.333 A\n",
+ "\n",
+ "peak diode current=41.89 A\n",
+ "\n",
+ "PIV=418.88 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.20, Page No 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_l=230\n",
+ "E=240\n",
+ "R=8\n",
+ "\n",
+ "#Calculations\n",
+ "V_ml=math.sqrt(2)*V_l\n",
+ "V_o=3*V_ml/math.pi\n",
+ "I_o=(V_o-E)/R\n",
+ "P_b=E*I_o \n",
+ "P_d=E*I_o+I_o**2*R \n",
+ "phi1=0\n",
+ "math.cos(math.radians(phi1))\n",
+ "I_s1=2*math.sqrt(3)*I_o/(math.sqrt(2)*math.pi)\n",
+ "I_s=math.sqrt(I_o**2*2*math.pi/(3*math.pi))\n",
+ "CDF=I_s1/I_s \n",
+ "pf=DF*CDF \n",
+ "HF=math.sqrt(CDF**-2-1) \n",
+ "tr=math.sqrt(3)*V_l*I_o*math.sqrt(2/3)\n",
+ "\n",
+ "#Results\n",
+ "print(\"Power delivered to battery=%.1f W\" %P_b)\n",
+ "print(\"Power delivered to load=%.2f W\" %P_d)\n",
+ "print(\"Displacement factor=%.2f\" %DF)\n",
+ "print(\"Current distortion factor=%.3f\" %CDF)\n",
+ "print(\"i/p pf=%.3f\"%pf)\n",
+ "print(\"Harmonic factor=%.2f\" %HF)\n",
+ "print(\"Tranformer rating=%.2f VA\" %tr)\n",
+ "#answers have small variations from the book due to difference in rounding off of digits"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power delivered to battery=2118.3 W\n",
+ "Power delivered to load=2741.48 W\n",
+ "Displacement factor=1.00\n",
+ "Current distortion factor=0.955\n",
+ "i/p pf=0.955\n",
+ "Harmonic factor=0.31\n",
+ "Tranformer rating=0.00 VA\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.21, Page No 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "f=50 #Hz\n",
+ "V=230.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_m=math.sqrt(2)*V\n",
+ "R=400.0\n",
+ "RF=0.05\n",
+ "C=(1/(4*f*R))*(1+(1/(math.sqrt(2)*RF)))\n",
+ "\n",
+ "#Results\n",
+ "print(\"capacitor value=%.2f uF\" %(C/10**-6))\n",
+ "V_o=V_m*(1-1/(4*f*R*C))\n",
+ "print(\"o/p voltage with filter=%.2f V\" %V_o)\n",
+ "V_o=2*V_m/math.pi \n",
+ "print(\"o/p voltage without filter=%.2f V\" %V_o)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "capacitor value=189.28 uF\n",
+ "o/p voltage with filter=303.79 V\n",
+ "o/p voltage without filter=207.07 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.22, Page No 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "f=50\n",
+ "CRF=0.05\n",
+ "R=300\n",
+ "\n",
+ "#Calculations\n",
+ "L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f) \n",
+ "print(\"L=%.2f H\" %L)\n",
+ "R=30\n",
+ "L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f) \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"\\nL=%.2f H\" %L)\n",
+ "L=0\n",
+ "CRF=.4715*R/math.sqrt(R**2+(2*2*math.pi*f*L)**2) \n",
+ "print(\"\\nCRF=%.2f\" %CRF)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L=4.48 H\n",
+ "\n",
+ "L=0.45 H\n",
+ "\n",
+ "CRF=0.47\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.23, Page No 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "R=50\n",
+ "L_L=10*10**-3\n",
+ "f=50.0\n",
+ "w=2*math.pi*f\n",
+ "\n",
+ "#Calculations\n",
+ "C=10/(2*w*math.sqrt(R**2+(2*w*L_L)**2))\n",
+ "\n",
+ "#Results\n",
+ "print(\"C=%.2f uF\" %(C*10**6))\n",
+ "VRF=0.1\n",
+ "L=(1/(4*w**2*C))*((math.sqrt(2)/(3*VRF))+1)\n",
+ "print(\"\\nL=%.2f mH\" %(L*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C=315.83 uF\n",
+ "\n",
+ "L=45.83 mH\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter4_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter4_4.ipynb new file mode 100755 index 00000000..22311574 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter4_4.ipynb @@ -0,0 +1,946 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 04 : Thyristors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3, Page No 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "P=.5 #P=V_g*I_g\n",
+ "s=130 #s=V_g/I_g\n",
+ "\n",
+ "#Calculations\n",
+ "I_g=math.sqrt(P/s)\n",
+ "V_g=s*I_g\n",
+ "E=15\n",
+ "R_s=(E-V_g)/I_g \n",
+ "\n",
+ "#Results\n",
+ "print(\"Gate source resistance=%.2f ohm\" %R_s)\n",
+ "#Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gate source resistance=111.87 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4, Page No 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "R_s=120 #slope of load line is -120V/A. This gives gate source resistance\n",
+ "print(\"gate source resistance=%.0f ohm\" %R_s)\n",
+ "\n",
+ "P=.4 #P=V_g*I_g\n",
+ "E_s=15\n",
+ "\n",
+ "#Calculations\n",
+ " #E_s=I_g*R_s+V_g % after solving this\n",
+ " #120*I_g**2-15*I_g+0.4=0 so\n",
+ "a=120 \n",
+ "b=-15\n",
+ "c=0.4\n",
+ "D=math.sqrt((b**2)-4*a*c)\n",
+ "I_g=(-b+D)/(2*a) \n",
+ "V_g=P/I_g\n",
+ "\n",
+ "#Results\n",
+ "print(\"\\ntrigger current=%.2f mA\" %(I_g*10**3)) \n",
+ "print(\"\\nthen trigger voltage=%.3f V\" %V_g)\n",
+ "I_g=(-b-D)/(2*a) \n",
+ "V_g=P/I_g\n",
+ "print(\"\\ntrigger current=%.2f mA\" %(I_g*10**3)) \n",
+ "print(\"\\nthen trigger voltage=%.2f V\" %V_g)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gate source resistance=120 ohm\n",
+ "\n",
+ "trigger current=86.44 mA\n",
+ "\n",
+ "then trigger voltage=4.628 V\n",
+ "\n",
+ "trigger current=38.56 mA\n",
+ "\n",
+ "then trigger voltage=10.37 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5 Page No 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "#V_g=1+10*I_g\n",
+ "P_gm=5 #P_gm=V_g*I_g\n",
+ "#after solving % eqn becomes 10*I_g**2+I_g-5=0\n",
+ "a=10.0 \n",
+ "b=1.0 \n",
+ "c=-5\n",
+ "\n",
+ "#Calculations\n",
+ "I_g=(-b+math.sqrt(b**2-4*a*c))/(2*a)\n",
+ "E_s=15\n",
+ "#using E_s=R_s*I_g+V_g\n",
+ "R_s=(E_s-1)/I_g-10 \n",
+ "P_gav=.3 #W\n",
+ "T=20*10**-6\n",
+ "f=P_gav/(P_gm*T)\n",
+ "dl=f*T\n",
+ "\n",
+ "#Results\n",
+ "print(\"Reistance=%.3f ohm\" %R_s)\n",
+ "print(\"Triggering freq=%.0f kHz\" %(f/1000))\n",
+ "print(\"Tduty cycle=%.2f\" %dl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reistance=11.248 ohm\n",
+ "Triggering freq=3 kHz\n",
+ "Tduty cycle=0.06\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6, Page No 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I=.1\n",
+ "E=200.0\n",
+ "L=0.2\n",
+ "\n",
+ "#Calculations\n",
+ "t=I*L/E \n",
+ "R=20.0\n",
+ "t1=(-L/R)*math.log(1-(R*I/E)) \n",
+ "L=2.0\n",
+ "t2=(-L/R)*math.log(1-(R*I/E)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"in case load consists of (a)L=.2H\")\n",
+ "print(\"min gate pulse width=%.0f us\" %(t*10**6))\n",
+ "print(\"(b)R=20ohm in series with L=.2H\")\n",
+ "print(\"min gate pulse width=%.3f us\" %(t1*10**6))\n",
+ "print(\"(c)R=20ohm in series with L=2H\")\n",
+ "print(\"min gate pulse width=%.2f us\" %(t2*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "in case load consists of (a)L=.2H\n",
+ "min gate pulse width=100 us\n",
+ "(b)R=20ohm in series with L=.2H\n",
+ "min gate pulse width=100.503 us\n",
+ "(c)R=20ohm in series with L=2H\n",
+ "min gate pulse width=1005.03 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9 Page No 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "def theta(th):\n",
+ " I_m=1 #supposition\n",
+ " I_av=(I_m/(2*math.pi))*(1+math.cos(math.radians(th)))\n",
+ " I_rms=math.sqrt((I_m/(2*math.pi))*((180-th)*math.pi/360+.25*math.sin(math.radians(2*th))))\n",
+ " FF=I_rms/I_av\n",
+ " I_rms=35\n",
+ " I_TAV=I_rms/FF\n",
+ " return I_TAV\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"when conduction angle=180\")\n",
+ "th=0\n",
+ "I_TAV=theta(th)\n",
+ "print(\"avg on current rating=%.3f A\" %I_TAV)\n",
+ "print(\"when conduction angle=90\")\n",
+ "th=90\n",
+ "I_TAV=theta(th)\n",
+ "\n",
+ "#Results\n",
+ "print(\"avg on current rating=%.3f A\" %I_TAV)\n",
+ "print(\"when conduction angle=30\")\n",
+ "th=150\n",
+ "I_TAV=theta(th)\n",
+ "print(\"avg on current rating=%.3f A\" %I_TAV)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when conduction angle=180\n",
+ "avg on current rating=22.282 A\n",
+ "when conduction angle=90\n",
+ "avg on current rating=15.756 A\n",
+ "when conduction angle=30\n",
+ "avg on current rating=8.790 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10, Page No 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "\n",
+ "def theta(th):\n",
+ " n=360.0/th\n",
+ " I=1.0 #supposition\n",
+ " I_av=I/n\n",
+ " I_rms=I/math.sqrt(n)\n",
+ " FF=I_rms/I_av\n",
+ " I_rms=35\n",
+ " I_TAV=I_rms/FF\n",
+ " return I_TAV\n",
+ "\n",
+ "#Calculations\n",
+ "th=180.0\n",
+ "I_TAV1=theta(th)\n",
+ "th=90.0\n",
+ "I_TAV2=theta(th)\n",
+ "th=30.0\n",
+ "I_TAV3=theta(th)\n",
+ "\n",
+ "#Results\n",
+ "print(\"when conduction angle=180\")\n",
+ "print(\"avg on current rating=%.3f A\" %I_TAV)\n",
+ "print(\"when conduction angle=90\")\n",
+ "print(\"avg on current rating=%.1f A\" %I_TAV2)\n",
+ "print(\"when conduction angle=30\")\n",
+ "print(\"avg on current rating=%.4f A\" %I_TAV3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when conduction angle=180\n",
+ "avg on current rating=8.790 A\n",
+ "when conduction angle=90\n",
+ "avg on current rating=17.5 A\n",
+ "when conduction angle=30\n",
+ "avg on current rating=10.1036 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11 Page No 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "f=50.0 #Hz\n",
+ "\n",
+ "#Calculations\n",
+ "I_sb=3000.0\n",
+ "t=1/(4*f)\n",
+ "T=1/(2*f)\n",
+ "I=math.sqrt(I_sb**2*t/T) \n",
+ "r=(I_sb/math.sqrt(2))**2*T \n",
+ "\n",
+ "#Results\n",
+ "print(\"surge current rating=%.2f A\" %I)\n",
+ "print(\"\\nI**2*t rating=%.0f A^2.s\" %r)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "surge current rating=2121.32 A\n",
+ "\n",
+ "I**2*t rating=45000 A^2.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.12 Page No 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "\n",
+ "V_s=300.0 #V\n",
+ "R=60.0 #ohm\n",
+ "L=2.0 #H\n",
+ "\n",
+ "#Calculations\n",
+ "t=40*10**-6 #s\n",
+ "i_T=(V_s/R)*(1-math.exp(-R*t/L))\n",
+ "i=.036 #A\n",
+ "R1=V_s/(i-i_T)\n",
+ "\n",
+ "#Results\n",
+ "print(\"maximum value of remedial parameter=%.3f kilo-ohm\" %(R1/1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum value of remedial parameter=9.999 kilo-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.16 Page No 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "V_p=230.0*math.sqrt(2)\n",
+ "\n",
+ "#Calculations\n",
+ "R=1+((1)**-1+(10)**-1)**-1\n",
+ "A=V_p/R\n",
+ "s=1 #s\n",
+ "t_c=20*A**-2*s\n",
+ "\n",
+ "#Results\n",
+ "print(\"fault clearance time=%.4f ms\" %(t_c*10**3))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fault clearance time=0.6890 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.17, Page No 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "V_s=math.sqrt(2)*230 #V\n",
+ "L=15*10**-6 #H\n",
+ "I=V_s/L #I=(di/dt)_max\n",
+ "R_s=10 #ohm\n",
+ "v=I*R_s #v=(dv/dt)_max\n",
+ "\n",
+ "#Calculations\n",
+ "f=50 #Hz\n",
+ "X_L=L*2*math.pi*f\n",
+ "R=2\n",
+ "I_max=V_s/(R+X_L) \n",
+ "FF=math.pi/math.sqrt(2)\n",
+ "I_TAV1=I_max/FF \n",
+ "FF=3.98184\n",
+ "I_TAV2=I_max/FF \n",
+ "\n",
+ "\n",
+ "#RESULTS\n",
+ "print(\"(di/dt)_max=%.3f A/usec\" %(I/10**6))\n",
+ "print(\"\\n(dv/dt)_max=%.2f V/usec\" %(v/10**6))\n",
+ "print(\"\\nI_rms=%.3f A\" %I_max)\n",
+ "print(\"when conduction angle=90\")\n",
+ "print(\"I_TAV=%.3f A\" %I_TAV1)\n",
+ "print(\"when conduction angle=30\")\n",
+ "print(\"I_TAV=%.3f A\" %I_TAV2)\n",
+ "print(\"\\nvoltage rating=%.3f V\" %(2.75*V_s)) #rating is taken 2.75 times of peak working voltage unlike 2.5 to 3 times as mentioned int book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(di/dt)_max=21.685 A/usec\n",
+ "\n",
+ "(dv/dt)_max=216.85 V/usec\n",
+ "\n",
+ "I_rms=162.252 A\n",
+ "when conduction angle=90\n",
+ "I_TAV=73.039 A\n",
+ "when conduction angle=30\n",
+ "I_TAV=40.748 A\n",
+ "\n",
+ "voltage rating=894.490 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.19, Page No 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "\n",
+ "T_jm=125\n",
+ "th_jc=.15 #degC/W\n",
+ "th_cs=0.075 #degC/W\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "dT=54 #dT=T_s-T_a\n",
+ "P_av=120\n",
+ "th_sa=dT/P_av\n",
+ "T_a=40 #ambient temp\n",
+ "P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)\n",
+ "if (P_av-120)<1 :\n",
+ " print(\"selection of heat sink is satisfactory\")\n",
+ "\n",
+ "dT=58 #dT=T_s-T_a\n",
+ "P_av=120\n",
+ "th_sa=dT/P_av\n",
+ "T_a=40 #ambient temp\n",
+ "P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)\n",
+ "if (P_av-120)<1 :\n",
+ " print(\"selection of heat sink is satisfactory\")\n",
+ "\n",
+ "V_m=math.sqrt(2)*230\n",
+ "R=2\n",
+ "I_TAV=V_m/(R*math.pi)\n",
+ "P_av=90\n",
+ "th_sa=(T_jm-T_a)/P_av-(th_jc+th_cs)\n",
+ "dT=P_av*th_sa\n",
+ "print(\"for heat sink\") \n",
+ "print(\"T_s-T_a=%.2f degC\" %dT) \n",
+ "print(\"\\nP_av=%.0f W\" %P_av)\n",
+ "P=(V_m/2)**2/R\n",
+ "eff=P/(P+P_av) \n",
+ "print(\"\\nckt efficiency=%.3f pu\" %eff)\n",
+ "a=60 #delay angle\n",
+ "I_TAV=(V_m/(2*math.pi*R))*(1+math.cos(math.radians(a)))\n",
+ "print(\"\\nI_TAV=%.2f A\" %I_TAV)\n",
+ "dT=46\n",
+ "T_s=dT+T_a\n",
+ "T_c=T_s+P_av*th_cs \n",
+ "T_j=T_c+P_av*th_jc \n",
+ "\n",
+ "#Results\n",
+ "print(\"\\ncase temp=%.2f degC\" %T_c)\n",
+ "print(\"\\njunction temp=%.2f degC\" %T_j)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for heat sink\n",
+ "T_s-T_a=-20.25 degC\n",
+ "\n",
+ "P_av=90 W\n",
+ "\n",
+ "ckt efficiency=0.993 pu\n",
+ "\n",
+ "I_TAV=38.83 A\n",
+ "\n",
+ "case temp=92.75 degC\n",
+ "\n",
+ "junction temp=106.25 degC\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.20, Page No 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "T_j=125.0 #degC\n",
+ "T_s=70.0 #degC\n",
+ "th_jc=.16 #degC/W\n",
+ "th_cs=.08 #degC/W\n",
+ "\n",
+ "#Calculations\n",
+ "P_av1=(T_j-T_s)/(th_jc+th_cs) \n",
+ "\n",
+ "T_s=60 #degC\n",
+ "P_av2=(T_j-T_s)/(th_jc+th_cs) \n",
+ "inc=(math.sqrt(P_av2)-math.sqrt(P_av1))*100/math.sqrt(P_av1) \n",
+ "\n",
+ "#Results\n",
+ "print(\"Total avg power loss in thristor sink combination=%.2f W\" %P_av1)\n",
+ "print(\"Percentage inc in rating=%.2f\" %inc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total avg power loss in thristor sink combination=229.17 W\n",
+ "Percentage inc in rating=8.71\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.21, Page No 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "\n",
+ "R=25000.0\n",
+ "I_l1=.021 #I_l=leakage current\n",
+ "I_l2=.025\n",
+ "I_l3=.018\n",
+ "I_l4=.016\n",
+ " #V1=(I-I_l1)*R\n",
+ " #V2=(I-I_l2)*R\n",
+ " #V3=(I-I_l3)*R\n",
+ " #V4=(I-I_l4)*R\n",
+ " #V=V1+V2+V3+V4\n",
+ " \n",
+ "#Calculations\n",
+ "V=10000.0\n",
+ "I_l=I_l1+I_l2+I_l3+I_l4\n",
+ " #after solving\n",
+ "I=((V/R)+I_l)/4\n",
+ "R_c=40.0\n",
+ "V1=(I-I_l1)*R \n",
+ "\n",
+ "#Resluts\n",
+ "print(\"voltage across SCR1=%.0f V\" %V1)\n",
+ "V2=(I-I_l2)*R \n",
+ "print(\"\\nvoltage across SCR2=%.0f V\" %V2)\n",
+ "V3=(I-I_l3)*R \n",
+ "print(\"\\nvoltage across SCR3=%.0f V\" %V3)\n",
+ "V4=(I-I_l4)*R \n",
+ "print(\"\\nvoltage across SCR4=%.0f V\" %V4)\n",
+ "\n",
+ "I1=V1/R_c \n",
+ "print(\"\\ndischarge current through SCR1=%.3f A\" %I1)\n",
+ "I2=V2/R_c \n",
+ "print(\"\\ndischarge current through SCR2=%.3f A\" %I2)\n",
+ "I3=V3/R_c \n",
+ "print(\"\\ndischarge current through SCR3=%.3f A\" %I3)\n",
+ "I4=V4/R_c \n",
+ "print(\"\\ndischarge current through SCR4=%.3f A\" %I4)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage across SCR1=2475 V\n",
+ "\n",
+ "voltage across SCR2=2375 V\n",
+ "\n",
+ "voltage across SCR3=2550 V\n",
+ "\n",
+ "voltage across SCR4=2600 V\n",
+ "\n",
+ "discharge current through SCR1=61.875 A\n",
+ "\n",
+ "discharge current through SCR2=59.375 A\n",
+ "\n",
+ "discharge current through SCR3=63.750 A\n",
+ "\n",
+ "discharge current through SCR4=65.000 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.22, Page No 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_r=1000 #rating of SCR\n",
+ "I_r=200 #rating of SCR\n",
+ "V_s=6000 #rating of String\n",
+ "I_s=1000 #rating of String\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"when DRF=.1\")\n",
+ "DRF=.1\n",
+ "n_s=V_s/(V_r*(1-DRF)) \n",
+ "print(\"number of series units=%.0f\" %math.ceil(n_s))\n",
+ "n_p=I_s/(I_r*(1-DRF)) \n",
+ "print(\"\\nnumber of parrallel units=%.0f\" %math.ceil(n_p))\n",
+ "print(\"when DRF=.2\")\n",
+ "DRF=.2\n",
+ "\n",
+ "#Results\n",
+ "n_s=V_s/(V_r*(1-DRF)) \n",
+ "print(\"number of series units=%.0f\" %math.ceil(n_s))\n",
+ "n_p=I_s/(I_r*(1-DRF)) \n",
+ "print(\"\\nnumber of parrallel units=%.0f\" %math.ceil(n_p))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when DRF=.1\n",
+ "number of series units=7\n",
+ "\n",
+ "number of parrallel units=6\n",
+ "when DRF=.2\n",
+ "number of series units=8\n",
+ "\n",
+ "number of parrallel units=7\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.23, Page No 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V1=1.6 #on state voltage drop of SCR1\n",
+ "V2=1.2 #on state voltage drop of SCR2\n",
+ "I1=250.0 #current rating of SCR1\n",
+ "I2=350.0 #current rating of SCR2\n",
+ "\n",
+ "#Calculations\n",
+ "R1=V1/I1\n",
+ "R2=V2/I2\n",
+ "I=600.0 #current to be shared\n",
+ " #for SCR1 % I*(R1+R)/(total resistance)=k*I1 (1)\n",
+ " #for SCR2 % I*(R2+R)/(total resistance)=k*I2 (2)\n",
+ " #(1)/(2)\n",
+ "R=(R2*I2-R1*I1)/(I1-I2)\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"RSequired value of resistance=%.3f ohm\" %R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RSequired value of resistance=0.004 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.25, Page No 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "f=2000.0 #Hz\n",
+ "C=0.04*10**-6\n",
+ "n=.72\n",
+ "\n",
+ "#Calculations\n",
+ "R=1/(f*C*math.log(1/(1-n))) \n",
+ "V_p=18\n",
+ "V_BB=V_p/n\n",
+ "R2=10**4/(n*V_BB) \n",
+ "I=4.2*10**-3 #leakage current\n",
+ "R_BB=5000\n",
+ "R1=(V_BB/I)-R2-R_BB\n",
+ "\n",
+ "#Results\n",
+ "print(\"R=%.2f kilo-ohm\" %(R/1000))\n",
+ "print(\"\\nR2=%.2f ohm\" %R2)\n",
+ "print(\"\\nR1=%.0f ohm\" %R1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R=9.82 kilo-ohm\n",
+ "\n",
+ "R2=555.56 ohm\n",
+ "\n",
+ "R1=397 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.26, Page No 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "\n",
+ "V_p=18.0\n",
+ "n=.72\n",
+ "V_BB=V_p/n\n",
+ "I_p=.6*10**-3\n",
+ "I_v=2.5*10**-3\n",
+ "V_v=1\n",
+ "\n",
+ "#Calculations\n",
+ "R_max=V_BB*(1-n)/I_p \n",
+ "print(\"R_max=%.2f kilo-ohm\" %(R_max/1000))\n",
+ "R_min=(V_BB-V_v)/I_v \n",
+ "print(\"\\nR_min=%.2f kilo-ohm\" %(R_min/1000))\n",
+ "\n",
+ "C=.04*10**-6\n",
+ "f_min=1/(R_max*C*math.log(1/(1-n))) \n",
+ "print(\"\\nf_min=%.3f kHz\" %(f_min/1000))\n",
+ "f_max=1/(R_min*C*math.log(1/(1-n))) \n",
+ "print(\"\\nf_max=%.2f kHz\" %(f_max/1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R_max=11.67 kilo-ohm\n",
+ "\n",
+ "R_min=9.60 kilo-ohm\n",
+ "\n",
+ "f_min=1.683 kHz\n",
+ "\n",
+ "f_max=2.05 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter5_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter5_4.ipynb new file mode 100755 index 00000000..1d261f20 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter5_4.ipynb @@ -0,0 +1,511 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 05 : Thyristor Commutation Techniques"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1, Page No 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "L=5.0*10**-3 #mH\n",
+ "C=20.0*10**-6 #\u00b5F\n",
+ "V_s=200 #V\n",
+ "\n",
+ "#Calculations\n",
+ "w_o=math.sqrt(1/(L*C)) #rad/s\n",
+ "t_o=math.pi/w_o #ms\n",
+ "\n",
+ "#Results\n",
+ "print('conduction time of thyristor = %.2f ms' %(t_o*1000))\n",
+ "print('voltage across thyristor=%.0f V' %V_s)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conduction time of thyristor = 0.99 ms\n",
+ "voltage across thyristor=200 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2, Page No 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "C=20.0*10**-6 #\u00b5F\n",
+ "L=5.0*10**-6 #\u00b5H\n",
+ "V_s=230.0 #V\n",
+ "\n",
+ "#Calculations\n",
+ "I_p=V_s*math.sqrt(C/L) #A\n",
+ "w_o=math.sqrt(1/(L*C)) #rad/sec\n",
+ "t_o=math.pi/w_o #\u00b5S\n",
+ "I_o=300 \n",
+ "a = math.degrees(math.asin(I_o/(2*V_s))) \n",
+ "V_ab = V_s*math.cos(math.radians(a)) #V \n",
+ "t_c=C*V_ab/I_o #\u00b5s\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"conduction time of auxillery thyristor=%.2f us\" %(t_o*10**6))\n",
+ "print(\"voltage across main thyristor=%.2f V\" %V_ab)\n",
+ "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conduction time of auxillery thyristor=31.42 us\n",
+ "voltage across main thyristor=174.36 V\n",
+ "ckt turn off time=11.62 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page No 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "V_s=200.0 #V\n",
+ "R1=10.0 #\u2126\n",
+ "R2=100.0 #\u2126\n",
+ "C=0 # value of capacitor\n",
+ "\n",
+ "#Calculations\n",
+ "I1=V_s*(1/R1+2/R2) #A\n",
+ "I2=V_s*(2/R1+1/R2) #A\n",
+ "t_c1=40*10**-6\n",
+ "fos=2 #factor of safety\n",
+ "C1=t_c1*fos/(R1*math.log(2))\n",
+ "C2=t_c1*fos/(R2*math.log(2))\n",
+ "if C1 > C2 :\n",
+ " C = C1*10**6\n",
+ "else :\n",
+ " C = C2*10**6\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"peak value of current through SCR1=%.2f A\" %I1); \n",
+ "print(\"Peak value of current through SCR2=%.2f A\" %I2);\n",
+ "print(\"Value of capacitor=%.2f uF\" %C);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak value of current through SCR1=24.00 A\n",
+ "Peak value of current through SCR2=42.00 A\n",
+ "Value of capacitor=11.54 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4, Page No 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0 #V\n",
+ "L=20*10**-6 #\u00b5H\n",
+ "C=40*10**-6 #\u00b5F\n",
+ "I_o=120.0 #A\n",
+ "\n",
+ "#Calculations\n",
+ "I_p=V_s*math.sqrt(C/L) #A\n",
+ "t_c=C*V_s/I_o #\u00b5s\n",
+ "w_o=math.sqrt(1/(L*C)) \n",
+ "t_c1=math.pi/(2*w_o) #\u00b5s\n",
+ "\n",
+ "#Results\n",
+ "print(\"current through main thyristor=%.2f A\" %(I_o+I_p))\n",
+ "print(\"Current through auxillery thyristor=%.2f A\" %I_o)\n",
+ "print(\"Circuit turn off time for main thyristor=%.2f us\" %(t_c*10**6))\n",
+ "print(\"Circuit turn off time for auxillery thyristor=%.2f us\" %(t_c1*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current through main thyristor=445.27 A\n",
+ "Current through auxillery thyristor=120.00 A\n",
+ "Circuit turn off time for main thyristor=76.67 us\n",
+ "Circuit turn off time for auxillery thyristor=44.43 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page No 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "C_j=25*10**-12 #pF\n",
+ "I_c=5*10**-3 #charging current\n",
+ "V_s=200.0 #V\n",
+ "R=50.0 #\u2126\n",
+ "\n",
+ "#Calculations\n",
+ "C=(C_j*V_s)/(I_c*R)\n",
+ "\n",
+ "\n",
+ "#RESULTS\n",
+ "print(\"Value of C=%.2f \u00b5F\" %(C*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of C=0.02 \u00b5F\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page No 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "V_s=200.0 #V\n",
+ "R=5.0 #\u2126\n",
+ "\n",
+ "#Calculations\n",
+ "C=10.0*10**-6\n",
+ "#for turn off V_s*(1-2*exp(-t/(R*C)))=0, so after solving\n",
+ "t_c=R*C*math.log(2.0)\n",
+ "\n",
+ "#Results\n",
+ "print(\"circuit turn off time=%.2f us\" %(t_c*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "circuit turn off time=34.66 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7, Page No 264 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "R=1.0 #\u2126\n",
+ "L=20*10**-6 #\u00b5H\n",
+ "C=40*10**-6 #\u00b5F\n",
+ "\n",
+ "#Calculations\n",
+ "w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)\n",
+ "t_1=math.pi/w_r\n",
+ "\n",
+ "#Results\n",
+ "print(\"conduction time of thyristor=%.3f us\" %(t_1*10**6))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conduction time of thyristor=125.664 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8 Page No 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "dv=400*10.0**-6 #dv=dv_T/dt(V/s)\n",
+ "V_s=200.0 #v\n",
+ "R=20.0 #\u2126\n",
+ "\n",
+ "#Calculations\n",
+ "C=V_s/(R*dv) \n",
+ "C_j=.025*10**-12\n",
+ "C_s=C-C_j\n",
+ "I_T=40;\n",
+ "R_s=1/((I_T/V_s)-(1/R)) \n",
+ "#value of R_s in book is wrongly calculated\n",
+ "\n",
+ "#Results\n",
+ "print(\"R_s=%.2f ohm\" %R_s)\n",
+ "print(\"C_s=%.3f uF\" %(C_s/10**6))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R_s=6.67 ohm\n",
+ "C_s=0.025 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9 Page No 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=200.0 #V\n",
+ "C=20.0*10**-6 #\u00b5H \n",
+ "L=0.2*10**-3 #\u00b5F\n",
+ "i_c=10.0\n",
+ "\n",
+ "#Calculations\n",
+ "i=V_s*math.sqrt(C/L)\n",
+ "w_o=1.0/math.sqrt(L*C)\n",
+ "t_1 = (1/w_o)*math.degrees(math.asin(i_c/i))\n",
+ "t_o=math.pi/w_o\n",
+ "t_c=t_o-2*t_1 \n",
+ "\n",
+ "#Results\n",
+ "print(\"reqd time=%.2f us\" %(t_1*10**6))\n",
+ "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n",
+ "print(\"ckt turn off time=%.5f us\" %t_1)\n",
+ "#solution in book wrong, as wrong values are selected while filling the formuleas"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "reqd time=575.37 us\n",
+ "ckt turn off time=-952.05 us\n",
+ "ckt turn off time=0.00058 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11 Page No 268 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "L=1.0 #\u00b5H\n",
+ "R=50.0 #\u2126\n",
+ "V_s=200.0 #V\n",
+ "t=0.01 #sec\n",
+ "Vd=0.7\n",
+ "\n",
+ "#Calculations\n",
+ "tau=L/R\n",
+ "i=(V_s/R)*(1-math.exp(-t/tau))\n",
+ "t=8*10**-3\n",
+ "i1=i-t*Vd \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"current through L = %.2f A\" %i1)\n",
+ "i_R=0 #current in R at t=.008s\n",
+ "print(\"Current through R = %.2f A\" %i_R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current through L = 1.57 A\n",
+ "Current through R = 0.00 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12, Page No 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "#initialisation of variables\n",
+ "L=1.0 #H\n",
+ "R=50.0 #ohm\n",
+ "V_s=200.0 #V\n",
+ "\n",
+ "#Calculations\n",
+ "tau=L/R\n",
+ "t=0.01 #s\n",
+ "i=(V_s/R)*(1-math.exp(-t/tau))\n",
+ "C=1*10**-6 #F\n",
+ "V_c=math.sqrt(L/C)*i\n",
+ "\n",
+ "#Results\n",
+ "print(\"current in R,L=%.2f A\" %i)\n",
+ "print(\"voltage across C=%.2f kV\" %(V_c/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current in R,L=1.57 A\n",
+ "voltage across C=1.57 kV\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter6_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter6_4.ipynb new file mode 100755 index 00000000..dff6564b --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter6_4.ipynb @@ -0,0 +1,1761 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 06 : Phase Controlled Rectifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1, Page No 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "P=1000.0\n",
+ "R=V**2/P\n",
+ "\n",
+ "#Calculations\n",
+ "a=math.pi/4\n",
+ "V_or1=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))\n",
+ "P1=V_or1**2/R \n",
+ "a=math.pi/2\n",
+ "V_or2=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))\n",
+ "P2=V_or2**2/R \n",
+ "\n",
+ "#Results\n",
+ "print(\"when firing angle delay is of 45deg\")\n",
+ "print(\"power absorbed=%.2f W\" %P1)\n",
+ "print(\"when firing angle delay is of 90deg\")\n",
+ "print(\"power absorbed=%.2f W\" %P2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when firing angle delay is of 45deg\n",
+ "power absorbed=454.58 W\n",
+ "when firing angle delay is of 90deg\n",
+ "power absorbed=250.00 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2, Page No 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "E=150.0\n",
+ "R=8.0\n",
+ "\n",
+ "#Calculations\n",
+ "th1=math.sin(math.radians(E/(math.sqrt(2)*V)))\n",
+ "I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180)) \n",
+ "P=E*I_o \n",
+ "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))\n",
+ "P_r=I_or**2*R \n",
+ "pf=(P+P_r)/(V*I_or)\n",
+ "\n",
+ "#Results\n",
+ "print(\"avg charging curent=%.4f A\" %I_o)\n",
+ "print(\"power supplied to the battery=%.2f W\" %P)\n",
+ "print(\"power dissipated by the resistor=%.3f W\" %P_r) \n",
+ "print(\"supply pf=%.3f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg charging curent=3.5679 A\n",
+ "power supplied to the battery=535.18 W\n",
+ "power dissipated by the resistor=829.760 W\n",
+ "supply pf=0.583\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page No 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "E=150.0\n",
+ "R=8.0\n",
+ "a=35.0\n",
+ "\n",
+ "#Calculations\n",
+ "th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))\n",
+ "th2=180-th1\n",
+ "I_o=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(th2)))-E*((th2-a)*math.pi/180)) \n",
+ "P=E*I_o \n",
+ "I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*((th2-a)*math.pi/180)-(V**2/2)*(math.sin(math.radians(2*th2))-math.sin(math.radians(2*a)))-2*math.sqrt(2)*V*E*(math.cos(math.radians(a))-math.cos(math.radians(th2)))))\n",
+ "P_r=I_or**2*R \n",
+ "pf=(P+P_r)/(V*I_or) \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"avg charging curent=%.4f A\" %I_o)\n",
+ "print(\"power supplied to the battery=%.2f W\" %P)\n",
+ "print(\"power dissipated by the resistor=%.2f W\" %P_r)\n",
+ "print(\"supply pf=%.4f\" %pf)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg charging curent=4.9208 A\n",
+ "power supplied to the battery=738.12 W\n",
+ "power dissipated by the resistor=689.54 W\n",
+ "supply pf=0.6686\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4, Page No 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "B=210\n",
+ "f=50.0 #Hz\n",
+ "w=2*math.pi*f\n",
+ "a=40.0 #firing angle\n",
+ "V=230.0\n",
+ "R=5.0\n",
+ "L=2*10**-3\n",
+ "\n",
+ "#Calculations\n",
+ "t_c1=(360-B)*math.pi/(180*w) \n",
+ "V_o1=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B))) \n",
+ "I_o1=V_o1/R \n",
+ "E=110\n",
+ "R=5\n",
+ "L=2*10**-3\n",
+ "th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))\n",
+ "t_c2=(360-B+th1)*math.pi/(180*w) \n",
+ "V_o2=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B))) \n",
+ "I_o2=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(B)))-E*((B-a)*math.pi/180)) \n",
+ "V_o2=R*I_o2+E \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"for R=5ohm and L=2mH\")\n",
+ "print(\"ckt turn off time=%.3f msec\" %(t_c1*1000))\n",
+ "print(\"avg output voltage=%.3f V\" %V_o1)\n",
+ "print(\"avg output current=%.4f A\" %I_o1)\n",
+ "print(\"for R=5ohm % L=2mH and E=110V\")\n",
+ "print(\"ckt turn off time=%.3f msec\" %(t_c2*1000))\n",
+ "print(\"avg output current=%.4f A\" %I_o2)\n",
+ "print(\"avg output voltage=%.3f V\" %V_o2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for R=5ohm and L=2mH\n",
+ "ckt turn off time=8.333 msec\n",
+ "avg output voltage=84.489 V\n",
+ "avg output current=16.8979 A\n",
+ "for R=5ohm % L=2mH and E=110V\n",
+ "ckt turn off time=9.431 msec\n",
+ "avg output current=6.5090 A\n",
+ "avg output voltage=142.545 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5 Page No 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "f=50.0\n",
+ "R=10.0\n",
+ "a=60.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_m=(math.sqrt(2)*V_s)\n",
+ "V_o=V_m/(2*math.pi)*(1+math.cos(math.radians(a)))\n",
+ "I_o=V_o/R\n",
+ "V_or=(V_m/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a*math.pi/180)+.5*math.sin(math.radians(2*a)))\n",
+ "I_or=V_or/R\n",
+ "P_dc=V_o*I_o\n",
+ "P_ac=V_or*I_or\n",
+ "RE=P_dc/P_ac \n",
+ "FF=V_or/V_o \n",
+ "VRF=math.sqrt(FF**2-1) \n",
+ "TUF=P_dc/(V_s*I_or) \n",
+ "PIV=V_m \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"rectification efficiency=%.4f\" %RE)\n",
+ "print(\"form factor=%.3f\" %FF)\n",
+ "print(\"voltage ripple factor=%.4f\" %VRF)\n",
+ "print(\"t/f utilisation factor=%.4f\" %TUF)\n",
+ "print(\"PIV of thyristor=%.2f V\" %PIV)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rectification efficiency=0.2834\n",
+ "form factor=1.879\n",
+ "voltage ripple factor=1.5903\n",
+ "t/f utilisation factor=0.1797\n",
+ "PIV of thyristor=325.27 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6 Page No 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=1000.0\n",
+ "fos=2.5 #factor of safety\n",
+ "I_TAV=40.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_m1=V/(2*fos)\n",
+ "P1=(2*V_m1/math.pi)*I_TAV \n",
+ "V_m2=V/(fos)\n",
+ "P2=(2*V_m2/math.pi)*I_TAV \n",
+ "\n",
+ "#Results\n",
+ "print(\"for mid pt convertor\")\n",
+ "print(\"power handled=%.3f kW\" %(P1/1000))\n",
+ "print(\"for bridge convertor\")\n",
+ "print(\"power handled=%.3f kW\" %(P2/1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for mid pt convertor\n",
+ "power handled=5.093 kW\n",
+ "for bridge convertor\n",
+ "power handled=10.186 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7, Page No 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "R=.4\n",
+ "I_o=10\n",
+ "I_or=I_o\n",
+ "E=120.0\n",
+ "\n",
+ "#Calculations\n",
+ "a1=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m)))\n",
+ "pf1=(E*I_o+I_or**2*R)/(V_s*I_or) \n",
+ "E=-120.0\n",
+ "a2=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m))) \n",
+ "pf2=(-E*I_o-I_or**2*R)/(V_s*I_or) \n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle delay=%.2f deg\" %a1)\n",
+ "print(\"pf=%.4f\" %pf1)\n",
+ "print(\"firing angle delay=%.2f deg\" %a2)\n",
+ "print(\"pf=%.4f\" %pf2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle delay=53.21 deg\n",
+ "pf=0.5391\n",
+ "firing angle delay=124.07 deg\n",
+ "pf=0.5043\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9 Page No 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "f=50.0\n",
+ "a=45.0\n",
+ "R=5.0\n",
+ "E=100.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=((math.sqrt(2)*V_s)/(2*math.pi))*(3+math.cos(math.radians(a)))\n",
+ "I_o=(V_o-E)/R \n",
+ "P=E*I_o \n",
+ "\n",
+ "#Results\n",
+ "print(\"avg o/p current=%.3f A\" %I_o)\n",
+ "print(\"power delivered to battery=%.4f kW\" %(P/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg o/p current=18.382 A\n",
+ "power delivered to battery=1.8382 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10 Page No 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variablesV_s=230\n",
+ "f=50.0\n",
+ "a=50.0\n",
+ "R=6.0\n",
+ "E=60.0\n",
+ "V_o1=((math.sqrt(2)*2*V_s)/(math.pi))*math.cos(math.radians(a))\n",
+ "I_o1=(V_o1-E)/R \n",
+ "\n",
+ "#ATQ after applying the conditions\n",
+ "V_o2=((math.sqrt(2)*V_s)/(math.pi))*math.cos(math.radians(a))\n",
+ "I_o2=(V_o2-E)/R \n",
+ "\n",
+ "print(\"avg o/p current=%.3f A\" %I_o1)\n",
+ "print(\"avg o/p current after change=%.2f A\" %I_o2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg o/p current=12.184 A\n",
+ "avg o/p current after change=1.09 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11 Page No 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=45.0\n",
+ "R=10.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=(2*V_m/math.pi)*math.cos(math.radians(a))\n",
+ "I_o=V_o/R\n",
+ "V_or=V_m/math.sqrt(2)\n",
+ "I_or=I_o\n",
+ "P_dc=V_o*I_o\n",
+ "P_ac=V_or*I_or\n",
+ "RE=P_dc/P_ac \n",
+ "FF=V_or/V_o \n",
+ "VRF=math.sqrt(FF**2-1) \n",
+ "I_s1=2*math.sqrt(2)*I_o/math.pi\n",
+ "DF=math.cos(math.radians(a))\n",
+ "CDF=.90032\n",
+ "pf=CDF*DF \n",
+ "HF=math.sqrt((1/CDF**2)-1) \n",
+ "Q=2*V_m*I_o*math.sin(math.radians(a))/math.pi \n",
+ "\n",
+ "#Results\n",
+ "print(\"rectification efficiency=%.4f\" %RE)\n",
+ "print(\"form factor=%.4f\" %FF)\n",
+ "print(\"voltage ripple factor=%.4f\" %VRF)\n",
+ "print(\"pf=%.5f\" %pf)\n",
+ "print(\"HF=%.5f\" %HF)\n",
+ "print(\"active power=%.2f W\" %P_dc) \n",
+ "print(\"reactive power=%.3f Var\" %Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rectification efficiency=0.6366\n",
+ "form factor=1.5708\n",
+ "voltage ripple factor=1.2114\n",
+ "pf=0.63662\n",
+ "HF=0.48342\n",
+ "active power=2143.96 W\n",
+ "reactive power=2143.956 Var\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.12, Page No 310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=45.0\n",
+ "R=10.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=(V_m/math.pi)*(1+math.cos(math.radians(a)))\n",
+ "I_o=V_o/R\n",
+ "V_or=V_s*math.sqrt((1/math.pi)*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2))\n",
+ "I_or=I_o\n",
+ "P_dc=V_o*I_o\n",
+ "P_ac=V_or*I_or\n",
+ "RE=P_dc/P_ac \n",
+ "FF=V_or/V_o \n",
+ "VRF=math.sqrt(FF**2-1) \n",
+ "I_s1=2*math.sqrt(2)*I_o*math.cos(math.radians(a/2))/math.pi\n",
+ "DF=math.cos(math.radians(a/2)) \n",
+ "CDF=2*math.sqrt(2)*math.cos(math.radians(a/2))/math.sqrt(math.pi*(math.pi-a*math.pi/180)) \n",
+ "pf=CDF*DF \n",
+ "HF=math.sqrt((1/CDF**2)-1) \n",
+ "Q=V_m*I_o*math.sin(math.radians(a))/math.pi\n",
+ "\n",
+ "#Results\n",
+ "print(\"form factor=%.3f\" %FF)\n",
+ "print(\"rectification efficiency=%.4f\" %RE)\n",
+ "print(\"voltage ripple factor=%.3f\" %VRF) \n",
+ "print(\"DF=%.4f\" %DF)\n",
+ "print(\"CDF=%.4f\" %CDF)\n",
+ "print(\"pf=%.4f\" %pf)\n",
+ "print(\"HF=%.4f\" %HF)\n",
+ "print(\"active power=%.3f W\" %P_dc)\n",
+ "print(\"reactive power=%.2f Var\" %Q)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "form factor=1.241\n",
+ "rectification efficiency=0.8059\n",
+ "voltage ripple factor=0.735\n",
+ "DF=0.9239\n",
+ "CDF=0.9605\n",
+ "pf=0.8874\n",
+ "HF=0.2899\n",
+ "active power=3123.973 W\n",
+ "reactive power=1293.99 Var\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.13, Page No 319"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "R=10.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_ml=math.sqrt(2)*V_s\n",
+ "V_om=3*V_ml/(2*math.pi)\n",
+ "V_o=V_om/2\n",
+ "th=30\n",
+ "a=math.degrees(math.acos((2*math.pi*math.sqrt(3)*V_o/(3*V_ml)-1)))-th \n",
+ "I_o=V_o/R \n",
+ "V_or=V_ml/(2*math.sqrt(math.pi))*math.sqrt((5*math.pi/6-a*math.pi/180)+.5*math.sin(math.radians(2*a+2*th)))\n",
+ "I_or=V_or/R \n",
+ "RE=V_o*I_o/(V_or*I_or) \n",
+ "\n",
+ "#Results\n",
+ "print(\"delay angle=%.1f deg\" %a)\n",
+ "print(\"avg load current=%.3f A\" %I_o)\n",
+ "print(\"rms load current=%.3f A\" %I_or)\n",
+ "print(\"rectification efficiency=%.4f\" %RE)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "delay angle=67.7 deg\n",
+ "avg load current=7.765 A\n",
+ "rms load current=10.477 A\n",
+ "rectification efficiency=0.5494\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.15, Page No 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=400.0\n",
+ "V_ml=math.sqrt(2)*V\n",
+ "v_T=1.4\n",
+ "a1=30.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_o1=3*V_ml/(2*math.pi)*math.cos(math.radians(a1))-v_T \n",
+ "a2=60.0\n",
+ "V_o2=3*V_ml/(2*math.pi)*math.cos(math.radians(a2))-v_T \n",
+ "I_o=36\n",
+ "I_TA=I_o/3 \n",
+ "I_Tr=I_o/math.sqrt(3) \n",
+ "P=I_TA*v_T \n",
+ "\n",
+ "#Results\n",
+ "print(\"for firing angle = 30deg\")\n",
+ "print(\"avg output voltage=%.3f V\" %V_o1)\n",
+ "print(\"for firing angle = 60deg\")\n",
+ "print(\"avg output voltage=%.2f V\" %V_o2)\n",
+ "print(\"avg current rating=%.0f A\" %I_TA)\n",
+ "print(\"rms current rating=%.3f A\" %I_Tr)\n",
+ "print(\"PIV of SCR=%.1f V\" %V_ml)\n",
+ "print(\"power dissipated=%.1f W\" %P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for firing angle = 30deg\n",
+ "avg output voltage=232.509 V\n",
+ "for firing angle = 60deg\n",
+ "avg output voltage=133.65 V\n",
+ "avg current rating=12 A\n",
+ "rms current rating=20.785 A\n",
+ "PIV of SCR=565.7 V\n",
+ "power dissipated=16.8 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.17, Page No 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "E=200\n",
+ "I_o=20\n",
+ "R=.5\n",
+ "\n",
+ "#Calculations\n",
+ "V_o1=E+I_o*R\n",
+ "V_s=230\n",
+ "V_ml=math.sqrt(2)*V_s\n",
+ "a1=math.degrees(math.acos(V_o1*math.pi/(3*V_ml)))\n",
+ "th=120\n",
+ "I_s=math.sqrt((1/math.pi)*I_o**2*th*math.pi/180)\n",
+ "P=E*I_o+I_o**2*R\n",
+ "pf=P/(math.sqrt(3)*V_s*I_s) \n",
+ "V_o2=E-I_o*R\n",
+ "a2=math.degrees(math.acos(-V_o2*math.pi/(3*V_ml))) \n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle delay=%.3f deg\" %a1)\n",
+ "print(\"pf=%.3f\" %pf)\n",
+ "print(\"firing angle delay=%.2f deg\" %a2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle delay=47.461 deg\n",
+ "pf=0.646\n",
+ "firing angle delay=127.71 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.18, Page No 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "f=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "w=2*math.pi*f\n",
+ "a1=0\n",
+ "t_c1=(4*math.pi/3-a1*math.pi/180)/w \n",
+ "a2=30\n",
+ "t_c2=(4*math.pi/3-a2*math.pi/180)/w \n",
+ "\n",
+ "#Results\n",
+ "print(\"for firing angle delay=0deg\")\n",
+ "print(\"commutation time=%.2f ms\" %(t_c1*1000))\n",
+ "print(\"peak reverse voltage=%.2f V\" %(math.sqrt(2)*V))\n",
+ "print(\"for firing angle delay=30deg\")\n",
+ "print(\"commutation time=%.2f ms\" %(t_c2*1000))\n",
+ "print(\"peak reverse voltage=%.2f V\" %(math.sqrt(2)*V))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for firing angle delay=0deg\n",
+ "commutation time=13.33 ms\n",
+ "peak reverse voltage=325.27 V\n",
+ "for firing angle delay=30deg\n",
+ "commutation time=11.67 ms\n",
+ "peak reverse voltage=325.27 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.19, Page No 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=30.0\n",
+ "R=10.0\n",
+ "P=5000.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))\n",
+ "V_ph=V_s/math.sqrt(3) \n",
+ "I_or=math.sqrt(P*R)\n",
+ "V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))\n",
+ "V_ph=V_s/math.sqrt(3) \n",
+ "\n",
+ "#Results\n",
+ "print(\"per phase voltage percent V_ph=%.3f V\" %V_ph) \n",
+ "print(\"for constant load current\")\n",
+ "print(\"V_ph=%.2f V\" %V_ph)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "per phase voltage percent V_ph=110.384 V\n",
+ "for constant load current\n",
+ "V_ph=110.38 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.20, Page No 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=30.0\n",
+ "R=10.0\n",
+ "P=5000.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_s=math.sqrt(P*R*4*math.pi/(2*3)/(2*math.pi/3+math.sqrt(3)*(1+math.cos(math.radians(2*a)))/2))\n",
+ "V_ph=V_s/math.sqrt(3) \n",
+ "I_or=math.sqrt(P*R)\n",
+ "V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))\n",
+ "V_ph=V_s/math.sqrt(3) \n",
+ "\n",
+ "#Results\n",
+ "print(\"per phase voltage percent V_ph=%.3f V\" %V_ph) \n",
+ "print(\"for constant load current\")\n",
+ "print(\"V_ph=%.2f V\" %V_ph)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "per phase voltage percent V_ph=102.459 V\n",
+ "for constant load current\n",
+ "V_ph=102.46 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.21, Page No 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=90.0\n",
+ "R=10.0\n",
+ "P=5000.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_s=math.sqrt(P*R*4*math.pi/(2*3)/((math.pi-math.pi/2)+(math.sin(math.radians(2*a)))/2))\n",
+ "V_ph=V_s/math.sqrt(3) \n",
+ "I_or=math.sqrt(P*R)\n",
+ "V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))\n",
+ "V_ph=V_s/math.sqrt(3) \n",
+ "\n",
+ "#Results\n",
+ "print(\"per phase voltage percent V_ph=%.2f V\" %V_ph)\n",
+ "print(\"for constant load current\")\n",
+ "print(\"V_ph=%.1f V\" %V_ph)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "per phase voltage percent V_ph=191.19 V\n",
+ "for constant load current\n",
+ "V_ph=191.2 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.22 Page No 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "E=200.0\n",
+ "I_o=20.0\n",
+ "R=.5\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=E+I_o*R\n",
+ "V_s=230\n",
+ "V_ml=math.sqrt(2)*V_s\n",
+ "a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml)-1)) \n",
+ "a1=180-a\n",
+ "I_sr=math.sqrt((1/math.pi)*I_o**2*(a1*math.pi/180))\n",
+ "P=V_o*I_o\n",
+ "pf=P/(math.sqrt(3)*V_s*I_sr) \n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle delay=%.2f deg\" %a)\n",
+ "print(\"pf=%.2f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle delay=69.38 deg\n",
+ "pf=0.67\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.23, Page No 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=400.0\n",
+ "f=50.0\n",
+ "I_o=15.0\n",
+ "a=45.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_TA=I_o*120.0/360.0\n",
+ "I_Tr=math.sqrt(I_o**2*120/360)\n",
+ "I_sr=math.sqrt(I_o**2*120/180)\n",
+ "V_ml=math.sqrt(2)*V_s\n",
+ "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n",
+ "V_or=V_ml*math.sqrt((3/(2*math.pi))*(math.pi/3+math.sqrt(3/2)*math.cos(math.radians(2*a))))\n",
+ "I_or=I_o\n",
+ "P_dc=V_o*I_o\n",
+ "P_ac=V_or*I_or\n",
+ "RE=P_dc/P_ac \n",
+ "VA=3*V_s/math.sqrt(3)*I_sr\n",
+ "TUF=P_dc/VA \n",
+ "pf=P_ac/VA \n",
+ "\n",
+ "#Results\n",
+ "print(\"rectification efficiency=%.5f\" %RE)\n",
+ "print(\"TUF=%.4f\" %TUF)\n",
+ "print(\"Input pf=%.3f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rectification efficiency=0.95493\n",
+ "TUF=0.6752\n",
+ "Input pf=0.707\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.24, Page No 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I=10.0\n",
+ "a=45.0\n",
+ "V=400.0\n",
+ "f=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "DF=math.cos(math.radians(a))\n",
+ "I_o=10\n",
+ "I_s1=4*I_o/(math.sqrt(2)*math.pi)*math.sin(math.pi/3)\n",
+ "I_sr=I_o*math.sqrt(2.0/3.0)\n",
+ "I_o=1 #suppose\n",
+ "CDF=I_s1/I_sr \n",
+ "THD=math.sqrt(1/CDF**2-1) \n",
+ "pf=CDF*DF \n",
+ "P=(3*math.sqrt(2)*V*math.cos(math.radians(a))/math.pi)*I\n",
+ "Q=(3*math.sqrt(2)*V*math.sin(math.radians(a))/math.pi)*I \n",
+ " \n",
+ "#Results\n",
+ "print(\"DF=%.3f\" %DF)\n",
+ "print(\"CDF=%.3f\" %CDF)\n",
+ "print(\"THD=%.5f\" %THD)\n",
+ "print(\"PF=%.4f\" %pf)\n",
+ "print(\"active power=%.2f W\" %P) \n",
+ "print(\"reactive power=%.2f Var\" %Q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "DF=0.707\n",
+ "CDF=0.955\n",
+ "THD=0.31084\n",
+ "PF=0.6752\n",
+ "active power=3819.72 W\n",
+ "reactive power=3819.72 Var\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.25, Page No 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "print(\"for firing angle=30deg\")\n",
+ "a=30.0\n",
+ "V=400.0\n",
+ "V_ml=math.sqrt(2)*V\n",
+ "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n",
+ "E=350\n",
+ "R=10\n",
+ "\n",
+ "#Calculations\n",
+ "I_o=(V_o-E)/R\n",
+ "I_or=I_o\n",
+ "P1=V_o*I_o \n",
+ "I_sr=I_o*math.sqrt(2.0/3.0)\n",
+ "VA=3*V/math.sqrt(3)*I_sr\n",
+ "pf=P1/VA \n",
+ "a=180-60\n",
+ "V=400\n",
+ "V_ml=math.sqrt(2)*V\n",
+ "V_o=3*V_ml*math.cos(math.radians(a))/math.pi\n",
+ "E=-350\n",
+ "R=10\n",
+ "I_o=(V_o-E)/R\n",
+ "I_or=I_o\n",
+ "P2=-V_o*I_o \n",
+ "I_sr=I_o*math.sqrt(2.0/3.0)\n",
+ "VA=3*V/math.sqrt(3)*I_sr\n",
+ "pf=P2/VA \n",
+ "\n",
+ "print(\"power delivered to load=%.2f W\" %P1)\n",
+ "print(\"pf=%.4f\" %pf)\n",
+ "print(\"for firing advance angle=60deg\")\n",
+ "print(\"power delivered to load=%.2f W\" %P2)\n",
+ "print(\"pf=%.4f\" %pf)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for firing angle=30deg\n",
+ "power delivered to load=5511.74 W\n",
+ "pf=0.4775\n",
+ "for firing advance angle=60deg\n",
+ "power delivered to load=2158.20 W\n",
+ "pf=0.4775\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.26, Page No 347"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=0\n",
+ "u=15.0\n",
+ "\n",
+ "#Calculations\n",
+ "i=math.cos(math.radians(a))-math.cos(math.radians(a+u))\n",
+ "a=30\n",
+ "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n",
+ "a=45\n",
+ "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n",
+ "a=60\n",
+ "u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a \n",
+ "\n",
+ "#Results\n",
+ "print(\"for firing angle=30deg\") \n",
+ "print(\"overlap angle=%.1f deg\" %u)\n",
+ "print(\"for firing angle=45deg\") \n",
+ "print(\"overlap angle=%.1f deg\" %u)\n",
+ "print(\"for firing angle=60deg\") \n",
+ "print(\"overlap angle=%.2f deg\" %u)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for firing angle=30deg\n",
+ "overlap angle=2.2 deg\n",
+ "for firing angle=45deg\n",
+ "overlap angle=2.2 deg\n",
+ "for firing angle=60deg\n",
+ "overlap angle=2.23 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.28, Page No 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "E=400.0\n",
+ "I_o=20.0\n",
+ "R=1\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=E+I_o*R\n",
+ "f=50.0\n",
+ "w=2*math.pi*f\n",
+ "L=.004\n",
+ "V=230 #per phase voltage\n",
+ "V_ml=math.sqrt(6)*V\n",
+ "a=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o+3*w*L*I_o/math.pi))) \n",
+ "print(\"firing angle delay=%.3f deg\" %a)\n",
+ "u=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o-3*w*L*I_o/math.pi)))-a \n",
+ "\n",
+ "#Results\n",
+ "print(\"overlap angle=%.2f deg\" %u)\n",
+ "#Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle delay=34.382 deg\n",
+ "overlap angle=8.22 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.29, Page No 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=400.0\n",
+ "f=50.0\n",
+ "w=2*math.pi*f\n",
+ "R=1\n",
+ "E=230\n",
+ "I=15.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=-E+I*R\n",
+ "V_ml=math.sqrt(2)*V\n",
+ "a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml))) \n",
+ "L=0.004\n",
+ "a=math.degrees(math.acos((2*math.pi)/(3*V_ml)*(V_o+3*w*L*I/(2*math.pi)))) \n",
+ "u=math.degrees(math.acos(math.cos(math.radians(a))-3*f*L*I/V_ml))-a \n",
+ "\n",
+ "#Results\n",
+ "print(\"firing angle=%.3f deg\" %a)\n",
+ "print(\"firing angle delay=%.3f deg\" %a)\n",
+ "print(\"overlap angle=%.3f deg\" %u)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle=139.702 deg\n",
+ "firing angle delay=139.702 deg\n",
+ "overlap angle=1.431 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.31, Page No 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0 #per phase\n",
+ "f=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_ml=math.sqrt(3.0)*math.sqrt(2)*V\n",
+ "w=2*math.pi*f\n",
+ "a1=60.0\n",
+ "L=0.015\n",
+ "i_cp=(math.sqrt(3)*V_ml/(w*L))*(1-math.sin(math.radians(a1))) \n",
+ "\n",
+ "#Results\n",
+ "print(\"circulating current=%.4f A\" %i_cp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "circulating current=27.7425 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.32, Page No 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "V_m=math.sqrt(2)*V\n",
+ "a=30.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=2*V_m* math.cos(math.radians(a))/math.pi \n",
+ "R=10\n",
+ "I_o=V_o/R \n",
+ "I_TA=I_o*math.pi/(2*math.pi) \n",
+ "I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi)) \n",
+ "I_s=math.sqrt(I_o**2*math.pi/(math.pi)) \n",
+ "I_o=I_s\n",
+ "pf=(V_o*I_o/(V*I_s)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"avg o/p voltage=%.3f V\" %V_o)\n",
+ "print(\"avg o/p current=%.2f A\" %I_o)\n",
+ "print(\"avg value of thyristor current=%.3f A\" %I_TA)\n",
+ "print(\"rms value of thyristor current=%.2f A\" %I_Tr)\n",
+ "print(\"pf=%.4f\" %pf)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits.\n",
+ " \n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg o/p voltage=179.330 V\n",
+ "avg o/p current=17.93 A\n",
+ "avg value of thyristor current=8.967 A\n",
+ "rms value of thyristor current=12.68 A\n",
+ "pf=0.7797\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.33, Page No 363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "V_m=math.sqrt(2)*V\n",
+ "a=30.0\n",
+ "L=.0015\n",
+ "\n",
+ "#Calculations\n",
+ "V_o=2*V_m* math.cos(math.radians(a))/math.pi \n",
+ "R=10\n",
+ "I_o=V_o/R \n",
+ "f=50\n",
+ "w=2*math.pi*f\n",
+ "V_ox=2*V_m*math.cos(math.radians(a))/math.pi-w*L*I_o/math.pi \n",
+ "u=math.degrees(math.acos(math.cos(math.radians(a))-I_o*w*L/V_m))-a \n",
+ "I=I_o\n",
+ "pf=V_o*I_o/(V*I) \n",
+ "\n",
+ "#Results\n",
+ "print(\"avg o/p voltage=%.3f V\" %V_ox)\n",
+ "print(\"angle of overlap=%.3f deg\" %u)\n",
+ "print(\"pf=%.4f\" %pf)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg o/p voltage=176.640 V\n",
+ "angle of overlap=2.855 deg\n",
+ "pf=0.7797\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.34, Page No 364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=415.0\n",
+ "V_ml=math.sqrt(2)*V\n",
+ "a1=35.0 #firing angle advance\n",
+ "\n",
+ "#Calculations\n",
+ "a=180-a1\n",
+ "I_o=80.0\n",
+ "r_s=0.04\n",
+ "v_T=1.5\n",
+ "X_l=.25 #reactance=w*L\n",
+ "E=-3*V_ml*math.cos(math.radians(a))/math.pi+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi \n",
+ "\n",
+ "#Results\n",
+ "print(\"mean generator voltage=%.3f V\" %E)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mean generator voltage=487.590 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.35, Page No 364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=415.0\n",
+ "V_ml=math.sqrt(2)*V\n",
+ "R=0.2\n",
+ "I_o=80\n",
+ "r_s=0.04\n",
+ "v_T=1.5\n",
+ "\n",
+ "#Calculations\n",
+ "X_l=.25 #reactance=w*L\n",
+ "a=35\n",
+ "E=-(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi) \n",
+ "a1=35\n",
+ "a=180-a1\n",
+ "E=(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi) \n",
+ "\n",
+ "#Results\n",
+ "print(\"when firing angle=35deg\") \n",
+ "print(\"mean generator voltage=%.3f V\" %E)\n",
+ "print(\"when firing angle advance=35deg\")\n",
+ "print(\"mean generator voltage=%.3f V\" %E)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when firing angle=35deg\n",
+ "mean generator voltage=503.590 V\n",
+ "when firing angle advance=35deg\n",
+ "mean generator voltage=503.590 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.36, Page No 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "R=5.0\n",
+ "V=230.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_mp=math.sqrt(2)*V\n",
+ "a=30.0\n",
+ "E=150.0\n",
+ "B=180-math.degrees(math.asin(E/V_mp))\n",
+ "I_o=(3/(2*math.pi*R))*(V_mp*(math.cos(math.radians(a+30))-math.cos(math.radians(B)))-E*((B-a-30)*math.pi/180))\n",
+ "\n",
+ "#Results\n",
+ "print(\"avg current flowing=%.2f A\" %I_o)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg current flowing=19.96 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.37, Page No 366"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=30.0\n",
+ "V=230.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_m=math.sqrt(2)*V\n",
+ "V_o=V_m*(1+math.cos(math.radians(a)))/math.pi \n",
+ "E=100\n",
+ "R=10\n",
+ "I_o=(V_o-E)/R \n",
+ "I_TA=I_o*math.pi/(2*math.pi) \n",
+ "I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi)) \n",
+ "I_s=math.sqrt(I_o**2*(1-a/180)*math.pi/(math.pi))\n",
+ "I_or=I_o\n",
+ "P=E*I_o+I_or**2*R\n",
+ "pf=(P/(V*I_s)) \n",
+ "f=50\n",
+ "w=2*math.pi*f\n",
+ "t_c=(1-a/180)*math.pi/w \n",
+ "\n",
+ "#Results\n",
+ "print(\"\\navg o/p current=%.2f A\" %I_o)\n",
+ "print(\"avg o/p voltage=%.3f V\" %V_o)\n",
+ "print(\"avg value of thyristor current=%.2f A\" %I_TA)\n",
+ "print(\"rms value of thyristor current=%.3f A\" %I_Tr)\n",
+ "print(\"avg value of diode current=%.2f A\" %I_TA)\n",
+ "print(\"rms value of diode current=%.3f A\" %I_Tr)\n",
+ "print(\"pf=%.4f\" %pf)\n",
+ "print(\"circuit turn off time=%.2f ms\" %(t_c*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "avg o/p current=9.32 A\n",
+ "avg o/p voltage=193.202 V\n",
+ "avg value of thyristor current=4.66 A\n",
+ "rms value of thyristor current=6.590 A\n",
+ "avg value of diode current=4.66 A\n",
+ "rms value of diode current=6.590 A\n",
+ "pf=0.9202\n",
+ "circuit turn off time=8.33 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.38, Page No 368"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "V_m=math.sqrt(2)*V\n",
+ "L=0.05\n",
+ "f=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "w=2*math.pi*f\n",
+ "a=30\n",
+ "i_cp=2*V_m*(1-math.cos(math.radians(a)))/(w*L) \n",
+ "R=30.0\n",
+ "i_l=V_m/R\n",
+ "i1=i_cp+i_l \n",
+ "i2=i_cp \n",
+ "\n",
+ "#Results\n",
+ "print(\"peak value of circulating current=%.3f A\" %i_cp)\n",
+ "print(\"peak value of current in convertor 1=%.3f A\" %i1)\n",
+ "print(\"peak value of current in convertor 2=%.3f A\" %i2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak value of circulating current=5.548 A\n",
+ "peak value of current in convertor 1=16.391 A\n",
+ "peak value of current in convertor 2=5.548 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.39, Page No 370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "f=50.0\n",
+ "w=2*math.pi*f\n",
+ "R=5.0\n",
+ "L=0.05\n",
+ "\n",
+ "#Calculations\n",
+ "phi=math.degrees(math.atan(w*L/R)) \n",
+ "phi=90+math.degrees(math.atan(w*L/R)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"for no current transients\")\n",
+ "print(\"triggering angle=%.2f deg\" %phi)\n",
+ "print(\"for worst transients\")\n",
+ "print(\"triggering angle=%.2f deg\" %phi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for no current transients\n",
+ "triggering angle=162.34 deg\n",
+ "for worst transients\n",
+ "triggering angle=162.34 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter7_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter7_4.ipynb new file mode 100755 index 00000000..726160c8 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter7_4.ipynb @@ -0,0 +1,1036 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 07 : Choppers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2, Page No 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=0.4 #duty cycle %a=T_on/T\n",
+ "V_s=230.0\n",
+ "R=10.0\n",
+ "\n",
+ "#Calculations\n",
+ "V=a*(V_s-2) \n",
+ "V_or=math.sqrt(a*(V_s-2)**2) \n",
+ "P_o=V_or**2/R\n",
+ "P_i=V_s*V/R\n",
+ "n=P_o*100/P_i \n",
+ "\n",
+ "#Results\n",
+ "print(\"avg o/p voltage=%.1f V\" %V)\n",
+ "print(\"rms value of o/p voltage=%.1f V\" %V_or)\n",
+ "print(\"chopper efficiency in percentage=%.2f\" %n)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avg o/p voltage=91.2 V\n",
+ "rms value of o/p voltage=144.2 V\n",
+ "chopper efficiency in percentage=99.13\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3, Page No 388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_i=220.0\n",
+ "V_o=660.0\n",
+ "\n",
+ "#Calculations\n",
+ "a=1-V_i/V_o\n",
+ "T_on=100.0 #microsecond\n",
+ "T=T_on/a\n",
+ "T_off=T-T_on \n",
+ "T_off=T_off/2\n",
+ "T_on=T-T_off\n",
+ "a=T_on/T\n",
+ "V_o=V_i/(1-a)\n",
+ "\n",
+ "#Results \n",
+ "print(\"pulse width of o/p voltage=%.0f us\" %T_off)\n",
+ "print(\"\\nnew o/p voltage=%.0f V\" %V_o)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pulse width of o/p voltage=25 us\n",
+ "\n",
+ "new o/p voltage=1320 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 Page No 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I_1=12.0\n",
+ "I_2=16.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_0=(I_1+I_2)/2\n",
+ "R=10.0\n",
+ "V_0=I_0*R\n",
+ "V_s=200.0\n",
+ "a=V_0/V_s\n",
+ "r=a/(1-a)\n",
+ "\n",
+ "#Results\n",
+ "print(\"time ratio(T_on/T_off)=%.3f\" %r)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time ratio(T_on/T_off)=2.333\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5, Page No 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_o=660.0\n",
+ "V_s=220.0\n",
+ "\n",
+ "#Calculations\n",
+ "a=(V_o/V_s)/(1+(V_o/V_s))\n",
+ "T_on=120\n",
+ "T=T_on/a\n",
+ "T_off=T-T_on \n",
+ "T_off=3*T_off\n",
+ "T_on=T-T_off\n",
+ "a=T_on/(T_on+T_off)\n",
+ "V_o=V_s*(a/(1-a)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"pulse width o/p voltage=%.0f us\" %T_off)\n",
+ "print(\"\\nnew o/p voltage=%.2f V\" %V_o)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pulse width o/p voltage=120 us\n",
+ "\n",
+ "new o/p voltage=73.33 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11 Page No 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "R=1.0\n",
+ "L=.005\n",
+ "T_a=L/R\n",
+ "T=2000*10**-6\n",
+ "E=24.0\n",
+ "V_s=220\n",
+ "T_on=600*10**-6\n",
+ "a=T_on/T\n",
+ "\n",
+ "#Calculations\n",
+ "a1=(T_a/T)*math.log(1+(E/V_s)*((math.exp(T/T_a))-1))\n",
+ "if a1<a :\n",
+ " print(\"load current in continuous\")\n",
+ "else:\n",
+ " print(\"load current in discont.\")\n",
+ "\n",
+ "I_o=(a*V_s-E)/R \n",
+ "I_mx=(V_s/R)*((1-math.exp(-T_on/T_a))/(1-math.exp(-T/T_a)))-E/R \n",
+ "I_mn=(V_s/R)*((math.exp(T_on/T_a)-1)/(math.exp(T/T_a)-1))-E/R \n",
+ "f=1/T\n",
+ "w=2*math.pi*f\n",
+ "I1=(2*V_s/(math.sqrt(2)*math.pi)*math.sin(math.radians(180*a)))/(math.sqrt(R**2+(w*L)**2)) \n",
+ "I2=(2*V_s/(2*math.sqrt(2)*math.pi)*math.sin(math.radians(2*180*a)))/(math.sqrt(R**2+(w*L*2)**2)) \n",
+ "I3=(2*V_s/(3*math.sqrt(2)*math.pi)*math.sin(math.radians(3*180*a)))/(math.sqrt(R**2+(w*L*3)**2)) \n",
+ "I_TAV=a*(V_s-E)/R-L*(I_mx-I_mn)/(R*T) \n",
+ "P1=I_TAV*V_s\n",
+ "P2=E*I_o\n",
+ "I_or=math.sqrt(I_o**2+I1**2+I2**2+I3**2)\n",
+ "\n",
+ "#Results\n",
+ "print(\"avg o/p current=%.2f A\" %I_o)\n",
+ "print(\"max value of steady current=%.2f A\" %I_mx)\n",
+ "print(\"min value of steady current=%.2f A\" %I_mn)\n",
+ "print(\"first harmonic current=%.4f A\" %I1)\n",
+ "print(\"second harmonic current=%.4f A\" %I2)\n",
+ "print(\"third harmonic current=%.5f A\" %I3)\n",
+ "print(\"avg supply current=%.4f A\" %I_TAV)\n",
+ "print(\"i/p power=%.2f W\" %P1)\n",
+ "print(\"power absorbed by load emf=%.0f W\" %P2)\n",
+ "print(\"power loss in resistor=%.2f W\" %(P1-P2))\n",
+ "print(\"rms value of load current=%.3f A\" %I_or)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load current in continuous\n",
+ "avg o/p current=42.00 A\n",
+ "max value of steady current=51.46 A\n",
+ "min value of steady current=33.03 A\n",
+ "first harmonic current=5.0903 A\n",
+ "second harmonic current=1.4983 A\n",
+ "third harmonic current=0.21643 A\n",
+ "avg supply current=12.7289 A\n",
+ "i/p power=2800.35 W\n",
+ "power absorbed by load emf=1008 W\n",
+ "power loss in resistor=1792.35 W\n",
+ "rms value of load current=42.334 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.12 Page No 411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "R=1\n",
+ "L=.001\n",
+ "V_s=220\n",
+ "E=72.0\n",
+ "f=500.0\n",
+ "T_on=800*10**-6\n",
+ "T_a=L/R\n",
+ "T=1.0/f\n",
+ "m=E/V_s\n",
+ "a=T_on/T\n",
+ "\n",
+ "#Calculations\n",
+ "a1=(T_a/T)*math.log(1+m*(math.exp(-T/T_a)-1))\n",
+ "if a1>a :\n",
+ " print(\"load current is continuous\")\n",
+ "else:\n",
+ " print(\"load current is discontinuous\")\n",
+ "\n",
+ "t_x=T_on+L*math.log(1+((V_s-E)/272)*(1-math.exp(-T_on/T_a)))\n",
+ " #Value of t_x wrongly calculated in the book so ans of V_o and I_o varies\n",
+ "V_o=a*V_s+(1-t_x/T)*E \n",
+ "I_o=(V_o-E)/R \n",
+ "I_mx=(V_s-E)/R*(1-math.exp(-T_on/T_a)) \n",
+ "\n",
+ "#Results \n",
+ "print(\"avg o/p voltage=%.2f V\" %V_o)\n",
+ "print(\"avg o/p current=%.2f A\" %I_o) \n",
+ "print(\"max value of load current=%.1f A\" %I_mx)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load current is discontinuous\n",
+ "avg o/p voltage=121.77 V\n",
+ "avg o/p current=49.77 A\n",
+ "max value of load current=81.5 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.13, Page No 412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=0.2\n",
+ "V_s=500\n",
+ "E=a*V_s\n",
+ "L=0.06\n",
+ "I=10\n",
+ "\n",
+ "#Calculations\n",
+ "T_on=(L*I)/(V_s-E)\n",
+ "f=a/T_on \n",
+ "\n",
+ "#Results\n",
+ "print(\"chopping freq=%.2f Hz\" %f)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "chopping freq=133.33 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.14 Page No 412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=0.5\n",
+ "pu=0.1 #pu ripple\n",
+ "\n",
+ "#Calculations\n",
+ " #x=T/T_a\n",
+ " #y=exp(-a*x)\n",
+ "y=(1-pu)/(1+pu)\n",
+ " #after solving\n",
+ "x=math.log(1/y)/a\n",
+ "f=1000\n",
+ "T=1/f\n",
+ "T_a=T/x\n",
+ "R=2\n",
+ "L=R*T_a\n",
+ "Li=0.002\n",
+ "Le=L-Li \n",
+ "\n",
+ "#Results\n",
+ "print(\"external inductance=%.3f mH\" %(Le*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "external inductance=-2.000 mH\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.15 Page No 414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "R=10.0\n",
+ "L=0.015\n",
+ "T_a=L/R\n",
+ "f=1250.0\n",
+ "T=1.0/f\n",
+ "a=0.5\n",
+ "T_on=a*T\n",
+ "V_s=220.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_mx=(V_s/R)*((1-math.exp(-T_on/T_a))/(1-math.exp(-T/T_a))) \n",
+ "I_mn=(V_s/R)*((math.exp(T_on/T_a)-1)/(math.exp(T/T_a)-1)) \n",
+ "dI=I_mx-I_mn \n",
+ "V_o=a*V_s\n",
+ "I_o=V_o/R \n",
+ "I_or=math.sqrt(I_mx**2+dI**2/3+I_mx*dI) \n",
+ "I_chr=math.sqrt(a)*I_or \n",
+ "\n",
+ "#Results\n",
+ "print(\"Max value of ripple current=%.2f A\" %dI)\n",
+ "print(\"Max value of load current=%.3f A\" %I_mx)\n",
+ "print(\"Min value of load current=%.2f A\" %I_mn)\n",
+ "print(\"Avg value of load current=%.2f A\" %I_o) \n",
+ "print(\"rms value of load current=%.2f A\" %I_or)\n",
+ "print(\"rms value of chopper current=%.2f A\" %I_chr)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max value of ripple current=2.92 A\n",
+ "Max value of load current=12.458 A\n",
+ "Min value of load current=9.54 A\n",
+ "Avg value of load current=11.00 A\n",
+ "rms value of load current=13.94 A\n",
+ "rms value of chopper current=9.86 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.17 Page No 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "L=0.0016\n",
+ "C=4*10**-6\n",
+ "\n",
+ "#Calculations\n",
+ "w=1/math.sqrt(L*C)\n",
+ "t=math.pi/w \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"time for which current flows=%.2f us\" %(t*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time for which current flows=251.33 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.18, Page No 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "t_q=20.0*10**-6\n",
+ "dt=20.0*10**-6\n",
+ "\n",
+ "#Calculations\n",
+ "t_c=t_q+dt\n",
+ "I_0=60.0\n",
+ "V_s=60.0\n",
+ "C=t_c*I_0/V_s \n",
+ "\n",
+ "#Results \n",
+ "print(\"value of commutating capacitor=%.0f uF\" %(C*10**6))\n",
+ "\n",
+ "L1=(V_s/I_0)**2*C\n",
+ "L2=(2*t_c/math.pi)**2/C\n",
+ "if L1>L2 :\n",
+ " print(\"value of commutating inductor=%.0f uH\" %(L1*10**6))\n",
+ "else:\n",
+ " print(\"value of commutating inductor=%.0f uH\" %(L2*10**6))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of commutating capacitor=40 uF\n",
+ "value of commutating inductor=40 uH\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.19, Page No 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "t=100.0*10**-6\n",
+ "R=10.0\n",
+ "\n",
+ "#Calculations\n",
+ " #V_s*(1-2*math.exp(-t/(R*C)))=0\n",
+ "C=-t/(R*math.log(1.0/2)) \n",
+ "L=(4/9.0)*C*R**2 \n",
+ "L=(1.0/4)*C*R**2 \n",
+ "\n",
+ "#Results\n",
+ "print(\"Value of comutating component C=%.3f uF\" %(C*10**6))\n",
+ "print(\"max permissible current through SCR is 2.5 times load current\")\n",
+ "print(\"value of comutating component L=%.1f uH\" %(L*10**6))\n",
+ "print(\"max permissible current through SCR is 1.5 times peak diode current\")\n",
+ "print(\"value of comutating component L=%.2f uH\" %(L*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of comutating component C=14.427 uF\n",
+ "max permissible current through SCR is 2.5 times load current\n",
+ "value of comutating component L=360.7 uH\n",
+ "max permissible current through SCR is 1.5 times peak diode current\n",
+ "value of comutating component L=360.67 uH\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.20, Page No 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "T_on=800.0*10**-6\n",
+ "V_s=220.0\n",
+ "I_o=80.0\n",
+ "C=50*10**-6\n",
+ "\n",
+ "#Calculations\n",
+ "T=T_on+2*V_s*C/I_o \n",
+ "L=20*10**-6\n",
+ "C=50*10**-6\n",
+ "i_T1=I_o+V_s*math.sqrt(C/L) \n",
+ "i_TA=I_o \n",
+ "t_c=C*V_s/I_o \n",
+ "t_c1=(math.pi/2)*math.sqrt(L*C) \n",
+ "t=150*10**-6\n",
+ "v_c=I_o*t/C-V_s \n",
+ "\n",
+ "#Results \n",
+ "print(\"effective on period=%.0f us\" %(T*10**6))\n",
+ "print(\"peak current through main thyristor=%.2f A\" %i_T1)\n",
+ "print(\"peak current through auxillery thyristor=%.0f A\" %i_TA)\n",
+ "print(\"turn off time for main thyristor=%.1f us\" %(t_c*10**6))\n",
+ "print(\"turn off time for auxillery thyristor=%.3f us\" %(t_c1*10**6))\n",
+ "print(\"total commutation interval=%.0f us\" %(2*t_c*10**6))\n",
+ "print(\"capacitor voltage=%.0f V\" %v_c)\n",
+ "print(\"time nedded to recharge the capacitor=%.0f us\" %(2*V_s*C/I_o*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for firing angle = 30deg\n",
+ "avg output voltage=232.509 V\n",
+ "for firing angle = 60deg\n",
+ "avg output voltage=133.65 V\n",
+ "avg current rating=12 A\n",
+ "rms current rating=20.785 A\n",
+ "PIV of SCR=565.7 V\n",
+ "power dissipated=16.8 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 122
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.21, Page No 427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I_o=260.0\n",
+ "V_s=220.0\n",
+ "fos=2 #factor of safety\n",
+ "\n",
+ "#Calculations\n",
+ "t_off=18*10**-6\n",
+ "t_c=2*t_off\n",
+ "C=t_c*I_o/V_s \n",
+ "L=(V_s/(0.8*I_o))**2*C \n",
+ "f=400\n",
+ "a_mn=math.pi*f*math.sqrt(L*C)\n",
+ "V_omn=V_s*(a_mn+2*f*t_c) \n",
+ "V_omx=V_s \n",
+ "\n",
+ "#Results\n",
+ "print(\"Value of C=%.3f uF\" %(C*10**6))\n",
+ "print(\"value of L=%.3f uH\" %(L*10**6))\n",
+ "print(\"min value of o/p voltage=%.3f V\" %V_omn)\n",
+ "print(\"max value of o/p voltage=%.0f V\" %V_omx)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "firing angle delay=47.461 deg\n",
+ "pf=0.646\n",
+ "firing angle delay=127.71 deg\n"
+ ]
+ }
+ ],
+ "prompt_number": "*"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.22, Page No 434"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "x=2.0\n",
+ "t_q=30*10**-6\n",
+ "dt=30*10**-6\n",
+ "t_c=t_q+dt\n",
+ "V_s=230.0\n",
+ "I_o=200.0\n",
+ "\n",
+ "#Calculations\n",
+ "L=V_s*t_c/(x*I_o*(math.pi-2*math.asin(1/x))) \n",
+ "C=x*I_o*t_c/(V_s*(math.pi-2*math.asin(1/x))) \n",
+ "V_cp=V_s+I_o*math.sqrt(L/C) \n",
+ "I_cp=x*I_o \n",
+ "x=3\n",
+ "L=V_s*t_c/(x*I_o*(math.pi-2*math.asin(1/x))) \n",
+ "C=x*I_o*t_c/(V_s*(math.pi-2*math.asin(1/x))) \n",
+ "V_cp=V_s+I_o*math.sqrt(L/C) \n",
+ "I_cp=x*I_o \n",
+ "\n",
+ "#Results\n",
+ "print(\"value of commutating inductor=%.3f uH\" %(L*10**6))\n",
+ "print(\"value of commutating capacitor=%.3f uF\" %(C*10**6))\n",
+ "print(\"peak capacitor voltage=%.0f V\" %V_cp)\n",
+ "print(\"peak commutataing current=%.0f A\" %I_cp)\n",
+ "print(\"value of commutating inductor=%.3f uH\" %(L*10**6))\n",
+ "print(\"value of commutating capacitor=%.3f uF\" %(C*10**6))\n",
+ "print(\"peak capacitor voltage=%.2f V\" %V_cp)\n",
+ "print(\"peak commutataing current=%.0f A\" %I_cp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of commutating inductor=7.321 uH\n",
+ "value of commutating capacitor=49.822 uF\n",
+ "peak capacitor voltage=307 V\n",
+ "peak commutataing current=600 A\n",
+ "value of commutating inductor=7.321 uH\n",
+ "value of commutating capacitor=49.822 uF\n",
+ "peak capacitor voltage=306.67 V\n",
+ "peak commutataing current=600 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.23, Page No 434"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variablesV_s=230\n",
+ "C=50*10**-6\n",
+ "L=20*10**-6\n",
+ "I_cp=V_s*math.sqrt(C/L)\n",
+ "I_o=200\n",
+ "x=I_cp/I_o\n",
+ "\n",
+ "#Calculations\n",
+ "t_c=(math.pi-2*math.asin(1/x))*math.sqrt(C*L) \n",
+ "th1=math.degrees(math.asin(1.0/x))\n",
+ "t=(5*math.pi/2-th1*math.pi/180)*math.sqrt(L*C)+C*V_s*(1-math.cos(math.radians(th1)))/I_o \n",
+ "t=(math.pi-th1*math.pi/180)*math.sqrt(L*C) \n",
+ "\n",
+ "#Results\n",
+ "print(\"turn off time of main thyristor=%.2f us\" %(t_c*10**6))\n",
+ "print(\"total commutation interval=%.3f us\" %(t*10**6))\n",
+ "print(\"turn off time of auxillery thyristor=%.3f us\" %(t*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "turn off time of main thyristor=62.52 us\n",
+ "total commutation interval=80.931 us\n",
+ "turn off time of auxillery thyristor=80.931 us\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.24, Page No 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "tc=0.006\n",
+ "R=10.0\n",
+ "L=R*tc\n",
+ "f=2000.0\n",
+ "\n",
+ "#Calculations\n",
+ "T=1/f\n",
+ "V_o=50.0\n",
+ "V_s=100.0\n",
+ "a=V_o/V_s\n",
+ "T_on=a*T\n",
+ "T_off=T-T_on\n",
+ "dI=V_o*T_off/L\n",
+ "I_o=V_o/R\n",
+ "I2=I_o+dI/2 \n",
+ "I1=I_o-dI/2 \n",
+ "\n",
+ "#Results\n",
+ "print(\"max value of load current=%.3f A\" %I2)\n",
+ "print(\"min value of load current=%.3f A\" %I1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "max value of load current=5.104 A\n",
+ "min value of load current=4.896 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.27, Page No 443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "I_a=30.0\n",
+ "r_a=.5\n",
+ "V_s=220.0\n",
+ "\n",
+ "#Calculations\n",
+ "a=I_a*r_a/V_s \n",
+ "a=1\n",
+ "k=.1 #V/rpm\n",
+ "N=(a*V_s-I_a*r_a)/k \n",
+ "\n",
+ "#Results\n",
+ "print(\"min value of duty cycle=%.3f\" %a)\n",
+ "print(\"min Value of speed control=%.0f rpm\" %0)\n",
+ "print(\"max value of duty cycle=%.0f\" %a)\n",
+ "print(\"max value of speed control=%.0f rpm\" %N)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "min value of duty cycle=1.000\n",
+ "min Value of speed control=0 rpm\n",
+ "max value of duty cycle=1\n",
+ "max value of speed control=2050 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.28, Page No 444"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_t=72.0\n",
+ "I_a=200.0\n",
+ "r_a=0.045\n",
+ "N=2500.0\n",
+ "\n",
+ "#Calculations\n",
+ "k=(V_t-I_a*r_a)/N\n",
+ "E_a=k*1000\n",
+ "L=.007\n",
+ "Rm=.045\n",
+ "Rb=0.065\n",
+ "R=Rm+Rb\n",
+ "T_a=L/R\n",
+ "I_mx=230\n",
+ "I_mn=180\n",
+ "T_on=-T_a*math.log(-((V_t-E_a)/R-I_mx)/((I_mn)-(V_t-E_a)/R))\n",
+ "R=Rm\n",
+ "T_a=L/R\n",
+ "T_off=-T_a*math.log(-((-E_a)/R-I_mn)/((I_mx)-(-E_a)/R))\n",
+ "T=T_on+T_off\n",
+ "f=1/T \n",
+ "a=T_on/T \n",
+ "\n",
+ "#Results\n",
+ "print(\"chopping freq=%.1f Hz\" %f) \n",
+ "print(\"duty cycle ratio=%.3f\" %a)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "chopping freq=40.5 Hz\n",
+ "\n",
+ "duty cycle ratio=0.588\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.29, Page No 445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variablesI_mx=425\n",
+ "I_lt=180.0 #lower limit of current pulsation\n",
+ "I_mn=I_mx-I_lt\n",
+ "T_on=0.014\n",
+ "T_off=0.011\n",
+ "\n",
+ "#Calculations\n",
+ "T=T_on+T_off\n",
+ "T_a=.0635\n",
+ "a=T_on/T\n",
+ "V=(I_mx-I_mn*math.exp(-T_on/T_a))/(1-math.exp(-T_on/T_a))\n",
+ "a=.5\n",
+ "I_mn=(I_mx-V*(1-math.exp(-T_on/T_a)))/(math.exp(-T_on/T_a))\n",
+ "T=I_mx-I_mn \n",
+ "T=T_on/a\n",
+ "f=1/T \n",
+ "\n",
+ "#Results\n",
+ "print(\"higher limit of current pulsation=%.0f A\" %T)\n",
+ "print(\"chopping freq=%.3f Hz\" %f)\n",
+ "print(\"duty cycle ratio=%.2f\" %a)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "higher limit of current pulsation=0 A\n",
+ "chopping freq=35.714 Hz\n",
+ "duty cycle ratio=0.50\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter8_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter8_4.ipynb new file mode 100755 index 00000000..721a9faf --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter8_4.ipynb @@ -0,0 +1,984 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 08 : Inverters"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3, Page No 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "T=0.1*10**-3\n",
+ "f=1.0/T\n",
+ "k=15*10**-6 #k=th/w\n",
+ "\n",
+ "#Calculations\n",
+ "th=2*math.pi*f*k\n",
+ "X_l=10.0\n",
+ "R=2.0\n",
+ "X_c=R*math.tan(th)+X_l\n",
+ "C=1/(2*math.pi*f*X_c) \n",
+ "\n",
+ "#Results\n",
+ "print(\"value of C=%.3f uF\" %(C*10**6))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of C=1.248 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4 Page No 466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_01=2*V_s/(math.sqrt(2)*math.pi)\n",
+ "R=2.0\n",
+ "I_01=V_01/R\n",
+ "P_d=I_01**2*R \n",
+ "V=V_s/2\n",
+ "I_s=math.sqrt(2)*I_01/math.pi\n",
+ "P_s=V*I_s\n",
+ "\n",
+ "#Results\n",
+ "print(\"power delivered to load=%.1f W\" %P_d)\n",
+ "print(\"power delivered by both sources=%.1f W\" %(2*P_s))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power delivered to load=5359.9 W\n",
+ "power delivered by both sources=5359.9 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5, Page No 468"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_01=4*V_s/(math.pi*math.sqrt(2))\n",
+ "R=1.0\n",
+ "X_L=6.0\n",
+ "X_c=7.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_01=V_01/math.sqrt(R**2+(X_L-X_c)**2)\n",
+ "P=I_01**2*R \n",
+ "I_s=math.sqrt(2)*I_01*(2*math.cos(math.radians(45)))/math.pi\n",
+ "P_s=V_s*I_s \n",
+ "\n",
+ "#Results\n",
+ "print(\"power delivered to the source=%.3f kW\" %(P/1000))\n",
+ "print(\"\\npower from the source=%.3f kW\" %(P_s/1000))\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power delivered to the source=21.440 kW\n",
+ "\n",
+ "power from the source=21.440 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.6 Page No 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_01=230.0\n",
+ "R=2.0\n",
+ "I_01=V_01/R\n",
+ "I_m=I_01*math.sqrt(2)\n",
+ "I_T1=I_m/2 \n",
+ "I_D1=0 \n",
+ "X_L=8.0\n",
+ "X_C=6.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_01=V_01/math.sqrt(R**2+(X_L-X_C)**2)\n",
+ "phi1=math.degrees(math.atan((X_L-X_C)/R))\n",
+ "I_T1=I_T1*math.sqrt(2)*0.47675 \n",
+ "I_D1=.1507025*I_m/math.sqrt(2) \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"when load R=2 ohm\")\n",
+ "print(\"rms value of thyristor current=%.2f A\" %I_T1)\n",
+ "print(\"rms value of diode current=%.0f A\" %I_D1)\n",
+ "print(\"when load R=2ohm % X_L=8ohm and X_C=6ohm\")\n",
+ "print(\"rms value of thyristor current=%.3f A\" %I_T1)\n",
+ "print(\"rms value of diode current=%.3f A\" %I_D1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when load R=2 ohm\n",
+ "rms value of thyristor current=54.83 A\n",
+ "rms value of diode current=17 A\n",
+ "when load R=2ohm % X_L=8ohm and X_C=6ohm\n",
+ "rms value of thyristor current=54.826 A\n",
+ "rms value of diode current=17.331 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7 Page No 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "R=4.0\n",
+ "f=50.0\n",
+ "w=2*math.pi*f\n",
+ "L=0.035\n",
+ "\n",
+ "#Calculations\n",
+ "C=155*10**-6\n",
+ "X_L=w*L\n",
+ "X_C=1/(w*C)\n",
+ "Z1=math.sqrt(R**2+(X_L-X_C)**2)\n",
+ "phi1=-math.degrees(math.atan((X_L-X_C)/R))\n",
+ "Z3=math.sqrt(R**2+(X_L*3-X_C/3)**2)\n",
+ "phi3=math.degrees(math.atan((X_L*3-X_C/3)/R))\n",
+ "Z5=math.sqrt(R**2+(X_L*5-X_C/5)**2)\n",
+ "phi5=math.degrees(math.atan((X_L*5-X_C/5)/R))\n",
+ "I_m1=4*V_s/(Z1*math.pi)\n",
+ "I_01=I_m1/math.sqrt(2) \n",
+ "I_m3=4*V_s/(3*Z3*math.pi)\n",
+ "I_m5=4*V_s/(5*Z5*math.pi)\n",
+ "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2)\n",
+ "I_0=I_m/math.sqrt(2)\n",
+ "P_0=(I_0)**2*R \n",
+ "P_01=(I_01)**2*R \n",
+ "t1=(180-phi1)*math.pi/(180*w) \n",
+ "t1=(phi1)*math.pi/(180*w) \n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of fundamental load current=%.2f A\" %I_01)\n",
+ "print(\"load power=%.1f W\" %P_0)\n",
+ "print(\"fundamental load power=%.1f W\" %P_01)\n",
+ "print(\"rms value of thyristor current=%.3f A\" %(I_m/2))\n",
+ "print(\"conduction time for thyristor=%.3f ms\" %(t1*1000))\n",
+ "print(\"Conduction time for diodes=%.3f ms\" %(t1*1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of fundamental load current=20.02 A\n",
+ "load power=1632.5 W\n",
+ "fundamental load power=1602.6 W\n",
+ "rms value of thyristor current=14.285 A\n",
+ "conduction time for thyristor=3.736 ms\n",
+ "Conduction time for diodes=3.736 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8, Page No 473"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_01=2*V_s/(math.sqrt(2)*math.pi) \n",
+ "R=10.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_01=V_01/R\n",
+ "P=I_01**2*R \n",
+ "V_or=math.sqrt((V_s/2)**2)\n",
+ "P=V_or**2/R \n",
+ "I_TP=V_s/(2*R)\n",
+ "I_or=I_TP\n",
+ "pf=I_01**2*R/(V_or*I_or) \n",
+ "DF=V_01/V_or \n",
+ "V_oh=math.sqrt(V_or**2-V_01**2)\n",
+ "THD=V_oh/V_01 \n",
+ "V_03=V_01/3\n",
+ "HF=V_03/V_01\n",
+ "\n",
+ "#Results\n",
+ "print(\"fundamental rms o/p voltage=%.3f V\" %V_01)\n",
+ "print(\"fundamental power to load=%.1f W\" %P)\n",
+ "print(\"total o/p power to load=%.1f W\" %P)\n",
+ "print(\"avg SCR current=%.2f A\" %(I_TP*180/360))\n",
+ "print(\"i/p pf=%.3f\" %pf) \n",
+ "print(\"distortion factor=%.1f\" %DF)\n",
+ "print(\"THD=%.3f\" %THD) \n",
+ "print(\"harmonic factor=%.4f\" %HF)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fundamental rms o/p voltage=103.536 V\n",
+ "fundamental power to load=1322.5 W\n",
+ "total o/p power to load=1322.5 W\n",
+ "avg SCR current=5.75 A\n",
+ "i/p pf=0.811\n",
+ "distortion factor=0.9\n",
+ "THD=0.483\n",
+ "harmonic factor=0.3333\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.9 Page No 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=60\n",
+ "R=3.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_or=math.sqrt(V_s**2*math.pi/math.pi) \n",
+ "V_01=4*V_s/(math.sqrt(2)*math.pi) \n",
+ "P_o=V_or**2/R \n",
+ "P_01=V_01**2/R \n",
+ "I_s=V_s/R \n",
+ "I_avg=I_s*math.pi/(2*math.pi) \n",
+ "V_03=V_01/3\n",
+ "HF=V_03/V_01 \n",
+ "V_oh=math.sqrt(V_or**2-V_01**2)\n",
+ "THD=V_oh/V_01 \n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of o/p voltage=%.0f V\" %V_or)\n",
+ "print(\"o/p power=%.0f W\" %P_o)\n",
+ "print(\"fundamental component of rms voltage=%.2f V\" %V_01)\n",
+ "print(\"fundamental freq o/p power=%.2f W\" %P_01) \n",
+ "print(\"peak current=%.0f A\" %I_s)\n",
+ "print(\"avg current of each transistor=%.0f A\" %I_avg)\n",
+ "print(\"peak reverse blocking voltage=%.0f V\" %V_s)\n",
+ "print(\"harmonic factor=%.4f\" %HF)\n",
+ "print(\"THD=%.4f\" %THD)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of o/p voltage=60 V\n",
+ "o/p power=1200 W\n",
+ "fundamental component of rms voltage=54.02 V\n",
+ "fundamental freq o/p power=972.68 W\n",
+ "peak current=20 A\n",
+ "avg current of each transistor=10 A\n",
+ "peak reverse blocking voltage=60 V\n",
+ "harmonic factor=0.3333\n",
+ "THD=0.4834\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.10 Page No 475"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=220.0\n",
+ "R=6.0\n",
+ "f=50.0\n",
+ "w=2*math.pi*f\n",
+ "L=0.03\n",
+ "C=180*10**-6\n",
+ "X_L=w*L\n",
+ "X_C=1/(w*C)\n",
+ "\n",
+ "#Calculations\n",
+ "V_or=math.sqrt(V_s**2*math.pi/math.pi)\n",
+ "V_01=4*V_s/(math.sqrt(2)*math.pi)\n",
+ "V_oh=math.sqrt(V_or**2-V_01**2)\n",
+ "THD=V_oh/V_01 \n",
+ "print(\"THD of voltage=%.4f\" %THD)\n",
+ "DF=V_01/V_or \n",
+ "Z1=math.sqrt(R**2+(X_L-X_C)**2)\n",
+ "phi1=-math.degrees(math.atan((X_L-X_C)/R))\n",
+ "Z3=math.sqrt(R**2+(X_L*3-X_C/3)**2)\n",
+ "phi3=math.degrees(math.atan((X_L*3-X_C/3)/R))\n",
+ "Z5=math.sqrt(R**2+(X_L*5-X_C/5)**2)\n",
+ "phi5=math.degrees(math.atan((X_L*5-X_C/5)/R))\n",
+ "Z7=math.sqrt(R**2+(X_L*7-X_C/7)**2)\n",
+ "phi7=math.degrees(math.atan((X_L*7-X_C/7)/R))\n",
+ "I_01=19.403\n",
+ "I_m1=4*V_s/(Z1*math.pi)\n",
+ "I_m3=4*V_s/(3*Z3*math.pi)\n",
+ "I_m5=4*V_s/(5*Z5*math.pi)\n",
+ "I_m7=4*V_s/(7*Z7*math.pi)\n",
+ "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2+I_m7**2)\n",
+ "I_or=I_m/math.sqrt(2)\n",
+ "I_oh=math.sqrt((I_m**2-I_m1**2)/2)\n",
+ "THD=I_oh/I_01 \n",
+ "DF=I_01/I_or \n",
+ "P_o=I_or**2*R \n",
+ "I_avg=P_o/V_s \n",
+ "t1=(180-phi1)*math.pi/(180*w) \n",
+ "t1=1/(2*f)-t1 \n",
+ "I_p=I_m1 \n",
+ "I_t1=.46135*I_p \n",
+ "\n",
+ "#Results\n",
+ "print(\"\\nDF=%.1f\" %DF)\n",
+ "print(\"THD of current=%.4f\" %THD) \n",
+ "print(\"DF=%.3f\" %DF)\n",
+ "print(\"load power=%.1f W\" %P_o)\n",
+ "print(\"avg value of load current=%.2f A\" %I_avg)\n",
+ "print(\"conduction time for thyristor=%.0f ms\" %(t1*1000))\n",
+ "print(\"conduction time for diodes=%.0f ms\" %(t1*1000))\n",
+ "print(\"peak transistor current=%.2f A\" %I_p)\n",
+ "print(\"rms transistor current=%.2f A\" %I_t1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "THD of voltage=0.4834\n",
+ "\n",
+ "DF=1.0\n",
+ "THD of current=0.1557\n",
+ "DF=0.988\n",
+ "load power=2313.5 W\n",
+ "avg value of load current=10.52 A\n",
+ "conduction time for thyristor=3 ms\n",
+ "conduction time for diodes=3 ms\n",
+ "peak transistor current=27.44 A\n",
+ "rms transistor current=12.66 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.11 Page No 497"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=450.0\n",
+ "R=10.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_or=math.sqrt((V_s/(3*R))**2*2/3+(2*V_s/(3*R))**2*1/3) \n",
+ "I_T1=math.sqrt((1/(2*math.pi))*((V_s/(3*R))**2*2*math.pi/3+(2*V_s/(3*R))**2*math.pi/3)) \n",
+ "P=3*I_or**2*R \n",
+ "I_or=math.sqrt((1/(math.pi))*((V_s/(2*R))**2*2*math.pi/3)) \n",
+ "I_T1=math.sqrt((1/(2*math.pi))*((V_s/(2*R))**2*2*math.pi/3)) \n",
+ "P=3*I_or**2*R \n",
+ "\n",
+ "#Results\n",
+ "print(\"for 180deg mode\")\n",
+ "print(\"rms value of load current=%.3f A\" %I_or)\n",
+ "print(\"power delivered to load=%.1f kW\" %(P/1000))\n",
+ "print(\"rms value of load current=%.0f A\" %I_T1)\n",
+ "print(\"for 120deg mode\")\n",
+ "print(\"rms value of load current=%.3f A\" %I_or)\n",
+ "print(\"rms value of load current=%.2f A\" %I_T1)\n",
+ "print(\"power delivered to load=%.3f kW\" %(P/1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for 180deg mode\n",
+ "rms value of load current=18.371 A\n",
+ "power delivered to load=10.1 kW\n",
+ "rms value of load current=13 A\n",
+ "for 120deg mode\n",
+ "rms value of load current=18.371 A\n",
+ "rms value of load current=12.99 A\n",
+ "power delivered to load=10.125 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.12, Page No 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "R=10.0\n",
+ "f=50.0\n",
+ "w=2*math.pi*f\n",
+ "L=0.03\n",
+ "\n",
+ "#Calculations\n",
+ "X_L=w*L\n",
+ "V_or=math.sqrt(V_s**2*math.pi/math.pi)\n",
+ "V_01=4*V_s/(math.sqrt(2)*math.pi)\n",
+ "Z1=math.sqrt(R**2+(X_L)**2)\n",
+ "phi1=-math.degrees(math.atan((X_L)/R))\n",
+ "Z3=math.sqrt(R**2+(X_L*3)**2)\n",
+ "phi3=math.degrees(math.atan((X_L*3)/R))\n",
+ "Z5=math.sqrt(R**2+(X_L*5)**2)\n",
+ "phi5=math.degrees(math.atan((X_L*5)/R))\n",
+ "Z7=math.sqrt(R**2+(X_L*7)**2)\n",
+ "phi7=math.degrees(math.atan((X_L*7)/R))\n",
+ "I_m1=4*V_s/(math.sqrt(2)*Z1*math.pi)\n",
+ "I_m3=4*V_s/(math.sqrt(2)*3*Z3*math.pi)\n",
+ "I_m5=4*V_s/(math.sqrt(2)*5*Z5*math.pi)\n",
+ "I_m7=4*V_s/(math.sqrt(2)*7*Z7*math.pi)\n",
+ "I_m=math.sqrt(I_m1**2+I_m3**2+I_m5**2+I_m7**2)\n",
+ "P=I_m**2*R \n",
+ "I_01=I_m1*math.sin(math.radians(45))\n",
+ "I_03=I_m3*math.sin(math.radians(3*45))\n",
+ "I_05=I_m5*math.sin(math.radians(5*45))\n",
+ "I_07=I_m7*math.sin(math.radians(7*45))\n",
+ "I_0=(I_01**2+I_03**2+I_05**2+I_07**2)\n",
+ "P=I_0*R \n",
+ "g=(180-90)/3+45/2\n",
+ "I_01=2*I_m1*math.sin(math.radians(g))*math.sin(math.radians(45/2))\n",
+ "I_03=2*I_m3*math.sin(math.radians(g*3))*math.sin(math.radians(3*45/2))\n",
+ "I_05=2*I_m5*math.sin(math.radians(g*5))*math.sin(math.radians(5*45/2))\n",
+ "I_07=2*I_m7*math.sin(math.radians(g*7))*math.sin(math.radians(7*45/2))\n",
+ "I_0=(I_01**2+I_03**2+I_05**2+I_07**2)\n",
+ "P=I_0*R \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"using square wave o/p\")\n",
+ "print(\"power delivered=%.2f W\" %P)\n",
+ "print(\"using quasi-square wave o/p\")\n",
+ "print(\"power delivered=%.2f W\" %P)\n",
+ "print(\"using two symmitrical spaced pulses\")\n",
+ "print(\"power delivered=%.2f W\" %P)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "using square wave o/p\n",
+ "power delivered=845.87 W\n",
+ "using quasi-square wave o/p\n",
+ "power delivered=845.87 W\n",
+ "using two symmitrical spaced pulses\n",
+ "power delivered=845.87 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.14, Page No 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "f=50.0\n",
+ "T=1/f\n",
+ "I=0.5\n",
+ "\n",
+ "#Calculations\n",
+ "di=I/T #di=di/dt\n",
+ "V_s=220.0\n",
+ "L=V_s/di \n",
+ "t=20*10**-6\n",
+ "fos=2 #factor of safety\n",
+ "t_c=t*fos\n",
+ "R=10\n",
+ "C=t_c/(R*math.log(2))\n",
+ "\n",
+ "#Results \n",
+ "print(\"source inductance=%.1f H\" %L)\n",
+ "print(\"commutating capacitor=%.2f uF\" %(C*10**6))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source inductance=8.8 H\n",
+ "commutating capacitor=5.77 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.15, Page No 539"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "R=10.0\n",
+ "L=.01\n",
+ "C=10*10**-6\n",
+ "#Calculations\n",
+ "if (R**2)<(4*L/C) :\n",
+ " print(\"ckt will commutate on its own\")\n",
+ "else:\n",
+ " print(\"ckt will not commutate on its own\")\n",
+ "\n",
+ "xie=R/(2*L)\n",
+ "w_o=1/math.sqrt(L*C)\n",
+ "w_r=math.sqrt(w_o**2-xie**2)\n",
+ "phi=math.degrees(math.atan(xie/w_r))\n",
+ "t=math.pi/w_r\n",
+ "V_s=1\n",
+ "v_L=V_s*(w_o/w_r)*math.exp(-xie*t)*math.cos(math.radians(180+phi))\n",
+ "v_c=V_s*(1-(w_o/w_r)*math.exp(-xie*t)*math.cos(math.radians(180-phi))) \n",
+ "di=V_s/L \n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"voltage across inductor(*V_s)=%.5f V\" %v_L) \n",
+ "print(\"voltage across capacitor(*V_s)=%.5f V\" %v_c)\n",
+ "print(\"di/dt*V_s (for t=0)=%.0f A/s\" %di)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ckt will commutate on its own\n",
+ "voltage across inductor(*V_s)=-0.60468 V\n",
+ "voltage across capacitor(*V_s)=1.60468 V\n",
+ "di/dt*V_s (for t=0)=100 A/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.16, Page No 540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "L=0.006\n",
+ "C=1.2*10**-6\n",
+ "R=100.0\n",
+ "\n",
+ "#Calculations\n",
+ "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n",
+ "T_off=0.2*10**-3\n",
+ "f=1/(2*(T+T_off)) \n",
+ "R=40\n",
+ "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n",
+ "T_off=.2*10**-3\n",
+ "f=1/(2*(T+T_off)) \n",
+ "R=140\n",
+ "T=math.pi/math.sqrt(1/(L*C)-(R/(2*L))**2)\n",
+ "T_off=.2*10**-3\n",
+ "f=1/(2*(T+T_off)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"o/p freq=%.2f Hz\" %f)\n",
+ "print(\"for R=40ohm\")\n",
+ "print(\"upper limit o/p freq=%.1f Hz\" %f)\n",
+ "print(\"for R=140ohm\")\n",
+ "print(\"lower limit o/p freq=%.1f Hz\" %f)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "o/p freq=239.81 Hz\n",
+ "for R=40ohm\n",
+ "upper limit o/p freq=239.8 Hz\n",
+ "for R=140ohm\n",
+ "lower limit o/p freq=239.8 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.17, Page No 540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "f=5000.0\n",
+ "w=2*math.pi*f\n",
+ "R=3.0\n",
+ "\n",
+ "#Calculations\n",
+ "L=60*10**-6\n",
+ "xie=R/(2*L)\n",
+ "C=7.5*10**-6\n",
+ "w_o=1/math.sqrt(L*C)\n",
+ "w_r=math.sqrt(w_o**2-xie**2)\n",
+ "t_c=math.pi*(1/w-1/w_r) \n",
+ "fos=1.5\n",
+ "t_q=10*10**-6\n",
+ "f_max=1/(2*math.pi*(t_q*fos/math.pi+1/w_r)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"ckt turn off time=%.2f us\" %(t_c*10**6))\n",
+ "print(\"max possible operating freq=%.1f Hz\" %f_max)\n",
+ " #Answers have small variations from that in the book due to difference in the rounding off of digits."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ckt turn off time=21.39 us\n",
+ "max possible operating freq=5341.4 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.18, Page No 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "a=30.0\n",
+ "R=10.0\n",
+ "P=5000.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))\n",
+ "V_ph=V_s/math.sqrt(3) \n",
+ "I_or=math.sqrt(P*R)\n",
+ "V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))\n",
+ "V_ph=V_s/math.sqrt(3) \n",
+ "\n",
+ "#Results\n",
+ "print(\"per phase voltage V_ph=%.3f V\" %V_ph) \n",
+ "print(\"for constant load current\")\n",
+ "print(\"V_ph=%.2f V\" %V_ph)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "per phase voltage V_ph=110.384 V\n",
+ "for constant load current\n",
+ "V_ph=110.38 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.19, Page No 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "t=20.0\n",
+ "fos=2.0 #factor of safety\n",
+ "\n",
+ "#Calculations\n",
+ "t_c=t*fos\n",
+ "n=1.0/3\n",
+ "R=20.0\n",
+ "C=n**2*t_c/(4*R*math.log(2)) \n",
+ "\n",
+ "#Results \n",
+ "print(\"value of capacitor=%.2f uF\" %C)\n",
+ " #printing mistake in the answer in book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of capacitor=0.08 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.20, Page No 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=220.0\n",
+ "V_p=math.sqrt(2)*V_s/3 \n",
+ "V_L=math.sqrt(3)*V_p \n",
+ "V_p1=math.sqrt(2)*V_s/math.pi \n",
+ "V_L1=math.sqrt(3)*V_p1 \n",
+ "V_oh=math.sqrt(V_L**2-V_L1**2)\n",
+ "\n",
+ "#Calculations\n",
+ "THD=V_oh/V_L1 \n",
+ "V_a1=2*V_s/math.pi\n",
+ "V_a5=2*V_s/(5*math.pi)\n",
+ "V_a7=2*V_s/(7*math.pi)\n",
+ "V_a11=2*V_s/(11*math.pi)\n",
+ "R=4.0\n",
+ "L=0.02\n",
+ "f=50\n",
+ "w=2*math.pi*f\n",
+ "Z1=math.sqrt(R**2+(w*L)**2)\n",
+ "Z5=math.sqrt(R**2+(5*w*L)**2)\n",
+ "Z7=math.sqrt(R**2+(7*w*L)**2)\n",
+ "Z11=math.sqrt(R**2+(11*w*L)**2)\n",
+ "I_a1=V_a1/Z1\n",
+ "I_a5=V_a5/Z5\n",
+ "I_a7=V_a7/Z7\n",
+ "I_a11=V_a11/Z11\n",
+ "I_or=math.sqrt((I_a1**2+I_a5**2+I_a7**2+I_a11**2)/2)\n",
+ "P=3*I_or**2*R \n",
+ "I_s=P/V_s \n",
+ "I_TA=I_s/3 \n",
+ " \n",
+ "#Results\n",
+ "print(\"rms value of phasor voltages=%.2f V\" %V_p)\n",
+ "print(\"rms value of line voltages=%.2f V\" %V_L)\n",
+ "print(\"fundamental component of phase voltage=%.3f V\" %V_p1)\n",
+ "print(\"fundamental component of line voltages=%.3f V\" %V_L1)\n",
+ "print(\"THD=%.7f\" %THD)\n",
+ "print(\"load power=%.1f W\" %P)\n",
+ "print(\"avg value of source current=%.3f A\" %I_s)\n",
+ "print(\"avg value of thyristor current=%.3f A\" %I_TA)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of phasor voltages=103.71 V\n",
+ "rms value of line voltages=179.63 V\n",
+ "fundamental component of phase voltage=99.035 V\n",
+ "fundamental component of line voltages=171.533 V\n",
+ "THD=0.3108419\n",
+ "load power=2127.6 W\n",
+ "avg value of source current=9.671 A\n",
+ "avg value of thyristor current=3.224 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/Chapter9_4.ipynb b/Power_Electronics_by_P_S_Bimbhra/Chapter9_4.ipynb new file mode 100755 index 00000000..052c4736 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/Chapter9_4.ipynb @@ -0,0 +1,388 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 09 : AC Voltage Controllers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1, Page No 560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=45.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_or=(V_m/2)*math.sqrt(1/math.pi*((2*math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n",
+ "R=20\n",
+ "I_or=V_or/R\n",
+ "P_o=I_or**2*R \n",
+ "I_s=I_or\n",
+ "VA=V_s*I_s\n",
+ "pf=P_o/VA \n",
+ "V_o=math.sqrt(2)*V_s/(2*math.pi)*(math.cos(math.radians(a))-1)\n",
+ "I_ON=V_o/R \n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of o/p voltage=%.3f V\" %V_or)\n",
+ "print(\"load power=%.1f W\" %P_o)\n",
+ "print(\"i/p pf=%.4f\" %pf)\n",
+ "print(\"avg i/p current=%.4f A\" %I_ON)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of o/p voltage=224.716 V\n",
+ "load power=2524.9 W\n",
+ "i/p pf=0.9770\n",
+ "avg i/p current=-0.7581 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2, Page No 560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=45.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_or=(V_s)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n",
+ "R=20\n",
+ "I_or=V_or/R\n",
+ "P_o=I_or**2*R \n",
+ "I_s=I_or\n",
+ "VA=V_s*I_s\n",
+ "pf=P_o/VA \n",
+ "I_TA=math.sqrt(2)*V_s/(2*math.pi*R)*(math.cos(math.radians(a))+1) \n",
+ "I_Tr=math.sqrt(2)*V_s/(2*R)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of o/p voltage=%.3f V\" %V_or)\n",
+ "print(\"load power=%.2f W\" %P_o)\n",
+ "print(\"i/p pf=%.2f\" %pf)\n",
+ "print(\"avg thyristor current=%.2f A\" %I_TA) \n",
+ "print(\"rms value of thyristor current=%.2f A\" %I_Tr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of o/p voltage=219.304 V\n",
+ "load power=2404.71 W\n",
+ "i/p pf=0.95\n",
+ "avg thyristor current=4.42 A\n",
+ "rms value of thyristor current=7.75 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3 Page No 564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "n=6.0 #on cycles\n",
+ "m=4.0 #off cycles\n",
+ "\n",
+ "#Calculations\n",
+ "k=n/(n+m)\n",
+ "V_or=V_s*math.sqrt(k) \n",
+ "pf=math.sqrt(k) \n",
+ "R=15\n",
+ "I_m=V_s*math.sqrt(2)/R\n",
+ "I_TA=k*I_m/math.pi\n",
+ "I_TR=I_m*math.sqrt(k)/2 \n",
+ " \n",
+ "#Results\n",
+ "print(\"rms value of o/ voltage=%.2f V\" %V_or)\n",
+ "print(\"i/p pf=%.2f\" %pf)\n",
+ "print(\"avg thyristor current=%.2f A\" %I_TA) \n",
+ "print(\"rms value of thyristor current=%.2f A\" %I_TR)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of o/ voltage=178.16 V\n",
+ "i/p pf=0.77\n",
+ "avg thyristor current=4.14 A\n",
+ "rms value of thyristor current=8.40 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4, Page No 569"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "R=3.0\n",
+ "\n",
+ "#Calculations\n",
+ "I_TAM1=2*V_m/(2*math.pi*R) \n",
+ "I_TRM2=V_m/(2*R) \n",
+ "f=50\n",
+ "w=2*math.pi*f\n",
+ "t_c=math.pi/w \n",
+ " \n",
+ "#Results\n",
+ "print(\"max value of avg thyristor current=%.3f A\" %I_TAM1)\n",
+ "print(\"max value of avg thyristor current=%.3f A\" %I_TRM2)\n",
+ "print(\"ckt turn off time=%.0f ms\" %(t_c*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "max value of avg thyristor current=34.512 A\n",
+ "max value of avg thyristor current=54.212 A\n",
+ "ckt turn off time=10 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5 Page No 575"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "R=3.0\n",
+ "X_L=4.0\n",
+ "\n",
+ "#Calculations\n",
+ "phi=math.degrees(math.atan(X_L/R)) \n",
+ "V_s=230\n",
+ "Z=math.sqrt(R**2+X_L**2)\n",
+ "I_or=V_s/Z \n",
+ "P=I_or**2*R \n",
+ "I_s=I_or\n",
+ "pf=P/(V_s*I_s) \n",
+ "I_TAM=math.sqrt(2)*V_s/(math.pi*Z) \n",
+ "I_Tm=math.sqrt(2)*V_s/(2*Z) \n",
+ "f=50\n",
+ "w=2*math.pi*f\n",
+ "di=math.sqrt(2)*V_s*w/Z \n",
+ "\n",
+ "#Results\n",
+ "print(\"min firing angle=%.2f deg\" %phi)\n",
+ "print(\"\\nmax firing angle=%.0f deg\" %180)\n",
+ "print(\"i/p pf=%.1f\" %pf)\n",
+ "print(\"max value of rms load current=%.0f A\" %I_or)\n",
+ "print(\"max power=%.0f W\" %P)\n",
+ "print(\"max value of avg thyristor current=%.3f A\" %I_TAM)\n",
+ "print(\"max value of rms thyristor current=%.3f A\" %I_Tm)\n",
+ "print(\"di/dt=%.0f A/s\" %di)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "min firing angle=53.13 deg\n",
+ "\n",
+ "max firing angle=180 deg\n",
+ "i/p pf=0.6\n",
+ "max value of rms load current=46 A\n",
+ "max power=6348 W\n",
+ "max value of avg thyristor current=20.707 A\n",
+ "max value of rms thyristor current=32.527 A\n",
+ "di/dt=20437 A/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6 Page No 576"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V=230.0\n",
+ "R=3.0 #ohm\n",
+ "X_L=5.0 #ohm\n",
+ "a=120.0 #firing angle delay\n",
+ "\n",
+ "#Calculations\n",
+ "phi=math.degrees(math.atan(X_L/R))\n",
+ "b=0\n",
+ "i=1\n",
+ "while (i>0) :\n",
+ " LHS=math.sin(math.radians(b-a))\n",
+ " RHS=math.sin(math.radians(a-phi))*math.exp(-(R/X_L)*(b-a)*math.pi/180)\n",
+ " if math.fabs(LHS-RHS)<= 0.01 :\n",
+ " B=b\n",
+ " i=2\n",
+ " break\n",
+ " \n",
+ " b=b+.1 \n",
+ "V_or=math.sqrt(2)*V*math.sqrt((1/(2*math.pi))*((B-a)*math.pi/180+(math.sin(math.radians(2*a))-math.sin(math.radians(2*B)))/2))\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print(\"Extinction angle=%.1f deg\" %B) #answer in the book is wrong as formulae for RHS is wrongly employed\n",
+ "print(\"rms value of output voltage=%.2f V\" %V_or) #answer do not match due to wrong B in book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Extinction angle=156.1 deg\n",
+ "rms value of output voltage=97.75 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.8, Page No 581"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "V_s=230.0\n",
+ "V_m=math.sqrt(2)*V_s\n",
+ "a=60.0\n",
+ "R=20.0\n",
+ "\n",
+ "#Calculations\n",
+ "V_or=math.sqrt((V_m**2/(2*math.pi))*(a*math.pi/180-math.sin(math.radians(2*a))/2)+(2*V_m**2/(math.pi))*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2)) \n",
+ "I_T1r=(V_m/R)*math.sqrt(1/math.pi*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2)) \n",
+ "I_T3r=(V_m/(2*R))*math.sqrt(1/math.pi*((a*math.pi/180)-math.sin(math.radians(2*a))/2)) \n",
+ "I1=math.sqrt(2)*I_T1r\n",
+ "I3=math.sqrt((math.sqrt(2)*I_T1r)**2+(math.sqrt(2)*I_T3r)**2)\n",
+ "r=V_s*(I1+I3) \n",
+ "P_o=V_or**2/R\n",
+ "pf=P_o/r \n",
+ "\n",
+ "#Results\n",
+ "print(\"rms value of o/p voltage=%.2f V\" %V_or)\n",
+ "print(\"rms value of current for upper thyristors=%.2f A\" %I_T1r)\n",
+ "print(\"rms value of current for lower thyristors=%.2f A\" %I_T3r)\n",
+ "print(\"t/f VA rating=%.2f VA\" %r)\n",
+ "print(\"i/p pf=%.2f\" %pf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rms value of o/p voltage=424.94 V\n",
+ "rms value of current for upper thyristors=14.59 A\n",
+ "rms value of current for lower thyristors=3.60 A\n",
+ "t/f VA rating=9631.61 VA\n",
+ "i/p pf=0.94\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter2_4.png b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter2_4.png Binary files differnew file mode 100755 index 00000000..9380fbcb --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter2_4.png diff --git a/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter3_4.png b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter3_4.png Binary files differnew file mode 100755 index 00000000..cef740d3 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter3_4.png diff --git a/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter4_4.png b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter4_4.png Binary files differnew file mode 100755 index 00000000..a1d64cf1 --- /dev/null +++ b/Power_Electronics_by_P_S_Bimbhra/screenshots/Chapter4_4.png diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter10_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter10_1.ipynb new file mode 100755 index 00000000..7ddfe56f --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter10_1.ipynb @@ -0,0 +1,101 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:076f20d31c3bb1bd9e8b8227097af625d385f1bb7f3b7a30dfedf3e414bce0c7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 Multiplexing and Demultiplexing"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1 Page no 368"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "BW_service = 860*10**6\n",
+ "BW_ch = 6.0*10**6\n",
+ "\n",
+ "#calculation\n",
+ "total_ch = BW_service/BW_ch\n",
+ "\n",
+ "#result\n",
+ "print\"Total number of channels are \",round(total_ch,0)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total number of channels are 143.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2 Page no 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "channels =16\n",
+ "sampling_rate= 3.5*10**3\n",
+ "w_len=6\n",
+ "\n",
+ "#Calculation\n",
+ "available_ch =channels-1\n",
+ "bpf =channels*w_len\n",
+ "data_rate = sampling_rate * bpf\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) Available channels are \",available_ch\n",
+ "print\"(b) Bits Per Frame = \",bpf\n",
+ "print\"(c) The serial data rate \",data_rate/10**3,\"Khz\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Available channels are 15\n",
+ "(b) Bits Per Frame = 96\n",
+ "(c) The serial data rate 336.0 Khz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter11_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter11_1.ipynb new file mode 100755 index 00000000..72e4d978 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter11_1.ipynb @@ -0,0 +1,143 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ac4273a5639d4b88e878e68a7a5f45b084fdf8a5c45c4bc6304c023f494f5c4d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 The Transmission of binary data in communication systems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page no 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "t=0.0016\n",
+ "No_words=256.0\n",
+ "bits_word = 12.0\n",
+ "\n",
+ "#Calculation\n",
+ "tword= t/No_words\n",
+ "tbit = tword/bits_word\n",
+ "bps =1/tbit\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The time duration of the word \",tword*10**8,\"microsecond\"\n",
+ "print\"(b) The time duration of the one bit is \",round(tbit*10**8,4),\"microseconds\"\n",
+ "print\"(c) The speed of transmission is \",bps/10**5,\"kbps\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The time duration of the word 625.0 microsecond\n",
+ "(b) The time duration of the one bit is 52.0833 microseconds\n",
+ "(c) The speed of transmission is 19.2 kbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page no 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "B=12.5*10**3\n",
+ "SN_dB= 25\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "C_th = 2*B\n",
+ "SN=316.2\n",
+ "C =B*3.32*log10(SN+1)\n",
+ "N= 2**(C/(2.0*B))\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The maximum theorotical data rate is \",C_th/10**3,\"kbps\"\n",
+ "print\"(b) The maximum theorotical capacity of channel is \",round(C/10**3,1),\"Kbps\"\n",
+ "print\"(c) The number of levels needed to acheive maximum speed are \",round(N,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The maximum theorotical data rate is 25.0 kbps\n",
+ "(b) The maximum theorotical capacity of channel is 103.8 Kbps\n",
+ "(c) The number of levels needed to acheive maximum speed are 17.78\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page no 430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "block =512\n",
+ "packets =8\n",
+ "BER = 2*10**-4\n",
+ " \n",
+ "#Calculation\n",
+ "avg_errors = block*packets*8*BER\n",
+ "\n",
+ "print\"Average number of errors are \",avg_errors\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average number of errors are 6.5536\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter12_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter12_1.ipynb new file mode 100755 index 00000000..09288512 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter12_1.ipynb @@ -0,0 +1,101 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:24e3c45fb7b4a00b042c526c50c49b4a5f07521c8d395e638826ab3ea2de6f29"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12 Introduction to Networking and local area networks"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1 Page no 448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "N = 20\n",
+ "\n",
+ "#Calculation\n",
+ "L = (N*(N-1))/2.0\n",
+ "\n",
+ "#Result\n",
+ "print\"The number of interconnecting wires required are \",L\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of interconnecting wires required are 190.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2 Page no 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "block = 1500\n",
+ "ethernet = 10.0*10**6\n",
+ "token_ring = 16.0*10**6\n",
+ "\n",
+ "#Calculation\n",
+ "t1_bit = 1/ethernet\n",
+ "t1_byte = 8*t1_bit\n",
+ "t1_1526 = 1526 *t1_byte\n",
+ "t2_bit = 1/token_ring\n",
+ "t2_byte = 8 * t2_bit\n",
+ "t2_1521 =1521*t2_byte\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) Time required for 1526 bytes is \",t1_1526*10**6,\"ns\"\n",
+ "print\"(b) Time required for 1521 bytes is \",t2_1521*10**3,\"ms\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Time required for 1526 bytes is 1220.8 ns\n",
+ "(b) Time required for 1521 bytes is 0.7605 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter13_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter13_1.ipynb new file mode 100755 index 00000000..a0657cff --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter13_1.ipynb @@ -0,0 +1,339 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0554007e74bfe6cdd53136e8f25769048ad21412148cdd192396d4befa058e18"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13 Transmission lines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.1 Page no 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f= 450.0*10**6\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 984/f\n",
+ "len =0.1*lamda\n",
+ "\n",
+ "#Result\n",
+ "print\"feet long conductors would be considered as the transmission line \",round(len*10**6,3),\"ft\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feet long conductors would be considered as the transmission line 0.219 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.2 Page no 484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "lamda = 2.19\n",
+ "\n",
+ "#Calculation\n",
+ "len = (3/8.0)*lamda\n",
+ "\n",
+ "#Result\n",
+ "print\"The pyhsical length of the transmission line \",round(len,2),\"feet\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pyhsical length of the transmission line 0.82 feet\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.3 Page no 492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "len = 165\n",
+ "attn_100ft = 5.3\n",
+ "pin = 100\n",
+ "attn_ft = 5.3/100.0\n",
+ "\n",
+ "#Calculation\n",
+ "total_attn = attn_ft * len\n",
+ "pout = pin *0.1335\n",
+ "\n",
+ "#Result\n",
+ "print\"The total attenuation of the cable is \",total_attn,\"dB\"\n",
+ "print\"Output power is \",pout,\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total attenuation of the cable is 8.745 dB\n",
+ "Output power is 13.35 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.4 Page no 494"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "len =150\n",
+ "C =13.5\n",
+ "Z0 =93\n",
+ "f =2.5*10**6\n",
+ "attn_100ft =2.8\n",
+ "\n",
+ "#Calculation\n",
+ "L =C*Z0**2\n",
+ "td =(L*C)**0.5\n",
+ "theta = ((360)*188.3)/(1/f)\n",
+ "attn_ft = attn_100ft/100.0\n",
+ "total_attn = attn_ft*150\n",
+ "\n",
+ "print\"(a) The load impedance required to terminate the the line to avoid the reflections is %d ohm\",Z0\n",
+ "print\"(b) The equivalent inductance per feet is \",L/10**3,\"nh\"\n",
+ "print\"(c) The time delay introduced by the cable per feet is \",td/10**3,\"ns\"\n",
+ "print\"(d) The phase shift occurs in degrees for the 2.5 Mhz sine wave is \",theta/10**9\n",
+ "print\"(e) The total attenuation is \",total_attn,\"db\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The load impedance required to terminate the the line to avoid the reflections is %d ohm 93\n",
+ "(b) The equivalent inductance per feet is 116.7615 nh\n",
+ "(c) The time delay introduced by the cable per feet is 1.2555 ns\n",
+ "(d) The phase shift occurs in degrees for the 2.5 Mhz sine wave is 169.47\n",
+ "(e) The total attenuation is 4.2 db\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.5 Page no 501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "vmax= 52.0\n",
+ "vmin= 17.0\n",
+ "Z0 = 75\n",
+ "\n",
+ "#calculation\n",
+ "SWR = vmax/vmin\n",
+ "ref_coeff = (vmax-vmin)/(vmax+vmin)\n",
+ "Zl1 = Z0*SWR\n",
+ "Zl2 = Z0/SWR\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The standing wave ratio is \",round(SWR,2)\n",
+ "print\"(b) Reflection coefficient is \",round(ref_coeff,2)\n",
+ "print\"The value of resistive load is \",round(Zl1,2),\"ohm or\",round(Zl2,2),\"ohm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The standing wave ratio is 3.06\n",
+ "(b) Reflection coefficient is 0.51\n",
+ "The value of resistive load is 229.41 ohm or 24.52 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.6 Page no 503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "SWR =3.05\n",
+ "ref_pwr =0.2562\n",
+ "pin =30\n",
+ "\n",
+ "#calculation\n",
+ "pout = pin -(pin*((SWR-1)/(SWR+1))**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"The output power of the cable is \",round(pout,3),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output power of the cable is 22.314 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.7 Page no 508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "C =4*10**-12\n",
+ "f =800*10**6\n",
+ "diele = 3.5\n",
+ "h = 0.0625\n",
+ "w = 0.13\n",
+ "t = 0.002\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "Z0 = 38.8*math.log(0.374/0.106)\n",
+ "Xc = 1/(6.28*f*C)\n",
+ "\n",
+ "#Result\n",
+ "print\"The charecteristics impedance of the transmission line is \",round(Z0,1),\"ohm\"\n",
+ "print\"The reactance of the capacitor is \",round(Xc,2),\"ohm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The charecteristics impedance of the transmission line is 48.9 ohm\n",
+ "The reactance of the capacitor is 49.76 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.8 Page no 508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "lamda = (984/800.0)\n",
+ "lamda_8 =lamda/8.0\n",
+ "\n",
+ "#Calculation\n",
+ "len = lamda_8*12*(1/3.6**0.5)\n",
+ "\n",
+ "#Result\n",
+ "print\"The length of the transmission line is \",round(len,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of the transmission line is 0.972\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter14_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter14_1.ipynb new file mode 100755 index 00000000..eb757247 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter14_1.ipynb @@ -0,0 +1,229 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:8f9093920b7d1b010ea79cdf7fde78edb0be4df7ea34f4ae2c0023eb64d7b5d4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14 Antennas and Wave Propogation"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.1 page no 544"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f=310.0*10**6\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "len1 =(492*0.97)/f\n",
+ "len2 =(492/f)*0.8\n",
+ "len3 =(984/f)*0.73\n",
+ "z1 =120*log(35/2.0)\n",
+ "len4 =234/f\n",
+ "z2 = 73/2.0\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The length and radiation resistance of the dipole are \",round(len1*10**6,2),\"feet and 73 ohm respectively\"\n",
+ "print\"(b) The length of the folded dipole are \",round(len2*10**6,2),\"feet\"\n",
+ "print\"(c) The length and radiation resistance of the bow tie antenna are \",round(len3*10**6,1),\"feet and \",round(z1,1),\"ohm respectively\"\n",
+ "print\"(d) The length and radiation resistance of the groun plane antenna are \",round(len4*10**6,3),\"feet and\",z2,\"ohmrespectively\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The length and radiation resistance of the dipole are 1.54 feet and 73 ohm respectively\n",
+ "(b) The length of the folded dipole are 1.27 feet\n",
+ "(c) The length and radiation resistance of the bow tie antenna are 2.3 feet and 343.5 ohm respectively\n",
+ "(d) The length and radiation resistance of the groun plane antenna are 0.755 feet and 36.5 ohmrespectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.2 Page no 553"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "gain=14\n",
+ "len=250\n",
+ "attn_100=3.6\n",
+ "f =220*10\n",
+ "pin =50\n",
+ "p =0.126\n",
+ "\n",
+ "#Calculation\n",
+ "pout =pin*p\n",
+ "line_loss =pin-pout\n",
+ "pwr_ratio = 25.1\n",
+ "ERP = pwr_ratio*pout\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The transmission line loss is \",line_loss\n",
+ "print\"(b) Effective raduated power is \",round(ERP,1),\"W\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The transmission line loss is 43.7\n",
+ "(b) Effective raduated power is 158.1 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.3 Page no 556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Z0 =50\n",
+ "Zl =172\n",
+ "f =460.0*10**6\n",
+ "VF =0.86\n",
+ "\n",
+ "#Calculation\n",
+ "len =(246/f)*VF\n",
+ "\n",
+ "#Result\n",
+ "print\"The length of the impedance matching section needed for the Q section is \",round(len*10**6,2),\"feet\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of the impedance matching section needed for the Q section is 0.46 feet\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.4 Page no 557"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f = 460.0*10**6\n",
+ "VF = 0.66\n",
+ "\n",
+ "#Calculation\n",
+ "len = (246/f)*VF\n",
+ "\n",
+ "#Result \n",
+ "print\"The length of impedance matching section is \",round(len*10**6,3),\"feet\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of impedance matching section is 0.353 feet\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.5 Page no 567"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "ht =275\n",
+ "hr =60\n",
+ "f=224.0*10**6\n",
+ "pt=100\n",
+ "Gt = 26\n",
+ "Gr = 3.27\n",
+ "\n",
+ "#Calculation\n",
+ "D =((2*ht)**0.5+(2*hr)**0.5)*1.61\n",
+ "lamda = 300/f\n",
+ "Pr = (pt*Gt*Gr*lamda**2)/(16*3.14**2*D**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The maximmum transmitting distance is \",round(D,1),\"kilometer\"\n",
+ "print\"The received power is \",round(Pr*10**15,1),\"nW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The maximmum transmitting distance is 55.4 kilometer\n",
+ "The received power is 31.5 nW\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter16_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter16_1.ipynb new file mode 100755 index 00000000..01f25016 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter16_1.ipynb @@ -0,0 +1,217 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:549348f6567319d4a861893116b77bd50ff6991f4ba0e1a8c927cf50abf21c3e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16 Microwave communication"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.1 Page no 616"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Zsrc =50\n",
+ "Zld =136\n",
+ "f =5800.0*10**6\n",
+ "Er =2.4\n",
+ "\n",
+ "#Calculation\n",
+ "Zq =(Zsrc * Zld)**0.5\n",
+ "Vp =1/(Er)**0.5\n",
+ "lamda = 300/f\n",
+ "len = (lamda/4.0)*38.37*Vp\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The required impedance is \",round(Zq,2),\"ohm\"\n",
+ "print\"(b) The length of the microstrip \",round(len*10**6,2),\"inches\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The required impedance is 82.46 ohm\n",
+ "(b) The length of the microstrip 0.32 inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.2 Page no 623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "w=0.65\n",
+ "h=0.38\n",
+ "\n",
+ "#Calculation\n",
+ "fco = 300/(2.0*((0.65*2.54)/100.0))\n",
+ "f =1.42*fco\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The cutoff frequency of the \",round(fco/10**3,3),\"GHz\"\n",
+ "print\"(b) Operating frequency of the wavwguide is \",round(f/10**3,1),\"GHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The cutoff frequency of the 9.085 GHz\n",
+ "(b) Operating frequency of the wavwguide is 12.9 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.3 Page no 623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#for the above question\n",
+ "print\"The c band is approximately 4 to 6 Ghz since a waveguide acts as a high pass filter with cut off of 9.08 Ghz it will not pass c band signal\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The c band is approximately 4 to 6 Ghz since a waveguide acts as a high pass filter with cut off of 9.08 Ghz it will not pass c band signal\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.4 Page no 648"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "lamda1 =5.0\n",
+ "f2 = 15.0*10**9\n",
+ "D=1.524\n",
+ "\n",
+ "#Calculation\n",
+ "f1=984/lamda1\n",
+ "lamda2 =300/f2\n",
+ "G = (6*(D/lamda2)**2)\n",
+ "B = 70/(D/lamda2)\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The lowest possible oprerating frequency is \",f1,\"MHz\"\n",
+ "print\"(b) The gain at 15 Ghz is \",G/10**12\n",
+ "print\"(c) The beam width at 15Ghz is \",round(B*10**6,2),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The lowest possible oprerating frequency is 196.8 MHz\n",
+ "(b) The gain at 15 Ghz is 34838.64\n",
+ "(c) The beam width at 15Ghz is 0.92 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.5 Page no 661"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "T = 9.2\n",
+ "theta = 20\n",
+ "sin20 = 0.342\n",
+ "a=5280\n",
+ "\n",
+ "#Calculation\n",
+ "D_nautical = T/12.36\n",
+ "D_statute =D_nautical*0.87\n",
+ "A = D_statute*0.342\n",
+ "A1=A*a\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The line of distance to the aircraft in the statute miles \",round(D_statute,3)\n",
+ "print\"(b) The altitude of the aircraft is \",A1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.221469902913\n",
+ "(a) The line of distance to the aircraft in the statute miles 0.648\n",
+ "(b) The altitude of the aircraft is 1169.36108738\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter17_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter17_1.ipynb new file mode 100755 index 00000000..cced69ab --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter17_1.ipynb @@ -0,0 +1,142 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1fcf40b444ffe01cf0b970d987135c0a701705380b8393b58911739ca6b5af8f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapeter 17 Satellite communication"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.1 Page no 678"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "stn_long = 95\n",
+ "stn_lat = 30\n",
+ "sat_long =121\n",
+ "rad_pos = 137\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "azimuth = 360-rad_pos\n",
+ "\n",
+ "#Result\n",
+ "print\"The elevation setting for the antenna is 45 degree\"\n",
+ "print\"The azimuth setting for the antenna is \",azimuth,\"degree\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The elevation setting for the antenna is 45 degree\n",
+ "The azimuth setting for the antenna is 223 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.2 Page no 681"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "flo = 2*10**9\n",
+ "fd =3840*10**6\n",
+ "B =36*10**6\n",
+ "\n",
+ "#Calculation\n",
+ "fu =fd+flo\n",
+ "C =2*B\n",
+ "\n",
+ "#Result\n",
+ "print\"The uplink frequency is \",fu/10.0**9,\"GHz\"\n",
+ "print\"The data rate is \", C/10**6,\"Mbps\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The uplink frequency is 5.84 GHz\n",
+ "The data rate is 72 Mbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.3 Page no 691"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "fs = 4.08*10**9\n",
+ "fIF1 = 770*10**6\n",
+ "fIF2 = 140*10**6\n",
+ "\n",
+ "#Calculation\n",
+ "flo1 = fs - fIF1\n",
+ "flo2 = fIF1 - fIF2\n",
+ "\n",
+ "#Result\n",
+ "print\"The local oscillator frequency for first IF is \",flo1/10**6,\"MHz\"\n",
+ "print\"The local oscillator frequency for the second IF is \",flo2/10**6,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The local oscillator frequency for first IF is 3310.0 MHz\n",
+ "The local oscillator frequency for the second IF is 630 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter19_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter19_1.ipynb new file mode 100755 index 00000000..a9b84b67 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter19_1.ipynb @@ -0,0 +1,128 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7e3bc9cbae38bb1fde7396ff7ff501e2e792199bc6ea4d5bd63e700cc726cfd6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 19 Optical communication"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.1 Page no 760"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "NA = 0.29\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "critical_angle = math.asin(0.29)*180/3.14\n",
+ "\n",
+ "print\"The critical angle is \",round(critical_angle,2),\"degree\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The critical angle is 16.87 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.2 Page no 767"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "B_rating_Mhzkm =600*10**6\n",
+ "len_ft=500\n",
+ "\n",
+ "#Calculation\n",
+ "bandwidth = B_rating_Mhzkm/(len_ft/3274.0)\n",
+ "\n",
+ "#Result\n",
+ "print\"The bandwidth of the 500 feetr segment of the cable is \",bandwidth/10**6,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The bandwidth of the 500 feetr segment of the ccable is 3928.8 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.3 Page no 780"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "R=43*10**6\n",
+ "D=1200/3274.0\n",
+ "\n",
+ "#Calculation\n",
+ "d=1/(5.0*R*D)\n",
+ "\n",
+ "#Result\n",
+ "print\"The dispersion factor is \",round(d*10**9,1),\"ns/km\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The dispersion factor is 12.7 ns/km\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter1_1.ipynb index 48b042da..48b042da 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter1.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter1_1.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter3_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter3_1.ipynb new file mode 100755 index 00000000..ddf30c24 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter3_1.ipynb @@ -0,0 +1,331 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:85b158cea1a60588125a433baf8a8e61131cf8432c25ac46bd61066878c52a4c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 Amplitude modulation fundamentals"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 page no 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Vmax = 5.9\n",
+ "Vmin = 1.2\n",
+ "\n",
+ "#Calculation\n",
+ "m = (Vmax-Vmin)/(Vmax+Vmin)\n",
+ "Vc = (Vmax+Vmin)/2.0\n",
+ "Vm = (Vmax-Vmin)/2.0\n",
+ "m = Vm/Vc\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The modulation index is \",round(m,2)\n",
+ "print\"Vc= \",Vc,\"Vm= \",Vm,\"(for 2 volt/div on verticle scale)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The modulation index is 0.66\n",
+ "Vc= 3.55 Vm= 2.35 (for 2 volt/div on verticle scale)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2 page no 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "frq =980*10**3\n",
+ "frq_range = 5*10**3\n",
+ "\n",
+ "#Calculation\n",
+ "fusb = frq+frq_range\n",
+ "flsb = frq-frq_range\n",
+ "bw=fusb-flsb\n",
+ "\n",
+ "#Result\n",
+ "print\"The upper sideband is at \",fusb/10**3,\"Khz\"\n",
+ "print\"Lower sideband is at \",flsb/10**3,\"Khz\"\n",
+ "print\"the babdwidth is \",bw/10**3,\"KHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The upper sideband is at 985 Khz\n",
+ "Lower sideband is at 975 Khz\n",
+ "the babdwidth is 10 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3 page no 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Pc = 30\n",
+ "m=0.85\n",
+ "\n",
+ "#Calculation\n",
+ "Pt = Pc*(1+ (m**2/2.0))\n",
+ "Psb_both =Pt-Pc\n",
+ "Psb_one = Psb_both/2.0\n",
+ "\n",
+ "#Result\n",
+ "print\"The total power is \",round(Pt,1),\"watt\" \n",
+ "print\"The power in one sideband is \",round(Psb_one,1),\"Watt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total power is 40.8 watt\n",
+ "The power in one sideband is 5.4 Watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4 page no 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "R = 40\n",
+ "I = 4.8\n",
+ "m=0.9\n",
+ "\n",
+ "#Calculation\n",
+ "Pc = I**2*R\n",
+ "Pt = (I*(1+(m**2/2.0))**0.5)**2*R\n",
+ "Psb = Pt-Pc\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The carrier power is \",Pc,\" watt\"\n",
+ "print\"(b) Total power = \",round(Pt,0),\"watt\"\n",
+ "print\"(c) Sideband Power = \",round(Psb,1),\"watt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The carrier power is 921.6 watt\n",
+ "(b) Total power = 1295.0 watt\n",
+ "(c) Sideband Power = 373.2 watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5 page no 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "It = 5.1\n",
+ "Ic =4.8\n",
+ "\n",
+ "#Calculation\n",
+ "m=(2*((It/Ic)**2-1))**0.5\n",
+ "\n",
+ "#Result\n",
+ "print\"The percentage of modulation is \",round(m*100,0)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage of modulation is 51.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6 page no 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "m = 0.9\n",
+ "Pc = 921.6\n",
+ "\n",
+ "#calculation\n",
+ "Psb = (m**2*Pc)/4.0\n",
+ "\n",
+ "#Result\n",
+ "print\"The power in one sideband \",round(Psb,1),\"Watt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power in one sideband 186.6 Watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7 page no 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Vpp = 178\n",
+ "R = 75.0\n",
+ "\n",
+ "#Calculation\n",
+ "Vp =Vpp/2.0\n",
+ "Vrms = 0.707*Vp\n",
+ "PEP =(Vrms**2/R)\n",
+ "\n",
+ "#Result\n",
+ "print\"The peak envelop power is \", round(PEP,1),\"Watt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The peak envelop power is 52.8 Watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8 page no 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Vs =24\n",
+ "Im =9.3\n",
+ "\n",
+ "#Calculation\n",
+ "PEP = Vs*Im \n",
+ "Pavg1 = PEP/3.0\n",
+ "Pavg2 = PEP/4.0\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The peak envelope power is \",PEP,\"watt\"\n",
+ "print\"(b) Average power of transmitter is \",Pavg2,\"watt to\",Pavg1,\"watt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The peak envelope power is 223.2 watt\n",
+ "(b) Average power of transmitter is 55.8 watt to 74.4 watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter4_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter4_1.ipynb new file mode 100755 index 00000000..45832f38 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter4_1.ipynb @@ -0,0 +1,123 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:560b11fe692ef5f7a898cfb445cca26656fbac5b17b2ed8f9a6482b6e6d61c60"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "chapter 4 Amplitude Modulator and Demodulator circuits"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page no 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "\n",
+ "Vcc =48\n",
+ "I = 3.5\n",
+ "efficiency =70 #percent\n",
+ "modulation = 67 #percent\n",
+ "m = modulation/100.0\n",
+ "#calculation\n",
+ "\n",
+ "Pi = Vcc*I\n",
+ "Pc=Pi\n",
+ "Pm = Pi/2.0\n",
+ "Pout = (efficiency*Pi)/100.0\n",
+ "Ps = Pc*((m**2)/4.0)\n",
+ "maximum_swing = 2*Vcc \n",
+ "#Result\n",
+ "\n",
+ "print \"(a) RF input power to the output stage is \",Pi,\"W\"\n",
+ "print \"(b) AF power required for 100 percent modulation is \",Pm,\"W\"\n",
+ "print \"(c) Carrier output power is \",Pout,\"W\"\n",
+ "print \"(d) Power in one sideband for 67 percent modulation is \",round(Ps,2),\"W\"\n",
+ "print \"(e) maximum and minimum dc supply voltage swing with 100 percent modulation is \",maximum_swing,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) RF input power to the output stage is 168.0 W\n",
+ "(b) AF power required for 100 percent modulation is 84.0 W\n",
+ "(c) Carrier output power is 117.6 W\n",
+ "(d) Power in one sideband for 67 percent modulation is 18.85 W\n",
+ "(e) maximum and minimum dc supply voltage swing with 100 percent modulation is 96 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2 Page no 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "\n",
+ "fc =4.2*10**6\n",
+ "f1 = 300\n",
+ "f2 = 3400\n",
+ "#calculation\n",
+ "#upper sideband\n",
+ "\n",
+ "x0=fc+f1\n",
+ "y0=fc+f2\n",
+ "#lower sideband\n",
+ "\n",
+ "x1=fc-f1\n",
+ "y1=fc-f2\n",
+ "frequency=(x1+y1)/2.0\n",
+ "#Result \n",
+ "\n",
+ "print \"(a) Upper sideband ranges from \",x0,\"to\",y0\n",
+ "print \" lower sideband ranges from \",x1,\"to\",y1\n",
+ "print \"(b) approximate center frequency of a bandpass filter is \",frequency,\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Upper sideband ranges from 4200300.0 to 4203400.0\n",
+ " lower sideband ranges from 4199700.0 to 4196600.0\n",
+ "(b) approximate center frequency of a bandpass filter is 4198150.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter5_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter5_1.ipynb new file mode 100755 index 00000000..c8ec456c --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter5_1.ipynb @@ -0,0 +1,253 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b01da4319cdb7c7c68bb5f48bf424b751928ca20873effe336ae7e4a6e7ae82d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 Fundamentals of frequency modulation"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page no 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f = 915*10**6\n",
+ "fm_deviation =12.5*10**3\n",
+ "\n",
+ "#Calculation\n",
+ "max_deviation = f + fm_deviation\n",
+ "min_deviation = f - fm_deviation\n",
+ "\n",
+ "#Result\n",
+ "print\"Maximum frequency occur during modulation is \",max_deviation/1000.0,\"KHz\"\n",
+ "print\"Minimum frequency occur during modulation is \",min_deviation/1000.0,\"KHz\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum frequency occur during modulation is 915012.5 KHz\n",
+ "Minimum frequency occur during modulation is 914987.5 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page no 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "max_deviation = 25*10**3\n",
+ "fm =15.0*10**3\n",
+ "\n",
+ "#Calculation\n",
+ "mf =max_deviation/fm\n",
+ "\n",
+ "#Result\n",
+ "print\"The deviation ratio of the TV sound is \",round(mf,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The deviation ratio of the TV sound is 1.667\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page no 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "mf = 2.2\n",
+ "fd = 7.48*10**3\n",
+ "\n",
+ "#Calculation\n",
+ "fm = fd/mf\n",
+ "\n",
+ "#Result\n",
+ "print\"The maximum modulating frequency is \",fm/1000.0,\"KHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum modulating frequency is 3.4 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page no 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "J0 = -0.4\n",
+ "J1 = -0.07\n",
+ "J2 = 0.36\n",
+ "J3 = 0.43\n",
+ "J4 = 0.28\n",
+ "\n",
+ "#Result\n",
+ "print\"The amplitude of the carrier is \",J0\n",
+ "print\"Amplitudes of the first four sidebands are \",\" \\n \", J1,\"\\n \",J2,\"\\n \",J3,\"\\n \",J4\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amplitude of the carrier is -0.4\n",
+ "Amplitudes of the first four sidebands are \n",
+ " -0.07 \n",
+ " 0.36 \n",
+ " 0.43 \n",
+ " 0.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page no 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "fd = 30*10**3\n",
+ "fm = 5*10**3\n",
+ "N=9\n",
+ "\n",
+ "#Calculation\n",
+ "bw1 = 2*fm*N\n",
+ "bw2 = 2*(fd+fm)\n",
+ "\n",
+ "#Result\n",
+ "print\"The maximum bandwidth of the fm signal is \",bw1/10**3,\"KHz\"\n",
+ "print\"Bandwidth using carson's rule \",bw2/10**3,\"KHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum bandwidth of the fm signal is 90 KHz\n",
+ "Bandwidth using carson's rule 70 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page no 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "S_N = 2.8\n",
+ "fm = 1.5*10**3\n",
+ "fd =4*10**3\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "fi= math.asin(1/S_N)\n",
+ "delta = fi*fm\n",
+ "SN =fd/delta\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The frequency deviation caused by the noise \",round(delta,1),\"Hz\"\n",
+ "print\"(b) The improved output signal to noise ratio is \",round(SN,1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The frequency deviation caused by the noise 547.8 Hz\n",
+ "(b) The improved output signal to noise ratio is 7.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter6_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter6_1.ipynb new file mode 100755 index 00000000..582984c5 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter6_1.ipynb @@ -0,0 +1,148 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:8aef1c332f2a49ead17fadd51ccfa9b15c7423655061dea702b72eda65234123"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 FM Circuits"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1 Page no 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Vc =40*10**-12\n",
+ "c = 20*10**-12\n",
+ "f0 = 5.5*10**6\n",
+ "Ct = Vc+c\n",
+ "\n",
+ "#Calculation\n",
+ "L = 1/((6.28*f0)**2*Ct)\n",
+ "\n",
+ "#Result\n",
+ "print\"The value of the inductance is \",round(L*10**6,0),\"microhenry\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of the inductance is 14.0 microhenry\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page no 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f=168.96*10**6\n",
+ "multiplier=24.0\n",
+ "deviation = 5*10**3\n",
+ "fm = 2.8*10**3\n",
+ "\n",
+ "#Calculation\n",
+ "f0 =f/multiplier\n",
+ "fd= deviation/multiplier\n",
+ "phaseshift = fd/fm\n",
+ "phaseshift_degrees = phaseshift*57.3\n",
+ "total_phaseshift =2*phaseshift_degrees\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The crystal oscillator frequency is \",f0/10**6,\"MHz\"\n",
+ "print\"(b) The total phase shift is \",round(total_phaseshift,3),\"degree\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The crystal oscillator frequency is 7.04 MHz\n",
+ "(b) The total phase shift is 8.527 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page no 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "R =1*10**3\n",
+ "phaseshift =4.263\n",
+ "phaseshift_center= 45\n",
+ "f =7.04*10**6\n",
+ "\n",
+ "#Calculation\n",
+ "phase_l = phaseshift_center - phaseshift\n",
+ "phase_u = phaseshift_center + phaseshift\n",
+ "phaserange_total = phase_u - phase_l\n",
+ "Xc1 = 1161\n",
+ "C1 = 1/(6.28*f*Xc1)\n",
+ "Xc2 = 861\n",
+ "C2 = 1/(6.28*f*Xc2)\n",
+ "\n",
+ "#Result\n",
+ "print\"The two values of the capacitance to achieve total deviation are \",round(C1*10**12,1),\"pf to\",round(C2*10**12,1),\"pf\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The two values of the capacitance to achieve total deviation are 19.5 pf to 26.3 pf\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter7_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter7_1.ipynb new file mode 100755 index 00000000..76d26d6f --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter7_1.ipynb @@ -0,0 +1,221 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d48f2ded6acd9d37d6695ba84fcf6540c7d0d4380b8041338a946e9bf63a999c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 Digital communication techniques"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1 Page no 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "t = 71.4*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "f = 1/t\n",
+ "fourth_harmonic = f*4\n",
+ "min_sampling = 2*fourth_harmonic\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The frequency of the signal is \",round(f/10**3,1),\"KHz\"\n",
+ "print\"(b) The fourth harmonic is \",round(fourth_harmonic/10**3,0),\"KHz\"\n",
+ "print\"(c) Minimum sampling rate is \",round(min_sampling/10**3,0),\"KHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The frequency of the signal is 14.0 KHz\n",
+ "(b) The fourth harmonic is 56.0 KHz\n",
+ "(c) Minimum sampling rate is 112.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2 Page no 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "N = 14\n",
+ "discrete_levels = 2.0**N\n",
+ "\n",
+ "#Calculation\n",
+ "num_vltg_inc =2**N-1\n",
+ "resolution = 12/discrete_levels \n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The numbedr of discrete levels that are represented using N number of bits are \",discrete_levels\n",
+ "print\"(b) the number odf voltage increments required to divide the voltage range are \",num_vltg_inc\n",
+ "print\"(c) Resolution of the digitization \",round(resolution*10**6,2),\"microvolt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The numbedr of discrete levels that are represented using N number of bits are 16384.0\n",
+ "(b) the number odf voltage increments required to divide the voltage range are 16383\n",
+ "(c) Resolution of the digitization 732.42 microvolt\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3 Page no 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "N =12\n",
+ "SINAD1=78\n",
+ "\n",
+ "#Calculation\n",
+ "SINAD2 = 6.02*N + 1.76\n",
+ "ENOB =(SINAD1 -1.76)/6.02\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The SINAD for 12 bit convertre is \",SINAD2,\"db\"\n",
+ "print\"(b) The ENOB for the converter with SINAD of 78 dB is \",round(ENOB,2),\"bits\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The SINAD for 12 bit convertre is 74.0 db\n",
+ "(b) The ENOB for the converter with SINAD of 78 dB is 12.66 bits\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 Page no 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Gievn\n",
+ "Vm = 1.0\n",
+ "Vin = 0.25\n",
+ "mu =255\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)\n",
+ "gain =Vout/Vin\n",
+ "\n",
+ "#Result\n",
+ "print\"The output voltage of the compander \",round(Vout,2),\"volt\"\n",
+ "print\"Gain of the compander is \",round(gain,0)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output voltage of the compander 0.75 volt\n",
+ "Gain of the compander is 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5 Page no 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Vin = 0.8\n",
+ "Vm =1.0\n",
+ "mu =255\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "Vout = (Vm*math.log(1+mu*(Vin/Vm)))/math.log(1+mu)\n",
+ "gain =Vout/Vin\n",
+ "\n",
+ "#Result\n",
+ "print\"The output voltage of the compander \",round(Vout,1),\"volt\"\n",
+ "print\"Gain of the compander is \",round(gain,1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output voltage of the compander 1.0 volt\n",
+ "Gain of the compander is 1.2\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter8_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter8_1.ipynb new file mode 100755 index 00000000..0c719a4a --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter8_1.ipynb @@ -0,0 +1,185 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:332fc501ed656c58460b6801381c21fa2c1eceb5892236956abe916f97a807b7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 Radio transmitters"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1 Page no 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f = 16*10**6\n",
+ "ppm = 200\n",
+ "frequency_variation = 200 *16 \n",
+ "\n",
+ "#Calculation\n",
+ "min_f = f - frequency_variation\n",
+ "max_f = f + frequency_variation\n",
+ "\n",
+ "#Reslt\n",
+ "print\"The minimum and maximum frequencies for the crystal of 16 Mhz with stability of 200 are \",min_f,\"Hz and\",max_f,\"Hz respectively\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum and maximum frequencies for the crystal of 16 Mhz with stability of 200 are 15996800 Hz and 16003200 Hz respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2 Page no 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f =14.9*10**6\n",
+ "mul_factor = 2*3*3\n",
+ "stability_ppm =300\n",
+ "variation = 0.0003\n",
+ "\n",
+ "#Calculation\n",
+ "total_variation = variation* mul_factor\n",
+ "fout = f * mul_factor\n",
+ "frequency_variation = fout*total_variation\n",
+ "f_lower = fout - frequency_variation\n",
+ "f_upper = fout + frequency_variation\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The output frequency of the transmitter is \",fout/10**6,\"MHz\"\n",
+ "print\"(b) The maximum and minimum frequencies of the transmitter are \",round(f_lower/10**6,2),\"Mhz and \",round(f_upper/10**6,2),\"Mhz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The output frequency of the transmitter is 268.2 MHz\n",
+ "(b) The maximum and minimum frequencies of the transmitter are 266.75 Mhz and 269.65 Mhz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3 Page no 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "f = 10*10**6\n",
+ "div_factor = 100.0\n",
+ "A =63\n",
+ "N = 285\n",
+ "M=32\n",
+ "\n",
+ "#Calculation\n",
+ "ref = f/div_factor\n",
+ "R =M*N+A\n",
+ "fout= R*ref\n",
+ "\n",
+ "#Result\n",
+ "print\"The output frequency of the synthesizer is \",fout/10**6,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output frequency of the synthesizer is 918.3 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4 Page no 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f = 10*10**6\n",
+ "div_factor = 100.0\n",
+ "A =64\n",
+ "N = 285\n",
+ "M=32\n",
+ "\n",
+ "#Calculation\n",
+ "ref = f/div_factor\n",
+ "R =M*N+A\n",
+ "fout= R*ref\n",
+ "\n",
+ "#Result\n",
+ "print\"The output frequency of the synthesizer is \",fout/10**6,\"MHz\"\n",
+ "print\"The step change is \",fout/10**6-918.3,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output frequency of the synthesizer is 918.4 MHz\n",
+ "The step change is 0.1 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter9_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter9_1.ipynb new file mode 100755 index 00000000..d881af0f --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter9_1.ipynb @@ -0,0 +1,274 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6155c127590921d5e033df68036b77ef47addc52e34e8604566f4914d9b739cf"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9 Communication receivers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1 Page no 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "fl =220*10**6\n",
+ "fm =224*10**6\n",
+ "IF1 = 10.7*10**6\n",
+ "IF = 1.5*10**6\n",
+ "\n",
+ "#Calculation\n",
+ "IF2 =IF1+IF\n",
+ "tune_l =fl+IF1\n",
+ "tune_m = fm+IF1\n",
+ "IF1_imgl = tune_l+IF1\n",
+ "IF2_imgm = tune_m+IF1\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The local oscillatior tuning range is \",tune_l/10**6,\"to \",tune_m/10**6,\"Mhz\"\n",
+ "print\"(b) Frequency of the second local oscillator is \",IF2/10**6,\"MHz\"\n",
+ "print\"(c) First IF image range is \",IF1_imgl/10**6,\"MHz to \",IF2_imgm/10**6,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The local oscillatior tuning range is 230.7 to 234.7 Mhz\n",
+ "Frequency of the second local oscillator is 12.2 MHz\n",
+ "First IF image range is 241.4 MHz to 245.4 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2 Page no 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "R = 100*10**3\n",
+ "T = 273+25\n",
+ "B = 20*10**3\n",
+ "k = 1.38*10**-23\n",
+ "\n",
+ "#Calculation\n",
+ "Vn=(4*k*T*B*R)**0.5\n",
+ "\n",
+ "#Result\n",
+ "print\"The noise voltage across 100k resistor is \",round(Vn*10**6,2),\"microvolt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The noise voltage across 100k resistor is 5.74 microvolt\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3 Page no 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "R=75\n",
+ "B=6*10**6 \n",
+ "T = 29+273\n",
+ "k =1.38*10**-23\n",
+ "\n",
+ "#calculation\n",
+ "Vn = (4*k*T*B*R)**0.5\n",
+ "\n",
+ "#Result\n",
+ "print\"The input themal noise is \",round(Vn*10**6,2),\"microvolt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The input themal noise is 2.74 microvolt\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4 Page no 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Tc=32.2\n",
+ "Tk=273+Tc\n",
+ "B =30*10**3\n",
+ "k =1.38*10**-23\n",
+ "\n",
+ "#Calculation\n",
+ "Pn=k*Tk*B\n",
+ "\n",
+ "#Result\n",
+ "print\"The average noise power is \",round(Pn*10**16,2),\"10**-16 W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average noise power is 1.26 10**-16 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5 Page no 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "SN_ip = 8\n",
+ "SN_op = 6.0\n",
+ "\n",
+ "#Calculation\n",
+ "NR = SN_ip/SN_op\n",
+ "NF = 10*log10(NR)\n",
+ "\n",
+ "#Result\n",
+ "print\"The noise factor is \",round(NR,2)\n",
+ "print\"The noise figure is \",round(NF,2),\"dB\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The noise factor is 1.33\n",
+ "The noise figure is 1.25 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6 Page no 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "R= 75.0\n",
+ "T=31+273\n",
+ "k=1.38*10**-23\n",
+ "B=6*10**6\n",
+ "Vs = 8.3*10**-6\n",
+ "NF=2.8\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "Vn = math.sqrt(4*k*T*B*R)\n",
+ "Pn = Vn**2/R\n",
+ "Ps = Vs**2/R\n",
+ "SN = (Ps*10**12)/(Pn/10.0**12)\n",
+ "SN_dB =10*log10(SN)\n",
+ "NR = 10**0.28\n",
+ "SN_op = SN/NR\n",
+ "Tn = 290*(NR-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The input noise power is \",round(Pn*10**12,1),\"pW\"\n",
+ "print\"(b) The input signal power is \",round(Ps*10**12,3),\"pW\"\n",
+ "print\"(c) Signal to noise ratio in decibels \",round(SN/10**24,2)\n",
+ "print\"(d) The noise factor is \",round(NR,2)\n",
+ "print\"(e) Signal to noise ratio of the amplifier is \",round(SN_op/10**24,2)\n",
+ "print\"(f) The noise temperature of the amplifier \",round(Tn,0),\"K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The input noise power is 0.1 pW\n",
+ "(b) The input signal power is 0.919 pW\n",
+ "(c) Signal to noise ratio in decibels 9.12\n",
+ "(d) The noise factor is 1.91\n",
+ "(e) Signal to noise ratio of the amplifier is 4.79\n",
+ "(f) The noise temperature of the amplifier 263.0 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter_2_1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter_2_1.ipynb new file mode 100755 index 00000000..0c5682f6 --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/chapter_2_1.ipynb @@ -0,0 +1,1143 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0b7383bde99cd4f0125cd654ff30432e941ee3972919bf09fe35e260edf9b001"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 The fundamentals of Electronics: A Review"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page no 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "vout=750*10**-3\n",
+ "vin = 30*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "gain=vout/vin\n",
+ "\n",
+ "#Result\n",
+ "print\"The Voltage gain of the amplifier is \",gain\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Voltage gain of the amplifier is 25000.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2 Page no 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "pout=6\n",
+ "power_gain=80.0\n",
+ "\n",
+ "#calculation\n",
+ "pin=pout/power_gain\n",
+ "\n",
+ "#Result\n",
+ "print\"The input power of the signal is \",pin*1000,\"mW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The input power of the sigmal is 75.0 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3 Page no 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "A1=5;\n",
+ "A2=2;\n",
+ "A3=17;\n",
+ "total_gain=A1*A2*A3;\n",
+ "pin= 40*10**-3;\n",
+ "\n",
+ "#calculation\n",
+ "pout=total_gain*pin;\n",
+ "\n",
+ "#Result\n",
+ "print\"The output power is\",pout,\"watts\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output power is 6.8 watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4 Page no 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "pin=25.0*10**-6;\n",
+ "pout=1.5*10**-3;\n",
+ "A1=3.0;\n",
+ "\n",
+ "#Calculation\n",
+ "total_gain=pout/pin;\n",
+ "print\"Total gain is\",total_gain\n",
+ "A2=total_gain/A1\n",
+ "\n",
+ "#Result\n",
+ "print\"The gain of second stage is \",A2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total gain is 60.0\n",
+ "The gain of second stage is 20.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5 Page no 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "R1=10.0*10**3;\n",
+ "R2=470.0;\n",
+ "\n",
+ "#Calculation\n",
+ "attenuation=R2/(R2+R1)\n",
+ "A2=1/attenuation\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The attenuation (A1) is\",round(attenuation,3)\n",
+ "print\"(b) The attenuation (A2) is\",round(A2,1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The attenuation (A1) is 0.045\n",
+ "(b) The attenuation (A2) is 22.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6 Page no 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "Vin=20.0*10**-6;\n",
+ "Vout=100*10**-3;\n",
+ "A1=45000.0 #A1 isAmplifier gain\n",
+ "\n",
+ "#calculation\n",
+ "AT=Vout/Vin #AT is Total gain\n",
+ "A2=AT/A1 #A2 is attenuation factor\n",
+ "\n",
+ "#Result\n",
+ "print\"Total gain is\",AT\n",
+ "print\"The atenuation factor needed to to keep the output voltage from exceeding 100 mv is \",round(A2,4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total gain is 5000.0\n",
+ "The atenuation factor needed to to keep the output voltage from exceeding 100 mv is 0.1111\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7 Page no 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "Vin=3.0*10**-3\n",
+ "Vout=5\n",
+ "Pin=50.0*10**-3 \n",
+ "Pout=2*10**-3 \n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "gain_dB= 20*log10 (Vout/Vin)\n",
+ "gain_db=10*log10 (Pout/Pin)\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The gain of amplifier in dB is \",round(gain_dB,1)\n",
+ "print\"(b) The gain in dB is \",round(gain_db,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The gain of amplifier in dB is 64.4\n",
+ "(b) The gain in dB is -13.98\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8 Page no 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "gain_dB = 40\n",
+ "pout_W= 100\n",
+ "\n",
+ "#calculation\n",
+ "pin_W = pout_W/10.0**4\n",
+ "\n",
+ "#Result\n",
+ "print\"The input power is \",pin_W,\"Watt\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The input power is 0.01 Watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9 Page no 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "\n",
+ "gain_db = 60\n",
+ "vin = 50*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "vout = 10**(60/20.0)*vin\n",
+ "\n",
+ "#Result\n",
+ "print\"The output voltage is \",vout,\"volt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output voltage is 0.05 volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10 Page no 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "\n",
+ "vin=90*10**-3\n",
+ "R1= 10.0*10**3\n",
+ "vout=7.8\n",
+ "Rout=8.0\n",
+ "\n",
+ "#calculation\n",
+ "pin= vin**2/R1\n",
+ "pout=vout**2/Rout\n",
+ "\n",
+ "import math\n",
+ "Ap_db = 10*log10 (pout/pin)\n",
+ "\n",
+ "#Result\n",
+ "print\"The power gain in decibel is \",round(Ap_db,1),\"dB\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power gain in decibel is 69.7 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.11 Page no 40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "\n",
+ "gain_db = 28\n",
+ "pin = 36*10**-3\n",
+ "\n",
+ "#calculation\n",
+ "pout = 10**2.8*pin;\n",
+ "\n",
+ "#Result\n",
+ "print\"The output power is \",round(pout,2),\"watt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output power is 22.71 watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12 Page no 40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "gain1 = 6.8 \n",
+ "gain2 = 14.3\n",
+ "attenuation1 = -16.4\n",
+ "attenuation2 = -2.9\n",
+ "vout = 800*10**-3\n",
+ "\n",
+ "#calculation\n",
+ "At = gain1+gain2+attenuation1+attenuation2\n",
+ "vin = vout/10.0**(At/20.0)\n",
+ "\n",
+ "#Result\n",
+ "print\"The input voltage is \",round(vin*10**3,1),\"mv\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The input voltage is 650.3 mv\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.13 Page no 40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "pout_db =12.3\n",
+ "\n",
+ "#calculation\n",
+ "pout_mW = 0.001*10**(12.3/10.0)\n",
+ "\n",
+ "#Result\n",
+ "print\"The output power is \" ,round(pout_mW*10**3,0),\"mv\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The output power is 17.0 mv\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14 Page no 46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "c = 2.7*10**-12\n",
+ "l = 33*10**-9\n",
+ "\n",
+ "#calculation\n",
+ "fr= 1/(6.28*(l*c)**0.5)\n",
+ "\n",
+ "#Result\n",
+ "print\"The resonat frequency is \" ,round(fr/10.0**6,0),\"Mhz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resonat frequency is 533.0 Mhz\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15 Page no 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "c =12*10**-12\n",
+ "fr = 49*10**6\n",
+ "\n",
+ "#calculation\n",
+ "l=1/(4*3.14**2*fr**2*c)\n",
+ "\n",
+ "#Result\n",
+ "print\"The value of inductance is \" ,round(l*10**9,0),\"nh\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of inductance is 880.0 nh\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.16 Page no 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "fr=28*10**6\n",
+ "Q=70.0\n",
+ "\n",
+ "#calculation\n",
+ "bandwidth = fr/Q\n",
+ "\n",
+ "#Result\n",
+ "print\"The bandwidth is \",bandwidth/10.0**3,\"Khz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The bandwidth is 400.0 Khz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.17 Page no 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "f1= 7.93*10**6\n",
+ "f2= 8.07*10**6\n",
+ "\n",
+ "#calculation\n",
+ "bw= f2-f1\n",
+ "fr=(f1*f2)**0.5\n",
+ "Q= fr/bw\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The bandwidth is \",bw/10.0**3,\"Khz\"\n",
+ "print\"(b) The resonant frequency is \",round(fr/10.0**6,0),\"Mhz\"\n",
+ "print\"(c) The Q of resonant circuit is \",round(Q,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The bandwidth is 140.0 Khz\n",
+ "(b) The resonant frequency is 8.0 Mhz\n",
+ "(c) The Q of resonant circuit is 57.14\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.18 Page no 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "Q=200.0\n",
+ "fr=16*10**6\n",
+ "\n",
+ "#calculation\n",
+ "bw=fr/Q\n",
+ "f1= fr-(bw/2)\n",
+ "f2=fr+(bw/2)\n",
+ "\n",
+ "#Result\n",
+ "print\"Bandwidth is \",bw*10**-3,\"KHz\"\n",
+ "print\"f1= \",f1*10**-6,\"MHz\"\n",
+ "print\"f2= \",f2*10**-6,\"MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bandwidth is 80.0 KHz\n",
+ "f1= 15.96 MHz\n",
+ "f2= 16.04 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.19 Page no 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "Q= 150\n",
+ "Vs=3*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "Vc= Q*Vs\n",
+ "\n",
+ "#Result\n",
+ "print\"The voltage across capacitor is \",Vc*10**6,\"microvolt\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage across capacitor is 450.0 microvolt\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.20 Page no 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "fr= 52*10**6\n",
+ "Q=12.0\n",
+ "L=0.15*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "Rw=(6.28*fr*L)/Q\n",
+ "Req= Rw*(Q**2+1)\n",
+ "\n",
+ "#Result\n",
+ "print\"Impedance of the parellel LC circuit is \",round(Req,0),\"ohm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Impedance of the parellel LC circuit is 592.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.21 Page no 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "fr= 52.0*10**6\n",
+ "Rw= 4.1\n",
+ "L =0.15*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "C=1/(4.0*3.14**2*fr**2*L)\n",
+ "Z = L/(C*Rw)\n",
+ "\n",
+ "#Result\n",
+ "print\"the impedance of the circuit is \",round(Z,0),\"ohm\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the impedance of the circuit is 585.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.22 Page no 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "bw = 1.0*10**6\n",
+ "XL = 300\n",
+ "Rw = 10.0\n",
+ "fr =10*10**6\n",
+ "\n",
+ "#calculation\n",
+ "Q1 = XL/Rw\n",
+ "Rp = Rw*(Q1**2+1) \n",
+ "\n",
+ "Q2 = fr/bw\n",
+ "Rpnew = Q2*XL\n",
+ "\n",
+ "Rext = (Rpnew*Rp)/(Rp-Rpnew)\n",
+ "\n",
+ "#Result\n",
+ "print\"The value of resistor needed to set the bandwidth of the parellel tuned circuit is \",round(Rext,1),\"ohm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of resistor needed to set the bandwidth of the parellel tuned circuit is 4497.5 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.23 Page no 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "R = 8.2*10**3\n",
+ "C =0.0033*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "fco = 1/(6.28* R*C)\n",
+ "\n",
+ "#Result\n",
+ "print\"The cut off frequency is \",round(fco/10.0**3,2),\"Khz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cut off frequency is 5.88 Khz\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.24 Page no 60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "fco =3.4*10**3\n",
+ "C = 0.047*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "R = 1/(6.28* fco* C)\n",
+ "\n",
+ "#Result\n",
+ "print\"The value of the resistor is \",round(R,0),\"ohm\"\n",
+ "print\"The closest standard value is \", 1000 ,\"ohm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of the resistor is 996.0 ohm\n",
+ "The closest standard value is 1000 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.25 Page no 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "fnotch = 120\n",
+ "R = 220*10**3\n",
+ "\n",
+ "#calculatiuon\n",
+ "C = 1/(6.28*R*fnotch)\n",
+ "\n",
+ "#Result\n",
+ "print\"The value of capacitance required is \",round(2*C*10**6,3),\"microfarad\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of capacitance required is 0.012 microfarad\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.26 Page no 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "Vpeak =3.0\n",
+ "f=48*10**3\n",
+ "\n",
+ "#calculation\n",
+ "fifth_harmonic = 5*f\n",
+ "Vrms=(4/3.14)*(3/5.0)*0.707\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The frequency of the fifth harmonic is \",fifth_harmonic/10.0**3,\"Khz\"\n",
+ "print\"The RMS voltage of the fifth harmonic is \",round(Vrms,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The frequency of the fifth harmonic is 240.0 Khz\n",
+ "The RMS voltage of the fifth harmonic is 0.54\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.27 Page no 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "Vpeak = 5\n",
+ "f = 4.0*10**6\n",
+ "duty_cycle=0.3\n",
+ "\n",
+ "#calculation\n",
+ "T = 1/f\n",
+ "t0 = duty_cycle*T\n",
+ "Vavg = Vpeak*duty_cycle\n",
+ "min_bw =1/t0\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The average DC value is \",Vavg,\"volt\"\n",
+ "print\"(b) The minimum bandwidth required is \" ,round(min_bw/10.0**6,3),\"Mhz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The average DC value is 1.5 volt\n",
+ "(b) The minimum bandwidth required is 13.333 Mhz\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.28 Page no 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "tr =6*10**-9\n",
+ "\n",
+ "#calculation\n",
+ "min_bw=(35/0.006)\n",
+ "\n",
+ "#Result\n",
+ "print\"The minimum bandwidth is % is \",round(min_bw/10.0**2,1),\"Mhz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum bandwidth is % is 58.3 Mhz\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.29 Page no 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "bw= 200.0*10**3\n",
+ "\n",
+ "#calculation\n",
+ "tr= 0.35/(bw*10**-3)\n",
+ "\n",
+ "#Result\n",
+ "print\"The fastest rise time of the circuit is \" ,tr*10**3,\"microseconds\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fastest rise time of the circuit is 1.75 microseconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.30 Page no 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "bw_mhz = 60\n",
+ "tri_ns= 15\n",
+ "\n",
+ "#calculation\n",
+ "tra_osci = 0.35/(bw_mhz)\n",
+ "tra_comp = 1.1*(tri_ns**2 + (tra_osci*10**3)**2)**0.5\n",
+ "\n",
+ "#Result\n",
+ "print\"The rise time of the displayed square wave is \",round(tra_comp,1),\"ns\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rise time of the displayed square wave is 17.7 ns\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/screenshots/image_1.png b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_1.png Binary files differindex 41f1e840..41f1e840 100755 --- a/Principles_Of_Electronic_Communication_Systems/screenshots/image_1.png +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_1.png diff --git a/Principles_Of_Electronic_Communication_Systems/screenshots/image_2.png b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_2.png Binary files differindex 3575a38f..3575a38f 100755 --- a/Principles_Of_Electronic_Communication_Systems/screenshots/image_2.png +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_2.png diff --git a/Principles_Of_Electronic_Communication_Systems/screenshots/image_3.png b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_3.png Binary files differindex 882458c8..882458c8 100755 --- a/Principles_Of_Electronic_Communication_Systems/screenshots/image_3.png +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/screenshots/image_3.png diff --git a/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter1.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter1.ipynb new file mode 100755 index 00000000..48b042da --- /dev/null +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter1.ipynb @@ -0,0 +1,249 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:fa4937e894b2eaacf3d917ad54d3257fed9024ea716662722fd829aea08934e3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 Introduction to electronic communication"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1.a Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "c=300000000\n",
+ "f1=150000000.0\n",
+ "f2=430000000.0\n",
+ "f3=8000000.0\n",
+ "f4=750000.0\n",
+ "\n",
+ "#Calculation\n",
+ "W1 = c/f1\n",
+ "W2=c/f2\n",
+ "W3=c/f3\n",
+ "W4=c/f4\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) Wavelength is \",W1,\"meter\"\n",
+ "print\"(b) Wavelength is \",round(W2,3),\"meter\"\n",
+ "print\"(c) Wavelength is \",W3,\"meter\"\n",
+ "print\"(d) Wavelength is \",W4,\"meter\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Wavelength is 2.0 meter\n",
+ "(b) Wavelength is 0.698 meter\n",
+ "(c) Wavelength is 37.5 meter\n",
+ "(d) Wavelength is 400.0 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 page no 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "c=300000000\n",
+ "wavelength=1.5\n",
+ "\n",
+ "#Calculation\n",
+ "frequency=c/wavelength\n",
+ "\n",
+ "#Result\n",
+ "print\"Signal frequncy is \",frequency/1000000.0,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Signal frequncy is 200.0 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3 page no 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "wavelength_feet=75\n",
+ "wavelength_meter= 75/3.28\n",
+ "c=300000000\n",
+ "\n",
+ "#Calculation\n",
+ "frequency=c/wavelength_meter\n",
+ "\n",
+ "#Result\n",
+ "print\"The signal frequncy is \",frequency/1000000.0,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The signal frequncy is 13.12 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 page no 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "wavelength_inches=8\n",
+ "wavelength_meter= 8/39.37\n",
+ "c=300\n",
+ "\n",
+ "#Calculation\n",
+ "frequency= c/wavelength_meter\n",
+ "\n",
+ "#Result\n",
+ "print\"The signal freuency is \",round(frequency,1),\"MHz\"\n",
+ "print\"The signnalfrequency is \",round(frequency*10**-3,2),\"GHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The signal freuency is 1476.4 MHz\n",
+ "The signnalfrequency is 1.48 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 page no 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "f1=902000000\n",
+ "f2=928000000\n",
+ "\n",
+ "#Calculation\n",
+ "bandwidth=f2-f1\n",
+ "\n",
+ "#Result\n",
+ "print\"Width of the band is \",bandwidth/1000000,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of the band is 26 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6 page no 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "bandwidth_megahertz= 6\n",
+ "f1_megahertz=54\n",
+ "\n",
+ "#Calculation\n",
+ "f2_megahertz=f1_megahertz + bandwidth_megahertz\n",
+ "\n",
+ "#Result\n",
+ "print\"Upper frequency limit is \",f2_megahertz,\"MHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Upper frequency limit is 60 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Principles_Of_Electronic_Communication_Systems/chapter10.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter10.ipynb index f969c01b..f969c01b 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter10.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter10.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter11.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter11.ipynb index 015bcc79..015bcc79 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter11.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter11.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter12.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter12.ipynb index ae98ce2e..ae98ce2e 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter12.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter12.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter13.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter13.ipynb index de1fc475..de1fc475 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter13.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter13.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter14.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter14.ipynb index 483c5c1b..483c5c1b 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter14.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter14.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter16.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter16.ipynb index a3463547..a3463547 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter16.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter16.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter17.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter17.ipynb index c9e3dcac..c9e3dcac 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter17.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter17.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter19.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter19.ipynb index 1ce8f35e..1ce8f35e 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter19.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter19.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter22.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter22.ipynb index 2fc3916b..2fc3916b 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter22.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter22.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter3.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter3.ipynb index ef029e65..ef029e65 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter3.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter3.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter4.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter4.ipynb index 522fe2b5..522fe2b5 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter4.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter4.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter5.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter5.ipynb index 3539866c..3539866c 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter5.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter5.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter6.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter6.ipynb index 8bd8c6da..8bd8c6da 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter6.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter6.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter7.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter7.ipynb index c4587482..c4587482 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter7.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter7.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter8.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter8.ipynb index 4cad3df0..4cad3df0 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter8.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter8.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter9.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter9.ipynb index 379e8939..379e8939 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter9.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter9.ipynb diff --git a/Principles_Of_Electronic_Communication_Systems/chapter_2.ipynb b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter_2.ipynb index 3847150a..3847150a 100755 --- a/Principles_Of_Electronic_Communication_Systems/chapter_2.ipynb +++ b/Principles_Of_Electronic_Communication_Systems_by_L_E_Frenze/temp/chapter_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter01.ipynb b/Principles_Of_Foundation_Engineering/Chapter01.ipynb deleted file mode 100755 index 61dc3457..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter01.ipynb +++ /dev/null @@ -1,249 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:3f5444f542f0d6a3b857b61fbecdc4e8047247ed8828d4cea5a34f91ccdf5eb3"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 1:Geotechnical Properties of Soil"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.1:Pg-10"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.1\n",
- "\n",
- "V=0.25; # ft^3\n",
- "W=30.8; #lb\n",
- "Wd=28.2; # weight dried lb\n",
- "Gs=2.7;\n",
- "Gammaw=62.4; #lb/ft^3\n",
- "Gamma=W/V;\n",
- "print Gamma,\" is moist unit weight in lb/ft^3\"\n",
- "w=(W-Wd)/W;\n",
- "print round(w*100,2),\"is moisture content in %\"\n",
- "Gammad=Wd/V;\n",
- "print Gammad, \"is dry unit weight in lb/ft^3\"\n",
- "Vs=Wd/Gs/Gammaw;\n",
- "Vv=V-Vs;\n",
- "e=Vv/Vs;\n",
- "print round(e,3),\" is void ratio\"\n",
- "n=e/(1+e);\n",
- "print round(n,2),\"is porosity\"\n",
- "Vw=(W-Wd)/Gammaw;\n",
- "S=Vw/Vv;\n",
- "print round(S*100,2),\"is saturation in %\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "123.2 is moist unit weight in lb/ft^3\n",
- "8.44 is moisture content in %\n",
- "112.8 is dry unit weight in lb/ft^3\n",
- "0.494 is void ratio\n",
- "0.33 is porosity\n",
- "50.43 is saturation in %\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.2:Pg-11"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.2\n",
- "\n",
- "e=0.72;\n",
- "w=12.0/100; #moisture content\n",
- "Gs=2.72;\n",
- "Gammaw=9.81;#kN/m^3\n",
- "Gammad=Gs*Gammaw/(1+e);\n",
- "print round(Gammad,2),\"= dry unit weight in kN/m^3\"\n",
- "Gamma=Gs*Gammaw*(1+w)/(1+e);\n",
- "print round(Gamma,2),\" = moist unit weight in kN/m^3\"\n",
- "Gammasat=(Gs+e)*Gammaw/(1+e);\n",
- "wa=Gammasat-Gamma;#water added\n",
- "print round(wa,2),\" = water added in kN/m^3\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "15.51 = dry unit weight in kN/m^3\n",
- "17.38 = moist unit weight in kN/m^3\n",
- "2.24 = water added in kN/m^3\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.3:Pg-12"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.3\n",
- "from scipy.optimize import fsolve\n",
- "gmax=17.1; # Gammadmax\n",
- "Dr=0.7;\n",
- "w=8.0/100;#moisture content\n",
- "gmin=14.2; #Gammadmin\n",
- "def f(x):\n",
- " return (x-14.2)/(17.1-14.2)*17.1/x-0.7 \n",
- "x=fsolve(f,16);#solving for gammad\n",
- "Gamma=x[0]*(1+w);\n",
- "print round(Gamma,2),\"moist unit weight in kN/m^3\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "17.4 moist unit weight in kN/m^3\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.7:Pg-38"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.7\n",
- "import math\n",
- "#part (a)\n",
- "e1=0.92;\n",
- "e2=0.86;\n",
- "Hc=2.8; # in m\n",
- "s2=212.0;#sigma2dash Load in kN/m2\n",
- "s1=140.0;#sigma1dash Load in kN/m2\n",
- "Cc=(e1-e2)/math.log10(s2/s1);\n",
- "Sc=Cc*Hc/(1+e1)*math.log10(s2/s1);\n",
- "print Sc*1000,\"consolidated depth in mm\"\n",
- "#part (b)\n",
- "# from Figure (1.21):\n",
- "Sct=40.0;# in mm\n",
- "T50=0.197;\n",
- "t=4.5; # in MIN\n",
- "Cr=T50*12.7**2.0/t;\n",
- "U=Sct/Sc*100.0/1000;\n",
- "H=Hc/2;\n",
- "Tv=math.pi/4*U**2.0/100**2;\n",
- "t=Tv*H**2.0/Cr*1000.0**2/60.0/24;\n",
- "print round(t,1),\" is time required in days\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "87.5 consolidated depth in mm\n",
- "31.6 is time required in days\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.8:Pg-42"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.8\n",
- "\n",
- "Cv=7.061; # in mm^2/min\n",
- "tc=15*24*60.0;\n",
- "H=2.8/2*1000.0;\n",
- "Scmax=87.5; # consolidation\n",
- "Tc=Cv*tc/H**2;\n",
- "tv=31.6*24*60;\n",
- "Tv=Cv*tv/H**2;\n",
- "#from figure 1.28\n",
- "Sct=Scmax*0.36;\n",
- "print Sct,\"is consolidation in 31.6 days in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "31.5 is consolidation in 31.6 days in mm\n"
- ]
- }
- ],
- "prompt_number": 28
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter01_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter01_1.ipynb deleted file mode 100755 index 61dc3457..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter01_1.ipynb +++ /dev/null @@ -1,249 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:3f5444f542f0d6a3b857b61fbecdc4e8047247ed8828d4cea5a34f91ccdf5eb3"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 1:Geotechnical Properties of Soil"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.1:Pg-10"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.1\n",
- "\n",
- "V=0.25; # ft^3\n",
- "W=30.8; #lb\n",
- "Wd=28.2; # weight dried lb\n",
- "Gs=2.7;\n",
- "Gammaw=62.4; #lb/ft^3\n",
- "Gamma=W/V;\n",
- "print Gamma,\" is moist unit weight in lb/ft^3\"\n",
- "w=(W-Wd)/W;\n",
- "print round(w*100,2),\"is moisture content in %\"\n",
- "Gammad=Wd/V;\n",
- "print Gammad, \"is dry unit weight in lb/ft^3\"\n",
- "Vs=Wd/Gs/Gammaw;\n",
- "Vv=V-Vs;\n",
- "e=Vv/Vs;\n",
- "print round(e,3),\" is void ratio\"\n",
- "n=e/(1+e);\n",
- "print round(n,2),\"is porosity\"\n",
- "Vw=(W-Wd)/Gammaw;\n",
- "S=Vw/Vv;\n",
- "print round(S*100,2),\"is saturation in %\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "123.2 is moist unit weight in lb/ft^3\n",
- "8.44 is moisture content in %\n",
- "112.8 is dry unit weight in lb/ft^3\n",
- "0.494 is void ratio\n",
- "0.33 is porosity\n",
- "50.43 is saturation in %\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.2:Pg-11"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.2\n",
- "\n",
- "e=0.72;\n",
- "w=12.0/100; #moisture content\n",
- "Gs=2.72;\n",
- "Gammaw=9.81;#kN/m^3\n",
- "Gammad=Gs*Gammaw/(1+e);\n",
- "print round(Gammad,2),\"= dry unit weight in kN/m^3\"\n",
- "Gamma=Gs*Gammaw*(1+w)/(1+e);\n",
- "print round(Gamma,2),\" = moist unit weight in kN/m^3\"\n",
- "Gammasat=(Gs+e)*Gammaw/(1+e);\n",
- "wa=Gammasat-Gamma;#water added\n",
- "print round(wa,2),\" = water added in kN/m^3\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "15.51 = dry unit weight in kN/m^3\n",
- "17.38 = moist unit weight in kN/m^3\n",
- "2.24 = water added in kN/m^3\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.3:Pg-12"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.3\n",
- "from scipy.optimize import fsolve\n",
- "gmax=17.1; # Gammadmax\n",
- "Dr=0.7;\n",
- "w=8.0/100;#moisture content\n",
- "gmin=14.2; #Gammadmin\n",
- "def f(x):\n",
- " return (x-14.2)/(17.1-14.2)*17.1/x-0.7 \n",
- "x=fsolve(f,16);#solving for gammad\n",
- "Gamma=x[0]*(1+w);\n",
- "print round(Gamma,2),\"moist unit weight in kN/m^3\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "17.4 moist unit weight in kN/m^3\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.7:Pg-38"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.7\n",
- "import math\n",
- "#part (a)\n",
- "e1=0.92;\n",
- "e2=0.86;\n",
- "Hc=2.8; # in m\n",
- "s2=212.0;#sigma2dash Load in kN/m2\n",
- "s1=140.0;#sigma1dash Load in kN/m2\n",
- "Cc=(e1-e2)/math.log10(s2/s1);\n",
- "Sc=Cc*Hc/(1+e1)*math.log10(s2/s1);\n",
- "print Sc*1000,\"consolidated depth in mm\"\n",
- "#part (b)\n",
- "# from Figure (1.21):\n",
- "Sct=40.0;# in mm\n",
- "T50=0.197;\n",
- "t=4.5; # in MIN\n",
- "Cr=T50*12.7**2.0/t;\n",
- "U=Sct/Sc*100.0/1000;\n",
- "H=Hc/2;\n",
- "Tv=math.pi/4*U**2.0/100**2;\n",
- "t=Tv*H**2.0/Cr*1000.0**2/60.0/24;\n",
- "print round(t,1),\" is time required in days\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "87.5 consolidated depth in mm\n",
- "31.6 is time required in days\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1.8:Pg-42"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1.8\n",
- "\n",
- "Cv=7.061; # in mm^2/min\n",
- "tc=15*24*60.0;\n",
- "H=2.8/2*1000.0;\n",
- "Scmax=87.5; # consolidation\n",
- "Tc=Cv*tc/H**2;\n",
- "tv=31.6*24*60;\n",
- "Tv=Cv*tv/H**2;\n",
- "#from figure 1.28\n",
- "Sct=Scmax*0.36;\n",
- "print Sct,\"is consolidation in 31.6 days in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "31.5 is consolidation in 31.6 days in mm\n"
- ]
- }
- ],
- "prompt_number": 28
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter02.ipynb b/Principles_Of_Foundation_Engineering/Chapter02.ipynb deleted file mode 100755 index f284c073..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter02.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:1d0e8ca0a27c4b0cb17e7318d009efc3241a84a31e3f27c8ca705f6cb5276ce4"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 02:Natural Soil Deposits and Subsoil Exploration"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.1:Pg-109"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2.1\n",
- "import matplotlib.pyplot as plt\n",
- "import numpy\n",
- "import math\n",
- "Distance=[2.5,5,7.5,10,15,20,25,30,35,40,50];\n",
- "Time=(10**(-3))*numpy.array([11.2,23.3,33.5,42.4,50.9,57.2,64.4,68.6,71.1,72.1,75.5])\n",
- "#part1\n",
- "distance=5.25; # in meter\n",
- "time=23e-3; # in second\n",
- "v1=distance/time;\n",
- "print round(v1,2),\"is speed in m/s\"\n",
- "#part2\n",
- "distance=11; # in meter\n",
- "time=13.5e-3;# in second\n",
- "v2=distance/time;\n",
- "print round(v2,2),\" is speed in m/s\"\n",
- "#part3\n",
- "distance=14.75;# in meter\n",
- "time=3.5e-3;# in second\n",
- "v3=distance/time;\n",
- "print round(v3,2),\"speed in m/s\"\n",
- "plt.plot(Distance,Time);\n",
- "plt.title(\"distance vs time\")\n",
- "plt.xlabel(\"Distance in m\")\n",
- "plt.ylabel(\"time in s\")\n",
- "plt.show()\n",
- "#part4\n",
- "xc=10.4;\n",
- "Ta=65e-3;\n",
- "Z1=1/2.0*math.sqrt((v2-v1)/(v2+v1))*xc;\n",
- "print round(Z1,2),\" is thickness of layer 1 in m\"\n",
- "Z2=1/2.0*(Ta-2*Z1*math.sqrt(v3**2-v1**2)/v3/v1)*v3*v2/math.sqrt(v3**2-v2**2);\n",
- "print round(Z2,2),\" is thickness of layer 2 in m\"\n",
- "\n",
- "# the answers are slightly different in textbook due to approximation while here answers are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "228.26 is speed in m/s\n",
- "814.81 is speed in m/s\n",
- "4214.29 speed in m/s\n",
- "3.9"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " is thickness of layer 1 in m\n",
- "12.82 is thickness of layer 2 in m\n"
- ]
- }
- ],
- "prompt_number": 10
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter02_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter02_1.ipynb deleted file mode 100755 index f284c073..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter02_1.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:1d0e8ca0a27c4b0cb17e7318d009efc3241a84a31e3f27c8ca705f6cb5276ce4"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 02:Natural Soil Deposits and Subsoil Exploration"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2.1:Pg-109"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2.1\n",
- "import matplotlib.pyplot as plt\n",
- "import numpy\n",
- "import math\n",
- "Distance=[2.5,5,7.5,10,15,20,25,30,35,40,50];\n",
- "Time=(10**(-3))*numpy.array([11.2,23.3,33.5,42.4,50.9,57.2,64.4,68.6,71.1,72.1,75.5])\n",
- "#part1\n",
- "distance=5.25; # in meter\n",
- "time=23e-3; # in second\n",
- "v1=distance/time;\n",
- "print round(v1,2),\"is speed in m/s\"\n",
- "#part2\n",
- "distance=11; # in meter\n",
- "time=13.5e-3;# in second\n",
- "v2=distance/time;\n",
- "print round(v2,2),\" is speed in m/s\"\n",
- "#part3\n",
- "distance=14.75;# in meter\n",
- "time=3.5e-3;# in second\n",
- "v3=distance/time;\n",
- "print round(v3,2),\"speed in m/s\"\n",
- "plt.plot(Distance,Time);\n",
- "plt.title(\"distance vs time\")\n",
- "plt.xlabel(\"Distance in m\")\n",
- "plt.ylabel(\"time in s\")\n",
- "plt.show()\n",
- "#part4\n",
- "xc=10.4;\n",
- "Ta=65e-3;\n",
- "Z1=1/2.0*math.sqrt((v2-v1)/(v2+v1))*xc;\n",
- "print round(Z1,2),\" is thickness of layer 1 in m\"\n",
- "Z2=1/2.0*(Ta-2*Z1*math.sqrt(v3**2-v1**2)/v3/v1)*v3*v2/math.sqrt(v3**2-v2**2);\n",
- "print round(Z2,2),\" is thickness of layer 2 in m\"\n",
- "\n",
- "# the answers are slightly different in textbook due to approximation while here answers are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "228.26 is speed in m/s\n",
- "814.81 is speed in m/s\n",
- "4214.29 speed in m/s\n",
- "3.9"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " is thickness of layer 1 in m\n",
- "12.82 is thickness of layer 2 in m\n"
- ]
- }
- ],
- "prompt_number": 10
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter03.ipynb b/Principles_Of_Foundation_Engineering/Chapter03.ipynb deleted file mode 100755 index 520b4f21..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter03.ipynb +++ /dev/null @@ -1,412 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:e3a75199f67af72d14bee528a629ae06b2506206625e1ef3a86291ef88f556ed"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 03:Shallow Foundations: Ultimate bearing capacity"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.1:Pg-130"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.1\n",
- "# From Table 3.1\n",
- "Nc=17.69;\n",
- "Nq=7.44;\n",
- "Ny=3.64;\n",
- "q=3*115;\n",
- "Gamma=115.0; #lb/ft**3\n",
- "c=320;\n",
- "B=5.0;#ft\n",
- "FS=4;#factor of safety\n",
- "qu=1.3*c*Nc+q*Nq+0.4*Gamma*B*Ny\n",
- "qall=qu/FS; #q allowed\n",
- "Q=qall*B**2;\n",
- "print Q,\"is allowable gross load in lb\" \n",
- "\n",
- "# the answer is slightly different in textbook due to approximation but here answer are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "67269.0 is allowable gross load in lb\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.2:Pg-134"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.2\n",
- "\n",
- "from scipy.optimize import fsolve\n",
- "import math\n",
- "Gamma=105.0;#lb/ft**3\n",
- "Gammasat=118.0;#lb/ft**3\n",
- "FS=3.0;\n",
- "pa=2014.125;#lb/ft**2\n",
- "Depth=[5,10,15,20,25]; # in ft\n",
- "N60=[4,6,6,10,5]; # in blow/ft\n",
- "sigmao=[0,0,0,0,0]; # in lb/ft^2\n",
- "phi=[0,0,0,0,0] # in degree\n",
- "Gammaw=62.4;\n",
- "s=0;\n",
- "print \"depth (ft)\\tN60\\t \\tstress(lb/ft**2)\\t phi(degrees)\\n\"\n",
- "for i in range(0,5):\n",
- " sigmao[i]=2*Gamma+(Depth[i]-2)*(Gammasat-Gammaw);\n",
- " phi[i]=math.sqrt(20*N60[i]*math.sqrt(pa/sigmao[i]))+20;\n",
- " print \" \",Depth[i],\"\\t \",N60[i],\"\\t\\t \",sigmao[i],\" \\t \\t \\t\",round(phi[i],1),\" \\n\"\n",
- " s=phi[i]+s\n",
- "\n",
- "avgphi=s/(i+1)\n",
- "\n",
- "print round(avgphi),\"average friction angle in degrees\"\n",
- "#using graph get the values of other terms in terms of B and solve for B\n",
- "def f(x):\n",
- " return-150000/x**2+5263.9+5527.1/x+228.3*x\n",
- "x=fsolve(f,4);\n",
- "print round(x[0],1),\" is the width in ft\"\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "depth (ft)\tN60\t \tstress(lb/ft**2)\t phi(degrees)\n",
- "\n",
- " 5 \t 4 \t\t 376.8 \t \t \t33.6 \n",
- "\n",
- " 10 \t 6 \t\t 654.8 \t \t \t34.5 \n",
- "\n",
- " 15 \t 6 \t\t 932.8 \t \t \t33.3 \n",
- "\n",
- " 20 \t 10 \t\t 1210.8 \t \t \t36.1 \n",
- "\n",
- " 25 \t 5 \t\t 1488.8 \t \t \t30.8 \n",
- "\n",
- "34.0 average friction angle in degrees\n",
- "4.5 is the width in ft\n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.3:Pg-144"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.3\n",
- "\n",
- "import math\n",
- "phi=25.0; #degrees\n",
- "Es=620.0; #kN/m**2\n",
- "Gamma=18.0;#kN/m**2\n",
- "Df=0.6;# in m\n",
- "B=0.6; # in m\n",
- "L=1.2; # in m\n",
- "Fqc=0.347;\n",
- "Nq=10.66;\n",
- "Nc=20.72;\n",
- "Ngamma=10.88;\n",
- "mu=0.3; # Poisson's ratio\n",
- "Fyd=1.0;\n",
- "c=48.0;#kN/m**2\n",
- "q=Gamma*(Df+B/2);\n",
- "Ir=Es/(2*(1+mu)*(c+q*math.tan(phi*math.pi/180.0)));\n",
- "print round(Ir,2),\" is value of Ir\"\n",
- "Fcc=Fqc-(1-Fqc)/(Nq*math.tan(phi*math.pi/180.0));\n",
- "Fcs=1+Nq/Nc*B/L;\n",
- "Fqs=1+B/L*math.tan(phi*math.pi/180.0);\n",
- "Fys=1-0.4*B/L;\n",
- "Fcd=1+0.4*Df/B;\n",
- "Fqd=1+2.0*math.tan(phi*math.pi/180.0)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n",
- "q1=0.6*18;\n",
- "Fyc=Fqc;\n",
- "qu=c*Nc*Fcs*Fcd*Fcc+q1*Nq*Fqs*Fqd*Fqc+1.0/2*Gamma*Ngamma*Fys*Fyd*Fyc;\n",
- "print round(qu,2),\"is ultimate bearing capacity in kN/m**2\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation but here answer are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4.29 is value of Ir\n",
- "469.24 is ultimate bearing capacity in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.4:Pg-156"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.4\n",
- "import math\n",
- "q=110*4.0; #lb/ft**2\n",
- "Nq=33.3;\n",
- "phi=35.0; # in degree\n",
- "Df=4.0; # in ft\n",
- "B=6.0; # in ft\n",
- "Gamma=110.0;#lb/ft**3\n",
- "Ngamma=48.03; #lb/ft**3\n",
- "B1=6-2*0.5; # in ft\n",
- "Fqi=1;\n",
- "Fyi=1;\n",
- "Fyd=1;\n",
- "Fqs=1;\n",
- "Fys=1;\n",
- "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n",
- "qu=q*Nq*Fqs*Fqd*Fqi+1/2.0*B1*Gamma*Ngamma*Fys*Fyd*Fyi;\n",
- "Qult=B1*1*qu;\n",
- "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\" \n",
- "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation but here answer are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "151738.23 is ultimate bearing capacity in lb/ft\n",
- "75.87 is ultimate bearing capacity in ton/ft\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.5:Pg-158"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.5\n",
- "\n",
- "e=0.5; # in ft\n",
- "B=6; # in ft\n",
- "k=e/B;\n",
- "Gamma=110; # in lb/ft^3 \n",
- "q=440;\n",
- "print \"get the values of Nqe and Nye from the figure from the value of e/B\"\n",
- "Nye=26.8;\n",
- "Nqe=33.4;\n",
- "Qult=B*1*(q*Nqe+1/2.0*Gamma*B*Nye);\n",
- "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\"\n",
- "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "get the values of Nqe and Nye from the figure from the value of e/B\n",
- "141240.0 is ultimate bearing capacity in lb/ft\n",
- "70.62 is ultimate bearing capacity in ton/ft\n"
- ]
- }
- ],
- "prompt_number": 38
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.6:Pg-159"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.6\n",
- "\n",
- "Df=0.7; # in m\n",
- "#from table\n",
- "Nq=18.4;\n",
- "Ny=22.4;\n",
- "q=12.6;\n",
- "phi=30; #angle in degree\n",
- "L=1.5;# in m\n",
- "Fyd=1;\n",
- "Gamma=18; # in KN/m^3\n",
- "L1=0.85*1.5; # in m\n",
- "L2=0.21*1.5; # in m\n",
- "B=1.5; # in m\n",
- "A=1/2.0*(L1+L2)*B;\n",
- "B1=A/L1; #B'\n",
- "Fqs=1+B1/L1*math.tan(phi*math.pi/180);\n",
- "Fys=1-0.4*B1/L1;\n",
- "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180))**2*Df/B;\n",
- "Qult=A*(q*Nq*Fqs*Fqd+1/2.0*Gamma*B1*Ny*Fys*Fyd);\n",
- "print round(Qult,2),\" is ultimate load in kN\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation but here answer are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "605.45 is ultimate load in kN\n"
- ]
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.7:Pg-161"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.7\n",
- "\n",
- "e=0.15; # in m\n",
- "B=1.5; # in m\n",
- "Fqs=1.0;\n",
- "L=1.5;# in m\n",
- "Gamma=18.0; # in KN/m^3\n",
- "q=0.7*18;\n",
- "#from table\n",
- "Nqe=18.4;\n",
- "Nye=11.58;\n",
- "Fys=1+(2*e/B-0.68)*(B/L)+(0.43-3/2.0*e/B)*(B/L)**2;\n",
- "Qult=B*L*(q*Nqe*Fqs+1/2.0*L*Gamma*Nye*Fys);\n",
- "print round(Qult,2),\"is ultimate load in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "803.03 is ultimate load in kN\n"
- ]
- }
- ],
- "prompt_number": 45
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.8:Pg-163"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.8\n",
- "\n",
- "q=16.0;# in kN/m^2\n",
- "Nqei=14.2;\n",
- "Gamma=16.0 # in kN/m^3\n",
- "B=1.5;# in m\n",
- "Nyet=20.0;\n",
- "Qult=B*(Nqei*q+1/2.0*Gamma*B*Nyet);\n",
- "print round(Qult,2),\" is ultimate load in kN/m\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "700.8 is ultimate load in kN/m\n"
- ]
- }
- ],
- "prompt_number": 48
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter03_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter03_1.ipynb deleted file mode 100755 index 520b4f21..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter03_1.ipynb +++ /dev/null @@ -1,412 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:e3a75199f67af72d14bee528a629ae06b2506206625e1ef3a86291ef88f556ed"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 03:Shallow Foundations: Ultimate bearing capacity"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.1:Pg-130"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.1\n",
- "# From Table 3.1\n",
- "Nc=17.69;\n",
- "Nq=7.44;\n",
- "Ny=3.64;\n",
- "q=3*115;\n",
- "Gamma=115.0; #lb/ft**3\n",
- "c=320;\n",
- "B=5.0;#ft\n",
- "FS=4;#factor of safety\n",
- "qu=1.3*c*Nc+q*Nq+0.4*Gamma*B*Ny\n",
- "qall=qu/FS; #q allowed\n",
- "Q=qall*B**2;\n",
- "print Q,\"is allowable gross load in lb\" \n",
- "\n",
- "# the answer is slightly different in textbook due to approximation but here answer are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "67269.0 is allowable gross load in lb\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.2:Pg-134"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.2\n",
- "\n",
- "from scipy.optimize import fsolve\n",
- "import math\n",
- "Gamma=105.0;#lb/ft**3\n",
- "Gammasat=118.0;#lb/ft**3\n",
- "FS=3.0;\n",
- "pa=2014.125;#lb/ft**2\n",
- "Depth=[5,10,15,20,25]; # in ft\n",
- "N60=[4,6,6,10,5]; # in blow/ft\n",
- "sigmao=[0,0,0,0,0]; # in lb/ft^2\n",
- "phi=[0,0,0,0,0] # in degree\n",
- "Gammaw=62.4;\n",
- "s=0;\n",
- "print \"depth (ft)\\tN60\\t \\tstress(lb/ft**2)\\t phi(degrees)\\n\"\n",
- "for i in range(0,5):\n",
- " sigmao[i]=2*Gamma+(Depth[i]-2)*(Gammasat-Gammaw);\n",
- " phi[i]=math.sqrt(20*N60[i]*math.sqrt(pa/sigmao[i]))+20;\n",
- " print \" \",Depth[i],\"\\t \",N60[i],\"\\t\\t \",sigmao[i],\" \\t \\t \\t\",round(phi[i],1),\" \\n\"\n",
- " s=phi[i]+s\n",
- "\n",
- "avgphi=s/(i+1)\n",
- "\n",
- "print round(avgphi),\"average friction angle in degrees\"\n",
- "#using graph get the values of other terms in terms of B and solve for B\n",
- "def f(x):\n",
- " return-150000/x**2+5263.9+5527.1/x+228.3*x\n",
- "x=fsolve(f,4);\n",
- "print round(x[0],1),\" is the width in ft\"\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "depth (ft)\tN60\t \tstress(lb/ft**2)\t phi(degrees)\n",
- "\n",
- " 5 \t 4 \t\t 376.8 \t \t \t33.6 \n",
- "\n",
- " 10 \t 6 \t\t 654.8 \t \t \t34.5 \n",
- "\n",
- " 15 \t 6 \t\t 932.8 \t \t \t33.3 \n",
- "\n",
- " 20 \t 10 \t\t 1210.8 \t \t \t36.1 \n",
- "\n",
- " 25 \t 5 \t\t 1488.8 \t \t \t30.8 \n",
- "\n",
- "34.0 average friction angle in degrees\n",
- "4.5 is the width in ft\n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.3:Pg-144"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.3\n",
- "\n",
- "import math\n",
- "phi=25.0; #degrees\n",
- "Es=620.0; #kN/m**2\n",
- "Gamma=18.0;#kN/m**2\n",
- "Df=0.6;# in m\n",
- "B=0.6; # in m\n",
- "L=1.2; # in m\n",
- "Fqc=0.347;\n",
- "Nq=10.66;\n",
- "Nc=20.72;\n",
- "Ngamma=10.88;\n",
- "mu=0.3; # Poisson's ratio\n",
- "Fyd=1.0;\n",
- "c=48.0;#kN/m**2\n",
- "q=Gamma*(Df+B/2);\n",
- "Ir=Es/(2*(1+mu)*(c+q*math.tan(phi*math.pi/180.0)));\n",
- "print round(Ir,2),\" is value of Ir\"\n",
- "Fcc=Fqc-(1-Fqc)/(Nq*math.tan(phi*math.pi/180.0));\n",
- "Fcs=1+Nq/Nc*B/L;\n",
- "Fqs=1+B/L*math.tan(phi*math.pi/180.0);\n",
- "Fys=1-0.4*B/L;\n",
- "Fcd=1+0.4*Df/B;\n",
- "Fqd=1+2.0*math.tan(phi*math.pi/180.0)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n",
- "q1=0.6*18;\n",
- "Fyc=Fqc;\n",
- "qu=c*Nc*Fcs*Fcd*Fcc+q1*Nq*Fqs*Fqd*Fqc+1.0/2*Gamma*Ngamma*Fys*Fyd*Fyc;\n",
- "print round(qu,2),\"is ultimate bearing capacity in kN/m**2\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation but here answer are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4.29 is value of Ir\n",
- "469.24 is ultimate bearing capacity in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.4:Pg-156"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.4\n",
- "import math\n",
- "q=110*4.0; #lb/ft**2\n",
- "Nq=33.3;\n",
- "phi=35.0; # in degree\n",
- "Df=4.0; # in ft\n",
- "B=6.0; # in ft\n",
- "Gamma=110.0;#lb/ft**3\n",
- "Ngamma=48.03; #lb/ft**3\n",
- "B1=6-2*0.5; # in ft\n",
- "Fqi=1;\n",
- "Fyi=1;\n",
- "Fyd=1;\n",
- "Fqs=1;\n",
- "Fys=1;\n",
- "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180.0))**2*Df/B;\n",
- "qu=q*Nq*Fqs*Fqd*Fqi+1/2.0*B1*Gamma*Ngamma*Fys*Fyd*Fyi;\n",
- "Qult=B1*1*qu;\n",
- "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\" \n",
- "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation but here answer are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "151738.23 is ultimate bearing capacity in lb/ft\n",
- "75.87 is ultimate bearing capacity in ton/ft\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.5:Pg-158"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.5\n",
- "\n",
- "e=0.5; # in ft\n",
- "B=6; # in ft\n",
- "k=e/B;\n",
- "Gamma=110; # in lb/ft^3 \n",
- "q=440;\n",
- "print \"get the values of Nqe and Nye from the figure from the value of e/B\"\n",
- "Nye=26.8;\n",
- "Nqe=33.4;\n",
- "Qult=B*1*(q*Nqe+1/2.0*Gamma*B*Nye);\n",
- "print round(Qult,2),\" is ultimate bearing capacity in lb/ft\"\n",
- "print round(Qult/2000.0,2),\" is ultimate bearing capacity in ton/ft\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "get the values of Nqe and Nye from the figure from the value of e/B\n",
- "141240.0 is ultimate bearing capacity in lb/ft\n",
- "70.62 is ultimate bearing capacity in ton/ft\n"
- ]
- }
- ],
- "prompt_number": 38
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.6:Pg-159"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.6\n",
- "\n",
- "Df=0.7; # in m\n",
- "#from table\n",
- "Nq=18.4;\n",
- "Ny=22.4;\n",
- "q=12.6;\n",
- "phi=30; #angle in degree\n",
- "L=1.5;# in m\n",
- "Fyd=1;\n",
- "Gamma=18; # in KN/m^3\n",
- "L1=0.85*1.5; # in m\n",
- "L2=0.21*1.5; # in m\n",
- "B=1.5; # in m\n",
- "A=1/2.0*(L1+L2)*B;\n",
- "B1=A/L1; #B'\n",
- "Fqs=1+B1/L1*math.tan(phi*math.pi/180);\n",
- "Fys=1-0.4*B1/L1;\n",
- "Fqd=1+2*math.tan(phi*math.pi/180)*(1-math.sin(phi*math.pi/180))**2*Df/B;\n",
- "Qult=A*(q*Nq*Fqs*Fqd+1/2.0*Gamma*B1*Ny*Fys*Fyd);\n",
- "print round(Qult,2),\" is ultimate load in kN\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation but here answer are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "605.45 is ultimate load in kN\n"
- ]
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.7:Pg-161"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.7\n",
- "\n",
- "e=0.15; # in m\n",
- "B=1.5; # in m\n",
- "Fqs=1.0;\n",
- "L=1.5;# in m\n",
- "Gamma=18.0; # in KN/m^3\n",
- "q=0.7*18;\n",
- "#from table\n",
- "Nqe=18.4;\n",
- "Nye=11.58;\n",
- "Fys=1+(2*e/B-0.68)*(B/L)+(0.43-3/2.0*e/B)*(B/L)**2;\n",
- "Qult=B*L*(q*Nqe*Fqs+1/2.0*L*Gamma*Nye*Fys);\n",
- "print round(Qult,2),\"is ultimate load in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "803.03 is ultimate load in kN\n"
- ]
- }
- ],
- "prompt_number": 45
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.8:Pg-163"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3.8\n",
- "\n",
- "q=16.0;# in kN/m^2\n",
- "Nqei=14.2;\n",
- "Gamma=16.0 # in kN/m^3\n",
- "B=1.5;# in m\n",
- "Nyet=20.0;\n",
- "Qult=B*(Nqei*q+1/2.0*Gamma*B*Nyet);\n",
- "print round(Qult,2),\" is ultimate load in kN/m\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "700.8 is ultimate load in kN/m\n"
- ]
- }
- ],
- "prompt_number": 48
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter04.ipynb b/Principles_Of_Foundation_Engineering/Chapter04.ipynb deleted file mode 100755 index da8b3fb8..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter04.ipynb +++ /dev/null @@ -1,365 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:84b2322c895fb47191307e7a54e3a6dc70036edd44f1781ba096e1e048c5f743"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 04:Ultimate Bearing Capacity of Shallow Foundations: Special Cases"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.1:Pg-176"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.1\n",
- "\n",
- "FS=4.0; # FOS\n",
- "q=110*2.0; # in 1b/ft^2\n",
- "Nq=90.0;\n",
- "Ny=50.0;\n",
- "Gamma=110.0; # in 1b/ft^3\n",
- "m1=0.34; # From Figure 4.6(a)\n",
- "B=2.5; # in ft\n",
- "L=2.5; # in ft\n",
- "H=1.5; # in ft\n",
- "phi=35; # in degree\n",
- "m2=0.45; # From Figure 4.6(b)\n",
- "Fqs=1-0.34*B/L;\n",
- "Fys=1-0.45*B/L;\n",
- "qu=q*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n",
- "Qall=qu*B**2/FS;\n",
- "print round(Qall,2),\"bearing load in lb\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "26326.95 bearing load in lb\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.2:Pg-177"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.2\n",
- "\n",
- "FS=3.0; # FOS\n",
- "cu=72.0;\n",
- "q=18.0; # in kN/m^3\n",
- "B=1.0;# in m\n",
- "H=0.25;# in m\n",
- "qu=5.14*(1+(0.5*B/H-0.707)/5.14)*cu+q;\n",
- "qall=qu/FS;\n",
- "print round(qall,1),\"bearing capacity of soil in kN/m**2\" \n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "160.4 bearing capacity of soil in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.3:Pg-183"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.3\n",
- "import math\n",
- "k=0; #B/L;\n",
- "c2=30;\n",
- "Gamma=17.5; # in kN/m^3\n",
- "H=1.5; # in m\n",
- "Df=1.2; # in m\n",
- "B=2.0; # in m\n",
- "Ks=2.5;\n",
- "phi=40; # in degree\n",
- "pi=math.pi;\n",
- "qu=(1+0.2*k)*5.14*c2+(1+k)*Gamma*H**2*(1+2*Df/H)*Ks*math.tan(phi*pi/180)/B+Gamma*H;\n",
- "Qu=qu*B;\n",
- "print round(Qu,2),\"is bearing capacity in kN/m\"\n",
- "print \"there is slight variation due to rounding off error\"\n",
- "#soil 2\n",
- "Ny=109.4;\n",
- "Nq=64.2;\n",
- "Fqs=1;\n",
- "Fys=1;\n",
- "qt=Gamma*Df*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n",
- "print qt,\"bearing capacity in kN/m**2\"\n",
- "\n",
- "# answer in book is different due to approximation"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "575.66 is bearing capacity in kN/m\n",
- "there is slight variation due to rounding off error\n",
- "3262.7 bearing capacity in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.4:Pg-184"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.4\n",
- "\n",
- "B=1.0; # in m\n",
- "L=1.5;# in m\n",
- "c2=48;# in m\n",
- "ca=108; # in KN/m^2\n",
- "D=1.0;# in m\n",
- "H=1.0;# in m\n",
- "Gamma=16.8; # in KN/m^3\n",
- "FS=4;\n",
- "qu=(1+0.2*B/L)*5.14*c2+(1+B/L)*2*ca*H/B+Gamma*D; # in KN/m^2\n",
- "c1=120.0;\n",
- "gamma1=16.8; # in kN/m^3\n",
- "Df=1.0;\n",
- "qt=(1+0.2*B/L)*5.14*c1+gamma1*Df;\n",
- "print qt,\"is qt in kN/m**2\"\n",
- "print \"no need to calculate qt since it is not useful for calculation\"\n",
- "print qu/FS,\"is allowable shear stress in kN/m**2\"\n",
- "print qu/FS*1*1.5,\" is allowable load in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "715.84 is qt in kN/m**2\n",
- "no need to calculate qt since it is not useful for calculation\n",
- "164.104 is allowable shear stress in kN/m**2\n",
- "246.156 is allowable load in kN\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.5:Pg-190"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.5\n",
- "\n",
- "c=50; # in KN/m^2\n",
- "#from table\n",
- "Ncq=6.3;\n",
- "FS=4.0;# FOS\n",
- "qu=c*Ncq; # in KN/m^2\n",
- "qall=qu/4;\n",
- "print qall,\"allowed shear stress in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "78.75 allowed shear stress in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.6:Pg-191"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.6\n",
- "\n",
- "Gamma=16.8; # in kN/m^3\n",
- "B=1.5;# in m\n",
- "#from table\n",
- "Nyq=120.0;\n",
- "qu=1/2.0*Gamma*B*Nyq; # in KN/m^2\n",
- "print qu,\" is shear stress in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1512.0 shear stress in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.7:Pg-198"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.7\n",
- "import math\n",
- "phi=35; # in degree\n",
- "Df=1.5; # in m\n",
- "B=1.5; # in m\n",
- "Gamma=17.4; # in kN/m^3\n",
- "A=math.pi/4*Df**2; # in m^2\n",
- "m=0.25;\n",
- "Ku=0.936;\n",
- "Fq=1+2*(1+m*Df/B)*Df/B*Ku*math.tan(phi*math.pi/180);\n",
- "Qu=Fq*Gamma*A*Df; # in KN/m^2\n",
- "print round(Qu,1),\" is bearing capacity in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "121.7 is bearing capacity in kN\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#example 4.8\n",
- "\n",
- "\n",
- "\n",
- "cu=52; # in kN/m^2\n",
- "\n",
- "B=1.5; # in m\n",
- "\n",
- "L=3; # in m\n",
- "\n",
- "k=0.107*cu+2.5;\n",
- "\n",
- "print round(k,2),\" is Df/B of square\" \n",
- "\n",
- "A=L*B; # in m^2\n",
- "\n",
- "Beta=0.2;\n",
- "\n",
- "Gamma=18.9; # in kN/m^3\n",
- "\n",
- "Df=1.8; # in m\n",
- "\n",
- "Qu=A*(Beta*(7.56+1.44*B/L)*cu+Gamma*Df); # in kN/m^2\n",
- "\n",
- "print round(Qu,1),\" is ultimate shear force in kN\"\n",
- "\n",
- " \n",
- "\n",
- " "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "8.06 is Df/B of square\n",
- "540.6 is ultimate shear force in kN\n"
- ]
- }
- ],
- "prompt_number": 20
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter04_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter04_1.ipynb deleted file mode 100755 index 1d75ed9f..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter04_1.ipynb +++ /dev/null @@ -1,373 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:7e16b5ec29439d0d7eaa54a0826b64a36c559ed79f17d130c42f4478805c682f"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 04:Ultimate Bearing Capacity of Shallow Foundations: Special Cases"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.1:Pg-176"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.1\n",
- "\n",
- "FS=4.0; # FOS\n",
- "q=110*2.0; # in 1b/ft^2\n",
- "Nq=90.0;\n",
- "Ny=50.0;\n",
- "Gamma=110.0; # in 1b/ft^3\n",
- "m1=0.34; # From Figure 4.6(a)\n",
- "B=2.5; # in ft\n",
- "L=2.5; # in ft\n",
- "H=1.5; # in ft\n",
- "phi=35; # in degree\n",
- "m2=0.45; # From Figure 4.6(b)\n",
- "Fqs=1-0.34*B/L;\n",
- "Fys=1-0.45*B/L;\n",
- "qu=q*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n",
- "Qall=qu*B**2/FS;\n",
- "print round(Qall,2),\"bearing load in lb\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "26326.95 bearing load in lb\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.2:Pg-177"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.2\n",
- "\n",
- "FS=3.0; # FOS\n",
- "cu=72.0;\n",
- "q=18.0; # in kN/m^3\n",
- "B=1.0;# in m\n",
- "H=0.25;# in m\n",
- "qu=5.14*(1+(0.5*B/H-0.707)/5.14)*cu+q;\n",
- "qall=qu/FS;\n",
- "print round(qall,1),\"bearing capacity of soil in kN/m**2\" \n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "160.4 bearing capacity of soil in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.3:Pg-183"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.3\n",
- "import math\n",
- "k=0; #B/L;\n",
- "c2=30;\n",
- "Gamma=17.5; # in kN/m^3\n",
- "H=1.5; # in m\n",
- "Df=1.2; # in m\n",
- "B=2.0; # in m\n",
- "Ks=2.5;\n",
- "phi=40; # in degree\n",
- "pi=math.pi;\n",
- "qu=(1+0.2*k)*5.14*c2+(1+k)*Gamma*H**2*(1+2*Df/H)*Ks*math.tan(phi*pi/180)/B+Gamma*H;\n",
- "Qu=qu*B;\n",
- "print round(Qu,2),\"is bearing capacity in kN/m\"\n",
- "print \"there is slight variation due to rounding off error\"\n",
- "#soil 2\n",
- "Ny=109.4;\n",
- "Nq=64.2;\n",
- "Fqs=1;\n",
- "Fys=1;\n",
- "qt=Gamma*Df*Nq*Fqs+1/2.0*Gamma*Ny*Fys*B;\n",
- "print qt,\"bearing capacity in kN/m**2\"\n",
- "\n",
- "# answer in book is different due to approximation"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "575.66 is bearing capacity in kN/m\n",
- "there is slight variation due to rounding off error\n",
- "3262.7 bearing capacity in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.4:Pg-184"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.4\n",
- "\n",
- "B=1.0; # in m\n",
- "L=1.5;# in m\n",
- "c2=48;# in m\n",
- "ca=108; # in KN/m^2\n",
- "D=1.0;# in m\n",
- "H=1.0;# in m\n",
- "Gamma=16.8; # in KN/m^3\n",
- "FS=4;\n",
- "qu=(1+0.2*B/L)*5.14*c2+(1+B/L)*2*ca*H/B+Gamma*D; # in KN/m^2\n",
- "c1=120.0;\n",
- "gamma1=16.8; # in kN/m^3\n",
- "Df=1.0;\n",
- "qt=(1+0.2*B/L)*5.14*c1+gamma1*Df;\n",
- "print qt,\"is qt in kN/m**2\"\n",
- "print \"no need to calculate qt since it is not useful for calculation\"\n",
- "print qu/FS,\"is allowable shear stress in kN/m**2\"\n",
- "print qu/FS*1*1.5,\" is allowable load in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "715.84 is qt in kN/m**2\n",
- "no need to calculate qt since it is not useful for calculation\n",
- "164.104 is allowable shear stress in kN/m**2\n",
- "246.156 is allowable load in kN\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.5:Pg-190"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.5\n",
- "\n",
- "c=50; # in KN/m^2\n",
- "#from table\n",
- "Ncq=6.3;\n",
- "FS=4.0;# FOS\n",
- "qu=c*Ncq; # in KN/m^2\n",
- "qall=qu/4;\n",
- "print qall,\"allowed shear stress in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "78.75 allowed shear stress in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.6:Pg-191"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.6\n",
- "\n",
- "Gamma=16.8; # in kN/m^3\n",
- "B=1.5;# in m\n",
- "#from table\n",
- "Nyq=120.0;\n",
- "qu=1/2.0*Gamma*B*Nyq; # in KN/m^2\n",
- "print qu,\" is shear stress in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1512.0 shear stress in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.7:Pg-198"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4.7\n",
- "import math\n",
- "phi=35; # in degree\n",
- "Df=1.5; # in m\n",
- "B=1.5; # in m\n",
- "Gamma=17.4; # in kN/m^3\n",
- "A=math.pi/4*Df**2; # in m^2\n",
- "m=0.25;\n",
- "Ku=0.936;\n",
- "Fq=1+2*(1+m*Df/B)*Df/B*Ku*math.tan(phi*math.pi/180);\n",
- "Qu=Fq*Gamma*A*Df; # in KN/m^2\n",
- "print round(Qu,1),\" is bearing capacity in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "121.7 is bearing capacity in kN\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.8:pg-198"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#example 4.8\n",
- "\n",
- "\n",
- "\n",
- "cu=52; # in kN/m^2\n",
- "\n",
- "B=1.5; # in m\n",
- "\n",
- "L=3; # in m\n",
- "\n",
- "k=0.107*cu+2.5;\n",
- "\n",
- "print round(k,2),\" is Df/B of square\" \n",
- "\n",
- "A=L*B; # in m^2\n",
- "\n",
- "Beta=0.2;\n",
- "\n",
- "Gamma=18.9; # in kN/m^3\n",
- "\n",
- "Df=1.8; # in m\n",
- "\n",
- "Qu=A*(Beta*(7.56+1.44*B/L)*cu+Gamma*Df); # in kN/m^2\n",
- "\n",
- "print round(Qu,1),\" is ultimate shear force in kN\"\n",
- "\n",
- " \n",
- "\n",
- " "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "8.06 is Df/B of square\n",
- "540.6 is ultimate shear force in kN\n"
- ]
- }
- ],
- "prompt_number": 20
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter05.ipynb b/Principles_Of_Foundation_Engineering/Chapter05.ipynb deleted file mode 100755 index ca975aae..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter05.ipynb +++ /dev/null @@ -1,550 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:77a2cf465cec464205dc151afe10d9acafa79fe1b46b30f4a468368f8af3f8ea"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter05:Shallow Foundations: Allowable Bearing Capacity and Settlement"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.1:Pg-212"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.1\n",
- "\n",
- "#first solution\n",
- "B1=2.5; # in ft\n",
- "B2=B1;\n",
- "z=12.5; # in ft\n",
- "L1=5; # in ft\n",
- "L2=L1;\n",
- "m=B1/z;\n",
- "n=B2/z;\n",
- "#from table 5.2 of the values using m,n\n",
- "q=2000; # in lb/ft^2\n",
- "I=0.0328;\n",
- "deltasigma=q*4*I; # in lb/ft**2\n",
- "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n",
- "#second solution\n",
- "Ic=0.131;#from table\n",
- "deltasigma=q*Ic; # in lb/ft**2\n",
- "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "262.4 change in pressure in lb/ft**2\n",
- "262.0 change in pressure in lb/ft**2\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.2:Pg-215"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.2\n",
- "\n",
- "qo=100; # in KN/m^2\n",
- "H1=3; # in m\n",
- "H2=5; # in m\n",
- "#from table\n",
- "IaH2=0.126;\n",
- "IaH1=0.175;\n",
- "deltasigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1)); # in kN/m**2\n",
- "print round(deltasigma,2),\"change in pressure in kN/m**2\"\n",
- "TS=4*deltasigma; # in kN/m**2\n",
- "print round(TS,2),\"total change in pressure in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "5.25 change in pressure in kN/m**2\n",
- "21.0 total change in pressure in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.3:Pg-217"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.3\n",
- "H=7;\n",
- "Gamma=17.5; # in KN/m^3\n",
- "q0=Gamma*H # in KN/m^2\n",
- "print q0,\" is pressure change in kN/m**2\"\n",
- "#part2\n",
- "#from figure\n",
- "Ileftside=0.445;\n",
- "Irightside=0.445;\n",
- "deltasigma=q0*(Ileftside+Irightside); # in KN/m^2\n",
- "print round(deltasigma,2),\"is change in stress in kN/m**2\"\n",
- "#partc\n",
- "#from figure 5.11\n",
- "I=0.24;#I'\n",
- "Dsigma1=43.75*I;#deltasigma1 in KN/m^2\n",
- "I2=0.495;#I'\n",
- "Dsigma2=I2*q0;#deltasigma2 in KN/m^2\n",
- "I3=0.335;#I'\n",
- "Dsigma3=I3*78.75;#deltasigma3 in KN/m^2\n",
- "Dsigma=Dsigma1+Dsigma2-Dsigma3; # in KN/m^2\n",
- "print round(Dsigma,2),\"is total stress increase in A in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "122.5 is pressure change in kN/m**2\n",
- "109.03 is change in stress in kN/m**2\n",
- "44.76 is total stress increase in A in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.4:Pg-228"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.4\n",
- "\n",
- "zbar=5;\n",
- "mus=0.3;\n",
- "F1=0.641;\n",
- "F2=0.031;\n",
- "z1=2.0; # in m\n",
- "z2=1.0; # in m\n",
- "z3=2.0; # in m\n",
- "Es1=10000; # in kN/m**2\n",
- "Es2=8000; # in kN/m**2\n",
- "Es3=12000;# in kN/m**2\n",
- "qo=150; # in KN/m^2\n",
- "#from table 5.4\n",
- "If=0.709;\n",
- "Es=(Es1*z1+Es2*z2+Es3*z3)/zbar; # in kN/m**2\n",
- "print Es,\" is modulus of elasticity in kN/m**2\"\n",
- "Is=F1+(2-mus)/(1-mus)*F2;\n",
- "Sc=qo*(1.0/Es-mus**2.0/Es)*Is*If*2;\n",
- "Scrigid=0.93*Sc; # in m\n",
- "print round(Scrigid*1000,2),\"is settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "10400.0 is modulus of elasticity in kN/m**2\n",
- "12.4 is settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.5:Pg-234"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.5\n",
- "import math\n",
- "B=5; # in ft\n",
- "L=10; # in ft\n",
- "Ef=2.3e6; # in lb/in^2\n",
- "Eo=1400.0; # in lb/in^2\n",
- "k=25.0; # in lb/in^2/ft\n",
- "t=1.0;\n",
- "mus=0.3;\n",
- "Df=5.0; # in ft\n",
- "qo=5000.0; # in lb/ft^2\n",
- "Ig=0.69;\n",
- "Be=math.sqrt(4*B*L/math.pi);\n",
- "If=math.pi/4+1/(4.6+10*(Ef/(Eo+2*Be/2*k))*(2*t/Be)**3);\n",
- "Ie=1-1/(3.5*math.exp(1.22*mus-0.4)*(Be/Df+1.6));\n",
- "Se=qo*Be*Ig*If*Ie/Eo*(1-mus**2)/144; # in ft\n",
- "print round(Se*12,2),\"settlement in inches\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.07 settlement in inches\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.6:238"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.6\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "q=3.06; # in lb/in^2\n",
- "qbar=25; # in lb/in^2\n",
- "C1=1-0.5*(q/(qbar-q));\n",
- "Sum=0;\n",
- "C2=1+0.2*math.log10(10/0.1);\n",
- "L=[1, 2, 3, 4, 5];\n",
- "Dz=[48, 48, 96, 48, 144]; # in inch\n",
- "Es=[750, 1250, 1250, 1000, 2000]; # in lb/in^2\n",
- "z=[24, 72, 144, 216, 312]; # in inch\n",
- "Iz=[0.275, 0.425, 0.417, 0.292, 0.125];\n",
- "k=numpy.zeros(5)\n",
- "print \"Layer No.\\t deltaz (in)\\t Es(lb/in**2)\\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \\n\"\n",
- "for i in range(0,5):\n",
- " k[i]=Iz[i]/Es[i]*Dz[i];\n",
- " print L[i],\"\\t \\t \",Dz[i],\"\\t\\t \",Es[i],\"\\t\\t \",z[i],\" \\t\\t\\t\\t\\t \",Iz[i],\"\\t\\t \",round(k[i],3)\n",
- " Sum=Sum+k[i];\n",
- "\n",
- "Se=C1*C2*(qbar-q)*Sum; # in inch\n",
- "print round(Se,2),\"settlement in inches\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Layer No.\t deltaz (in)\t Es(lb/in**2)\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \n",
- "\n",
- "1 \t \t 48 \t\t 750 \t\t 24 \t\t\t\t\t 0.275 \t\t 0.018\n",
- "2 \t \t 48 \t\t 1250 \t\t 72 \t\t\t\t\t 0.425 \t\t 0.016\n",
- "3 \t \t 96 \t\t 1250 \t\t 144 \t\t\t\t\t 0.417 \t\t 0.032\n",
- "4 \t \t 48 \t\t 1000 \t\t 216 \t\t\t\t\t 0.292 \t\t 0.014\n",
- "5 \t \t 144 \t\t 2000 \t\t 312 \t\t\t\t\t 0.125 \t\t 0.009\n",
- "2.54 settlement in inches\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.7:Pg-244"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.7\n",
- "\n",
- "Df=1.0; # in m\n",
- "B=1.75; # in m\n",
- "L=1.75 # in m\n",
- "qnet=120.0; # in KN/m^2\n",
- "N60=10.0;# in m\n",
- "alpha1=0.14 # for normally consolated sand\n",
- "alpha2=1.71/(N60)**1.4 # for normally consolated sand\n",
- "alpha3=1.0 # for normally consolated sand\n",
- "Se=0.3*alpha1*alpha2*alpha3*(qnet/100)*((B/0.3)**0.7)*((1.25*(L/B)/(0.25+(L/B))))**2\n",
- "print round(Se*1000,2),\"settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "11.79 settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.8:Pg-245"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.8\n",
- "\n",
- "Df=1; # in m\n",
- "B=1.75; # in m\n",
- "qnet=120; # in KN/m^2\n",
- "N60=10; # in m\n",
- "Fd=1+0.33*Df/B;\n",
- "Se=2*qnet/N60/Fd*(B/(B+0.3))**2; # in mm\n",
- "print round(Se,2),\"settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "14.71 settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.9:Pg-251"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.9\n",
- "\n",
- "Ny=23.76; \n",
- "Nq=16.51; \n",
- "q=3*110.0; # in lb/ft^2\n",
- "Gamma=110.0; # in lb/ft^3\n",
- "B=4.0; # in ft\n",
- "Nqe=0.63*Nq;\n",
- "Nye=0.4*Ny;\n",
- "que=q*Nqe+1/2.0*Gamma*B*Nye; # in lb/ft^2\n",
- "print round(que,2),\" is bearing capacity in lb/ft**2\"\n",
- "#part 2\n",
- "V=0.4; # in ft/sec\n",
- "A=0.32; # given in question\n",
- "g=9.81; # acceleration constant in m/sec^2\n",
- "kh=0.26;\n",
- "k=0.92;#tan(alphae)\n",
- "Seq=0.174*k*V**2/A/g*kh**-4/A**-4; # in m\n",
- "print round(Seq,3),\"settelement in m\"\n",
- "print round(Seq*39.57,2),\"settlement in inches\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "5523.31 is bearing capacity in lb/ft**2\n",
- "0.019 settelement in m\n",
- "0.74 settlement in inches\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.10:Pg-256"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.10\n",
- "\n",
- "import math\n",
- "Cc=0.32;\n",
- "Hc=2.5;\n",
- "eo=0.8;\n",
- "sigmao=2.5*16.5+0.5*(17.5-9.81)+1.25*(16-9.81); # in kN/m^2\n",
- "m1=[2, 2, 2];\n",
- "z=[2, 3.25, 4.5];\n",
- "n1=[4, 6.5, 9];\n",
- "Ic=[0.19, 0.085, 0.045];\n",
- "Dsigma=[28.5, 12.75, 6.75];#deltasigma\n",
- "print (\"m1\\t z(m)\\t n1\\t Ic\\t Dsigma \\n\");\n",
- "for i in range(0,3):\n",
- " print round(m1[i],2),\"\\t \",round(z[i],2),\"\\t \",round(n1[i],2),\"\\t \",round(Ic[i],2),\"\\t \",round(Dsigma[i],2)\n",
- "\n",
- " Dsigmaav=1/6.0*(Dsigma[0]+4*Dsigma[1]+Dsigma[2]);\n",
- " Sc=Cc*Hc/(1+eo)*math.log10((sigmao+Dsigmaav)/sigmao);\n",
- "print round(Sc*1000,2),\"settlement in mm\"\n",
- "#partb\n",
- "B=1.0; # in m\n",
- "L=2.0; # in m\n",
- "z=0.5+1.5; # in m\n",
- "B=B+z; # in m\n",
- "L=L+z; # in m\n",
- "A=0.6; # given in question\n",
- "#from table\n",
- "kcr=0.78; # by data\n",
- "Sep=kcr*Sc;\n",
- "print round(Sep*1000,2),\"settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "m1\t z(m)\t n1\t Ic\t Dsigma \n",
- "\n",
- "2.0 \t 2.0 \t 4.0 \t 0.19 \t 28.5\n",
- "2.0 \t 3.25 \t 6.5 \t 0.09 \t 12.75\n",
- "2.0 \t 4.5 \t 9.0 \t 0.04 \t 6.75\n",
- "46.45 settlement in mm\n",
- "36.23 settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.11:Pg-262"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.11\n",
- "\n",
- "import numpy\n",
- "N60=(3+7+12+12+16)/5.0;\n",
- "B=[2, 2.25, 2.3]; # in m\n",
- "Fd=[1.248, 1.22, 1.215];\n",
- "Qoac=102000*9.81/1000;#actual Qo\n",
- "Se=25; # in mm\n",
- "qnet=numpy.zeros(3)\n",
- "Qo=numpy.zeros(3) # in kN\n",
- "print \"B(m)\\t Fd\\t qnet(kN/m**2)\\t \\t Qo \\n\"\n",
- "for i in range(0,3):\n",
- " qnet[i]=10/0.08*(B[i]+0.3)**2/(B[i])**2*Fd[i]*Se/25;\n",
- " Qo[i]=qnet[i]*B[i]**2;\n",
- " print B[i],\"\\t\",Fd[i],\" \\t \",round(qnet[i],2),\"\\t\\t \",Qo[i],\"\\n\"\n",
- "print int(Qoac),\"value of Qo in kN\"\n",
- "print \"since Qo is 1000 kN thus B is equal to 2.3 m from the table\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "B(m)\t Fd\t qnet(kN/m**2)\t \t Qo \n",
- "\n",
- "2 \t1.248 \t 206.31 \t\t 825.24 \n",
- "\n",
- "2.25 \t1.22 \t 195.88 \t\t 991.63125 \n",
- "\n",
- "2.3 \t1.215 \t 194.08 \t\t 1026.675 \n",
- "\n",
- "1000 value of Qo in kN\n",
- "since Qo is 1000 kN thus B is equal to 2.3 m from the table\n"
- ]
- }
- ],
- "prompt_number": 24
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter05_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter05_1.ipynb deleted file mode 100755 index ca975aae..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter05_1.ipynb +++ /dev/null @@ -1,550 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:77a2cf465cec464205dc151afe10d9acafa79fe1b46b30f4a468368f8af3f8ea"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter05:Shallow Foundations: Allowable Bearing Capacity and Settlement"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.1:Pg-212"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.1\n",
- "\n",
- "#first solution\n",
- "B1=2.5; # in ft\n",
- "B2=B1;\n",
- "z=12.5; # in ft\n",
- "L1=5; # in ft\n",
- "L2=L1;\n",
- "m=B1/z;\n",
- "n=B2/z;\n",
- "#from table 5.2 of the values using m,n\n",
- "q=2000; # in lb/ft^2\n",
- "I=0.0328;\n",
- "deltasigma=q*4*I; # in lb/ft**2\n",
- "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n",
- "#second solution\n",
- "Ic=0.131;#from table\n",
- "deltasigma=q*Ic; # in lb/ft**2\n",
- "print round(deltasigma,2),\"change in pressure in lb/ft**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "262.4 change in pressure in lb/ft**2\n",
- "262.0 change in pressure in lb/ft**2\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.2:Pg-215"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.2\n",
- "\n",
- "qo=100; # in KN/m^2\n",
- "H1=3; # in m\n",
- "H2=5; # in m\n",
- "#from table\n",
- "IaH2=0.126;\n",
- "IaH1=0.175;\n",
- "deltasigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1)); # in kN/m**2\n",
- "print round(deltasigma,2),\"change in pressure in kN/m**2\"\n",
- "TS=4*deltasigma; # in kN/m**2\n",
- "print round(TS,2),\"total change in pressure in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "5.25 change in pressure in kN/m**2\n",
- "21.0 total change in pressure in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.3:Pg-217"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.3\n",
- "H=7;\n",
- "Gamma=17.5; # in KN/m^3\n",
- "q0=Gamma*H # in KN/m^2\n",
- "print q0,\" is pressure change in kN/m**2\"\n",
- "#part2\n",
- "#from figure\n",
- "Ileftside=0.445;\n",
- "Irightside=0.445;\n",
- "deltasigma=q0*(Ileftside+Irightside); # in KN/m^2\n",
- "print round(deltasigma,2),\"is change in stress in kN/m**2\"\n",
- "#partc\n",
- "#from figure 5.11\n",
- "I=0.24;#I'\n",
- "Dsigma1=43.75*I;#deltasigma1 in KN/m^2\n",
- "I2=0.495;#I'\n",
- "Dsigma2=I2*q0;#deltasigma2 in KN/m^2\n",
- "I3=0.335;#I'\n",
- "Dsigma3=I3*78.75;#deltasigma3 in KN/m^2\n",
- "Dsigma=Dsigma1+Dsigma2-Dsigma3; # in KN/m^2\n",
- "print round(Dsigma,2),\"is total stress increase in A in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "122.5 is pressure change in kN/m**2\n",
- "109.03 is change in stress in kN/m**2\n",
- "44.76 is total stress increase in A in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.4:Pg-228"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.4\n",
- "\n",
- "zbar=5;\n",
- "mus=0.3;\n",
- "F1=0.641;\n",
- "F2=0.031;\n",
- "z1=2.0; # in m\n",
- "z2=1.0; # in m\n",
- "z3=2.0; # in m\n",
- "Es1=10000; # in kN/m**2\n",
- "Es2=8000; # in kN/m**2\n",
- "Es3=12000;# in kN/m**2\n",
- "qo=150; # in KN/m^2\n",
- "#from table 5.4\n",
- "If=0.709;\n",
- "Es=(Es1*z1+Es2*z2+Es3*z3)/zbar; # in kN/m**2\n",
- "print Es,\" is modulus of elasticity in kN/m**2\"\n",
- "Is=F1+(2-mus)/(1-mus)*F2;\n",
- "Sc=qo*(1.0/Es-mus**2.0/Es)*Is*If*2;\n",
- "Scrigid=0.93*Sc; # in m\n",
- "print round(Scrigid*1000,2),\"is settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "10400.0 is modulus of elasticity in kN/m**2\n",
- "12.4 is settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.5:Pg-234"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.5\n",
- "import math\n",
- "B=5; # in ft\n",
- "L=10; # in ft\n",
- "Ef=2.3e6; # in lb/in^2\n",
- "Eo=1400.0; # in lb/in^2\n",
- "k=25.0; # in lb/in^2/ft\n",
- "t=1.0;\n",
- "mus=0.3;\n",
- "Df=5.0; # in ft\n",
- "qo=5000.0; # in lb/ft^2\n",
- "Ig=0.69;\n",
- "Be=math.sqrt(4*B*L/math.pi);\n",
- "If=math.pi/4+1/(4.6+10*(Ef/(Eo+2*Be/2*k))*(2*t/Be)**3);\n",
- "Ie=1-1/(3.5*math.exp(1.22*mus-0.4)*(Be/Df+1.6));\n",
- "Se=qo*Be*Ig*If*Ie/Eo*(1-mus**2)/144; # in ft\n",
- "print round(Se*12,2),\"settlement in inches\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.07 settlement in inches\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.6:238"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.6\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "q=3.06; # in lb/in^2\n",
- "qbar=25; # in lb/in^2\n",
- "C1=1-0.5*(q/(qbar-q));\n",
- "Sum=0;\n",
- "C2=1+0.2*math.log10(10/0.1);\n",
- "L=[1, 2, 3, 4, 5];\n",
- "Dz=[48, 48, 96, 48, 144]; # in inch\n",
- "Es=[750, 1250, 1250, 1000, 2000]; # in lb/in^2\n",
- "z=[24, 72, 144, 216, 312]; # in inch\n",
- "Iz=[0.275, 0.425, 0.417, 0.292, 0.125];\n",
- "k=numpy.zeros(5)\n",
- "print \"Layer No.\\t deltaz (in)\\t Es(lb/in**2)\\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \\n\"\n",
- "for i in range(0,5):\n",
- " k[i]=Iz[i]/Es[i]*Dz[i];\n",
- " print L[i],\"\\t \\t \",Dz[i],\"\\t\\t \",Es[i],\"\\t\\t \",z[i],\" \\t\\t\\t\\t\\t \",Iz[i],\"\\t\\t \",round(k[i],3)\n",
- " Sum=Sum+k[i];\n",
- "\n",
- "Se=C1*C2*(qbar-q)*Sum; # in inch\n",
- "print round(Se,2),\"settlement in inches\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Layer No.\t deltaz (in)\t Es(lb/in**2)\t z to the middle of the layer (in) Iz at the middle of the layer Iz/delta(z) \n",
- "\n",
- "1 \t \t 48 \t\t 750 \t\t 24 \t\t\t\t\t 0.275 \t\t 0.018\n",
- "2 \t \t 48 \t\t 1250 \t\t 72 \t\t\t\t\t 0.425 \t\t 0.016\n",
- "3 \t \t 96 \t\t 1250 \t\t 144 \t\t\t\t\t 0.417 \t\t 0.032\n",
- "4 \t \t 48 \t\t 1000 \t\t 216 \t\t\t\t\t 0.292 \t\t 0.014\n",
- "5 \t \t 144 \t\t 2000 \t\t 312 \t\t\t\t\t 0.125 \t\t 0.009\n",
- "2.54 settlement in inches\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.7:Pg-244"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.7\n",
- "\n",
- "Df=1.0; # in m\n",
- "B=1.75; # in m\n",
- "L=1.75 # in m\n",
- "qnet=120.0; # in KN/m^2\n",
- "N60=10.0;# in m\n",
- "alpha1=0.14 # for normally consolated sand\n",
- "alpha2=1.71/(N60)**1.4 # for normally consolated sand\n",
- "alpha3=1.0 # for normally consolated sand\n",
- "Se=0.3*alpha1*alpha2*alpha3*(qnet/100)*((B/0.3)**0.7)*((1.25*(L/B)/(0.25+(L/B))))**2\n",
- "print round(Se*1000,2),\"settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "11.79 settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.8:Pg-245"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.8\n",
- "\n",
- "Df=1; # in m\n",
- "B=1.75; # in m\n",
- "qnet=120; # in KN/m^2\n",
- "N60=10; # in m\n",
- "Fd=1+0.33*Df/B;\n",
- "Se=2*qnet/N60/Fd*(B/(B+0.3))**2; # in mm\n",
- "print round(Se,2),\"settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "14.71 settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.9:Pg-251"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.9\n",
- "\n",
- "Ny=23.76; \n",
- "Nq=16.51; \n",
- "q=3*110.0; # in lb/ft^2\n",
- "Gamma=110.0; # in lb/ft^3\n",
- "B=4.0; # in ft\n",
- "Nqe=0.63*Nq;\n",
- "Nye=0.4*Ny;\n",
- "que=q*Nqe+1/2.0*Gamma*B*Nye; # in lb/ft^2\n",
- "print round(que,2),\" is bearing capacity in lb/ft**2\"\n",
- "#part 2\n",
- "V=0.4; # in ft/sec\n",
- "A=0.32; # given in question\n",
- "g=9.81; # acceleration constant in m/sec^2\n",
- "kh=0.26;\n",
- "k=0.92;#tan(alphae)\n",
- "Seq=0.174*k*V**2/A/g*kh**-4/A**-4; # in m\n",
- "print round(Seq,3),\"settelement in m\"\n",
- "print round(Seq*39.57,2),\"settlement in inches\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "5523.31 is bearing capacity in lb/ft**2\n",
- "0.019 settelement in m\n",
- "0.74 settlement in inches\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.10:Pg-256"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.10\n",
- "\n",
- "import math\n",
- "Cc=0.32;\n",
- "Hc=2.5;\n",
- "eo=0.8;\n",
- "sigmao=2.5*16.5+0.5*(17.5-9.81)+1.25*(16-9.81); # in kN/m^2\n",
- "m1=[2, 2, 2];\n",
- "z=[2, 3.25, 4.5];\n",
- "n1=[4, 6.5, 9];\n",
- "Ic=[0.19, 0.085, 0.045];\n",
- "Dsigma=[28.5, 12.75, 6.75];#deltasigma\n",
- "print (\"m1\\t z(m)\\t n1\\t Ic\\t Dsigma \\n\");\n",
- "for i in range(0,3):\n",
- " print round(m1[i],2),\"\\t \",round(z[i],2),\"\\t \",round(n1[i],2),\"\\t \",round(Ic[i],2),\"\\t \",round(Dsigma[i],2)\n",
- "\n",
- " Dsigmaav=1/6.0*(Dsigma[0]+4*Dsigma[1]+Dsigma[2]);\n",
- " Sc=Cc*Hc/(1+eo)*math.log10((sigmao+Dsigmaav)/sigmao);\n",
- "print round(Sc*1000,2),\"settlement in mm\"\n",
- "#partb\n",
- "B=1.0; # in m\n",
- "L=2.0; # in m\n",
- "z=0.5+1.5; # in m\n",
- "B=B+z; # in m\n",
- "L=L+z; # in m\n",
- "A=0.6; # given in question\n",
- "#from table\n",
- "kcr=0.78; # by data\n",
- "Sep=kcr*Sc;\n",
- "print round(Sep*1000,2),\"settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "m1\t z(m)\t n1\t Ic\t Dsigma \n",
- "\n",
- "2.0 \t 2.0 \t 4.0 \t 0.19 \t 28.5\n",
- "2.0 \t 3.25 \t 6.5 \t 0.09 \t 12.75\n",
- "2.0 \t 4.5 \t 9.0 \t 0.04 \t 6.75\n",
- "46.45 settlement in mm\n",
- "36.23 settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.11:Pg-262"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5.11\n",
- "\n",
- "import numpy\n",
- "N60=(3+7+12+12+16)/5.0;\n",
- "B=[2, 2.25, 2.3]; # in m\n",
- "Fd=[1.248, 1.22, 1.215];\n",
- "Qoac=102000*9.81/1000;#actual Qo\n",
- "Se=25; # in mm\n",
- "qnet=numpy.zeros(3)\n",
- "Qo=numpy.zeros(3) # in kN\n",
- "print \"B(m)\\t Fd\\t qnet(kN/m**2)\\t \\t Qo \\n\"\n",
- "for i in range(0,3):\n",
- " qnet[i]=10/0.08*(B[i]+0.3)**2/(B[i])**2*Fd[i]*Se/25;\n",
- " Qo[i]=qnet[i]*B[i]**2;\n",
- " print B[i],\"\\t\",Fd[i],\" \\t \",round(qnet[i],2),\"\\t\\t \",Qo[i],\"\\n\"\n",
- "print int(Qoac),\"value of Qo in kN\"\n",
- "print \"since Qo is 1000 kN thus B is equal to 2.3 m from the table\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "B(m)\t Fd\t qnet(kN/m**2)\t \t Qo \n",
- "\n",
- "2 \t1.248 \t 206.31 \t\t 825.24 \n",
- "\n",
- "2.25 \t1.22 \t 195.88 \t\t 991.63125 \n",
- "\n",
- "2.3 \t1.215 \t 194.08 \t\t 1026.675 \n",
- "\n",
- "1000 value of Qo in kN\n",
- "since Qo is 1000 kN thus B is equal to 2.3 m from the table\n"
- ]
- }
- ],
- "prompt_number": 24
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter06.ipynb b/Principles_Of_Foundation_Engineering/Chapter06.ipynb deleted file mode 100755 index d87679c7..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter06.ipynb +++ /dev/null @@ -1,351 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:0ea06255a04932e0bf9952689cf2f6d919d320d1161a790bec574191c6fbafa1"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter06: Mat Foundations"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.1:Pg-279"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.1\n",
- "\n",
- "B=30; # in ft\n",
- "L=45; # in ft\n",
- "Df=6.5; # in ft\n",
- "cu=1950;# in lb/ft^2\n",
- "qunet=5.14*cu*(1+0.195*B/L)*(1+0.4*Df/B);\n",
- "print int(qunet),\" is allowed force in lb/ft**2\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "12307 is allowed force in lb/ft**2\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.2:Pg-280"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.2\n",
- "\n",
- "N60=10; # penetration number\n",
- "Df=2; # in m\n",
- "B=10.0; # in m\n",
- "Se=25.0; # in mm\n",
- "qnetall=N60/0.08*(1+0.33*Df/B)*Se/25;\n",
- "print qnetall,\" is allowed pressure in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "133.25 is allowed pressure in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.3:Pg-283"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.3\n",
- "\n",
- "cu=2800; # in lb/ft^2\n",
- "B=60; # in ft\n",
- "L=100; # in ft\n",
- "Df=5; # in ft\n",
- "\n",
- "Gamma=120; # in lb/ft^3\n",
- "A=60*100; # in ft^2\n",
- "Q=25e6; # load in Kip\n",
- "FS=5.14*cu*(1+0.195*B/L)*(1+0.4*Df/B)/(Q/A-Gamma*Df);\n",
- "print round(FS,2),\" is factor of safety\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4.66 is factor of safety\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.4:Pg-284"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.4\n",
- "\n",
- "import math\n",
- "Cc=0.28;\n",
- "Hc=18*12.0;\n",
- "e0=0.9;\n",
- "sigmao=11*100+40*(121.5-64)+18/2*(118-62.4); # in lb/ft^2\n",
- "H2=5+40+18.0;\n",
- "H1=5+40.0;\n",
- "qo=3567.0;\n",
- "#from table\n",
- "IaH2=0.21;\n",
- "IaH1=0.225;\n",
- "Dsigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1))*4;\n",
- "Scp=Cc*Hc/(1+e0)*math.log10(sigmao/sigmao+Dsigma/sigmao);\n",
- "print round(Scp,2),\"is settlement in inches\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "6.76 is settlement in inches\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.5:Pg-296"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.5\n",
- "import numpy\n",
- "P=['A','B','C','D','E','F','G','H','I','J','K','L','M','N'];#point\n",
- "k=1.2*numpy.ones(14);#Q/A\n",
- "x=[-38,-24, -12, 0, 12, 24, 38, 38, 24, 12, 0, -12, -24, -38];\n",
- "x1=numpy.zeros(14)\n",
- "for i in range(0,14):\n",
- " x1[i]=0.0017*x[i];\n",
- "y=[48,48,48,48,48,48,48, -48, -48, -48, -48, -48, -48, -48];\n",
- "y1=numpy.zeros(14)\n",
- "for i in range(0,14):\n",
- " y1[i]=-0.0011*y[i];\n",
- "print \"point\\t Q\\A (kip/ft**2) x(ft)\\t 0.0017x(ft)\\t\\ty(ft)\\t \\t 0.0011y(ft)\\t \\t q(kip/ft**2)\\n\"\n",
- "q=numpy.zeros(14)\n",
- "for i in range(0,14):\n",
- " q[i]=1.2+x1[i]+y1[i];\n",
- " print P[i],\"\\t \",k[i],\"\\t\\t \",x[i],\"\\t\\t\",round(x1[i],3),\"\\t\\t\",y[i],\"\\t \\t \",round(y1[i],3),\"\\t \\t \\t\",round(q[i],3),\"\\t\\t \\n \"\n",
- "\n",
- "print \"the soil pressure at all point is less than the given qallnet=1.5 kip/ft**2\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "point\t Q\\A (kip/ft**2) x(ft)\t 0.0017x(ft)\t\ty(ft)\t \t 0.0011y(ft)\t \t q(kip/ft**2)\n",
- "\n",
- "A \t 1.2 \t\t -38 \t\t-0.065 \t\t48 \t \t -0.053 \t \t \t1.083 \t\t \n",
- " \n",
- "B \t 1.2 \t\t -24 \t\t-0.041 \t\t48 \t \t -0.053 \t \t \t1.106 \t\t \n",
- " \n",
- "C \t 1.2 \t\t -12 \t\t-0.02 \t\t48 \t \t -0.053 \t \t \t1.127 \t\t \n",
- " \n",
- "D \t 1.2 \t\t 0 \t\t0.0 \t\t48 \t \t -0.053 \t \t \t1.147 \t\t \n",
- " \n",
- "E \t 1.2 \t\t 12 \t\t0.02 \t\t48 \t \t -0.053 \t \t \t1.168 \t\t \n",
- " \n",
- "F \t 1.2 \t\t 24 \t\t0.041 \t\t48 \t \t -0.053 \t \t \t1.188 \t\t \n",
- " \n",
- "G \t 1.2 \t\t 38 \t\t0.065 \t\t48 \t \t -0.053 \t \t \t1.212 \t\t \n",
- " \n",
- "H \t 1.2 \t\t 38 \t\t0.065 \t\t-48 \t \t 0.053 \t \t \t1.317 \t\t \n",
- " \n",
- "I \t 1.2 \t\t 24 \t\t0.041 \t\t-48 \t \t 0.053 \t \t \t1.294 \t\t \n",
- " \n",
- "J \t 1.2 \t\t 12 \t\t0.02 \t\t-48 \t \t 0.053 \t \t \t1.273 \t\t \n",
- " \n",
- "K \t 1.2 \t\t 0 \t\t0.0 \t\t-48 \t \t 0.053 \t \t \t1.253 \t\t \n",
- " \n",
- "L \t 1.2 \t\t -12 \t\t-0.02 \t\t-48 \t \t 0.053 \t \t \t1.232 \t\t \n",
- " \n",
- "M \t 1.2 \t\t -24 \t\t-0.041 \t\t-48 \t \t 0.053 \t \t \t1.212 \t\t \n",
- " \n",
- "N \t 1.2 \t\t -38 \t\t-0.065 \t\t-48 \t \t 0.053 \t \t \t1.188 \t\t \n",
- " \n",
- "the soil pressure at all point is less than the given qallnet=1.5 kip/ft**2\n"
- ]
- }
- ],
- "prompt_number": 26
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.6:Pg-299"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.6\n",
- "\n",
- "from scipy.optimize import fsolve\n",
- "#solving for d\n",
- "def f(d):\n",
- " return (96+2*d)*d-2615.1\n",
- "[x]=fsolve(f,19);\n",
- "d1=x;\n",
- "def f(d):\n",
- " return (96+4*d)*d-6046.4\n",
- "[x]=fsolve(f,28);\n",
- "d2=x;\n",
- "d=max(d2,d1);\n",
- "d=round(d)\n",
- "#now coming to design part\n",
- "h=d+3+1; #in inch\n",
- "print h,\"is total slab thickness in inches\"\n",
- "qa=1.082; # in kip/ft^2\n",
- "qb=1.106; # in kip/ft^2\n",
- "qm=1.212; # in kip/ft^2\n",
- "qn=1.188; # in kip/ft^2\n",
- "q1A=qa/2.0+qb/2.0;\n",
- "print round(q1A,3),\"is force in strip ABMN in kip/ft**2\"\n",
- "q2A=qm/2.0+qn/2.0;\n",
- "print round(q2A,3),\"is force in strip ABMN in kip/ft**2\"\n",
- "q1=1.106/3+1.127/3+1.147/3;\n",
- "print round(q1,3),\"is force in strip BCDKLM in kip/ft**2\"\n",
- "q2=1.253/3+1.233/3+1.212/3;\n",
- "print round(q2,3),\"is force in strip BCDKLM in kip/ft**2\"\n",
- "q1=1.147/3+1.167/3+1.188/3;\n",
- "print round(q1,3),\"is force in strip DEFIJK in kip/ft**2\"\n",
- "q2=1.294/3+1.273/3+1.253/3;\n",
- "print round(q2,3),\"is force in strip DEFIJK in kip/ft**2\"\n",
- "q1=1.188/2+1.212/2;\n",
- "print round(q1,3),\"is force in strip FGHI in kip/ft**2\"\n",
- "q2=1.318/2+1.294/2;\n",
- "print round(q2,3),\" is force in strip FGHI in kip/ft**2\"\n",
- "#checking for force\n",
- "#net soil reaction <load \n",
- "netforce=1/2.0*(1.094+1.2)*14*96+1/2.0*(1.127+1.233)*24*96+1/2.0*(1.167+1.273)*24*96+1/2.0*(1.2+1.306)*14*96;\n",
- "if netforce<8761 :\n",
- " print \"forces generated is OK\"\n",
- "\n",
- "#checking for reinforcement requirement\n",
- "Q1=1.4*180+1.7*120;\n",
- "Q2=1.4*360+1.7*200;\n",
- "Q3=1.4*400+1.7*240;\n",
- "Q4=1.4*180+1.7*120;\n",
- "#solving for a\n",
- "def f(a):\n",
- " return 0.9*0.51*a*60*(29-a/2)-95.05*12\n",
- "[x]=fsolve(f,1.4);\n",
- "a=x;\n",
- "As=0.51*a\n",
- "fy=60000;\n",
- "print round(As,2),\"is required area in in**2\"\n",
- "Asmin=200.0/fy*12*29;\n",
- "print Asmin,\" is minimum reinforcement required in**2/ft\"\n",
- "print \"use No 9 bars at 10 inch centre to centre\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "33.0 is total slab thickness in inches\n",
- "1.094 is force in strip ABMN in kip/ft**2\n",
- "1.2 is force in strip ABMN in kip/ft**2\n",
- "1.127 is force in strip BCDKLM in kip/ft**2\n",
- "1.233 is force in strip BCDKLM in kip/ft**2\n",
- "1.167 is force in strip DEFIJK in kip/ft**2\n",
- "1.273 is force in strip DEFIJK in kip/ft**2\n",
- "1.2 is force in strip FGHI in kip/ft**2\n",
- "1.306 is force in strip FGHI in kip/ft**2\n",
- "forces generated is OK\n",
- "0.75 is required area in in**2\n",
- "1.16 is minimum reinforcement required in**2/ft\n",
- "use No 9 bars at 10 inch centre to centre\n"
- ]
- }
- ],
- "prompt_number": 32
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter06_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter06_1.ipynb deleted file mode 100755 index d87679c7..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter06_1.ipynb +++ /dev/null @@ -1,351 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:0ea06255a04932e0bf9952689cf2f6d919d320d1161a790bec574191c6fbafa1"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter06: Mat Foundations"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.1:Pg-279"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.1\n",
- "\n",
- "B=30; # in ft\n",
- "L=45; # in ft\n",
- "Df=6.5; # in ft\n",
- "cu=1950;# in lb/ft^2\n",
- "qunet=5.14*cu*(1+0.195*B/L)*(1+0.4*Df/B);\n",
- "print int(qunet),\" is allowed force in lb/ft**2\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "12307 is allowed force in lb/ft**2\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.2:Pg-280"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.2\n",
- "\n",
- "N60=10; # penetration number\n",
- "Df=2; # in m\n",
- "B=10.0; # in m\n",
- "Se=25.0; # in mm\n",
- "qnetall=N60/0.08*(1+0.33*Df/B)*Se/25;\n",
- "print qnetall,\" is allowed pressure in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "133.25 is allowed pressure in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.3:Pg-283"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.3\n",
- "\n",
- "cu=2800; # in lb/ft^2\n",
- "B=60; # in ft\n",
- "L=100; # in ft\n",
- "Df=5; # in ft\n",
- "\n",
- "Gamma=120; # in lb/ft^3\n",
- "A=60*100; # in ft^2\n",
- "Q=25e6; # load in Kip\n",
- "FS=5.14*cu*(1+0.195*B/L)*(1+0.4*Df/B)/(Q/A-Gamma*Df);\n",
- "print round(FS,2),\" is factor of safety\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4.66 is factor of safety\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.4:Pg-284"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.4\n",
- "\n",
- "import math\n",
- "Cc=0.28;\n",
- "Hc=18*12.0;\n",
- "e0=0.9;\n",
- "sigmao=11*100+40*(121.5-64)+18/2*(118-62.4); # in lb/ft^2\n",
- "H2=5+40+18.0;\n",
- "H1=5+40.0;\n",
- "qo=3567.0;\n",
- "#from table\n",
- "IaH2=0.21;\n",
- "IaH1=0.225;\n",
- "Dsigma=qo*((H2*IaH2-H1*IaH1)/(H2-H1))*4;\n",
- "Scp=Cc*Hc/(1+e0)*math.log10(sigmao/sigmao+Dsigma/sigmao);\n",
- "print round(Scp,2),\"is settlement in inches\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "6.76 is settlement in inches\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.5:Pg-296"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.5\n",
- "import numpy\n",
- "P=['A','B','C','D','E','F','G','H','I','J','K','L','M','N'];#point\n",
- "k=1.2*numpy.ones(14);#Q/A\n",
- "x=[-38,-24, -12, 0, 12, 24, 38, 38, 24, 12, 0, -12, -24, -38];\n",
- "x1=numpy.zeros(14)\n",
- "for i in range(0,14):\n",
- " x1[i]=0.0017*x[i];\n",
- "y=[48,48,48,48,48,48,48, -48, -48, -48, -48, -48, -48, -48];\n",
- "y1=numpy.zeros(14)\n",
- "for i in range(0,14):\n",
- " y1[i]=-0.0011*y[i];\n",
- "print \"point\\t Q\\A (kip/ft**2) x(ft)\\t 0.0017x(ft)\\t\\ty(ft)\\t \\t 0.0011y(ft)\\t \\t q(kip/ft**2)\\n\"\n",
- "q=numpy.zeros(14)\n",
- "for i in range(0,14):\n",
- " q[i]=1.2+x1[i]+y1[i];\n",
- " print P[i],\"\\t \",k[i],\"\\t\\t \",x[i],\"\\t\\t\",round(x1[i],3),\"\\t\\t\",y[i],\"\\t \\t \",round(y1[i],3),\"\\t \\t \\t\",round(q[i],3),\"\\t\\t \\n \"\n",
- "\n",
- "print \"the soil pressure at all point is less than the given qallnet=1.5 kip/ft**2\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "point\t Q\\A (kip/ft**2) x(ft)\t 0.0017x(ft)\t\ty(ft)\t \t 0.0011y(ft)\t \t q(kip/ft**2)\n",
- "\n",
- "A \t 1.2 \t\t -38 \t\t-0.065 \t\t48 \t \t -0.053 \t \t \t1.083 \t\t \n",
- " \n",
- "B \t 1.2 \t\t -24 \t\t-0.041 \t\t48 \t \t -0.053 \t \t \t1.106 \t\t \n",
- " \n",
- "C \t 1.2 \t\t -12 \t\t-0.02 \t\t48 \t \t -0.053 \t \t \t1.127 \t\t \n",
- " \n",
- "D \t 1.2 \t\t 0 \t\t0.0 \t\t48 \t \t -0.053 \t \t \t1.147 \t\t \n",
- " \n",
- "E \t 1.2 \t\t 12 \t\t0.02 \t\t48 \t \t -0.053 \t \t \t1.168 \t\t \n",
- " \n",
- "F \t 1.2 \t\t 24 \t\t0.041 \t\t48 \t \t -0.053 \t \t \t1.188 \t\t \n",
- " \n",
- "G \t 1.2 \t\t 38 \t\t0.065 \t\t48 \t \t -0.053 \t \t \t1.212 \t\t \n",
- " \n",
- "H \t 1.2 \t\t 38 \t\t0.065 \t\t-48 \t \t 0.053 \t \t \t1.317 \t\t \n",
- " \n",
- "I \t 1.2 \t\t 24 \t\t0.041 \t\t-48 \t \t 0.053 \t \t \t1.294 \t\t \n",
- " \n",
- "J \t 1.2 \t\t 12 \t\t0.02 \t\t-48 \t \t 0.053 \t \t \t1.273 \t\t \n",
- " \n",
- "K \t 1.2 \t\t 0 \t\t0.0 \t\t-48 \t \t 0.053 \t \t \t1.253 \t\t \n",
- " \n",
- "L \t 1.2 \t\t -12 \t\t-0.02 \t\t-48 \t \t 0.053 \t \t \t1.232 \t\t \n",
- " \n",
- "M \t 1.2 \t\t -24 \t\t-0.041 \t\t-48 \t \t 0.053 \t \t \t1.212 \t\t \n",
- " \n",
- "N \t 1.2 \t\t -38 \t\t-0.065 \t\t-48 \t \t 0.053 \t \t \t1.188 \t\t \n",
- " \n",
- "the soil pressure at all point is less than the given qallnet=1.5 kip/ft**2\n"
- ]
- }
- ],
- "prompt_number": 26
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.6:Pg-299"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6.6\n",
- "\n",
- "from scipy.optimize import fsolve\n",
- "#solving for d\n",
- "def f(d):\n",
- " return (96+2*d)*d-2615.1\n",
- "[x]=fsolve(f,19);\n",
- "d1=x;\n",
- "def f(d):\n",
- " return (96+4*d)*d-6046.4\n",
- "[x]=fsolve(f,28);\n",
- "d2=x;\n",
- "d=max(d2,d1);\n",
- "d=round(d)\n",
- "#now coming to design part\n",
- "h=d+3+1; #in inch\n",
- "print h,\"is total slab thickness in inches\"\n",
- "qa=1.082; # in kip/ft^2\n",
- "qb=1.106; # in kip/ft^2\n",
- "qm=1.212; # in kip/ft^2\n",
- "qn=1.188; # in kip/ft^2\n",
- "q1A=qa/2.0+qb/2.0;\n",
- "print round(q1A,3),\"is force in strip ABMN in kip/ft**2\"\n",
- "q2A=qm/2.0+qn/2.0;\n",
- "print round(q2A,3),\"is force in strip ABMN in kip/ft**2\"\n",
- "q1=1.106/3+1.127/3+1.147/3;\n",
- "print round(q1,3),\"is force in strip BCDKLM in kip/ft**2\"\n",
- "q2=1.253/3+1.233/3+1.212/3;\n",
- "print round(q2,3),\"is force in strip BCDKLM in kip/ft**2\"\n",
- "q1=1.147/3+1.167/3+1.188/3;\n",
- "print round(q1,3),\"is force in strip DEFIJK in kip/ft**2\"\n",
- "q2=1.294/3+1.273/3+1.253/3;\n",
- "print round(q2,3),\"is force in strip DEFIJK in kip/ft**2\"\n",
- "q1=1.188/2+1.212/2;\n",
- "print round(q1,3),\"is force in strip FGHI in kip/ft**2\"\n",
- "q2=1.318/2+1.294/2;\n",
- "print round(q2,3),\" is force in strip FGHI in kip/ft**2\"\n",
- "#checking for force\n",
- "#net soil reaction <load \n",
- "netforce=1/2.0*(1.094+1.2)*14*96+1/2.0*(1.127+1.233)*24*96+1/2.0*(1.167+1.273)*24*96+1/2.0*(1.2+1.306)*14*96;\n",
- "if netforce<8761 :\n",
- " print \"forces generated is OK\"\n",
- "\n",
- "#checking for reinforcement requirement\n",
- "Q1=1.4*180+1.7*120;\n",
- "Q2=1.4*360+1.7*200;\n",
- "Q3=1.4*400+1.7*240;\n",
- "Q4=1.4*180+1.7*120;\n",
- "#solving for a\n",
- "def f(a):\n",
- " return 0.9*0.51*a*60*(29-a/2)-95.05*12\n",
- "[x]=fsolve(f,1.4);\n",
- "a=x;\n",
- "As=0.51*a\n",
- "fy=60000;\n",
- "print round(As,2),\"is required area in in**2\"\n",
- "Asmin=200.0/fy*12*29;\n",
- "print Asmin,\" is minimum reinforcement required in**2/ft\"\n",
- "print \"use No 9 bars at 10 inch centre to centre\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "33.0 is total slab thickness in inches\n",
- "1.094 is force in strip ABMN in kip/ft**2\n",
- "1.2 is force in strip ABMN in kip/ft**2\n",
- "1.127 is force in strip BCDKLM in kip/ft**2\n",
- "1.233 is force in strip BCDKLM in kip/ft**2\n",
- "1.167 is force in strip DEFIJK in kip/ft**2\n",
- "1.273 is force in strip DEFIJK in kip/ft**2\n",
- "1.2 is force in strip FGHI in kip/ft**2\n",
- "1.306 is force in strip FGHI in kip/ft**2\n",
- "forces generated is OK\n",
- "0.75 is required area in in**2\n",
- "1.16 is minimum reinforcement required in**2/ft\n",
- "use No 9 bars at 10 inch centre to centre\n"
- ]
- }
- ],
- "prompt_number": 32
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter07.ipynb b/Principles_Of_Foundation_Engineering/Chapter07.ipynb deleted file mode 100755 index 63b3bc22..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter07.ipynb +++ /dev/null @@ -1,358 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:6111670c8f96effbf1bc0bc29859353d67e53cd5b906d2b571173d1698f7ba9c"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter07:Lateral earth pressure"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.1:Pg-319"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.1\n",
- "\n",
- "sigmao=48.0; # in KN/m^2\n",
- "phi1=30*math.pi/180; # angle\n",
- "phi2=36*math.pi/180; # angle\n",
- "Ka1=(math.tan(math.pi/4.0-phi1/2))**2;\n",
- "Ka2=(math.tan(math.pi/4.0-phi2/2))**2;\n",
- "sigmaa1=Ka1*sigmao; # in KN/m^2\n",
- "print round(sigmaa1,2),\"top soil pressure in kN/m**2\"\n",
- "sigmaa2=Ka2*sigmao; # in KN/m^2\n",
- "print round(sigmaa2,2),\"bottom soil pressure in kN/m**2\"\n",
- "Po=1/2.0*3*16+3*12.48+1/3.0*3*(19.65-12.48)+1/2.0*3*29.43;\n",
- "zbar=(24*(3+3/3.0)+37.44*(3/2.0)+10.76*3/3.0+44.1*3/3.0)/Po;\n",
- "print round(zbar,2),\"resultant force acting from the bottom in m\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "16.0 top soil pressure in kN/m**2\n",
- "12.46 bottom soil pressure in kN/m**2\n",
- "1.84 resultant force acting from the bottom in m\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.2:Pg-321"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.2\n",
- "\n",
- "import math\n",
- "c=14.36;\n",
- "Gamma=17.4; # in KN/m^3\n",
- "H=6; # in m\n",
- "phi=26*math.pi/180;\n",
- "Ka=(math.tan(math.pi/4-phi/2))**2;\n",
- "sigma0=Gamma*H*Ka-2*c*math.sqrt(Ka);\n",
- "Pa=1/2.0*Gamma*H**2*Ka-2*c*H*math.sqrt(Ka);\n",
- "print round(Pa,2),\"active force before which tensile crack appeared in kN/m\"\n",
- "zbar=(244.32-323.1)/14.46;\n",
- "print round(zbar,2),\"the line of action on which net force is acting in m\"\n",
- "zc=2*c/Gamma/math.sqrt(Ka);\n",
- "print round(zc,2),\"distance where tensile crack appeared in m\"\n",
- "Pa=1/2.0*(H-zc)*(Gamma*H*Ka-2*c*math.sqrt(Ka));\n",
- "print round(Pa,2),\"Active force in tensile crack in kN/m\"\n",
- "zbar=(H-zc)/3;\n",
- "print round(zbar,2),\"the line of action on which net force is acting in m\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "14.62 active force before which tensile crack appeared in kN/m\n",
- "-5.45 the line of action on which net force is acting in m\n",
- "2.64 distance where tensile crack appeared in m\n",
- "38.32 Active force in tensile crack in kN/m\n",
- "1.12 the line of action on which net force is acting in m\n"
- ]
- }
- ],
- "prompt_number": 30
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.3:Pg-322"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.3\n",
- "import math\n",
- "pi=math.pi\n",
- "H=10.0; # in ft\n",
- "Gamma=110.0; # in lb/ft^3\n",
- "phi=35*math.pi/180.0; # angle\n",
- "alpha=15*math.pi/180.0; # angle\n",
- "theta=10*math.pi/180.0; # angle\n",
- "zi=math.sin(math.sin(alpha)/math.sin(phi))-alpha+2*theta;\n",
- "print round(zi*180.0/math.pi,2),\" is zi in degrees\"\n",
- "Ka=math.cos(alpha-theta)*math.sqrt(1+(math.sin(phi))**2-2*math.sin(phi)*math.sin(zi))/((math.cos(theta))**2*(math.cos(alpha)+math.sqrt((math.sin(phi))**2+((math.sin(alpha))**2))));\n",
- "Pa=1/2.0*Gamma*H**2*Ka;\n",
- "print round(Pa,2),\" is rankine earth pressure in lb/ft\"\n",
- "print \"there is slight error in answer due to rounding off error\"\n",
- "Beta=math.tan(math.sin(phi)*math.sin(zi)/(1-math.sin(phi)*math.cos(zi)));\n",
- "print round(Beta*180/pi,2),\" is angle in degrees\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "29.99 is zi in degrees\n",
- "3078.61 is rankine earth pressure in lb/ft\n",
- "there is slight error in answer due to rounding off error\n",
- "36.7 is angle in degrees\n"
- ]
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.4:Pg-326"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.4\n",
- "\n",
- "H=4.6; # in m\n",
- "Gamma=16.5; # in KN/m^3\n",
- "Ka=0.297;\n",
- "Po=1/2.0*Gamma*H**2*Ka;\n",
- "print round(Po,2),\"coulomb active force per unit length in kN/m\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "51.85 coulomb active force per unit length in kN/m\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.5:Pg-331"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.5\n",
- "\n",
- "#part(a)\n",
- "Gamma=105; # in lb/ft^3\n",
- "H=10; #in ft\n",
- "Kae=0.474;\n",
- "k1=0;\n",
- "Pae=1/2.0*Gamma*H**2*Kae*(1-k1) # in lb/ft\n",
- "print Pae,\"active force in lb/ft\"\n",
- "#part(b)\n",
- "Ka=0.246;\n",
- "Pa=1/2.0*Gamma*H**2*Ka; # in lb/ft\n",
- "print Pa,\"active force in lb/ft\"\n",
- "DPae=Pae-Pa;#deltaPae\n",
- "zbar=(0.6*H*DPae+H/3*(Pa))/Pae;\n",
- "print round(zbar,2),\"the distance of resultant force from bottom in ft\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2488.5 active force in lb/ft\n",
- "1291.5 active force in lb/ft\n",
- "4.44 the distance of resultant force from bottom in ft\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.6:Pg-337"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.6\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "import matplotlib.pyplot as plt\n",
- "\n",
- "z=[0, 4, 8, 12, 16];\n",
- "Gamma=110; # in lb/ft^3\n",
- "phi=36*math.pi/180;\n",
- "H=16; # in ft\n",
- "Sa1=numpy.zeros(5);#sigma(1)\n",
- "Sa2=numpy.zeros(5);#sigma(2)\n",
- "Sztr=numpy.zeros(5);#sigma(z)translation\n",
- "print \"z(ft)\\t sigma(1)(lb/ft**2) \\t sigma(2)(lb/ft**2) \\t sigma(z)translation (lb/ft**2)\\n\"\n",
- "for i in range(0,5):\n",
- " Sa1[i]=Gamma*(math.tan(math.pi/4-phi*z[i]/2/H))**2*(z[i]-phi*z[i]**2/H/math.cos(phi*z[i]/H));\n",
- " Sa2[i]=Gamma*z[i]*(math.cos(phi)/(1+math.sin(phi)))**2;\n",
- " Sztr[i]=Sa1[i]/2.0+Sa2[i]/2.0;\n",
- " print round(z[i],2),\"\\t \",round(Sa1[i],2),\"\\t\\t\\t \",round(Sa2[i],2),\"\\t\\t\\t \",round(Sztr[i],2),\"\\n\"\n",
- "plt.plot(Sztr,z);\n",
- "plt.title(\"sigma(z)translation vs z\")\n",
- "plt.ylabel(\"z(ft)\")\n",
- "plt.xlabel(\"sigma(z)translation (lb/ft**2)\")\n",
- "plt.show()\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "z(ft)\t sigma(1)(lb/ft**2) \t sigma(2)(lb/ft**2) \t sigma(z)translation (lb/ft**2)\n",
- "\n",
- "0.0 \t 0.0 \t\t\t 0.0 \t\t\t 0.0 \n",
- "\n",
- "4.0 \t 269.92 \t\t\t 114.23 \t\t\t 192.07 \n",
- "\n",
- "8.0 \t 311.08 \t\t\t 228.46 \t\t\t 269.77 \n",
- "\n",
- "12.0 \t 233.53 \t\t\t 342.69 \t\t\t 288.11 \n",
- "\n",
- "16.0 \t 102.06 \t\t\t 456.92 \t\t\t 279.49 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.7:Pg-342"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.7\n",
- "import math\n",
- "Gammasat=18.86; # in KN/m^3\n",
- "Gammaw=9.81; # in KN/m^3\n",
- "phi1=math.pi/180*30; # angle 1\n",
- "phi2=math.pi/180*26; # angle 2\n",
- "Kp1=(math.tan(math.pi/4+phi1/2))**2;\n",
- "Kp2=(math.tan(math.pi/4+phi2/2))**2;\n",
- "#for top soil\n",
- "c=0;\n",
- "sigma0=31.44; # in KN/m^2\n",
- "sigmap=sigma0*Kp1+2*c*math.sqrt(Kp1);\n",
- "print round(sigmap,2),\"passive pressure for top layer in kN/m**2\"\n",
- "#for z=2\n",
- "c=10;\n",
- "sigma0=31.44; # in KN/m^2\n",
- "sigmap=sigma0*Kp2+2*c*math.sqrt(Kp2);\n",
- "print round(sigmap,2),\"passive pressure for z=2m in kN/m**2\"\n",
- "#for z=3\n",
- "c=10;\n",
- "sigma0=15.72*2+(Gammasat-Gammaw)*1; # in KN/m^2\n",
- "sigmap=sigma0*Kp2+2*c*math.sqrt(Kp2); # in KN/m^2\n",
- "print round(sigmap,2),\" is passive pressure for z=3m in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "94.32 passive pressure for top layer in kN/m**2\n",
- "112.53 passive pressure for z=2m in kN/m**2\n",
- "135.7 is passive pressure for z=3m in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 3
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter07_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter07_1.ipynb deleted file mode 100755 index 63b3bc22..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter07_1.ipynb +++ /dev/null @@ -1,358 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:6111670c8f96effbf1bc0bc29859353d67e53cd5b906d2b571173d1698f7ba9c"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter07:Lateral earth pressure"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.1:Pg-319"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.1\n",
- "\n",
- "sigmao=48.0; # in KN/m^2\n",
- "phi1=30*math.pi/180; # angle\n",
- "phi2=36*math.pi/180; # angle\n",
- "Ka1=(math.tan(math.pi/4.0-phi1/2))**2;\n",
- "Ka2=(math.tan(math.pi/4.0-phi2/2))**2;\n",
- "sigmaa1=Ka1*sigmao; # in KN/m^2\n",
- "print round(sigmaa1,2),\"top soil pressure in kN/m**2\"\n",
- "sigmaa2=Ka2*sigmao; # in KN/m^2\n",
- "print round(sigmaa2,2),\"bottom soil pressure in kN/m**2\"\n",
- "Po=1/2.0*3*16+3*12.48+1/3.0*3*(19.65-12.48)+1/2.0*3*29.43;\n",
- "zbar=(24*(3+3/3.0)+37.44*(3/2.0)+10.76*3/3.0+44.1*3/3.0)/Po;\n",
- "print round(zbar,2),\"resultant force acting from the bottom in m\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "16.0 top soil pressure in kN/m**2\n",
- "12.46 bottom soil pressure in kN/m**2\n",
- "1.84 resultant force acting from the bottom in m\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.2:Pg-321"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.2\n",
- "\n",
- "import math\n",
- "c=14.36;\n",
- "Gamma=17.4; # in KN/m^3\n",
- "H=6; # in m\n",
- "phi=26*math.pi/180;\n",
- "Ka=(math.tan(math.pi/4-phi/2))**2;\n",
- "sigma0=Gamma*H*Ka-2*c*math.sqrt(Ka);\n",
- "Pa=1/2.0*Gamma*H**2*Ka-2*c*H*math.sqrt(Ka);\n",
- "print round(Pa,2),\"active force before which tensile crack appeared in kN/m\"\n",
- "zbar=(244.32-323.1)/14.46;\n",
- "print round(zbar,2),\"the line of action on which net force is acting in m\"\n",
- "zc=2*c/Gamma/math.sqrt(Ka);\n",
- "print round(zc,2),\"distance where tensile crack appeared in m\"\n",
- "Pa=1/2.0*(H-zc)*(Gamma*H*Ka-2*c*math.sqrt(Ka));\n",
- "print round(Pa,2),\"Active force in tensile crack in kN/m\"\n",
- "zbar=(H-zc)/3;\n",
- "print round(zbar,2),\"the line of action on which net force is acting in m\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "14.62 active force before which tensile crack appeared in kN/m\n",
- "-5.45 the line of action on which net force is acting in m\n",
- "2.64 distance where tensile crack appeared in m\n",
- "38.32 Active force in tensile crack in kN/m\n",
- "1.12 the line of action on which net force is acting in m\n"
- ]
- }
- ],
- "prompt_number": 30
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.3:Pg-322"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.3\n",
- "import math\n",
- "pi=math.pi\n",
- "H=10.0; # in ft\n",
- "Gamma=110.0; # in lb/ft^3\n",
- "phi=35*math.pi/180.0; # angle\n",
- "alpha=15*math.pi/180.0; # angle\n",
- "theta=10*math.pi/180.0; # angle\n",
- "zi=math.sin(math.sin(alpha)/math.sin(phi))-alpha+2*theta;\n",
- "print round(zi*180.0/math.pi,2),\" is zi in degrees\"\n",
- "Ka=math.cos(alpha-theta)*math.sqrt(1+(math.sin(phi))**2-2*math.sin(phi)*math.sin(zi))/((math.cos(theta))**2*(math.cos(alpha)+math.sqrt((math.sin(phi))**2+((math.sin(alpha))**2))));\n",
- "Pa=1/2.0*Gamma*H**2*Ka;\n",
- "print round(Pa,2),\" is rankine earth pressure in lb/ft\"\n",
- "print \"there is slight error in answer due to rounding off error\"\n",
- "Beta=math.tan(math.sin(phi)*math.sin(zi)/(1-math.sin(phi)*math.cos(zi)));\n",
- "print round(Beta*180/pi,2),\" is angle in degrees\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "29.99 is zi in degrees\n",
- "3078.61 is rankine earth pressure in lb/ft\n",
- "there is slight error in answer due to rounding off error\n",
- "36.7 is angle in degrees\n"
- ]
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.4:Pg-326"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.4\n",
- "\n",
- "H=4.6; # in m\n",
- "Gamma=16.5; # in KN/m^3\n",
- "Ka=0.297;\n",
- "Po=1/2.0*Gamma*H**2*Ka;\n",
- "print round(Po,2),\"coulomb active force per unit length in kN/m\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "51.85 coulomb active force per unit length in kN/m\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.5:Pg-331"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.5\n",
- "\n",
- "#part(a)\n",
- "Gamma=105; # in lb/ft^3\n",
- "H=10; #in ft\n",
- "Kae=0.474;\n",
- "k1=0;\n",
- "Pae=1/2.0*Gamma*H**2*Kae*(1-k1) # in lb/ft\n",
- "print Pae,\"active force in lb/ft\"\n",
- "#part(b)\n",
- "Ka=0.246;\n",
- "Pa=1/2.0*Gamma*H**2*Ka; # in lb/ft\n",
- "print Pa,\"active force in lb/ft\"\n",
- "DPae=Pae-Pa;#deltaPae\n",
- "zbar=(0.6*H*DPae+H/3*(Pa))/Pae;\n",
- "print round(zbar,2),\"the distance of resultant force from bottom in ft\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2488.5 active force in lb/ft\n",
- "1291.5 active force in lb/ft\n",
- "4.44 the distance of resultant force from bottom in ft\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.6:Pg-337"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.6\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "import matplotlib.pyplot as plt\n",
- "\n",
- "z=[0, 4, 8, 12, 16];\n",
- "Gamma=110; # in lb/ft^3\n",
- "phi=36*math.pi/180;\n",
- "H=16; # in ft\n",
- "Sa1=numpy.zeros(5);#sigma(1)\n",
- "Sa2=numpy.zeros(5);#sigma(2)\n",
- "Sztr=numpy.zeros(5);#sigma(z)translation\n",
- "print \"z(ft)\\t sigma(1)(lb/ft**2) \\t sigma(2)(lb/ft**2) \\t sigma(z)translation (lb/ft**2)\\n\"\n",
- "for i in range(0,5):\n",
- " Sa1[i]=Gamma*(math.tan(math.pi/4-phi*z[i]/2/H))**2*(z[i]-phi*z[i]**2/H/math.cos(phi*z[i]/H));\n",
- " Sa2[i]=Gamma*z[i]*(math.cos(phi)/(1+math.sin(phi)))**2;\n",
- " Sztr[i]=Sa1[i]/2.0+Sa2[i]/2.0;\n",
- " print round(z[i],2),\"\\t \",round(Sa1[i],2),\"\\t\\t\\t \",round(Sa2[i],2),\"\\t\\t\\t \",round(Sztr[i],2),\"\\n\"\n",
- "plt.plot(Sztr,z);\n",
- "plt.title(\"sigma(z)translation vs z\")\n",
- "plt.ylabel(\"z(ft)\")\n",
- "plt.xlabel(\"sigma(z)translation (lb/ft**2)\")\n",
- "plt.show()\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "z(ft)\t sigma(1)(lb/ft**2) \t sigma(2)(lb/ft**2) \t sigma(z)translation (lb/ft**2)\n",
- "\n",
- "0.0 \t 0.0 \t\t\t 0.0 \t\t\t 0.0 \n",
- "\n",
- "4.0 \t 269.92 \t\t\t 114.23 \t\t\t 192.07 \n",
- "\n",
- "8.0 \t 311.08 \t\t\t 228.46 \t\t\t 269.77 \n",
- "\n",
- "12.0 \t 233.53 \t\t\t 342.69 \t\t\t 288.11 \n",
- "\n",
- "16.0 \t 102.06 \t\t\t 456.92 \t\t\t 279.49 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.7:Pg-342"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7.7\n",
- "import math\n",
- "Gammasat=18.86; # in KN/m^3\n",
- "Gammaw=9.81; # in KN/m^3\n",
- "phi1=math.pi/180*30; # angle 1\n",
- "phi2=math.pi/180*26; # angle 2\n",
- "Kp1=(math.tan(math.pi/4+phi1/2))**2;\n",
- "Kp2=(math.tan(math.pi/4+phi2/2))**2;\n",
- "#for top soil\n",
- "c=0;\n",
- "sigma0=31.44; # in KN/m^2\n",
- "sigmap=sigma0*Kp1+2*c*math.sqrt(Kp1);\n",
- "print round(sigmap,2),\"passive pressure for top layer in kN/m**2\"\n",
- "#for z=2\n",
- "c=10;\n",
- "sigma0=31.44; # in KN/m^2\n",
- "sigmap=sigma0*Kp2+2*c*math.sqrt(Kp2);\n",
- "print round(sigmap,2),\"passive pressure for z=2m in kN/m**2\"\n",
- "#for z=3\n",
- "c=10;\n",
- "sigma0=15.72*2+(Gammasat-Gammaw)*1; # in KN/m^2\n",
- "sigmap=sigma0*Kp2+2*c*math.sqrt(Kp2); # in KN/m^2\n",
- "print round(sigmap,2),\" is passive pressure for z=3m in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "94.32 passive pressure for top layer in kN/m**2\n",
- "112.53 passive pressure for z=2m in kN/m**2\n",
- "135.7 is passive pressure for z=3m in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 3
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter08.ipynb b/Principles_Of_Foundation_Engineering/Chapter08.ipynb deleted file mode 100755 index de2367cd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter08.ipynb +++ /dev/null @@ -1,527 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:ae926d3fc40f9f56d82ee333a9b5a7f719ff4a11c08f89381773660beb02ead3"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter08: Retaining walls"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.1:Pg-366"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.1\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "H1=6*math.tan(10*math.pi/180.0); # in ft\n",
- "H2=18.0; # in ft\n",
- "H3=2.75; # in ft\n",
- "Gamma1=117.0; # in lb/ft^3\n",
- "Ka=0.294;#from table 7.1\n",
- "H=H1+H2+H3; # in ft\n",
- "Pa=1/2.0*Gamma1*H**2*Ka/1000; # in Kip/ft\n",
- "Pr=Pa*math.sin(10*math.pi/180); # in Kip/ft\n",
- "Ph=Pa*math.cos(10*math.pi/180); # in Kip/ft\n",
- "Mo=Ph*H/3.0; # in Kip-ft/ft\n",
- "Sum=0;#sigma Mr\n",
- "S=[1, 2, 3, 4, 5];#section\n",
- "W=[4.05, 1.35, 5.156, 13.01, 1.42];#weight\n",
- "MA=[5.75, 4.67, 6.25, 9.5, 12.5, 12.5];#Moment Arm\n",
- "M=numpy.zeros(5)\n",
- "print \"Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\\n\"\n",
- "for i in range(0,5):\n",
- " M[i]=W[i]*MA[i];\n",
- " Sum=Sum+M[i];\n",
- " print round(S[i],2),\"\\t \\t \",round(W[i],2),\"\\t \\t \\t\",round(MA[i],2),\"\\t \\t \\t \",round(M[i],2),\"\\n\"\n",
- "\n",
- "FSO=Sum/Mo;\n",
- "if FSO>2 :\n",
- " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n",
- "\n",
- "#for sliding\n",
- "phi2=18*math.pi/180; # the given angle\n",
- "V=24.986;\n",
- "B=12.5;\n",
- "c2=0.9; # in lb/ft^2\n",
- "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n",
- "if FSS>2 :\n",
- " print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n",
- "\n",
- "#for bearing\n",
- "e=B/2.0-(Sum-Mo)/V;\n",
- "qtoe=V/B*(1+6*e/B); # in Kip/ft^2\n",
- "Nc=13.1;\n",
- "Nq=5.26;\n",
- "Ny=4.07;\n",
- "D=0.107;\n",
- "Gamma2=4.0; # in lb/ft^3\n",
- "B1=B-2*e;#Bdash\n",
- "q=Gamma2*D # in lb/ft^2\n",
- "Fcd=1+0.4*D/B1;\n",
- "Fqd=1+2*math.tan(phi2)*(1-math.sin(phi2))**2*(D/B1);\n",
- "Fyd=1;\n",
- "zi=math.tan(Ph/V);\n",
- "Fci=(1-zi/math.pi*2)**2;\n",
- "Fqi=Fci;\n",
- "Fyi=round((1-zi/phi2)**2);\n",
- "qu=c2*Nc*Fcd*Fci+q*Nq*Fqd*Fqi+1/2.0*Gamma2*B1*Fyd*Fyi;\n",
- "FSB=qu/qtoe;\n",
- "if FSB>3 :\n",
- " print \"bearing is safe with FS=\",round(FSB),\"\\n\\n\"\n",
- " print \"slight changes due to round off error\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\n",
- "\n",
- "1.0 \t \t 4.05 \t \t \t5.75 \t \t \t 23.29 \n",
- "\n",
- "2.0 \t \t 1.35 \t \t \t4.67 \t \t \t 6.3 \n",
- "\n",
- "3.0 \t \t 5.16 \t \t \t6.25 \t \t \t 32.23 \n",
- "\n",
- "4.0 \t \t 13.01 \t \t \t9.5 \t \t \t 123.59 \n",
- "\n",
- "5.0 \t \t 1.42 \t \t \t12.5 \t \t \t 17.75 \n",
- "\n",
- "safe in overturning with FS= 3.47 \n",
- "\n",
- "bearing is safe with FS= 4.0 \n",
- "\n",
- "\n",
- "slight changes due to round off error\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.2:Pg-369"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.2\n",
- "\n",
- "c=0.9; # # in lb/ft^2\n",
- "B=12.5; # in ft\n",
- "Gamma2=4; # in lb/ft^3\n",
- "Fcd=1.138;\n",
- "Fqd=1.107; \n",
- "Nc=7.5;\n",
- "Nq=4;\n",
- "Ny=0;\n",
- "q=0.428; # in lb/ft^2\n",
- "qtoe=2.44; # in lb/ft^2\n",
- "qu=c*Nc*Fcd+q*Nq*Fqd+1/2.0*Gamma2*B*Ny;\n",
- "FSB=qu/qtoe; # factor of safety\n",
- "if FSB>3.0 :\n",
- " print \"safe in bearing with FS=\",round(FSB,2),\"\\n\\n\",\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "safe in bearing with FS= 3.92 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.3:Pg-370"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.3\n",
- "import math\n",
- "import numpy\n",
- "Msum=0;#sum of moment\n",
- "Vsum=0;#sum of force\n",
- "H=15+2.5;#Hdash in ft\n",
- "phi=30*math.pi/180; # given angle in degree\n",
- "Gamma=121.0; # in lb/ft^3\n",
- "Ka=(math.tan(math.pi/4-phi/2))**2;\n",
- "Pa=1/2.0*Gamma*H**2*Ka/1000; # in Kip/ft\n",
- "Ph=Pa; # in Kip/ft\n",
- "Mo=Ph*H/3.0; # in Kip-ft/ft\n",
- "AN=[1.0,2.0,3.0,4.0,5.0,6.0];#area number\n",
- "W=[0.9,3.375,5.906,3.863,4.764,2.723];#weight\n",
- "MA=[1.783,2.8,5.3,5.15,7.05,9.55];#moment arm\n",
- "\n",
- "print \"AreaNo \\t Weight(kip/ft) \\t Moment Arm(ft) \\t Moment (kip-ft/ft)\\n\"\n",
- "M= numpy.zeros(6)\n",
- "for i in range(0,6):\n",
- " M[i]=W[i]*MA[i];\n",
- " Vsum=Vsum+W[i];\n",
- " Msum=Msum+M[i];\n",
- " print round(AN[i],2),\"\\t\\t \",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n",
- "\n",
- "FSO=(Msum)/Mo;\n",
- "if FSO>2 :\n",
- " print \"safe in overturning with FS=\",round(FSO,2)\n",
- "\n",
- "#for sliding\n",
- "phi2=20*math.pi/180;\n",
- "V=Vsum\n",
- "B=10.3; # in ft\n",
- "c2=1.0; # in lb/ft^2\n",
- "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n",
- "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n",
- "e=B/2.0-(Msum-Mo)/V;\n",
- "qtoe=V/B*(1+6*e/B); # in kip/ft**2\n",
- "print round(qtoe,2),\" is soil pressure at toe in kip/ft**2\"\n",
- "qheel=V/B*(1-6*e/B); # in kip/ft**2\n",
- "print round(qheel,2),\" is soil pressure at heel in kip/ft**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "AreaNo \t Weight(kip/ft) \t Moment Arm(ft) \t Moment (kip-ft/ft)\n",
- "\n",
- "1.0 \t\t 0.9 \t \t \t 1.783 \t \t \t 1.6047 \n",
- "\n",
- "2.0 \t\t 3.38 \t \t \t 2.8 \t \t \t 9.45 \n",
- "\n",
- "3.0 \t\t 5.91 \t \t \t 5.3 \t \t \t 31.3018 \n",
- "\n",
- "4.0 \t\t 3.86 \t \t \t 5.15 \t \t \t 19.89445 \n",
- "\n",
- "5.0 \t\t 4.76 \t \t \t 7.05 \t \t \t 33.5862 \n",
- "\n",
- "6.0 \t\t 2.72 \t \t \t 9.55 \t \t \t 26.00465 \n",
- "\n",
- "safe in overturning with FS= 3.38\n",
- "safe in sliding with FS= 1.94 \n",
- "\n",
- "3.51 is soil pressure at toe in kip/ft**2\n",
- "0.67 is soil pressure at heel in kip/ft**2\n"
- ]
- }
- ],
- "prompt_number": 33
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.4:Pg-372"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.4\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "Msum=0;#sum of moment\n",
- "Vsum=0;#sum of force\n",
- "H=5+1.5;#Hdash in m\n",
- "phi=32*math.pi/180 # angle in degree\n",
- "Gamma=18.5; # in KN/m^3\n",
- "Ka=0.424;\n",
- "Pa=1/2.0*Gamma*H**2*Ka; # in KN/m\n",
- "Ph=Pa*math.cos(15*math.pi/180+2/3.0*phi); # in KN/m\n",
- "Mo=Ph*H/3.0; # moment\n",
- "AN=[1,2,3,4,5];#area number\n",
- "A=[4.36, 3.42, 0.77, 2.8, 2.8];#area\n",
- "W=[102.81, 80.64, 18.16, 66.02, 93.14];#weight\n",
- "MA=[2.18, 1.37, 0.98, 1.75, 2.83];#moment arm\n",
- "print \"AreaNo \\t Area(m**2) \\t Weight(kN/m) \\t Moment Arm(m) \\t Moment (kN-m/m)\\n\"\n",
- "M= numpy.zeros(5)\n",
- "for i in range(0,5):\n",
- " M[i]=W[i]*MA[i];\n",
- " Vsum=Vsum+W[i];\n",
- " Msum=Msum+M[i];\n",
- " print round(AN[i],2),\"\\t\\t \",round(A[i],2),\" \\t \\t\",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n",
- "\n",
- "FSO=Msum/Mo;\n",
- "if FSO>2 :\n",
- " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n",
- "\n",
- "#for sliding\n",
- "phi2=24*math.pi/180;\n",
- "V=Vsum\n",
- "B=3.5; # in m\n",
- "c2=30; # in KN/m^2\n",
- "Pp=1/2.0*2.37*18*1.5**2+2*30*1.54*1.5;\n",
- "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2+Pp)/Ph;\n",
- "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n",
- "print \"if Pp is ignored then FS=1.37\"\n",
- "e=B/2.0-(Msum-Mo)/V;\n",
- "qtoe=V/B*(1+6*e/B); # in kN/m**2\n",
- "print round(qtoe,2),\"soil pressure at toe in kN/m**2\"\n",
- "qheel=V/B*(1-6*e/B); # in kN/m**2\n",
- "print round(qheel,2),\"soil pressure at heel in kN/m**2\"\n",
- "print \"there is difference in answer due to rounding off error\"\n",
- "\n",
- "# there is difference in answer due to rounding off error\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "AreaNo \t Area(m**2) \t Weight(kN/m) \t Moment Arm(m) \t Moment (kN-m/m)\n",
- "\n",
- "1.0 \t\t 4.36 \t \t102.81 \t \t \t 2.18 \t \t \t 224.1258 \n",
- "\n",
- "2.0 \t\t 3.42 \t \t80.64 \t \t \t 1.37 \t \t \t 110.4768 \n",
- "\n",
- "3.0 \t\t 0.77 \t \t18.16 \t \t \t 0.98 \t \t \t 17.7968 \n",
- "\n",
- "4.0 \t\t 2.8 \t \t66.02 \t \t \t 1.75 \t \t \t 115.535 \n",
- "\n",
- "5.0 \t\t 2.8 \t \t93.14 \t \t \t 2.83 \t \t \t 263.5862 \n",
- "\n",
- "safe in overturning with FS= 2.53 \n",
- "\n",
- "safe in sliding with FS= 2.7 \n",
- "\n",
- "if Pp is ignored then FS=1.37\n",
- "195.67 soil pressure at toe in kN/m**2\n",
- "10.48 soil pressure at heel in kN/m**2\n",
- "there is difference in answer due to rounding off error\n"
- ]
- }
- ],
- "prompt_number": 49
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.6:Pg-393"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.6\n",
- "import math\n",
- "Sv=2; # in ft\n",
- "Sh=3; # in ft\n",
- "w=3/12.0; # in inch\n",
- "fy=35000*144;\n",
- "FSb=3;\n",
- "pi=math.pi;\n",
- "phi=36*pi/180;\n",
- "Gamma1=105; # in lb/ft^3\n",
- "H=30;\n",
- "t=Gamma1*H*Sv*Sh*FSb/w/fy*(math.tan(pi/4-phi/2))**2;\n",
- "t=t*12; #in inch\n",
- "print round(t,2),\" is thickness in inches\"\n",
- "t=t+0.001*50;\n",
- "print \"so take thickness=0.2 inches\"\n",
- "#for tie length\n",
- "z=[5,10,15,20,25,30];\n",
- "TL=[38.45, 35.89, 33.34, 30.79, 28.25, 25.7];#tie length\n",
- "print \"z(ft)\\t Tie Length (ft)\\n\"\n",
- "for i in range(0,6):\n",
- " print z[i],\"\\t\",TL[i]\n",
- "\n",
- "print \"use tie length=40ft\"\n",
- "#check for over turning\n",
- "\n",
- "z=30/3.0;\n",
- "x1=20;\n",
- "L=40;\n",
- "Ka=0.26;\n",
- "Pa=1/2.0*Gamma1*Ka*H**2; # in kip/ft**2\n",
- "W1=Gamma1*H*L;\n",
- "FSO=W1*x1/(Pa*z);\n",
- "print round(FSO,2),\" is factor of safety is\" \n",
- "print \"since FS>3 structure is safe\"\n",
- "#check for sliding\n",
- "k=2/3.0;\n",
- "Pa=12285; # in kip/ft**2\n",
- "FSS=W1*math.tan(k*phi)/Pa;\n",
- "if FSS>3 :\n",
- " print \"safe in sliding with FS=\",round(FSS,2)\n",
- "\n",
- "#check for bearing\n",
- "Mr=126000*20; # in lb-ft/ft\n",
- "Mo=12285*10; # in lb-ft/ft\n",
- "V=126000;\n",
- "e=L/2-Mr/V+Mo/V;\n",
- "L1=L-2*e;#Ldash\n",
- "c2=1000; # in lb/ft^2\n",
- "Nc=25.8;\n",
- "Gamma2=110; # in lb/ft^3\n",
- "Ny=16.72;\n",
- "qult=c2*Nc+1/2.0*Gamma2*L1*Ny\n",
- "sigma0=Gamma1*H; # in lb/ft^2\n",
- "FSB=qult/sigma0;\n",
- "if FSB>5 :\n",
- " print \"bearing is safe with FS=\",round(FSB,2)\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "0.14 is thickness in inches\n",
- "so take thickness=0.2 inches\n",
- "z(ft)\t Tie Length (ft)\n",
- "\n",
- "5 \t38.45\n",
- "10 \t35.89\n",
- "15 \t33.34\n",
- "20 \t30.79\n",
- "25 \t28.25\n",
- "30 \t25.7\n",
- "use tie length=40ft\n",
- "20.51 is factor of safety is\n",
- "since FS>3 structure is safe\n",
- "safe in sliding with FS= 4.57\n",
- "safe in bearing with FS= 19.87\n"
- ]
- }
- ],
- "prompt_number": 56
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.7:Pg-397"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.7\n",
- "import math\n",
- "import numpy\n",
- "pi=math.pi;\n",
- "phi=36.0*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "z=[8.0, 12.0, 16.0]; # in ft\n",
- "sigmaG=80*12.0; # in lb/ft^2\n",
- "Gamma1=110.0; # in lb/ft^3\n",
- "FS=1.5;\n",
- "Sv=numpy.zeros(3)\n",
- "for i in range(0,3):\n",
- " Sv[i]=sigmaG/Gamma1/z[i]/Ka/FS*12.0;\n",
- " print \"for z=\",z[i],\" ft Sv = \",round(Sv[i],2),\" inches\\n\"\n",
- "\n",
- "z=[16.0,56.0,76.0,96.0,112.0,144.0,176.0];\n",
- "zf=numpy.zeros(7)\n",
- "k2=numpy.zeros(7)\n",
- "L=numpy.zeros(7)\n",
- "for i in range(0,7):\n",
- " zf[i]=z[i]/12.0;#z in ft\n",
- "Sv=[1.67,1.67,1.67,1.67,1.33,1.33,1.33];\n",
- "k=[7.48,5.78,4.93,4.08,3.4,2.04,0.68];#0.51(H-z)\n",
- "print \"z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \\n\"\n",
- "for i in range(0,7):\n",
- " k2[i]=0.438*Sv[i];#0.438Sv\n",
- " L[i]=k[i]+k2[i];\n",
- " print round(z[i],2),\"\\t \\t\",round(zf[i],2),\"\\t \",round(Sv[i],2),\"\\t \\t \",round(k[i],2),\"\\t \\t \\t\",round(k2[i],2),\"\\t \\t \\t \",round(L[i],2)\n",
- "\n",
- "Sv=20/12.0;\n",
- "Ka=0.26;\n",
- "FS=1.5;\n",
- "l1=Sv*Ka*FS/4/math.tan(2/3.0*phi);\n",
- "if l1<3:\n",
- " l1=3;\n",
- " print l1,\"length in ft\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "for z= 8.0 ft Sv = 33.62 inches\n",
- "\n",
- "for z= 12.0 ft Sv = 22.41 inches\n",
- "\n",
- "for z= 16.0 ft Sv = 16.81 inches\n",
- "\n",
- "z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \n",
- "\n",
- "16.0 \t \t1.33 \t 1.67 \t \t 7.48 \t \t \t0.73 \t \t \t 8.21\n",
- "56.0 \t \t4.67 \t 1.67 \t \t 5.78 \t \t \t0.73 \t \t \t 6.51\n",
- "76.0 \t \t6.33 \t 1.67 \t \t 4.93 \t \t \t0.73 \t \t \t 5.66\n",
- "96.0 \t \t8.0 \t 1.67 \t \t 4.08 \t \t \t0.73 \t \t \t 4.81\n",
- "112.0 \t \t9.33 \t 1.33 \t \t 3.4 \t \t \t0.58 \t \t \t 3.98\n",
- "144.0 \t \t12.0 \t 1.33 \t \t 2.04 \t \t \t0.58 \t \t \t 2.62\n",
- "176.0 \t \t14.67 \t 1.33 \t \t 0.68 \t \t \t0.58 \t \t \t 1.26\n",
- "3 length in ft\n"
- ]
- }
- ],
- "prompt_number": 79
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter08_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter08_1.ipynb deleted file mode 100755 index de2367cd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter08_1.ipynb +++ /dev/null @@ -1,527 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:ae926d3fc40f9f56d82ee333a9b5a7f719ff4a11c08f89381773660beb02ead3"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter08: Retaining walls"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.1:Pg-366"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.1\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "H1=6*math.tan(10*math.pi/180.0); # in ft\n",
- "H2=18.0; # in ft\n",
- "H3=2.75; # in ft\n",
- "Gamma1=117.0; # in lb/ft^3\n",
- "Ka=0.294;#from table 7.1\n",
- "H=H1+H2+H3; # in ft\n",
- "Pa=1/2.0*Gamma1*H**2*Ka/1000; # in Kip/ft\n",
- "Pr=Pa*math.sin(10*math.pi/180); # in Kip/ft\n",
- "Ph=Pa*math.cos(10*math.pi/180); # in Kip/ft\n",
- "Mo=Ph*H/3.0; # in Kip-ft/ft\n",
- "Sum=0;#sigma Mr\n",
- "S=[1, 2, 3, 4, 5];#section\n",
- "W=[4.05, 1.35, 5.156, 13.01, 1.42];#weight\n",
- "MA=[5.75, 4.67, 6.25, 9.5, 12.5, 12.5];#Moment Arm\n",
- "M=numpy.zeros(5)\n",
- "print \"Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\\n\"\n",
- "for i in range(0,5):\n",
- " M[i]=W[i]*MA[i];\n",
- " Sum=Sum+M[i];\n",
- " print round(S[i],2),\"\\t \\t \",round(W[i],2),\"\\t \\t \\t\",round(MA[i],2),\"\\t \\t \\t \",round(M[i],2),\"\\n\"\n",
- "\n",
- "FSO=Sum/Mo;\n",
- "if FSO>2 :\n",
- " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n",
- "\n",
- "#for sliding\n",
- "phi2=18*math.pi/180; # the given angle\n",
- "V=24.986;\n",
- "B=12.5;\n",
- "c2=0.9; # in lb/ft^2\n",
- "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n",
- "if FSS>2 :\n",
- " print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n",
- "\n",
- "#for bearing\n",
- "e=B/2.0-(Sum-Mo)/V;\n",
- "qtoe=V/B*(1+6*e/B); # in Kip/ft^2\n",
- "Nc=13.1;\n",
- "Nq=5.26;\n",
- "Ny=4.07;\n",
- "D=0.107;\n",
- "Gamma2=4.0; # in lb/ft^3\n",
- "B1=B-2*e;#Bdash\n",
- "q=Gamma2*D # in lb/ft^2\n",
- "Fcd=1+0.4*D/B1;\n",
- "Fqd=1+2*math.tan(phi2)*(1-math.sin(phi2))**2*(D/B1);\n",
- "Fyd=1;\n",
- "zi=math.tan(Ph/V);\n",
- "Fci=(1-zi/math.pi*2)**2;\n",
- "Fqi=Fci;\n",
- "Fyi=round((1-zi/phi2)**2);\n",
- "qu=c2*Nc*Fcd*Fci+q*Nq*Fqd*Fqi+1/2.0*Gamma2*B1*Fyd*Fyi;\n",
- "FSB=qu/qtoe;\n",
- "if FSB>3 :\n",
- " print \"bearing is safe with FS=\",round(FSB),\"\\n\\n\"\n",
- " print \"slight changes due to round off error\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Section Weight(kip/ft) Moment Arm(ft) Moment (kip-ft/ft)\n",
- "\n",
- "1.0 \t \t 4.05 \t \t \t5.75 \t \t \t 23.29 \n",
- "\n",
- "2.0 \t \t 1.35 \t \t \t4.67 \t \t \t 6.3 \n",
- "\n",
- "3.0 \t \t 5.16 \t \t \t6.25 \t \t \t 32.23 \n",
- "\n",
- "4.0 \t \t 13.01 \t \t \t9.5 \t \t \t 123.59 \n",
- "\n",
- "5.0 \t \t 1.42 \t \t \t12.5 \t \t \t 17.75 \n",
- "\n",
- "safe in overturning with FS= 3.47 \n",
- "\n",
- "bearing is safe with FS= 4.0 \n",
- "\n",
- "\n",
- "slight changes due to round off error\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.2:Pg-369"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.2\n",
- "\n",
- "c=0.9; # # in lb/ft^2\n",
- "B=12.5; # in ft\n",
- "Gamma2=4; # in lb/ft^3\n",
- "Fcd=1.138;\n",
- "Fqd=1.107; \n",
- "Nc=7.5;\n",
- "Nq=4;\n",
- "Ny=0;\n",
- "q=0.428; # in lb/ft^2\n",
- "qtoe=2.44; # in lb/ft^2\n",
- "qu=c*Nc*Fcd+q*Nq*Fqd+1/2.0*Gamma2*B*Ny;\n",
- "FSB=qu/qtoe; # factor of safety\n",
- "if FSB>3.0 :\n",
- " print \"safe in bearing with FS=\",round(FSB,2),\"\\n\\n\",\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "safe in bearing with FS= 3.92 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.3:Pg-370"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.3\n",
- "import math\n",
- "import numpy\n",
- "Msum=0;#sum of moment\n",
- "Vsum=0;#sum of force\n",
- "H=15+2.5;#Hdash in ft\n",
- "phi=30*math.pi/180; # given angle in degree\n",
- "Gamma=121.0; # in lb/ft^3\n",
- "Ka=(math.tan(math.pi/4-phi/2))**2;\n",
- "Pa=1/2.0*Gamma*H**2*Ka/1000; # in Kip/ft\n",
- "Ph=Pa; # in Kip/ft\n",
- "Mo=Ph*H/3.0; # in Kip-ft/ft\n",
- "AN=[1.0,2.0,3.0,4.0,5.0,6.0];#area number\n",
- "W=[0.9,3.375,5.906,3.863,4.764,2.723];#weight\n",
- "MA=[1.783,2.8,5.3,5.15,7.05,9.55];#moment arm\n",
- "\n",
- "print \"AreaNo \\t Weight(kip/ft) \\t Moment Arm(ft) \\t Moment (kip-ft/ft)\\n\"\n",
- "M= numpy.zeros(6)\n",
- "for i in range(0,6):\n",
- " M[i]=W[i]*MA[i];\n",
- " Vsum=Vsum+W[i];\n",
- " Msum=Msum+M[i];\n",
- " print round(AN[i],2),\"\\t\\t \",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n",
- "\n",
- "FSO=(Msum)/Mo;\n",
- "if FSO>2 :\n",
- " print \"safe in overturning with FS=\",round(FSO,2)\n",
- "\n",
- "#for sliding\n",
- "phi2=20*math.pi/180;\n",
- "V=Vsum\n",
- "B=10.3; # in ft\n",
- "c2=1.0; # in lb/ft^2\n",
- "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2)/Ph;\n",
- "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n",
- "e=B/2.0-(Msum-Mo)/V;\n",
- "qtoe=V/B*(1+6*e/B); # in kip/ft**2\n",
- "print round(qtoe,2),\" is soil pressure at toe in kip/ft**2\"\n",
- "qheel=V/B*(1-6*e/B); # in kip/ft**2\n",
- "print round(qheel,2),\" is soil pressure at heel in kip/ft**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "AreaNo \t Weight(kip/ft) \t Moment Arm(ft) \t Moment (kip-ft/ft)\n",
- "\n",
- "1.0 \t\t 0.9 \t \t \t 1.783 \t \t \t 1.6047 \n",
- "\n",
- "2.0 \t\t 3.38 \t \t \t 2.8 \t \t \t 9.45 \n",
- "\n",
- "3.0 \t\t 5.91 \t \t \t 5.3 \t \t \t 31.3018 \n",
- "\n",
- "4.0 \t\t 3.86 \t \t \t 5.15 \t \t \t 19.89445 \n",
- "\n",
- "5.0 \t\t 4.76 \t \t \t 7.05 \t \t \t 33.5862 \n",
- "\n",
- "6.0 \t\t 2.72 \t \t \t 9.55 \t \t \t 26.00465 \n",
- "\n",
- "safe in overturning with FS= 3.38\n",
- "safe in sliding with FS= 1.94 \n",
- "\n",
- "3.51 is soil pressure at toe in kip/ft**2\n",
- "0.67 is soil pressure at heel in kip/ft**2\n"
- ]
- }
- ],
- "prompt_number": 33
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.4:Pg-372"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.4\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "Msum=0;#sum of moment\n",
- "Vsum=0;#sum of force\n",
- "H=5+1.5;#Hdash in m\n",
- "phi=32*math.pi/180 # angle in degree\n",
- "Gamma=18.5; # in KN/m^3\n",
- "Ka=0.424;\n",
- "Pa=1/2.0*Gamma*H**2*Ka; # in KN/m\n",
- "Ph=Pa*math.cos(15*math.pi/180+2/3.0*phi); # in KN/m\n",
- "Mo=Ph*H/3.0; # moment\n",
- "AN=[1,2,3,4,5];#area number\n",
- "A=[4.36, 3.42, 0.77, 2.8, 2.8];#area\n",
- "W=[102.81, 80.64, 18.16, 66.02, 93.14];#weight\n",
- "MA=[2.18, 1.37, 0.98, 1.75, 2.83];#moment arm\n",
- "print \"AreaNo \\t Area(m**2) \\t Weight(kN/m) \\t Moment Arm(m) \\t Moment (kN-m/m)\\n\"\n",
- "M= numpy.zeros(5)\n",
- "for i in range(0,5):\n",
- " M[i]=W[i]*MA[i];\n",
- " Vsum=Vsum+W[i];\n",
- " Msum=Msum+M[i];\n",
- " print round(AN[i],2),\"\\t\\t \",round(A[i],2),\" \\t \\t\",round(W[i],2),\"\\t \\t \\t \",MA[i],\"\\t \\t \\t \",M[i],\"\\n\"\n",
- "\n",
- "FSO=Msum/Mo;\n",
- "if FSO>2 :\n",
- " print \"safe in overturning with FS=\",round(FSO,2),\"\\n\"\n",
- "\n",
- "#for sliding\n",
- "phi2=24*math.pi/180;\n",
- "V=Vsum\n",
- "B=3.5; # in m\n",
- "c2=30; # in KN/m^2\n",
- "Pp=1/2.0*2.37*18*1.5**2+2*30*1.54*1.5;\n",
- "FSS=(V*math.tan(2/3.0*phi2)+B*2/3.0*c2+Pp)/Ph;\n",
- "print \"safe in sliding with FS=\",round(FSS,2),\"\\n\"\n",
- "print \"if Pp is ignored then FS=1.37\"\n",
- "e=B/2.0-(Msum-Mo)/V;\n",
- "qtoe=V/B*(1+6*e/B); # in kN/m**2\n",
- "print round(qtoe,2),\"soil pressure at toe in kN/m**2\"\n",
- "qheel=V/B*(1-6*e/B); # in kN/m**2\n",
- "print round(qheel,2),\"soil pressure at heel in kN/m**2\"\n",
- "print \"there is difference in answer due to rounding off error\"\n",
- "\n",
- "# there is difference in answer due to rounding off error\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "AreaNo \t Area(m**2) \t Weight(kN/m) \t Moment Arm(m) \t Moment (kN-m/m)\n",
- "\n",
- "1.0 \t\t 4.36 \t \t102.81 \t \t \t 2.18 \t \t \t 224.1258 \n",
- "\n",
- "2.0 \t\t 3.42 \t \t80.64 \t \t \t 1.37 \t \t \t 110.4768 \n",
- "\n",
- "3.0 \t\t 0.77 \t \t18.16 \t \t \t 0.98 \t \t \t 17.7968 \n",
- "\n",
- "4.0 \t\t 2.8 \t \t66.02 \t \t \t 1.75 \t \t \t 115.535 \n",
- "\n",
- "5.0 \t\t 2.8 \t \t93.14 \t \t \t 2.83 \t \t \t 263.5862 \n",
- "\n",
- "safe in overturning with FS= 2.53 \n",
- "\n",
- "safe in sliding with FS= 2.7 \n",
- "\n",
- "if Pp is ignored then FS=1.37\n",
- "195.67 soil pressure at toe in kN/m**2\n",
- "10.48 soil pressure at heel in kN/m**2\n",
- "there is difference in answer due to rounding off error\n"
- ]
- }
- ],
- "prompt_number": 49
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.6:Pg-393"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.6\n",
- "import math\n",
- "Sv=2; # in ft\n",
- "Sh=3; # in ft\n",
- "w=3/12.0; # in inch\n",
- "fy=35000*144;\n",
- "FSb=3;\n",
- "pi=math.pi;\n",
- "phi=36*pi/180;\n",
- "Gamma1=105; # in lb/ft^3\n",
- "H=30;\n",
- "t=Gamma1*H*Sv*Sh*FSb/w/fy*(math.tan(pi/4-phi/2))**2;\n",
- "t=t*12; #in inch\n",
- "print round(t,2),\" is thickness in inches\"\n",
- "t=t+0.001*50;\n",
- "print \"so take thickness=0.2 inches\"\n",
- "#for tie length\n",
- "z=[5,10,15,20,25,30];\n",
- "TL=[38.45, 35.89, 33.34, 30.79, 28.25, 25.7];#tie length\n",
- "print \"z(ft)\\t Tie Length (ft)\\n\"\n",
- "for i in range(0,6):\n",
- " print z[i],\"\\t\",TL[i]\n",
- "\n",
- "print \"use tie length=40ft\"\n",
- "#check for over turning\n",
- "\n",
- "z=30/3.0;\n",
- "x1=20;\n",
- "L=40;\n",
- "Ka=0.26;\n",
- "Pa=1/2.0*Gamma1*Ka*H**2; # in kip/ft**2\n",
- "W1=Gamma1*H*L;\n",
- "FSO=W1*x1/(Pa*z);\n",
- "print round(FSO,2),\" is factor of safety is\" \n",
- "print \"since FS>3 structure is safe\"\n",
- "#check for sliding\n",
- "k=2/3.0;\n",
- "Pa=12285; # in kip/ft**2\n",
- "FSS=W1*math.tan(k*phi)/Pa;\n",
- "if FSS>3 :\n",
- " print \"safe in sliding with FS=\",round(FSS,2)\n",
- "\n",
- "#check for bearing\n",
- "Mr=126000*20; # in lb-ft/ft\n",
- "Mo=12285*10; # in lb-ft/ft\n",
- "V=126000;\n",
- "e=L/2-Mr/V+Mo/V;\n",
- "L1=L-2*e;#Ldash\n",
- "c2=1000; # in lb/ft^2\n",
- "Nc=25.8;\n",
- "Gamma2=110; # in lb/ft^3\n",
- "Ny=16.72;\n",
- "qult=c2*Nc+1/2.0*Gamma2*L1*Ny\n",
- "sigma0=Gamma1*H; # in lb/ft^2\n",
- "FSB=qult/sigma0;\n",
- "if FSB>5 :\n",
- " print \"bearing is safe with FS=\",round(FSB,2)\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "0.14 is thickness in inches\n",
- "so take thickness=0.2 inches\n",
- "z(ft)\t Tie Length (ft)\n",
- "\n",
- "5 \t38.45\n",
- "10 \t35.89\n",
- "15 \t33.34\n",
- "20 \t30.79\n",
- "25 \t28.25\n",
- "30 \t25.7\n",
- "use tie length=40ft\n",
- "20.51 is factor of safety is\n",
- "since FS>3 structure is safe\n",
- "safe in sliding with FS= 4.57\n",
- "safe in bearing with FS= 19.87\n"
- ]
- }
- ],
- "prompt_number": 56
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex8.7:Pg-397"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8.7\n",
- "import math\n",
- "import numpy\n",
- "pi=math.pi;\n",
- "phi=36.0*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "z=[8.0, 12.0, 16.0]; # in ft\n",
- "sigmaG=80*12.0; # in lb/ft^2\n",
- "Gamma1=110.0; # in lb/ft^3\n",
- "FS=1.5;\n",
- "Sv=numpy.zeros(3)\n",
- "for i in range(0,3):\n",
- " Sv[i]=sigmaG/Gamma1/z[i]/Ka/FS*12.0;\n",
- " print \"for z=\",z[i],\" ft Sv = \",round(Sv[i],2),\" inches\\n\"\n",
- "\n",
- "z=[16.0,56.0,76.0,96.0,112.0,144.0,176.0];\n",
- "zf=numpy.zeros(7)\n",
- "k2=numpy.zeros(7)\n",
- "L=numpy.zeros(7)\n",
- "for i in range(0,7):\n",
- " zf[i]=z[i]/12.0;#z in ft\n",
- "Sv=[1.67,1.67,1.67,1.67,1.33,1.33,1.33];\n",
- "k=[7.48,5.78,4.93,4.08,3.4,2.04,0.68];#0.51(H-z)\n",
- "print \"z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \\n\"\n",
- "for i in range(0,7):\n",
- " k2[i]=0.438*Sv[i];#0.438Sv\n",
- " L[i]=k[i]+k2[i];\n",
- " print round(z[i],2),\"\\t \\t\",round(zf[i],2),\"\\t \",round(Sv[i],2),\"\\t \\t \",round(k[i],2),\"\\t \\t \\t\",round(k2[i],2),\"\\t \\t \\t \",round(L[i],2)\n",
- "\n",
- "Sv=20/12.0;\n",
- "Ka=0.26;\n",
- "FS=1.5;\n",
- "l1=Sv*Ka*FS/4/math.tan(2/3.0*phi);\n",
- "if l1<3:\n",
- " l1=3;\n",
- " print l1,\"length in ft\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "for z= 8.0 ft Sv = 33.62 inches\n",
- "\n",
- "for z= 12.0 ft Sv = 22.41 inches\n",
- "\n",
- "for z= 16.0 ft Sv = 16.81 inches\n",
- "\n",
- "z(in) z(ft) Sv(ft) 0.51(H-z)(ft) 0.438Sv(ft) L(ft) \n",
- "\n",
- "16.0 \t \t1.33 \t 1.67 \t \t 7.48 \t \t \t0.73 \t \t \t 8.21\n",
- "56.0 \t \t4.67 \t 1.67 \t \t 5.78 \t \t \t0.73 \t \t \t 6.51\n",
- "76.0 \t \t6.33 \t 1.67 \t \t 4.93 \t \t \t0.73 \t \t \t 5.66\n",
- "96.0 \t \t8.0 \t 1.67 \t \t 4.08 \t \t \t0.73 \t \t \t 4.81\n",
- "112.0 \t \t9.33 \t 1.33 \t \t 3.4 \t \t \t0.58 \t \t \t 3.98\n",
- "144.0 \t \t12.0 \t 1.33 \t \t 2.04 \t \t \t0.58 \t \t \t 2.62\n",
- "176.0 \t \t14.67 \t 1.33 \t \t 0.68 \t \t \t0.58 \t \t \t 1.26\n",
- "3 length in ft\n"
- ]
- }
- ],
- "prompt_number": 79
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter09.ipynb b/Principles_Of_Foundation_Engineering/Chapter09.ipynb deleted file mode 100755 index 8264fd98..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter09.ipynb +++ /dev/null @@ -1,512 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:d9cb29be0932a6e1135cb07bf43a7e4c55a006ff68a1efd4e530482a24833ad9"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Chapter09:Sheet Pile Walls"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.1:Pg-419"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.1\n",
- "\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "sall=30;#sigma allowed\n",
- "pi=math.pi;\n",
- "zbar=12.1; # in ft\n",
- "L1=10.0; # in ft\n",
- "L2=20.0; #in ft\n",
- "Gamma=0.12; # in lb/ft^3\n",
- "Gamma1=0.1294-0.0624; # in lb/ft^3\n",
- "phi=40*pi/180; # angle given\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "Kp=(math.tan(pi/4+phi/2))**2;\n",
- "s1=Gamma*L1*Ka;#sigma1 in Kip/ft\n",
- "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in Kip/ft\n",
- "L3=s2/(Gamma1*(Kp-Ka)); # in ft\n",
- "print round(L3,2),\"is length in ft\"\n",
- "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;# in Kip/ft\n",
- "print round(P,2),\" is force in kip/ft\"\n",
- "s5=Gamma*L1*Kp+Gamma1*L2*Kp+Gamma*L3*(Kp-Ka);#sigma5 in Kip/ft\n",
- "print round(s5,2),\" is pressure in kip/ft\"\n",
- "A1=s5/(Gamma1*(Kp-Ka)); # in ft^2\n",
- "A2=8.0*P/(Gamma1*(Kp-Ka)) # in ft^2\n",
- "A3=6.0*P*(2.0*zbar*(Gamma1*(Kp-Ka))+s5)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n",
- "A4=P*(6.0*zbar*s5+4.0*P)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n",
- "print \"A1,A2,A3,A4 respectively is \",round(A1,1),round(A2,2),round(A3,2),round(A4,2)\n",
- "print \"slight error due to rounding off error\"\n",
- "#part(b)\n",
- "def f(x):\n",
- " return x**4+41.7*x**3-270.5*x**2-13363*x-106863\n",
- "[x]=fsolve(f,20);\n",
- "D=1.88+x;\n",
- "print round(D,2),\" is value of D, in ft\"\n",
- "TL=L1+L2+1.3*D;\n",
- "print round(TL,2),\" is total length in ft\"\n",
- "#partc\n",
- "z=math.sqrt(2*P/(Gamma1*(Kp-Ka)));#zdash\n",
- "Mmax=P*(z+zbar)-1/2.0*(Gamma1*(Kp-Ka))*z**2*z/3.0;\n",
- "S=Mmax*12/sall;\n",
- "print round(S,2),\"is section modulus in in^3/ft\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.88 is length in ft\n",
- "9.96 is force in kip/ft\n",
- "12.67 is pressure in kip/ft\n",
- "A1,A2,A3,A4 respectively is 43.2 271.33 13708.16 110880.89\n",
- "slight error due to rounding off error\n",
- "21.68 is value of D, in ft\n",
- "58.19 is total length in ft\n",
- "70.06 is section modulus in in^3/ft\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.2:Pg-426"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.2\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "sall=172.5*1000;#sigma allowed in KN/m^2\n",
- "pi=math.pi;\n",
- "c=47.0; # in KN/m^2\n",
- "zbar=1.78; # in m\n",
- "L1=2.0; #in m\n",
- "L2=3.0; # in m\n",
- "Gamma=15.9; # in KN/m^3\n",
- "Gamma1=19.33-9.81; # in KN/m^3\n",
- "phi=32*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "Kp=(math.tan(pi/4+phi/2))**2;\n",
- "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n",
- "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n",
- "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2; # in kN/ft\n",
- "print round(P,2),\" is force in kN/m\"\n",
- "def f(x):\n",
- " return 127.4*x**2-104.4*x-357.15\n",
- "[x]=fsolve(f,2);\n",
- "D=x;\n",
- "print round(D,2),\" is value of D in m\"\n",
- "print round(D*1.5,2),\"actual D in m\"\n",
- "L4=D*(4*c-(Gamma*L1+Gamma1*L2)-P/D)/4/c;\n",
- "print round(L4,2),\" is length in m\"\n",
- "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in KN/m^2\n",
- "s7=4*c+(Gamma*L1+Gamma1*L2);#sigma7 in KN/m^2\n",
- "z=P/s6;#zdash\n",
- "Mmax=P*(z+zbar)-1/2.0*s6*z**2; # in KN-m/m\n",
- "S=Mmax*12.0/sall; # in m^3/m\n",
- "print round(S,4),\" is section modulus in m**3/m\"\n",
- "print \"is slight error due to rounding off error\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "52.25 is force in kN/m\n",
- "2.13 is value of D in m\n",
- "3.2 actual D in m\n",
- "1.17 is length in m\n",
- "0.0072 is section modulus in m**3/m\n",
- "is slight error due to rounding off error\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.3:Pg-433"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.3\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "\n",
- "pi=math.pi;\n",
- "zbar=2.23; # in m\n",
- "L1=2.0; # in m\n",
- "L2=3.0; # in m\n",
- "Gamma=15.9; # in KN/m^3\n",
- "Gamma1=19.33-9.81; # in KN/m^3\n",
- "phi=32*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "Kp=(math.tan(pi/4+phi/2))**2;\n",
- "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n",
- "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n",
- "L3=s2/(Gamma1*(Kp-Ka)); # in m\n",
- "print round(L3,2),\"length in m\"\n",
- "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;\n",
- "print round(P,2),\"force in kN/m\"\n",
- "def f(x):\n",
- " return x**3+6.99*x**2-14.55\n",
- "[x]=fsolve(f,1.4);\n",
- "D=L3+x;\n",
- "print round(D,2),\"value of D in m\"\n",
- "AL=1.4*D;\n",
- "print round(AL,2),\"actual length in m\"\n",
- "#partb\n",
- "L4=1.4;\n",
- "F=P-1/2.0*(Gamma1*(Kp-Ka)*L4**2);\n",
- "print round(F,2),\"anchor force in kN/m\"\n",
- "#partc\n",
- "def f(x):\n",
- " return x**2+6.682*x-14.44\n",
- "[x]=fsolve(f,1.7);\n",
- "z=x+2;\n",
- "Mmax=-1/2.0*s1*L1*(x+2/3.0)+F*(x+1)-s1*x*x/2-1/2.0*Ka*Gamma1*x**3/3.0;\n",
- "print round(Mmax,2),\" is maximum moment in kN-m/m\" \n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "0.66 length in m\n",
- "58.38 force in kN/m\n",
- "1.98 value of D in m\n",
- "2.78 actual length in m\n",
- "30.88 anchor force in kN/m\n",
- "43.74 is maximum moment in kN-m/m\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.4:Pg-439"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.4\n",
- "\n",
- "Gamma=15.9; # in KN/m^3\n",
- "Gamma1=19.33-9.81; # in KN/m^3\n",
- "GD=0.23; # from fig. 9.16\n",
- "CDL1=1.172; # from fig. 9.19\n",
- "L1=2; # in m\n",
- "L2=3; # in m\n",
- "Dth=(L1+L2)*GD*CDL1;\n",
- "print round(Dth,2),\"theoritical depth in m\"\n",
- "Dac=1.4*Dth;\n",
- "print round(Dac,2),\"actual depth in m\"\n",
- "print \"approximate it as 2 m\"\n",
- "#part(b)\n",
- "CFL1=1.073;\n",
- "GF=0.07;\n",
- "Gammaa=(Gamma*L1**2+Gamma1*L2**2+2*Gamma*L1*L2)/(L1+L2)**2; # in KN/m^3\n",
- "F=Gammaa*(L1+L2)**2*GF*CFL1; # in KN/m\n",
- "print round(F,2),\"force in kN/m\"\n",
- "#part(c)\n",
- "GM=0.021; # from fig. 9.18\n",
- "CML1=1.036; # from fig. 9.21\n",
- "Mmax=Gammaa*(L1+L2)**3*GM*CML1; # in kN-m/m\n",
- "print round(Mmax,2),\"maximum moment in kN-m/m\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.35 theoritical depth in m\n",
- "1.89 actual depth in m\n",
- "approximate it as 2 m\n",
- "25.54 force in kN/m\n",
- "36.99 maximum moment in kN-m/m\n"
- ]
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.5:Pg-442"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.5\n",
- "import math\n",
- "import matplotlib.pyplot as plt\n",
- "import numpy\n",
- "Mmax=43.72; # in kN-m/m\n",
- "sp=[\"PSA-31\",\"PSA-23\"];#sheet pile\n",
- "H=[7.9,7.9] # in m\n",
- "I=[4.41e-6,5.63e-6]; # in m^4/m\n",
- "p=[0.00466,0.00365];\n",
- "S=[10.8e-5,12.8e-5]; # in m^3/m\n",
- "Md=[18.63,22.08]; # kn-m/m\n",
- "Logp=numpy.zeros(2)\n",
- "k=numpy.zeros(2)\n",
- "print \"SheetPile I(m**4/m) H(m) p\\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \\n\"\n",
- "for i in range(0,2):\n",
- " Logp[i]=math.log10(p[i]);\n",
- " k[i]=Md[i]/Mmax;\n",
- " print sp[i],\"\\t \",I[i],\" \",H[i],\" \",p[i],\" \",round(Logp[i],2),\" \",S[i],\" \",Md[i],\"\\t \",round(k[i],3)\n",
- " \n",
- "\n",
- "plt.plot(Logp,k);\n",
- "plt.title(\"Ex9.5\")\n",
- "plt.xlabel(\"LogP\")\n",
- "plt.ylabel(\"Md/Mmax\")\n",
- "plt.show()\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "SheetPile I(m**4/m) H(m) p\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \n",
- "\n",
- "PSA-31 \t 4.41e-06 7.9 0.00466 -2.33 0.000108 18.63 \t 0.426\n",
- "PSA-23 \t 5.63e-06 7.9 0.00365 -2.44 0.000128 22.08 \t 0.505\n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.6:Pg-445"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.6\n",
- "\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "\n",
- "pi=math.pi;\n",
- "R=0.6;\n",
- "L1=10.0; # in ft\n",
- "L2=20.0; #in ft\n",
- "Gammasat=122.4; # in lb/ft^3\n",
- "l1=5; # in ft\n",
- "Gamma=110.0; # in lb/ft^3\n",
- "C=0.68;\n",
- "L=L1+L2; # in ft\n",
- "Gammaw=62.4; # in lb/ft^3\n",
- "Gamma1=Gammasat-Gammaw;#gammadash in lb/ft^3\n",
- "Gammaav=(Gamma*L1+Gamma1*L2)/(L1+L2); # in lb/ft^3\n",
- "phi=35.0*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "sa=C*Ka*Gammaav*L;#sigmaa in lb/ft^2\n",
- "sp=R*sa;#sigmap # in lb/ft^2\n",
- "def f(x):\n",
- " return x**2+50*x-1000\n",
- "[x]=fsolve(f,15);\n",
- "D=x;#in ft\n",
- "print round(D,2),\" is depth in ft\"\n",
- "R=L/D*(L-2*l1)/(2*L+D-2*l1);\n",
- "print \"value of R=\",round(R,2),\" is OK\\n\"\n",
- "#partb\n",
- "F=sa*(L-R*D); # in lb/ft\n",
- "print round(F,2),\" is Force in lb/ft\"\n",
- "#partc\n",
- "Mmax=0.5*sa*L**2*((1-R*D/L)**2-(2*l1/L)*(1-R*D/L)); # in lb-ft/ft\n",
- "print round(Mmax,2),\"maximum moment lb-ft/ft\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "15.31 is depth in ft\n",
- "value of R= 0.6 is OK\n",
- "\n",
- "8821.24 is Force in lb/ft\n",
- "47693.02 maximum moment lb-ft/ft\n"
- ]
- }
- ],
- "prompt_number": 31
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.7:Pg-451"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.7\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "\n",
- "pi=math.pi;\n",
- "zbar=3.2; # in m\n",
- "c=41; # in KN/m^2\n",
- "L1=3; # in m\n",
- "L2=6; # in m\n",
- "Gamma=17;# in KN/m^3\n",
- "Gamma1=20-9.81; # in KN/m^3\n",
- "phi=35*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "Kp=(math.tan(pi/4+phi/2))**2;\n",
- "s1=Gamma*L1*Ka;#sigma1 in kN/m**2\n",
- "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in kN/m**2\n",
- "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2;\n",
- "print round(P,2),\"Force in kN/m\"\n",
- "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in kN/m**2\n",
- "print round(s6,2),\"pressure in kN/m**2\"\n",
- "def f(x):\n",
- " return x**2+15*x-25.43\n",
- "[x]=fsolve(f,1.6);\n",
- "D=x; # in m\n",
- "print round(D,1),\"depth in m\"\n",
- "F=P-s6*D; # in kN/m\n",
- "print round(F,2),\"force in kN/m\"\n",
- "print \"slight error due to rounding off\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "153.36 Force in kN/m\n",
- "51.86 pressure in kN/m**2\n",
- "1.5 depth in m\n",
- "73.61 force in kN/m\n",
- "slight error due to rounding off\n"
- ]
- }
- ],
- "prompt_number": 35
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.8\n",
- "import math\n",
- "pi=math.pi;\n",
- "Gamma=105.0; # in lb/ft^3\n",
- "Cov=14.0;\n",
- "B=15/12.0; # in inch\n",
- "Ka=0.26;\n",
- "phi=35.0*pi/180; # given angle in degree\n",
- "H=37.5/12; # in inch\n",
- "h=15/12.0; # in inch\n",
- "t=6/12.0; # in inch\n",
- "Gc=150.0;#gamma concrete in lb/ft^3\n",
- "W=H*t*Gc; # in lb/ft\n",
- "k=4.5;#kp*cos(delta)\n",
- "Pu=1/2.0*Gamma*H**2*(k-Ka*math.cos(phi)); # in lb/ft\n",
- "print round(Pu,2),\"force in lb/ft\"\n",
- "Pus=((Cov+1)/(Cov+H/h))*Pu; # in lb/ft\n",
- "print round(Pus,2),\"force in lb/ft\"\n",
- "Be=0.227*(H+h)+B;\n",
- "Pu=Pus*Be; # in lb/ft\n",
- "print round(Pu,2),\" is resistance of anchor plate in lb/ft\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2197.94 force in lb/ft\n",
- "1998.12 force in lb/ft\n",
- "4482.04 is resistance of anchor plate in lb/ft\n"
- ]
- }
- ],
- "prompt_number": 37
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter09_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter09_1.ipynb deleted file mode 100755 index 8264fd98..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter09_1.ipynb +++ /dev/null @@ -1,512 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:d9cb29be0932a6e1135cb07bf43a7e4c55a006ff68a1efd4e530482a24833ad9"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Chapter09:Sheet Pile Walls"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.1:Pg-419"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.1\n",
- "\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "sall=30;#sigma allowed\n",
- "pi=math.pi;\n",
- "zbar=12.1; # in ft\n",
- "L1=10.0; # in ft\n",
- "L2=20.0; #in ft\n",
- "Gamma=0.12; # in lb/ft^3\n",
- "Gamma1=0.1294-0.0624; # in lb/ft^3\n",
- "phi=40*pi/180; # angle given\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "Kp=(math.tan(pi/4+phi/2))**2;\n",
- "s1=Gamma*L1*Ka;#sigma1 in Kip/ft\n",
- "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in Kip/ft\n",
- "L3=s2/(Gamma1*(Kp-Ka)); # in ft\n",
- "print round(L3,2),\"is length in ft\"\n",
- "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;# in Kip/ft\n",
- "print round(P,2),\" is force in kip/ft\"\n",
- "s5=Gamma*L1*Kp+Gamma1*L2*Kp+Gamma*L3*(Kp-Ka);#sigma5 in Kip/ft\n",
- "print round(s5,2),\" is pressure in kip/ft\"\n",
- "A1=s5/(Gamma1*(Kp-Ka)); # in ft^2\n",
- "A2=8.0*P/(Gamma1*(Kp-Ka)) # in ft^2\n",
- "A3=6.0*P*(2.0*zbar*(Gamma1*(Kp-Ka))+s5)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n",
- "A4=P*(6.0*zbar*s5+4.0*P)/(Gamma1*(Kp-Ka))**2.0 # in ft^2\n",
- "print \"A1,A2,A3,A4 respectively is \",round(A1,1),round(A2,2),round(A3,2),round(A4,2)\n",
- "print \"slight error due to rounding off error\"\n",
- "#part(b)\n",
- "def f(x):\n",
- " return x**4+41.7*x**3-270.5*x**2-13363*x-106863\n",
- "[x]=fsolve(f,20);\n",
- "D=1.88+x;\n",
- "print round(D,2),\" is value of D, in ft\"\n",
- "TL=L1+L2+1.3*D;\n",
- "print round(TL,2),\" is total length in ft\"\n",
- "#partc\n",
- "z=math.sqrt(2*P/(Gamma1*(Kp-Ka)));#zdash\n",
- "Mmax=P*(z+zbar)-1/2.0*(Gamma1*(Kp-Ka))*z**2*z/3.0;\n",
- "S=Mmax*12/sall;\n",
- "print round(S,2),\"is section modulus in in^3/ft\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.88 is length in ft\n",
- "9.96 is force in kip/ft\n",
- "12.67 is pressure in kip/ft\n",
- "A1,A2,A3,A4 respectively is 43.2 271.33 13708.16 110880.89\n",
- "slight error due to rounding off error\n",
- "21.68 is value of D, in ft\n",
- "58.19 is total length in ft\n",
- "70.06 is section modulus in in^3/ft\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.2:Pg-426"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.2\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "sall=172.5*1000;#sigma allowed in KN/m^2\n",
- "pi=math.pi;\n",
- "c=47.0; # in KN/m^2\n",
- "zbar=1.78; # in m\n",
- "L1=2.0; #in m\n",
- "L2=3.0; # in m\n",
- "Gamma=15.9; # in KN/m^3\n",
- "Gamma1=19.33-9.81; # in KN/m^3\n",
- "phi=32*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "Kp=(math.tan(pi/4+phi/2))**2;\n",
- "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n",
- "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n",
- "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2; # in kN/ft\n",
- "print round(P,2),\" is force in kN/m\"\n",
- "def f(x):\n",
- " return 127.4*x**2-104.4*x-357.15\n",
- "[x]=fsolve(f,2);\n",
- "D=x;\n",
- "print round(D,2),\" is value of D in m\"\n",
- "print round(D*1.5,2),\"actual D in m\"\n",
- "L4=D*(4*c-(Gamma*L1+Gamma1*L2)-P/D)/4/c;\n",
- "print round(L4,2),\" is length in m\"\n",
- "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in KN/m^2\n",
- "s7=4*c+(Gamma*L1+Gamma1*L2);#sigma7 in KN/m^2\n",
- "z=P/s6;#zdash\n",
- "Mmax=P*(z+zbar)-1/2.0*s6*z**2; # in KN-m/m\n",
- "S=Mmax*12.0/sall; # in m^3/m\n",
- "print round(S,4),\" is section modulus in m**3/m\"\n",
- "print \"is slight error due to rounding off error\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "52.25 is force in kN/m\n",
- "2.13 is value of D in m\n",
- "3.2 actual D in m\n",
- "1.17 is length in m\n",
- "0.0072 is section modulus in m**3/m\n",
- "is slight error due to rounding off error\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.3:Pg-433"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.3\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "\n",
- "pi=math.pi;\n",
- "zbar=2.23; # in m\n",
- "L1=2.0; # in m\n",
- "L2=3.0; # in m\n",
- "Gamma=15.9; # in KN/m^3\n",
- "Gamma1=19.33-9.81; # in KN/m^3\n",
- "phi=32*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "Kp=(math.tan(pi/4+phi/2))**2;\n",
- "s1=Gamma*L1*Ka;#sigma1 in KN/m^2\n",
- "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in KN/m^2\n",
- "L3=s2/(Gamma1*(Kp-Ka)); # in m\n",
- "print round(L3,2),\"length in m\"\n",
- "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2+1/2.0*s2*L3;\n",
- "print round(P,2),\"force in kN/m\"\n",
- "def f(x):\n",
- " return x**3+6.99*x**2-14.55\n",
- "[x]=fsolve(f,1.4);\n",
- "D=L3+x;\n",
- "print round(D,2),\"value of D in m\"\n",
- "AL=1.4*D;\n",
- "print round(AL,2),\"actual length in m\"\n",
- "#partb\n",
- "L4=1.4;\n",
- "F=P-1/2.0*(Gamma1*(Kp-Ka)*L4**2);\n",
- "print round(F,2),\"anchor force in kN/m\"\n",
- "#partc\n",
- "def f(x):\n",
- " return x**2+6.682*x-14.44\n",
- "[x]=fsolve(f,1.7);\n",
- "z=x+2;\n",
- "Mmax=-1/2.0*s1*L1*(x+2/3.0)+F*(x+1)-s1*x*x/2-1/2.0*Ka*Gamma1*x**3/3.0;\n",
- "print round(Mmax,2),\" is maximum moment in kN-m/m\" \n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "0.66 length in m\n",
- "58.38 force in kN/m\n",
- "1.98 value of D in m\n",
- "2.78 actual length in m\n",
- "30.88 anchor force in kN/m\n",
- "43.74 is maximum moment in kN-m/m\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.4:Pg-439"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.4\n",
- "\n",
- "Gamma=15.9; # in KN/m^3\n",
- "Gamma1=19.33-9.81; # in KN/m^3\n",
- "GD=0.23; # from fig. 9.16\n",
- "CDL1=1.172; # from fig. 9.19\n",
- "L1=2; # in m\n",
- "L2=3; # in m\n",
- "Dth=(L1+L2)*GD*CDL1;\n",
- "print round(Dth,2),\"theoritical depth in m\"\n",
- "Dac=1.4*Dth;\n",
- "print round(Dac,2),\"actual depth in m\"\n",
- "print \"approximate it as 2 m\"\n",
- "#part(b)\n",
- "CFL1=1.073;\n",
- "GF=0.07;\n",
- "Gammaa=(Gamma*L1**2+Gamma1*L2**2+2*Gamma*L1*L2)/(L1+L2)**2; # in KN/m^3\n",
- "F=Gammaa*(L1+L2)**2*GF*CFL1; # in KN/m\n",
- "print round(F,2),\"force in kN/m\"\n",
- "#part(c)\n",
- "GM=0.021; # from fig. 9.18\n",
- "CML1=1.036; # from fig. 9.21\n",
- "Mmax=Gammaa*(L1+L2)**3*GM*CML1; # in kN-m/m\n",
- "print round(Mmax,2),\"maximum moment in kN-m/m\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.35 theoritical depth in m\n",
- "1.89 actual depth in m\n",
- "approximate it as 2 m\n",
- "25.54 force in kN/m\n",
- "36.99 maximum moment in kN-m/m\n"
- ]
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.5:Pg-442"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.5\n",
- "import math\n",
- "import matplotlib.pyplot as plt\n",
- "import numpy\n",
- "Mmax=43.72; # in kN-m/m\n",
- "sp=[\"PSA-31\",\"PSA-23\"];#sheet pile\n",
- "H=[7.9,7.9] # in m\n",
- "I=[4.41e-6,5.63e-6]; # in m^4/m\n",
- "p=[0.00466,0.00365];\n",
- "S=[10.8e-5,12.8e-5]; # in m^3/m\n",
- "Md=[18.63,22.08]; # kn-m/m\n",
- "Logp=numpy.zeros(2)\n",
- "k=numpy.zeros(2)\n",
- "print \"SheetPile I(m**4/m) H(m) p\\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \\n\"\n",
- "for i in range(0,2):\n",
- " Logp[i]=math.log10(p[i]);\n",
- " k[i]=Md[i]/Mmax;\n",
- " print sp[i],\"\\t \",I[i],\" \",H[i],\" \",p[i],\" \",round(Logp[i],2),\" \",S[i],\" \",Md[i],\"\\t \",round(k[i],3)\n",
- " \n",
- "\n",
- "plt.plot(Logp,k);\n",
- "plt.title(\"Ex9.5\")\n",
- "plt.xlabel(\"LogP\")\n",
- "plt.ylabel(\"Md/Mmax\")\n",
- "plt.show()\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "SheetPile I(m**4/m) H(m) p\t Logp S(m**3/m) Md(kN-m/m) Md/Mmax \n",
- "\n",
- "PSA-31 \t 4.41e-06 7.9 0.00466 -2.33 0.000108 18.63 \t 0.426\n",
- "PSA-23 \t 5.63e-06 7.9 0.00365 -2.44 0.000128 22.08 \t 0.505\n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.6:Pg-445"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.6\n",
- "\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "\n",
- "pi=math.pi;\n",
- "R=0.6;\n",
- "L1=10.0; # in ft\n",
- "L2=20.0; #in ft\n",
- "Gammasat=122.4; # in lb/ft^3\n",
- "l1=5; # in ft\n",
- "Gamma=110.0; # in lb/ft^3\n",
- "C=0.68;\n",
- "L=L1+L2; # in ft\n",
- "Gammaw=62.4; # in lb/ft^3\n",
- "Gamma1=Gammasat-Gammaw;#gammadash in lb/ft^3\n",
- "Gammaav=(Gamma*L1+Gamma1*L2)/(L1+L2); # in lb/ft^3\n",
- "phi=35.0*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "sa=C*Ka*Gammaav*L;#sigmaa in lb/ft^2\n",
- "sp=R*sa;#sigmap # in lb/ft^2\n",
- "def f(x):\n",
- " return x**2+50*x-1000\n",
- "[x]=fsolve(f,15);\n",
- "D=x;#in ft\n",
- "print round(D,2),\" is depth in ft\"\n",
- "R=L/D*(L-2*l1)/(2*L+D-2*l1);\n",
- "print \"value of R=\",round(R,2),\" is OK\\n\"\n",
- "#partb\n",
- "F=sa*(L-R*D); # in lb/ft\n",
- "print round(F,2),\" is Force in lb/ft\"\n",
- "#partc\n",
- "Mmax=0.5*sa*L**2*((1-R*D/L)**2-(2*l1/L)*(1-R*D/L)); # in lb-ft/ft\n",
- "print round(Mmax,2),\"maximum moment lb-ft/ft\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "15.31 is depth in ft\n",
- "value of R= 0.6 is OK\n",
- "\n",
- "8821.24 is Force in lb/ft\n",
- "47693.02 maximum moment lb-ft/ft\n"
- ]
- }
- ],
- "prompt_number": 31
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.7:Pg-451"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.7\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "\n",
- "pi=math.pi;\n",
- "zbar=3.2; # in m\n",
- "c=41; # in KN/m^2\n",
- "L1=3; # in m\n",
- "L2=6; # in m\n",
- "Gamma=17;# in KN/m^3\n",
- "Gamma1=20-9.81; # in KN/m^3\n",
- "phi=35*pi/180;\n",
- "Ka=(math.tan(pi/4-phi/2))**2;\n",
- "Kp=(math.tan(pi/4+phi/2))**2;\n",
- "s1=Gamma*L1*Ka;#sigma1 in kN/m**2\n",
- "s2=Gamma*L1*Ka+Gamma1*L2*Ka;#sigma2 in kN/m**2\n",
- "P=1/2.0*s1*L1+s1*L2+1/2.0*(s2-s1)*L2;\n",
- "print round(P,2),\"Force in kN/m\"\n",
- "s6=4*c-(Gamma*L1+Gamma1*L2);#sigma6 in kN/m**2\n",
- "print round(s6,2),\"pressure in kN/m**2\"\n",
- "def f(x):\n",
- " return x**2+15*x-25.43\n",
- "[x]=fsolve(f,1.6);\n",
- "D=x; # in m\n",
- "print round(D,1),\"depth in m\"\n",
- "F=P-s6*D; # in kN/m\n",
- "print round(F,2),\"force in kN/m\"\n",
- "print \"slight error due to rounding off\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "153.36 Force in kN/m\n",
- "51.86 pressure in kN/m**2\n",
- "1.5 depth in m\n",
- "73.61 force in kN/m\n",
- "slight error due to rounding off\n"
- ]
- }
- ],
- "prompt_number": 35
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9.8\n",
- "import math\n",
- "pi=math.pi;\n",
- "Gamma=105.0; # in lb/ft^3\n",
- "Cov=14.0;\n",
- "B=15/12.0; # in inch\n",
- "Ka=0.26;\n",
- "phi=35.0*pi/180; # given angle in degree\n",
- "H=37.5/12; # in inch\n",
- "h=15/12.0; # in inch\n",
- "t=6/12.0; # in inch\n",
- "Gc=150.0;#gamma concrete in lb/ft^3\n",
- "W=H*t*Gc; # in lb/ft\n",
- "k=4.5;#kp*cos(delta)\n",
- "Pu=1/2.0*Gamma*H**2*(k-Ka*math.cos(phi)); # in lb/ft\n",
- "print round(Pu,2),\"force in lb/ft\"\n",
- "Pus=((Cov+1)/(Cov+H/h))*Pu; # in lb/ft\n",
- "print round(Pus,2),\"force in lb/ft\"\n",
- "Be=0.227*(H+h)+B;\n",
- "Pu=Pus*Be; # in lb/ft\n",
- "print round(Pu,2),\" is resistance of anchor plate in lb/ft\"\n",
- "\n",
- "# The answers in the book are different due to approximation while here calculations are precise"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2197.94 force in lb/ft\n",
- "1998.12 force in lb/ft\n",
- "4482.04 is resistance of anchor plate in lb/ft\n"
- ]
- }
- ],
- "prompt_number": 37
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter10.ipynb b/Principles_Of_Foundation_Engineering/Chapter10.ipynb deleted file mode 100755 index 3af11efd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter10.ipynb +++ /dev/null @@ -1,211 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:54ddb8c76d55d78e9f237ddb7f5823ac10a3585adf1b3932a3b8cc9352fd8e76"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 10:Braced Cuts"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.1: pg-511"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10.1 : \n",
- "\n",
- "Gamma=18.0;\n",
- "H=7.0;\n",
- "sigmaa=0.3*Gamma*H;\n",
- "print\"maximum pressure intensity in kN/m^2 is\",sigmaa ;\n",
- "#partb\n",
- "A=54.02;\n",
- "B1=1.0/2*1.75*37.8+37.8*1.75-A;\n",
- "B2=45.2;\n",
- "C=54.02;\n",
- "s=3.0; #spacing\n",
- "Pa=C*s;\n",
- "print \"strut loads in kN is\",Pa\n",
- "Pb=(B1+B2)*s;\n",
- "print \"strut loads in kN is\",Pb\n",
- "Pc=C*s;\n",
- "print \"strut loads in kN is\", Pc\n",
- "#partc\n",
- "Me=45.2*1.196-37.8*1.196*1.196/2;#Me=Mmax\n",
- "Sall=170e3;#sigmaall\n",
- "S=Me/Sall;\n",
- "print \"section modulus in m^3/m is \",round(S,7)\n",
- "#partd\n",
- "Mmax=(B1+B2)*s**2.0/8;\n",
- "S=Mmax/Sall;\n",
- "print\"section modulus in m^3/m is\",round(S,6)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "maximum pressure intensity in kN/m^2 is 37.8\n",
- "strut loads in kN is 162.06\n",
- "strut loads in kN is 271.215\n",
- "strut loads in kN is 162.06\n",
- "section modulus in m^3/m is 0.000159\n",
- "section modulus in m^3/m is 0.000598\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.2:pg-514"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10.2\n",
- "\n",
- "import math\n",
- "phi=35.0;\n",
- "Gamma=17.0; # kN/m^3\n",
- "s=4; #spacing in m\n",
- "H=9;\n",
- "Ka=(math.tan(45*(math.pi/180)-35*(math.pi/(180.0*2))))**2\n",
- "sigma=0.65*Gamma*Ka*H\n",
- "A=sigma*5*5.0/6;\n",
- "B1=sigma*5-A;\n",
- "C=sigma*4*4/6.0; \n",
- "B2=sigma*s-C;\n",
- "Pa=A*s;\n",
- "Pb=(B1+B2)*s;\n",
- "Pc=C*s;\n",
- "print \"strut loads at A in kN is\",round(Pa,2)\n",
- "\n",
- "print \"strut loads at B in kN is\",round(Pb,2)\n",
- "\n",
- "print \"strut loads at C in kN is\",round(Pc,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "strut loads at A in kN is 449.17\n",
- "strut loads at B in kN is 233.57\n",
- "strut loads at C in kN is 287.47\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.3:pg-523"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10.3\n",
- "\n",
- "import math\n",
- "q=0;\n",
- "Gamma=17; # in KN/m^3\n",
- "B=3.0 # in meter\n",
- "L=20; # in meter\n",
- "c=30;# in KN/m^3\n",
- "T=1.5;# in meter\n",
- "H=5.5;# in meter\n",
- "B1=B/2;#B'\n",
- "B11=T*math.sqrt(2);#B''\n",
- "FS=(5.14*c*(1+B11*0.2/L)+c*H/B1)/(Gamma*H+q) # from equation of factor of safety\n",
- "print\"factor of safety is\",round(FS,2)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "factor of safety is 2.86\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.4:pg-529"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10.4\n",
- "\n",
- "\n",
- "L1=5; # in meter\n",
- "L2=4;# in meter\n",
- "B=5;# in meter\n",
- "h=4.5;# in meter\n",
- "icr=1 #\n",
- "iexit= 0.54*h/L2\n",
- "FOS=icr/iexit # Factor of safety\n",
- "print \"The Factory of safety is\",round(FOS,3)\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Factory of safety is 1.646\n"
- ]
- }
- ],
- "prompt_number": 23
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter10_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter10_1.ipynb deleted file mode 100755 index 3af11efd..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter10_1.ipynb +++ /dev/null @@ -1,211 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:54ddb8c76d55d78e9f237ddb7f5823ac10a3585adf1b3932a3b8cc9352fd8e76"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 10:Braced Cuts"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.1: pg-511"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10.1 : \n",
- "\n",
- "Gamma=18.0;\n",
- "H=7.0;\n",
- "sigmaa=0.3*Gamma*H;\n",
- "print\"maximum pressure intensity in kN/m^2 is\",sigmaa ;\n",
- "#partb\n",
- "A=54.02;\n",
- "B1=1.0/2*1.75*37.8+37.8*1.75-A;\n",
- "B2=45.2;\n",
- "C=54.02;\n",
- "s=3.0; #spacing\n",
- "Pa=C*s;\n",
- "print \"strut loads in kN is\",Pa\n",
- "Pb=(B1+B2)*s;\n",
- "print \"strut loads in kN is\",Pb\n",
- "Pc=C*s;\n",
- "print \"strut loads in kN is\", Pc\n",
- "#partc\n",
- "Me=45.2*1.196-37.8*1.196*1.196/2;#Me=Mmax\n",
- "Sall=170e3;#sigmaall\n",
- "S=Me/Sall;\n",
- "print \"section modulus in m^3/m is \",round(S,7)\n",
- "#partd\n",
- "Mmax=(B1+B2)*s**2.0/8;\n",
- "S=Mmax/Sall;\n",
- "print\"section modulus in m^3/m is\",round(S,6)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "maximum pressure intensity in kN/m^2 is 37.8\n",
- "strut loads in kN is 162.06\n",
- "strut loads in kN is 271.215\n",
- "strut loads in kN is 162.06\n",
- "section modulus in m^3/m is 0.000159\n",
- "section modulus in m^3/m is 0.000598\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.2:pg-514"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10.2\n",
- "\n",
- "import math\n",
- "phi=35.0;\n",
- "Gamma=17.0; # kN/m^3\n",
- "s=4; #spacing in m\n",
- "H=9;\n",
- "Ka=(math.tan(45*(math.pi/180)-35*(math.pi/(180.0*2))))**2\n",
- "sigma=0.65*Gamma*Ka*H\n",
- "A=sigma*5*5.0/6;\n",
- "B1=sigma*5-A;\n",
- "C=sigma*4*4/6.0; \n",
- "B2=sigma*s-C;\n",
- "Pa=A*s;\n",
- "Pb=(B1+B2)*s;\n",
- "Pc=C*s;\n",
- "print \"strut loads at A in kN is\",round(Pa,2)\n",
- "\n",
- "print \"strut loads at B in kN is\",round(Pb,2)\n",
- "\n",
- "print \"strut loads at C in kN is\",round(Pc,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "strut loads at A in kN is 449.17\n",
- "strut loads at B in kN is 233.57\n",
- "strut loads at C in kN is 287.47\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.3:pg-523"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10.3\n",
- "\n",
- "import math\n",
- "q=0;\n",
- "Gamma=17; # in KN/m^3\n",
- "B=3.0 # in meter\n",
- "L=20; # in meter\n",
- "c=30;# in KN/m^3\n",
- "T=1.5;# in meter\n",
- "H=5.5;# in meter\n",
- "B1=B/2;#B'\n",
- "B11=T*math.sqrt(2);#B''\n",
- "FS=(5.14*c*(1+B11*0.2/L)+c*H/B1)/(Gamma*H+q) # from equation of factor of safety\n",
- "print\"factor of safety is\",round(FS,2)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "factor of safety is 2.86\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex10.4:pg-529"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10.4\n",
- "\n",
- "\n",
- "L1=5; # in meter\n",
- "L2=4;# in meter\n",
- "B=5;# in meter\n",
- "h=4.5;# in meter\n",
- "icr=1 #\n",
- "iexit= 0.54*h/L2\n",
- "FOS=icr/iexit # Factor of safety\n",
- "print \"The Factory of safety is\",round(FOS,3)\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Factory of safety is 1.646\n"
- ]
- }
- ],
- "prompt_number": 23
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter11.ipynb b/Principles_Of_Foundation_Engineering/Chapter11.ipynb deleted file mode 100755 index 0afdb4a0..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter11.ipynb +++ /dev/null @@ -1,650 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:a4054b3d6b79658bcd763c43dc94ca6de4cd49698c12f912e4c83a9a61f47154"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter11:Pile Foundations"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.1:Pg-532"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.1\n",
- "import math\n",
- "\n",
- "#parta\n",
- "phi=30.0; # angle in degree\n",
- "pa=2000.0; \n",
- "q=100*50/1000.0;\n",
- "Nq=55.0;\n",
- "Ap=16*16/16/12; # area in ft^2\n",
- "Qp=Ap*q*Nq; # in kip\n",
- "qp=0.4*pa*Nq*math.tan(phi*math.pi/180)*Ap; # in lb\n",
- "print round(Qp,2),\"ultimate load in lb\"\n",
- "print round(qp/1000,2),\"ultimate load in kip\"\n",
- "print \"there is change in answer because of calculation mistake in the book\"\n",
- "\n",
- "#partb\n",
- "Nsigma=36;\n",
- "Ap=16*16.0/12.0/12;\n",
- "q=110*50.0/1000;\n",
- "Qp=Ap*q*Nsigma*((1+2.0*(1-math.sin(phi*math.pi/180)))/3); # in kip\n",
- "print round(Qp,2),\"ultimate load in kip\"\n",
- "#partc\n",
- "Nq=18.4;\n",
- "Qp=Ap*q*Nq; # in kip\n",
- "print round(Qp,2),\"ultimate load in kip\"\n",
- "\n",
- "# ANSWER IN THE BOOK IS WRONG"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "275.0 ultimate load in lb\n",
- "25.4 ultimate load in kip\n",
- "there is change in answer because of calculation mistake in the book\n",
- "234.67 ultimate load in kip\n",
- "179.91 ultimate load in kip\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.2:Pg-533"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.2\n",
- "\n",
- "import math\n",
- "#parta\n",
- "K=1.3;\n",
- "f0=0;\n",
- "Delta=0.8*30; # in ft\n",
- "D=16.0/12; # in ft\n",
- "L1=50.0;\n",
- "p=4*16/12.0; # in ft\n",
- "Gamma=110/1000.0; # in lb/ft^3\n",
- "L=15*D; # in ft\n",
- "sigma=Gamma*L; # in kip/ft^2\n",
- "f20=K*sigma*math.tan(Delta*math.pi/180); # kip/ft^2\n",
- "Qs=(f0+f20)/2*(p*L)+f20*p*(L1-L);\n",
- "print round(Qs,2),\"ultimate load in kip\"\n",
- "#partb\n",
- "FS=4; # factor of safety\n",
- "Qp=56.45/3+234.7/3+179.9/3; # in kip\n",
- "Qu=Qs+Qp; # in kip\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall,2),\"is allowed load in kip\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "271.65 ultimate load in kip\n",
- "107.17 is allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.3:Pg-534"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.3\n",
- "import math\n",
- "K=0.25;\n",
- "Ap=16*16.0/12/12; # area in ft^2\n",
- "phi=30*math.pi/180;\n",
- "Nq=25;\n",
- "q=110*50.0/1000; # in kip\n",
- "sigmao=q/2; # in kip/ft^2\n",
- "p=4*16.0/12; # in ft\n",
- "L=50; # in ft\n",
- "FS=4; # factor of safety\n",
- "Qu=q*Nq*Ap+K*sigmao*math.tan(0.8*phi)*p*L; # in kip\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall,1),\"allowed load in kip\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "81.5 allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.4:Pg-535"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.4\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "FS=4; # factor of safety\n",
- "Ap=0.1295; # area in m^2\n",
- "Nc=9;\n",
- "cu2=100;\n",
- "Qp=Ap*Nc*cu2; # in kN\n",
- "D=[5, 10, 30]; # depth in m\n",
- "avgD=[2.5, 7.5,20.0]; # average depth in m\n",
- "sigma=[45.0, 110.5, 228.5]; # in KN/m^2\n",
- "cu=[30, 30, 100]; # in kN/m^2\n",
- "alpha=[0.6, 0.9, 0.725];\n",
- "L=[5, 5, 20]; # in m\n",
- "p=math.pi*0.406;\n",
- "Qs=0; # in kN\n",
- "cusig=numpy.zeros(3)\n",
- "print round(Qp,2),\"bearing capacity in kN\"\n",
- "print \"depth (m)\\t avg Depth(m)\\t avgVerticalStress(kN/m**2)\\t cu(kN/m**2)\\t cu/sigma\\t alpha\\n\"\n",
- "for i in range(0,3):\n",
- " cusig[i]=cu[i]/sigma[i];\n",
- " Qs=Qs+alpha[i]*cu[i]*L[i]*p;\n",
- " print round(D[i],2),\"\\t \\t \\t\",round(avgD[i],2),\"\\t \\t\",round(sigma[i],2),\"\\t\\t\\t \",round(cu[i],2),\"\\t \",round(cusig[i],2),\"\\t\\t \",round(alpha[i],2),\"\\n\"\n",
- "print round(Qs,2),\"bearing capacity in kN\"\n",
- "#part2\n",
- "Lambda=0.136;\n",
- "L=30;\n",
- "fav=Lambda*(178.48+2*76.7);\n",
- "Qs2=p*L*fav; # in kN\n",
- "#part3\n",
- "fav1=13;\n",
- "fav2=31.9;\n",
- "fav3=93.43;\n",
- "Qs3=p*(fav1*5+fav2*5+fav3*20); # in kN\n",
- "print round(Qs3,1),\"bearing capacity in kN\"\n",
- "Qsavg=Qs/3+Qs2/3+Qs3/3; # in kN\n",
- "Qu=Qp+Qsavg # in kN\n",
- "Qall=Qu/FS; # in kN\n",
- "print round(Qall,1),\"allowed bearing capacity in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "116.55 bearing capacity in kN\n",
- "depth (m)\t avg Depth(m)\t avgVerticalStress(kN/m**2)\t cu(kN/m**2)\t cu/sigma\t alpha\n",
- "\n",
- "5.0 \t \t \t2.5 \t \t45.0 \t\t\t 30.0 \t 0.67 \t\t 0.6 \n",
- "\n",
- "10.0 \t \t \t7.5 \t \t110.5 \t\t\t 30.0 \t 0.27 \t\t 0.9 \n",
- "\n",
- "30.0 \t \t \t20.0 \t \t228.5 \t\t\t 100.0 \t 0.44 \t\t 0.72 \n",
- "\n",
- "2136.44 bearing capacity in kN\n",
- "2669.7 bearing capacity in kN\n",
- "573.6 allowed bearing capacity in kN\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.5:Pg-538"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.5\n",
- "\n",
- "import numpy\n",
- "D=[6, 12, 20]; # depth in m\n",
- "fc=[34.34, 54.94, 70.63]; # in kN/m**2\n",
- "alpha=[0.84, 0.71, 0.63];\n",
- "dL=[6, 6, 8]; # in m\n",
- "p=4*0.305;\n",
- "Qs=0;\n",
- "Q=numpy.zeros(3)\n",
- "print \" depth(m)\\t fc(kN/m**2)\\t alpha \\t \\t deltaL(m)\\t Q(kN)\\n\"\n",
- "for i in range (0,3):\n",
- " Q[i]=alpha[i]*fc[i]*p*dL[i];\n",
- " Qs=Q[i]+Qs;\n",
- " print D[i],\"\\t\\t \",fc[i],\"\\t \",alpha[i],\"\\t \",dL[i],\"\\t\\t \",round(Q[i],2)\n",
- "\n",
- "print round(Qs),\"bearing force in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " depth(m)\t fc(kN/m**2)\t alpha \t \t deltaL(m)\t Q(kN)\n",
- "\n",
- "6 \t\t 34.34 \t 0.84 \t 6 \t\t 211.15\n",
- "12 \t\t 54.94 \t 0.71 \t 6 \t\t 285.53\n",
- "20 \t\t 70.63 \t 0.63 \t 8 \t\t 434.29\n",
- "931.0 bearing force in kN\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.6:Pg-545"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.6\n",
- "\n",
- "import math\n",
- "L=21; # in m\n",
- "Qwp=502-350; # in kN\n",
- "Qws=350; # in kN\n",
- "Ap=0.1045; # area in m^2\n",
- "Ep=21e6; # in kN/m^2\n",
- "epsilon=0.62;\n",
- "Se1=(Qwp+epsilon*Qws)*L/Ap/Ep; # in m\n",
- "#part2\n",
- "Iwp=0.85;\n",
- "qwp=152/Ap;\n",
- "Es=25e3; # in kN/m^2\n",
- "D=0.356; # in m\n",
- "mus=0.35;\n",
- "Se2=qwp*D/Es*Iwp*(1-mus**2); # in m\n",
- "#part3\n",
- "p=1.168;\n",
- "Iws=2+0.35*math.sqrt(L/D);\n",
- "Se3=Qws/p/L*D/Es*Iws*(1-mus**2); # in m\n",
- "Se=Se1+Se2+Se3; # in m\n",
- "print round(Se*1000,1),\"settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "19.8 settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.7:Pg-560"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.7\n",
- "\n",
- "Ep=207e6; # in kN/m^2\n",
- "Ip=123e-6; # in m^4\n",
- "nh=12000; # in kN/m^3\n",
- "#from table 11.13\n",
- "xz=0.008;\n",
- "Ax=2.435;\n",
- "T=(Ep*Ip/nh)**0.2;\n",
- "Qg1=xz*Ep*Ip/Ax/T**3;\n",
- "#part2\n",
- "Fy=248000;\n",
- "d1=0.254;\n",
- "Am=0.772;\n",
- "Mzmax=Fy*Ip*2/d1; # in Kn-m\n",
- "Qg2=Mzmax/Am/T; # in kN\n",
- "if Qg2>Qg1 :\n",
- " Qg=Qg1;\n",
- " print round(Qg,2),\"lateral load in kN\"\n",
- "# there is slight variation in answer in textbook due to approximation"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "53.27 lateral load in kN\n"
- ]
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.8:Pg-561"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.8\n",
- "\n",
- "import math\n",
- "#part1\n",
- "Ep=207e6; # in kN/m^2\n",
- "Ip=123e-6; # in m^4\n",
- "nh=12000; # in kN/m^3\n",
- "#from table 11.1a\n",
- "xo=0.008; # in m\n",
- "L=25;\n",
- "Fy=248000; # yield stress in kN/m^2\n",
- "D=0.254;\n",
- "Am=0.772;\n",
- "Gamma=18.0; # in kN/m^3\n",
- "phi=35; # in angle\n",
- "Kp=(math.tan(math.pi/4+phi*math.pi/360))**2;\n",
- "My=Fy*Ip*2/D; # in kN-m\n",
- "Qug=140*Kp*D**3*Gamma; # in kN\n",
- "\n",
- "#part2\n",
- "Qg1=xo*(Ep*Ip)**0.6*nh**0.4/0.15/L; # in kN\n",
- "\n",
- "if Qug>Qg1:\n",
- " Qg=Qg1;\n",
- " print round(Qg,2),\"lateral load in kN\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "40.2 lateral load in kN\n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.9:Pg-567"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.9\n",
- "\n",
- "import math\n",
- "Wrh=30*12; # in kip-ft\n",
- "E=0.8;\n",
- "Wr=7.5; # in kip\n",
- "S=1/8.0; \n",
- "C=0.1;\n",
- "FS=6; # in factor of safety\n",
- "n=0.4; # Coefficient of restitution\n",
- "Wp=12/12.0*12/12.0*80*150+550; # in lb\n",
- "Wp=Wp/1000.0;\n",
- "Qu=E*Wrh/(S+C)*(Wr+n**2.0*Wp)/(Wr+Wp); # in kip\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall),\"allowed bearing capacity in kip\"\n",
- "#part2\n",
- "He=30*12.0;\n",
- "L=80*12.0;\n",
- "Ap=12*12.0; # area in in^2\n",
- "Ep=3e6/1000.0; # in kip/in^2\n",
- "FS=4; # factor of safety\n",
- "Qu=E*He/(S+math.sqrt(E*He*L/2.0/Ap/Ep)); # in kip\n",
- "Qall2=Qu/FS; # in kip\n",
- "print round(Qall2),\"allowed bearing capacity in kip\"\n",
- "\n",
- "#partc\n",
- "a=27;\n",
- "b=1;\n",
- "He=30;\n",
- "FS=3; # factor of safety\n",
- "Qu=a*math.sqrt(E*He)*(b-math.log10(S)); # in kip\n",
- "Qall3=Qu/FS; # in kip\n",
- "print round(Qall3),\"allowed bearing capacity in kip\"\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "101.0 allowed bearing capacity in kip\n",
- "104.0 allowed bearing capacity in kip\n",
- "84.0 allowed bearing capacity in kip\n"
- ]
- }
- ],
- "prompt_number": 35
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.10:Pg-570"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.10\n",
- "\n",
- "Hp=350; # in HP\n",
- "vp=0.0016; # in m/s\n",
- "Sl=0.762e-3; # in m/cycle\n",
- "f=115; # in Hz\n",
- "Qu=(0.746*Hp+98*vp)/(vp+Sl*f); # in kN\n",
- "print round(Qu),\"pile load capacity in kN\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2928.0 pile load capacity in kN\n"
- ]
- }
- ],
- "prompt_number": 38
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.11:Pg-578"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.11\n",
- "\n",
- "Lg=9.92; # in ft\n",
- "Bg=7.0; # in ft\n",
- "n1=3.0;\n",
- "Nc=8.75;\n",
- "n2=4.0/1000;\n",
- "Ap=14.0**2.0/12.0**2;\n",
- "cup=1775.0;\n",
- "a1=0.4;#alpha1\n",
- "p=4*14.0/12.0;\n",
- "cu1=1050.0; # in lb/ft^2\n",
- "L1=15.0;\n",
- "a2=0.54;#alpha2\n",
- "cu2=1775.0; # in lb/ft^2\n",
- "L2=45.0;\n",
- "FS=4; # factor of safety\n",
- "Qu=n1*n2*(9*Ap*cup+a1*p*cu1*L1+a2*p*cu2*L2); # in kip\n",
- "Qu2=Lg*Bg*cup*Nc+2*(Lg+Bg)*(cu1*L1+cu2*L2); # in kip\n",
- "print round(Qu2/1000),\"load in kip\"\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall),\"allowed load in kip\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4314.0 load in kip\n",
- "757.0 allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 42
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.12:Pg-583"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.12\n",
- "\n",
- "import math\n",
- "z1=21/2.0; # in ft\n",
- "Lg=9.0; # in ft\n",
- "Bg=6.0;# in ft\n",
- "Qg=500*1000.0; # in kip\n",
- "Cc1=0.3;\n",
- "Cc2=0.2;\n",
- "Cc3=0.25;\n",
- "H2=12;\n",
- "H3=6;\n",
- "H1=21;\n",
- "e1=0.82;\n",
- "e2=0.7;\n",
- "e3=0.75;\n",
- "s1=Qg/(Lg+z1)/(Bg+z1); #sigma1 in lb/ft^3\n",
- "s2=500*1000/(9+27)/(6+27);#sigma2 in lb/ft^3\n",
- "s3=500*1000/(9+36)/(6+36);#sigma3 in lb/ft^3\n",
- "ss1=6*105+(27+21/2)*(115-62.4);#sigmadash1 in lb/ft^3\n",
- "ss2=6*105+(27+21)*(115-62.4)+(120-62.4)*6;#sigmadash2 in lb/ft^3\n",
- "ss3=6*105+48*(115-62.4)+12*(120-62.4)+3*(122-62.4);#sigmadash3 in lb/ft^3\n",
- "sc1=Cc1*H1/(1+e1)*math.log10((ss1+s1)/ss1); # in inch\n",
- "sc2=Cc2*H2/(1+e2)*math.log10((ss2+s2)/ss2); # in inch\n",
- "sc3=Cc3*H3/(1+e3)*math.log10((ss3+s3)/ss3); # in inch\n",
- "sc=sc1+sc2+sc3; # in inch\n",
- "print round(sc*12,1),\"total settlement in inch\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "9.6 total settlement in inch\n"
- ]
- }
- ],
- "prompt_number": 45
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter11_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter11_1.ipynb deleted file mode 100755 index 0afdb4a0..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter11_1.ipynb +++ /dev/null @@ -1,650 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:a4054b3d6b79658bcd763c43dc94ca6de4cd49698c12f912e4c83a9a61f47154"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter11:Pile Foundations"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.1:Pg-532"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.1\n",
- "import math\n",
- "\n",
- "#parta\n",
- "phi=30.0; # angle in degree\n",
- "pa=2000.0; \n",
- "q=100*50/1000.0;\n",
- "Nq=55.0;\n",
- "Ap=16*16/16/12; # area in ft^2\n",
- "Qp=Ap*q*Nq; # in kip\n",
- "qp=0.4*pa*Nq*math.tan(phi*math.pi/180)*Ap; # in lb\n",
- "print round(Qp,2),\"ultimate load in lb\"\n",
- "print round(qp/1000,2),\"ultimate load in kip\"\n",
- "print \"there is change in answer because of calculation mistake in the book\"\n",
- "\n",
- "#partb\n",
- "Nsigma=36;\n",
- "Ap=16*16.0/12.0/12;\n",
- "q=110*50.0/1000;\n",
- "Qp=Ap*q*Nsigma*((1+2.0*(1-math.sin(phi*math.pi/180)))/3); # in kip\n",
- "print round(Qp,2),\"ultimate load in kip\"\n",
- "#partc\n",
- "Nq=18.4;\n",
- "Qp=Ap*q*Nq; # in kip\n",
- "print round(Qp,2),\"ultimate load in kip\"\n",
- "\n",
- "# ANSWER IN THE BOOK IS WRONG"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "275.0 ultimate load in lb\n",
- "25.4 ultimate load in kip\n",
- "there is change in answer because of calculation mistake in the book\n",
- "234.67 ultimate load in kip\n",
- "179.91 ultimate load in kip\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.2:Pg-533"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.2\n",
- "\n",
- "import math\n",
- "#parta\n",
- "K=1.3;\n",
- "f0=0;\n",
- "Delta=0.8*30; # in ft\n",
- "D=16.0/12; # in ft\n",
- "L1=50.0;\n",
- "p=4*16/12.0; # in ft\n",
- "Gamma=110/1000.0; # in lb/ft^3\n",
- "L=15*D; # in ft\n",
- "sigma=Gamma*L; # in kip/ft^2\n",
- "f20=K*sigma*math.tan(Delta*math.pi/180); # kip/ft^2\n",
- "Qs=(f0+f20)/2*(p*L)+f20*p*(L1-L);\n",
- "print round(Qs,2),\"ultimate load in kip\"\n",
- "#partb\n",
- "FS=4; # factor of safety\n",
- "Qp=56.45/3+234.7/3+179.9/3; # in kip\n",
- "Qu=Qs+Qp; # in kip\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall,2),\"is allowed load in kip\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "271.65 ultimate load in kip\n",
- "107.17 is allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.3:Pg-534"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.3\n",
- "import math\n",
- "K=0.25;\n",
- "Ap=16*16.0/12/12; # area in ft^2\n",
- "phi=30*math.pi/180;\n",
- "Nq=25;\n",
- "q=110*50.0/1000; # in kip\n",
- "sigmao=q/2; # in kip/ft^2\n",
- "p=4*16.0/12; # in ft\n",
- "L=50; # in ft\n",
- "FS=4; # factor of safety\n",
- "Qu=q*Nq*Ap+K*sigmao*math.tan(0.8*phi)*p*L; # in kip\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall,1),\"allowed load in kip\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "81.5 allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.4:Pg-535"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.4\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "FS=4; # factor of safety\n",
- "Ap=0.1295; # area in m^2\n",
- "Nc=9;\n",
- "cu2=100;\n",
- "Qp=Ap*Nc*cu2; # in kN\n",
- "D=[5, 10, 30]; # depth in m\n",
- "avgD=[2.5, 7.5,20.0]; # average depth in m\n",
- "sigma=[45.0, 110.5, 228.5]; # in KN/m^2\n",
- "cu=[30, 30, 100]; # in kN/m^2\n",
- "alpha=[0.6, 0.9, 0.725];\n",
- "L=[5, 5, 20]; # in m\n",
- "p=math.pi*0.406;\n",
- "Qs=0; # in kN\n",
- "cusig=numpy.zeros(3)\n",
- "print round(Qp,2),\"bearing capacity in kN\"\n",
- "print \"depth (m)\\t avg Depth(m)\\t avgVerticalStress(kN/m**2)\\t cu(kN/m**2)\\t cu/sigma\\t alpha\\n\"\n",
- "for i in range(0,3):\n",
- " cusig[i]=cu[i]/sigma[i];\n",
- " Qs=Qs+alpha[i]*cu[i]*L[i]*p;\n",
- " print round(D[i],2),\"\\t \\t \\t\",round(avgD[i],2),\"\\t \\t\",round(sigma[i],2),\"\\t\\t\\t \",round(cu[i],2),\"\\t \",round(cusig[i],2),\"\\t\\t \",round(alpha[i],2),\"\\n\"\n",
- "print round(Qs,2),\"bearing capacity in kN\"\n",
- "#part2\n",
- "Lambda=0.136;\n",
- "L=30;\n",
- "fav=Lambda*(178.48+2*76.7);\n",
- "Qs2=p*L*fav; # in kN\n",
- "#part3\n",
- "fav1=13;\n",
- "fav2=31.9;\n",
- "fav3=93.43;\n",
- "Qs3=p*(fav1*5+fav2*5+fav3*20); # in kN\n",
- "print round(Qs3,1),\"bearing capacity in kN\"\n",
- "Qsavg=Qs/3+Qs2/3+Qs3/3; # in kN\n",
- "Qu=Qp+Qsavg # in kN\n",
- "Qall=Qu/FS; # in kN\n",
- "print round(Qall,1),\"allowed bearing capacity in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "116.55 bearing capacity in kN\n",
- "depth (m)\t avg Depth(m)\t avgVerticalStress(kN/m**2)\t cu(kN/m**2)\t cu/sigma\t alpha\n",
- "\n",
- "5.0 \t \t \t2.5 \t \t45.0 \t\t\t 30.0 \t 0.67 \t\t 0.6 \n",
- "\n",
- "10.0 \t \t \t7.5 \t \t110.5 \t\t\t 30.0 \t 0.27 \t\t 0.9 \n",
- "\n",
- "30.0 \t \t \t20.0 \t \t228.5 \t\t\t 100.0 \t 0.44 \t\t 0.72 \n",
- "\n",
- "2136.44 bearing capacity in kN\n",
- "2669.7 bearing capacity in kN\n",
- "573.6 allowed bearing capacity in kN\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.5:Pg-538"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.5\n",
- "\n",
- "import numpy\n",
- "D=[6, 12, 20]; # depth in m\n",
- "fc=[34.34, 54.94, 70.63]; # in kN/m**2\n",
- "alpha=[0.84, 0.71, 0.63];\n",
- "dL=[6, 6, 8]; # in m\n",
- "p=4*0.305;\n",
- "Qs=0;\n",
- "Q=numpy.zeros(3)\n",
- "print \" depth(m)\\t fc(kN/m**2)\\t alpha \\t \\t deltaL(m)\\t Q(kN)\\n\"\n",
- "for i in range (0,3):\n",
- " Q[i]=alpha[i]*fc[i]*p*dL[i];\n",
- " Qs=Q[i]+Qs;\n",
- " print D[i],\"\\t\\t \",fc[i],\"\\t \",alpha[i],\"\\t \",dL[i],\"\\t\\t \",round(Q[i],2)\n",
- "\n",
- "print round(Qs),\"bearing force in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " depth(m)\t fc(kN/m**2)\t alpha \t \t deltaL(m)\t Q(kN)\n",
- "\n",
- "6 \t\t 34.34 \t 0.84 \t 6 \t\t 211.15\n",
- "12 \t\t 54.94 \t 0.71 \t 6 \t\t 285.53\n",
- "20 \t\t 70.63 \t 0.63 \t 8 \t\t 434.29\n",
- "931.0 bearing force in kN\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.6:Pg-545"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.6\n",
- "\n",
- "import math\n",
- "L=21; # in m\n",
- "Qwp=502-350; # in kN\n",
- "Qws=350; # in kN\n",
- "Ap=0.1045; # area in m^2\n",
- "Ep=21e6; # in kN/m^2\n",
- "epsilon=0.62;\n",
- "Se1=(Qwp+epsilon*Qws)*L/Ap/Ep; # in m\n",
- "#part2\n",
- "Iwp=0.85;\n",
- "qwp=152/Ap;\n",
- "Es=25e3; # in kN/m^2\n",
- "D=0.356; # in m\n",
- "mus=0.35;\n",
- "Se2=qwp*D/Es*Iwp*(1-mus**2); # in m\n",
- "#part3\n",
- "p=1.168;\n",
- "Iws=2+0.35*math.sqrt(L/D);\n",
- "Se3=Qws/p/L*D/Es*Iws*(1-mus**2); # in m\n",
- "Se=Se1+Se2+Se3; # in m\n",
- "print round(Se*1000,1),\"settlement in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "19.8 settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.7:Pg-560"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.7\n",
- "\n",
- "Ep=207e6; # in kN/m^2\n",
- "Ip=123e-6; # in m^4\n",
- "nh=12000; # in kN/m^3\n",
- "#from table 11.13\n",
- "xz=0.008;\n",
- "Ax=2.435;\n",
- "T=(Ep*Ip/nh)**0.2;\n",
- "Qg1=xz*Ep*Ip/Ax/T**3;\n",
- "#part2\n",
- "Fy=248000;\n",
- "d1=0.254;\n",
- "Am=0.772;\n",
- "Mzmax=Fy*Ip*2/d1; # in Kn-m\n",
- "Qg2=Mzmax/Am/T; # in kN\n",
- "if Qg2>Qg1 :\n",
- " Qg=Qg1;\n",
- " print round(Qg,2),\"lateral load in kN\"\n",
- "# there is slight variation in answer in textbook due to approximation"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "53.27 lateral load in kN\n"
- ]
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.8:Pg-561"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.8\n",
- "\n",
- "import math\n",
- "#part1\n",
- "Ep=207e6; # in kN/m^2\n",
- "Ip=123e-6; # in m^4\n",
- "nh=12000; # in kN/m^3\n",
- "#from table 11.1a\n",
- "xo=0.008; # in m\n",
- "L=25;\n",
- "Fy=248000; # yield stress in kN/m^2\n",
- "D=0.254;\n",
- "Am=0.772;\n",
- "Gamma=18.0; # in kN/m^3\n",
- "phi=35; # in angle\n",
- "Kp=(math.tan(math.pi/4+phi*math.pi/360))**2;\n",
- "My=Fy*Ip*2/D; # in kN-m\n",
- "Qug=140*Kp*D**3*Gamma; # in kN\n",
- "\n",
- "#part2\n",
- "Qg1=xo*(Ep*Ip)**0.6*nh**0.4/0.15/L; # in kN\n",
- "\n",
- "if Qug>Qg1:\n",
- " Qg=Qg1;\n",
- " print round(Qg,2),\"lateral load in kN\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "40.2 lateral load in kN\n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.9:Pg-567"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.9\n",
- "\n",
- "import math\n",
- "Wrh=30*12; # in kip-ft\n",
- "E=0.8;\n",
- "Wr=7.5; # in kip\n",
- "S=1/8.0; \n",
- "C=0.1;\n",
- "FS=6; # in factor of safety\n",
- "n=0.4; # Coefficient of restitution\n",
- "Wp=12/12.0*12/12.0*80*150+550; # in lb\n",
- "Wp=Wp/1000.0;\n",
- "Qu=E*Wrh/(S+C)*(Wr+n**2.0*Wp)/(Wr+Wp); # in kip\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall),\"allowed bearing capacity in kip\"\n",
- "#part2\n",
- "He=30*12.0;\n",
- "L=80*12.0;\n",
- "Ap=12*12.0; # area in in^2\n",
- "Ep=3e6/1000.0; # in kip/in^2\n",
- "FS=4; # factor of safety\n",
- "Qu=E*He/(S+math.sqrt(E*He*L/2.0/Ap/Ep)); # in kip\n",
- "Qall2=Qu/FS; # in kip\n",
- "print round(Qall2),\"allowed bearing capacity in kip\"\n",
- "\n",
- "#partc\n",
- "a=27;\n",
- "b=1;\n",
- "He=30;\n",
- "FS=3; # factor of safety\n",
- "Qu=a*math.sqrt(E*He)*(b-math.log10(S)); # in kip\n",
- "Qall3=Qu/FS; # in kip\n",
- "print round(Qall3),\"allowed bearing capacity in kip\"\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "101.0 allowed bearing capacity in kip\n",
- "104.0 allowed bearing capacity in kip\n",
- "84.0 allowed bearing capacity in kip\n"
- ]
- }
- ],
- "prompt_number": 35
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.10:Pg-570"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.10\n",
- "\n",
- "Hp=350; # in HP\n",
- "vp=0.0016; # in m/s\n",
- "Sl=0.762e-3; # in m/cycle\n",
- "f=115; # in Hz\n",
- "Qu=(0.746*Hp+98*vp)/(vp+Sl*f); # in kN\n",
- "print round(Qu),\"pile load capacity in kN\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2928.0 pile load capacity in kN\n"
- ]
- }
- ],
- "prompt_number": 38
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.11:Pg-578"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.11\n",
- "\n",
- "Lg=9.92; # in ft\n",
- "Bg=7.0; # in ft\n",
- "n1=3.0;\n",
- "Nc=8.75;\n",
- "n2=4.0/1000;\n",
- "Ap=14.0**2.0/12.0**2;\n",
- "cup=1775.0;\n",
- "a1=0.4;#alpha1\n",
- "p=4*14.0/12.0;\n",
- "cu1=1050.0; # in lb/ft^2\n",
- "L1=15.0;\n",
- "a2=0.54;#alpha2\n",
- "cu2=1775.0; # in lb/ft^2\n",
- "L2=45.0;\n",
- "FS=4; # factor of safety\n",
- "Qu=n1*n2*(9*Ap*cup+a1*p*cu1*L1+a2*p*cu2*L2); # in kip\n",
- "Qu2=Lg*Bg*cup*Nc+2*(Lg+Bg)*(cu1*L1+cu2*L2); # in kip\n",
- "print round(Qu2/1000),\"load in kip\"\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall),\"allowed load in kip\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4314.0 load in kip\n",
- "757.0 allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 42
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex11.12:Pg-583"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11.12\n",
- "\n",
- "import math\n",
- "z1=21/2.0; # in ft\n",
- "Lg=9.0; # in ft\n",
- "Bg=6.0;# in ft\n",
- "Qg=500*1000.0; # in kip\n",
- "Cc1=0.3;\n",
- "Cc2=0.2;\n",
- "Cc3=0.25;\n",
- "H2=12;\n",
- "H3=6;\n",
- "H1=21;\n",
- "e1=0.82;\n",
- "e2=0.7;\n",
- "e3=0.75;\n",
- "s1=Qg/(Lg+z1)/(Bg+z1); #sigma1 in lb/ft^3\n",
- "s2=500*1000/(9+27)/(6+27);#sigma2 in lb/ft^3\n",
- "s3=500*1000/(9+36)/(6+36);#sigma3 in lb/ft^3\n",
- "ss1=6*105+(27+21/2)*(115-62.4);#sigmadash1 in lb/ft^3\n",
- "ss2=6*105+(27+21)*(115-62.4)+(120-62.4)*6;#sigmadash2 in lb/ft^3\n",
- "ss3=6*105+48*(115-62.4)+12*(120-62.4)+3*(122-62.4);#sigmadash3 in lb/ft^3\n",
- "sc1=Cc1*H1/(1+e1)*math.log10((ss1+s1)/ss1); # in inch\n",
- "sc2=Cc2*H2/(1+e2)*math.log10((ss2+s2)/ss2); # in inch\n",
- "sc3=Cc3*H3/(1+e3)*math.log10((ss3+s3)/ss3); # in inch\n",
- "sc=sc1+sc2+sc3; # in inch\n",
- "print round(sc*12,1),\"total settlement in inch\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "9.6 total settlement in inch\n"
- ]
- }
- ],
- "prompt_number": 45
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter12.ipynb b/Principles_Of_Foundation_Engineering/Chapter12.ipynb deleted file mode 100755 index fcc14387..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter12.ipynb +++ /dev/null @@ -1,443 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:1439e2e46e40a0d47bd1c7e06a03c417c0e1f55ad415a0af82536f86f7ecfea9"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter12:Drilled-Shaft Foundations"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.1:Pg-609"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.1\n",
- "\n",
- "import math\n",
- "Ap=math.pi/4*1.75**2; # area in m^2\n",
- "FS=4; # factor of safety\n",
- "Nq=37.75; \n",
- "L=8;\n",
- "Es=50000.0;\n",
- "mus=0.265;\n",
- "pu=100.0;\n",
- "Db=1.75; # in m\n",
- "q=6*16.2+2*19.2;\n",
- "phi=36*math.pi/180.0;\n",
- "Fqs=1+math.tan(phi);\n",
- "Fqd=1+2*math.tan(phi)*(1-math.sin(phi))**2*math.atan(L/Db);\n",
- "Ir=Es/(2*(1+mus)*q*math.tan(phi));\n",
- "delta=0.005*(1-phi/20*180/math.pi+25/20.0)*q/pu;\n",
- "Irr=Ir/(1+Ir*delta);\n",
- "Fqc=math.exp(-3.8*math.tan(phi)+(3.07*math.sin(phi)*math.log10(2*Irr))/(1+math.sin(phi)));\n",
- "Qp=Ap*(q*(Nq-1)*Fqs*Fqd*Fqc);\n",
- "Qpall=Qp/FS;\n",
- "print round(Qpall,2),\"allowed load in kN\"\n",
- "print \"due to rounding off error there is slight change in answer\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "6648.7 allowed load in kN\n",
- "due to rounding off error there is slight change in answer\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.2:Pg-610"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.2\n",
- "import math\n",
- "Ap=math.pi/4*1.75**2; # area in m^2\n",
- "q=135.6; \n",
- "w=0.83;\n",
- "FS=4; # factor of safety\n",
- "phi=36; # given angle\n",
- "Nq=0.21*math.exp(0.17*phi);\n",
- "Qp=Ap*q*(w*Nq-1); # in kN\n",
- "Qpall=Qp/FS; # in kN\n",
- "print round(Qpall),\"allowed load in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "6383.0 allowed load in kN\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.3:Pg-611"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.3\n",
- "\n",
- "import math\n",
- "Ap=math.pi/4*1.5**2; # area in m^2\n",
- "Db=1.5; # in m\n",
- "z=3.0;\n",
- "p=math.pi*1;\n",
- "Li=6.0;\n",
- "N60=30.0;\n",
- "sigmazi=16*z;\n",
- "Beta=2.0-0.15*z**0.75;\n",
- "fi=Beta*sigmazi; # in kN/m^2\n",
- "qp=57.5*N60; # in kN/m^2\n",
- "qpr=1.27/Db*qp; # in kN/m^2\n",
- "Qunet=qpr*Ap+fi*p*Li; # in kN\n",
- "print round(Qunet,2),\"allowed load in kN\"\n",
- "#part b\n",
- "k1=0.315; #from table\n",
- "k2=12.0/1.5/1000*100.0;\n",
- "Qunet2=qpr*Ap*k1+fi*p*Li*k2; # in kN\n",
- "print round(Qunet2,2),\"allowed load in kN\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4081.11 allowed load in kN\n",
- "2013.14 allowed load in kN\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.4:Pg-617"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.4\n",
- "\n",
- "Nc=9;\n",
- "Ap=math.pi/4*1.5**2; # area in m^2\n",
- "cu=105; # in kN/m^2\n",
- "Qpnet=Ap*cu*Nc; # in kN\n",
- "print round(Qpnet),\"net ultimate bearing point capacity in kN\"\n",
- "#part2\n",
- "alpha=0.4;\n",
- "Ds=1.5; # in m \n",
- "p=math.pi*Ds;\n",
- "Qs=alpha*p*(50*8+105*3); # in kN\n",
- "print int(Qs),\"skin resistance in kN\"\n",
- "#part3\n",
- "FS=3; # factor of safety\n",
- "Qu=Qpnet/FS+Qs/FS; # in kN\n",
- "print round(Qu,2),\"working load in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1670.0 net ultimate bearing point capacity in kN\n",
- "1347 skin resistance in kN\n",
- "1005.9 working load in kN\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.5:Pg-618"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.5\n",
- "\n",
- "import math\n",
- "cub=3000;\n",
- "L=20+5; # in ft\n",
- "Db=4; # in ft\n",
- "Ap=math.pi/4*Db**2; # area in ft^2\n",
- "alpha=0.55;\n",
- "cu1=800; # in lb/ft^2\n",
- "L1=7; # in ft\n",
- "L2=5.5; # in ft\n",
- "cu2=1200; # in lb/ft^2\n",
- "p=math.pi*2.5;\n",
- "k=alpha*p*(cu1*L1+cu2*L2);#f*p*deltaLi\n",
- "j1=6*cub*(1+0.2*L/Db);\n",
- "j2=9*cub;\n",
- "qp=min(j1,j2);\n",
- "Qu=k/1000+qp*Ap/1000; # in kip\n",
- "print round(Qu),\"allowed load in kip\"\n",
- "#part b\n",
- "k1=0.57; #from table\n",
- "k2=0.89;\n",
- "Qunet2=qp*Ap*k1+k*k2; # in kip\n",
- "print round(Qunet2/1000,2),\"allowed load in kip\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "392.0 allowed load in kip\n",
- "240.3 allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.6:Pg-621"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.6\n",
- "\n",
- "import math\n",
- "Qws=1005-250; # in kN\n",
- "Qwp=250; # in kN\n",
- "epsilon=0.65; \n",
- "L=11; # in m\n",
- "Ds=1.5; # in m\n",
- "Es=14000; # in kN/m^2\n",
- "Ap=math.pi/4*1.5**2; # area in m^2\n",
- "Ep=21e6; # in kN/m^2\n",
- "Cp=0.04; # in kN/m^2\n",
- "Db=1.5;\n",
- "mus=0.3;\n",
- "p=math.pi*1.5;\n",
- "Nc=9;\n",
- "qp=105*Nc; # in kN/m^2\n",
- "se1=(Qwp+epsilon*Qws)*L/(Ap*Ep); # in m \n",
- "se2=Qwp*Cp/(Db*qp); # in m\n",
- "Iws=2+0.35*math.sqrt(L/Ds);\n",
- "se3=Qws/p/L*Ds/Es*(1-mus**2)*Iws; # in m\n",
- "se=se1+se2+se3; # in m\n",
- "print round(se*1000,2),\" is net settlement in mm\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "11.46 is net settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.7:Pg-628"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.7\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "from scipy.optimize import fsolve\n",
- "Ds=1.0;\n",
- "Ep=22e6;\n",
- "Ri=1.0;\n",
- "cu=100.0;\n",
- "Ip=math.pi*Ds**4/64.0;\n",
- "Qc=7.34*Ds**2*Ep*Ri*(cu/Ep/Ri)**0.6;\n",
- "print round(Qc,2),\"bearing force in kN\"\n",
- "Mc=3.86*Ds**3*Ep*Ri*(cu/Ep/Ri)**0.6;\n",
- "print round(Mc,2),\"bearing moment in kNm\"\n",
- "#from figure\n",
- "xoQM=0.0046*1;\n",
- "xoMQ=0.0041*1;\n",
- "xo=0.5*(xoQM+xoMQ);\n",
- "print round(xo*1000,2),\"net ground line deflection in mm\"\n",
- "#partb\n",
- "Ip=0.049;\n",
- "Qg=150.0;\n",
- "Mg=200.0;\n",
- "def f(T):\n",
- " return 338e-6*T**3+300.6e-6*T**2-0.00435\n",
- "[x]=fsolve(f,2);\n",
- "T=x;\n",
- "k=[0, 0.4, 0.6, 0.8, 1.0, 1.1, 1.25];#z/T\n",
- "Am=[0, 0.36, 0.52, 0.63, 0.75, 0.765, 0.75];\n",
- "Bm=[1.0, 0.98, 0.95, 0.9, 0.845, 0.8, 0.73];\n",
- "print \"z/T\\t Am\\t Bm\\t Mz(kN-m)\\n\"\n",
- "Mz=numpy.zeros(7)\n",
- "for i in range(0,7):\n",
- " Mz[i]=Am[i]*Qg*T+Bm[i]*Mg;\n",
- " print k[i],\"\\t\",round(Am[i],2),\"\\t\",round(Bm[i],2),\"\\t\",round(Mz[i],2)\n",
- "\n",
- "print round(1*T,2),\"depth in m\"\n",
- "#partc\n",
- "Mmax=400;\n",
- "sigma=Mmax*Ds/2/Ip;\n",
- "print round(sigma,2),\"tensile stress in kN/m**2\"\n",
- "#partd\n",
- "#from figure\n",
- "k=8.5;\n",
- "L=k*1;\n",
- "print L,\"length in m\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "100615.56 bearing force in kN\n",
- "52912.27 bearing moment in kNm\n",
- "4.35 net ground line deflection in mm\n",
- "z/T\t Am\t Bm\t Mz(kN-m)\n",
- "\n",
- "0 \t0.0 \t1.0 \t200.0\n",
- "0.4 \t0.36 \t0.98 \t308.4\n",
- "0.6 \t0.52 \t0.95 \t352.35\n",
- "0.8 \t0.63 \t0.9 \t376.69\n",
- "1.0 \t0.75 \t0.84 \t403.16\n",
- "1.1 \t0.77 \t0.8 \t398.84\n",
- "1.25 \t0.75 \t0.73 \t380.16\n",
- "2.08 depth in m\n",
- "4081.63 tensile stress in kN/m**2\n",
- "8.5 length in m\n"
- ]
- }
- ],
- "prompt_number": 31
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.8:Pg-634"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.8\n",
- "\n",
- "qu=3000; # lb/in^2\n",
- "Ds=3*12; #in inch\n",
- "L=15*12; # in inch\n",
- "FS=3; # factor of safety\n",
- "Ecore=0.36e6; # in lb/in^2\n",
- "f=min(2.5*qu**0.5,0.15*qu);\n",
- "Qu=math.pi*Ds*L*f/1000; # in kip\n",
- "Emass=Ecore*(0.266*80-1.66); # in lb/in^2\n",
- "Ec=17.9*Emass; # in lb/in^2\n",
- "Ac=math.pi/4*Ds**2; # area in in^2\n",
- "If=0.35;\n",
- "se=Qu*L/Ac/Ec+Qu*If/Ds/Emass;\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall),\"allowed load in kip\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "929.0 allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 35
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter12_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter12_1.ipynb deleted file mode 100755 index fcc14387..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter12_1.ipynb +++ /dev/null @@ -1,443 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:1439e2e46e40a0d47bd1c7e06a03c417c0e1f55ad415a0af82536f86f7ecfea9"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter12:Drilled-Shaft Foundations"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.1:Pg-609"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.1\n",
- "\n",
- "import math\n",
- "Ap=math.pi/4*1.75**2; # area in m^2\n",
- "FS=4; # factor of safety\n",
- "Nq=37.75; \n",
- "L=8;\n",
- "Es=50000.0;\n",
- "mus=0.265;\n",
- "pu=100.0;\n",
- "Db=1.75; # in m\n",
- "q=6*16.2+2*19.2;\n",
- "phi=36*math.pi/180.0;\n",
- "Fqs=1+math.tan(phi);\n",
- "Fqd=1+2*math.tan(phi)*(1-math.sin(phi))**2*math.atan(L/Db);\n",
- "Ir=Es/(2*(1+mus)*q*math.tan(phi));\n",
- "delta=0.005*(1-phi/20*180/math.pi+25/20.0)*q/pu;\n",
- "Irr=Ir/(1+Ir*delta);\n",
- "Fqc=math.exp(-3.8*math.tan(phi)+(3.07*math.sin(phi)*math.log10(2*Irr))/(1+math.sin(phi)));\n",
- "Qp=Ap*(q*(Nq-1)*Fqs*Fqd*Fqc);\n",
- "Qpall=Qp/FS;\n",
- "print round(Qpall,2),\"allowed load in kN\"\n",
- "print \"due to rounding off error there is slight change in answer\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "6648.7 allowed load in kN\n",
- "due to rounding off error there is slight change in answer\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.2:Pg-610"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.2\n",
- "import math\n",
- "Ap=math.pi/4*1.75**2; # area in m^2\n",
- "q=135.6; \n",
- "w=0.83;\n",
- "FS=4; # factor of safety\n",
- "phi=36; # given angle\n",
- "Nq=0.21*math.exp(0.17*phi);\n",
- "Qp=Ap*q*(w*Nq-1); # in kN\n",
- "Qpall=Qp/FS; # in kN\n",
- "print round(Qpall),\"allowed load in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "6383.0 allowed load in kN\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.3:Pg-611"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.3\n",
- "\n",
- "import math\n",
- "Ap=math.pi/4*1.5**2; # area in m^2\n",
- "Db=1.5; # in m\n",
- "z=3.0;\n",
- "p=math.pi*1;\n",
- "Li=6.0;\n",
- "N60=30.0;\n",
- "sigmazi=16*z;\n",
- "Beta=2.0-0.15*z**0.75;\n",
- "fi=Beta*sigmazi; # in kN/m^2\n",
- "qp=57.5*N60; # in kN/m^2\n",
- "qpr=1.27/Db*qp; # in kN/m^2\n",
- "Qunet=qpr*Ap+fi*p*Li; # in kN\n",
- "print round(Qunet,2),\"allowed load in kN\"\n",
- "#part b\n",
- "k1=0.315; #from table\n",
- "k2=12.0/1.5/1000*100.0;\n",
- "Qunet2=qpr*Ap*k1+fi*p*Li*k2; # in kN\n",
- "print round(Qunet2,2),\"allowed load in kN\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4081.11 allowed load in kN\n",
- "2013.14 allowed load in kN\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.4:Pg-617"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.4\n",
- "\n",
- "Nc=9;\n",
- "Ap=math.pi/4*1.5**2; # area in m^2\n",
- "cu=105; # in kN/m^2\n",
- "Qpnet=Ap*cu*Nc; # in kN\n",
- "print round(Qpnet),\"net ultimate bearing point capacity in kN\"\n",
- "#part2\n",
- "alpha=0.4;\n",
- "Ds=1.5; # in m \n",
- "p=math.pi*Ds;\n",
- "Qs=alpha*p*(50*8+105*3); # in kN\n",
- "print int(Qs),\"skin resistance in kN\"\n",
- "#part3\n",
- "FS=3; # factor of safety\n",
- "Qu=Qpnet/FS+Qs/FS; # in kN\n",
- "print round(Qu,2),\"working load in kN\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1670.0 net ultimate bearing point capacity in kN\n",
- "1347 skin resistance in kN\n",
- "1005.9 working load in kN\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.5:Pg-618"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.5\n",
- "\n",
- "import math\n",
- "cub=3000;\n",
- "L=20+5; # in ft\n",
- "Db=4; # in ft\n",
- "Ap=math.pi/4*Db**2; # area in ft^2\n",
- "alpha=0.55;\n",
- "cu1=800; # in lb/ft^2\n",
- "L1=7; # in ft\n",
- "L2=5.5; # in ft\n",
- "cu2=1200; # in lb/ft^2\n",
- "p=math.pi*2.5;\n",
- "k=alpha*p*(cu1*L1+cu2*L2);#f*p*deltaLi\n",
- "j1=6*cub*(1+0.2*L/Db);\n",
- "j2=9*cub;\n",
- "qp=min(j1,j2);\n",
- "Qu=k/1000+qp*Ap/1000; # in kip\n",
- "print round(Qu),\"allowed load in kip\"\n",
- "#part b\n",
- "k1=0.57; #from table\n",
- "k2=0.89;\n",
- "Qunet2=qp*Ap*k1+k*k2; # in kip\n",
- "print round(Qunet2/1000,2),\"allowed load in kip\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "392.0 allowed load in kip\n",
- "240.3 allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.6:Pg-621"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.6\n",
- "\n",
- "import math\n",
- "Qws=1005-250; # in kN\n",
- "Qwp=250; # in kN\n",
- "epsilon=0.65; \n",
- "L=11; # in m\n",
- "Ds=1.5; # in m\n",
- "Es=14000; # in kN/m^2\n",
- "Ap=math.pi/4*1.5**2; # area in m^2\n",
- "Ep=21e6; # in kN/m^2\n",
- "Cp=0.04; # in kN/m^2\n",
- "Db=1.5;\n",
- "mus=0.3;\n",
- "p=math.pi*1.5;\n",
- "Nc=9;\n",
- "qp=105*Nc; # in kN/m^2\n",
- "se1=(Qwp+epsilon*Qws)*L/(Ap*Ep); # in m \n",
- "se2=Qwp*Cp/(Db*qp); # in m\n",
- "Iws=2+0.35*math.sqrt(L/Ds);\n",
- "se3=Qws/p/L*Ds/Es*(1-mus**2)*Iws; # in m\n",
- "se=se1+se2+se3; # in m\n",
- "print round(se*1000,2),\" is net settlement in mm\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "11.46 is net settlement in mm\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.7:Pg-628"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.7\n",
- "\n",
- "import math\n",
- "import numpy\n",
- "from scipy.optimize import fsolve\n",
- "Ds=1.0;\n",
- "Ep=22e6;\n",
- "Ri=1.0;\n",
- "cu=100.0;\n",
- "Ip=math.pi*Ds**4/64.0;\n",
- "Qc=7.34*Ds**2*Ep*Ri*(cu/Ep/Ri)**0.6;\n",
- "print round(Qc,2),\"bearing force in kN\"\n",
- "Mc=3.86*Ds**3*Ep*Ri*(cu/Ep/Ri)**0.6;\n",
- "print round(Mc,2),\"bearing moment in kNm\"\n",
- "#from figure\n",
- "xoQM=0.0046*1;\n",
- "xoMQ=0.0041*1;\n",
- "xo=0.5*(xoQM+xoMQ);\n",
- "print round(xo*1000,2),\"net ground line deflection in mm\"\n",
- "#partb\n",
- "Ip=0.049;\n",
- "Qg=150.0;\n",
- "Mg=200.0;\n",
- "def f(T):\n",
- " return 338e-6*T**3+300.6e-6*T**2-0.00435\n",
- "[x]=fsolve(f,2);\n",
- "T=x;\n",
- "k=[0, 0.4, 0.6, 0.8, 1.0, 1.1, 1.25];#z/T\n",
- "Am=[0, 0.36, 0.52, 0.63, 0.75, 0.765, 0.75];\n",
- "Bm=[1.0, 0.98, 0.95, 0.9, 0.845, 0.8, 0.73];\n",
- "print \"z/T\\t Am\\t Bm\\t Mz(kN-m)\\n\"\n",
- "Mz=numpy.zeros(7)\n",
- "for i in range(0,7):\n",
- " Mz[i]=Am[i]*Qg*T+Bm[i]*Mg;\n",
- " print k[i],\"\\t\",round(Am[i],2),\"\\t\",round(Bm[i],2),\"\\t\",round(Mz[i],2)\n",
- "\n",
- "print round(1*T,2),\"depth in m\"\n",
- "#partc\n",
- "Mmax=400;\n",
- "sigma=Mmax*Ds/2/Ip;\n",
- "print round(sigma,2),\"tensile stress in kN/m**2\"\n",
- "#partd\n",
- "#from figure\n",
- "k=8.5;\n",
- "L=k*1;\n",
- "print L,\"length in m\"\n",
- "\n",
- "# the answer is slightly different in textbook due to approximation\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "100615.56 bearing force in kN\n",
- "52912.27 bearing moment in kNm\n",
- "4.35 net ground line deflection in mm\n",
- "z/T\t Am\t Bm\t Mz(kN-m)\n",
- "\n",
- "0 \t0.0 \t1.0 \t200.0\n",
- "0.4 \t0.36 \t0.98 \t308.4\n",
- "0.6 \t0.52 \t0.95 \t352.35\n",
- "0.8 \t0.63 \t0.9 \t376.69\n",
- "1.0 \t0.75 \t0.84 \t403.16\n",
- "1.1 \t0.77 \t0.8 \t398.84\n",
- "1.25 \t0.75 \t0.73 \t380.16\n",
- "2.08 depth in m\n",
- "4081.63 tensile stress in kN/m**2\n",
- "8.5 length in m\n"
- ]
- }
- ],
- "prompt_number": 31
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex12.8:Pg-634"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12.8\n",
- "\n",
- "qu=3000; # lb/in^2\n",
- "Ds=3*12; #in inch\n",
- "L=15*12; # in inch\n",
- "FS=3; # factor of safety\n",
- "Ecore=0.36e6; # in lb/in^2\n",
- "f=min(2.5*qu**0.5,0.15*qu);\n",
- "Qu=math.pi*Ds*L*f/1000; # in kip\n",
- "Emass=Ecore*(0.266*80-1.66); # in lb/in^2\n",
- "Ec=17.9*Emass; # in lb/in^2\n",
- "Ac=math.pi/4*Ds**2; # area in in^2\n",
- "If=0.35;\n",
- "se=Qu*L/Ac/Ec+Qu*If/Ds/Emass;\n",
- "Qall=Qu/FS; # in kip\n",
- "print round(Qall),\"allowed load in kip\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "929.0 allowed load in kip\n"
- ]
- }
- ],
- "prompt_number": 35
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter13.ipynb b/Principles_Of_Foundation_Engineering/Chapter13.ipynb deleted file mode 100755 index bfb80602..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter13.ipynb +++ /dev/null @@ -1,176 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:549425d7a43cc856ebd1610c783821836546fd833bb34512fcafdb71f662b655"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter13:Foundations on Difficult Soils"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.1:Pg-653"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13.1\n",
- "\n",
- "Sw=1;\n",
- "Z=2; # in m\n",
- "deltaSf=0.0033*Z*Sw*1000; # in mm\n",
- "print deltaSf,\"free surface swell in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "6.6 free surface swell in mm\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.2:Pg-13.2"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13.2\n",
- "\n",
- "#from figure 13.11\n",
- "import matplotlib.pyplot as plt\n",
- "%matplotlib inline\n",
- "import numpy\n",
- "deltaS=1/100.0*1/2.0*(0.55+0+0.55+1.2+1.2+2+2+3);\n",
- "print deltaS*1000,\"total swell in mm\"\n",
- "#partb\n",
- "D=numpy.array([5.2, 4.2, 3.2, 2.2, 1.2]);\n",
- "deltaS=numpy.array([0, 0.00275, 0.0115, 0.0275, 0.0525]);\n",
- "print \"depth(m)\\t total swell (m) \\n\"\n",
- "for i in range (0,5):\n",
- " print D[i],\"\\t \",deltaS[i],\" \\n\",\n",
- "\n",
- "plt.plot(deltaS*1000,D);\n",
- "plt.title(\"depth vs total swell\")\n",
- "plt.xlabel(\"total swell (m)\")\n",
- "plt.ylabel(\"depth (m)\")\n",
- "plt.show()\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "52.5 total swell in mm\n",
- "depth(m)\t total swell (m) \n",
- "\n",
- "5.2 \t 0.0 \n",
- "4.2 \t 0.00275 \n",
- "3.2 \t 0.0115 \n",
- "2.2 \t 0.0275 \n",
- "1.2 \t 0.0525 \n"
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81VW9//HXm8EJ50wcQHHMzAlNnGWjpIKIWl4nfk73\nd9PS0rrmVN1E8+q1btchK72paYaaSaEmznoQs8ABFEVMBXMGzQmkFORz/1jfI9vNGfYZvmdP7+fj\nsR9993ev/f1+1pHO56y1vmstRQRmZma9Kh2AmZlVBycEMzMDnBDMzCzjhGBmZoATgpmZZZwQzMwM\ncEKwHiTpGkk/zOnaYyVdl8e1K0XSsZImV+jen/w8JQ2StESSf1/UOf8Htp4U2atLJBUkvdzCtXtU\nRxNcngkxB56g1ICcEKynqcau26j882xATgiWG0mDJT0u6X1JN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nBDMzyzghmJkZ4IRgZmYZJwQzMwPg/wDP0conunvE\nNwAAAABJRU5ErkJggg==\n",
- "text": [
- "<matplotlib.figure.Figure at 0x1d192b0>"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.3:Pg-664"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13.3\n",
- "\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "phi=12*math.pi/180;\n",
- "Ds=0.8; # in m\n",
- "Z=5; # in m \n",
- "sigmaT=450;\n",
- "U=math.pi*Ds*Z*sigmaT*math.tan(phi); # in kN\n",
- "def f(D):\n",
- " return 1202-450*6.14/1.25*3.14/4*(D**2-0.8**2)\n",
- "[x]=fsolve(f,1);\n",
- "Db=x; # in m\n",
- "print round(Db,2),\"diameter of bell in m\"\n",
- "#partb\n",
- "D=600; # in kN\n",
- "cu=450; # in kN/m^2\n",
- "Nc=6.14;\n",
- "FS=cu*Nc*math.pi/4*(Db**2-Ds**2)/(U-D);\n",
- "if FS>2 :\n",
- " print \"the structure is compatible with safety measures\"\n",
- "\n",
- "#check bearing capacity\n",
- "L=D+300;#dead+live load in kN\n",
- "Dp=L/math.pi*4/Db**2;#downward pressure\n",
- "FS=2763/Dp; # factor of safety\n",
- "if FS>3:\n",
- " print \"the structure is safe in bearing \"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.15 diameter of bell in m\n",
- "the structure is compatible with safety measures\n",
- "the structure is safe in bearing \n"
- ]
- }
- ],
- "prompt_number": 9
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter13_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter13_1.ipynb deleted file mode 100755 index bfb80602..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter13_1.ipynb +++ /dev/null @@ -1,176 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:549425d7a43cc856ebd1610c783821836546fd833bb34512fcafdb71f662b655"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter13:Foundations on Difficult Soils"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.1:Pg-653"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13.1\n",
- "\n",
- "Sw=1;\n",
- "Z=2; # in m\n",
- "deltaSf=0.0033*Z*Sw*1000; # in mm\n",
- "print deltaSf,\"free surface swell in mm\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "6.6 free surface swell in mm\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.2:Pg-13.2"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13.2\n",
- "\n",
- "#from figure 13.11\n",
- "import matplotlib.pyplot as plt\n",
- "%matplotlib inline\n",
- "import numpy\n",
- "deltaS=1/100.0*1/2.0*(0.55+0+0.55+1.2+1.2+2+2+3);\n",
- "print deltaS*1000,\"total swell in mm\"\n",
- "#partb\n",
- "D=numpy.array([5.2, 4.2, 3.2, 2.2, 1.2]);\n",
- "deltaS=numpy.array([0, 0.00275, 0.0115, 0.0275, 0.0525]);\n",
- "print \"depth(m)\\t total swell (m) \\n\"\n",
- "for i in range (0,5):\n",
- " print D[i],\"\\t \",deltaS[i],\" \\n\",\n",
- "\n",
- "plt.plot(deltaS*1000,D);\n",
- "plt.title(\"depth vs total swell\")\n",
- "plt.xlabel(\"total swell (m)\")\n",
- "plt.ylabel(\"depth (m)\")\n",
- "plt.show()\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "52.5 total swell in mm\n",
- "depth(m)\t total swell (m) \n",
- "\n",
- "5.2 \t 0.0 \n",
- "4.2 \t 0.00275 \n",
- "3.2 \t 0.0115 \n",
- "2.2 \t 0.0275 \n",
- "1.2 \t 0.0525 \n"
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81VW9//HXm8EJ50wcQHHMzAlNnGWjpIKIWl4nfk73\nd9PS0rrmVN1E8+q1btchK72paYaaSaEmznoQs8ABFEVMBXMGzQmkFORz/1jfI9vNGfYZvmdP7+fj\nsR9993ev/f1+1pHO56y1vmstRQRmZma9Kh2AmZlVBycEMzMDnBDMzCzjhGBmZoATgpmZZZwQzMwM\ncEKwHiTpGkk/zOnaYyVdl8e1K0XSsZImV+jen/w8JQ2StESSf1/UOf8Htp4U2atLJBUkvdzCtXtU\nRxNcngkxB56g1ICcEKynqcau26j882xATgiWG0mDJT0u6X1JNwIrlHw+StJ0Se9I+pOkrYs+e1HS\nmZKelvS2pKslLS+pH3AHsJ6k+dm11yX9RbucpGuzc09J2qGVuH4h6ccl526R9K3s+AxJr2TXmSVp\nrxaucTxwJHB6Fsct2fnPS2rK6vSUpAPaKX+mpOezez0t6aAyf7YrSPqNpLeye02VtLakYZKeLCp3\nj6SpRe8nSxqdHa8nabykeZJmS/pmOfe2OhYRfvnV7S9gOeBvwClAb+ArwEfAudnng4G5wI6kv0aP\nBuYAfbPPXwSeBNYH1gAeAn6YfTYUeLnkfmOBfwD7Zdc7H/hzK7HtAbxU9H4NYCGwDvA54CVgneyz\nDYCNW7nOr5rrk73vCzwPnAn0AYYB7wObt1Q+O3dI0b0OBRYA/bP3xwKTW7n3CcCtpCSr7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n8Gq2EnBfRGwFzAfOBfYCDs6Om00F9uzAfcyW0afSAZh1QunyzLsB12fL+86TNAnYEXi/pNxywGXZ\nmi8fA5vTtkeAq7MVXCdExBPAAkkrZ0t8DwCuJ/0i3p20yusWpE1z7k1r/dEbeK0DddsQeL3o/UcR\ncVd2PAP4Z0R8LOkp0mZLzV4veW/WYW4hWL0oTRItLdL1beD1iNgG+CIpQbQqIppbA68C10g6Kvvo\nYdLCYc8CD5ESwi7An7I4ns5aJYMjYpuIKN02tSN1WVR0vAT4KIttCZ/+g07U7lr+ViWcEKwWzQdW\nKXo/GTgs283ss6Rf0FOBBSXlVgXeyI6PJv313ipJGwBvRsSVpFUkBxfd7zRgEmn562Gkv9znk5LE\nZyXtnF2jr6QtO1C3vwHrdqB8s3Wz75p1mruMrOZExN8l/Sl7VHRiNo6wC/AE6a/k0yJinqS3gY+z\nLS9/BfwcGC/paOBOUsL45LIt3KoAnCZpESkJHZ2df4i0leuDEbFE0kvAM1lsH0k6BLhU0mqk/49d\nRNq4vhwPkVovj7USV7RyPIS09LhZp3n5a7MqImlj4KcRsX8Hv9dEWuu+Vnf8sirgLiOzKhIRs4H5\nHZ2YBjzvZGBd5RaCmZkBbiGYmVnGCcHMzAAnBDMzyzghmJkZ4IRgZmYZJwQzMwPg/wDP0conunvE\nNwAAAABJRU5ErkJggg==\n",
- "text": [
- "<matplotlib.figure.Figure at 0x1d192b0>"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex13.3:Pg-664"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13.3\n",
- "\n",
- "import math\n",
- "from scipy.optimize import fsolve\n",
- "phi=12*math.pi/180;\n",
- "Ds=0.8; # in m\n",
- "Z=5; # in m \n",
- "sigmaT=450;\n",
- "U=math.pi*Ds*Z*sigmaT*math.tan(phi); # in kN\n",
- "def f(D):\n",
- " return 1202-450*6.14/1.25*3.14/4*(D**2-0.8**2)\n",
- "[x]=fsolve(f,1);\n",
- "Db=x; # in m\n",
- "print round(Db,2),\"diameter of bell in m\"\n",
- "#partb\n",
- "D=600; # in kN\n",
- "cu=450; # in kN/m^2\n",
- "Nc=6.14;\n",
- "FS=cu*Nc*math.pi/4*(Db**2-Ds**2)/(U-D);\n",
- "if FS>2 :\n",
- " print \"the structure is compatible with safety measures\"\n",
- "\n",
- "#check bearing capacity\n",
- "L=D+300;#dead+live load in kN\n",
- "Dp=L/math.pi*4/Db**2;#downward pressure\n",
- "FS=2763/Dp; # factor of safety\n",
- "if FS>3:\n",
- " print \"the structure is safe in bearing \"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.15 diameter of bell in m\n",
- "the structure is compatible with safety measures\n",
- "the structure is safe in bearing \n"
- ]
- }
- ],
- "prompt_number": 9
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter14.ipynb b/Principles_Of_Foundation_Engineering/Chapter14.ipynb deleted file mode 100755 index 9492b61a..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter14.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:0607b38129f4394e73e1fea85ea07501579e80864ce509d7b62579d182135871"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Chapter14:Soil Improvement and Ground Modification"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.1:Pg-695"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 14.1\n",
- "\n",
- "import math\n",
- "Cc=0.28;\n",
- "Hc=6.0;\n",
- "eo=0.9;\n",
- "Cv=0.36; # in m^2/mo.\n",
- "H=3.0; # in m\n",
- "t=9.0; # in mo.\n",
- "sigmao=210.0;# in kN/m^2\n",
- "sigmap=115; #deltasigmap in kN/m^2\n",
- "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+sigmap)/sigmao); # in m\n",
- "print round(Sc*1000,1),\"primary consolidation in mm\"\n",
- "Tv=Cv*t/H**2;\n",
- "#from table\n",
- "k=1.8; #constant\n",
- "sf=k*sigmap; # in kN/m**2\n",
- "print round(sf,2),\"deltasigmaf in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "167.7 primary consolidation in mm\n",
- "207.0 deltasigmaf in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.2:Pg-703"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 14.2\n",
- "\n",
- "import math\n",
- "Tv=0.36;\n",
- "sigmap=115; # in kN/m^2\n",
- "Uv=math.sqrt(4*Tv/math.pi)*100;\n",
- "print round(Uv,2),\"Uv in %\"\n",
- "#from table \n",
- "k=0.12; #constant\n",
- "sf=k*sigmap;\n",
- "print sf,\"deltasigmaf in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "67.7 Uv in %\n",
- "13.8 deltasigmaf in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.3:Pg-704"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 14.3\n",
- "\n",
- "Cc=0.31;\n",
- "Hc=15.0;#ft\n",
- "eo=1.1;\n",
- "n=10.0;\n",
- "Uv=0.09;\n",
- "sigmao=1000.0; # in lb/ft^2\n",
- "deltasigma=2000.0; # deltasigmap+deltasigmaf\n",
- "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+deltasigma)/sigmao);\n",
- "print round(Sc,3),\"primary consolidation in ft\"\n",
- "m=n**2/(n**2-1)*math.log(n)-(3*n**2-1)/4/n**2;\n",
- "A=2/m;\n",
- "Ur=(0.096-1/A*(1-math.exp(-A*0.096)))/0.192;\n",
- "Uvf=1-(1-Ur)*(1-Uv);\n",
- "Sc30=Sc*Uvf*12; #settlement after 30 days\n",
- "print round(Sc30,2),\"settlement after 30 days in inch\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.056 primary consolidation in ft\n",
- "1.48 settlement after 30 days in inch\n"
- ]
- }
- ],
- "prompt_number": 12
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/Chapter14_1.ipynb b/Principles_Of_Foundation_Engineering/Chapter14_1.ipynb deleted file mode 100755 index 9492b61a..00000000 --- a/Principles_Of_Foundation_Engineering/Chapter14_1.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:0607b38129f4394e73e1fea85ea07501579e80864ce509d7b62579d182135871"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Chapter14:Soil Improvement and Ground Modification"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.1:Pg-695"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 14.1\n",
- "\n",
- "import math\n",
- "Cc=0.28;\n",
- "Hc=6.0;\n",
- "eo=0.9;\n",
- "Cv=0.36; # in m^2/mo.\n",
- "H=3.0; # in m\n",
- "t=9.0; # in mo.\n",
- "sigmao=210.0;# in kN/m^2\n",
- "sigmap=115; #deltasigmap in kN/m^2\n",
- "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+sigmap)/sigmao); # in m\n",
- "print round(Sc*1000,1),\"primary consolidation in mm\"\n",
- "Tv=Cv*t/H**2;\n",
- "#from table\n",
- "k=1.8; #constant\n",
- "sf=k*sigmap; # in kN/m**2\n",
- "print round(sf,2),\"deltasigmaf in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "167.7 primary consolidation in mm\n",
- "207.0 deltasigmaf in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.2:Pg-703"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 14.2\n",
- "\n",
- "import math\n",
- "Tv=0.36;\n",
- "sigmap=115; # in kN/m^2\n",
- "Uv=math.sqrt(4*Tv/math.pi)*100;\n",
- "print round(Uv,2),\"Uv in %\"\n",
- "#from table \n",
- "k=0.12; #constant\n",
- "sf=k*sigmap;\n",
- "print sf,\"deltasigmaf in kN/m**2\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "67.7 Uv in %\n",
- "13.8 deltasigmaf in kN/m**2\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex14.3:Pg-704"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 14.3\n",
- "\n",
- "Cc=0.31;\n",
- "Hc=15.0;#ft\n",
- "eo=1.1;\n",
- "n=10.0;\n",
- "Uv=0.09;\n",
- "sigmao=1000.0; # in lb/ft^2\n",
- "deltasigma=2000.0; # deltasigmap+deltasigmaf\n",
- "Sc=Cc*Hc/(1+eo)*math.log10((sigmao+deltasigma)/sigmao);\n",
- "print round(Sc,3),\"primary consolidation in ft\"\n",
- "m=n**2/(n**2-1)*math.log(n)-(3*n**2-1)/4/n**2;\n",
- "A=2/m;\n",
- "Ur=(0.096-1/A*(1-math.exp(-A*0.096)))/0.192;\n",
- "Uvf=1-(1-Ur)*(1-Uv);\n",
- "Sc30=Sc*Uvf*12; #settlement after 30 days\n",
- "print round(Sc30,2),\"settlement after 30 days in inch\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1.056 primary consolidation in ft\n",
- "1.48 settlement after 30 days in inch\n"
- ]
- }
- ],
- "prompt_number": 12
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex1.2_1.png b/Principles_Of_Foundation_Engineering/screenshots/ex1.2_1.png Binary files differdeleted file mode 100755 index 8346a9de..00000000 --- a/Principles_Of_Foundation_Engineering/screenshots/ex1.2_1.png +++ /dev/null diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex1.2_2.png b/Principles_Of_Foundation_Engineering/screenshots/ex1.2_2.png Binary files differdeleted file mode 100755 index 8346a9de..00000000 --- a/Principles_Of_Foundation_Engineering/screenshots/ex1.2_2.png +++ /dev/null diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex13.1.png b/Principles_Of_Foundation_Engineering/screenshots/ex13.1.png Binary files differdeleted file mode 100755 index 10988711..00000000 --- a/Principles_Of_Foundation_Engineering/screenshots/ex13.1.png +++ /dev/null diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex13.1_1.png b/Principles_Of_Foundation_Engineering/screenshots/ex13.1_1.png Binary files differdeleted file mode 100755 index 10988711..00000000 --- a/Principles_Of_Foundation_Engineering/screenshots/ex13.1_1.png +++ /dev/null diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex13.1_2.png b/Principles_Of_Foundation_Engineering/screenshots/ex13.1_2.png Binary files differdeleted file mode 100755 index 10988711..00000000 --- a/Principles_Of_Foundation_Engineering/screenshots/ex13.1_2.png +++ /dev/null diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex14.2_1.png b/Principles_Of_Foundation_Engineering/screenshots/ex14.2_1.png Binary files differdeleted file mode 100755 index 1a58b738..00000000 --- a/Principles_Of_Foundation_Engineering/screenshots/ex14.2_1.png +++ /dev/null diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex14.2_2.png b/Principles_Of_Foundation_Engineering/screenshots/ex14.2_2.png Binary files differdeleted file mode 100755 index 1a58b738..00000000 --- a/Principles_Of_Foundation_Engineering/screenshots/ex14.2_2.png +++ /dev/null diff --git a/Principles_Of_Foundation_Engineering/Chapter01_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter01_2.ipynb index 61dc3457..61dc3457 100755 --- a/Principles_Of_Foundation_Engineering/Chapter01_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter01_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter02_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter02_2.ipynb index f284c073..f284c073 100755 --- a/Principles_Of_Foundation_Engineering/Chapter02_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter02_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter03_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter03_2.ipynb index 520b4f21..520b4f21 100755 --- a/Principles_Of_Foundation_Engineering/Chapter03_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter03_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter04_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter04_2.ipynb index 1d75ed9f..1d75ed9f 100755 --- a/Principles_Of_Foundation_Engineering/Chapter04_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter04_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter05_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter05_2.ipynb index ca975aae..ca975aae 100755 --- a/Principles_Of_Foundation_Engineering/Chapter05_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter05_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter06_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter06_2.ipynb index d87679c7..d87679c7 100755 --- a/Principles_Of_Foundation_Engineering/Chapter06_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter06_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter07_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter07_2.ipynb index 63b3bc22..63b3bc22 100755 --- a/Principles_Of_Foundation_Engineering/Chapter07_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter07_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter08_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter08_2.ipynb index de2367cd..de2367cd 100755 --- a/Principles_Of_Foundation_Engineering/Chapter08_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter08_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter09_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter09_2.ipynb index 7d8bec64..7d8bec64 100755 --- a/Principles_Of_Foundation_Engineering/Chapter09_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter09_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter10_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter10_2.ipynb index 3af11efd..3af11efd 100755 --- a/Principles_Of_Foundation_Engineering/Chapter10_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter10_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter11_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter11_2.ipynb index 0afdb4a0..0afdb4a0 100755 --- a/Principles_Of_Foundation_Engineering/Chapter11_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter11_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter12_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter12_2.ipynb index fcc14387..fcc14387 100755 --- a/Principles_Of_Foundation_Engineering/Chapter12_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter12_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter13_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter13_2.ipynb index bfb80602..bfb80602 100755 --- a/Principles_Of_Foundation_Engineering/Chapter13_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter13_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/Chapter14_2.ipynb b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter14_2.ipynb index c829bef5..c829bef5 100755 --- a/Principles_Of_Foundation_Engineering/Chapter14_2.ipynb +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/Chapter14_2.ipynb diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex1.2.png b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex1.2.png Binary files differindex 8346a9de..8346a9de 100755 --- a/Principles_Of_Foundation_Engineering/screenshots/ex1.2.png +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex1.2.png diff --git a/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex13.2.png b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex13.2.png Binary files differnew file mode 100755 index 00000000..bc9f319c --- /dev/null +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex13.2.png diff --git a/Principles_Of_Foundation_Engineering/screenshots/ex14.2.png b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex14.2.png Binary files differindex 1a58b738..1a58b738 100755 --- a/Principles_Of_Foundation_Engineering/screenshots/ex14.2.png +++ b/Principles_Of_Foundation_Engineering_by_B_M_Das/screenshots/ex14.2.png diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt index 25973247..25973247 100644..100755 --- a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb index 89bbab6f..89bbab6f 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb index fc9cdc80..fc9cdc80 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb index 3af85274..3af85274 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb index 7b68ae3c..7b68ae3c 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb index 6023df95..6023df95 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb index d1a0c39c..d1a0c39c 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb index 8bd2591a..8bd2591a 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb index 8f666425..8f666425 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb index f642bdbb..f642bdbb 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb index 9fe76ece..9fe76ece 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb index 7f653291..7f653291 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb index 322d8248..322d8248 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb index d3ca872d..d3ca872d 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb index 65ad4a7c..65ad4a7c 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb index ee82c913..ee82c913 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png Binary files differindex 888115cd..888115cd 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png Binary files differindex 8f6971ff..8f6971ff 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png diff --git a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png Binary files differindex 3e156a2a..3e156a2a 100644..100755 --- a/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb index 8e712245..8e712245 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb index 8e712245..8e712245 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb index 8e712245..8e712245 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb index 8e712245..8e712245 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb index c318815e..c318815e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb index c318815e..c318815e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb index c318815e..c318815e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb index c318815e..c318815e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb index d6ed4d36..d6ed4d36 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb index d6ed4d36..d6ed4d36 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb index d6ed4d36..d6ed4d36 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb index d6ed4d36..d6ed4d36 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb index 6c6ad595..6c6ad595 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb index 6c6ad595..6c6ad595 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb index 6c6ad595..6c6ad595 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb index 6c6ad595..6c6ad595 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb index d185cf80..d185cf80 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb index d185cf80..d185cf80 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb index d185cf80..d185cf80 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb index d185cf80..d185cf80 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb index 4ffc6c97..4ffc6c97 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb index 4ffc6c97..4ffc6c97 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb index 4ffc6c97..4ffc6c97 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb index 4ffc6c97..4ffc6c97 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb index 45f8b0e5..45f8b0e5 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb index 45f8b0e5..45f8b0e5 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb index 45f8b0e5..45f8b0e5 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb index 45f8b0e5..45f8b0e5 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb index 583cdf29..583cdf29 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb index 09fa8a9f..09fa8a9f 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb index 09fa8a9f..09fa8a9f 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb index 09fa8a9f..09fa8a9f 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb index 73bc1303..73bc1303 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb index 73bc1303..73bc1303 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb index 73bc1303..73bc1303 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb index 73bc1303..73bc1303 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb index 417b7f25..417b7f25 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb index 417b7f25..417b7f25 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb index 417b7f25..417b7f25 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb index 417b7f25..417b7f25 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb index d13df346..d13df346 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb index d13df346..d13df346 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb index d13df346..d13df346 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb index d13df346..d13df346 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb index 769fa4d0..769fa4d0 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb index 769fa4d0..769fa4d0 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb index 769fa4d0..769fa4d0 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb index 769fa4d0..769fa4d0 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb index 2fa21473..2fa21473 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb index 2fa21473..2fa21473 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb index 2fa21473..2fa21473 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb index 2fa21473..2fa21473 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb index d1205d31..d1205d31 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb index d1205d31..d1205d31 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb index d1205d31..d1205d31 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb index d1205d31..d1205d31 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb index 697d628e..697d628e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb index 697d628e..697d628e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb index 697d628e..697d628e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb index 697d628e..697d628e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb index 5ebbdccc..5ebbdccc 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb index 5ebbdccc..5ebbdccc 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb index 5ebbdccc..5ebbdccc 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb index ec1d826e..ec1d826e 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb index 725fa18f..725fa18f 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb index 725fa18f..725fa18f 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb index 725fa18f..725fa18f 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb index 725fa18f..725fa18f 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb diff --git a/Process_Heat_Transfer_by_D._Q._Kern/README.txt b/Process_Heat_Transfer_by_D._Q._Kern/README.txt index fa71ad24..fa71ad24 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/README.txt +++ b/Process_Heat_Transfer_by_D._Q._Kern/README.txt diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png Binary files differindex 2f30b561..2f30b561 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png Binary files differindex 2f30b561..2f30b561 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png Binary files differindex 2f30b561..2f30b561 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png Binary files differindex 2f30b561..2f30b561 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png Binary files differindex f7f42642..f7f42642 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png Binary files differindex f7f42642..f7f42642 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png Binary files differindex f7f42642..f7f42642 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png Binary files differindex f7f42642..f7f42642 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png Binary files differindex a8ae6e47..a8ae6e47 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png Binary files differindex a8ae6e47..a8ae6e47 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png Binary files differindex a8ae6e47..a8ae6e47 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png Binary files differindex a8ae6e47..a8ae6e47 100644..100755 --- a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png +++ b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter15.ipynb b/Programming_in_C_using_ANSI_C/KamthaneChapter15.ipynb deleted file mode 100755 index 5a99346e..00000000 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter15.ipynb +++ /dev/null @@ -1,1480 +0,0 @@ -<<<<<<< HEAD -{ - "metadata": { - "name": "", - "signature": "sha256:23cf65a359a2231e3abd5faae195b73ed4d5756e6083812ae87c387c1bb53f5a" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h1>Chapter 15: Additional in 'C'<h1>" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.1, Page number: 505<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Allocate memory to pointer variable. \n", - "\n", - "import sys\n", - "\n", - "#Variable initialization\n", - "j = 0\n", - "k = int(raw_input(\"How many number : \"))\n", - "p = [0 for i in range(0,k)]\n", - "\n", - "#in python, all variables are allocated using dynamic memory allocation technique and no\n", - "#malloc function and pointer concept is available in python.\n", - "\n", - "#Read the numbers\n", - "while j != k:\n", - " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n", - " j += 1\n", - " \n", - "j = 0\n", - "\n", - "#Result\n", - "sys.stdout.write(\"The numbers are : \")\n", - "while j != k:\n", - " sys.stdout.write(\"%d\\t\"%(p[j]))\n", - " j += 1\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many number : 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 1 = 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 2 = 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 3 = 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 4 = 4\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numbers are : 1\t2\t3\t4\t" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.2, Page number: 506<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Memory allocation to pointer variable. \n", - "\n", - "import sys\n", - "\n", - "#Variable initialization\n", - "j = 0\n", - "k = int(raw_input(\"How many Number : \"))\n", - "p = [0 for i in range(0,k)]\n", - "\n", - "#in python, all variables are allocated using dynamic memory allocation technique and no\n", - "#calloc function and pointer concept is available in python.\n", - "\n", - "#Read the numbers\n", - "while j != k:\n", - " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n", - " j += 1\n", - " \n", - "j = 0\n", - "\n", - "#Result\n", - "sys.stdout.write(\"The numbers are : \")\n", - "while j != k:\n", - " sys.stdout.write(\"%d\\t\"%(p[j]))\n", - " j += 1\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many Number : 3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 1 = 45\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 2 = 58\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number 3 = 98\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numbers are : 45\t58\t98\t" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.3, Page number: 507<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Reallocate memory \n", - "\n", - "import sys\n", - "\n", - "#Variable Initialization\n", - "str1 = \"India\"\n", - "\n", - "#in python, value tagged method is used for data storage instead of memory tagging.\n", - "#no realloc function is in python\n", - "\n", - "#Result\n", - "sys.stdout.write(\"str = %s\"%(str1))\n", - "str1 = \"Hindustan\"\n", - "sys.stdout.write(\"\\nNow str = %s\"%(str1))\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "str = India\n", - "Now str = Hindustan" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.4, Page number: 508<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display unused memory \n", - "\n", - "import psutil\n", - "\n", - "psutil.phymem_usage()\n", - "\n", - "#There is no coreleft() function in python. phymem_usage function in the module psutil gives the \n", - "#status and usage of physical memory in python." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "pyout", - "prompt_number": 6, - "text": [ - "usage(total=3165270016L, used=987840512L, free=2177429504L, percent=31.2)" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.5, Page number: 510<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Linked list\n", - "\n", - "import sys\n", - "\n", - "#Variable Initialziation\n", - "ch = 'y'\n", - "p = 0\n", - "q = []\n", - "\n", - "#Function Definitions\n", - "def gen_rate(m):\n", - " q.append(m)\n", - " \n", - "def show():\n", - " print q\n", - " \n", - "def addatstart(m):\n", - " q.insert(0,m)\n", - " \n", - "def append(m,po):\n", - " q.insert(po,m)\n", - "\n", - "def erase(d):\n", - " q.remove(d)\n", - " \n", - "def count():\n", - " print len(q)\n", - " \n", - "def descending():\n", - " q.sort(reverse=True)\n", - " \n", - "#Get choice\n", - "while ch == 'y':\n", - " n = int(raw_input(\"1. Generate\\n2. Add at starting\\n3. Append\\n4. Delete\\n5. Show\\n6.Count\\n7.Descending\\nEnter your choice: \"));\n", - " #There is no switch statement in python\n", - " if n == 1:\n", - " i = int(raw_input(\"How many node you want : \"))\n", - " for j in range(0,i):\n", - " m = int(raw_input(\"Enter the element : \"))\n", - " gen_rate(m)\n", - " show()\n", - " else:\n", - " if n == 2:\n", - " m = int(raw_input(\"Enter the element : \"))\n", - " addatstart(m)\n", - " show()\n", - " else:\n", - " if n == 3:\n", - " m = int(raw_input(\"Enter the element and position \"))\n", - " po = int(raw_input(\"Enter the element and position\"))\n", - " append(m,po)\n", - " show()\n", - " else:\n", - " if n == 4:\n", - " d = int(raw_input(\"Enter the number for deletion : \"))\n", - " erase(d)\n", - " show()\n", - " else:\n", - " if n == 5:\n", - " show()\n", - " else:\n", - " if n == 6:\n", - " count()\n", - " else:\n", - " if n == 7:\n", - " descending()\n", - " show()\n", - " else:\n", - " sys.stdout.write(\"Enter value between 1 to 7\")\n", - " \n", - " ch = raw_input(\"Do u wnat to continue (y/n)\")\n", - " " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "1. Generate\n", - "2. Add at starting\n", - "3. Append\n", - "4. Delete\n", - "5. Show\n", - "6.Count\n", - "7.Descending\n", - "Enter your choice: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "How many node you want : 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element : 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element : 5\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element : 4\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enter the element : 7\n" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "[1, 5, 4, 7]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "stream": "stdout", - "text": [ - "Do u wnat to continue (y/n)n\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.6, Page number: 518<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Draw circle, line and arc using graphics function\n", - "\n", - "%matplotlib inline\n", - "import pylab\n", - "import matplotlib.pyplot as plt\n", - "\n", - "# matplotlib package is used for graphics\n", - "#Give proportionate sizes to draw\n", - "#draw circle\n", - "circle2=plt.Circle((.5,.5),.2,color='b')\n", - "fig = plt.gcf()\n", - "fig.gca().add_artist(circle2)\n", - "\n", - "\n", - "#draw line\n", - "figure()\n", - "pylab.plot([210,110],[150,150])\n", - "\n", - "#Draw ellipse\n", - "figure()\n", - "from matplotlib.patches import Ellipse\n", - "e = Ellipse(xy=(35, -50), width=10, height=5, linewidth=2.0, color='g')\n", - "fig = plt.gcf()\n", - "fig.gca().add_artist(e)\n", - "e.set_clip_box(plt.axes().bbox)\n", - "e.set_alpha(0.7)\n", - "pylab.xlim([20, 50])\n", - "pylab.ylim([-65, -35])" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "pyout", - "prompt_number": 5, - "text": [ - "(-65, -35)" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD9CAYAAABHnDf0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG6lJREFUeJzt3X9U1GW+B/D3yAzGkL8p1mbmLgoTPyQGWxS1tcZ+QdTB\ne9NtsW6lcYnrXbM6t5Nte2+Ce64Lu+d01uJW2BJ7XfNHNzuL94ZjWU7uqoA/sRX0DgY1g+WKqRAo\nDOP3/vEsSSQjwsx8Z555v875HhjnYebjI7x5fL7P9/lqFEUBERHJZZTaBRARke8x3ImIJMRwJyKS\nEMOdiEhCDHciIgkx3ImIJOQ13J944om3YmNjT91yyy2fDtZm+fLlr5jNZofFYqk/dOjQdN+XSERE\n18pruC9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fi77nnng/r6+st\nY8aM6QhEjcFkOLnps3DnmvjLhtIXAHDkyJG0goKCN202W7a3/5aFsqH0xYEDB36Ul5e3CQDa2tpi\ntm3bdp9Op3MPXHYb6obSFyaTyRkTE9MWFRV1ISoq6sLtt9++q76+3iJbuA+lL/bs2TPnF7/4xX8A\nQHx8/IkpU6Y0Hz9+PDEjI2N/oOtV07Bz01cnBdxut3bq1Kknmpub47q7uyOvdkJ17969s2Q9iTiU\nvvj888//Lj4+vmnv3r2z1K5X7b7ofyxevLhS1tUyQ+mLxsbGpLvuumtHb29vRGdnpz41NfXTo0eP\npqhduxp98eyzz75cVFS0UlEUfPXVV7EGg8F15syZiWrX7o+jubk5bignVK8lN31aYHV19X0333zz\n8fj4+KbVq1f/XFEUvPHGG4VvvPFGYV+bn/3sZ2Xx8fFNaWlp9QcOHLhV7U7113G1vsjPz//dxIkT\nz6Snpx9KT08/NGPGjDq1a1arL/ofMof7UPviN7/5zXMpKSlHU1NTP12zZs1ytWtWqy9Onz4d88AD\nD/xPWlpafWpq6qdvv/32w2rX7I8jLy9v4+TJk0/qdLoeo9HorKioeMIXualRFOmmvImIwh7vxERE\nJCGGOxGRhBjuREQSYrgTEUmI4U5EJCGGOxGRhP4fViZ/V3kiv9UAAAAASUVORK5CYII=\n", - "text": [ - "<matplotlib.figure.Figure at 0x399d950>" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAD9CAYAAABdoNd6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGe9JREFUeJzt3X10U3W+7/HfrpRzikXbLmjokEAjoFCatLEBAU8lIxQK\nXAdRl4t4BW8j67JwXc/RVECdqyT3jFCKxQdm6XSWtCMwB9aZw0BnRqgEIaVzEEufbAUdGExtAzFQ\nSj32QQp03z/mxhs7JRCagu3v/Vprr7X720/fL7SfpnvvZCuqqgoAwOAWdasLAAD0P8IeACRA2AOA\nBAh7AJAAYQ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rAz9revXuzB0u+9Nbfnj17\n5kUyXxRV/dGfxgIA9BFPqgIACRD2ACABwh4AJEDYA4AECHsAkABhDwAS+L8uyejsxMIQUAAAAABJ\nRU5ErkJggg==\n", - "text": [ - "<matplotlib.figure.Figure at 0x399d690>" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD9CAYAAACyYrxEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHftJREFUeJzt3XtQVFe+L/Dv7hc0L3k/7EZBIQKK0MQHd443tlGsmalR\nmUzKTFJJnDKZSumt3MngZByTo5JM0IkJyaSs6LEmzpmYumdizr0TNZk4V3Jil07uGHw08YEGCE3C\n0/AM0DQ03b3uHwQGEC3pRhqW30/VKja72b1/i6XfXuzevbcihAAREclL5e8CiIjozmLQExFJjkFP\nRCQ5Bj0RkeQY9EREkmPQExFJzuug3759+2+zsrI+z87OLlu5cuV/1dbWJgJATU1Nkl6vd5hMJqvJ\nZLJu3rx538SVS0RE46V4ex59V1dXaGhoaBcA7N279+nPP/8866233nqypqYmac2aNR9cunQpc0Ir\nJSIir3g9ox8MeQDo7u4OiY6ObpmYkoiIaEIJIbxuzz33XFFiYuLX8+bNu9be3h4uhIDNZksKDg7u\nzs7Oti5fvtxy+vTpZaO3AyDY2NjY2MbfvMnqWz64atWqkgULFlwa3Y4dO7Zm+M/t3r37Nz/72c/+\nXQiBvr4+XVtbW4QQAufPn89JTEz8urOzM3R00Mts586d/i7hjmL/pjeZ+ydz34QQXge9BrdQUlKS\nd6vHBz3yyCP/8cMf/vAjANDpdE6dTucEgJycnAtz5879srKyMjUnJ+fC7TwXERFNLK+P0VdWVqYO\nLh89enSdyWSyAkBLS0u02+1WA0B1dfWcysrK1Dlz5lT7XioREXnjljP6W9m2bdvuL774Yp5arXbP\nnTv3y/37928CgFOnTt23Y8eOF7Vabb9KpfIcOHDgqfDw8I6JK3nqM5vN/i7hjmL/pje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FSfnz59/RabxG6t/gBzj98tf/vL1V1555VmVSuUZXCfT2I3V\nP0VRhAxjBwz0ZdWqVR8vWrTo3B/+8IefA96N36QFfXd3d8hPfvKT//PGG2/8Yvg59cBAZxRFEZNV\ny53Q3d0d8uCDD/7vN9544xchISHdmzZt2m+z2ZLLysqyExISGrds2VLs7xq9pVKpPGVlZdl1dXXG\nU6dO3Xfy5MkVwx+f7uM3un8Wi8Usw/h9+OGHP4qNjf3GZDJZbzbDnc5jd7P+yTB2gz799NN/sVqt\npuPHj//gzTff/B+nT5/+78Mfv+3xm4zjTE6nU7t69er/+/rrrz8zuG7evHnXGhsb44UQaGhoSJg3\nb941fx8Pm8j+DW82my1pwYIFl/xd50S0F198cfsrr7zyK5nGb6z+yTB+27Zt22U0GmuTkpJs8fHx\njUFBQfZHH330HVnGbqz+PfbYY4dkGLuxWmFh4c5XX311izfjd8dn9EII5YknnjiYkZFR/swzz/x+\ncP3atWuPvf322xsA4O23396Qn59/5E7XcifcrH+NjY0Jg8vvv//+jzMzMy/5p0LftLS0RA/+6etw\nOPQlJSV5JpPJKsv43ax/wz8RPl3Hb9euXc/V1tYm2my25Hffffen999//yfvvPPOY7KM3Vj9O3To\n0OOy/N/r6ekJ6urqCgUAu90efOLEidWZmZmXvBq/O/0qdPr06WWKoniysrLKhp/u1NraGrly5cqP\np/spXmP176OPPvrBY489digzM/PiwoULP1+3bt2RpqamOH/X6k27ePFipslkupCVlVWWmZl5cc+e\nPc8KMXCKlwzjd7P+yTJ+g81isSwfPCtFlrEb3k6ePGke7N+jjz76jgxjV11dnZyVlVWWlZVVNn/+\n/Mu7du3a5u34KUJMy8NzRER0m3iHKSIiyTHoiYgkx6AnIpIcg56ISHIMeiIiyTHoiYgk9/8B1dqr\nlLRzGX0AAAAASUVORK5CYII=\n", - "text": [ - "<matplotlib.figure.Figure at 0x2610890>" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.7, Page number: 519<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Draw boxes and fill with different designs.\n", - "\n", - "%pylab\n", - "#matplotlib package is used for graphics\n", - "from matplotlib.patches import Rectangle\n", - "from matplotlib.collections import PatchCollection\n", - "\n", - "e = Rectangle(xy=(35, -50), width=10, height=5, linewidth=2.0, color='b')\n", - "fig = plt.gcf()\n", - "fig.gca().add_artist(e)\n", - "e.set_clip_box(ax.bbox)\n", - "e.set_alpha(0.7)\n", - "pylab.xlim([20, 50])\n", - "pylab.ylim([-65, -35])\n", - "\n", - "#There are no different automatic fill styles. user should create the styles." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAErZJREFUeJzt3X9MVff9x/HXuXKbaEoEV3UtN6kILooinNYpf5jsOLlL\nk4WW0YXEpq6J9p/6V0uXOrOIkBRxbizpyDRka5raf+qyxMKW2kBWb2i3uFsQ6w+SggW6C3LNmDZR\nt4Xpzv5ovN8yfqT33At8fe/5SE5y77ncez6ffPTZc4/3Usf3fV8AALNCiz0AAMD8IvQAYByhBwDj\nCD0AGEfoAcA4Qg8AxgUO/cGDB1VWVqby8nLt3LlTiURCkjQyMqKlS5fKdV25rqt9+/ZlbbAAgPQ5\nQT9Hf/PmTeXm5kqSWltb9fHHH+vXv/61RkZGVFVVpYsXL2Z1oACAYAKf0d+LvCTdunVLDz30UFYG\nBADIrpxMnvzjH/9Yb731lpYtW6azZ8+m9g8PD8t1XS1fvlyvvvqqtm/fnvFAAQDBzHnpJhqNKplM\nTtt/+PBhVVVVpe4fOXJEn3zyid544w1NTk7q9u3bys/P17lz51RdXa3Lly9PeQcAAFhAfhZ89tln\n/saNG2d8zPM8v7e3d9r+oqIiXxIbGxsbWxpbUVFR2o0OfI1+cHAwdbu9vV2u60qSJiY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FhYqF27dun999/X7t27zazfTPP7wQ9+YGb9JOnhhx+W\n9MXvE/ve976neDye9votSOh939fevXtVUlKiF198MbX/ySef1JtvvilJevPNN1OBvN/MNr/x8fHU\n7VOnTqm0tHQxhpeRiYmJ1Nvef/zjH+rq6pLrumbWbrb5fflXf9yvaydJhw8fViKR0PDwsN5++219\n+9vf1ltvvWVm/Waa34kTJ0z83ZO++KDAzZs3JUm3b99WZ2enSktL01+/tL9LG8AHH3zgO47jl5WV\n+eXl5X55ebl/+vRp/29/+5u/c+dOf926dX40GvVv3LixEMPJupnm9+677/q7d+/2S0tL/c2bN/tP\nPfWUn0wmF3uoabtw4YLvuq5fVlbml5aW+kePHvV93zezdrPNz8La/bdYLOZXVVX5vm9n/b7szJkz\nqfk9++yzJtZvaGjILysr88vKyvyNGzf6hw8f9n0//fXjC1MAYBz/K0EAMI7QA4BxhB4AjCP0AGAc\noQcA4wg9ABhH6AHAOEIPAMb9B4rEH5DkLOd4AAAAAElFTkSuQmCC\n", - "text": [ - "<matplotlib.figure.Figure at 0x7373590>" - ] - } - ], - "prompt_number": 72 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.8, Page number: 520<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display text in different size, font, vertically and horizontally \n", - "\n", - "%matplotlib inline\n", - "\n", - "from pylab import *\n", - "\n", - "#Tkinter package is used for graphics\n", - "# set limits so that it no longer looks on screen to be 45 degrees\n", - "xlim([-5,5])\n", - "\n", - "# Locations to plot text\n", - "l1 = array((1,1))\n", - "l2 = array((5,5))\n", - "\n", - "# Rotate angle\n", - "angle = 90\n", - "trans_angle = gca().transData.transform_angles(array((45,)),\n", - " l2.reshape((1,2)))[0]\n", - "\n", - "# Plot text\n", - "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 25)\\n\\n',fontsize=25,\n", - " rotation=0)\n", - "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 16)',fontsize=16,\n", - " rotation=0)\n", - "th1 = text(l1[0],l1[1],'Hello(Vertical Text)',fontsize=16,\n", - " rotation=angle)\n", - "show()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAA0oAAASvCAYAAAA39ApSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdUFNfj//+ZpRfpoNgAxUZUYpfYAMWKvZfYYmJMSGwx\n3YglxRiVqO8YjcYSeywotogCahKNiga7EUUURRFQqiDL7u8Pz3zf87m/XTqavPN8nHPP0Zk7c++U\nZfe1M3tH1uv1EgAAAADgvzQvugMAAAAA8HdDUAIAAAAAAUEJAAAAAAQEJQAAAAAQEJQAAAAAQEBQ\nAgAAAAABQQkAUCJr164dq9FodF5eXgmlmVdRHj586Org4PC4WrVq9588eWJVWe08L56enrc0Go1u\n3bp1Y150X/4JQkNDQzUajS4gICD6Rffl36Qi9vvzONfT09Od3n333SV169a9YWFhka/RaHQajUaX\nmZlpV1lt/h0o23n06NFOL7ovf3c9e/bcr9FodEeOHOlc0mUISgDwN6d8UNFoNLri6t66dctTqVtZ\nH0pkWTb6AL6i5pXXzJkz52ZmZtp99NFHX1pZWT1Rz4uJifEvzQcG5YPbuHHj1lRWf0uqMvfZ8xIe\nHt4vNDQ0dPfu3X0ru63S7C/lOJelzJ49e1ZlbocoLCxsyuzZs2fFxcX5Ps92S8rQfi/tca+sc72w\nsNCkc+fOR5YtWxZy69YtT0tLy7xq1ardr1at2v2S/N2sbKGhoaGzZ8+elZiY6FEZ65dlWf9P+DuS\nn59vERER0TskJGRZy5Ytzzg4ODw2MzMrcHV1fRgYGBi1bNmykKK+BFP/nS+qrF69+jVDy8+dO3em\nJEnStGnTFul0uhJlINOybSoA4HkrzRvhP+WNs6QuXrzYeNWqVRNq1Khxd9KkScuN1Svtdr/IfeTt\n7R1vbW2da29vn/Gi+lBRwsPD+61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oAQAAAAAAoISAAAAAAgISgAAAAAgICgB\nAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAo\nAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAg\nKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAg\nICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAA\nICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAA\nACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAA\nAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoA\nAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhK\nAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgI\nSgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAI\nCEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAA\nCAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAA\nAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAA\nAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIA\nAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoIS\nAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKC\nEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAAC\nghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAA\nAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAA\nAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAA\nAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQA\nAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAE\nAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICg\nBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICA\noAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACA\ngKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAA\ngICgBAAAAAACghIAAAAACAhKAAAAACAgKAEAAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAA\nAICAoAQAAAAAAoISAAAAAAgISgAAAAAgICgBAAAAgICgBAAAAAACghIAAAAACAhKAAAAACAgKAEA\nAACAgKAEAAAAAAKCEgAAAAAICEoAAAAAICAoAQAAAICAoAQAAAAAAo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5cw7dNqPC9umBBx44+oEHHji6o6OjFBExbdq0iXfccccxm6955ZVX3n3HHXcc\nYxMHAICu0WkoffjDH/7vpUuX1r3R8dtuu23s+PHjp0dEDB8+fO7q1at3XrFiRZ8+ffqseIfnhO3W\nz3/+86P+5V/+5Z83fb7hhhvOyGt69OjRNnjw4Cevueaaz3XtdAAAlanTUHozy5Ytq66trW3Z9Lmm\npqa1tbW1JodSqVTyIBS8DevWrXvXI488cuARRxzxy6JnoWttutIIAHStt/1QeP4/8TeKoo6OjkL/\nufjiiwufoVz+cS6cC+fif8e5AACK87ZCqbq6ellLS0vtps+tra011dXVy97+WFCZJk2aFBs2bNjq\nsd///vdxzDHHbPUYAADvrLcVSmPHjr1txowZp0dEzJkz59Cdd955teeT4G93zTXXxOGHHx7PPPPM\nFj+/++67Y//9949f//rXBU0GAFBZOg2lk08+eebhhx/+0NNPPz2wtra25frrr58wbdq0idOmTZsY\nETFmzJjZ/fr1+13//v0XT5w4cdq///u//0PXjP3Xa2hoKHqEsuFcvK7czsW8efPij3/8Yxx00EEx\nffr0aGtriy984QsxevToGDp0aDz22GPb7M8ut3NRJOcCAOiSF86WSqUO99vDW/PKK6/E+eefH9de\ne2306dMnVq9eHVdeeWWcd955RY9GFyuVStFhMwcAKMTb3swBeGe9+93vjsMPPzx69OgRK1asiAED\nBsSxxx5b9FgAABVFKEEZ+cMf/hAnn3xyTJgwIc4444z45S9/GevXr48DDjggfvSjHxU9HgBAxXDr\nHZSRvn37xpo1a+Laa6+N4447LiIi/vSnP8X5558f1113XZx66qkxY8aMgqekq7j1DgCKI5SgjDQ0\nNMQPf/jDqK6u/otjP/3pT+Pss8+OF198sYDJKIJQAoDiCCUoIx0dHVEqvfHfi1taWqK2tvYNj7N9\nEUoAUJyqogcAXrcpkhYuXBgPPvhgrFq1Ks4+++zYY489orm5Ofr06VPwhAAAlcEVJSgj69ati09/\n+tNxyy23RMSfw2n+/Plx0EEHxSc/+cnYZ5994oorrih4SrqKK0oAUBy73kEZ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IJAIojlADKlFACgOJ4RgkAACCpKnoAqHQTJkyIr3zlK9G3b98444wz\nolTq/ALC9ddf30WTAQBULrfeQcHq6upi1qxZMWTIkKirq3vDUOro6IhSqRRLlizp4gkpilvvAKA4\nQgmgTAklACiOZ5SgjDz44IOxZs2arR5bu3ZtPPjgg108EQBAZRJKUEYaGhpi0aJFWz321FNPxdFH\nH93FEwEAVCahBP9LrFu3Lrp1858sAEBXsOsdFGzJkiWxZMmS2PQc3/z582Pt2rVbrHnllVfiuuuu\niw984ANFjAgAUHGEEhRs+vTpcemll772+bzzztvquqqqqpg6dWpXjQUAUNHsegcFW7p0aSxdujQi\nIj7ykY/Ed77znaivr99izbve9a7YZ599onfv3gVMSFHsegcAxRFKUCbWr18fP/vZz6Jfv36x//77\nFz0OZUAoAUBxPBkOZaKqqipOPPHEePHFF4seBQCg4gklKBOlUin69esXL7zwQtGjAABUPKEEZeSL\nX/xiXHbZZWIJAKBgdr2DMvLAAw/EqlWrol+/fnHooYfGHnvsEaXSlo+ozJgxo6DpAAAqh80coIzU\n1dVteoA/ImKLSOro6IhSqRRLliwpajy6mM0cAKA4QgmgTAklACiOZ5QAAAASoQRlZu3atXH11VfH\n8ccfH0cffXQ0NzdHRMTMmTPjqaeeKng6AIDKYDMHKCMtLS1x1FFHxbJly2LgwIHx+OOPx5o1ayLi\nzxs93HfffXHttdcWPCUAwPbPFSUoIxdeeGH07Nkznn766fj1r3+9xbGjjjoqHnzwwYImAwCoLK4o\nQRm55557Ytq0aVFXVxcbNmzY4lh1dXUsW7asoMkAACqLK0pQRtra2qJXr15bPfbyyy9HVZXvNgAA\nuoJQgjLywQ9+MH7yk59s9VhjY2McfPDBXTwRAEBl8vU0lJEvfvGLccIJJ0RExCmnnBIREU888UTc\neuutce2118Ztt91W5HgAABXDC2ehzHzve9+LSZMmvbbbXUTETjvtFFdddVWcffbZBU5GV/PCWQAo\njlCCgk2YMCHGjx8fRx111Gs/W7t2bfzqV7+KF154IXr37h1HHHFE7LTTTgVOSRGEEgAURyhBwd7z\nnvfEK6+8EnvttVecdtppcfrpp0f//v2LHosyIJQAoDg2c4CCLV++PK677rqoq6uLyy67LPbZZ584\n4ogj4vvf/368/PLLRY8HAFCRXFGCMvLcc8/FjTfeGP/5n/8ZTz/9dPTs2TOOPfbYGD9+fIwaNSq6\ndfPdRiVxRQkAivOmf+tqbGwcNWjQoKcGDBjQPGXKlElbW9PU1NRw4IEHPrLffvs93tDQ0PSOTwkV\n4gMf+EB86UtfikWLFsWcOXNiwoQJcf/998cxxxwT1dXVceGFFxY9IgBARej0ilJ7e/sOAwcOfPre\ne+/9WHV19bJDDjlk/syZM0+ur69ftGnN6tWrdz7iiCN+edddd42sqalpXbly5a677rrryi3+EFeU\n4G+2fv36+Kd/+qf41re+FRER7e3tBU9EV3FFCQCK0+l7lObNmzesf//+i+vq6pZGRIwbN+7Hs2bN\n+sTmofSjH/3olOOPP/6nNTU1rREROZKAv01zc3PMmDEjbrzxxnj22WejV69eceKJJxY9FgBAReg0\nlJYtW1ZdW1vbsulzTU1N69y5c4dvvqa5uXnA+vXrux999NEPrFmzZqfzzz//6tNOO+0/8+91ySWX\nvPbrhoaGaGhoeNvDw/Zm1apV8eMf/zhmzJgR8+bNi27dusWIESPi61//ehx33HHRs2fPokdkG2pq\naoqmpqaixwAA4k1CqVQqven9cuvXr+/+61//+qD77rvvo3/605/+z2GHHfarQw89dM6AAQOaN1+3\neSgBr2tra4s77rgjZsyYEXfeeWesX78+Bg8eHFOmTIlTTz019thjj6JHpIvkL5EmT55c3DAAUOE6\nDaXq6uplLS0ttZs+t7S01G66xW6T2trall133XXlu9/97lfe/e53v3LkkUc+uHDhwiE5lICt2333\n3WP16tXRu3fvmDhxYowfPz4OPvjgoscCAKhone56N3To0AXNzc0Dli5dWtfW1tbjpptuOmns2LG3\nbb7mE5/4xKxf/OIXH2pvb9/hT3/60/+ZO3fu8MGDBz+5bceG7ceRRx4Zt9xySzz//PNxzTXXiCQA\ngDLQ6RWlqqqqDVOnTj135MiRd7W3t+9w5plnXldfX79o2rRpEyMiJk6cOG3QoEFPjRo1qnH//fd/\nrFu3bhvPOuus/xBK8NbdeuutRY8AAEDihbNQsKuvvjrOOeec6NGjx1tav27duvje974X559//jae\njKLZHhwAiiOUoGBDhgyJVatWxYQJE+LTn/507LPPPltd9+STT8bMmTPjhhtuiN69e8fChQu7eFK6\nmlACgOIIJShYe3t7XH/99XHVVVfF4sWLY7fddot99903evfuHRERK1eujN/85jexatWq6NevX1x0\n0UVx1llnRbdunT5iyHZAKAFAcYQSlImOjo5oamqKxsbGmD9/fqxYsSJKpVL06dMnhg4dGh//+Mfj\nox/9aNFj0oWEEgAURygBlCmhBADFce8OAABAIpSgzDz//PNx4YUXxtChQ6Nfv35xyCGHxEUXXRTL\nly8vejQAgIrh1jsoI7/97W/jQx/6UKxevTqOOOKI6NOnTyxfvjweeuih2GWXXeIXv/hFDBgwoOgx\n6SJuvQOA4gglKCN///d/H48//njcc889UVdX99rPn3322RgxYkTsu+++8V//9V/FDUiXEkoA1SpM\nrQAADkdJREFUUByhBGVk5513ju9+97tx8skn/8WxmTNnxjnnnBOrV68uYDKKIJQAoDieUYIy0tbW\nFjvttNNWj+24447R1tbWxRMBAFQmV5SgjBx22GHRq1evuPPOO7d4oezGjRvjmGOOidWrV8dDDz1U\n4IR0JVeUAKA4VUUPALzu4osvjr/7u7+L+vr6OOmkk2KPPfaI5cuXx8033xzNzc3xs5/9rOgRAQAq\ngitKUGYaGxvjn//5n+ORRx6Jjo6OKJVKcfDBB8fXvva1GDlyZNHj0YVcUQKA4gglKFN//OMf46WX\nXopddtkl3vOe9xQ9DgUQSgBQHKEEUKaEEgAUxzNKULDJkydHqfTW/y781a9+dRtOAwBAhCtKULjN\nd7d7KzZu3LiNJqHcuKIEAMVxRQkKJnwAAMqPF84CAAAkQgkAACBx6x0UrFu3bpueRXnTtaVSKdrb\n27tgKgCAyiaUoGB/zS52f83ueAAA/O3segdQpux6BwDF8YwSlKm1a9fGs88+G21tbUWPAgBQcYQS\nlJnbb789DjzwwOjVq1f069cvHn/88YiIOPPMM+NHP/pRwdMBAFQGoQRl5NZbb43jjjsudtttt7jy\nyiu32OChb9++MX369AKnAwCoHEIJysjkyZPjM5/5TNx9991xwQUXbHFsv/32i9/85jcFTQYAUFmE\nEpSRRYsWxbhx47Z6bJdddokXX3yxiycCAKhMQgnKSK9eveL3v//9Vo89++yzsdtuu3XxRAAAlUko\nQRkZMWJEXHHFFfHSSy9t8c6kV199NaZOnRqjR48ucDoAgMrhPUpQRpYsWRLDhw+PUqkUY8aMienT\np8enPvWpWLhwYbz88suxYMGCqK6uLnpMuoj3KAFAcVxRgjLSt2/fePjhh+OYY46Ju+++O3bYYYd4\n8MEH47DDDot58+aJJACALuKKEkCZckUJAIrjihIAAEBSVfQAUOkmT568xcYNb+arX/3qNpwGAIAI\nt95B4bp1++su7G7cuHEbTUK5cesdABTnTf+G1tjYOGrQoEFPDRgwoHnKlCmT3mjd/PnzD6mqqtpw\nyy23fPKdHRG2b21tbVv888orr0RExJw5c/7iWFtbW8HTAgBUhk5vvWtvb9/h3HPPnXrvvfd+rLq6\netkhhxwyf+zYsbfV19cvyusmTZo0ZdSoUY2+/YS/TlXV1v8zrKqqesNjAABsW51eUZo3b96w/v37\nL66rq1vavXv39ePGjfvxrFmzPpHXffvb3z7vhBNO+Mluu+32+203KgAAQNfo9OvqZcuWVdfW1rZs\n+lxTU9M6d+7c4XnNrFmzPnH//fd/ZP78+YeUSqWtPox0ySWXvPbrhoaGaGhoeFuDA2xvmpqaoqmp\nqegxAIB4k1B6o+jZ3AUXXPCtK6644p/+/w0bSm90693moQTAX8pfIk2ePLm4YQCgwnUaStXV1cta\nWlpqN31uaWmprampad18zcMPP3zwuHHjfhwRsXLlyl3vvPPO0d27d18/duzY27bNyLB9+d3vfrfF\n5w0bNkRERGtra+y8885/sb5fv35dMhcAQCXrdHvwDRs2VA0cOPDp++6776N77rnn88OGDZs3c+bM\nk/NmDpucccYZNxx77LG3f/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AgEQoAQAAJEIJAAAgEUoA\nAACJUAIAAEiEEgAAQCKUAAAAEqEEAACQCCUAAIBEKAEAACRCCQAAIBFKAAAAiVACAABIhBIAAEAi\nlAAAABKhBAAAkAglAACARCgBAAAkQgkAACARSgAAAIlQAgAASIQSAABAIpQAAAASoQQAAJAIJQAA\ngEQoAQAAJEIJAAAgEUoAAACJUAIAAEiEEgAAQCKUAAAAEqEEAACQCCUAAICkYkKpqamp6BHKhnPx\nOufidc7F65wLAOBNQ6mxsXHUoEGDnhowYEDzlClTJm1tzec+97lrBgwY0DxkyJCFjzzyyIHv/Jhv\nn7/4vM65eJ1z8Trn4nXOBQDQaSi1t7fvcO65505tbGwc9eSTTw6eOXPmyYsWLarffM3s2bPHLF68\nuH9zc/OA73//+2efc8453922IwMAAGxbnYbSvHnzhvXv339xXV3d0u7du68fN27cj2fNmvWJzdfc\ndtttY8ePHz89ImL48OFzV69evfOKFSv6bMuhAQAAtqWqzg4uW7asura2tmXT55qamta5c+cOf7M1\nra2tNX369Fmx+bpSqfROzfw3mzx5ctEjlA3n4nXOxeuci9c5FwBQ2ToNpVKp1PFWfpOOjo4tKij/\ne/k4AABAOev01rvq6uplLS0ttZs+t7S01NbU1LR2tqa1tbWmurp62Ts/KgAAQNfoNJSGDh26oLm5\necDSpUvr2traetx0000njR079rbN14wdO/a2GTNmnB4RMWfOnEN33nnn1fm2OwAAgP9NOr31rqqq\nasPUqVPPHTly5F3t7e07nHnmmdfV19cvmjZt2sSIiIkTJ04bM2bM7NmzZ4/p37//4ve85z1/vOGG\nG87omtEBAAC2jVJHx1t6DGm78o1vfOPCiy666KqVK1fu+r73vW9V0fMU5aKLLrrqjjvuOKZHjx5t\ne++99zM33HDDGe9973tfLnqurtLY2Djqggsu+FZ7e/sOn/3sZ6+dNGnSlKJnKkpLS0vt6aefPuOF\nF154f6lU6jj77LO//7nPfe6aoucqSnt7+w5Dhw5dUFNT03r77bcfW/Q8AEDXe9MXzm5vWlpaau+5\n554Re+2117NFz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YII=\n", - "text": [ - "<matplotlib.figure.Figure at 0x3f2e190>" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.9, Page number: 521<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Display status of mouse button pressed \n", - "\n", - "from Tkinter import *\n", - "from tkFileDialog import askopenfilename\n", - "import Image, ImageTk\n", - "\n", - "if __name__ == \"__main__\":\n", - " root = Tk()\n", - "\n", - " #setting up a tkinter canvas with scrollbars\n", - " frame = Frame(root, bd=2, relief=SUNKEN)\n", - " frame.grid_rowconfigure(0, weight=1)\n", - " frame.grid_columnconfigure(0, weight=1)\n", - " xscroll = Scrollbar(frame, orient=HORIZONTAL)\n", - " xscroll.grid(row=1, column=0, sticky=E+W)\n", - " yscroll = Scrollbar(frame)\n", - " yscroll.grid(row=0, column=1, sticky=N+S)\n", - " canvas = Canvas(frame, bd=0, xscrollcommand=xscroll.set, yscrollcommand=yscroll.set)\n", - " canvas.grid(row=0, column=0, sticky=N+S+E+W)\n", - " xscroll.config(command=canvas.xview)\n", - " yscroll.config(command=canvas.yview)\n", - " frame.pack(fill=BOTH,expand=1)\n", - "\n", - " \n", - "\n", - " #function to be called when mouse is clicked\n", - " def printcoords(event):\n", - " #outputting x and y coords to console\n", - " print \"Mouse Button pressed\"\n", - " print (event.x,event.y)\n", - " #mouseclick event\n", - " canvas.bind(\"<Button 1>\",printcoords)\n", - "\n", - " root.mainloop()\n", - " \n", - "import win32api, win32con\n", - "\n", - "print \"Current cursor position at \" \n", - "print win32api.GetCursorPos()" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mouse Button pressed\n", - "(207, 115)\n", - "Current cursor position at " - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - "(502, 188)\n" - ] - } - ], - "prompt_number": 108 - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "<h3>Example 15.10, Page number: 523<h3>" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Change mouse cursor.\n", - "\n", - "#Placing the cursor on top of the circle button will change the pointer to circle\n", - "# and plus button to plus symbol\n", - "\n", - "from Tkinter import *\n", - "import Tkinter\n", - "\n", - "top = Tkinter.Tk()\n", - "\n", - "B1 = Tkinter.Button(top, text =\"circle\", relief=RAISED,\\\n", - " cursor=\"circle\")\n", - "B2 = Tkinter.Button(top, text =\"plus\", relief=RAISED,\\\n", - " cursor=\"plus\")\n", - "B1.pack()\n", - "B2.pack()\n", - "top.mainloop()" - ], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": 110 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [] - } - ], - "metadata": {} - } - ] -======= -{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1>Chapter 15: Additional in 'C'<h1>"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.1, Page number: 505<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Allocate memory to pointer variable. \n",
- "\n",
- "import sys\n",
- "\n",
- "#Variable initialization\n",
- "j = 0\n",
- "k = int(raw_input(\"How many number : \"))\n",
- "p = [0 for i in range(0,k)]\n",
- "\n",
- "#in python, all variables are allocated using dynamic memory allocation technique and no\n",
- "#malloc function and pointer concept is available in python.\n",
- "\n",
- "#Read the numbers\n",
- "while j != k:\n",
- " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n",
- " j += 1\n",
- " \n",
- "j = 0\n",
- "\n",
- "#Result\n",
- "sys.stdout.write(\"The numbers are : \")\n",
- "while j != k:\n",
- " sys.stdout.write(\"%d\\t\"%(p[j]))\n",
- " j += 1\n",
- " \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "How many number : 4\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "4\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number 1 = 1\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number 2 = 2\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number 3 = 3\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number 4 = 4\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The numbers are : 1\t2\t3\t4\t"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.2, Page number: 506<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Memory allocation to pointer variable. \n",
- "\n",
- "import sys\n",
- "\n",
- "#Variable initialization\n",
- "j = 0\n",
- "k = int(raw_input(\"How many Number : \"))\n",
- "p = [0 for i in range(0,k)]\n",
- "\n",
- "#in python, all variables are allocated using dynamic memory allocation technique and no\n",
- "#calloc function and pointer concept is available in python.\n",
- "\n",
- "#Read the numbers\n",
- "while j != k:\n",
- " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n",
- " j += 1\n",
- " \n",
- "j = 0\n",
- "\n",
- "#Result\n",
- "sys.stdout.write(\"The numbers are : \")\n",
- "while j != k:\n",
- " sys.stdout.write(\"%d\\t\"%(p[j]))\n",
- " j += 1\n",
- " "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "How many Number : 3\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number 1 = 45\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number 2 = 58\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Number 3 = 98\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The numbers are : 45\t58\t98\t"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.3, Page number: 507<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Reallocate memory \n",
- "\n",
- "import sys\n",
- "\n",
- "#Variable Initialization\n",
- "str1 = \"India\"\n",
- "\n",
- "#in python, value tagged method is used for data storage instead of memory tagging.\n",
- "#no realloc function is in python\n",
- "\n",
- "#Result\n",
- "sys.stdout.write(\"str = %s\"%(str1))\n",
- "str1 = \"Hindustan\"\n",
- "sys.stdout.write(\"\\nNow str = %s\"%(str1))\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "str = India\n",
- "Now str = Hindustan"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.4, Page number: 508<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Display unused memory \n",
- "\n",
- "import psutil\n",
- "\n",
- "psutil.phymem_usage()\n",
- "\n",
- "#There is no coreleft() function in python. phymem_usage function in the module psutil gives the \n",
- "#status and usage of physical memory in python."
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "metadata": {},
- "output_type": "pyout",
- "prompt_number": 6,
- "text": [
- "usage(total=3165270016L, used=987840512L, free=2177429504L, percent=31.2)"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.5, Page number: 510<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Linked list\n",
- "\n",
- "import sys\n",
- "\n",
- "#Variable Initialziation\n",
- "ch = 'y'\n",
- "p = 0\n",
- "q = []\n",
- "\n",
- "#Function Definitions\n",
- "def gen_rate(m):\n",
- " q.append(m)\n",
- " \n",
- "def show():\n",
- " print q\n",
- " \n",
- "def addatstart(m):\n",
- " q.insert(0,m)\n",
- " \n",
- "def append(m,po):\n",
- " q.insert(po,m)\n",
- "\n",
- "def erase(d):\n",
- " q.remove(d)\n",
- " \n",
- "def count():\n",
- " print len(q)\n",
- " \n",
- "def descending():\n",
- " q.sort(reverse=True)\n",
- " \n",
- "#Get choice\n",
- "while ch == 'y':\n",
- " n = int(raw_input(\"1. Generate\\n2. Add at starting\\n3. Append\\n4. Delete\\n5. Show\\n6.Count\\n7.Descending\\nEnter your choice: \"));\n",
- " #There is no switch statement in python\n",
- " if n == 1:\n",
- " i = int(raw_input(\"How many node you want : \"))\n",
- " for j in range(0,i):\n",
- " m = int(raw_input(\"Enter the element : \"))\n",
- " gen_rate(m)\n",
- " show()\n",
- " else:\n",
- " if n == 2:\n",
- " m = int(raw_input(\"Enter the element : \"))\n",
- " addatstart(m)\n",
- " show()\n",
- " else:\n",
- " if n == 3:\n",
- " m = int(raw_input(\"Enter the element and position \"))\n",
- " po = int(raw_input(\"Enter the element and position\"))\n",
- " append(m,po)\n",
- " show()\n",
- " else:\n",
- " if n == 4:\n",
- " d = int(raw_input(\"Enter the number for deletion : \"))\n",
- " erase(d)\n",
- " show()\n",
- " else:\n",
- " if n == 5:\n",
- " show()\n",
- " else:\n",
- " if n == 6:\n",
- " count()\n",
- " else:\n",
- " if n == 7:\n",
- " descending()\n",
- " show()\n",
- " else:\n",
- " sys.stdout.write(\"Enter value between 1 to 7\")\n",
- " \n",
- " ch = raw_input(\"Do u wnat to continue (y/n)\")\n",
- " "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "1. Generate\n",
- "2. Add at starting\n",
- "3. Append\n",
- "4. Delete\n",
- "5. Show\n",
- "6.Count\n",
- "7.Descending\n",
- "Enter your choice: 1\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "How many node you want : 4\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Enter the element : 1\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Enter the element : 5\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Enter the element : 4\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Enter the element : 7\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[1, 5, 4, 7]\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Do u wnat to continue (y/n)n\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.6, Page number: 518<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Draw circle, line and arc using graphics function\n",
- "\n",
- "%matplotlib inline\n",
- "import pylab\n",
- "import matplotlib.pyplot as plt\n",
- "\n",
- "#Tkinter package is used for graphics\n",
- "#Give proportionate sizes to draw\n",
- "#draw circle\n",
- "circle2=plt.Circle((.5,.5),.2,color='b')\n",
- "fig = plt.gcf()\n",
- "fig.gca().add_artist(circle2)\n",
- "\n",
- "\n",
- "#draw line\n",
- "figure()\n",
- "pylab.plot([210,110],[150,150])\n",
- "\n",
- "#Draw ellipse\n",
- "figure()\n",
- "from matplotlib.patches import Ellipse\n",
- "e = Ellipse(xy=(35, -50), width=10, height=5, linewidth=2.0, color='g')\n",
- "fig = plt.gcf()\n",
- "fig.gca().add_artist(e)\n",
- "e.set_clip_box(ax.bbox)\n",
- "e.set_alpha(0.7)\n",
- "pylab.xlim([20, 50])\n",
- "pylab.ylim([-65, -35])"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Populating the interactive namespace from numpy and matplotlib\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stderr",
- "text": [
- "WARNING: pylab import has clobbered these variables: ['pylab', 'e']\n",
- "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
- ]
- },
- {
- "metadata": {},
- "output_type": "pyout",
- "prompt_number": 61,
- "text": [
- "(-65, -35)"
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGXlJREFUeJzt3X9w1HV+x/HXQjaQREB+2BzsZg5IIgmNBNogclS76Hlg\nnEtbYe5Cb+4UmZhj6ng6bc+rthp0RsE/buqZaxumqFUhhyPOxRlhvUJZ7QhcPFHwgKEBQTfxpAbB\nYICQbL7941MDMbDZJLv73f3s8zGzE5b95LtvPiSvfPL5fr6fr8dxHEcAAKuMcrsAAED8Ee4AYCHC\nHQAsRLgDgIUIdwCwEOEOABYaNNzvvvtu5efn67rrrrtim/vuu0/FxcUqLy/Xe++9F9cCAQBDN2i4\nr1y5UsFg8Iqvb926VUeOHFFLS4vWr1+v1atXx7VAAMDQDRruN954oyZOnHjF11977TXdeeedkqQF\nCxbo9OnTOnHiRPwqBAAM2Yjn3Nva2lRQUND33O/3q7W1daSHBQCMQFxOqH59BwOPxxOPwwIAhilr\npAfw+XwKh8N9z1tbW+Xz+Qa0Kyoq0tGjR0f6dgCQUQoLC3XkyJEhf96IR+5VVVV64YUXJEl79uzR\n1Vdfrfz8/AHtjh49KsdxeDiOHn30UddrSJUHfUFf0BfRH8MdFA86cl+xYoXefPNNtbe3q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rlzp5599lm9/fbbCazIPbH0\nxf3336+1a9fK4/HIcZwBXyM2iKUfuru7tXfvXu3YsUNnz57VwoULdcMNN6i4uDgJFSZPLH3xxBNP\naO7cuQqFQjp69KhuvfVW7du3T+PGjUtChalnqLkZ13CP50VP6S6WvpCk/fv3q6amRsFgMOqvZeks\nlr549913VV1dLcmcSNu2bZu8Xq+qqqqSWmsixdIPBQUFmjJlinJycpSTk6ObbrpJ+/btsy7cY+mL\nXbt26eGHH5ZkLuSZMWOGDh8+rIqKiqTWmgqGlZtxOyPgOE53d7czc+ZM59ixY05XV9egJ1R3795t\n7UnEWPrio48+cgoLC53du3e7VGVyxNIXl7rrrrucLVu2JLHC5IilHw4dOuTccsstTk9Pj9PZ2emU\nlZU5Bw4ccKnixImlLx544AGnrq7OcRzH+fTTTx2fz+ecPHnSjXKT4tixYzGdUI01N+M6cueip4ti\n6YvHHntMp06d6ptn9nq9am5udrPshIilLzJBLP1QUlKipUuXas6cORo1apRqamo0e/ZslyuPv1j6\n4qGHHtLKlStVXl6u3t5ePfXUU5o0aZLLlSfGihUr9Oabb6q9vV0FBQVas2aNuru7JQ0/N7mICQAs\nxG32AMBChDsAWIhwBwALEe4AYCHCHQAsRLgDgIUIdwCwEOEOABb6P0Anxcrjn3WCAAAAAElFTkSu\nQmCC\n",
- "text": [
- "<matplotlib.figure.Figure at 0x707a9f0>"
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEACAYAAABS29YJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF0tJREFUeJzt3XtsU+f9x/GPM8JWljCCBiaKU2JugzR28AK0MKXzr8CA\nomzrZdVcAVUcpIr+tZoxtj+gttZCCIuqNtO2TKIwiXX8g4BpgghP4ACquCdKRqVBWaIkkKVLQ6YR\nKNfn90dVizQ3nDi0yfN+SZYOz3l8zvfblk9OnuNTO4wxRgCAUS3lyy4AADD8CHsAsAB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sXLzYzZ840S5cuNdeuXYvPf+utt8z06dPNd77znfinBr7Kvtjfjh07zIwZM8zj\njz9u5s6da+bOnWvWrVsXnz9S+xs7dmz839+D3G53POyNGVn99dbb7du3zapVq0xeXp757ne/a44e\nPRqfP5J6M6b3v3tnzpwxCxYsMPn5+eapp54y58+fj88faf0dP37cOBwOk5+fH/+7dujQoVGTL731\nd/DgwaTlCw9VAYAF+FpCALAAYQ8AFiDsAcAChD0AWICwBwALEPYAYAHCHgAsQNgDgAX+Hze/zGOH\nVK27AAAAAElFTkSuQmCC\n",
- "text": [
- "<matplotlib.figure.Figure at 0x7349d10>"
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG+xJREFUeJzt3X1QU2e+B/DvyQtJgCDvCskqCLSIIqR2lbvjbGOVTmd2\naFnb8Y6dup1R94/6z3Zpbx1nR4t3inbtujtdp7rM1umt/af27lwLu1s7Mlsz1O5aFHGtUgUEWt5i\nhcBKgBCSPPcPylkp6EgSCTx+P8MZT56QnN/jo9/zkpNzFCGEABERSUsT6QKIiOj+YtATEUmOQU9E\nJDkGPRGR5Bj0RESSY9ATEUku6KDfvXs3CgoKUFhYiPXr16OjowMA0N7eDpPJBJvNBpvNhh07doSt\nWCIimjkl2PPoBwcHYTabAQCHDh3CP//5T7zzzjtob29HSUkJvvzyy7AWSkREwQl6i34i5AHA7XYj\nOTk5LAUREVF46UJ58a9+9Su8//77iI6OxtmzZ9X2trY22Gw2LFiwAK+//jrWrl0bcqFERBScux66\nKS4uhtPpnNK+b98+lJSUqI/feOMNXLt2De+++y68Xi+GhoaQkJCACxcuoLS0FFeuXJm0B0BERLNI\nhMHXX38tli9fPu1zdrtd1NfXT2nPysoSADhx4sSJ0wymrKysGWd00Mfom5ub1fmqqirYbDYAQG9v\nL/x+PwCgtbUVzc3NW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j008/\nxZYtW6QZv+n697Of/Uya8QOAtLQ0AOPXE/vpT3+Kurq6GY/frAS9EALbtm1DXl4eXnrpJbX9qaee\nwnvvvQcAeO+999SAnG/u1L+enh51/sSJE8jPz49EeSHp7e1Vd3tHRkZQU1MDm80mzdjdqX+3X/pj\nvo4dAOzbtw8dHR1oa2vDBx98gMcffxzvv/++NOM3Xf+OHTsmxf89YPxEgcHBQQDA0NAQTp06hfz8\n/JmP34y/SxuEzz77TCiKIgoKCkRhYaEoLCwUJ0+eFH19fWL9+vUiJydHFBcXi/7+/tkoJ+ym69/H\nH38stmzZIvLz88XKlSvF008/LZxOZ6RLnbFLly4Jm80mCgoKRH5+vjhw4IAQQkgzdnfqnwxj930O\nh0OUlJQIIeQZv9udPn1a7d/zzz8vxfi1traKgoICUVBQIJYvXy727dsnhJj5+PELU0REkuOtBImI\nJMegJyKSHIOeiEhyDHoiIskx6ImIJMegJyKSHIOeiEhyDHoiIsn9P/ox1+CwlWHmAAAAAElFTkSu\nQmCC\n",
- "text": [
- "<matplotlib.figure.Figure at 0x78994d0>"
- ]
- }
- ],
- "prompt_number": 61
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.7, Page number: 519<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Draw boxes and fill with different designs.\n",
- "\n",
- "%pylab\n",
- "#Tkinter package is used for graphics\n",
- "from matplotlib.patches import Rectangle\n",
- "from matplotlib.collections import PatchCollection\n",
- "\n",
- "e = Rectangle(xy=(35, -50), width=10, height=5, linewidth=2.0, color='b')\n",
- "fig = plt.gcf()\n",
- "fig.gca().add_artist(e)\n",
- "e.set_clip_box(ax.bbox)\n",
- "e.set_alpha(0.7)\n",
- "pylab.xlim([20, 50])\n",
- "pylab.ylim([-65, -35])\n",
- "\n",
- "#There are no different automatic fill styles. user should create the styles."
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "i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xNrd8/Pf/5z9fb26ubNm+ro6NArr7xiZv2k6fNrbGw0s36FhYXq7e3V\nihUrUvvSXb8FOaP/+te/rvLycknSgw8+qA0bNmhsbEwdHR167rnnJEnPPfec3nnnnYUYTtbNNj9J\nsnBlbNmyZZKkyclJ3b17V/n5+WbWTpp5fpKNtZOk0dFRvfvuu3r++edTc7K0fjPNz/d9M+snTf+z\nmO76LfgvNRsZGVFfX5+2bduma9euafXq1ZKk1atX69q1aws9nKy7N7+KigpJX/w+oLKyMu3du/e+\nfXv873//W+Xl5Vq9enXqEpWltZtpfpKNtZOkl156ST/96U8VCv3fX3dL6zfT/BzHMbN+juOosrJS\nW7Zs0a9+9StJ6a/fgob+1q1bevrpp/Xaa69N+wKV4zhyHGchh5N1t27d0ve//3299tprevDBB/XC\nCy9oeHhY58+f18MPP6yXX355sYcYSCgU0vnz5zU6Oqru7m6dOXNmyuP3+9r99/xisZiZtfv973+v\nVatWyXXdWc9w7+f1m21+VtZPkv74xz+qr69Pp0+f1i9/+Ut98MEHUx7/Kuu3YKH/17/+paefflq7\nd+9WdXW1pC/+S3Tvm7fj4+NatWrVQg0n6+7N79lnn03Nb9WqValFeP755xWPxxd5lJlZvny5vvvd\n76q3t9fU2t1zb349PT1m1u5Pf/qTOjo6VFhYqF27dun999/X7t27zazfTPP7wQ9+YGb9JOnhhx+W\n9MXvE/ve976neDye9votSOh939fevXtVUlKiF198MbX/ySef1JtvvilJevPNN1OBvN/MNr/x8fHU\n7VOnTqm0tHQxhpeRiYmJ1Nvef/zjH+rq6pLrumbWbrb5fflXf9yvaydJhw8fViKR0PDwsN5++219\n+9vf1ltvvWVm/Waa34kTJ0z83ZO++KDAzZs3JUm3b99WZ2enSktL01+/tL9LG8AHH3zgO47jl5WV\n+eXl5X55ebl/+vRp/29/+5u/c+dOf926dX40GvVv3LixEMPJupnm9+677/q7d+/2S0tL/c2bN/tP\nPfWUn0wmF3uoabtw4YLvuq5fVlbml5aW+kePHvV93zezdrPNz8La/bdYLOZXVVX5vm9n/b7szJkz\nqfk9++yzJtZvaGjILysr88vKyvyNGzf6hw8f9n0//fXjC1MAYBz/K0EAMI7QA4BxhB4AjCP0AGAc\noQcA4wg9ABhH6AHAOEIPAMb9B4rEH5DkLOd4AAAAAElFTkSuQmCC\n",
- "text": [
- "<matplotlib.figure.Figure at 0x7373590>"
- ]
- }
- ],
- "prompt_number": 72
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.8, Page number: 520<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Display text in different size, font, vertically and horizontally \n",
- "\n",
- "%pylab\n",
- "\n",
- "from pylab import *\n",
- "\n",
- "#Tkinter package is used for graphics\n",
- "# set limits so that it no longer looks on screen to be 45 degrees\n",
- "xlim([-5,5])\n",
- "\n",
- "# Locations to plot text\n",
- "l1 = array((1,1))\n",
- "l2 = array((5,5))\n",
- "\n",
- "# Rotate angle\n",
- "angle = 90\n",
- "trans_angle = gca().transData.transform_angles(array((45,)),\n",
- " l2.reshape((1,2)))[0]\n",
- "\n",
- "# Plot text\n",
- "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 25)\\n\\n',fontsize=25,\n",
- " rotation=0)\n",
- "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 16)',fontsize=16,\n",
- " rotation=0)\n",
- "th1 = text(l1[0],l1[1],'Hello(Vertical Text)',fontsize=16,\n",
- " rotation=angle)\n",
- "show()"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Using matplotlib backend: module://IPython.kernel.zmq.pylab.backend_inline\n",
- "Populating the interactive namespace from numpy and matplotlib\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stderr",
- "text": [
- "WARNING: pylab import has clobbered these variables: ['power', 'draw_if_interactive', 'random', 'fft', 'angle', 'linalg', 'info']\n",
- "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAA5AAAATCCAYAAADLrQlWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XeUFFXC/vGnezIwMMOQBASGLIIoAgKSg+ASX0AQV5II\nKuqCArqGV4FFF8EAiLrKLkFAMawSDSgZBFxAlrQknSGpIBJkkORwf3/w63q7Ot6BIa3fzzl9znTV\nrVu3blWHZ6r6lscYYwQAAAAAQBTey90AAAAAAMDVgQAJAAAAALBCgAQAAAAAWCFAAgAAAACsECAB\nAAAAAFYIkAAAAAAAKwRIAMAF83q9rseUKVNc8ydPnhxU5mLbsmWLYmNjnfUNHTr0oq/zcunVq5er\nb5s0aXK5m/RfY/HixUHH7u7duy93sxDGxdhfl/r1lZ2drTfeeEMNGzZUWlqaYmJiLul755WM12Pu\nmjhxoqsvv/jiC6vlYi9yuwAAuahx48ZaunSpa9rZs2dDls3MzFTZsmVd03r27KlJkyZdtPb5eDye\nC5qfG4YMGeL0TXJysgYOHBhUJvDLWKNGjbRo0aKQ9U2ePFn33HOPa9qkSZPUs2fPXGpx7rkU/Xu5\njBkzRkeOHHGeN2nSRI0aNbpk689p35YpU+aCvuCWLl1aGRkZ5718bpg8ebIyMzOd5zfddJPat29/\n+RqUA6H2165du1zvgx6PRwMHDlSBAgXOu87c1KVLF3388ceXZd3na+bMmVq/fr3zPD09/ZK8N16p\n/RHNtm3btHTpUi1dulSbNm3Srl27dOzYMcXHx6tIkSK68cYb1blzZ3Xt2lWxsaHjWqjPpEjmzJmj\n1q1bu6b16NFDw4cPd96jhgwZom+++SZqvxIgAeAqltMPz6v1wzanFi5cqE8//dR5/sADDyglJSXq\ncldrf/racaW052IaM2aMK5B5PJ5LGiAvtSthn06ePNn1j6uePXte8QHS4/HIGBNyXkZGhoYPH+6a\n1rt3b+sAeTEtX748ZHiMtD1XgpkzZ+rtt992njdq1OiiBsgrvT8i+eijj9S5c+eQ806cOKFdu3Zp\n165dmjVrlkaOHKnZs2crPT39gtcb6r0kNjZWjz32mB566CFJ0oYNGzR58mT17t07Yl0ESADAf52R\nI0c6f3s8HvXt2/cytubie/HFFzVs2DDneWJi4mVszaV1JQSsSDweT8g2hvryG1juSv2CfCX3ed26\ndV1nSyWpRIkSrueB7b+Stmf16tWu57GxsXr//fdVvXp1xcTEXKZW5dzF6lOb/XulC3XVULhAvHnz\nZrVo0UKbNm2yel8P914TaX90795dgwcP1smTJyVJo0aNIkACAH5fdu7cqS+//NJ5XqtWLZUrV+4y\ntujiS0tLU1pa2uVuxmVxpYYsn+XLlys7O9s1zRij+vXra9++fc60kiVLavny5UHLh7t87XK6kvs8\nISFBpUqVilgmVPuvlG3KyspyPS9RooQ6dOhwmVpz/i5Wf9rs36tF/vz5ddddd+n2229XhQoVdOTI\nEc2cOVOvvPKKzpw545T77rvvNHnyZN1///0R63vxxRfDntmUpCJFioScnpycrDZt2ujDDz+UdO7y\n2kWLFkX8re/v+5e4AADHzp07NWTIENWqVUtpaWmKi4tT4cKFVb9+fT333HM6fPjwJWnH4cOHNXr0\naDVv3lzFihVTQkKCkpOTVbFiRfXo0UPz58+PuPzf//531/OuXbtezOaGtWTJEvXp00fXXXedChQo\noPj4eBUtWlSNGzfWc889p4MHD4ZdNtSgRL/88oueeuopValSRXny5HENHhFtkI/A+dEeS5YsCWqT\nMUZz5szRXXfdpfLlyys5OVkJCQkqXry4WrZsqbFjx+rYsWMhtyczMzPkOo4ePaqnn35aVapUUVJS\nklJSUtS8eXN9/vnnYfsk8PeEw4YNCztAU3Z2tqZPn65BgwapWbNmqlSpkgoXLqy4uDglJyerXLly\n6tixo6ZOner6wpabSpQooVKlSrkepUuXDjqbFBsbG1SuVKlSKl68uKTg4ykhIUElSpRQmzZtNGnS\nJP32229B6/773//u6pfY2NigM1ynT59W9erVXeWaNm0qY4zKlCkjr9cb9LvrKVOmnPdAJoH7q1mz\nZkFlSpUq5czPkydP0L7p3r27q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AgUeIVKqNs1+SNAAsBVxBNwX0KbD+LAZULNHz58uHbs2KEnn3xS9erVU5EiRRQfH6+k\npCRde+21at68uZ566iktWbLEdZmL7XoC2xuuLR07dtR3332nF154QU2aNFHRokUVHx+vfPnyqXz5\n8rr77rv16aef6osvvgg7hHmFChVcXy5Xr14d9nciNv0TahsilU9JSdGsWbO0cOFC9e7dW5UqVVL+\n/PkVFxenwoULq2HDhvrLX/6ijIwM3X333RfcrlBti1ZftEegkiVLavny5Zo5c6buvPNOpaenK2/e\nvIqPj1exYsXUokULvfLKK/r2228jXrpqcyxGK1O6dGmtWrVKd911l0qUKKH4+Piwy9SsWVPr1q1T\nz549Vbx4cae9HTt21LJly9SnT5+o7bI9dnPKpt+lcwH+448/1ooVK3TfffepWrVqSk1NVWxsrJKT\nk1WhQgW1b99eo0eP1ubNm12/qerfv78yMjKc+kuUKKHXX3/dVX/r1q2dyxp95e655x7XPeDy58+v\nr776Sv369VN6eroSEhJyfM/ZUHyvU/+6ypYt6xroJSEhQbVr1w7qq3AB0nZ/DRw4UNOmTVODBg2U\nkpIir9cbdptsX182643G9n1GOtc3b731ltauXav+/furWrVqSklJUVxcnNLS0lS7dm39+c9/1o4d\nO8IOBmNzDNq0KSYmRgsWLNCgQYNUqVIlJSYmhi0/btw4TZ8+Xf3791edOnVUtmxZJScnKy4uTgUL\nFlTNmjX16KOPauPGjUH3mI3Wz6HampP3utz6PIwkp20M1c7k5GTt379f7733nu6//37Vrl3baWdi\nYqKKFy+uli1b6uWXX9bOnTvVqVOnsO355ZdfXP80qlSpUtTb43jMxfpXGgAAl8nChQtdg8M89thj\nIQcUAADg92z8+PH605/+5DyfOHFi0CBEgQiQAID/Sq1bt3ZGHU1OTlZmZqZSU1Mvc6sAALgynDlz\nRuXLl9eePXskSdWrV9c333wTdTkuYQUA/FcaPXq0YmJi5PF4lJWVpXHjxl3uJgEAcMWYOnWq9uzZ\n41wqO3r0aKvlOAMJAAAAALDCGUgAAAAAgBUCJAAAAADACgES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58uTp16qRi\nxYopLi5ORYoUUa1atfTnP/9ZgwYNctr/9ddfy+PxaNSoUSpXrpyKFy+u1157TZK0detWPfroo069\nU6dOVcOGDVWgQIGoAyn5812a6vF4XL+78x+cqHHjxkHbFqpPbr75Zo0bN07lypVTfHx8yDZEOo5s\n2htpf/ztb3/TpEmTVLduXSUnJys+Pl7lypXTwIEDtWbNGtclrOH6KNz0SP37xBNPqEGDBs59PfPm\nzev0xZ/+9Kew22/+/xnaaK+TIkWKaM2aNXrsscdUuXJlJSYmKjk5WZUqVdIf//hHzZgxI0f9Fmld\nPu+++65eeOEFXXfddUpISFCBAgV022236YsvvtDdd9/tKutbf4ECBdS1a9eobQF+7zzG8GthAMDF\nd+utt2rlypXq1q2bpk+ffrmbAwA6c+aMypcvrz179ujJJ5+M+ptPAARIAMAlsmrVKtWrV0+xsbHa\nunWr9W8DAeBimThxou69914VLVpUO3fudEaxBRAeARIAAAAAYIXfQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAK\nARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIk\nAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAA\nAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAA\nACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABW\nCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAg\nAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIA\nAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAA\nAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACw\nQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUA\nCQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIA\nAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAA\nAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACA\nFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsE\nSAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAK\nARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIk\nAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAA\nAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAA\nACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABW\nCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAg\nAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIA\nAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAA\nAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACw\nQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUA\nCQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIA\nAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAA\nAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACA\nFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsE\nSAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAA8P/Yu/cgver6juOfZ3O/SLgnyiUkUiiNXGJoKwq4toNVLgrDRa3EWJCa\ncBEGREp1KNG0A5V2qI46VQyYUrENxtRQEcaWQImkViUhVq3BxAQZIGQwlEsW4ubpHzQLayD5xjH7\nHNjX658s5znJftmZ/c2+93fOeaBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIB\nCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACg\nREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEA\nACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhI\nACrWxdwAACAASURBVAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACU\nCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAA\nACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJ\nAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBE\nQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAA\nKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgA\nAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUC\nEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABA\niYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIA\nAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQ\nAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABK\nBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAA\ngBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAE\nAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAi\nIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAA\nlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQA\nAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIB\nCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACg\nREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEA\nACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhI\nAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAl\nAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAA\nQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREAC\nAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgR\nkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAA\nSgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIA\nAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImA\nBAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQ\nIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAA\nAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQk\nAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIAS\nAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAA\noERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiAB\nAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQI\nSAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAA\nJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkA\nAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERA\nAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAo\nEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAA\nAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQIS\nAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlA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BAIBfh4CEhlqzZk1arVb233//To8CAABJCu8D+aEPfSjjx49PV1dXTjrppJc8\nb+HChTnwwAMzatSovOUtb8nPfvaz3+ScMOhMmjTpJS9jnTRpUiZPnjzAEwEAMNhtNyBbrVbe8573\n9H38Yh5++OG8+93vzq677pprrrkm3/ve9zJjxozf7KRAkqTdbmfNmjVZs2ZNp0cBAGCQ2e77QP7d\n3/1d1qxZk0996lMvec5NN92UZ599NpdffnlOPfXU/Od//mduvPHGrFq1yi4J7IDHH388jz/+eF54\nZfnatWvTbrf7foGzbNmyJMmQIUM6MiMAAIPXdgMySbZ3m+Tq1auTJPvss0+SZN999+07LiCh7tpr\nr83s2bP7YrHdbm91GeuW78fXvOY1Az4fAACDWykgd9S2gvOII47I8uXLd8anhVeMF34PvdT305aH\n7DA4HH744X27zwAAnfJrB2RPT0+GDBmSYcOG9e0yPvDAA3nDG96QBx98MEledPdx+fLl293RHAhX\nXnllrrzyyk6P0Qi+Fs/r9Ndi4cKFWbhwYZJk3rx5SZIZM2b0fc+0Wq3sueeeecMb3pBTTz11p87S\n6a9FkzTha+GXBQBAE2w3IP/1X/81P/jBD5I8dy/WF7/4xRx77LE5+OCDM2XKlKxYsSLvfve782d/\n9me5+uqr8/DDD+drX/tajjnmmO2+ETrQ38knn5yTTz45yfMBef3113dyJAAA6LPdp7Bec801ufzy\ny9NqtXLfffflT//0T/Ptb387yfO/EZ8wYUJuuummbNiwIZdeemmmTZuWG264YacODq90GzZsyObN\nm1/y9VWrVg3gNAAAUAjIO+64I5s3b05vb2/fnzNmzMjmzZtz33339Z13yimn5P77709PT08WL17c\n+N3H7u7uTo/QGL4Wz2vS1+KII47I0qVLX/S1L33pS5k6depO/fxN+lp0mq8FAMBzWu0BviGx1Wo1\n4h5IaLqurq4MHTo0f/EXf5GPfvSjSZ57m4+ZM2fmn/7pn9JqtdLb29vhKRko1k4AoAkEJDTU+PHj\n8+ijjyZJjj322HzoQx/KxRdfnLVr1yZJDj30UE80HkSsnQBAEwhIaKhHH300s2bNyoIFC/od7+rq\nyiWXXJJPfOITGT58eIemY6BZOwGAJhCQ0HDveMc7csstt/T990c/+tF84hOf6OBEdIK1EwBogu0+\nRAfojLVr1+a4447rF49J8ld/9Vf54Ac/mKeffrpDkwEAMFjZgYSGGjduXJ544okkyYknnpiLL744\n559/fn74wx8mSSZPnpz777+/kyMygKydAEAT2IGEhnriiScycuTIfPrTn87Xv/71dHd357vf/W5m\nzZqVJFm9enWHJwQAYLCxAwkNdeihh+YrX/lKpkyZstVrixYtytlnn51169Z1YDI6wdoJADSBgISG\neuaZZzJixIiXfP2hhx7Kq1/96gGciE6ydgIATTC00wMAL25LPN577725/fbb89hjj+Xqq6/OmjVr\n0mq1xCMAAAPODiQ02AUXXJDPfOYzSZ773unt7c3RRx+de+65J3Pnzs2MGTM6PCEDxdoJADSBh+hA\nQ11//fV98fhCs2bNSrvdzqJFizowFQAAg5mAhIb63Oc+lyQ544wz+h1/85vfnCRZvnz5gM8EAMDg\n5hJWaKgxY8akp6cn69aty1577dV3CeumTZsyYsSIjB49Ok8++WSnx2SAWDsBgCawAwkNtSUWRo4c\n2e/4mjVrkjwXFAAAMJAEJDTUa1/72rTb7cybN6/v2EMPPZQLLrggSXLggQd2ajQAAAYpAQkN9a53\nvStJct555yV5bkdy3333zW233ZYkOf300zs2GwAAg5N7IKFBZs+enVarlSuuuCI9PT3p7u7Od77z\nna3OO/LII3PXXXdtdXkrr1zWTgCgCQQkNEhXV1ffw3KS5Omnn86nPvWpLFq0KOvWrcv48eNz4okn\n5sILL8yoUaM6PC0DydoJADSBgIQG+dWAhC2snQBAE7gHEgAAgJKhnR4A6K/dbuess84qnTt37tyd\nPA0AADzPJazQIF1d9YsCXOo6uFg7AYAmcAkrvEyJCQAABppLWKFhWq1W5s6du91AbLVaAzQRAAA8\nxyWs0CCewspLsXYCAE3gElYAAABKBCQ0jF0mAACayj2Q0CD//u//7t5GAAAayz2QAC8D1k4AoAlc\nwgoAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJRs9208lixZklmzZuUnP/lJpkyZkuuuuy5Tp07t\nd0673c7FF1+cr3zlK9mwYUMOOOCAzJ49O2ecccZOGxxeif7kT/5kh97GY+7cuTtxGgAA6G+bb+PR\n09OTAw44IGPGjMmll16aOXPmZMSIEVm5cmW6up7fvLz11ltzwgknZNq0aXn/+9+fyy+/PL/85S/z\nxBNPZMiQIf0/oUfRw0t64ffV9rRarfT29u7EaWgSaycA0ATb/Gn11ltvzbp163Luuedm5syZOfvs\ns7N69eosXry433m77rprkuS1r31t/vAP/zC77LJLdtlllx36YRjYMWICAICBts1LWFevXp0k2Wef\nffr9ueX4FkcddVSuuOKKfPzjH88///M/Z+TIkbnlllt26FI8IFm1alWnRwAAgJe03XsgX+ildjy+\n853v5C//8i/zR3/0R5k5c2YuuuiizJgxI//zP/+T0aNHb3X+lVde2fdxd3d3uru7d2hoeKU64IAD\nOj0CDbF48eKtrvYAAOi0bQbk5MmTkyQPPPBAkuTBBx/sO97T05MhQ4Zk2LBhWbx4cXp7ezN9+vS8\n853vzKJFizJ37tz86Ec/yrRp07b6d18YkMC2/eIXv8j999+fjRs3bvXascce24GJGAi/+su12bNn\nd24YAID/t82AfPvb35699947n/vc5zJ27Nh88YtfzKRJk/LmN785Q4cOzZQpU7JixYoccsghSZLP\nfvazeeqpp3LLLbdkxIgRmTRp0oD8T8Ar0aZNm/LBD34w8+bNS7vd3uoKAA/RAQBgoG3zKTcjRozI\n/PnzM3bs2Fx00UWZMGFC5s+f3/dwnC33OJ500kn52Mc+lrVr1+bCCy/MnnvumRtvvDG77777zv8/\ngFeoa665JjfccEM2b978opePe4gOAAADbZtv47FTPqFH0UPJ4YcfnhUrVuSII47IsmXLkiSnnHJK\nvvGNb2TffffN0Ucfneuvv77DUzJQrJ0AQBN4nw1oqPvvvz+tVis333xzkucC4qtf/WpuvvnmrF69\nOu94xzs6PCEAAIONHUhoqOHDh6e3tzfPPPNMRo4cmXa7nSeeeCJdXV0ZPXp03z3IDA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0gIKGhuru702q1cscdd3R6FBrA2gkANIFLWKGBNm7cmLVr12bNmjX58Y9/\n3OlxAAAgiR1IaKxx48blySefzMaNGzN8+PBOj0OHWTsBgCawAwkNddxxx6XdbvfdEwkAAJ1mBxIa\n6u67784pp5yScePGZc6cOZk6dWpGjRrV75z999+/Q9Mx0KydAEATCEhoqK6u/hcItFqtvo/b7XZa\nrVZ6e3sHeiw6xNoJADTB0E4PANT8ajyICQAABpqAhIZ63/vet83XX7gjCQAAA2G7l7AuWbIks2bN\nyk9+8pNMmTIl1113XaZOnbrVeQ888EDOP//8fOtb38qwYcNy4okn5sYbb9z6E7oMC2CHWTsBgCbY\n5lNYe3p6cuqpp+app57Ktddem0ceeSSnnXZaNm/e3O+8drudU045Jf/2b/+Wyy67LJ/85Cez9957\n79TBYTBZt25dfvSjH3V6DAAABrltBuStt96adevW5dxzz83MmTNz9tlnZ/Xq1Vm8eHG/8+644458\n//vfz8UXX5zLLrss55xzTv72b/92Z84Ng8Ldd9+dww8/PBMmTMjrXve6JMm73/3u/MEf/EGWLl3a\n4ekAABhsthmQq1evTpLss88+/f7ccnyLH/7wh0mSm2++OaNHj84uu+yST3/607/xYWEwWbFiRd76\n1rdmxYoV/Y7/zu/8ThYvXpyvfOUrHZoMAIDBaoceovNS998888wzSZLhw4dn4cKF+djHPpaLLroo\nb3vb2/Jbv/VbW51/5ZVX9n3c3d2d7u7uHRkDBoWPf/zj6enpyV577ZVHH3207/g73/nOXHnllbnz\nzjs7OB072+LFi7e62gMAoNO2GZCTJ09O8twDcpLkwQcf7Dve09OTIUOGZNiwYX3nnXDCCTnppJPy\n7W9/OytWrMjPfvaz7QYk8OLuvPPOtFqt3HbbbXn961/fd/zggw9Okvz85z/v1GgMgF/95drs2bM7\nNwwAwP/b5lNYn3nmmUycODGjR4/OpZdemjlz5mTkyJFZuXJlhg4dmilTpmTFihXZuHFjJk2alHHj\nxuUjH/lIrr766jzyyCP56U9/mj333LP/J/QkQSgZPnx4ent709PTkxEjRqTVaqW3tzcbNmzI7rvv\nnuHDh6enp6fTYzJArJ0AQBNs8x7IESNGZP78+Rk7dmwuuuiiTJgwIfPnz09X13N/bcv70I0aNSo3\n33xzRowYkfPPPz9jx47NggULtopHoG6vvfZKkvz3f/93v+Nf+tKXkiTjx48f8JkAABjctvs+kL/x\nT+i36FAyffr0/OM//mMOOOCA/OxnP0uSHHfccfnWt76Vdrud973vfbnhhhs6OiMDx9oJADSBgISG\n+tGPfpRp06a96GWqI0eOzPe+970ccsghHZiMTrB2AgBNsM1LWIHOOeSQQ3L77bf3PTRni4MOOijf\n/OY3xSMAAAPODiQ0SHd3d6ZPn57TTz89u+yyS9/xlStXZt26dRk/fnwOPPDADk5Ip1g7AYAmEJDQ\nIFseUDVy5MiceOKJOfPMM3P88cdn6NAdestWXoGsnQBAEwhIaJAtAflCe+yxR84444yceeaZOeqo\nozowFU1g7QQAmkBAQoN861vfyk033ZQFCxbk8ccf7/daq9XKpEmTcuaZZ+bMM890KesgY+0EAJpA\nQEIDPfvss7n11ltz0003ZdGiRdm4cWO/11utVn73d383S5cu7dCEDDRrJwDQBAISGu6pp57Kv/zL\nv+Smm27K7bffnk2bNiV57nupt7e3w9MxUKydAEATeDIHNNyYMWNy8sknp9VqZcOGDVmyZEmnRwIA\nYJASkNBQmzZtym233ZYvf/nL+frXv56NGzf224GyGwUAwEATkNAg7XY7d955Z7785S/nq1/9an7x\ni19sdc6kSZPy3ve+N9OnT+/AhAAADGYCEhpkv/32y0MPPbTV7uLuu++e008/PdOnT88b3/jGDk0H\nAMBg5yE60CAvfB/IESNG5IQTTsj06dNz/PHHZ9iwYR2cjE6zdgIATWAHEhrmmGOOyfTp03P66adn\n3LhxnR4HAAD6CEhokNWrV2fixImdHgMAAF5U1/ZPAQbKr/O+jqtWrdoJkwAAwNYEJDTIwQcfnDPP\nPDN33XXXds+988478973vje//du/PQCTAQCAh+hAo2x5iE6r1cqrX/3qvOlNb8phhx2WPffcM0ny\n6KOP5r777suSJUvy8MMP930vbd68uWMzMzCsnQBAEwhIaJClS5fmkksuyT333FM6/6ijjsrf/M3f\n5A1veMNOnoxOs3YCAE0gIKGBlixZks9//vO5/fbb88gjj/R7bfz48XnrW9+aD3zgAznmmGM67JKU\ndAAAD19JREFUNCEDzdoJADSBgISGe+CBB/Lwww8neS4e999//w5PRCdYOwGAJhCQAC8D1k4AoAm8\nDyQ03D333JNvfOMbefTRR7P33nvnhBNOyO///u93eiwAAAYhO5DQYDNnzsznP//5fsdarVY++MEP\n5rOf/WyHpqITrJ0AQBMISGioG264IWedddZLvn799ddnxowZAzgRnWTtBACaoKvTAwAvbsvO48SJ\nE3PttddmwYIFufbaazNx4sR+rwMAwECxAwkN9apXvSpPP/10li1blkMPPbTv+A9+8IMcdthhedWr\nXpXHH3+8gxMykKydAEAT2IGEhnr22WeTJPvtt1+/4/vuu2+/1wEAYKAISGio/fbbL+12O5dcckk2\nbNiQJNmwYUM+/OEPJ3k+JAEAYKAISGiok046KclzD8vZY489Mm7cuOyxxx6ZO3duv9cBAGCguAcS\nGmr9+vU58sgjs3bt2q1emzhxYr773e9mjz326MBkdIK1EwBoAjuQ0FB77rlnli5dmrPPPjsTJkzI\nkCFD8prXvCbnnHNOli5dKh4BABhwdiABXgasnQBAE9iBBAAAoGRopwcAntfV1ZVWq7Xd89rtdlqt\nVnp7ewdgKgAAeI6AhIapXqbockYAAAbadgNyyZIlmTVrVn7yk59kypQpue666zJ16tQXPffRRx/N\nIYccksceeyyf/OQnc8kll/zGB4ZXsmOPPbZ8r1tlpxIAAH6TthmQPT09OfXUUzNmzJhce+21mTNn\nTk477bSsXLkyXV1b3z554YUXpqenJ4kfbuHXsXjx4k6PAAAAL2mbD9G59dZbs27dupx77rmZOXNm\nzj777KxevfpFf8j9xje+kVtuuSWXXXbZzpoVAACADtrmDuTq1auTJPvss0+/P7cc3+LJJ5/Mueee\nm6uuuipjxozZGXPCoDB79uwd2r2/4oorduI0AADQ3w49ROel7su6+uqrM3r06Bx33HH52te+liRZ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7Xz84x/f6vwrrrhiwGYDAIBWe4Af5dhqtTw9El5CV1f9ogAP1hlcrJ0AQBO4hBVepsQEAAADzSWs\n0CA7cknqCy91BQCAgeASVoCXAWsnANAELmEFAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQA\nAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJSUAnLJkiU57LDDMnLkyEybNi33\n3nvvVufcc889eeMb35jddtstu+22W0477bSsX7/+Nz4wAAAAnbHdgOzp6cmpp56ap556Ktdee20e\neeSRnHbaadm8eXO/81auXJm99947f/3Xf53jjz8+CxYsyEc+8pGdNjgAAAADa7sBeeutt2bdunU5\n99xzM3PmzJx99tlZvXp1Fi9e3O+897znPVm4cGHOOeec/P3f/32S5Ic//OFOGRoAAICBt92AXL16\ndZJkn3326ffnluNbDBs2rO/jb37zm0mSY4899jczJQAAAB03dEf/Qrvd3ubrS5YsyVlnnZUjjzwy\nV1555Yue88Lj3d3d6e7u3tExAF7RFi9evNWVHgAAnbbdgJw8eXKS5IEHHkiSPPjgg33He3p60tXV\nleHDhydJ7rrrrpxwwgk56KCDctttt2X06NEv+m++VFgC8Jxf/eXa7NmzOzcMAMD/a7W3s6X4zDPP\nZOLEiRk9enQuvfTSzJkzJyNHjszKlSszdOjQTJkyJStWrMj3v//9HHPMMUmSa665JrvttlvGjh2b\nE088sf8nbLW2u4sJQH/WTgCgCbZ7D+SIESMyf/78jB07NhdddFEmTJiQ+fPnp6vrub/aarWSJPfd\nd182btyYnp6enHfeefnjP/7jfOhDH9q50wMAADBgtrsD+Rv/hH6LDrDDrJ0AQBNsdwcSAAAAEgEJ\nAABAkYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBE\nQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAA\nKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABA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yPupgkAAAAAElFTkSuQmCC\n",
- "text": [
- "<matplotlib.figure.Figure at 0x792e430>"
- ]
- }
- ],
- "prompt_number": 95
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.9, Page number: 521<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Display status of mouse button pressed \n",
- "\n",
- "from Tkinter import *\n",
- "from tkFileDialog import askopenfilename\n",
- "import Image, ImageTk\n",
- "\n",
- "if __name__ == \"__main__\":\n",
- " root = Tk()\n",
- "\n",
- " #setting up a tkinter canvas with scrollbars\n",
- " frame = Frame(root, bd=2, relief=SUNKEN)\n",
- " frame.grid_rowconfigure(0, weight=1)\n",
- " frame.grid_columnconfigure(0, weight=1)\n",
- " xscroll = Scrollbar(frame, orient=HORIZONTAL)\n",
- " xscroll.grid(row=1, column=0, sticky=E+W)\n",
- " yscroll = Scrollbar(frame)\n",
- " yscroll.grid(row=0, column=1, sticky=N+S)\n",
- " canvas = Canvas(frame, bd=0, xscrollcommand=xscroll.set, yscrollcommand=yscroll.set)\n",
- " canvas.grid(row=0, column=0, sticky=N+S+E+W)\n",
- " xscroll.config(command=canvas.xview)\n",
- " yscroll.config(command=canvas.yview)\n",
- " frame.pack(fill=BOTH,expand=1)\n",
- "\n",
- " \n",
- "\n",
- " #function to be called when mouse is clicked\n",
- " def printcoords(event):\n",
- " #outputting x and y coords to console\n",
- " print \"Mouse Button pressed\"\n",
- " print (event.x,event.y)\n",
- " #mouseclick event\n",
- " canvas.bind(\"<Button 1>\",printcoords)\n",
- "\n",
- " root.mainloop()\n",
- " \n",
- "import win32api, win32con\n",
- "\n",
- "print \"Current cursor position at \" \n",
- "print win32api.GetCursorPos()"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Mouse Button pressed\n",
- "(207, 115)\n",
- "Current cursor position at "
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "(502, 188)\n"
- ]
- }
- ],
- "prompt_number": 108
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15.10, Page number: 523<h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Change mouse cursor.\n",
- "\n",
- "#Placing the cursor on top of the circle button will change the pointer to circle\n",
- "# and plus button to plus symbol\n",
- "\n",
- "from Tkinter import *\n",
- "import Tkinter\n",
- "\n",
- "top = Tkinter.Tk()\n",
- "\n",
- "B1 = Tkinter.Button(top, text =\"circle\", relief=RAISED,\\\n",
- " cursor=\"circle\")\n",
- "B2 = Tkinter.Button(top, text =\"plus\", relief=RAISED,\\\n",
- " cursor=\"plus\")\n",
- "B1.pack()\n",
- "B2.pack()\n",
- "top.mainloop()"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 110
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
->>>>>>> 0ee873700378b995b441b1be6652178f741aea5b -}
\ No newline at end of file diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter10.ipynb index 68503d70..68503d70 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter10.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter10.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter11.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter11.ipynb index c8fac375..c8fac375 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter11.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter11.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter12.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter12.ipynb index e1acaa2c..e1acaa2c 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter12.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter12.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter13.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter13.ipynb index f9222003..f9222003 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter13.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter13.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter14.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter14.ipynb index 409585bd..409585bd 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter14.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter14.ipynb diff --git a/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter15.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter15.ipynb new file mode 100755 index 00000000..92842ba6 --- /dev/null +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter15.ipynb @@ -0,0 +1,754 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 15: Additional in 'C'<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.1, Page number: 505<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Allocate memory to pointer variable. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "j = 0\n",
+ "k = int(raw_input(\"How many number : \"))\n",
+ "p = [0 for i in range(0,k)]\n",
+ "\n",
+ "#in python, all variables are allocated using dynamic memory allocation technique and no\n",
+ "#malloc function and pointer concept is available in python.\n",
+ "\n",
+ "#Read the numbers\n",
+ "while j != k:\n",
+ " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n",
+ " j += 1\n",
+ " \n",
+ "j = 0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The numbers are : \")\n",
+ "while j != k:\n",
+ " sys.stdout.write(\"%d\\t\"%(p[j]))\n",
+ " j += 1\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many number : 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 1 = 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 2 = 2\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 3 = 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 4 = 4\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The numbers are : 1\t2\t3\t4\t"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.2, Page number: 506<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Memory allocation to pointer variable. \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable initialization\n",
+ "j = 0\n",
+ "k = int(raw_input(\"How many Number : \"))\n",
+ "p = [0 for i in range(0,k)]\n",
+ "\n",
+ "#in python, all variables are allocated using dynamic memory allocation technique and no\n",
+ "#calloc function and pointer concept is available in python.\n",
+ "\n",
+ "#Read the numbers\n",
+ "while j != k:\n",
+ " p[j] = int(raw_input(\"Number %d = \"%(j+1)))\n",
+ " j += 1\n",
+ " \n",
+ "j = 0\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"The numbers are : \")\n",
+ "while j != k:\n",
+ " sys.stdout.write(\"%d\\t\"%(p[j]))\n",
+ " j += 1\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many Number : 3\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 1 = 45\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 2 = 58\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number 3 = 98\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The numbers are : 45\t58\t98\t"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.3, Page number: 507<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Reallocate memory \n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialization\n",
+ "str1 = \"India\"\n",
+ "\n",
+ "#in python, value tagged method is used for data storage instead of memory tagging.\n",
+ "#no realloc function is in python\n",
+ "\n",
+ "#Result\n",
+ "sys.stdout.write(\"str = %s\"%(str1))\n",
+ "str1 = \"Hindustan\"\n",
+ "sys.stdout.write(\"\\nNow str = %s\"%(str1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "str = India\n",
+ "Now str = Hindustan"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.4, Page number: 508<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display unused memory \n",
+ "\n",
+ "import psutil\n",
+ "\n",
+ "psutil.phymem_usage()\n",
+ "\n",
+ "#There is no coreleft() function in python. phymem_usage function in the module psutil gives the \n",
+ "#status and usage of physical memory in python."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "usage(total=3165270016L, used=987840512L, free=2177429504L, percent=31.2)"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.5, Page number: 510<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Linked list\n",
+ "\n",
+ "import sys\n",
+ "\n",
+ "#Variable Initialziation\n",
+ "ch = 'y'\n",
+ "p = 0\n",
+ "q = []\n",
+ "\n",
+ "#Function Definitions\n",
+ "def gen_rate(m):\n",
+ " q.append(m)\n",
+ " \n",
+ "def show():\n",
+ " print q\n",
+ " \n",
+ "def addatstart(m):\n",
+ " q.insert(0,m)\n",
+ " \n",
+ "def append(m,po):\n",
+ " q.insert(po,m)\n",
+ "\n",
+ "def erase(d):\n",
+ " q.remove(d)\n",
+ " \n",
+ "def count():\n",
+ " print len(q)\n",
+ " \n",
+ "def descending():\n",
+ " q.sort(reverse=True)\n",
+ " \n",
+ "#Get choice\n",
+ "while ch == 'y':\n",
+ " n = int(raw_input(\"1. Generate\\n2. Add at starting\\n3. Append\\n4. Delete\\n5. Show\\n6.Count\\n7.Descending\\nEnter your choice: \"));\n",
+ " #There is no switch statement in python\n",
+ " if n == 1:\n",
+ " i = int(raw_input(\"How many node you want : \"))\n",
+ " for j in range(0,i):\n",
+ " m = int(raw_input(\"Enter the element : \"))\n",
+ " gen_rate(m)\n",
+ " show()\n",
+ " else:\n",
+ " if n == 2:\n",
+ " m = int(raw_input(\"Enter the element : \"))\n",
+ " addatstart(m)\n",
+ " show()\n",
+ " else:\n",
+ " if n == 3:\n",
+ " m = int(raw_input(\"Enter the element and position \"))\n",
+ " po = int(raw_input(\"Enter the element and position\"))\n",
+ " append(m,po)\n",
+ " show()\n",
+ " else:\n",
+ " if n == 4:\n",
+ " d = int(raw_input(\"Enter the number for deletion : \"))\n",
+ " erase(d)\n",
+ " show()\n",
+ " else:\n",
+ " if n == 5:\n",
+ " show()\n",
+ " else:\n",
+ " if n == 6:\n",
+ " count()\n",
+ " else:\n",
+ " if n == 7:\n",
+ " descending()\n",
+ " show()\n",
+ " else:\n",
+ " sys.stdout.write(\"Enter value between 1 to 7\")\n",
+ " \n",
+ " ch = raw_input(\"Do u wnat to continue (y/n)\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1. Generate\n",
+ "2. Add at starting\n",
+ "3. Append\n",
+ "4. Delete\n",
+ "5. Show\n",
+ "6.Count\n",
+ "7.Descending\n",
+ "Enter your choice: 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "How many node you want : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the element : 1\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the element : 5\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the element : 4\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enter the element : 7\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[1, 5, 4, 7]\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Do u wnat to continue (y/n)n\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.6, Page number: 518<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Draw circle, line and arc using graphics function\n",
+ "\n",
+ "%matplotlib inline\n",
+ "import pylab\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "#Tkinter package is used for graphics\n",
+ "#Give proportionate sizes to draw\n",
+ "#draw circle\n",
+ "circle2=plt.Circle((.5,.5),.2,color='b')\n",
+ "fig = plt.gcf()\n",
+ "fig.gca().add_artist(circle2)\n",
+ "\n",
+ "\n",
+ "#draw line\n",
+ "figure()\n",
+ "pylab.plot([210,110],[150,150])\n",
+ "\n",
+ "#Draw ellipse\n",
+ "figure()\n",
+ "from matplotlib.patches import Ellipse\n",
+ "e = Ellipse(xy=(35, -50), width=10, height=5, linewidth=2.0, color='g')\n",
+ "fig = plt.gcf()\n",
+ "fig.gca().add_artist(e)\n",
+ "e.set_clip_box(ax.bbox)\n",
+ "e.set_alpha(0.7)\n",
+ "pylab.xlim([20, 50])\n",
+ "pylab.ylim([-65, -35])"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "WARNING: pylab import has clobbered these variables: ['pylab', 'e']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 61,
+ "text": [
+ "(-65, -35)"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGXlJREFUeJzt3X9w1HV+x/HXQjaQREB+2BzsZg5IIgmNBNogclS76Hlg\nnEtbYe5Cb+4UmZhj6ng6bc+rthp0RsE/buqZaxumqFUhhyPOxRlhvUJZ7QhcPFHwgKEBQTfxpAbB\nYICQbL7941MDMbDZJLv73f3s8zGzE5b95LtvPiSvfPL5fr6fr8dxHEcAAKuMcrsAAED8Ee4AYCHC\nHQAsRLgDgIUIdwCwEOEOABYaNNzvvvtu5efn67rrrrtim/vuu0/FxcUqLy/Xe++9F9cCAQBDN2i4\nr1y5UsFg8Iqvb926VUeOHFFLS4vWr1+v1atXx7VAAMDQDRruN954oyZOnHjF11977TXdeeedkqQF\nCxbo9OnTOnHiRPwqBAAM2Yjn3Nva2lRQUND33O/3q7W1daSHBQCMQFxOqH59BwOPxxOPwwIAhilr\npAfw+XwKh8N9z1tbW+Xz+Qa0Kyoq0tGjR0f6dgCQUQoLC3XkyJEhf96IR+5VVVV64YUXJEl79uzR\n1Vdfrfz8/AHtjh49KsdxeDiOHn30UddrSJUHfUFf0BfRH8MdFA86cl+xYoXefPNNtbe3q6CgQGvW\nrFF3d7ckqba2VpWVldq6dauKioqUl5en5557bliFAADiZ9Bwb2xsHPQg9fX1cSkGABAfXKHqgkAg\n4HYJKYO+uIi+uIi+GDmP4zhJuVmHx+NRkt4KAKwx3Oxk5A4AFiLcAcBChDsAWIhwBwALEe4AYCHC\nHQAsRLgDgIUIdwCwEOEOABYi3AHAQoQ7AFiIcAcACxHuAGAhwh0ALES4A4CFCHcAsBDhDgAWItwB\nwEKEOwBYiHAHAAsR7gBgIcIdACxEuAOA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IqKiqTWmgqGlZtxOyPgOE53d7czc+ZM59ixY05XV9egJ1R3795t\n7UnEWPrio48+cgoLC53du3e7VGVyxNIXl7rrrrucLVu2JLHC5IilHw4dOuTccsstTk9Pj9PZ2emU\nlZU5Bw4ccKnixImlLx544AGnrq7OcRzH+fTTTx2fz+ecPHnSjXKT4tixYzGdUI01N+M6cueip4ti\n6YvHHntMp06d6ptn9nq9am5udrPshIilLzJBLP1QUlKipUuXas6cORo1apRqamo0e/ZslyuPv1j6\n4qGHHtLKlStVXl6u3t5ePfXUU5o0aZLLlSfGihUr9Oabb6q9vV0FBQVas2aNuru7JQ0/N7mICQAs\nxG32AMBChDsAWIhwBwALEe4AYCHCHQAsRLgDgIUIdwCwEOEOABb6P0Anxcrjn3WCAAAAAElFTkSu\nQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x707a9f0>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEACAYAAABS29YJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF0tJREFUeJzt3XtsU+f9x/GPM8JWljCCBiaKU2JugzR28AK0MKXzr8CA\nomzrZdVcAVUcpIr+tZoxtj+gttZCCIuqNtO2TKIwiXX8g4BpgghP4ACquCdKRqVBWaIkkKVLQ6YR\nKNfn90dVizQ3nDi0yfN+SZYOz3l8zvfblk9OnuNTO4wxRgCAUS3lyy4AADD8CHsAsABhDwAWIOwB\nwAKEPQBYgLAHAAv0G/bBYFBOp1Mejyc+Fg6H5XK55PP55PP5dOjQIUnSp59+qkAgIK/Xq9zcXJWW\nlg5v5QCAh9Zv2BcXF6uqqqrbmMPhUCgUUk1NjWpqarRixQpJ0p49eyRJdXV1OnfunCorK9XU1DRM\nZQMAEtFv2BcWFiojI6PHeG/PYWVmZqqrq0v37t1TV1eXxo4dq/HjxyevUgDAoA1qzb6iokL5+fkq\nKSlRZ2enJGnZsmUaP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KypI0MvubMmWK5s6dK0lKS0vTnDlzdOXKlVGTL731d/Xq1aTlyyP5\nH6G1tbXJ6XRKkpxOZ/zTPFevXpXL5YrPc7lcunLlyqMoadi89957evbZZyWNnv76eohuNPR36dIl\nHTt2TE899ZT8fr/Onj0raXT0JkmlpaVav369Hn/8cW3YsEFbt26VNPL7a2xsVE1NjZ588slRmS8P\n9vegoeTLI/+/XjocDjkcjn73j1RvvfWWxo4dq5dffrnPOSOtv88footEIvEx0889/ZHW3927d3Xt\n2jWdPHlS27dv10svvdTn3JHWmySVlJTo3XffVVNTk95++20Fg8E+546U/q5fv64XXnhB77zzjtLT\n07vtGw35cv36db344ot65513lJaWFh8far48krB3Op3697//LUlqbW3V5MmTJUlZWVlqbm6Oz2tp\naYn/mjnS7Nq1SwcPHtSf//zn+Nho6O/y5ctqbGxUfn6+3G63WlpaVFBQoLa2tlHRn8vl0vPPPy9J\nmj9/vlJSUtTe3j4qepM+u0H73HPPSZJefPHF+K/5I7W/O3fu6IUXXtDq1av14x//WNLoypfP+1u1\nalW8PylJ+TIcNxoefOLWmM9u0JaWlhpjjNm6dWuPGwy3bt0y//rXv8y0adPM/fv3h6OkpPpif4cO\nHTK5ubnmP//5T7d5o6W/B/V2g3Yk9ffF3v7whz+YzZs3G2OM+ec//2mys7ONMSOzN2N69ufz+Uws\nFjPGGPP3v//dzJs3zxgzMvu7f/++Wb16tfnZz37WbXy05Etf/SUrX5Ie9j/96U9NZmamSU1NNS6X\ny7z33nvmk08+MYsXLzYzZ840S5cuNdeuXYvPf+utt8z06dPNd77znfinBr7Kvtjfjh07zIwZM8zj\njz9u5s6da+bOnWvWrVsXnz9S+xs7dmz839+D3G53POyNGVn99dbb7du3zapVq0xeXp757ne/a44e\nPRqfP5J6M6b3v3tnzpwxCxYsMPn5+eapp54y58+fj88faf0dP37cOBwOk5+fH/+7dujQoVGTL731\nd/DgwaTlCw9VAYAF+FpCALAAYQ8AFiDsAcAChD0AWICwBwALEPYAYAHCHgAsQNgDgAX+Hze/zGOH\nVK27AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7349d10>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG+xJREFUeJzt3X1QU2e+B/DvyQtJgCDvCskqCLSIIqR2lbvjbGOVTmd2\naFnb8Y6dup1R94/6z3Zpbx1nR4t3inbtujtdp7rM1umt/af27lwLu1s7Mlsz1O5aFHGtUgUEWt5i\nhcBKgBCSPPcPylkp6EgSCTx+P8MZT56QnN/jo9/zkpNzFCGEABERSUsT6QKIiOj+YtATEUmOQU9E\nJDkGPRGR5Bj0RESSY9ATEUku6KDfvXs3CgoKUFhYiPXr16OjowMA0N7eDpPJBJvNBpvNhh07doSt\nWCIimjkl2PPoBwcHYTabAQCHDh3CP//5T7zzzjtob29HSUkJvvzyy7AWSkREwQl6i34i5AHA7XYj\nOTk5LAUREVF46UJ58a9+9Su8//77iI6OxtmzZ9X2trY22Gw2LFiwAK+//jrWrl0bcqFERBScux66\nKS4uhtPpnNK+b98+lJSUqI/feOMNXLt2De+++y68Xi+GhoaQkJCACxcuoLS0FFeuXJm0B0BERLNI\nhMHXX38tli9fPu1zdrtd1NfXT2nPysoSADhx4sSJ0wymrKysGWd00Mfom5ub1fmqqirYbDYAQG9v\nL/x+PwCgtbUVzc3NWLp06ZTXX79+HUIIaafXXnst4jWwf+zfg9g/mfsmhMD169dnnNdBH6PftWsX\nrl27Bq1Wi6ysLBw5cgQAUFtbiz179kCv10Oj0aCyshLx8fHBLoaIiEIUdND/6U9/mrZ948aN2Lhx\nY9AFERFRePGbsfeJ3W6PdAn3Ffs3v8ncP5n7FqygvzAV8oIVBRFaNBHRvBVMdnKLnohIcgx6IiLJ\nMeiJiCTHoCcikhyDnohIcgx6IiLJMeiJiCTHoCcikh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oKCkRhYaEoLCwUJ0+eFH19fWL9+vUiJydHFBcXi/7+/tkoJ+ym69/H\nH38stmzZIvLz88XKlSvF008/LZxOZ6RLnbFLly4Jm80mCgoKRH5+vjhw4IAQQkgzdnfqnwxj930O\nh0OUlJQIIeQZv9udPn1a7d/zzz8vxfi1traKgoICUVBQIJYvXy727dsnhJj5+PELU0REkuOtBImI\nJMegJyKSHIOeiEhyDHoiIskx6ImIJMegJyKSHIOeiEhyDHoiIsn9P/ox1+CwlWHmAAAAAElFTkSu\nQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x78994d0>"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.7, Page number: 519<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Draw boxes and fill with different designs.\n",
+ "\n",
+ "%pylab\n",
+ "#Tkinter package is used for graphics\n",
+ "from matplotlib.patches import Rectangle\n",
+ "from matplotlib.collections import PatchCollection\n",
+ "\n",
+ "e = Rectangle(xy=(35, -50), width=10, height=5, linewidth=2.0, color='b')\n",
+ "fig = plt.gcf()\n",
+ "fig.gca().add_artist(e)\n",
+ "e.set_clip_box(ax.bbox)\n",
+ "e.set_alpha(0.7)\n",
+ "pylab.xlim([20, 50])\n",
+ "pylab.ylim([-65, -35])\n",
+ "\n",
+ "#There are no different automatic fill styles. user should create the styles."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAErZJREFUeJzt3X9MVff9x/HXuXKbaEoEV3UtN6kILooinNYpf5jsOLlL\nk4WW0YXEpq6J9p/6V0uXOrOIkBRxbizpyDRka5raf+qyxMKW2kBWb2i3uFsQ6w+S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fgvNRsZGVFfX5+2bduma9euafXq1ZKk1atX69q1aws9nKy7N7+KigpJX/w+oLKyMu3du/e+\nfXv873//W+Xl5Vq9enXqEpWltZtpfpKNtZOkl156ST/96U8VCv3fX3dL6zfT/BzHMbN+juOosrJS\nW7Zs0a9+9StJ6a/fgob+1q1bevrpp/Xaa69N+wKV4zhyHGchh5N1t27d0ve//3299tprevDBB/XC\nCy9oeHhY58+f18MPP6yXX355sYcYSCgU0vnz5zU6Oqru7m6dOXNmyuP3+9r99/xisZiZtfv973+v\nVatWyXXdWc9w7+f1m21+VtZPkv74xz+qr69Pp0+f1i9/+Ut98MEHUx7/Kuu3YKH/17/+paefflq7\nd+9WdXW1pC/+S3Tvm7fj4+NatWrVQg0n6+7N79lnn03Nb9WqValFeP755xWPxxd5lJlZvny5vvvd\n76q3t9fU2t1zb349PT1m1u5Pf/qTOjo6VFhYqF27dun999/X7t27zazfTPP7wQ9+YGb9JOnhhx+W\n9MXvE/ve976neDye9votSOh939fevXtVUlKiF198MbX/ySef1JtvvilJevPNN1OBvN/MNr/x8fHU\n7VOnTqm0tHQxhpeRiYmJ1Nvef/zjH+rq6pLrumbWbrb5fflXf9yvaydJhw8fViKR0PDwsN5++219\n+9vf1ltvvWVm/Waa34kTJ0z83ZO++KDAzZs3JUm3b99WZ2enSktL01+/tL9LG8AHH3zgO47jl5WV\n+eXl5X55ebl/+vRp/29/+5u/c+dOf926dX40GvVv3LixEMPJupnm9+677/q7d+/2S0tL/c2bN/tP\nPfWUn0wmF3uoabtw4YLvuq5fVlbml5aW+kePHvV93zezdrPNz8La/bdYLOZXVVX5vm9n/b7szJkz\nqfk9++yzJtZvaGjILysr88vKyvyNGzf6hw8f9n0//fXjC1MAYBz/K0EAMI7QA4BxhB4AjCP0AGAc\noQcA4wg9ABhH6AHAOEIPAMb9B4rEH5DkLOd4AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7373590>"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.8, Page number: 520<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display text in different size, font, vertically and horizontally \n",
+ "\n",
+ "%pylab\n",
+ "\n",
+ "from pylab import *\n",
+ "\n",
+ "#Tkinter package is used for graphics\n",
+ "# set limits so that it no longer looks on screen to be 45 degrees\n",
+ "xlim([-5,5])\n",
+ "\n",
+ "# Locations to plot text\n",
+ "l1 = array((1,1))\n",
+ "l2 = array((5,5))\n",
+ "\n",
+ "# Rotate angle\n",
+ "angle = 90\n",
+ "trans_angle = gca().transData.transform_angles(array((45,)),\n",
+ " l2.reshape((1,2)))[0]\n",
+ "\n",
+ "# Plot text\n",
+ "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 25)\\n\\n',fontsize=25,\n",
+ " rotation=0)\n",
+ "th2 = text(l2[0],l2[1],'Hello(Horizontal Text with fontsize 16)',fontsize=16,\n",
+ " rotation=0)\n",
+ "th1 = text(l1[0],l1[1],'Hello(Vertical Text)',fontsize=16,\n",
+ " rotation=angle)\n",
+ "show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Using matplotlib backend: module://IPython.kernel.zmq.pylab.backend_inline\n",
+ "Populating the interactive namespace from numpy and matplotlib\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "WARNING: pylab import has clobbered these variables: ['power', 'draw_if_interactive', 'random', 'fft', 'angle', 'linalg', 'info']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAA5AAAATCCAYAAADLrQlWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3X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T8g2hvryG1juSv2CfCX3ed26\ndV1nSyWpRIkSrueB7b+Stmf16tWu57GxsXr//fdVvXp1xcTEXKZW5dzF6lOb/XulC3XVULhAvHnz\nZrVo0UKbNm2yel8P914TaX90795dgwcP1smTJyVJo0aNIkACAH5fdu7cqS+//NJ5XqtWLZUrV+4y\ntujiS0tLU1pa2uVuxmVxpYYsn+XLlys7O9s1zRij+vXra9++fc60kiVLavny5UHLh7t87XK6kvs8\nISFBpUqVilgmVPuvlG3KyspyPS9RooQ6dOhwmVpz/i5Wf9rs36tF/vz5ddddd+n2229XhQoVdOTI\nEc2cOVOvvPKKzpw545T77rvvNHnyZN1///0R63vxxRfDntmUpCJFioScnpycrDZt2ujDDz+UdO7y\n2kWLFkX8re/v+5e4AADHzp07NWTIENWqVUtpaWmKi4tT4cKFVb9+fT333HM6fPjwJWnH4cOHNXr0\naDVv3lzFihVTQkKCkpOTVbFiRfXo0UPz58+PuPzf//531/OuXbtezOaGtWTJEvXp00fXXXedChQo\noPj4eBUtWlSNGzfWc889p4MHD4ZdNtSgRL/88oueeuopValSRXny5HENHhFtkI/A+dEeS5YsCWqT\nMUZz5szRXXfdpfLlyys5OVkJCQkqXry4WrZsqbFjx+rYsWMhtyczMzPkOo4ePaqnn35aVapUUVJS\nklJSUtS8eXN9/vnnYfsk8PeEw4YNCztAU3Z2tqZPn65BgwapWbNmqlSpkgoXLqy4uDglJyerXLly\n6tixo6ZOner6wpabSpQooVKlSrkepUuXDjqbFBsbG1SuVKlSKl68uKTg4ykhIUElSpRQmzZtNGnS\nJP32229B6/773//u6pfY2NigM1ynT59W9erVXeWaNm0qY4zKlCkjr9cb9LvrKVOmnPdAJoH7q1mz\nZkFlSpUq5czPkydP0L7p3r27q45+/fo58yINsuIbzKtp06au+owxSk9Pdy0T7QyMdO6fAx07dlTR\nokWVkJCg8uXLa/DgwTp69KhVX/jzvUb9rySQzv1eM1q7vvnmGz344IOqXr26UlNTnffuOnXq6Mkn\nn4y4b3z72PcYNmyYz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9k\nWlqa2rRpo8WLF6tbt27W/RZpvn/bAh+SdNddd2nx4sVq06aNChUq5NyPsWvXrvr6669d97zMSf9K\n537neuedd6pIkSJB6502bZq6du2qggULKiUlRd27d9d7773narPt9ocTbr/ceeedWr58uTp16qRi\nxYopLi5ORYoUUa1atfTnP/9ZgwYNctr/9ddfy+PxaNSoUSpXrpyKFy+u1157TZK0detWPfroo069\nU6dOVcOGDVWgQIGoAyn5812a6vF4XL+78x+cqHHjxkHbFqpPbr75Zo0bN07lypVTfHx8yDZEOo5s\n2htpf/ztb3/TpEmTVLduXSUnJys+Pl7lypXTwIEDtWbNGtclrOH6KNz0SP37xBNPqEGDBs59PfPm\nzev0xZ/+9Kew22/+/xnaaK+TIkWKaM2aNXrsscdUuXJlJSYmKjk5WZUqVdIf//hHzZgxI0f9Fmld\nPu+++65eeOEFXXfddUpISFCBAgV022236YsvvtDdd9/tKutbf4ECBdS1a9eobQF+7zzG8GthAMDF\nd+utt2rlypXq1q2bpk+ffrmbAwA6c+aMypcvrz179ujJJ5+M+ptPAARIAMAlsmrVKtWrV0+xsbHa\nunWr9W8DAeBimThxou69914VLVpUO3fudEaxBRAeARIAAAAAYIXfQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAK\nARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIk\nAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAA\nAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAA\nACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABW\nCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAg\nAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIA\nAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAA\nAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACw\nQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUA\nCQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIA\nAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAA\nAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACA\nFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsE\nSAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAK\nARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIk\nAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAA\nAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAA\nACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABW\nCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAg\nAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIA\nAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAA\nAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACw\nQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUA\nCQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIA\nAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAA\nAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACA\nFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsE\nSAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAA\nAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAArBAgAQAA\nAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFghQAIAAAAA\nrBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAEAAAAAFgh\nQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAAAACwQoAE\nAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAAYIUACQAA\nAACwQoAEAAAAAFghQAIAAAAArBAgAQAAAABWCJAAAAAAACsESAAAAACAFQIkAAAAAMAKARIAAAAA\nYIUACQAAAACwQoAEAAAA8P/Yu/cgver6juOfZ3O/SLgnyiUkUiiNXGJoKwq4toNVLgrDRa3EWJCa\ncBEGREp1KNG0A5V2qI46VQyYUrENxtRQEcaWQImkViUhVq3BxAQZIGQwlEsW4ubpHzQLayD5xjH7\nHNjX658s5znJftmZ/c2+93fOeaBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIB\nCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACg\nREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEA\nACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhI\nACrWxdwAACAASURBVAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACU\nCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAA\nACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJ\nAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBE\nQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAA\nKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgA\nAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUC\nEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABA\niYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIA\nAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQ\nAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABK\nBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAA\ngBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAE\nAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAi\nIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAA\nlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQA\nAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIB\nCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACg\nREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEA\nACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhI\nAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAl\nAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAA\nQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREAC\nAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgR\nkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAA\nSgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIA\nAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImA\nBAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQ\nIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAA\nAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQk\nAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIAS\nAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAA\noERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiAB\nAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQI\nSAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAA\nJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkA\nAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERA\nAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAo\nEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAA\nAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQIS\nAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJ\ngAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAA\nUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAA\nAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoE\nJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACA\nEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQA\nAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAAACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIg\nAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJAABAiYAEAACgREACAABQIiABAAAoEZAAAACU\nCEgAAABKBCQAAAAlAhIAAIASAQkAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJQISAAAAEoEJAAA\nACUCEgAAgBIBCQAAQImABAAAoERAAgAAUCIgAQAAKBGQAAAAlAhIAAAASgQkAAAAJQISAACAEgEJ\nAABAiYAEAACgREACAABQIiABAAAoEZAAAACUCEgAAABKBCQAAAAlAhIAAICSoZ0eAHhpTz/9dO69\n99488sgjabfbmTBhQqZOnZrRo0d3ejQAAAYhAQkNs2nTpixYsCBf+MIXcvfdd2fTpk1pt9tJklar\nlaFDh+aoo47KOeeckzPOOCPDhg3r8MQAAAwWrfaWn0yBjps/f34uv/zyrFq1qnT+pEmTctVVV+X0\n00/fyZMBAICAhEbp6nr+tuTf+73fyzHHHJPDDz88e+yxR5Jk/fr1Wb58ef7jP/4j//Vf/5XkuV3J\n3t7ejswLAMDgIiChQcaNG5fzzz8/H/jABzJp0qRtnrtq1apcd911+exnP5sNGzYM0IQAAAxmAhIa\nZMOGDdl11113+t8BAIBfh4CEhlqzZk1arVb233//To8CAABJCu8D+aEPfSjjx49PV1dXTjrppJc8\nb+HChTnwwAMzatSovOUtb8nPfvaz3+ScMOhMmjTpJS9jnTRpUiZPnjzAEwEAMNhtNyBbrVbe8573\n9H38Yh5++OG8+93vzq677pprrrkm3/ve9zJjxozf7KRAkqTdbmfNmjVZs2ZNp0cBAGCQ2e77QP7d\n3/1d1qxZk0996lMvec5NN92UZ599NpdffnlOPfXU/Od//mduvPHGrFq1yi4J7IDHH388jz/+eF54\nZfnatWvTbrf7foGzbNmyJMmQIUM6MiMAAIPXdgMySbZ3m+Tq1auTJPvss0+SZN999+07LiCh7tpr\nr83s2bP7YrHdbm91GeuW78fXvOY1Az4fAACDWykgd9S2gvOII47I8uXLd8anhVeMF34PvdT305aH\n7DA4HH744X27zwAAnfJrB2RPT0+GDBmSYcOG9e0yPvDAA3nDG96QBx98MEledPdx+fLl293RHAhX\nXnllrrzyyk6P0Qi+Fs/r9Ndi4cKFWbhwYZJk3rx5SZIZM2b0fc+0Wq3sueeeecMb3pBTTz11p87S\n6a9FkzTha+GXBQBAE2w3IP/1X/81P/jBD5I8dy/WF7/4xRx77LE5+OCDM2XKlKxYsSLvfve782d/\n9me5+uqr8/DDD+drX/tajjnmmO2+ETrQ38knn5yTTz45yfMBef3113dyJAAA6LPdp7Bec801ufzy\ny9NqtXLfffflT//0T/Ptb387yfO/EZ8wYUJuuummbNiwIZdeemmmTZuWG264YacODq90GzZsyObN\nm1/y9VWrVg3gNAAAUAjIO+64I5s3b05vb2/fnzNmzMjmzZtz33339Z13yimn5P77709PT08WL17c\n+N3H7u7uTo/QGL4Wz2vS1+KII47I0qVLX/S1L33pS5k6depO/fxN+lp0mq8FAMBzWu0BviGx1Wo1\n4h5IaLqurq4MHTo0f/EXf5GPfvSjSZ57m4+ZM2fmn/7pn9JqtdLb29vhKRko1k4AoAkEJDTU+PHj\n8+ijjyZJjj322HzoQx/KxRdfnLVr1yZJDj30UE80HkSsnQBAEwhIaKhHH300s2bNyoIFC/od7+rq\nyiWXXJJPfOITGT58eIemY6BZOwGAJhCQ0HDveMc7csstt/T990c/+tF84hOf6OBEdIK1EwBogu0+\nRAfojLVr1+a4447rF49J8ld/9Vf54Ac/mKeffrpDkwEAMFjZgYSGGjduXJ544okkyYknnpiLL744\n559/fn74wx8mSSZPnpz777+/kyMygKydAEAT2IGEhnriiScycuTIfPrTn87Xv/71dHd357vf/W5m\nzZqVJFm9enWHJwQAYLCxAwkNdeihh+YrX/lKpkyZstVrixYtytlnn51169Z1YDI6wdoJADSBgISG\neuaZZzJixIiXfP2hhx7Kq1/96gGciE6ydgIATTC00wMAL25LPN577725/fbb89hjj+Xqq6/OmjVr\n0mq1xCMAAAPODiQ02AUXXJDPfOYzSZ773unt7c3RRx+de+65J3Pnzs2MGTM6PCEDxdoJADSBh+hA\nQ11//fV98fhCs2bNSrvdzqJFizowFQAAg5mAhIb63Oc+lyQ544wz+h1/85vfnCRZvnz5gM8EAMDg\n5hJWaKgxY8akp6cn69aty1577dV3CeumTZsyYsSIjB49Ok8++WSnx2SAWDsBgCawAwkNtSUWRo4c\n2e/4mjVrkjwXFAAAMJAEJDTUa1/72rTb7cybN6/v2EMPPZQLLrggSXLggQd2ajQAAAYpAQkN9a53\nvStJct555yV5bkdy3333zW233ZYkOf300zs2GwAAg5N7IKFBZs+enVarlSuuuCI9PT3p7u7Od77z\nna3OO/LII3PXXXdtdXkrr1zWTgCgCQQkNEhXV1ffw3KS5Omnn86nPvWpLFq0KOvWrcv48eNz4okn\n5sILL8yoUaM6PC0DydoJADSBgIQG+dWAhC2snQBAE7gHEgAAgJKhnR4A6K/dbuess84qnTt37tyd\nPA0AADzPJazQIF1d9YsCXOo6uFg7AYAmcAkrvEyJCQAABppLWKFhWq1W5s6du91AbLVaAzQRAAA8\nxyWs0CCewspLsXYCAE3gElYAAABKBCQ0jF0mAACayj2Q0CD//u//7t5GAAAayz2QAC8D1k4AoAlc\nwgoAAECJgAQAAKBEQAIAAFAiIAEAACgRkAAAAJRs9208lixZklmzZuUnP/lJpkyZkuuuuy5Tp07t\nd0673c7FF1+cr3zlK9mwYUMOOOCAzJ49O2ecccZOGxxeif7kT/5kh97GY+7cuTtxGgAA6G+bb+PR\n09OTAw44IGPGjMmll16aOXPmZMSIEVm5cmW6up7fvLz11ltzwgknZNq0aXn/+9+fyy+/PL/85S/z\nxBNPZMiQIf0/oUfRw0t64ffV9rRarfT29u7EaWgSaycA0ATb/Gn11ltvzbp163Luuedm5syZOfvs\ns7N69eosXry433m77rprkuS1r31t/vAP/zC77LJLdtlllx36YRjYMWICAICBts1LWFevXp0k2Wef\nffr9ueX4FkcddVSuuOKKfPzjH88///M/Z+TIkbnlllt26FI8IFm1alWnRwAAgJe03XsgX+ildjy+\n853v5C//8i/zR3/0R5k5c2YuuuiizJgxI//zP/+T0aNHb3X+lVde2fdxd3d3uru7d2hoeKU64IAD\nOj0CDbF48eKtrvYAAOi0bQbk5MmTkyQPPPBAkuTBBx/sO97T05MhQ4Zk2LBhWbx4cXp7ezN9+vS8\n853vzKJFizJ37tz86Ec/yrRp07b6d18YkMC2/eIXv8j999+fjRs3bvXascce24GJGAi/+su12bNn\nd24YAID/t82AfPvb35699947n/vc5zJ27Nh88YtfzKRJk/LmN785Q4cOzZQpU7JixYoccsghSZLP\nfvazeeqpp3LLLbdkxIgRmTRp0oD8T8Ar0aZNm/LBD34w8+bNS7vd3uoKAA/RAQBgoG3zKTcjRozI\n/PnzM3bs2Fx00UWZMGFC5s+f3/dwnC33OJ500kn52Mc+lrVr1+bCCy/MnnvumRtvvDG77777zv8/\ngFeoa665JjfccEM2b978opePe4gOAAADbZtv47FTPqFH0UPJ4YcfnhUrVuSII47IsmXLkiSnnHJK\nvvGNb2Tff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OAmIKFBFi5cmNmzZ/c79v73v/9Fz508efIATAQAAM9z\nCSs0SPUet+HDh+eKK67YydMAAEB/HqIDDbJs2bIsW7YsSXLWWWclSa6//vq+75lWq5U999wzU6dO\nzWte85qOzcnAs3YCAE0gIKGhuru702q1cscdd3R6FBrA2gkANIFLWKGBNm7cmLVr12bNmjX58Y9/\n3OlxAAAgiR1IaKxx48blySefzMaNGzN8+PBOj0OHWTsBgCawAwkNddxxx6XdbvfdEwkAAJ1mBxIa\n6u67784pp5yScePGZc6cOZk6dWpGjRrV75z999+/Q9Mx0KydAEATCEhoqK6u/hcItFqtvo/b7XZa\nrVZ6e3sHeiw6xNoJADTB0E4PANT8ajyICQAABpqAhIZ63/vet83XX7gjCQAAA2G7l7AuWbIks2bN\nyk9+8pNMmTIl1113XaZOnbrVeQ888EDOP//8fOtb38qwYcNy4okn5sYbb9z6E7oMC2CHWTsBgCbY\n5lNYe3p6cuqpp+app57Ktddem0ceeSSnnXZaNm/e3O+8drudU045Jf/2b/+Wyy67LJ/85Cez9957\n79TBYTBZt25dfvSjH3V6DAAABrltBuStt96adevW5dxzz83MmTNz9tlnZ/Xq1Vm8eHG/8+644458\n//vfz8UXX5zLLrss55xzTv72b/92Z84Ng8Ldd9+dww8/PBMmTMjrXve6JMm73/3u/MEf/EGWLl3a\n4ekAABhsthmQq1evTpLss88+/f7ccnyLH/7wh0mSm2++OaNHj84uu+yST3/607/xYWEwWbFiRd76\n1rdmxYoV/Y7/zu/8ThYvXpyvfOUrHZoMAIDBaoceovNS998888wzSZLhw4dn4cKF+djHPpaLLroo\nb3vb2/Jbv/VbW51/5ZVX9n3c3d2d7u7uHRkDBoWPf/zj6enpyV577ZVHH3207/g73/nOXHnllbnz\nzjs7OB072+LFi7e62gMAoNO2GZCTJ09O8twDcpLkwQcf7Dve09OTIUOGZNiwYX3nnXDCCTnppJPy\n7W9/OytWrMjPfvaz7QYk8OLuvPPOtFqt3HbbbXn961/fd/zggw9Okvz85z/v1GgMgF/95drs2bM7\nNwwAwP/b5lNYn3nmmUycODGjR4/OpZdemjlz5mTkyJFZuXJlhg4dmilTpmTFihXZuHFjJk2alHHj\nxuUjH/lIrr766jzyyCP56U9/mj333LP/J/QkQSgZPnx4ent709PTkxEjRqTVaqW3tzcbNmzI7rvv\nnuHDh6enp6fTYzJArJ0AQBNs8x7IESNGZP78+Rk7dmwuuuiiTJgwIfPnz09X13N/bcv70I0aNSo3\n33xzRowYkfPPPz9jx47NggULtopHoG6vvfZKkvz3f/93v+Nf+tKXkiTjx48f8JkAABjctvs+kL/x\nT+i36FAyffr0/OM//mMOOOCA/OxnP0uSHHfccfnWt76Vdrud973vfbnhhhs6OiMDx9oJADSBgISG\n+tGPfpRp06a96GWqI0eOzPe+970ccsghHZiMTrB2AgBNsM1LWIHOOeSQQ3L77bf3PTRni4MOOijf\n/OY3xSMAAAPODiQ0SHd3d6ZPn57TTz89u+yyS9/xlStXZt26dRk/fnwOPPDADk5Ip1g7AYAmEJDQ\nIFseUDVy5MiceOKJOfPMM3P88cdn6NAdestWXoGsnQBAEwhIaJAtAflCe+yxR84444yceeaZOeqo\nozowFU1g7QQAmkBAQoN861vfyk033ZQFCxbk8ccf7/daq9XKpEmTcuaZZ+bMM890KesgY+0EAJpA\nQEIDPfvss7n11ltz0003ZdGiRdm4cWO/11utVn73d383S5cu7dCEDDRrJwDQBAISGu6pp57Kv/zL\nv+Smm27K7bffnk2bNiV57nupt7e3w9MxUKydAEATeDIHNNyYMWNy8sknp9VqZcOGDVmyZEmnRwIA\nYJASkNBQmzZtym233ZYvf/nL+frXv56NGzf224GyGwUAwEATkNAg7XY7d955Z7785S/nq1/9an7x\ni19sdc6kSZPy3ve+N9OnT+/AhAAADGYCEhpkv/32y0MPPbTV7uLuu++e008/PdOnT88b3/jGDk0H\nAMBg5yE60CAvfB/IESNG5IQTTsj06dNz/PHHZ9iwYR2cjE6zdgIATWAHEhrmmGOOyfTp03P66adn\n3LhxnR4HAAD6CEhokNWrV2fixImdHgMAAF5U1/ZPAQbKr/O+jqtWrdoJkwAAwNYEJDTIwQcfnDPP\nPDN33XXXds+988478973vje//du/PQCTAQCAh+hAo2x5iE6r1cqrX/3qvOlNb8phhx2WPffcM0ny\n6KOP5r777suSJUvy8MMP930vbd68uWMzMzCsnQBAEwhIaJClS5fmkksuyT333FM6/6ijjsrf/M3f\n5A1veMNOnoxOs3YCAE0gIKGBlixZks9//vO5/fbb88gjj/R7bfz48XnrW9+aD3zgAznmmGM67JKU\ndAAAD19JREFUNCEDzdoJADSBgISGe+CBB/Lwww8neS4e999//w5PRCdYOwGAJhCQAC8D1k4AoAm8\nDyQ03D333JNvfOMbefTRR7P33nvnhBNOyO///u93eiwAAAYhO5DQYDNnzsznP//5fsdarVY++MEP\n5rOf/WyHpqITrJ0AQBMISGioG264IWedddZLvn799ddnxowZAzgRnWTtBACaoKvTAwAvbsvO48SJ\nE3PttddmwYIFufbaazNx4sR+rwMAwECxAwkN9apXvSpPP/10li1blkMPPbTv+A9+8IMcdthhedWr\nXpXHH3+8gxMykKydAEAT2IGEhnr22WeTJPvtt1+/4/vuu2+/1wEAYKAISGio/fbbL+12O5dcckk2\nbNiQJNmwYUM+/OEPJ3k+JAEAYKAISGiok046KclzD8vZY489Mm7cuOyxxx6ZO3duv9cBAGCguAcS\nGmr9+vU58sgjs3bt2q1emzhxYr773e9mjz326MBkdIK1EwBoAjuQ0FB77rlnli5dmrPPPjsTJkzI\nkCFD8prXvCbnnHNOli5dKh4BABhwdiABXgasnQBAE9iBBAAAoGRopwcAntfV1ZVWq7Xd89rtdlqt\nVnp7ewdgKgAAeI6AhIapXqbockYAAAbadgNyyZIlmTVrVn7yk59kypQpue666zJ16tQXPffRRx/N\nIYccksceeyyf/OQnc8kll/zGB4ZXsmOPPbZ8r1tlpxIAAH6TthmQPT09OfXUUzNmzJhce+21mTNn\nTk477bSsXLkyXV1b3z554YUXpqenJ4kfbuHXsXjx4k6PAAAAL2mbD9G59dZbs27dupx77rmZOXNm\nzj777Kxevfp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TmjIyMqKamRp2dnbpy5YrpOAAAAEbRQAIAAAAA\n1uSPvokOAAAAAOD3oYEEAAAAAKwJDSQAAAAAYE1oIAEAAAAAa0IDCQAAAABYExpIAAAAAMCa0EAC\nAAAAANbkf1M+pbyPupgkAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x792e430>"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.9, Page number: 521<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Display status of mouse button pressed \n",
+ "\n",
+ "from Tkinter import *\n",
+ "from tkFileDialog import askopenfilename\n",
+ "import Image, ImageTk\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " root = Tk()\n",
+ "\n",
+ " #setting up a tkinter canvas with scrollbars\n",
+ " frame = Frame(root, bd=2, relief=SUNKEN)\n",
+ " frame.grid_rowconfigure(0, weight=1)\n",
+ " frame.grid_columnconfigure(0, weight=1)\n",
+ " xscroll = Scrollbar(frame, orient=HORIZONTAL)\n",
+ " xscroll.grid(row=1, column=0, sticky=E+W)\n",
+ " yscroll = Scrollbar(frame)\n",
+ " yscroll.grid(row=0, column=1, sticky=N+S)\n",
+ " canvas = Canvas(frame, bd=0, xscrollcommand=xscroll.set, yscrollcommand=yscroll.set)\n",
+ " canvas.grid(row=0, column=0, sticky=N+S+E+W)\n",
+ " xscroll.config(command=canvas.xview)\n",
+ " yscroll.config(command=canvas.yview)\n",
+ " frame.pack(fill=BOTH,expand=1)\n",
+ "\n",
+ " \n",
+ "\n",
+ " #function to be called when mouse is clicked\n",
+ " def printcoords(event):\n",
+ " #outputting x and y coords to console\n",
+ " print \"Mouse Button pressed\"\n",
+ " print (event.x,event.y)\n",
+ " #mouseclick event\n",
+ " canvas.bind(\"<Button 1>\",printcoords)\n",
+ "\n",
+ " root.mainloop()\n",
+ " \n",
+ "import win32api, win32con\n",
+ "\n",
+ "print \"Current cursor position at \" \n",
+ "print win32api.GetCursorPos()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mouse Button pressed\n",
+ "(207, 115)\n",
+ "Current cursor position at "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(502, 188)\n"
+ ]
+ }
+ ],
+ "prompt_number": 108
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15.10, Page number: 523<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Change mouse cursor.\n",
+ "\n",
+ "#Placing the cursor on top of the circle button will change the pointer to circle\n",
+ "# and plus button to plus symbol\n",
+ "\n",
+ "from Tkinter import *\n",
+ "import Tkinter\n",
+ "\n",
+ "top = Tkinter.Tk()\n",
+ "\n",
+ "B1 = Tkinter.Button(top, text =\"circle\", relief=RAISED,\\\n",
+ " cursor=\"circle\")\n",
+ "B2 = Tkinter.Button(top, text =\"plus\", relief=RAISED,\\\n",
+ " cursor=\"plus\")\n",
+ "B1.pack()\n",
+ "B2.pack()\n",
+ "top.mainloop()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 110
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter16.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter16.ipynb index cafb9828..cafb9828 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter16.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter16.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter3.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter3.ipynb index 880e4fac..880e4fac 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter3.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter3.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter4.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter4.ipynb index 758457a3..758457a3 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter4.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter4.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter5.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter5.ipynb index dac1632e..dac1632e 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter5.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter5.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter6.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter6.ipynb index d9815e79..d9815e79 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter6.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter6.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter7.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter7.ipynb index ac82414f..ac82414f 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter7.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter7.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter8.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter8.ipynb index 3243f3f8..3243f3f8 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter8.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter8.ipynb diff --git a/Programming_in_C_using_ANSI_C/KamthaneChapter9.ipynb b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter9.ipynb index 4da93c8d..4da93c8d 100755 --- a/Programming_in_C_using_ANSI_C/KamthaneChapter9.ipynb +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/KamthaneChapter9.ipynb diff --git a/Programming_in_C_using_ANSI_C/README.txt b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/README.txt index e5dfcad4..e5dfcad4 100755 --- a/Programming_in_C_using_ANSI_C/README.txt +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/README.txt diff --git a/Programming_in_C_using_ANSI_C/screenshots/screenshot1.png b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot1.png Binary files differindex 61fbfcd0..61fbfcd0 100755 --- a/Programming_in_C_using_ANSI_C/screenshots/screenshot1.png +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot1.png diff --git a/Programming_in_C_using_ANSI_C/screenshots/screenshot1_1.png b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot1_1.png Binary files differindex 61fbfcd0..61fbfcd0 100755 --- a/Programming_in_C_using_ANSI_C/screenshots/screenshot1_1.png +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot1_1.png diff --git a/Programming_in_C_using_ANSI_C/screenshots/screenshot2.png b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot2.png Binary files differindex df49d844..df49d844 100755 --- a/Programming_in_C_using_ANSI_C/screenshots/screenshot2.png +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot2.png diff --git a/Programming_in_C_using_ANSI_C/screenshots/screenshot2_1.png b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot2_1.png Binary files differindex df49d844..df49d844 100755 --- a/Programming_in_C_using_ANSI_C/screenshots/screenshot2_1.png +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot2_1.png diff --git a/Programming_in_C_using_ANSI_C/screenshots/screenshot3.png b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot3.png Binary files differindex 42d9aec9..42d9aec9 100755 --- a/Programming_in_C_using_ANSI_C/screenshots/screenshot3.png +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot3.png diff --git a/Programming_in_C_using_ANSI_C/screenshots/screenshot3_1.png b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot3_1.png Binary files differindex 42d9aec9..42d9aec9 100755 --- a/Programming_in_C_using_ANSI_C/screenshots/screenshot3_1.png +++ b/Programming_in_C_using_ANSI_C_by_Ashok_N_Kamthane/screenshots/screenshot3_1.png diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb index e80ad105..e80ad105 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb index c9ef92fc..c9ef92fc 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb index def9a8d2..def9a8d2 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb index 306b8075..306b8075 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb index 89228f7b..89228f7b 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb index 6d5a38a5..6d5a38a5 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb index 5aea15e0..5aea15e0 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb index 9ff8c9be..9ff8c9be 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18_1.ipynb index d667f507..d667f507 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter19_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter19_1.ipynb index 61831463..61831463 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter19_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter19_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1_1.ipynb index c048e488..c048e488 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter20_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter20_1.ipynb index aa2212ac..aa2212ac 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter20_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter20_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter21_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter21_1.ipynb index eaa1c595..eaa1c595 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter21_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter21_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter22_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter22_1.ipynb index b0dd3f11..b0dd3f11 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter22_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter22_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter23_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter23_1.ipynb index 0046f9dc..0046f9dc 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter23_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter23_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter24_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter24_1.ipynb index fae1af80..fae1af80 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter24_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter24_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter25_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter25_1.ipynb index 15760b75..15760b75 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter25_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter25_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter2_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter2_1.ipynb index c0146fd8..c0146fd8 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter2_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter2_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter3_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter3_1.ipynb index dee2bda5..dee2bda5 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter3_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter3_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter4_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter4_1.ipynb index edb5d12d..edb5d12d 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter4_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter4_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter5_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter5_1.ipynb index 8b6286d1..8b6286d1 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter5_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter5_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter6_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter6_1.ipynb index 7d2fb138..7d2fb138 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter6_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter6_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter7_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter7_1.ipynb index ff247148..ff247148 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter7_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter7_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter8_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter8_1.ipynb index ad182efa..ad182efa 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter8_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter8_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter9_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter9_1.ipynb index b7d05043..b7d05043 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter9_1.ipynb +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter9_1.ipynb diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/README.txt b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/README.txt index bf375bb7..bf375bb7 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/README.txt +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/README.txt diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/11q.png b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/11q.png Binary files differindex 2588894e..2588894e 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/11q.png +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/11q.png diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/22q.png b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/22q.png Binary files differindex c4657f48..c4657f48 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/22q.png +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/22q.png diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/33q.png b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/33q.png Binary files differindex a84b06c6..a84b06c6 100644..100755 --- a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/33q.png +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/33q.png diff --git a/Quantum_mechanics_by_M.C.Jain/README.txt b/Quantum_mechanics_by_M.C.Jain/README.txt index 7699ea3d..7699ea3d 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/README.txt +++ b/Quantum_mechanics_by_M.C.Jain/README.txt diff --git a/Quantum_mechanics_by_M.C.Jain/chapter13_1.ipynb b/Quantum_mechanics_by_M.C.Jain/chapter13_1.ipynb index 9d30125f..9d30125f 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/chapter13_1.ipynb +++ b/Quantum_mechanics_by_M.C.Jain/chapter13_1.ipynb diff --git a/Quantum_mechanics_by_M.C.Jain/chapter2_1.ipynb b/Quantum_mechanics_by_M.C.Jain/chapter2_1.ipynb index 3d83df64..3d83df64 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/chapter2_1.ipynb +++ b/Quantum_mechanics_by_M.C.Jain/chapter2_1.ipynb diff --git a/Quantum_mechanics_by_M.C.Jain/chapter3_1.ipynb b/Quantum_mechanics_by_M.C.Jain/chapter3_1.ipynb index 7ef8f5c9..7ef8f5c9 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/chapter3_1.ipynb +++ b/Quantum_mechanics_by_M.C.Jain/chapter3_1.ipynb diff --git a/Quantum_mechanics_by_M.C.Jain/chapter4_1.ipynb b/Quantum_mechanics_by_M.C.Jain/chapter4_1.ipynb index 214047e7..214047e7 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/chapter4_1.ipynb +++ b/Quantum_mechanics_by_M.C.Jain/chapter4_1.ipynb diff --git a/Quantum_mechanics_by_M.C.Jain/chapter5_1.ipynb b/Quantum_mechanics_by_M.C.Jain/chapter5_1.ipynb index 04b23240..04b23240 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/chapter5_1.ipynb +++ b/Quantum_mechanics_by_M.C.Jain/chapter5_1.ipynb diff --git a/Quantum_mechanics_by_M.C.Jain/chapter7_1.ipynb b/Quantum_mechanics_by_M.C.Jain/chapter7_1.ipynb index 79c50291..79c50291 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/chapter7_1.ipynb +++ b/Quantum_mechanics_by_M.C.Jain/chapter7_1.ipynb diff --git a/Quantum_mechanics_by_M.C.Jain/chapter8_1.ipynb b/Quantum_mechanics_by_M.C.Jain/chapter8_1.ipynb index 3d7aa4fd..3d7aa4fd 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/chapter8_1.ipynb +++ b/Quantum_mechanics_by_M.C.Jain/chapter8_1.ipynb diff --git a/Quantum_mechanics_by_M.C.Jain/screenshots/image1.png b/Quantum_mechanics_by_M.C.Jain/screenshots/image1.png Binary files differindex ffcc2d4e..ffcc2d4e 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/screenshots/image1.png +++ b/Quantum_mechanics_by_M.C.Jain/screenshots/image1.png diff --git a/Quantum_mechanics_by_M.C.Jain/screenshots/image2.png b/Quantum_mechanics_by_M.C.Jain/screenshots/image2.png Binary files differindex 3b19958a..3b19958a 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/screenshots/image2.png +++ b/Quantum_mechanics_by_M.C.Jain/screenshots/image2.png diff --git a/Quantum_mechanics_by_M.C.Jain/screenshots/image3.png b/Quantum_mechanics_by_M.C.Jain/screenshots/image3.png Binary files differindex fa6219c9..fa6219c9 100644..100755 --- a/Quantum_mechanics_by_M.C.Jain/screenshots/image3.png +++ b/Quantum_mechanics_by_M.C.Jain/screenshots/image3.png diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch10.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch10.ipynb index 6a3f315f..6a3f315f 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch10.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch10.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch11.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch11.ipynb index 995e4b34..995e4b34 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch11.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch11.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch12.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch12.ipynb index 65822118..65822118 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch12.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch12.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch13.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch13.ipynb index 2ae8430e..2ae8430e 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch13.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch13.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch2.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch2.ipynb index e633285c..e633285c 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch2.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch2.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch3.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch3.ipynb index 8398ad62..8398ad62 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch3.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch3.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch4.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch4.ipynb index 7b8dede2..7b8dede2 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch4.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch4.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch5.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch5.ipynb index ed9a3817..ed9a3817 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch5.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch5.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb index 39e9bf33..39e9bf33 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb index 395884ba..395884ba 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb index 99400d20..99400d20 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb index 9a122fc2..9a122fc2 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png Binary files differindex 30a6d77b..30a6d77b 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png Binary files differindex 406a0613..406a0613 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png Binary files differindex 97d43bd7..97d43bd7 100644..100755 --- a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter10_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter10_2.ipynb new file mode 100755 index 00000000..999b0af7 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter10_2.ipynb @@ -0,0 +1,160 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10: Crystal Growth and Epitaxy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1 Page 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**16;#atoms concentration\n",
+ "m=60;#mass\n",
+ "A=10.8 #atomic weight\n",
+ "d=2.53;#density\n",
+ "k=.8;#constant\n",
+ "Na=6.02*10**23;#avagadro's no.\n",
+ "\n",
+ "#calculation\n",
+ "C=N/k;#initial concentration\n",
+ "V=m*10**3/d;#volume\n",
+ "Nb=C*V;#no. of bororn atoms\n",
+ "M=Nb*A/Na;#mass\n",
+ "\n",
+ "#result\n",
+ "print\"initial concentration is\",round(C,2),\"boron atoms/cm^3\"\n",
+ "print\"mass of boron added is\",round(M*1000,3),\"mg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "initial concentration is 1.25e+16 boron atoms/cm^3\n",
+ "mass of boron added is 5.318 mg\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3 Page 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "T=300;#K\n",
+ "D=3.64;#diameter\n",
+ "Ns=7.54*10**14;#concentration\n",
+ "P1=1;#pressure\n",
+ "P2=10**-4;#pressure\n",
+ "P3=10**-8;#pressure\n",
+ "M=32;#mass\n",
+ "\n",
+ "#calculation\n",
+ "t1=Ns*(M*T)**.5/(2.64*10**20*P1);#time for P1\n",
+ "t2=Ns*(M*T)**.5/(2.64*10**20*P2);#time for P2\n",
+ "t3=Ns*(M*T)**.5/(2.64*10**20*P3);#time for P3\n",
+ "\n",
+ "#result \n",
+ "print\"time for P1 is\",round(t1*1000,2),\"ms\"\n",
+ "print\"time for P2 is\",round(t2,2),\"s\"\n",
+ "print\"time for P3 is\",round(t3/3600,2),\"hr\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time for P1 is 0.28 ms\n",
+ "time for P2 is 2.8 s\n",
+ "time for P3 is 7.77 hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4 Page 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "A=.5;#area\n",
+ "L=10;#length\n",
+ "T=1173;#temperature\n",
+ "t=2.8;#thickness\n",
+ "d=6*10**14;#surface density\n",
+ "k=2.54*10**20;\n",
+ "P1=5.5*10**-2;#pressure\n",
+ "P2=1.1;#pressure\n",
+ "M1=69.72;#Mol.Wt of Ga\n",
+ "M2=74.92*2;#Mol.Wt of As2\n",
+ "\n",
+ "#calculation\n",
+ "A1=k*P1*A/(M1*T)**.5/(3*L**2);#arrival rate\n",
+ "A2=k*P2*A/(M2*T)**.5/(3*L**2);#arrival rate\n",
+ "G=A1*t/d;#growth rate\n",
+ "\n",
+ "#result\n",
+ "print\"growth rate of GaAs2 is\",round(G*60,0),\"nm/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "growth rate of GaAs2 is 23.0 nm/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter11_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter11_2.ipynb new file mode 100755 index 00000000..f6e1c0a2 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter11_2.ipynb @@ -0,0 +1,297 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: Film Formation"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "M1=28.9;#mass\n",
+ "M2=60.08;#mass\n",
+ "d1=2.33;#density of Si\n",
+ "d2=2.21;#density of SiO2\n",
+ "\n",
+ "#calculation\n",
+ "V1=M1/d1;#volume\n",
+ "V2=M2/d2;#volume\n",
+ "T=V1/V2;#thickness\n",
+ "\n",
+ "#result\n",
+ "print\"thickness of Si consumed per 100nm of SiO2 layer is\",round(T*100,2),\"nm\"\n",
+ "print\"(answer differ slightly due to approximation)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "thickness of Si consumed per 100nm of SiO2 layer is 45.63 nm\n",
+ "(answer differ slightly due to approximation)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page 386"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "a=.5;#width\n",
+ "l=1;#length\n",
+ "K=2.7;#dielectric constant\n",
+ "t=.5;#thickness\n",
+ "R=2.7;#resistivity\n",
+ "E=8.85*10**-14;#constant\n",
+ "\n",
+ "#calculation\n",
+ "Rc=R*l/a**2*E*K*l/t/2;#intrinsic RC\n",
+ "\n",
+ "#result\n",
+ "print\"intrinsic RC is\",round(Rc*10**12,2),\"ps\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "intrinsic RC is 2.58 ps\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "C=40;#capacitance\n",
+ "A=1.28;#cell size\n",
+ "k1=3.9;#dielectric constant\n",
+ "k2=25;#dielectric constant\n",
+ "\n",
+ "#calculation\n",
+ "Ae=k1/k2*A;#cell size\n",
+ "\n",
+ "#result\n",
+ "print\"equivalent cell size is\",round(Ae,2),\"micro-m^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "equivalent cell size is 0.2 micro-m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page 394 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "T=500;#temperature\n",
+ "t=30;#min\n",
+ "ZL=16;\n",
+ "Z=5;\n",
+ "H=1;\n",
+ "D=2*10**-8;#cm^2/sec\n",
+ "S=.8;#%\n",
+ "Dr=1.16;#density ratio\n",
+ "\n",
+ "#calculation\n",
+ "d=2*(D*t*60)**.5*Z*H/ZL*S*Dr;#depth\n",
+ "\n",
+ "#result\n",
+ "print\"depth is\",round(d*100,2),\"micro-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "depth is 0.35 micro-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5 Page 396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "k1=3.9;#dielectric constant for SiO2\n",
+ "k2=2.6;#dielectric constant for CuAl\n",
+ "r1=2.7;#resistivity of Al\n",
+ "r2=1.7;#resistivity of Cu\n",
+ "\n",
+ "#calculation\n",
+ "P=r2/r1*k2/k1*100;\n",
+ "\n",
+ "#result\n",
+ "print\"reduction of RC time is\",round(P,0),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "reduction of RC time is 42.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6 Page 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "R1=1;\n",
+ "R2=.1;\n",
+ "T=5.5;#time\n",
+ "t1=1;#layer1\n",
+ "t2=.01;#layer2\n",
+ "\n",
+ "#calculation\n",
+ "r=((t1/R1)+(t2/R2))/T;#removal rate\n",
+ "\n",
+ "#result\n",
+ "print\"removal rate is\",round(r,2),\"micro-m/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "removal rate is 0.2 micro-m/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7 Page 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "R=.6;#resistance\n",
+ "r=18;#resistivity\n",
+ "\n",
+ "#calculation\n",
+ "t=r/R;#thickness\n",
+ "\n",
+ "#result\n",
+ "print\"film thickness is\",round(t*10,2),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "film thickness is 300.0 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter12_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter12_2.ipynb new file mode 100755 index 00000000..ac39a0ca --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter12_2.ipynb @@ -0,0 +1,199 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: Lithography and Etching"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1 Page 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "l=.2;#mm\n",
+ "t=1;#time\n",
+ "F=30;#flow\n",
+ "p=350;#particles\n",
+ "\n",
+ "#calculation\n",
+ "V=F*pi*(l/2)**2*t;#volume\n",
+ "N=p*V;#number\n",
+ "\n",
+ "#result\n",
+ "print\"air volume in 1min in waafer\",round(V,3),\"m^3\"\n",
+ "print\"number of dust particles is\",round(N,0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "air volume in 1min in waafer 0.942 m^3\n",
+ "number of dust particles is 330.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2 Page 414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Et1=90;#mJ/cm^2\n",
+ "E11=45;#mJ/cm^2\n",
+ "Et2=7.0;#mJ/cm^2\n",
+ "E12=12.0;#mJ/cm^2\n",
+ "\n",
+ "#calculation\n",
+ "G1=(log(Et1/E11))**-1;#gamma1\n",
+ "G2=(log(E12/Et2))**-1;#gamma2\n",
+ "\n",
+ "#result\n",
+ "print\"for +ve resist gamma is\",round(G1,1)\n",
+ "print\"for -ve resist gamma is\",round(G2,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for +ve resist gamma is 1.4\n",
+ "for -ve resist gamma is 1.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3 Page 427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Ec=750.0;#centre\n",
+ "El=812.0;#left\n",
+ "Er=765.0;#right\n",
+ "Et=743.0;#top\n",
+ "Eb=798.0;#bottom\n",
+ "D=200.0;#diameter\n",
+ "\n",
+ "#calculation\n",
+ "A=(Ec+El+Er+Et+Eb)/5;#average\n",
+ "U=(El-Et)/(El+Et)*100;#uniformity\n",
+ "\n",
+ "#result\n",
+ "print\"average etch rate is\",round(A,1),\"nm/min\"\n",
+ "print\"etch rate uniformity is\",round(U,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "average etch rate is 773.6 nm/min\n",
+ "etch rate uniformity is 4.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4 Page 433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Pr=200;#pressure\n",
+ "Ph=5;#pressure\n",
+ "Na=6.02*10**23;#avagadro no.\n",
+ "R=.082;#rydberg's constant\n",
+ "T=300;#K\n",
+ "E1=10**9;#electron density\n",
+ "E2=10**10;#electron density\n",
+ "E3=10**11;#electron density\n",
+ "E4=10**12;#electron density\n",
+ "\n",
+ "#calculation\n",
+ "#For RIE system\n",
+ "N1=Pr/(760000*R*T)*Na/1000;\n",
+ "Ie1=E1/N1;#efficiency\n",
+ "Ie2=E2/N1;#efficiency\n",
+ "#For HDP system\n",
+ "N2=Ph/(760000*R*T)*Na/1000;\n",
+ "Ie3=E3/N2;#efficiency\n",
+ "Ie4=E4/N2;#efficiency\n",
+ "\n",
+ "#result\n",
+ "print\"Ionization efficiency for RIE ranges from\",round(Ie1,9),\"to\",round(Ie2,8)\n",
+ "print\"Ionization efficiency for HDP ranges from\",round(Ie3,6),\"to\",round(Ie4,5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ionization efficiency for RIE ranges from 1.55e-07 to 1.55e-06\n",
+ "Ionization efficiency for HDP ranges from 0.000621 to 0.00621\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter13_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter13_2.ipynb new file mode 100755 index 00000000..3f4fb21a --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter13_2.ipynb @@ -0,0 +1,201 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: Impurity Doping"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.1 Page 458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "T=1000;#temperature\n",
+ "C=10**19;#concentration\n",
+ "t=3600;#time\n",
+ "D=2*10**-14;#diffusivity\n",
+ "C2=10**15;#concentration\n",
+ "\n",
+ "#calculation\n",
+ "Ld=(D*t)**.5;#diffusion length\n",
+ "Q=1.13*C*Ld;\n",
+ "G1=-C/((pi)**.5*Ld);#gradient\n",
+ "x=2*Ld*2.75;#distance\n",
+ "G2=-C/((pi)**.5*Ld)*exp(-x**2/(4*Ld**2));#gradient\n",
+ "\n",
+ "#result\n",
+ "print\"Q(t) is\",round(Q,1),\"atoms/cm^2\"\n",
+ "print\"gradient 1 at x=0 is\",round(G1,2),\"cm^-4\"\n",
+ "print\"gradient 2 at x=0 is\",round(G2,2),\"cm^-4\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q(t) is 9.58836795289e+13 atoms/cm^2\n",
+ "gradient 1 at x=0 is -6.64903800669e+23 cm^-4\n",
+ "gradient 2 at x=0 is -3.45467180896e+20 cm^-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.2 Page 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "d=10**14;#dopant\n",
+ "d=1;#depth\n",
+ "Db=10**15;#doping\n",
+ "T=1473;#temperature\n",
+ "Do=24;\n",
+ "Ea=4.08;\n",
+ "k=8.614*10**-5;\n",
+ "\n",
+ "#calculation\n",
+ "#D=Do*exp(-Ea/(k*T));#diffusion\n",
+ "t=1190.0;#seconds\n",
+ "#on solving equation for t\n",
+ "\n",
+ "#result\n",
+ "print\"time required is\",round(t/60,0),\"minute\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time required is 20.0 minute\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.3 Page 473"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "v=100;#KeV\n",
+ "l=20;#mm\n",
+ "d=5*10**14;#dose\n",
+ "t=60;#time\n",
+ "Pr=.31*10**-4;#range\n",
+ "Ps=.07*10**-4;#straggle\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "N=d/((2*pi)**.5*Ps);#peak concentration\n",
+ "Q=d*pi*(l/2)**2;#ions\n",
+ "I=q*Q/t;#current\n",
+ "\n",
+ "#result\n",
+ "print\"peak concetration is at x=Rp and is\",round(N,2),\"ions/cm^3\"\n",
+ "print\"ion current is\",round(I*1000,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak concetration is at x=Rp and is 2.84958771715e+19 ions/cm^3\n",
+ "ion current is 0.42 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.4 Page 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "V=200;#KeV\n",
+ "p=99.996;#%\n",
+ "Rp=.53;\n",
+ "Sp=.093;\n",
+ "T=10**-4;\n",
+ "\n",
+ "#calculation\n",
+ "A=log(2*(pi)**.5*T);\n",
+ "#-(u**2+log(u))=A;\n",
+ "u=2.8;\n",
+ "d=2**.5*Sp*u+Rp;\n",
+ "\n",
+ "#result\n",
+ "print\"parameter u is\",round(u,2)\n",
+ "print\"thickness required is\",round(d,3),\"micro-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "parameter u is 2.8\n",
+ "thickness required is 0.898 micro-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter14_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter14_2.ipynb new file mode 100755 index 00000000..1ca4eeed --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter14_2.ipynb @@ -0,0 +1,233 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14: Integrated Devices"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.1 Page 493"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "\n",
+ "from math import *\n",
+ "Rs=1;#resistance\n",
+ "l=90;#length\n",
+ "w=10;#width\n",
+ "e=1.3;\n",
+ "\n",
+ "#calculation\n",
+ "n=l/w;#number\n",
+ "R=(n+e)*Rs;#resistance\n",
+ "\n",
+ "#result\n",
+ "print\"resistance is\",round(R,2),\"Kohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance is 10.3 Kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.2 Page 494"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "A=4*10**-8;#area\n",
+ "E=8.85*10**-14;#constant\n",
+ "V=5;#voltage\n",
+ "t1=1*10**-6;#nm\n",
+ "t2=5*10**-7;#nm\n",
+ "D1=3.9;#dielectric constant\n",
+ "D2=25;#dielectric constant\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "Qa=D1*E*A*V/t1;#charge\n",
+ "Na=Qa/q;#number\n",
+ "Qb=D2*E*A*V/t2;#charge\n",
+ "Nb=Qb/q;#number\n",
+ "\n",
+ "#result\n",
+ "print\"stored charge for Sio2 is\",round(Qa,16),\"C\"\n",
+ "print\"stored charge for Ta2O5 is\",round(Qb,15),\"C\"\n",
+ "print\"no. of electrons for Sio2 is\",round(Na,2),\"electrons\"\n",
+ "print\"no. of electrons for ta2O5 is\",round(Nb,2),\"electrons\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "stored charge for Sio2 is 6.9e-14 C\n",
+ "stored charge for Ta2O5 is 8.85e-13 C\n",
+ "no. of electrons for Sio2 is 431437.5 electrons\n",
+ "no. of electrons for ta2O5 is 5531250.0 electrons\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.3 Page 496"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "H=10**-8;#Henry\n",
+ "N=20;#turns\n",
+ "u=1.2*10**-6;#constant\n",
+ "\n",
+ "#calculation\n",
+ "r=H/u/N**2;#radius\n",
+ "\n",
+ "#result\n",
+ "print\"required radius is\",round(r*10**6,1),\"micro-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required radius is 20.8 micro-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.4 Page 507"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "l=5;#length\n",
+ "B=8;#MV/cm\n",
+ "\n",
+ "#calculation\n",
+ "V=l*B;#voltage\n",
+ "\n",
+ "#result\n",
+ "print\"gate-to-source voltage is\",round(V/10,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gate-to-source voltage is 4.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.5 Page 525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "t=1.5;#thickness\n",
+ "eo=3.9;\n",
+ "e1=7;\n",
+ "e2=25;#for Ta2O5\n",
+ "e3=80;#for TiO2\n",
+ "\n",
+ "#calculation\n",
+ "Dn=t*e1/eo;#nitride\n",
+ "D1=t*e2/eo;#for Ta2O5\n",
+ "D2=t*e3/eo;#for TiO2\n",
+ "\n",
+ "#result\n",
+ "print\"oxide thickness for nitride is\",round(Dn,2),\"nm\"\n",
+ "print\"oxide thickness for Ta2O5 is\",round(D1,2),\"nm\"\n",
+ "print\"oxide thickness for TiO2 is\",round(D2,2),\"nm\"\n",
+ "print\"the answer for part 3 is incorrect in the textbook\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "oxide thickness for nitride is 2.69 nm\n",
+ "oxide thickness for Ta2O5 is 9.62 nm\n",
+ "oxide thickness for TiO2 is 30.77 nm\n",
+ "the answer for part 3 is incorrect in the textbook\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter2_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter2_2.ipynb new file mode 100755 index 00000000..1f7a1eb3 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter2_2.ipynb @@ -0,0 +1,146 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Energy Bands and Carrier Concentration in Thermal Equillibrium"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1,Page21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "S=2;#spheres\n",
+ "D=3**.5/2;#diameter\n",
+ "\n",
+ "#calculation\n",
+ "R=D/2;#radius\n",
+ "V=4*pi*R**3/3;#volume\n",
+ "F=S*V;\n",
+ "\n",
+ "#result\n",
+ "print\"fraction of volume of bcc unit cell is\",round(F*100,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fraction of volume of bcc unit cell is 68.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example2.2, Page22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "T=300;#K\n",
+ "r=5.43*10**-10;#radius\n",
+ "A=6.023*10**23;#avagadro's no.\n",
+ "W=28.09;#atomic weight\n",
+ "\n",
+ "#calculation\n",
+ "N=8/r**3;#number\n",
+ "D=N*W/A;#density\n",
+ "\n",
+ "#result\n",
+ "print\"number is\",round(N/10**28)*10**22,\"atoms/cm^3\"\n",
+ "print\"density is\",round(D/1000000,2),\"g/cm^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number is 5e+22 atoms/cm^3\n",
+ "density is 2.33 g/cm^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Example2.4 Page41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "D=10**16;#doping\n",
+ "T=300;#K\n",
+ "N=9.65*10**9\n",
+ "Nc=2.86*10**19\n",
+ "\n",
+ "#calculation\n",
+ "p=N**2/D;#carrier concentration\n",
+ "F1=.0259*log(Nc/D);#fermi level\n",
+ "F2=.0259*log(D/N);#fermi level\n",
+ "\n",
+ "#result\n",
+ "print\"carrier concentration is\",round(p,2),\"cm^-3\"\n",
+ "print\"conduction band fermi level is\",round(F1,3),\"eV\"\n",
+ "print\"intrinsic level fermi level is\",round(F2,3),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "carrier concentration is 9312.25 cm^-3\n",
+ "conduction band fermi level is 0.206 eV\n",
+ "intrinsic level fermi level is 0.359 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter3_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter3_2.ipynb new file mode 100755 index 00000000..5bdaf9b1 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter3_2.ipynb @@ -0,0 +1,341 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Carrier Transport Phenomena"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 Page 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "M=.1;#mobility\n",
+ "t=300;#kelvin\n",
+ "n=.26;\n",
+ "q=1.6*10**-19;#C\n",
+ "m=9.1*10**-31;#kg\n",
+ "v=100000;#m/s\n",
+ "\n",
+ "#calculation\n",
+ "T=(n*m*M)/q;#mean free time\n",
+ "P=v*T;#mean free path\n",
+ "\n",
+ "#result\n",
+ "print\"mean free time is\",round(T*10**12,3),\"ps\"\n",
+ "print\"mean free path is\",round(P*10**9,1),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mean free time is 0.148 ps\n",
+ "mean free path is 14.8 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2 Page 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "D=10**16;#doping\n",
+ "n=1300;\n",
+ "q=1.6*10**-19;#Charge\n",
+ "\n",
+ "#calculation\n",
+ "R=1/(D*n*q);#resistivity\n",
+ "\n",
+ "#result\n",
+ "print\"resistivity is\",round(R,2),\"ohm-cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistivity is 0.48 ohm-cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3 Page 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "D=10**16;#doping\n",
+ "W=500;#width\n",
+ "A=2.5/1000;#area\n",
+ "I=1;#mA\n",
+ "B=10**-4;#Wb/cm^2\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "R=-1/(q*D);#hall coefficient\n",
+ "Vh=(R*I*B*W)/A;#hall voltage\n",
+ "\n",
+ "#result\n",
+ "print\"Hall voltage is\",round(Vh/10000,2),\"mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hall voltage is -1.25 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4 Page 58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "T=300;#K\n",
+ "n1=10**18;#concentration\n",
+ "n2=7*10**17;#concentration\n",
+ "x=.1;#distance\n",
+ "D=22.5;#diffusion coefficient\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "Id=q*D*(n1-n2)/x;#diffusion current\n",
+ "\n",
+ "#result\n",
+ "print\"diffusion current density is\",round(Id,2),\"A/cm^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diffusion current density is 10.8 A/cm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5 Page 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "E=50;#V/cm\n",
+ "x=1;#cm\n",
+ "t=.1#ms\n",
+ "\n",
+ "#calculation\n",
+ "Vd=x/t;#drift velocity\n",
+ "u=Vd/E;\n",
+ "D=.0259*u;#diffusivity\n",
+ "\n",
+ "#result\n",
+ "print\"drift velocity is\",round(Vd*1000,2),\"cm/s\"\n",
+ "print\"diffusivity is\",round(D*1000,2),\"cm^2/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drift velocity is 10000.0 cm/s\n",
+ "diffusivity is 5.18 cm^2/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6 Page 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "n1=10**14;#concentration\n",
+ "n2=9.65*10**9;\n",
+ "n3=10**13;#hole-pair concentration\n",
+ "t=2;#time\n",
+ "\n",
+ "#calculation\n",
+ "p=((n2)**2)/n1;\n",
+ "C=p+t*n3;#concentration\n",
+ "\n",
+ "#result\n",
+ "print\"change in minority carrier concentration is\",round(C/10**13)*10**13,\"cm^-3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in minority carrier concentration is 2e+13 cm^-3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7 Page 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "t1=100;#time\n",
+ "t2=200;#time\n",
+ "f=5;#factor\n",
+ "\n",
+ "#calculation\n",
+ "L=(t2-t1)/log(f/2**.5);#lifetime\n",
+ "\n",
+ "#result\n",
+ "print\"minority carrier lifetime is\",round(L,0),\"micro sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minority carrier lifetime is 79.0 micro sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8 Page 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "E1=4.05;#eV\n",
+ "E2=.2;#eV\n",
+ "n=2.86*10**19;#concentration\n",
+ "E3=.6;#eV\n",
+ "\n",
+ "#calculation\n",
+ "N1=n*exp(-(E1+E2)/.0259);#electron density\n",
+ "N3=n*exp(-(E2+E3)/.0259);#electron density\n",
+ "\n",
+ "#result\n",
+ "print\"emitted electron density 1 is\",round(N1/2,52),\"is almost equals 0\"\n",
+ "print\"emitted electron density 2 is\",round(round(N3/1000000)*10**6,2),\"cm^-3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "emitted electron density 1 is 1e-52 is almost equals 0\n",
+ "emitted electron density 2 is 1000000.0 cm^-3\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter4_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter4_2.ipynb new file mode 100755 index 00000000..c3109b03 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter4_2.ipynb @@ -0,0 +1,449 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: p-n Junction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1, Page92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Na=10**18;#concentration\n",
+ "Nd=10**15;#concentration\n",
+ "N=9.65*10**9\n",
+ "\n",
+ "#calculation\n",
+ "Vb=.0259*log(Na*Nd/N**2);#built in potential\n",
+ "\n",
+ "#result\n",
+ "print\"built in potential is\",round(Vb,3),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "built in potential is 0.777 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example4.2 Page96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Na=10**19;#concentration\n",
+ "Nd=10**16#concentration\n",
+ "N=9.65*10**9\n",
+ "q=1.6*10**-19#charge\n",
+ "Es=10**-12;#constant\n",
+ "\n",
+ "#calculation\n",
+ "Vb=.0259*log(Na*Nd/N**2);#voltage\n",
+ "W=(2*Es*Vb/q/Nd)**.5;#width\n",
+ "Em=q*W*Na/Es;#field\n",
+ "\n",
+ "#result\n",
+ "print\"built in potential is\",round(Vb,3),\"V\"\n",
+ "print\"depletion layer width is\",round(W*10**4,3),\"micro-m\"\n",
+ "print\"maximum field at zero bias is\",round(Em/10299,0),\"V/cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "built in potential is 0.896 V\n",
+ "depletion layer width is 0.335 micro-m\n",
+ "maximum field at zero bias is 5200.0 V/cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example4.3 Page 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "I=10**20;#impurity\n",
+ "W=.50;#width\n",
+ "q=1.6*10**-19;#charge\n",
+ "E=8.85*10**-14#constant\n",
+ "N=9.65*10**9;#concentration\n",
+ "\n",
+ "#calculation\n",
+ "Em=q*I*W**2/(8*11.9*E);#maximum field\n",
+ "Vb=.0259*I*W/N/2;#built-in voltage\n",
+ "\n",
+ "#result\n",
+ "print\"maximum field is\",round(Em/10**8,0),\"V/cm\"\n",
+ "print\"built-in voltage is\",round(Vb/10**8,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum field is 4748.0 V/cm\n",
+ "built-in voltage is 0.67 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example4.4 Page101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Na=2*10**19;#concentration\n",
+ "Nd=8*10**15;#concentration\n",
+ "V=4.0;#voltage\n",
+ "N=9.65*10**9\n",
+ "q=1.6*10**-19;#charge\n",
+ "E=10.53*10**-13#constant\n",
+ "\n",
+ "#calculation\n",
+ "Vb=.0259*log(Na*Nd/N**2);#voltage at zero bias\n",
+ "W1=(2*E*Vb/q/Nd)**.5;#width\n",
+ "C1=E/W1;#capacitance at zero bias\n",
+ "W2=(2*E*(Vb+V)/q/Nd)**.5;#width\n",
+ "C2=E/W2;#capacitance at reverse bias\n",
+ "\n",
+ "#result\n",
+ "print\"capacitance at zero bias is\",round(C1,11),\"F/cm^2\"\n",
+ "print\"capacitance at reverse bias is\",round(C2,11),\"F/cm^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "capacitance at zero bias is 2.723e-08 F/cm^2\n",
+ "capacitance at reverse bias is 1.172e-08 F/cm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5 Page109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Na=5*10**16;#concentration\n",
+ "Nd=10**16;#concentration\n",
+ "N=9.65*10**9\n",
+ "Dn=21\n",
+ "A=2*10**-4;#area\n",
+ "Dp=10\n",
+ "T=5*10**-7;#time\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "J=q*(N**2)*(((Dp/T)**.5)/Nd +((Dn/T)**.5)/Na);#current density\n",
+ "I=A*J;#ideal reverse current\n",
+ "\n",
+ "#result\n",
+ "print\"ideal reverse current is\",round(I,17),\"A\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ideal reverse current is 1.72e-15 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example4.6 Page110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Na=5*10**16;#concentration\n",
+ "Nd=10**16;#concentration\n",
+ "N=9.65*10**9\n",
+ "V=4;#voltage\n",
+ "E=10.53*10**-13;#constant\n",
+ "T=5*10**-7;#time\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "W=(2*E*(Na+Nd)/(q*Na*Nd)*(.0259*log(Na*Nd/N**2)+V))**.5;#width\n",
+ "J=q*N*W/T;#current density\n",
+ "\n",
+ "#result\n",
+ "print\"generation current density is\",round(J,9),\"A/cm^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "generation current density is 2.68e-07 A/cm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7 Page115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Nd=8*10**15;#concentration\n",
+ "V=1.00;#voltage\n",
+ "L=5*10**-4;#length of holes\n",
+ "q=1.6*10**-19;#charge\n",
+ "N=9.65*10**9\n",
+ "\n",
+ "#calculation\n",
+ "Q=q*L*N**2/Nd*(e**(1/.0259)-1);#minority carriers\n",
+ "\n",
+ "#result\n",
+ "print\"stored minority carriers is\",round(Q,2),\"C/cm^2\"\n",
+ "print\"the answer in book is slightly wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "stored minority carriers is 0.05 C/cm^2\n",
+ "the answer in book is slightly wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example4.8, Page120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Nd=5*10**16;#concentration\n",
+ "E=10.53*10**-13;#constant\n",
+ "N=5.7*10**5\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "Vb=E*N**2/2/q/Nd;#breakdown voltage\n",
+ "\n",
+ "#result\n",
+ "print\"breakdown voltage is\",round(Vb,1),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "breakdown voltage is 21.4 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example4.9 Page122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Nb=8*10**14;#concentration\n",
+ "E=8.85*10**-14;#constant\n",
+ "q=1.6*10**-19;#charge\n",
+ "V=500;#voltage\n",
+ "W=20*10**-4;#width\n",
+ "\n",
+ "#calculation\n",
+ "Wm=(24.8*E*V/q/Nb)**.5;#width\n",
+ "Vb=V*(W/Wm)*(2-(W/Wm));#breakdown voltage\n",
+ "\n",
+ "#result\n",
+ "print\"width is\",round(Wm*10**4,1),\"micro-m\"\n",
+ "print\"breakdown voltage is\",round(Vb,3),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "width is 29.3 micro-m\n",
+ "breakdown voltage is 449.771 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example4.10 Page126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "V=1.60;#voltage\n",
+ "C1=10**16;#concentration\n",
+ "C2=3*10**19;#concentration\n",
+ "D1=12.00;#dielectric constant\n",
+ "D2=13.00;#dielectric constant\n",
+ "E=8.85*10**-14;#constant\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "V1=D2*C2*V/(D1*C1+D2*C2);#voltage\n",
+ "V2=D1*C1*V/(D1*C1+D2*C2);#voltage\n",
+ "W1=(2*D1*D2*E*C2*V/(C1*D1+C2*D2)/q/C1)**.5;#depletion width\n",
+ "W2=(2*D1*D2*E*C1*V/(C1*D1+C2*D2)/q/C2)**.5;#depletion width\n",
+ "\n",
+ "#result\n",
+ "print\"electrostatic potential 1 is\",round(V1,2),\"V\"\n",
+ "print\"electrostatic potential 2 is\",round(V2,5),\"V\"\n",
+ "print\"depletion width 1 is\",round(W1,8),\"cm\"\n",
+ "print\"depletion width 2 is\",round(W2,11),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electrostatic potential 1 is 1.6 V\n",
+ "electrostatic potential 2 is 0.00049 V\n",
+ "depletion width 1 is 4.608e-05 cm\n",
+ "depletion width 2 is 1.536e-08 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter5_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter5_2.ipynb new file mode 100755 index 00000000..a6e9517e --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter5_2.ipynb @@ -0,0 +1,259 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: Bipolar Transistor and Related Devices"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "IEp=3.0000000;#mA\n",
+ "IEn=.0100000;#mA\n",
+ "ICp=2.9900000;#mA\n",
+ "ICn=.0010000;#mA\n",
+ "\n",
+ "#calculation\n",
+ "E=IEp/(IEp+IEn);#emitter efficiency\n",
+ "At=ICp/IEp;#base transport factor\n",
+ "Ao=E*At;#common-base current\n",
+ "IE=IEp+IEn;\n",
+ "IC=ICp+ICn;\n",
+ "Icbo=round(IC,6)-round((Ao*IE),6);#ICBO\n",
+ "\n",
+ "#result\n",
+ "print\"emitter efficiency is\",round(E,4)\n",
+ "print\"base transport factor is\",round(At,4)\n",
+ "print\"common-base current is\",round(Ao,4)\n",
+ "print \"ICBO is\",round(Icbo*100,4),\"micro-amp\"\n",
+ "print\"(slight change in the answer due to round off error)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "emitter efficiency is 0.9967\n",
+ "base transport factor is 0.9967\n",
+ "common-base current is 0.9934\n",
+ "ICBO is 0.1 micro-amp\n",
+ "(slight change in the answer due to round off error)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "C1=10**19;#concentration\n",
+ "C2=10**17;#concentration\n",
+ "C3=5*10**15;#concentration\n",
+ "T1=10**-8;#s\n",
+ "T2=10**-7;#s\n",
+ "T3=10**-6;#s\n",
+ "A=.05;#area\n",
+ "V=.6;#V\n",
+ "De=1;\n",
+ "Dp=10;\n",
+ "Dc=2;\n",
+ "W=.5;#width\n",
+ "n=9.65*10**9;#constant\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "Lp=(Dp*T2)**.5;#base region\n",
+ "Le=(De*T1)**.5;#emitter region\n",
+ "P=n**2/C2;\n",
+ "N=n**2/C1;\n",
+ "Iep=q*A*N*e**23.17*10**5/W;#A\n",
+ "Icp=Iep;#A\n",
+ "Ien=q*A*N*(e**23.17-1)*100;#A\n",
+ "Ao=Icp/(Iep+Ien);#current\n",
+ "\n",
+ "#result\n",
+ "print\"common-base current gain is\",round(Ao,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "common-base current gain is 0.9995\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "IEp=3.0000000;#mA\n",
+ "IEn=.0100000;#mA\n",
+ "ICp=2.9900000;#mA\n",
+ "ICn=.0010000;#mA\n",
+ "Icbo=.87e-6;#ICBO\n",
+ "\n",
+ "#calculation\n",
+ "E=IEp/(IEp+IEn);#emitter efficiency\n",
+ "At=ICp/IEp;#base transport factor\n",
+ "Ao=E*At;#common-base current\n",
+ "IE=IEp+IEn;#A\n",
+ "IC=ICp+ICn;#A\n",
+ "B=Ao/(1.0000-Ao)+1;\n",
+ "Iceo=(B+1)*Icbo;#A\n",
+ "\n",
+ "#result\n",
+ "print\"common-emitter current gain is\",round(B,4)\n",
+ "print\"ICEO is\",round(Iceo*10**4,2)/10**4,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "common-emitter current gain is 150.5\n",
+ "ICEO is 0.000132 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "E1=1.62;#eV\n",
+ "E2=1.42;#eV\n",
+ "B1=1.42;#eV\n",
+ "B2=1.42;#eV\n",
+ "De=10**18;\n",
+ "Db=10**15;\n",
+ "\n",
+ "#xalculation\n",
+ "B=e**((E1-E2)/.0259);#beta\n",
+ "Nb=B*Db;#doping\n",
+ "\n",
+ "#result\n",
+ "print\"improvement is\",round(B,0),\"times\"\n",
+ "print\"increase of base doping is\",round(Nb,0),\"cm^-3\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "improvement is 2257.0 times\n",
+ "increase of base doping is 2.25748744092e+18 cm^-3\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "I1=.4;#mA\n",
+ "I2=.6;#mA\n",
+ "a1=.01;#alpha1\n",
+ "a2=.9999;#alpha2\n",
+ "\n",
+ "#calculation\n",
+ "Ia=(I1+I2)/(1-a1);#forward blocking character 1\n",
+ "Ib=(I1+I2)/(1-a2);#forward blocking character 2\n",
+ "\n",
+ "#result\n",
+ "print\"forward blocking character 1 is\",round(Ia,2),\"mA\"\n",
+ "print\"forward blocking character 2 is\",round(Ib/1000,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "forward blocking character 1 is 1.01 mA\n",
+ "forward blocking character 2 is 10.0 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter6_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter6_2.ipynb new file mode 100755 index 00000000..27364864 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter6_2.ipynb @@ -0,0 +1,407 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: MOSFET and Related Devices"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1 Page 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**17;#concentration\n",
+ "n=9.65*10**9;#constant\n",
+ "Dp=11.9*8.85*10**-14;#dielectric permitivity\n",
+ "V=.026;#voltage\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "W=2*(Dp*V*log(N/n)/q/N)**.5#width\n",
+ "\n",
+ "#result\n",
+ "print\"maximum width is\",round(W*10**4,1),\"micro-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum width is 0.1 micro-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**17;#concentration\n",
+ "d=5*10**-7;#mm\n",
+ "D=3.9;#dielectric constant\n",
+ "Dp=8.85*10**-14;#constant\n",
+ "W=10**-5;#width\n",
+ "n=9.65*10**9;\n",
+ "\n",
+ "#calculation\n",
+ "C=D*Dp/d;#capacitance\n",
+ "w=2*.026*log(N/n);\n",
+ "Cmin=D*Dp/(d+(D/11.9)*W);#min. capacitance\n",
+ "P=Cmin*100/C;#%\n",
+ "\n",
+ "#result\n",
+ "print\"mininmum capacitance is\",round(Cmin,9),\"F/cm^2\"\n",
+ "print\"Cmin is about\",round(P,0),\"% of Co\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mininmum capacitance is 9.1e-08 F/cm^2\n",
+ "Cmin is about 13.0 % of Co\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**17;#concentration\n",
+ "d=5;#nm\n",
+ "Co=6.9*10**-7;#capacitance\n",
+ "q=1.6*10**-19;#charge\n",
+ "Q=-.98;\n",
+ "Qf=5*10**11;#cm^-2\n",
+ "\n",
+ "#calculation\n",
+ "V=Q-(q*Qf)/Co;#Voltage\n",
+ "\n",
+ "#result\n",
+ "print\"flat-band voltage is\",round(V,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "flat-band voltage is -1.1 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4 Page 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "import math\n",
+ "from scipy import integrate\n",
+ "t=20;#thickness\n",
+ "D1=0.00;\n",
+ "D2=2.00*10**-6;\n",
+ "q=1.6*10**-19;#charge\n",
+ "k=8.85*10**-14;#constant\n",
+ "Dc=3.9;#dielectric constant\n",
+ "\n",
+ "#calculation\n",
+ "C=q/Dc/k;#constant\n",
+ "def integrand(x):\n",
+ " return x*(10**18-5*10**23*x)\n",
+ "\n",
+ "V=integrate.quad(integrand,D1,D2)\n",
+ "\n",
+ "#result\n",
+ "print\"change in flat-band voltage is\",round(C*V[0],2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in flat-band voltage is 0.31 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5 Page 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**17;#concentration\n",
+ "d=8*10**-7;#mm\n",
+ "Vg=3;#V\n",
+ "q=1.6*10**-19;#charge\n",
+ "Co=4.32*10**-7;#capacitance\n",
+ "E=11.9*8.85*10**-14;#constant\n",
+ "F=.42;#V\n",
+ "\n",
+ "#calculation\n",
+ "K=(E*q*N)**.5/Co;\n",
+ "Vd=Vg-2*F+K**2*(1-(1+(2*Vg/K**2))**.5);#volatge\n",
+ "\n",
+ "#result\n",
+ "print\"VDsat is\",round(Vd,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "VDsat is 1.51 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6 Page 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**17;#concentration\n",
+ "Qf=5*10**11;\n",
+ "d=5;#\n",
+ "Vt=.6#terminal voltage\n",
+ "Co=6.9*10**-7;#capacitance\n",
+ "f=.42;#V\n",
+ "Vfb=-1.1;#Voltage forward biasisng\n",
+ "q=1.6*10**-19;#charge\n",
+ "E=11.9*8.85*10**-14;#constant\n",
+ "\n",
+ "#calculation\n",
+ "VT=Vfb+2*f+(2*E*q*N*2*f)**.5/Co;#voltage\n",
+ "Fb=(Vt-VT)*Co/q;#flat-band shift\n",
+ "\n",
+ "#result\n",
+ "print\"VT for gate oxide is\",round(VT,2),\"V\"\n",
+ "print\"flat-band shift is\",round(Fb,2),\"cm^-2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "VT for gate oxide is -0.02 V\n",
+ "flat-band shift is 2.65717617948e+12 cm^-2\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7 Page197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**17;#concentration\n",
+ "Qf=5*10**11;#factor\n",
+ "q=1.6*10**-19;#charge\n",
+ "d=500;#nm\n",
+ "Co=6.9*10**-9;#capacitance\n",
+ "f=.42;#V\n",
+ "Vfb=-1.1;#voltage\n",
+ "E=11.9*8.85*10**-14;#constant\n",
+ "\n",
+ "#calculation\n",
+ "Vt=Vfb+2*f+(2*E*q*N*2*f)**.5/Co;#voltage\n",
+ "\n",
+ "#result\n",
+ "print\"VT is\",round(Vt,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "VT is 24.12 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8 Page 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**17;#concentration\n",
+ "Qf=5*10**11;#factor\n",
+ "q=1.6*10**-19;#charge\n",
+ "d=500;#nm\n",
+ "Co=6.9*10**-7;#capacitance\n",
+ "f=.42;#V\n",
+ "Vbs=2;#Voltage\n",
+ "E=11.9*8.85*10**-14;#constant\n",
+ "\n",
+ "#calculation\n",
+ "dVt=((2*E*q*N*2*f)**.5/Co)*((2*f+Vbs)**.5-(2*f)**.5);#change in threshold voltage\n",
+ "\n",
+ "#result\n",
+ "print\"change in threshold voltage is\",round(dVt,1),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in threshold voltage is 0.2 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9 Page 213"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=10**17;#concentration\n",
+ "Qf=5*10**11;#factor\n",
+ "q=1.6*10**-19;#charge\n",
+ "d=5;#nm\n",
+ "dsi=5*10**-6;#nm\n",
+ "Co=6.9*10**-7;#capacitance\n",
+ "f=.42;#V\n",
+ "Vfb=-1.1;#Voltage\n",
+ "E=11.9*8.85*10**-14;#constant\n",
+ "\n",
+ "#calculation\n",
+ "Vt=Vfb+2*f+q*N*dsi/Co;#threshold voltage\n",
+ "\n",
+ "#result\n",
+ "print\"threshold voltage is\",round(Vt,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "threshold voltage is -0.14 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter7_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter7_2.ipynb new file mode 100755 index 00000000..b30de678 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter7_2.ipynb @@ -0,0 +1,253 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7:MESFET and Related Devices"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1 Page 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "S=-4.4*10**15;#slope\n",
+ "q=1.6*10**-19;#charge\n",
+ "E=11.9*8.85*10**-14;#constant\n",
+ "Vb=.42;#Voltage\n",
+ "\n",
+ "#calculation\n",
+ "N=2/(q*E)/-S;#concentration\n",
+ "V=.0259*log(2.86*10**19/(2.7*10**15));#voltage\n",
+ "B=Vb+V;#barrier height\n",
+ "\n",
+ "#result\n",
+ "print\"donor concentration is\",round(N,2),\"cm^-3\"\n",
+ "print\"barrier height is\",round(B,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "donor concentration is 2.69753510033e+15 cm^-3\n",
+ "barrier height is 0.66 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2 Page 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Nd=10**16;#concentration\n",
+ "t=10**-6;#time\n",
+ "Js=6.5*10**-5;#A/cm^2\n",
+ "Nc=2.86*10**19;\n",
+ "q=1.6*10**-19;#charge\n",
+ "Dp=10;\n",
+ "E=4.096*10**-10;#constant\n",
+ "N=9.65*10**9;\n",
+ "\n",
+ "#calculation\n",
+ "Bn=.0259*log(110*300**2/Js);#barrier height\n",
+ "Vn=.0259*log(Nc/Nd);\n",
+ "V=Bn-Vn;#built-in potential\n",
+ "W=(2*E*V/q/Nd)**.5;#depletion layer width\n",
+ "Lp=(Dp*t)**.5;\n",
+ "Jp=q*Dp*N**2/Lp/Nd;#minority carrier current density\n",
+ "R=Js/Jp;#ratio\n",
+ "\n",
+ "#result\n",
+ "print\"built-in potential is\",round(V,2),\"V\"\n",
+ "print\"depletion layer width is\",round(W/10**8,14),\"cm\"\n",
+ "print\"ratio of Js to Jpo is\",round(R,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "built-in potential is 0.46 V\n",
+ "depletion layer width is 4.86e-12 cm\n",
+ "ratio of Js to Jpo is 13795541.35\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3 Page 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "A=10**-5;#area\n",
+ "R=10**-6;#resistance\n",
+ "Nd=5*10**19;\n",
+ "V=.8;#Voltage\n",
+ "M=.26*9.1*10**-31;#mass\n",
+ "I=1;#A\n",
+ "E=1.05*10**-12;#constant\n",
+ "h=1.05*10**-34;#constant\n",
+ "\n",
+ "#calculation\n",
+ "Rc=R/A;#ohmic resistance\n",
+ "C=2*(M*E)**.5/h*10;\n",
+ "Io=1/Rc*(Nd*10**6)**.5/C*exp(C*V/(Nd*10**6)**.5);#current\n",
+ "Vd=V-Nd**.5/C*log(Io/I)*1000;#voltage drop\n",
+ "\n",
+ "#result\n",
+ "print\"voltage drop is\",round(Vd*1000,2),\"mV\"\n",
+ "print\"the answer differs slightly from the book due to rounding off in the book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage drop is 21.94 mV\n",
+ "the answer differs slightly from the book due to rounding off in the book\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 Page 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=2*10**15;\n",
+ "T=300;#K\n",
+ "H=.89;#barrier height\n",
+ "D=12.4;\n",
+ "q=1.6*10**-19;#charge\n",
+ "E=8.85*10**-14;#constant\n",
+ "d=.6*10**-4;#thickness\n",
+ "\n",
+ "#calculation\n",
+ "Vp=q*N*d**2/(2*D*E);#pinch-off voltage\n",
+ "Vn=.026*log(4.7*10**17/N);\n",
+ "Vb=H-Vn;#built-in potential\n",
+ "\n",
+ "#result\n",
+ "print\"pinch-off voltage is\",round(Vp,3),\"V\"\n",
+ "print\"built-in potential is\",round(Vb,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pinch-off voltage is 0.525 V\n",
+ "built-in potential is 0.75 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5 Page 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=2*10**18;\n",
+ "q=1.6*10**-19;#charge\n",
+ "E=8.85*10**-14;#constant\n",
+ "d=40*10**-7;#thickness\n",
+ "H=.85;#barrier height\n",
+ "D=12.3;#dielectric constant\n",
+ "V=.23;#Voltage\n",
+ "\n",
+ "#calculation\n",
+ "Vp=q*N*d**2/(2*D*E);#volt\n",
+ "Vt=H-V-Vp;#threshold voltage\n",
+ "Ns=D*E/(q*(d+11*10**-7))*1.73;#electron gas concentration\n",
+ "\n",
+ "#result\n",
+ "print\"pinch-off voltage is\",round(Vp,2),\"V\"\n",
+ "print\"two-dimensional electron gas concentration is\",round(Ns,2),\"cm^-2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pinch-off voltage is 2.35 V\n",
+ "two-dimensional electron gas concentration is 2.30783272059e+12 cm^-2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter8_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter8_2.ipynb new file mode 100755 index 00000000..15a1e48b --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter8_2.ipynb @@ -0,0 +1,220 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8:Microwave Diodes, Quantum-Effect, and Hot-Electron Devices"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1 Page 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "L=10*10**-9;#inductance\n",
+ "C=4*10**-12;#capacitance\n",
+ "\n",
+ "#calculation\n",
+ "Z=(L/C)**.5;#impedence\n",
+ "\n",
+ "#result\n",
+ "print\"characteristics impedence is\",round(Z,2),\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "characteristics impedence is 50.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2 Page 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "a=.05;#m\n",
+ "b=.025;#cm\n",
+ "d=.1;#m\n",
+ "c=3*10**8;#speed\n",
+ "\n",
+ "#calculation\n",
+ "f=c/2*((1/a)**2+(1/d)**2)**.5;#frequency\n",
+ "\n",
+ "#result\n",
+ "print\"resonant frequncy is\",round(f/10**9,3),\"GHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequncy is 3.354 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3 Page 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "b=10**-4;\n",
+ "W=6*10**-4;#width\n",
+ "F=3.3*10**5;#field\n",
+ "Q=2*10**12;#charge density\n",
+ "q=1.6*10**-19;#charge\n",
+ "D=11.9;\n",
+ "E=8.85*10**-14;#constant\n",
+ "\n",
+ "#calculation\n",
+ "a=W-b;\n",
+ "Vb=(F*10**-4+(F-q*Q/D/E)*a);#brekdown voltage\n",
+ "Fd=13/a;#field\n",
+ "f=10**7/2/a;#frequency\n",
+ "\n",
+ "#result\n",
+ "print\"breakdown voltage is\",round(Vb,2),\"V\"\n",
+ "print\"field in drift region is\",round(Fd,2),\"V/cm\"\n",
+ "print\"frequency is\",round(f/10**9,2),\"GHz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "breakdown voltage is 46.07 V\n",
+ "field in drift region is 26000.0 V/cm\n",
+ "frequency is 10.0 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example8.4 Page269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "l=10;#length\n",
+ "L=10**-3;\n",
+ "v=10**7;#velocity\n",
+ "\n",
+ "#calculation\n",
+ "t=L/v;#time\n",
+ "\n",
+ "#result\n",
+ "print\"time required is\",round(t*10**9,2),\"ns\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time required is 0.1 ns\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5 Page 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Lw=4.5;#nm\n",
+ "Vp1=700;#mV\n",
+ "Vp2=280;#mV\n",
+ "\n",
+ "#calculation\n",
+ "V=Vp1-Vp2;\n",
+ "\n",
+ "#result\n",
+ "print\"ground water level is 140mV and peak width is 1meV for\",round(Lw,1),\"nm\"\n",
+ "print\"difference of voltage drop due to accumulation and depletion region is\",round(V,2),\"mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ground water level is 140mV and peak width is 1meV for 4.5 nm\n",
+ "difference of voltage drop due to accumulation and depletion region is 420.0 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter9_2.ipynb b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter9_2.ipynb new file mode 100755 index 00000000..e1899052 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/Chapter9_2.ipynb @@ -0,0 +1,414 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9: Photonic Devices"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1 Page 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "T=.25*10**-4;#thickness\n",
+ "E=3.00;#energy\n",
+ "P=10;#power\n",
+ "a=4*10**4#absorption coefficient\n",
+ "Eg=1.12;\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "Es=10**-2*(1-exp(-a*T));#energy absorbed per second\n",
+ "Ee=(E-Eg)/E;#photons energy converted to heat\n",
+ "L=Ee*Es;#energy to lattice\n",
+ "Ps=(Es-L)/(q*Eg);#photons per second\n",
+ "\n",
+ "#result\n",
+ "print\"energy absorbed per second is\",round(Es*1000,1),\"mW\"\n",
+ "print\"portion of photons energy converted to heat is\",round(Ee*100,2),\"%\"\n",
+ "print\"number of photons per second is\",round(Ps,2),\"photons/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy absorbed per second is 6.3 mW\n",
+ "portion of photons energy converted to heat is 62.67 %\n",
+ "number of photons per second is 1.31691783089e+16 photons/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2 Page 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "t=500*10**-12;#time\n",
+ "\n",
+ "#calculation\n",
+ "f=1/(2*pi*t);#bandwidth\n",
+ "\n",
+ "#result\n",
+ "print\"modulation bandwidth is\",round(f/10**6,0),\"MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "modulation bandwidth is 318.0 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3 Page 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "n=3.6;#constant\n",
+ "\n",
+ "#calculation\n",
+ "R=((n-1)/(n+1))**2;#reflectivity\n",
+ "\n",
+ "#result\n",
+ "print\"reflected light is\",round(R*100,0),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "reflected light is 32.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4 Page 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "l=.94;#wavelength\n",
+ "n=3.6;\n",
+ "L=300;#length\n",
+ "\n",
+ "#calculation\n",
+ "A=l**2/(2*n*L);#mode spacing\n",
+ "\n",
+ "#result\n",
+ "print\"mode spacing is\",round(A*10**4,0),\"angstron\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mode spacing is 4.0 angstron\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5 Page 306"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "R1=.44;#front reflectivity\n",
+ "R2=.99;#rear reflectivity\n",
+ "L=300*10**-4;#length\n",
+ "W=5*10**-4;#width\n",
+ "a=100;#alpha\n",
+ "b=.1;#beta\n",
+ "g=100;\n",
+ "T=.9;#constant\n",
+ "\n",
+ "#calculation\n",
+ "J=g*T/b+1/b*(a+1/(2*L)*log(1/(R1*R2)));#current density\n",
+ "I=J*L*W;#current\n",
+ "\n",
+ "#result\n",
+ "print\"current density is\",round(J,2),\"A/cm^2\"\n",
+ "print\"threshold current is\",round(I*1000,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current density is 2038.51 A/cm^2\n",
+ "threshold current is 30.58 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6 Page 307"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "T1=27;#temperature\n",
+ "l=110;\n",
+ "\n",
+ "#calculation\n",
+ "T=T1+l*log(2);#temperature\n",
+ "\n",
+ "#result\n",
+ "print\"temperature is\",round(T,0),\"deg.Celsius\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 103.0 deg.Celsius\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.7 Page 313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "N=5*10**12;#photons/s\n",
+ "n=.8;#constant\n",
+ "l=5*10**-10;#lifetime\n",
+ "u=2500;\n",
+ "E=5000;#V/cm\n",
+ "L=10*10**-4;#length\n",
+ "q=1.6*10**-19;#charge\n",
+ "\n",
+ "#calculation\n",
+ "I=q*n*N*u*l*E/L;#photocurrent\n",
+ "G=u*l*E/L;#gain\n",
+ "\n",
+ "#result\n",
+ "print\"photocurrent is\",round(I*10**6,2),\"microAmp\"\n",
+ "print\"gain is\",round(G,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "photocurrent is 4.0 microAmp\n",
+ "gain is 6.25\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.8 Page 315"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "a=10**4;#cm^-1\n",
+ "R=.1;\n",
+ "\n",
+ "#calculation\n",
+ "X=-1/a*log(1/(2*(1-R)));#depth\n",
+ "\n",
+ "#result\n",
+ "print\"dpeth for half power absorbed is\",round(X,2),\"micro-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dpeth for half power absorbed is 0.59 micro-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9 Page 319 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "s=1.118;#m\n",
+ "h=1;#height\n",
+ "\n",
+ "#calculation\n",
+ "M=(1+(s/h)**2)**.5;#air mass\n",
+ "\n",
+ "#result\n",
+ "print\"air mass is\",round(M,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "air mass is 1.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.10 Page 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import *\n",
+ "Vs=.35;#voltage\n",
+ "Is=1*10**-9;#current\n",
+ "Il=.1;#A\n",
+ "Vl=.026;#V\n",
+ "\n",
+ "#calculation\n",
+ "Voc=Vl*log(Il/Is);#open-circuit voltage\n",
+ "P=-Is*Vs*(exp(Vs/Vl)-1)-(-Il*Vs);#power\n",
+ "\n",
+ "#result\n",
+ "print\"open-circuit voltage is\",round(Voc,2),\"V\"\n",
+ "print\"output power is\",round(P,4),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open-circuit voltage is 0.48 V\n",
+ "output power is 0.0348 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled1_1.png b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled1_1.png Binary files differnew file mode 100755 index 00000000..8d1f1d4b --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled1_1.png diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled1_2.png b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled1_2.png Binary files differnew file mode 100755 index 00000000..8d1f1d4b --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled1_2.png diff --git a/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled4_1.png b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled4_1.png Binary files differnew file mode 100755 index 00000000..26262f24 --- /dev/null +++ b/SEMICONDUCTOR_DEVICES_PHYSICS_AND_TECHNOLOGY_by_S_M_SZE/screenshots/Untitled4_1.png diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb index 8c2f7de1..8c2f7de1 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb index 0fac05b3..0fac05b3 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb index 9a036adf..9a036adf 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb index facfc968..facfc968 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb index 6fb3abe1..6fb3abe1 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb index 91205794..91205794 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb index 0c45660e..0c45660e 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb index f15e9068..f15e9068 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb index d1b99577..d1b99577 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb index a67b5b36..a67b5b36 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt index d7ee067d..d7ee067d 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png Binary files differindex a27fb7e7..a27fb7e7 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png Binary files differindex 200865e5..200865e5 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png Binary files differindex 27e6e441..27e6e441 100644..100755 --- a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt index 75687fcf..75687fcf 100644..100755 --- a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt +++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb index f027d9c4..f027d9c4 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb index bc23d089..bc23d089 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb index 067292ed..067292ed 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb index 96b8604f..96b8604f 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb index 887522eb..887522eb 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb index b327eada..b327eada 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_07.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_07.ipynb index 8b2c9855..8b2c9855 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_07.ipynb +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_07.ipynb diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/3.png b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/3.png Binary files differindex 4ad65a40..4ad65a40 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/3.png +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/3.png diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6.png b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6.png Binary files differindex 94d4ba2f..94d4ba2f 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6.png +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6.png diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6_2.png b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6_2.png Binary files differindex fbc443b6..fbc443b6 100644..100755 --- a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6_2.png +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6_2.png diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_1.ipynb index 7dd70c75..7dd70c75 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_2.ipynb index 7dd70c75..7dd70c75 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_1.ipynb index 6d358d9e..6d358d9e 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_2.ipynb index 6d358d9e..6d358d9e 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_1.ipynb index a797d4ab..a797d4ab 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_2.ipynb index a797d4ab..a797d4ab 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_1.ipynb index bdb23594..bdb23594 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_2.ipynb index bdb23594..bdb23594 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_1.ipynb index fafa0b0e..fafa0b0e 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_2.ipynb index fafa0b0e..fafa0b0e 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_1.ipynb index 9aa7f048..9aa7f048 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_2.ipynb index 9aa7f048..9aa7f048 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_1.ipynb index fa834201..fa834201 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_2.ipynb index fa834201..fa834201 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_1.ipynb index 12649dbf..12649dbf 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_2.ipynb index 12649dbf..12649dbf 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators.ipynb index 4e1844f5..4e1844f5 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators_1.ipynb index 4e1844f5..4e1844f5 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_1.ipynb index 26fcb300..26fcb300 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_2.ipynb index 26fcb300..26fcb300 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_1.ipynb index 8c9d4be1..8c9d4be1 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_2.ipynb index 8c9d4be1..8c9d4be1 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_1.ipynb index 3c077fb3..3c077fb3 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_2.ipynb index 3c077fb3..3c077fb3 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_1.ipynb index 836c8e51..836c8e51 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_2.ipynb index 836c8e51..836c8e51 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_1.ipynb index b5bf08a8..b5bf08a8 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_2.ipynb index b5bf08a8..b5bf08a8 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb index 5edbc818..5edbc818 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb index 5edbc818..5edbc818 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb index 567b5d06..567b5d06 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb index 567b5d06..567b5d06 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb index d1f2d4d1..d1f2d4d1 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb index d1f2d4d1..d1f2d4d1 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt index c0cc4050..c0cc4050 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png Binary files differindex 217570a6..217570a6 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png Binary files differindex 217570a6..217570a6 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png Binary files differindex 2bef312d..2bef312d 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png Binary files differindex 2bef312d..2bef312d 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png Binary files differindex 868b959e..868b959e 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png Binary files differindex 868b959e..868b959e 100644..100755 --- a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png diff --git a/The_Spirit_of_C/Chapter1.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter1.ipynb index 80b53e61..80b53e61 100755 --- a/The_Spirit_of_C/Chapter1.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter1.ipynb diff --git a/The_Spirit_of_C/Chapter10.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter10.ipynb index ed7b99e5..ed7b99e5 100755 --- a/The_Spirit_of_C/Chapter10.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter10.ipynb diff --git a/The_Spirit_of_C/Chapter11.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter11.ipynb index 241e1c1e..241e1c1e 100755 --- a/The_Spirit_of_C/Chapter11.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter11.ipynb diff --git a/The_Spirit_of_C/Chapter12.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter12.ipynb index 0195ed25..0195ed25 100755 --- a/The_Spirit_of_C/Chapter12.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter12.ipynb diff --git a/The_Spirit_of_C/Chapter13.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter13.ipynb index d363dc7a..d363dc7a 100755 --- a/The_Spirit_of_C/Chapter13.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter13.ipynb diff --git a/The_Spirit_of_C/Chapter14.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter14.ipynb index 380e83ef..380e83ef 100755 --- a/The_Spirit_of_C/Chapter14.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter14.ipynb diff --git a/The_Spirit_of_C/chapter2.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter2.ipynb index dc84a28d..dc84a28d 100755 --- a/The_Spirit_of_C/chapter2.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter2.ipynb diff --git a/The_Spirit_of_C/chapter3.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter3.ipynb index b498486d..b498486d 100755 --- a/The_Spirit_of_C/chapter3.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter3.ipynb diff --git a/The_Spirit_of_C/chapter4.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter4.ipynb index d13f3710..d13f3710 100755 --- a/The_Spirit_of_C/chapter4.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter4.ipynb diff --git a/The_Spirit_of_C/chapter5.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter5.ipynb index db420a5b..db420a5b 100755 --- a/The_Spirit_of_C/chapter5.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter5.ipynb diff --git a/The_Spirit_of_C/chapter6.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter6.ipynb index f50ff06b..f50ff06b 100755 --- a/The_Spirit_of_C/chapter6.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter6.ipynb diff --git a/The_Spirit_of_C/chapter7.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter7.ipynb index 33f7a4f3..33f7a4f3 100755 --- a/The_Spirit_of_C/chapter7.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter7.ipynb diff --git a/The_Spirit_of_C/chapter8.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter8.ipynb index baae6f9a..baae6f9a 100755 --- a/The_Spirit_of_C/chapter8.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter8.ipynb diff --git a/The_Spirit_of_C/chapter9.ipynb b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter9.ipynb index ae4771e3..ae4771e3 100755 --- a/The_Spirit_of_C/chapter9.ipynb +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/chapter9.ipynb diff --git a/The_Spirit_of_C/screenshots/Screenshot_1.png b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_1.png Binary files differindex dc7d579e..dc7d579e 100755 --- a/The_Spirit_of_C/screenshots/Screenshot_1.png +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_1.png diff --git a/The_Spirit_of_C/screenshots/Screenshot_2.png b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_2.png Binary files differindex 6762ca01..6762ca01 100755 --- a/The_Spirit_of_C/screenshots/Screenshot_2.png +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_2.png diff --git a/The_Spirit_of_C/screenshots/Screenshot_3.png b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_3.png Binary files differindex e55dd42a..e55dd42a 100755 --- a/The_Spirit_of_C/screenshots/Screenshot_3.png +++ b/The_Spirit_of_C_by_Henry_Mullish_and_Herbert_L_Cooper/screenshots/Screenshot_3.png diff --git a/Thermal_Engineering_by_K_K_Ramalingam/README.txt b/Thermal_Engineering_by_K_K_Ramalingam/README.txt index c6266e0d..c6266e0d 100644..100755 --- a/Thermal_Engineering_by_K_K_Ramalingam/README.txt +++ b/Thermal_Engineering_by_K_K_Ramalingam/README.txt diff --git a/Thermodynamics_An_Engineering_Approach/Chapter10.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter10_1.ipynb index df284751..df284751 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter10.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter10_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter11.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter11_1.ipynb index 460e3a17..460e3a17 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter11.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter11_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter12.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter12_1.ipynb index c181d0f6..c181d0f6 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter12.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter12_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter13.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter13_1.ipynb index 936d90ae..936d90ae 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter13.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter13_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter14.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter14_1.ipynb index f218441e..f218441e 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter14.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter14_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter15.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter15_1.ipynb index c167fe73..c167fe73 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter15.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter15_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter16.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter16_1.ipynb index 4326dc6f..4326dc6f 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter16.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter16_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter17.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter17_1.ipynb index 5b1b7ade..5b1b7ade 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter17.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter17_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter1.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter1_1.ipynb index 3e2c2051..3e2c2051 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter1.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter1_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter2.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter2_1.ipynb index db573fc6..db573fc6 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter2.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter2_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter3.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter3_1.ipynb index 9830dbfb..9830dbfb 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter3.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter3_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter4.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter4_1.ipynb index b9e964f0..b9e964f0 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter4.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter4_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter5.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter5_1.ipynb index da9be875..da9be875 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter5.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter5_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter6.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter6_1.ipynb index 0cebc0e1..0cebc0e1 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter6.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter6_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter7.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter7_1.ipynb index d5ab12d2..d5ab12d2 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter7.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter7_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter8.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter8_1.ipynb index e91e1b78..e91e1b78 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter8.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter8_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/Chapter9.ipynb b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter9_1.ipynb index 1008c6c0..1008c6c0 100755 --- a/Thermodynamics_An_Engineering_Approach/Chapter9.ipynb +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/Chapter9_1.ipynb diff --git a/Thermodynamics_An_Engineering_Approach/README.txt b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/README.txt index 2482fb63..2482fb63 100755 --- a/Thermodynamics_An_Engineering_Approach/README.txt +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/README.txt diff --git a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_10_Ex_10-1_Screenshot.png b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_10_Ex_10-1_Screenshot.png Binary files differindex ae3f5718..ae3f5718 100755 --- a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_10_Ex_10-1_Screenshot.png +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_10_Ex_10-1_Screenshot.png diff --git a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_10_Ex_10-1_Screenshot_1.png b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_10_Ex_10-1_Screenshot_1.png Binary files differindex ae3f5718..ae3f5718 100755 --- a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_10_Ex_10-1_Screenshot_1.png +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_10_Ex_10-1_Screenshot_1.png diff --git a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_14_Ex_14-2_Screenshot.png b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_14_Ex_14-2_Screenshot.png Binary files differindex a7d400a8..a7d400a8 100755 --- a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_14_Ex_14-2_Screenshot.png +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_14_Ex_14-2_Screenshot.png diff --git a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_14_Ex_14-2_Screenshot_1.png b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_14_Ex_14-2_Screenshot_1.png Binary files differindex a7d400a8..a7d400a8 100755 --- a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_14_Ex_14-2_Screenshot_1.png +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_14_Ex_14-2_Screenshot_1.png diff --git a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_8_Ex_8-4_Screenshot.png b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_8_Ex_8-4_Screenshot.png Binary files differindex 16c5fdb6..16c5fdb6 100755 --- a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_8_Ex_8-4_Screenshot.png +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_8_Ex_8-4_Screenshot.png diff --git a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_8_Ex_8-4_Screenshot_1.png b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_8_Ex_8-4_Screenshot_1.png Binary files differindex 16c5fdb6..16c5fdb6 100755 --- a/Thermodynamics_An_Engineering_Approach/screenshots/Chapter_8_Ex_8-4_Screenshot_1.png +++ b/Thermodynamics_An_Engineering_Approach_by_Michael_A_Boles_Yunus_A_Cengel/screenshots/Chapter_8_Ex_8-4_Screenshot_1.png diff --git a/Thermodynamics_Demystified/Chapter4.ipynb b/Thermodynamics_Demystified/Chapter4.ipynb deleted file mode 100755 index 235bb7b4..00000000 --- a/Thermodynamics_Demystified/Chapter4.ipynb +++ /dev/null @@ -1,729 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:c856359b943f772597028d78558909db2e2132e84bca2ae7745f1dba60abb237"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "Chapter 4:The First Law of Thermodynamics"
- ],
- "language": "python",
- "metadata": {},
- "outputs": []
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.1:PG-62"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#initialization of variables\n",
- "K=100 # spring constant in kN/m\n",
- "d=0.8 # dispacement of spring in m\n",
- " # to get total work we integrate from 0 to 0.8 displacement\n",
- "x1=0; # lower limit of integration\n",
- "x2=0.8; # upper limit of integration\n",
- "from scipy.integrate import quad\n",
- "\n",
- "# we find work\n",
- "def integrand(x,K):\n",
- " return K*x\n",
- "\n",
- "W12, err = quad(integrand, x1, x2, K) # integrating to get work\n",
- "Q12=W12; # by first law of thermodynamics\n",
- "print \"The Heat transfer is \",int(Q12),\" J\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Heat transfer is 32 J\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.2:PG-65"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "P= 5*746 # power of fan converted in watt\n",
- "t=1*60*60 # time converted to seconds\n",
- "\n",
- "# by first law of thermodynamics Q=delU + W\n",
- "# Q=0 hence -W=delU\n",
- "# first we find work input\n",
- "W=-P*t # work in J\n",
- "delU=-W # from 1st law\n",
- "print \"The internal energy increase is \",float(delU),\" J\"\n",
- "# The answer is approximated in textbook\n",
- "# our answer is precise\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The internal energy increase is 13428000.0 J\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.3:PG-65"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "P=400 # pressure in kPa\n",
- "T1=200 # initial temperature in degree celsius\n",
- "V1= 2 # initial volume in m^3\n",
- "Q=3500 # heat added in kJ\n",
- "v1=0.5342 # specific volume of steam at 200 degree celcius and 0.4 Mpa pressure from table C.3\n",
- "u1=2647 # specific internal energy in kJ/kg @ pressure = 0.4 MPa\n",
- "m=V1/v1 # mass in kg\n",
- "# we have a relation Between u2 and v2 from 1st law of thermodynamics\n",
- "v2=1.06 # specific volume at state 2 by trial and error and interpolation\n",
- "V2=m*v2 \n",
- "u2=((3500-400*(V2-V1))/m)+2647 # specific internal energy for v2=1.06 by trial and error\n",
- "\n",
- "# on interpolation from steam table at 0.4 MPa we get temperature \n",
- "T2=644 # temperature in degree celsius\n",
- "print \"The temperature for u2=\",round(u2),\" kJ and v2 =\",round(v2,3),\" kg/m^3 is \\n \",int(T2),\" degree celsius\"\n",
- "# this numerical is solved by trial and error thus refer to Appendix C"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The temperature for u2= 3372.0 kJ and v2 = 1.06 kg/m^3 is \n",
- " 644 degree celsius\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.4:PG-67"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "# initialization of variables\n",
- "P=400 # pressure in kPa\n",
- "T1=200 # initial tmperature in degree celsius\n",
- "V=2 # initial volume in m^3\n",
- "Q=3500 # heat added in kJ\n",
- "\n",
- "#solution\n",
- "h1=2860 # initial enthalpy @ 200*C and 400 kPa from steam table\n",
- "v=0.5342 # specific volume from steam table C.3 \n",
- "m=V/v;\n",
- "h2=(Q/m)+h1; # final enthalpy in kJ/kg from energy equation\n",
- "\n",
- "# NOW USING THIS ENTHLAPY AND INTERPOlATING FROM STEAM TABLE\n",
- "\n",
- "T2=600+(92.6/224)*100\n",
- "\n",
- "print \"The Final temperature is \",int(T2),\" degree Celsius\"\n",
- "# result is obtained from interpolation on steam table\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Final temperature is 641 degree Celsius\n"
- ]
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.5:PG-71"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "T1=300 # initial temperature in degree celsius\n",
- "T2=700 # final temperature in degree celsius\n",
- "P=150 # pressure in kPa\n",
- "m=3 # mass of steam in kg\n",
- "\n",
- "# solution\n",
- "# part (a)\n",
- "from scipy.integrate import quad\n",
- "\n",
- "# now we make function to integrate\n",
- "def integrand(T):\n",
- " return 2.07+(T-400)/1480\n",
- "\n",
- "I, err = quad(integrand, T1, T2) # integrating specific heat over temperature range\n",
- "delH=m*I #integrate('2.07+(T-400)/1480','T',T1,T2) # expressing as function of temperature and integrating\n",
- "\n",
- "print\" The change in Enthalpy is \",int(delH),\" kJ \\n\"\n",
- " \n",
- "# part(b)\n",
- "CPavg=delH/(m*(T2-T1)) # avg value of specific heat at constant pressure\n",
- "print \" The average value of Cp is \",round(CPavg,2),\" kJ/kg.*C\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The change in Enthalpy is 2565 kJ \n",
- "\n",
- " The average value of Cp is 2.14 kJ/kg.*C\n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.6,PG-72"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "m=1 # mass of nitrogen in kg\n",
- "T1=300 # initial temperature in Kelvin\n",
- "T2=1200 # final temperature in Kelvin\n",
- "M=28.0 # in kg/kmol\n",
- "# part(a)\n",
- "# the enthalpy change is found from gas table in App.E\n",
- "delh=36777-8723 # from gas table\n",
- "delH=delh/M \n",
- "print \" The entalpy change from gas table is \",round(delH),\" kJ/kg \\n\"\n",
- "\n",
- "# part (b) \n",
- "Cp=1.042 # from table B.2\n",
- "delH=Cp*(T2-T1)\n",
- "print \" The entalpy change by assuming constant specific heat is \",round(delH),\" kJ/kg\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The entalpy change from gas table is 1002.0 kJ/kg \n",
- "\n",
- " The entalpy change by assuming constant specific heat is 938.0 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.7:PG-76"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "x=0.7 # quality of steam\n",
- "P1=200 # initial pressure in kPa\n",
- "P2=800 # final pressure in kPa\n",
- "V=2 # volume in m^3\n",
- "# The values are taken from TABLE C.2\n",
- "vf1=0.0010 # specific volume of saturated liquid at 200 kPa\n",
- "vg1=0.8857 # specific volume of saturated gas at 200 kPa\n",
- "uf1=504.5 # specific internal energy of saturated liquid @ state 1\n",
- "ug1=2529.5 # speciific internal energy of saturated gas @ state 1\n",
- "\n",
- "v1=vf1+x*(vg1-vf1); # specific volume of vapour\n",
- "m=V/v1\n",
- "\n",
- "u1=uf1+x*(ug1-uf1) # specific internal energy of vapour @ state 1\n",
- "v2=v1 # constant volume process\n",
- "u2=((0.6761-0.6203)*(3661-3853)/(0.6761-0.6181))+3853 # from steam table @ 800kPa by interpolating\n",
- "Q=m*(u2-u1) # heat transfer\n",
- "print \"The heat transfer is \",round(Q,3),\" kJ\"\n",
- "# The answer in the textbook is approximated"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The heat transfer is 5630.537 kJ\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.8:PG-76"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "V=0.02 # volume in m^3\n",
- "P=400 # pressure in kPa\n",
- "T1=50+273 # initial temperature in kelvin\n",
- "T2=700+273 # final temperature in kelvin\n",
- "Q=50 # heat added in kJ\n",
- "R=287 # constant for air\n",
- "Cp=1 # constant for specific heat of air\n",
- "\n",
- "# using the ideal gas equation\n",
- "\n",
- "m=P*1000*V/(R*T1) # mass of air in kg\n",
- "W=Q-(m*Cp*(T2-T1)) # work done from first law\n",
- "# result\n",
- "print \"The Paddle work is \",round(W,2),\" kJ\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Paddle work is -6.09 kJ\n"
- ]
- }
- ],
- "prompt_number": 37
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.9,PG-77"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "V1=2 # initial volume in m^3\n",
- "V2=0.2 # final volume in m^3\n",
- "T1=20+273 # temperature in kelvin\n",
- "P=200 # pressure in kPa\n",
- "R=0.287 # constant for air\n",
- "gama=1.4 # polytropic index for air\n",
- "Cv=0.717 # specific heat at constant volume for air\n",
- "\n",
- "#solution\n",
- "\n",
- "#using the ideal gas equation\n",
- "m=(P*V1)/(R*T1) # mass in kg\n",
- "# process is adiabatic thus\n",
- "T2=T1*((V1/V2)**(gama-1)) # final temperature\n",
- "\n",
- "W=-m*Cv*(T2-T1) # work from first law\n",
- "print \"The Work is \",int(W),\" kJ\"\n",
- "# solution is approximated in textbook"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Work is -1510 kJ\n"
- ]
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.10:PG-79"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "# initialization of variables\n",
- "P1=2000.0 # initial pressure in kPa\n",
- "T1=600.0 # initial temperature in degree celsius\n",
- "p2=600.0 # final pressure in kPa\n",
- "T2=200.0 # final temperature in degree celsius\n",
- "d1=0.06 # diameter of inlet pipe in metre\n",
- "d2=0.120 # diameter of outlet pipe in metre\n",
- "V1=20.0 # velocity at inlet in m/s\n",
- "\n",
- "# solution\n",
- "# from superheat table C.3 values are noted\n",
- "v1=0.1996 # specific volume of superheated steam @ 600*C and 2000 kPa\n",
- "v2=0.3520 # specific volume of superheated steam @ 200*C and 2000 kPa\n",
- "rho1=1/v1 # initial density\n",
- "rho2=1/v2 # final density\n",
- "A1=(math.pi*d1**2)/4 # inlet area\n",
- "A2=(math.pi*d2**2)/4 # exit area\n",
- "\n",
- "V2=(rho1*A1*V1)/(rho2*A2) # from continuity equation\n",
- "print \" The Exit velocity is \",round(V2,2),\" m/s \\n\"\n",
- "\n",
- "mdot=rho1*A1*V1 # mass flow rate\n",
- "print\" The mass flow rate is \",round(mdot,3),\" kg/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Exit velocity is 8.82 m/s \n",
- "\n",
- " The mass flow rate is 0.283 kg/s\n"
- ]
- }
- ],
- "prompt_number": 45
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.11:PG-82"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "P1=8000 # initial pressure in kPa\n",
- "T1=300 # temperature in degree celsius\n",
- "P2=2000 # final pressure in kPa\n",
- "\n",
- "# solution\n",
- "h1=2785 # specific enthalpy of steam in kJ/kg @ 8000 kPa and 300 degree celsius from steam table\n",
- "h2=h1 # throttling process thus enthalpy is constant\n",
- "T2=212.4 # from steam table as we know enthalpy and pressure\n",
- "hf2=909 # specific enthalpy of saturated liquid @ 2000 kPa and 300 degree celsius\n",
- "hg2=2799.5 # specific enthalpy of saturated gas @ 2000 kPa and 300 degree celsius\n",
- "x2=(h2-hf2)/(hg2-hf2) # quality of steam\n",
- "\n",
- "vg2=0.0992 # specific volume of saturated gas @ 2000 kPa and 212.4*c\n",
- "vf2=0.0012 # specific volume of saturated liquid @ 2000 kPa and 212.4*c\n",
- "v2=vf2+x2*(vg2-vf2) # from properties of pure substance\n",
- "\n",
- "print \"The Final Temperature and Specific volume is \",round(T2,1),\"*C and \",round(v2,3),\" m^3/kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Final Temperature and Specific volume is 212.4 *C and 0.098 m^3/kg\n"
- ]
- }
- ],
- "prompt_number": 50
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.12:PG-84"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "# initialization of variables\n",
- "P1=4000 # inlet pressure in kPa\n",
- "T1=500 # inlet temperature in degree celsius\n",
- "V1=200 # inlet steam velocity in m/s\n",
- "d1=0.05 # inlet diameter in 'm'\n",
- "P2=80 # exit pressure in kPa\n",
- "d2=0.250 # exit diameter in 'm'\n",
- "\n",
- "# solution\n",
- "v1=0.08643 # specific volume from steam table @ 4000 kPa and 500*C\n",
- "v2=2.087 # specific volume from steam table @ 80 kPa and 500*C\n",
- "rho1=1/v1 # density at inlet\n",
- "rho2=1/v2 # density at outlet\n",
- "A1=(math.pi*d1**2)/4 # inlet area\n",
- "A2=(math.pi*d2**2)/4\n",
- "mdot=rho1*A1*V1 # mass flow rate\n",
- "mdot=round(mdot,3) # rounding to 3 significant digits\n",
- "\n",
- "#now using table C.3\n",
- "h1=3445 # initial specific enthalpy @ 4000 kPa and 500 *C \n",
- "h2=2666 # final specific enthalpy @ 80 kPa and 500 *C\n",
- "WT=-mdot*(h2-h1) # maximum power from first law\n",
- "print \" The power output is \",round(WT),\" kJ/s \\n \"\n",
- "\n",
- "V2=(A1*V1*rho1)/(A2*rho2) \n",
- "V2=round(V2) # rounding of digits\n",
- "delKE=mdot*((V2**2)-(V1**2))/2 # the change in kinetic energy\n",
- "print \" The change in K.E is \",round(delKE),\" J/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The power output is 3540.0 kJ/s \n",
- " \n",
- " The change in K.E is -6250.0 J/s\n"
- ]
- }
- ],
- "prompt_number": 78
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.13:PG-85"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "# initialization of variables\n",
- "Wdot=10 # pump power in hp\n",
- "g=9.81 # acceleration due to gravity\n",
- "rho=1000 # density of water in kg/m^3\n",
- "d1=0.06 # inlet dimeter in 'm'\n",
- "d2=0.10 # oulet diamter in 'm'\n",
- "V1=10 # velocity of water at inlet in m/s\n",
- "\n",
- "#solution\n",
- "A1=math.pi*(d1**2)/4 # area of inlet\n",
- "A2=math.pi*(d2**2)/4 # area of outlet\n",
- "V2=A1*V1/A2 # oulet velocity from continuity equation\n",
- "\n",
- "mdot=rho*A1*V1 # mass flow rate\n",
- "delP=((((Wdot*746)/mdot)-((V2**2)-V1**2)/(2*g))*rho)/1000 # change in pressure in kPa\n",
- "print \"The rise in pressure is \",round(delP),\" kPa\"\n",
- "# The answer is approximated in textbook , our answer is precise \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The rise in pressure is 268.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 80
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.14:PG-85"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "\n",
- "# initialization of variables\n",
- "P1=7000.0 # inlet pressure in Pa\n",
- "T1=420.0 # inlet temperature in degree celsius\n",
- "V1=400.0 # inlet velocity in m/s\n",
- "d1=0.200 # inlet diameter in 'm'\n",
- "V2=700.0 # exit velocity in m/s\n",
- "k=1.4 # polytopic index for air\n",
- "Cp=1000 # specific heat at constant pressure for air in j/kg.K\n",
- "R=287 # specific gas constant for air\n",
- "\n",
- "#solution\n",
- "\n",
- "#part (a)\n",
- "T2=(((V1**2)-V2**2)/(2*Cp))+T1 # outlet temperature in degree celsius\n",
- "print \" The exit temperature is \",round(T2),\" *C \\n\"\n",
- "\n",
- "#part (b)\n",
- "\n",
- "rho1=P1/(R*(T1+273)) # density at entrance\n",
- "A1=(math.pi*d1**2)/4\n",
- "mdot=rho1*A1*V1 # \n",
- "print \" The mass flow rate is \",round(mdot,3),\" kg/s \\n\"\n",
- "\n",
- "# part (c)\n",
- "\n",
- "rho2=rho1*(((T2+273)/(T1+273))**(1/(k-1))) # density at exit\n",
- "# now we find the exit diameter\n",
- "d2=math.sqrt((rho1*V1*(d1)**2)/(rho2*V2))\n",
- "print \" The outlet diameter is \",round(d2,3),\" m\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The exit temperature is 255.0 *C \n",
- "\n",
- " The mass flow rate is 0.442 kg/s \n",
- "\n",
- " The outlet diameter is 0.212 m\n"
- ]
- }
- ],
- "prompt_number": 87
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4.15:PG-89"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "mdots=100 # mass flow rate of sodium in kg/s\n",
- "Ts1=450 # inlet temperature of sodium in degree celsius\n",
- "Ts2=350 # exit temperature of sodium in degree celsius\n",
- "Cp=1.25 # specific heat of sodium in KJ/kg.*C\n",
- "Tw1=20 # inlet temperature of water in degree celsius\n",
- "Pw=5000 # inlet pressure of water in kPa \n",
- "\n",
- "# solution\n",
- "hw1=88.65 # enthalpy from table C.4\n",
- "hw2=2794 # enthalpy from table C.3\n",
- "mdotw=(mdots*Cp*(Ts1-Ts2))/(hw2-hw1) # mass flow rate of water\n",
- "print \" The mass flow rate of water is \",round(mdotw,2),\" kg/s \\n\"\n",
- "Qdot=mdotw*(hw2-hw1) # heat transfer in kW using energy equation\n",
- "# result\n",
- "print \" The rate of heat transfer is \",round(Qdot),\" kW\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The mass flow rate of water is 4.62 kg/s \n",
- "\n",
- " The rate of heat transfer is 12500.0 kW\n"
- ]
- }
- ],
- "prompt_number": 90
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Thermodynamics_Demystified/Chapter5.ipynb b/Thermodynamics_Demystified/Chapter5.ipynb deleted file mode 100755 index a93ee1a4..00000000 --- a/Thermodynamics_Demystified/Chapter5.ipynb +++ /dev/null @@ -1,594 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:3928ce1341a76de85540172b210e9512b16c46c42e882063576b52bdb907073d"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 5:The Second Law of Thermodynamics"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.4:PG-112"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "Th=200+273.0 # higher temperture in kelvin \n",
- "Tl=20+273.0 # lower temperture in kelvin\n",
- "Wdot=15 # output of engine in kW\n",
- "\n",
- "ef=1-(Tl/Th) # carnot efficiency\n",
- "\n",
- "Qhdot=Wdot/ef # heat supplied by reservoir\n",
- "print \" The heat suppled by higher temperature reservoir is\",round(Qhdot,2),\"kW \\n \"\n",
- "# using forst law\n",
- "Qldot=Qhdot-Wdot # heat rejected to reservoir\n",
- "print \" The heat suppled by lower temperature reservoir is\",round(Qldot,2),\"kW\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The heat suppled by higher temperature reservoir is 39.42 kW \n",
- " \n",
- " The heat suppled by lower temperature reservoir is 24.42 kW\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.5:PG-113"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "TL1=-5+273.0 # lower temperature in kelvin for first situation\n",
- "TH=20+273.0 # higher temperature in kelvin\n",
- "TL2=-25+273.0 #lower temperature in kelvin for second situation\n",
- "\n",
- "#solution\n",
- "\n",
- "COP1=TL1/(TH-TL1) # carnot refrigerator COP for first situation\n",
- "# Let Heat be 100 kJ\n",
- "QL=100.0 # assumption\n",
- "W1=QL/COP1 # work done for situation 1\n",
- "\n",
- "# for situation 2\n",
- "COP2=TL2/(TH-TL2) # COP carnot for second situation\n",
- "W2=QL/COP2 # work done\n",
- "\n",
- "Per=(W2-W1)*100/W1 # percentage increase in work done \n",
- "#result\n",
- "print\" The perccentage increase in work is \",round(Per,1),\"%\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The perccentage increase in work is 94.5 %\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.6:PG-117"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "# initialization of variables\n",
- "T1=20+273 # initial temperature in kelvin\n",
- "P=200 # pressure in kPa\n",
- "V=2 # volume in m^3\n",
- "R=0.287 # gas constant for air\n",
- "W=720 # work done on air in kJ\n",
- "Cv=0.717 # specific heat at constant volume for air\n",
- "\n",
- "#solution\n",
- "m=(P*V)/(R*T1) # mass of air\n",
- "\n",
- "T2=T1+(W/(m*Cv))# final temperature in kelvin\n",
- "\n",
- "delS=m*Cv*math.log(T2/T1) # ENROPY CHANGE FOR CONSTANT VOLUME PROCESS\n",
- "print \" The Entropy increase is\",round(delS,3),\"kJ/K \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Entropy increase is 1.851 kJ/K \n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.7:PG-118"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "T1=350+273 # initial temperature in kelvin\n",
- "P1=1200.0 # initial pressure in kPa\n",
- "P2=140 # final pressure in kPa\n",
- "k=1.4 # polytopic index for air\n",
- "Cv=0.717 # specific heat at constant volume for air\n",
- "#solution\n",
- "T2=T1*((P2/P1)**((k-1)/k)) # reversible adiabatic process relation\n",
- "\n",
- "w=-Cv*(T2-T1) # work done by gases in reversible adiabatic process\n",
- "print\" The work done by gases is\",round(w),\"kJ/kg\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The work done by gases is 205.0 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.8:PG-120"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "# initialization of variables\n",
- "T1=20+273.0 # initial temperature in kelvin\n",
- "P1=200.0 # pressure in kPa\n",
- "V=2 #volume in m^3\n",
- "R=0.287 # gas constant for air\n",
- "W=-720 # negative as work is done on air in kJ\n",
- "\n",
- "#solution\n",
- "\n",
- "m=(P1*V)/(R*T1)# mass of air\n",
- "\n",
- "u1=209.1 #specific internal energy of air at 293K and 200 kPa from table E.1\n",
- "s1=1.678 # by interpolation from table E.1\n",
- "# change in internal energy= work done\n",
- "u2=-(W/m)+u1 # final internal energy\n",
- "T2=501.2# final temperature interpolated from table E.1 corresponding to value of u2\n",
- "s2=2.222 # value of s from table E.3 by interpolating from corresponding to value of u2\n",
- "\n",
- "P2=P1*(T2/T1) # final pressure in kPa\n",
- "\n",
- "delS=m*(s2-s1-R*math.log(P2/P1))# entropy change\n",
- "# result\n",
- "print \" The Entropy increase is\",round(delS,3),\"kJ/K \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Entropy increase is 1.855 kJ/K \n"
- ]
- }
- ],
- "prompt_number": 22
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.9:PG-120"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "T1=350+273.0 # initial temperature in kelvin\n",
- "P1=1200.0 # initial pressure in kPa\n",
- "P2=140.0 # final pressure in kPa\n",
- "k=1.4 # polytopic index for air\n",
- "\n",
- "#solution\n",
- "# The values are taken from table E.1\n",
- "Pr660=23.13# relative pressure @ 660K\n",
- "Pr620=18.36# relative pressure @ 620K\n",
- "Pr1=((Pr660-Pr620)*3/40)+Pr620 # relative pressure by interpolation\n",
- "\n",
- "Pr2=Pr1*(P2/P1) # relative pressure at state 2\n",
- "\n",
- "Pr340=2.149 # relative pressure @ 340K\n",
- "Pr380=3.176 # relative pressure @ 380K\n",
- "T2=((Pr2-Pr340)/(Pr380-Pr340))*40+340 # interpolating final temperature from table E.1\n",
- "\n",
- "# now interpolating u1 AND u2 from table E.1\n",
- "u620=451.0# specific internal energy @ 620k\n",
- "u660=481.0# specific internal energy @ 660k\n",
- "u1=(u660-u620)*(3/40.0)+u620 # initial internal energy\n",
- "\n",
- "u380=271.7 #specific internal energy @ 380k\n",
- "u340=242.8 #specific internal energy @ 340k\n",
- "u2=((Pr2-Pr340)/(Pr380-Pr340))*(u380-u340)+u340 # final internal energy\n",
- "\n",
- "w=u2-u1 # work= change in internal energy\n",
- "print \" The work done by gas is\",int(w),\"kJ/kg\"\n",
- "# The answer is slightly different as values are approximated in textbook\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The work done by gas is -209 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 33
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.10:PG-123"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "T1=300+273.0 # initial temperature in kelvin\n",
- "P1=600 # initial pressure in kPa\n",
- "P2=40 # final pressure in kPa\n",
- "\n",
- "#solution\n",
- "#please refer to steam table for values\n",
- "v1=0.4344 # specific volume from steam table @ 573k and 600 kPa\n",
- "v2=v1 # rigid container\n",
- "u1=2801.0 # specific internal energy from steam table @ 573k and 600 kPa\n",
- "s1=7.372 # specific entropy @ 600 kPa and 573 K\n",
- "\n",
- "vg2=0.4625 # specific volume of saturated vapour @ 40 kPa and 573 K\n",
- "vf2=0.0011 # specific volume of saturated liquid @ 40 kPa and 573 K\n",
- "sf2=1.777 # specific entropy of saturated liquid @ 40 kPa and 573 K\n",
- "sg2=5.1197 # specific entropy of saturated vapour @ 40 kPa and 573 K\n",
- "x=(v2-vf2)/(vg2-vf2)# quality of steam using pure substance relation\n",
- "\n",
- "s2=sf2+x*sg2 # overall specific enthalpy at quality 'x' \n",
- "delS=s2-s1 # entropy change\n",
- "print\" The entropy change is\",round(delS,3),\"kJ/kg.K \\n \"\n",
- "\n",
- "#heat transfer\n",
- "uf2=604.3 #specific internal energy of saturated liquid @ 40 kPa and 573 K\n",
- "ug2=1949.3 #specific internal energy of saturated vapour @ 40 kPa and 573 K\n",
- "u2=uf2+x*ug2 #specific internal energy @ quality x\n",
- "q=u2-u1 # heat transfer in kJ/kg from first law as W=0\n",
- "print \" The heat transfer is\",int(q),\"kJ/kg\"\n",
- "# result\n",
- "# the answers are approximated in textbook but here they are precise thus minute difference is there"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The entropy change is -0.787 kJ/kg.K \n",
- " \n",
- " The heat transfer is -366 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 37
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.11:PG-126"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "# initialization of variables\n",
- "v1=0.5 # assumed as air is filled in half of the tank\n",
- "v2=1.0 # final volume when partition is removed\n",
- "R=0.287 # gas contant for air\n",
- "#solution\n",
- "q=0 # heat transfer is zero\n",
- "w=0 # work done is zero\n",
- "# temperatue is constant as no change in internal energy by first law\n",
- "dels=R*math.log(v2/v1)# change in entropy when temperature is constant\n",
- "print \"The change in specific entropy is\",round(dels,3),\"kJ/kg.K\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The change in specific entropy is 0.199 kJ/kg.K\n"
- ]
- }
- ],
- "prompt_number": 49
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.12:PG-127"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "T1=400+273.0 # initial temperature in kelvin\n",
- "P=600 # pressure in kPa\n",
- "Tsurr=25+273.0 # surrounding temperature in K\n",
- "m=2 # mass of steam in kg\n",
- "\n",
- "#solution\n",
- "#please refer to steam table for values\n",
- "s1=7.708 # specific entropy of steam @ 400 degree celsius and 0.6 MPa\n",
- "s2=1.9316# specific enropy of condensed water @ 25 degree celsius and 0.6 MPa\n",
- "delSsys=m*(s2-s1) # entropy change in system i.e of steam\n",
- "\n",
- "h1=3270 # specific enthalpy of steam @ 400 degree celsius and 0.6 MPa\n",
- "h2=670.6#specific enropy of condensed water @ 25 degree celsius and 0.6 MPa\n",
- "\n",
- "Q=m*(h1-h2)# heat transfer at constant pressure\n",
- "delSsurr=Q/Tsurr # entropy change in surroundings\n",
- "\n",
- "sigma=delSsys+delSsurr # net entropy change\n",
- "\n",
- "print \"The net entropy production is\",round(sigma,1),\"kJ/K\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The net entropy production is 5.9 kJ/K\n"
- ]
- }
- ],
- "prompt_number": 53
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.13:PG-130"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "T1=600+273 # initial temperature in kelvin\n",
- "P1=2 # initial pressure in MPa\n",
- "P2=10 # final pressure in kPa\n",
- "mdot=2 # mass flow rate in kg/s\n",
- "\n",
- "#solution\n",
- "#please refer to steam table for values\n",
- "h1=3690 # specific enthalpy in kJ/kg @ 2MPa and 600 degree celsius\n",
- "s1=7.702 #specific entropy in kJ/kg.K @ 2MPa and 600 degree celsius\n",
- "s2=s1 # Reversible adiabatic process thus entropy is constant\n",
- "sf2=0.6491 #specific entropy of saturated liquid from steam table @ 10 kPa\n",
- "sg2=8.151 #specific entropy of saturated vapour from steam table @ 10 kPa\n",
- "\n",
- "x2=(s2-sf2)/(sg2-sf2) # quality of steam at turbine exit\n",
- "\n",
- "h2f=191.8 #specific enthalpy of saturated liquid from steam table @ 10 kPa\n",
- "h2g=2584.8 #specific enthalpy of saturated vapour from steam table @ 10 kPa\n",
- "h2=h2f+x2*(h2g-h2f) # specific enthalpy @ quality 'x' \n",
- "\n",
- "WdotT=mdot*(h1-h2)# from work done in adiabatic process\n",
- "# result\n",
- "print \" The maximum power output is\",int(WdotT),\"kJ/s\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The maximum power output is 2496 kJ/s\n"
- ]
- }
- ],
- "prompt_number": 56
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.14:PG-130"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "T1=600+273 # initial temperature in kelvin\n",
- "P1=2 # initial pressure in MPa\n",
- "P2=10 # final pressure in kPa\n",
- "mdot=2 # mass flow rate in kg/s\n",
- "EffT=0.8 # efficiency of turbine \n",
- "WdotT=2496 # theoritical power of turbine in kW\n",
- "\n",
- "#solution\n",
- "Wdota=EffT*WdotT # actual power output of turbine\n",
- "h1=3690 # specific enthalpy @ 2MPa and 600 degree celsius\n",
- "h2=h1-(Wdota/mdot) # final enthalpy from first law of thermodynamics\n",
- "\n",
- "T2=((h2-2688)/(2783-2688))*(150-100)+100 # by interpolating from steam table @ P2= 10 kPa, h2=2770 \n",
- "s2=8.46 # final specific entropy by interpolation from steam table\n",
- "\n",
- "print \"The temperature by interpolation is\",round(T2),\" degree celsius \\n\"\n",
- "print \"The final entropy by interpolation is\",round(s2,2),\"kJ/kg.K\"\n",
- "# The temperature and entropy are found by interpolation from steam table and cannot be shown here.\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The temperature by interpolation is 102.0 degree celsius \n",
- "\n",
- "The final entropy by interpolation is 8.46 kJ/kg.K\n"
- ]
- }
- ],
- "prompt_number": 59
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.15:PG-131"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "T2=250.0 # temperature of steam in degree celsius\n",
- "mdot2=0.5 # mass flow rate of steam in kg/s\n",
- "T1=45 # temperature of water in degree celsius\n",
- "mdot1=4 # mass flow rate of water in kg/s\n",
- "P=600.0 # pressure in kPa\n",
- "\n",
- "\n",
- "mdot3=mdot1+mdot2 # by mass balance\n",
- "\n",
- "h2=2957 # specific enthalpy in kJ/kg of steam @ 600 Kpa from steam table\n",
- "h1=188.4 # specific enthalpy in kJ/kg of water @ 600 Kpa from steam table\n",
- "\n",
- "h3=(mdot1*h1+mdot2*h2)/mdot3 # specific enthalpy in kJ/kg at exit\n",
- "\n",
- "# by interpolation from saturated steam table\n",
- "T3=(h3-461.3)*10/(503.7-461.3)+110 # temperature of mixture\n",
- "\n",
- "sf3=1.508 # entropy of saturated liquid in kJ/kg.K at 600Kpa and T3 temperature from steam table\n",
- "s3=sf3 # by interpolating sf\n",
- "s2=7.182 # entropy of superheated steam in kJ/kg.K @ 600Kpa from steam table\n",
- "s1=0.639 # entropy of entering water in kJ/kg.K at T= 45 degree celsius\n",
- "\n",
- "sigmaprod=mdot3*s3-mdot2*s2-mdot1*s1\n",
- "# result\n",
- "print \"The rate of entropy production is\",round(sigmaprod,3),\"kW/K \""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The rate of entropy production is 0.639 kW/K \n"
- ]
- }
- ],
- "prompt_number": 60
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Thermodynamics_Demystified/Chapter6.ipynb b/Thermodynamics_Demystified/Chapter6.ipynb deleted file mode 100755 index 4f406b7e..00000000 --- a/Thermodynamics_Demystified/Chapter6.ipynb +++ /dev/null @@ -1,704 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:e92a3a85838e85e036e1c07a34c6c3996a0867f06470b08d471a9b83e142be32"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 6:Power Vapor Cycles"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.1:PG-146"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# Please refer to the given figure in question for quantities\n",
- "P2=2*1000 #higher pressure converted in in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "rho=1000 # density of water in Kg/m^3\n",
- "h1=192 # enthalpy at state 1 in kJ/kg\n",
- "h3=3248 # enthalpy at state 3 in kJ/kg\n",
- "s3=7.1279# entropy at state 3 in kJ/kg.K\n",
- "\n",
- "#calculation of pump work\n",
- "wp=(P2-P1)/rho # pump work given by equation 4.56 in textbook\n",
- "h2=h1+wp # by enrgy balance b/w state 1 and 2\n",
- "q=h3-h2 # Heat input from 2 to 3\n",
- "\n",
- "s4=s3 # isentropic process\n",
- "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "x=(s4-sf)/(sg-sf)# from property of pure substance\n",
- "hf=191.8 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
- "\n",
- "wt=h3-h4 # turbine work\n",
- "\n",
- "efficiency=(wt-wp)/q # efficiency of power cycle\n",
- "print \" The Efficiency is\",round(efficiency,4),\" or\",round(efficiency*100,1),\"%\"\n",
- "# the answer is correct within limits\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.3238 or 32.4 %\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.2:PG-149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# Please refer to the given figure of question 6.1 for quantities\n",
- "effi1=0.323 #old efficiency\n",
- "P2=4*1000 #higher pressure converted in in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "rho=1000 # density of water in Kg/m^3\n",
- "h1=192 # enthalpy at state 1 in kJ/kg\n",
- "h3=3214 # enthalpy at state 3 i.e @400 degree celsius and 4MPa in kJ/kg\n",
- "s3=6.769# entropy at state 3 i.e @400 degree celsius and 4MPa in kJ/kg.K\n",
- "\n",
- "s4=s3 # insentropic process\n",
- "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s4-sf)/(sg-sf)# quality of steam\n",
- "\n",
- "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
- "h2=h1 # isenthalpic process\n",
- "qb=h3-h2 # heat addition\n",
- "\n",
- "wt=h3-h4 # turbine work\n",
- "\n",
- "effi2=(wt)/qb # efficiency of power cycle\n",
- "\n",
- "print \" The Efficiency is\",round(effi2,3),\" or\",round(effi2*100),\"% \\n\"\n",
- "\n",
- "perincrease=((effi2-effi1)/effi1)*100 \n",
- "\n",
- "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.354 or 35.0 % \n",
- "\n",
- " The % increase in Efficiency is 9.69 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.3:PG-149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# Please refer to fig of question 6.1 for quantities\n",
- "effi1=0.323 #old efficiency\n",
- "P2=2*1000 #higher pressure converted in in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "rho=1000 # density of water in Kg/m^3\n",
- "T2=600# max temperature of cycle in degree celsius\n",
- "h1=192 # enthalpy at state 1 in kJ/kg\n",
- "h3=3690 # enthalpy at state 3 in kJ/kg, 600*C and 2MPa pressure\n",
- "s3=7.702# entropy at state 3 in kJ/kg.K, 600*C and 2MPa pressure\n",
- " \n",
- "s4=s3# isentropic process\n",
- "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s4-sf)/(sg-sf)# quality of steam\n",
- "\n",
- "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
- "\n",
- "h2=h1 # isenthalpic process\n",
- "qb=h3-h2 # heat addition\n",
- "\n",
- "wt=h3-h4 # turbine work\n",
- "\n",
- "effi2=(wt)/qb # efficiency of power cycle\n",
- "print \" The Efficiency is\",round(effi2,3),\" or\",round(effi2*100),\"% \\n\"\n",
- "perincrease=((effi2-effi1)/effi1)*100 \n",
- "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.357 or 36.0 % \n",
- "\n",
- " The % increase in Efficiency is 10.56 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.4:PG-150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# Please refer to fig of question 6.1 for quantities\n",
- "effi1=0.323 #old efficiency\n",
- "P2=2*1000 #higher pressure converted in in kPa\n",
- "P1=4 # condenser pressure in kPa\n",
- "rho=1000 # density of water in Kg/m^3\n",
- "h1=192 # enthalpy at state 1 in kJ/kg\n",
- "h3=3248 # enthalpy at state 3 in kJ/kg\n",
- "s3=7.1279# entropy at state 3 in kJ/kg.K\n",
- "\n",
- "s4=s3 # isentropic process \n",
- "\n",
- "sf=0.4225 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.4754 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s4-sf)/(sg-sf)# from property of pure substance\n",
- "\n",
- "hf=121 #enthalpy of saturated liquid @4 kPa from steam table\n",
- "hg=2554 # enthalpy of saturated vapour @4 kPa from steam table\n",
- "h4=hf+x*(hg-hf)# enthalpy @ state 4h1=h2 # isenthalpic process\n",
- "h2=h1 # isenthalpic process\n",
- "qb=h3-h2 # heat addition\n",
- "\n",
- "wt=h3-h4 # turbine work\n",
- "\n",
- "effi2=(wt)/qb # efficiency of power cycle\n",
- "print \" The Efficiency is\",round(effi2,4),\" or\",round(effi2*100),\"% \\n\"\n",
- "perincrease=((effi2-effi1)/effi1)*100 \n",
- "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.3603 or 36.0 % \n",
- "\n",
- " The % increase in Efficiency is 11.55 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.5:PG-152"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "P2=2*1000 #higher pressure converted in in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "h1=192.0 # enthalpy at 10 kPa in kJ/kg\n",
- "h3=3248.0 # enthalpy @ state 3 in kJ/kg from table C.3\n",
- "s3=7.128 # entropy @ state 3 in kJ/kg.K from table C.3\n",
- "s4=s3 # isentropic process\n",
- "\n",
- "h2=h1 #isenthalpic process\n",
- "h4=((s4-7.038)/(7.233-7.038))*(3056-2950)+2950 #using adjacent values for \n",
- "#interpolation from table C.3 \n",
- "h5=3267.0 # enthalpy at 800 kPa and $00 degree celsius\n",
- "s5=7.572 # entropy at 800 kPa and $00 degree celsius\n",
- "\n",
- "s6=s5 # isentropic process\n",
- "sf=0.6491# entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s6-sf)/(sg-sf)# quality of steam\n",
- "\n",
- "hf=192.0 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2585.0 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "h6=hf+x*(hg-hf)# enthalpy @ state 6\n",
- "\n",
- "# we now calculate energy input\n",
- "qb=(h5-h4)+(h3-h2)# heat interaction\n",
- "\n",
- "# we now calculate work output\n",
- "wt=(h5-h6)+(h3-h4)# turbine work\n",
- "\n",
- "eff=(wt)/qb # efficiency of power cycle\n",
- "print\" The Efficiency is\",round(eff,3),\" or\",round(eff*100,2),\"%\"\n",
- "\n",
- "# // The anwer is different in textbook as there the intermediate values are approximated while in python the calculations are precise \n",
- "\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.336 or 33.57 %\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.6:PG-155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "# initialization of variables\n",
- "\n",
- "# Please refer to fig of question 6.1 for quantities\n",
- "\n",
- "effi1=0.357 #efficiency from example 6.3\n",
- "P2=2*1000.0 #higher pressure converted in in kPa\n",
- "P1=10.0 # lower pressure in kPa\n",
- "rho=1000.0 # density of water in Kg/m^3\n",
- "T2=600.0 # max temperature of cycle in degree celsius\n",
- "h1=192.0 # enthalpy at state 1 in kJ/kg\n",
- "h3=3690.0 # enthalpy at state 3 in kJ/kg, 600*C and 2MPa pressure\n",
- "h4=2442.0 # enthalpy from example 6.3\n",
- "h6=505.0 # specific enthalpy @ 200 kPa from steam table\n",
- "h7=h6 # isenthalpic process\n",
- "s3=7.702# entropy at state 3 in kJ/kg.K, 600*C and 2MPa pressure\n",
- "\n",
- "h2=h1 # isenthalpic process\n",
- "s5=s3 # isentropic process\n",
- "h5=(s3-7.509)*(2971-2870)/(7.709-7.509)+2870 # interpolationg from steam table 2 200 kPa using s5=s3= 7.702 kJ/kg.\n",
- "\n",
- "m6=1.0 # let mass of steam =1 Kg\n",
- "m5=(h6-h2)*(m6)/(h5-h2) \n",
- "m2=m6-m5 # conservation of mass\n",
- "\n",
- "wt=h3-h5+(h5-h4)*m2 # work done by turbine\n",
- "qb=h3-h7 # heat given to bolier\n",
- "effi2=(wt)/qb # efficiency of power cycle\n",
- "print \" The Efficiency is\",round(effi2,4),\" or\",round(effi2*100),\"% \\n\"\n",
- "perincrease=((effi2-effi1)/effi1)*100 \n",
- "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n",
- "\n",
- "# The anwer is different in textbook as there the intermediate values are approximated while in python the calculations are precise \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.3732 or 37.0 % \n",
- "\n",
- " The % increase in Efficiency is 4.55 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.7:PG-156"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "P2=2*1000 #higher pressure converted in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "h1=192 # enthalpy at 10 kPa in kJ/kg\n",
- "h3=3248 # enthalpy @ state 3 in kJ/kg from table C.3\n",
- "s3=7.128 # entropy @ state 3 in kJ/kg.K from table C.3\n",
- "\n",
- "s4=s3 # isentropic process\n",
- "\n",
- "h4=((s4-7.038)/(7.233-7.038))*(3056-2950)+2950 #using adjacent values for \n",
- "#interpolation from table C.3 \n",
- "h5=3267 # enthalpy at 800 kPa and $00 degree celsius\n",
- "s5=7.572 # entropy at 800 kPa and $00 degree celsius\n",
- "\n",
- "s6=s5 # isentropic process\n",
- "sf=0.6491# entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s6-sf)/(sg-sf)# quality of steam\n",
- "\n",
- "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2585 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "h6=hf+x*(hg-hf)# enthalpy @ state 6\n",
- "h7=721 # enthalpy of saturated liquid @800 kPa from steam table\n",
- "h8=h7 # isenthalpic process\n",
- "h2=h1 # isenthalpic process\n",
- "\n",
- "m8=1 # let mass of steam =1 Kg\n",
- "m4=(h8-h2)*(m8)/(h4-h2)\n",
- "m2=m8-m4 # conservation of mass\n",
- "\n",
- "wt=h3-h4+(h5-h6)*m2 # work done by turbine\n",
- "qb=h3-h8+(h5-h4)*m2 # heat given to bolier\n",
- "\n",
- "effi=(wt)/qb # efficiency of power cycle\n",
- "# result\n",
- "print \" The Efficiency is\",round(effi,3),\" or\",round(effi*100,2),\"%\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.347 or 34.7 %\n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.8:PG-159"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "\n",
- "# for rankine cycle refer to fig 6.9\n",
- "\n",
- "effiT=0.8 # turbine efficiency\n",
- "P2=2*1000 # higher pressure converted in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "h1=192 # enthalpy at 10 kPa in kJ/kg\n",
- "h3=3690 # enthalpy of superheated steam @ 2 MPa from steam table in kJ/kg\n",
- "s3=7.702 #entropy of superheated steam @ 2 MPa from steam table in kJ/kg.K\n",
- "# state 4' is repsresented by '41'\n",
- "h2=h1 #isenthalpic process\n",
- "s41=s3 # entropy is constant\n",
- "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "x=(s41-sf)/(sg-sf)# from property of pure substance\n",
- "\n",
- "hf=191.8 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "h41=hf+x*(hg-hf)# enthalpy @ state 41\n",
- "\n",
- "wa=effiT*(h3-h41)# turbine efficiency =(actual work)/(isentropic work)\n",
- "\n",
- "qb=h3-h2 # heat supplied\n",
- "\n",
- "effi=(wa)/qb # efficiency of power cycle\n",
- "print\" The Efficiency is\",round(effi,3),\" or\",round(effi*100,1),\"%\"\n",
- "\n",
- "h4=h3-wa # adiabatic process\n",
- "\n",
- "# now using interpolation for superheated steam @ 10 kPa\n",
- "T4=(h4-2688)*(150-100)/(2783-2688)+100\n",
- "\n",
- "print \"\\n The Temperature from interpolation comes out to be\",int(T4),\" degree celsius\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.286 or 28.6 %\n",
- "\n",
- " The Temperature from interpolation comes out to be 101 degree celsius\n"
- ]
- }
- ],
- "prompt_number": 32
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.9:PG-162"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialization of variables\n",
- "\n",
- "# refer to fig 6.10c\n",
- "\n",
- "mdot=0.6 # mass flow rate of refrigerant in kg/sec\n",
- "T1=-24 # evaporator temperature in degree celsius\n",
- "T2=39.39 # condenser temperature in degree celsius\n",
- "h1=232.8 # enthalpy of saturated R134a vapour @ -24 degree celsius from table D.1\n",
- "s1=0.9370 # entropy of saturated R134a vapour @ -24 degree celsius from table D.1\n",
- "h3=105.3 # enthalpy of saturated R134a liquid @ -24 degree celsius from table D.2\n",
- "h4=h3 # isenthalpic process\n",
- "\n",
- "# interpolating enthalpy from table D.3 @ 39.39 degree celsius\n",
- "h2=(s1-0.9066)*(280.19-268.68)/(0.9428-0.9066)+268.68\n",
- "QdotE=mdot*(h1-h4) # heat transfer rate\n",
- "WdotC=mdot*(h2-h1)# power given to compressor\n",
- "\n",
- "COP=QdotE/WdotC # coefficient of performance\n",
- "\n",
- "Hp=(WdotC/0.746)/(QdotE/3.52) #calculating Horsepower required per Ton\n",
- "\n",
- "print \"The rate of refrigeration is\",round(QdotE,2),\"kJ/s \\n \"\n",
- "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
- "print \"The rating in horsepower per ton is\",round(Hp,3),\" hp\\n \"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The rate of refrigeration is 76.5 kJ/s \n",
- " \n",
- "The coefficient of performance is 2.8 \n",
- " \n",
- "The rating in horsepower per ton is 1.686 hp\n",
- " \n"
- ]
- }
- ],
- "prompt_number": 37
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.10:PG-163"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialization of variables\n",
- "# refer to fig 6.10c\n",
- "effi=0.8 # compressor efficiency\n",
- "mdot=0.6 # mass flow rate of refrigerant in Kg/sec\n",
- "T4=-24 # temperature of evaporator\n",
- "T2=39.39 # temperature of condensor\n",
- "T1=-20.0 # supeheating temperature\n",
- "T3=40 # subcooling temperature\n",
- "h3=106.2 # enthalpy of liquid R-134a @ 40 degree celsius from table D.1\n",
- "h4=h3 # isenthalpic process\n",
- "h1=236.5 # enthalpy of superheated R-134a @ 0.10 MPa and -20 degree celsius from table D.3\n",
- "s1=0.960 #entropy of superheated R-134a @ 0.10 MPa and -20 degree celsius from table D.3 \n",
- "\n",
- "s2dash=s1 # isentropic process\n",
- "\n",
- "# using interpolation from table D.3 @ 1.0 MPa for s2dash=0.960 \n",
- "h2dash=(s2dash-0.9428)*(291.36-280.19)/(0.9768-0.9428)+280.19\n",
- "\n",
- "h2=(h2dash-h1)/(effi)+h1 # by definition of compressor efficiency\n",
- "\n",
- "QdotE=mdot*(h1-h4)#heat transfer rate power given to compressor\n",
- " \n",
- "wdotc=mdot*(h2-h1)# power given to compressor\n",
- "\n",
- "COP=QdotE/wdotc # coefficient of performance\n",
- "\n",
- "print \"The rate of refrigeration is\",round(QdotE,1),\"kJ/s \\n \"\n",
- "\n",
- "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
- "# The value of Wdotc is shown wrong in the textbook. It should be multiplied by mass flow rate\n",
- " "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The rate of refrigeration is 78.2 kJ/s \n",
- " \n",
- "The coefficient of performance is 2.11 \n",
- " \n"
- ]
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.11:PG-165"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# refer to fig 6.10c\n",
- "\n",
- "QdotC=300 #heating Load in KWh or heat rejected by condensor\n",
- "T1=-12 # evaporator temperature in degree celsius\n",
- "P2=800 # condensor pressure in kPa \n",
- "h1=240 # specific enthalpy of saturated R-134a vapour @ -12 degree celsius from table D.1\n",
- "s1=0.927 # specific entropy of saturated R-134a vapour @ -12 degree celsius from table D.1\n",
- "s2=s1 # isentropic process\n",
- "h3=93.4 #specific enthalpy of saturated R-134a liquid @ 800 kPa from tableD.2\n",
- "\n",
- "# extrapolating enthalpy from table D.2 @ 0.8 MPa for s=0.927\n",
- "h2=273.7-(0.9374-s2)*(284.4-273.7)/(0.9711-0.9374)\n",
- "\n",
- "# QdotE=mdot*(h1-h4) is heat transfer rate\n",
- "mdot=QdotC/(h2-h3)# mass flow rate\n",
- "\n",
- "WdotC=mdot*(h2-h1)# power given to compressor\n",
- "\n",
- "#part(a)\n",
- "COP=QdotC/WdotC # coefficient of performance\n",
- "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
- "\n",
- "#part(b)\n",
- "Cost=WdotC*0.07 # cost of electricity\n",
- "print \"The cost of electricity is $\",round(Cost,3),\"/hr \\n\"\n",
- "\n",
- "#part(c)\n",
- "costgas=(300*3600*0.50)/100000 # cost of gas\n",
- "print \"The cost of gas is $\",round(costgas,2),\"/hr \\nThus heat pump is better \"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The coefficient of performance is 5.82 \n",
- " \n",
- "The cost of electricity is $ 3.607 /hr \n",
- "\n",
- "The cost of gas is $ 5.4 /hr \n",
- "Thus heat pump is better \n"
- ]
- }
- ],
- "prompt_number": 66
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 61
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Thermodynamics_Demystified/Chapter7.ipynb b/Thermodynamics_Demystified/Chapter7.ipynb deleted file mode 100755 index 0c094e5b..00000000 --- a/Thermodynamics_Demystified/Chapter7.ipynb +++ /dev/null @@ -1,624 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:af523f2f43fc72634028758c968b85e1c9f7441276d72a4c6af9da09cd0eee6e"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 7:Power and Refrigeration Gas Cycles"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.1:PG-175"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "r=12 # compression ratio\n",
- "k=1.4 # polytropic index for air\n",
- "p1=200.0 # pressure at state 1 in kPa\n",
- "p3=10000.0 # pressure at state 3 in kPa\n",
- "\n",
- "c=100/(r-1) # clearance in percentage\n",
- "print \"The percent clearance is\",round(c,2),\"% \\n\"\n",
- "v3=100.0 # let us assume v3=100 m^3 for calculations\n",
- "p2=p1*(r**k) # polytopic process pressure relation\n",
- "p4=p3*(1/(r**k))# polytropic process pressure relation\n",
- "w34=v3*(r*p4-p3)/(1-k) # polytropic work done in process 3 to 4\n",
- "v2=v3 # constant volume process\n",
- "w12=v2*(p2-r*p1)/(1-k)\n",
- "wcycle=w12+w34 # total work in cycle\n",
- " # now equating the polytropic work calculated to work by MEP\n",
- "MEP=wcycle/(r*v2-v2) # as work = pressure*change in volume\n",
- "print \"The MEP is\",round(MEP),\" kPa\" \n",
- "# The solution is wrong in textbook as calculation for P2 is wrong \n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The percent clearance is 9.0 % \n",
- "\n",
- "The MEP is 503.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.2:PG-179"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "r=10.0 # compression ratio\n",
- "k=1.4 # polytropic index for air\n",
- "R=0.287 # specific gas constant for air\n",
- "Cv=0.717 # specific heat at constant volume\n",
- "Wnet=1000 # net work output in kJ/kg\n",
- "T1=227+273.0 # low air temperaure in kelvin\n",
- "p1=200.0 # low pressure in kPa\n",
- "\n",
- "effi=1-(1/r**(k-1)) # thermal efficeiency \n",
- "print \"The maximum possible thermal efficiency is\",round(effi*100,1),\"% \\n\"\n",
- "\n",
- "T2=T1*(r)**(k-1) # isentropic process temperature relation\n",
- "\n",
- "T4=((Wnet/Cv)+T2-T1)/((r**(k-1))-1) # using expression for work\n",
- "\n",
- "T3=T4*(r)**(k-1)\n",
- "\n",
- "efficarnot=1-T1/T3\n",
- "print \"The carnot efficiency is\",round(efficarnot*100),\"%\"\n",
- "\n",
- "v1=R*T1/p1 # initial volume \n",
- "v2=v1/r # from compression ratio\n",
- "\n",
- "MEP=Wnet/(v1-v2) # mean effective pressure equation\n",
- "\n",
- "print \"The MEP is\",round(MEP),\" kPa\"\n",
- "\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The maximum possible thermal efficiency is 60.2 % \n",
- "\n",
- "The carnot efficiency is 86.0 %\n",
- "The MEP is 1549.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.3:PG-182"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "\n",
- "r=18 # compression ratio\n",
- "k=1.4 # polytropic index for air\n",
- "R=0.287 # specific gas constant for air\n",
- "Cv=0.717 # specific heat at constant volume\n",
- "Cp=1.0 # specific heat at constant pressure\n",
- "T1=200+273 # lower temperaure in kelvin\n",
- "P1=200.0 # low pressure in kPa\n",
- "T3=2000 # higher temperature of cycle in kelvin\n",
- "\n",
- "v1=R*T1/P1 # specific volume at state 1 in m^3\n",
- "v2=v1/r # specific volume after compression in m^3\n",
- "\n",
- "T2=T1*(v1/v2)**(k-1) # temperature after compression\n",
- "P2=P1*(v1/v2)**k # pressure after compression\n",
- "P3=P2 # diesel cycle\n",
- "v3=R*T3/P3 # volume at state 3\n",
- "\n",
- "rc=v3/v2 # cutoff ratio\n",
- "\n",
- "effi=1-((rc**k)-1)/(r**(k-1)*k*(rc-1))\n",
- "\n",
- "\n",
- "print \"The thermal efficiency is\",round(effi*100,1),\"%\"\n",
- "\n",
- "v4=v1 # diesel cycle\n",
- "T4=T3*(v3/v4)**(k-1) # adiabatic process\n",
- "\n",
- "qin=Cp*(T3-T2) # using first law \n",
- "qout=Cv*(T4-T1) # heat rejected \n",
- "\n",
- "Wnet=qin-qout # net work\n",
- "MEP=Wnet/(v1-v2) # expression of mean effective pressure in terms of work\n",
- "\n",
- "print \"The MEP is\",round(MEP),\" kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The thermal efficiency is 66.6 %\n",
- "The MEP is 515.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.4:PG-183"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "r=18 # compression ratio\n",
- "k=1.4 # polytropic index for air\n",
- "R=0.287 # specific gas constant for air\n",
- "T1=200+273 # lower temperaure in kelvin\n",
- "P1=200.0 # low pressure in kPa\n",
- "T3=2000.0 # higher temperature of cycle in kelvin \n",
- "\n",
- "v1=R*T1/P1 # specific volume at state 1 in m^3\n",
- "#using table E.1\n",
- "u1=340.0 # specific internal energy in kJ/kg\n",
- "vr1=198.1 # in m^3/kg\n",
- "\n",
- "vr2=vr1*(1/r) # as r=v1/v2\n",
- "\n",
- "# now finding corresponding values from table E.1\n",
- "T2=1310.0 # temperature in kelvin\n",
- "Pr2=34.0 # pressure in kPa\n",
- "h2=1408.0 # specific entropy in kJ/kg\n",
- "v2=v1/18 # volume at state 2\n",
- "P2=R*T2/v2 # pressure at state 2\n",
- "\n",
- "h3=2252.1 # specific enthalpy in kJ/kg from table E.1\n",
- "vr3=2.776 \n",
- "P3=P2 # diesel cycle\n",
- "v3=R*T3/P3 # after compression volume\n",
- "v4=v1 # isochoric process\n",
- "vr4=vr3*v4/v3 # isentropic process\n",
- "# now using Vr4 we read corresponding value from table E.1\n",
- "T4=915 # final temperature in kelvin\n",
- "u4=687.5 # specific internal energy at state 4\n",
- "\n",
- "qin=h3-h2 # using first law \n",
- "qout=u4-u1 # heat rejected \n",
- "\n",
- "Wnet=qin-qout # net work\n",
- "effi=100*Wnet/qin # thermal efficiency\n",
- "print\" The thermal efficiency is\",round(effi,1),\"%\"\n",
- "\n",
- "MEP=Wnet/(v1-v2) # expression of mean effective pressure in terms of work\n",
- "\n",
- "print \" The MEP is\",round(MEP),\" kPa\"\n",
- "\n",
- "erroreffi=(66.6-effi)*100/effi # error in efficiency\n",
- "errorMEP=(515-MEP)*100/MEP # error in MEP\n",
- "\n",
- "print \" The % error in efficiency is\",round(erroreffi,1),\"%\"\n",
- "print \" The % error MEP is\",round(errorMEP,1),\"% \\n\"\n",
- "\n",
- "# the answers are slight different due to approximation in textbook ... here answers are precise\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The thermal efficiency is 58.8 %\n",
- " The MEP is 775.0 kPa\n",
- " The % error in efficiency is 13.2 %\n",
- " The % error MEP is -33.5 % \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 23
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.5:PG-186"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "Cp=1.0 # specific heat at constant pressure\n",
- "k=1.4 # polytropic index for air\n",
- "T1=25+273.0 # temperature at compressor inlet\n",
- "T3=850+273.0 # maximum temperature in kelvin\n",
- "\n",
- "r=5.0 # pressure ratio=P2/P1 & P4/P3\n",
- "\n",
- "T2=T1*(r)**((k-1)/k) # temperature after compression\n",
- "\n",
- "T4=T3*(1/r)**((k-1.0)/k) # final temperature\n",
- "\n",
- "Wcomp=Cp*(T2-T1) # compressor work\n",
- "Wturb=Cp*(T3-T4) # turbine work\n",
- "\n",
- "BWR=Wcomp/Wturb # back work ratio\n",
- "\n",
- "print \" The BWR is\",round(BWR*100,1),\"%\\n\" \n",
- "\n",
- "Effi=1-r**((1-k)/k) # thermal efficiency\n",
- "\n",
- "print\" The thermal efficiency is\",round(Effi*100,1),\"%\"\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The BWR is 42.0 %\n",
- " The thermal efficiency is 36.9 %\n"
- ]
- }
- ],
- "prompt_number": 33
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.6:PG-186"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "Cp=1.0 # specific heat at constant pressure\n",
- "k=1.4 # polytropic index for air\n",
- "T1=25+273.0 # temperature at compressor inlet\n",
- "T3=850+273.0 # maximum temperature in kelvin\n",
- "\n",
- "r=5.0 # pressure ratio=P2/P1 & P4/P3\n",
- "efficomp=0.75 # efficiency of compressor\n",
- "effiturb=0.75 # efficiency of turbine\n",
- "\n",
- "T2dash=T1*(r)**((k-1)/k) # temperature after compression\n",
- "Wcomp=Cp*(T2dash-T1)/efficomp # compressor work\n",
- "\n",
- "T4dash=T3*(1/r)**((k-1)/k) # final temperature\n",
- "Wturb=Cp*(T3-T4dash)*effiturb # turbine work\n",
- "\n",
- "BWR=100*Wcomp/Wturb # back work ratio\n",
- "\n",
- "print \" The BWR is\",round(BWR,1),\"%\\n\"\n",
- "\n",
- "T2=(Wcomp/Cp)+T1 # actual temperature of state 2\n",
- "\n",
- "qin=Cp*(T3-T2) # using first law \n",
- "\n",
- "Wnet=(Wturb-Wcomp) # net work\n",
- "\n",
- "effi=100*Wnet/qin # thermal efficiency\n",
- "print\" The thermal efficiency is\",round(effi,1),\"%\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The BWR is 74.7 %\n",
- " The thermal efficiency is 13.2 %\n"
- ]
- }
- ],
- "prompt_number": 37
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.7:PG-191"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "Cp=1.0 # specific heat at constant pressure\n",
- "k=1.4 # polytropic index for air\n",
- "T1=25+273.0 # temperature at compressor inlet\n",
- "T3=850+273.0 # maximum temperature in kelvin\n",
- "\n",
- "r=5.0 # pressure ratio=P2/P1 & P4/P3\n",
- "\n",
- "T2=T1*(r)**((k-1)/k) # temperature after compression\n",
- "\n",
- "T4=T3*(1/r)**((k-1)/k) # final temperature\n",
- "\n",
- "Wcomp=Cp*(T2-T1) # compressor work\n",
- "Wturb=Cp*(T3-T4) # turbine work\n",
- "\n",
- "BWR=Wcomp/Wturb # back work ratio\n",
- "\n",
- "print \" The BWR is\",round(BWR,2),\"\\n\"\n",
- "\n",
- "effi=(1-((T1/T4)*(r**((k-1)/k))))# efficiency\n",
- "print\" The thermal efficiency is\",round(effi*100,1),\"%\"\n",
- "# The solution in textbook is incorrect due to wrong value of T4 (temperature at state 4)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The BWR is 0.42 \n",
- "\n",
- " The thermal efficiency is 33.4 %\n"
- ]
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.8:PG-193"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "#REFER TO FIG.:7.8\n",
- "\n",
- "Cp=1 # specific constant at constant pressure\n",
- "k=1.4 # polytropic constant for air\n",
- "T5=25+273.0 # temperature at state 5 in kelvin\n",
- "T7=850+273.0 # temperature at state 4 in kelvin\n",
- "T9=350 # exit temperature of water from bolier in kelvin\n",
- "WdotST=100000.0 # power from steam turbine in Watt\n",
- "r=5.0 # pressure ratio=P2/P1 & P4/P3\n",
- "\n",
- "h1=192.0 # specific enthalpy at 10 Kpa from steam table\n",
- "h2=h1 # isenthalpic process\n",
- "h3=3214.0 # specific enthalpy at 4 Mpa and 400 degree celsius from steam table\n",
- "s3=6.769 # specific entropy at 4 Mpa and 400 degree celsius from steam table\n",
- "\n",
- "s4=s3 # isentropic process\n",
- "sf=0.6491 # specific entropy of saturated liquid at 10 kPa and 45 degree celsiusfrom table C.2\n",
- "sg=8.1510 # specific entropy of saturated liquid at 10 kPa and 45 degree celsiusfrom table C.2\n",
- "x4=(s4-sf)/(sg-sf) # quality of steam\n",
- "\n",
- "hf=h1 # specific enthalpy of saturated liquid @ 10 Kpa \n",
- "hg=2584.6\n",
- "h4=hf+x4*(hg-hf) # specific entropy at state 4\n",
- "\n",
- "mdots=WdotST/(h3-h4) # steam mass flow rate from turbine output\n",
- "\n",
- "T6=T5*(r**((k-1)/k)) # adiabatic process relation\n",
- "T8=T7*(1/r**((k-1)/k)) # adiabatic process relation\n",
- "\n",
- "# Now using energy balance in boiler\n",
- "mdota=mdots*(h3-h2)/(Cp*(T8-T9)) # mass flow rate of water\n",
- "\n",
- "Wdotturb=mdota*Cp*(T7-T8) # power produced by turbine\n",
- "\n",
- "Wdotcomp=mdota*Cp*(T6-T5) # energy needed by compressor\n",
- "\n",
- "WdotGT=Wdotturb-Wdotcomp # net turbine work\n",
- "\n",
- "Qdotin=mdota*Cp*(T7-T6) # energy input by combustor\n",
- "\n",
- "effi=100*(WdotST+WdotGT)/Qdotin # combined efficiency\n",
- "\n",
- "print \"The thermal efficiency of the combined cycle is\",round(effi,1),\"%\"\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The thermal efficiency of the combined cycle is 56.4 %\n"
- ]
- }
- ],
- "prompt_number": 45
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.9:PG-196"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# initialization of variables\n",
- "\n",
- "Cp=1 # specific constant at constant pressure\n",
- "k=1.4 # polytropic constant for air\n",
- "r=10.0\n",
- "T2=-10+273 # temperature at entry of compressor\n",
- "T4=30+273 # temperature at entry of turbine\n",
- "\n",
- "T3=T2*(r**((k-1)/k)) # temperature at state 3 in kelvin\n",
- "T1=T4*(1/r**((k-1)/k)) # temperature at state 1 in degree celsius\n",
- "print \"The minimum temperature is\",round(T1-273),\"degree celsius \\n\"\n",
- "\n",
- "qin=Cp*(T2-T1) # heat input\n",
- "Wcomp=Cp*(T3-T2)# compressor work\n",
- "Wturb=Cp*(T4-T1) # turbine work\n",
- "\n",
- "COP=qin/(Wcomp-Wturb) # COP of refrigeration\n",
- "print\" The COP is\",round(COP,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The minimum temperature is -116.0 degree celsius \n",
- "\n",
- " The COP is 1.07\n"
- ]
- }
- ],
- "prompt_number": 48
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex7.10:PG-196"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#solution\n",
- "# initialization of variables\n",
- "\n",
- "Cp=1.0 # specific constant at constant pressure\n",
- "k=1.4 # polytropic constant for air\n",
- "r=10.0\n",
- "T3=-10+273 # temperature at entry of compressor\n",
- "T6=-40+273 # temperature at entry of turbine\n",
- "\n",
- "T5=T3 # heat exchanger\n",
- "T2=T6 # heat exchanger\n",
- "\n",
- "T4=T3*(r**((k-1)/k)) # temperature after compression\n",
- "T1=T6*(1/r**((k-1)/k)) # temperature after exit from turbine\n",
- "\n",
- "print \"The minimum temperature is\",round(T1-273),\"degree celsius \\n\"\n",
- "\n",
- "qin=Cp*(T2-T1) # heat input\n",
- "Wcomp=Cp*(T4-T3)# compressor work\n",
- "Wturb=Cp*(T6-T1) # turbine work\n",
- "\n",
- "COP=qin/(Wcomp-Wturb) # COP of refrigeration\n",
- "\n",
- "print\" The COP is\",round(COP,3)\n",
- "\n",
- "# the answer is correct within given limits\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The minimum temperature is -152.0 degree celsius \n",
- "\n",
- " The COP is 0.848\n"
- ]
- }
- ],
- "prompt_number": 51
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file diff --git a/Thermodynamics_Demystified/Chapter1.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter1_2.ipynb index 68c66861..68c66861 100755 --- a/Thermodynamics_Demystified/Chapter1.ipynb +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter1_2.ipynb diff --git a/Thermodynamics_Demystified/Chapter2.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter2_2.ipynb index d8357657..d8357657 100755 --- a/Thermodynamics_Demystified/Chapter2.ipynb +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter2_2.ipynb diff --git a/Thermodynamics_Demystified/Chapter3.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter3_2.ipynb index f646fae2..f646fae2 100755 --- a/Thermodynamics_Demystified/Chapter3.ipynb +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter3_2.ipynb diff --git a/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter4_2.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter4_2.ipynb new file mode 100755 index 00000000..e17b48f1 --- /dev/null +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter4_2.ipynb @@ -0,0 +1,719 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:abd0537a9b98c6cb49f3032d9229bd28210acff6f4a7d9f1c5434293bf15ef92"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4:The First Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.1:PG-62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialization of variables\n",
+ "K=100 # spring constant in kN/m\n",
+ "d=0.8 # dispacement of spring in m\n",
+ " # to get total work we integrate from 0 to 0.8 displacement\n",
+ "x1=0; # lower limit of integration\n",
+ "x2=0.8; # upper limit of integration\n",
+ "from scipy.integrate import quad\n",
+ "\n",
+ "# we find work\n",
+ "def integrand(x,K):\n",
+ " return K*x\n",
+ "\n",
+ "W12, err = quad(integrand, x1, x2, K) # integrating to get work\n",
+ "Q12=W12; # by first law of thermodynamics\n",
+ "print \"The Heat transfer is \",int(Q12),\" J\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Heat transfer is 32 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.2:PG-65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "P= 5*746 # power of fan converted in watt\n",
+ "t=1*60*60 # time converted to seconds\n",
+ "\n",
+ "# by first law of thermodynamics Q=delU + W\n",
+ "# Q=0 hence -W=delU\n",
+ "# first we find work input\n",
+ "W=-P*t # work in J\n",
+ "delU=-W # from 1st law\n",
+ "print \"The internal energy increase is \",float(delU),\" J\"\n",
+ "# The answer is approximated in textbook\n",
+ "# our answer is precise\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The internal energy increase is 13428000.0 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.3:PG-65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "P=400 # pressure in kPa\n",
+ "T1=200 # initial temperature in degree celsius\n",
+ "V1= 2 # initial volume in m^3\n",
+ "Q=3500 # heat added in kJ\n",
+ "v1=0.5342 # specific volume of steam at 200 degree celcius and 0.4 Mpa pressure from table C.3\n",
+ "u1=2647 # specific internal energy in kJ/kg @ pressure = 0.4 MPa\n",
+ "m=V1/v1 # mass in kg\n",
+ "# we have a relation Between u2 and v2 from 1st law of thermodynamics\n",
+ "v2=1.06 # specific volume at state 2 by trial and error and interpolation\n",
+ "V2=m*v2 \n",
+ "u2=((3500-400*(V2-V1))/m)+2647 # specific internal energy for v2=1.06 by trial and error\n",
+ "\n",
+ "# on interpolation from steam table at 0.4 MPa we get temperature \n",
+ "T2=644 # temperature in degree celsius\n",
+ "print \"The temperature for u2=\",round(u2),\" kJ and v2 =\",round(v2,3),\" kg/m^3 is \\n \",int(T2),\" degree celsius\"\n",
+ "# this numerical is solved by trial and error thus refer to Appendix C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature for u2= 3372.0 kJ and v2 = 1.06 kg/m^3 is \n",
+ " 644 degree celsius\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.4:PG-67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# initialization of variables\n",
+ "P=400 # pressure in kPa\n",
+ "T1=200 # initial tmperature in degree celsius\n",
+ "V=2 # initial volume in m^3\n",
+ "Q=3500 # heat added in kJ\n",
+ "\n",
+ "#solution\n",
+ "h1=2860 # initial enthalpy @ 200*C and 400 kPa from steam table\n",
+ "v=0.5342 # specific volume from steam table C.3 \n",
+ "m=V/v;\n",
+ "h2=(Q/m)+h1; # final enthalpy in kJ/kg from energy equation\n",
+ "\n",
+ "# NOW USING THIS ENTHLAPY AND INTERPOlATING FROM STEAM TABLE\n",
+ "\n",
+ "T2=600+(92.6/224)*100\n",
+ "\n",
+ "print \"The Final temperature is \",int(T2),\" degree Celsius\"\n",
+ "# result is obtained from interpolation on steam table\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Final temperature is 641 degree Celsius\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.5:PG-71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "T1=300 # initial temperature in degree celsius\n",
+ "T2=700 # final temperature in degree celsius\n",
+ "P=150 # pressure in kPa\n",
+ "m=3 # mass of steam in kg\n",
+ "\n",
+ "# solution\n",
+ "# part (a)\n",
+ "from scipy.integrate import quad\n",
+ "\n",
+ "# now we make function to integrate\n",
+ "def integrand(T):\n",
+ " return 2.07+(T-400)/1480\n",
+ "\n",
+ "I, err = quad(integrand, T1, T2) # integrating specific heat over temperature range\n",
+ "delH=m*I #integrate('2.07+(T-400)/1480','T',T1,T2) # expressing as function of temperature and integrating\n",
+ "\n",
+ "print\" The change in Enthalpy is \",int(delH),\" kJ \\n\"\n",
+ " \n",
+ "# part(b)\n",
+ "CPavg=delH/(m*(T2-T1)) # avg value of specific heat at constant pressure\n",
+ "print \" The average value of Cp is \",round(CPavg,2),\" kJ/kg.*C\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The change in Enthalpy is 2565 kJ \n",
+ "\n",
+ " The average value of Cp is 2.14 kJ/kg.*C\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.6,PG-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "m=1 # mass of nitrogen in kg\n",
+ "T1=300 # initial temperature in Kelvin\n",
+ "T2=1200 # final temperature in Kelvin\n",
+ "M=28.0 # in kg/kmol\n",
+ "# part(a)\n",
+ "# the enthalpy change is found from gas table in App.E\n",
+ "delh=36777-8723 # from gas table\n",
+ "delH=delh/M \n",
+ "print \" The entalpy change from gas table is \",round(delH),\" kJ/kg \\n\"\n",
+ "\n",
+ "# part (b) \n",
+ "Cp=1.042 # from table B.2\n",
+ "delH=Cp*(T2-T1)\n",
+ "print \" The entalpy change by assuming constant specific heat is \",round(delH),\" kJ/kg\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The entalpy change from gas table is 1002.0 kJ/kg \n",
+ "\n",
+ " The entalpy change by assuming constant specific heat is 938.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.7:PG-76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "x=0.7 # quality of steam\n",
+ "P1=200 # initial pressure in kPa\n",
+ "P2=800 # final pressure in kPa\n",
+ "V=2 # volume in m^3\n",
+ "# The values are taken from TABLE C.2\n",
+ "vf1=0.0010 # specific volume of saturated liquid at 200 kPa\n",
+ "vg1=0.8857 # specific volume of saturated gas at 200 kPa\n",
+ "uf1=504.5 # specific internal energy of saturated liquid @ state 1\n",
+ "ug1=2529.5 # speciific internal energy of saturated gas @ state 1\n",
+ "\n",
+ "v1=vf1+x*(vg1-vf1); # specific volume of vapour\n",
+ "m=V/v1\n",
+ "\n",
+ "u1=uf1+x*(ug1-uf1) # specific internal energy of vapour @ state 1\n",
+ "v2=v1 # constant volume process\n",
+ "u2=((0.6761-0.6203)*(3661-3853)/(0.6761-0.6181))+3853 # from steam table @ 800kPa by interpolating\n",
+ "Q=m*(u2-u1) # heat transfer\n",
+ "print \"The heat transfer is \",round(Q,3),\" kJ\"\n",
+ "# The answer in the textbook is approximated"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer is 5630.537 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.8:PG-76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "V=0.02 # volume in m^3\n",
+ "P=400 # pressure in kPa\n",
+ "T1=50+273 # initial temperature in kelvin\n",
+ "T2=700+273 # final temperature in kelvin\n",
+ "Q=50 # heat added in kJ\n",
+ "R=287 # constant for air\n",
+ "Cp=1 # constant for specific heat of air\n",
+ "\n",
+ "# using the ideal gas equation\n",
+ "\n",
+ "m=P*1000*V/(R*T1) # mass of air in kg\n",
+ "W=Q-(m*Cp*(T2-T1)) # work done from first law\n",
+ "# result\n",
+ "print \"The Paddle work is \",round(W,2),\" kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Paddle work is -6.09 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.9,PG-77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "V1=2 # initial volume in m^3\n",
+ "V2=0.2 # final volume in m^3\n",
+ "T1=20+273 # temperature in kelvin\n",
+ "P=200 # pressure in kPa\n",
+ "R=0.287 # constant for air\n",
+ "gama=1.4 # polytropic index for air\n",
+ "Cv=0.717 # specific heat at constant volume for air\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "#using the ideal gas equation\n",
+ "m=(P*V1)/(R*T1) # mass in kg\n",
+ "# process is adiabatic thus\n",
+ "T2=T1*((V1/V2)**(gama-1)) # final temperature\n",
+ "\n",
+ "W=-m*Cv*(T2-T1) # work from first law\n",
+ "print \"The Work is \",int(W),\" kJ\"\n",
+ "# solution is approximated in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Work is -1510 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.10:PG-79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# initialization of variables\n",
+ "P1=2000.0 # initial pressure in kPa\n",
+ "T1=600.0 # initial temperature in degree celsius\n",
+ "p2=600.0 # final pressure in kPa\n",
+ "T2=200.0 # final temperature in degree celsius\n",
+ "d1=0.06 # diameter of inlet pipe in metre\n",
+ "d2=0.120 # diameter of outlet pipe in metre\n",
+ "V1=20.0 # velocity at inlet in m/s\n",
+ "\n",
+ "# solution\n",
+ "# from superheat table C.3 values are noted\n",
+ "v1=0.1996 # specific volume of superheated steam @ 600*C and 2000 kPa\n",
+ "v2=0.3520 # specific volume of superheated steam @ 200*C and 2000 kPa\n",
+ "rho1=1/v1 # initial density\n",
+ "rho2=1/v2 # final density\n",
+ "A1=(math.pi*d1**2)/4 # inlet area\n",
+ "A2=(math.pi*d2**2)/4 # exit area\n",
+ "\n",
+ "V2=(rho1*A1*V1)/(rho2*A2) # from continuity equation\n",
+ "print \" The Exit velocity is \",round(V2,2),\" m/s \\n\"\n",
+ "\n",
+ "mdot=rho1*A1*V1 # mass flow rate\n",
+ "print\" The mass flow rate is \",round(mdot,3),\" kg/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Exit velocity is 8.82 m/s \n",
+ "\n",
+ " The mass flow rate is 0.283 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.11:PG-82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "P1=8000 # initial pressure in kPa\n",
+ "T1=300 # temperature in degree celsius\n",
+ "P2=2000 # final pressure in kPa\n",
+ "\n",
+ "# solution\n",
+ "h1=2785 # specific enthalpy of steam in kJ/kg @ 8000 kPa and 300 degree celsius from steam table\n",
+ "h2=h1 # throttling process thus enthalpy is constant\n",
+ "T2=212.4 # from steam table as we know enthalpy and pressure\n",
+ "hf2=909 # specific enthalpy of saturated liquid @ 2000 kPa and 300 degree celsius\n",
+ "hg2=2799.5 # specific enthalpy of saturated gas @ 2000 kPa and 300 degree celsius\n",
+ "x2=(h2-hf2)/(hg2-hf2) # quality of steam\n",
+ "\n",
+ "vg2=0.0992 # specific volume of saturated gas @ 2000 kPa and 212.4*c\n",
+ "vf2=0.0012 # specific volume of saturated liquid @ 2000 kPa and 212.4*c\n",
+ "v2=vf2+x2*(vg2-vf2) # from properties of pure substance\n",
+ "\n",
+ "print \"The Final Temperature and Specific volume is \",round(T2,1),\"*C and \",round(v2,3),\" m^3/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Final Temperature and Specific volume is 212.4 *C and 0.098 m^3/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.12:PG-84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# initialization of variables\n",
+ "P1=4000 # inlet pressure in kPa\n",
+ "T1=500 # inlet temperature in degree celsius\n",
+ "V1=200 # inlet steam velocity in m/s\n",
+ "d1=0.05 # inlet diameter in 'm'\n",
+ "P2=80 # exit pressure in kPa\n",
+ "d2=0.250 # exit diameter in 'm'\n",
+ "\n",
+ "# solution\n",
+ "v1=0.08643 # specific volume from steam table @ 4000 kPa and 500*C\n",
+ "v2=2.087 # specific volume from steam table @ 80 kPa and 500*C\n",
+ "rho1=1/v1 # density at inlet\n",
+ "rho2=1/v2 # density at outlet\n",
+ "A1=(math.pi*d1**2)/4 # inlet area\n",
+ "A2=(math.pi*d2**2)/4\n",
+ "mdot=rho1*A1*V1 # mass flow rate\n",
+ "mdot=round(mdot,3) # rounding to 3 significant digits\n",
+ "\n",
+ "#now using table C.3\n",
+ "h1=3445 # initial specific enthalpy @ 4000 kPa and 500 *C \n",
+ "h2=2666 # final specific enthalpy @ 80 kPa and 500 *C\n",
+ "WT=-mdot*(h2-h1) # maximum power from first law\n",
+ "print \" The power output is \",round(WT),\" kJ/s \\n \"\n",
+ "\n",
+ "V2=(A1*V1*rho1)/(A2*rho2) \n",
+ "V2=round(V2) # rounding of digits\n",
+ "delKE=mdot*((V2**2)-(V1**2))/2 # the change in kinetic energy\n",
+ "print \" The change in K.E is \",round(delKE),\" J/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The power output is 3540.0 kJ/s \n",
+ " \n",
+ " The change in K.E is -6250.0 J/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 78
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.13:PG-85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# initialization of variables\n",
+ "Wdot=10 # pump power in hp\n",
+ "g=9.81 # acceleration due to gravity\n",
+ "rho=1000 # density of water in kg/m^3\n",
+ "d1=0.06 # inlet dimeter in 'm'\n",
+ "d2=0.10 # oulet diamter in 'm'\n",
+ "V1=10 # velocity of water at inlet in m/s\n",
+ "\n",
+ "#solution\n",
+ "A1=math.pi*(d1**2)/4 # area of inlet\n",
+ "A2=math.pi*(d2**2)/4 # area of outlet\n",
+ "V2=A1*V1/A2 # oulet velocity from continuity equation\n",
+ "\n",
+ "mdot=rho*A1*V1 # mass flow rate\n",
+ "delP=((((Wdot*746)/mdot)-((V2**2)-V1**2)/(2*g))*rho)/1000 # change in pressure in kPa\n",
+ "print \"The rise in pressure is \",round(delP),\" kPa\"\n",
+ "# The answer is approximated in textbook , our answer is precise \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rise in pressure is 268.0 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 80
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.14:PG-85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# initialization of variables\n",
+ "P1=7000.0 # inlet pressure in Pa\n",
+ "T1=420.0 # inlet temperature in degree celsius\n",
+ "V1=400.0 # inlet velocity in m/s\n",
+ "d1=0.200 # inlet diameter in 'm'\n",
+ "V2=700.0 # exit velocity in m/s\n",
+ "k=1.4 # polytopic index for air\n",
+ "Cp=1000 # specific heat at constant pressure for air in j/kg.K\n",
+ "R=287 # specific gas constant for air\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "#part (a)\n",
+ "T2=(((V1**2)-V2**2)/(2*Cp))+T1 # outlet temperature in degree celsius\n",
+ "print \" The exit temperature is \",round(T2),\" *C \\n\"\n",
+ "\n",
+ "#part (b)\n",
+ "\n",
+ "rho1=P1/(R*(T1+273)) # density at entrance\n",
+ "A1=(math.pi*d1**2)/4\n",
+ "mdot=rho1*A1*V1 # \n",
+ "print \" The mass flow rate is \",round(mdot,3),\" kg/s \\n\"\n",
+ "\n",
+ "# part (c)\n",
+ "\n",
+ "rho2=rho1*(((T2+273)/(T1+273))**(1/(k-1))) # density at exit\n",
+ "# now we find the exit diameter\n",
+ "d2=math.sqrt((rho1*V1*(d1)**2)/(rho2*V2))\n",
+ "print \" The outlet diameter is \",round(d2,3),\" m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The exit temperature is 255.0 *C \n",
+ "\n",
+ " The mass flow rate is 0.442 kg/s \n",
+ "\n",
+ " The outlet diameter is 0.212 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4.15:PG-89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "mdots=100 # mass flow rate of sodium in kg/s\n",
+ "Ts1=450 # inlet temperature of sodium in degree celsius\n",
+ "Ts2=350 # exit temperature of sodium in degree celsius\n",
+ "Cp=1.25 # specific heat of sodium in KJ/kg.*C\n",
+ "Tw1=20 # inlet temperature of water in degree celsius\n",
+ "Pw=5000 # inlet pressure of water in kPa \n",
+ "\n",
+ "# solution\n",
+ "hw1=88.65 # enthalpy from table C.4\n",
+ "hw2=2794 # enthalpy from table C.3\n",
+ "mdotw=(mdots*Cp*(Ts1-Ts2))/(hw2-hw1) # mass flow rate of water\n",
+ "print \" The mass flow rate of water is \",round(mdotw,2),\" kg/s \\n\"\n",
+ "Qdot=mdotw*(hw2-hw1) # heat transfer in kW using energy equation\n",
+ "# result\n",
+ "print \" The rate of heat transfer is \",round(Qdot),\" kW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The mass flow rate of water is 4.62 kg/s \n",
+ "\n",
+ " The rate of heat transfer is 12500.0 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter5_2.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter5_2.ipynb new file mode 100755 index 00000000..ac5d7227 --- /dev/null +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter5_2.ipynb @@ -0,0 +1,586 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4df6ac0705dbecae7b5d61911e7c199aa54ae833c2fc9f2d87f583d3d1c651ef"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:The Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.4:PG-112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "Th=200+273.0 # higher temperture in kelvin \n",
+ "Tl=20+273.0 # lower temperture in kelvin\n",
+ "Wdot=15 # output of engine in kW\n",
+ "\n",
+ "ef=1-(Tl/Th) # carnot efficiency\n",
+ "\n",
+ "Qhdot=Wdot/ef # heat supplied by reservoir\n",
+ "print \" The heat suppled by higher temperature reservoir is\",round(Qhdot,2),\"kW \\n \"\n",
+ "# using forst law\n",
+ "Qldot=Qhdot-Wdot # heat rejected to reservoir\n",
+ "print \" The heat suppled by lower temperature reservoir is\",round(Qldot,2),\"kW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The heat suppled by higher temperature reservoir is 39.42 kW \n",
+ " \n",
+ " The heat suppled by lower temperature reservoir is 24.42 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.5:PG-113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "TL1=-5+273.0 # lower temperature in kelvin for first situation\n",
+ "TH=20+273.0 # higher temperature in kelvin\n",
+ "TL2=-25+273.0 #lower temperature in kelvin for second situation\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "COP1=TL1/(TH-TL1) # carnot refrigerator COP for first situation\n",
+ "# Let Heat be 100 kJ\n",
+ "QL=100.0 # assumption\n",
+ "W1=QL/COP1 # work done for situation 1\n",
+ "\n",
+ "# for situation 2\n",
+ "COP2=TL2/(TH-TL2) # COP carnot for second situation\n",
+ "W2=QL/COP2 # work done\n",
+ "\n",
+ "Per=(W2-W1)*100/W1 # percentage increase in work done \n",
+ "#result\n",
+ "print\" The perccentage increase in work is \",round(Per,1),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The perccentage increase in work is 94.5 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.6:PG-117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# initialization of variables\n",
+ "T1=20+273 # initial temperature in kelvin\n",
+ "P=200 # pressure in kPa\n",
+ "V=2 # volume in m^3\n",
+ "R=0.287 # gas constant for air\n",
+ "W=720 # work done on air in kJ\n",
+ "Cv=0.717 # specific heat at constant volume for air\n",
+ "\n",
+ "#solution\n",
+ "m=(P*V)/(R*T1) # mass of air\n",
+ "\n",
+ "T2=T1+(W/(m*Cv))# final temperature in kelvin\n",
+ "\n",
+ "delS=m*Cv*math.log(T2/T1) # ENROPY CHANGE FOR CONSTANT VOLUME PROCESS\n",
+ "print \" The Entropy increase is\",round(delS,3),\"kJ/K \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Entropy increase is 1.851 kJ/K \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.7:PG-118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "T1=350+273 # initial temperature in kelvin\n",
+ "P1=1200.0 # initial pressure in kPa\n",
+ "P2=140 # final pressure in kPa\n",
+ "k=1.4 # polytopic index for air\n",
+ "Cv=0.717 # specific heat at constant volume for air\n",
+ "#solution\n",
+ "T2=T1*((P2/P1)**((k-1)/k)) # reversible adiabatic process relation\n",
+ "\n",
+ "w=-Cv*(T2-T1) # work done by gases in reversible adiabatic process\n",
+ "print\" The work done by gases is\",round(w),\"kJ/kg\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The work done by gases is 205.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.8:PG-120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# initialization of variables\n",
+ "T1=20+273.0 # initial temperature in kelvin\n",
+ "P1=200.0 # pressure in kPa\n",
+ "V=2 #volume in m^3\n",
+ "R=0.287 # gas constant for air\n",
+ "W=-720 # negative as work is done on air in kJ\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "m=(P1*V)/(R*T1)# mass of air\n",
+ "\n",
+ "u1=209.1 #specific internal energy of air at 293K and 200 kPa from table E.1\n",
+ "s1=1.678 # by interpolation from table E.1\n",
+ "# change in internal energy= work done\n",
+ "u2=-(W/m)+u1 # final internal energy\n",
+ "T2=501.2# final temperature interpolated from table E.1 corresponding to value of u2\n",
+ "s2=2.222 # value of s from table E.3 by interpolating from corresponding to value of u2\n",
+ "\n",
+ "P2=P1*(T2/T1) # final pressure in kPa\n",
+ "\n",
+ "delS=m*(s2-s1-R*math.log(P2/P1))# entropy change\n",
+ "# result\n",
+ "print \" The Entropy increase is\",round(delS,3),\"kJ/K \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Entropy increase is 1.855 kJ/K \n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.9:PG-120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "T1=350+273.0 # initial temperature in kelvin\n",
+ "P1=1200.0 # initial pressure in kPa\n",
+ "P2=140.0 # final pressure in kPa\n",
+ "k=1.4 # polytopic index for air\n",
+ "\n",
+ "#solution\n",
+ "# The values are taken from table E.1\n",
+ "Pr660=23.13# relative pressure @ 660K\n",
+ "Pr620=18.36# relative pressure @ 620K\n",
+ "Pr1=((Pr660-Pr620)*3/40)+Pr620 # relative pressure by interpolation\n",
+ "\n",
+ "Pr2=Pr1*(P2/P1) # relative pressure at state 2\n",
+ "\n",
+ "Pr340=2.149 # relative pressure @ 340K\n",
+ "Pr380=3.176 # relative pressure @ 380K\n",
+ "T2=((Pr2-Pr340)/(Pr380-Pr340))*40+340 # interpolating final temperature from table E.1\n",
+ "\n",
+ "# now interpolating u1 AND u2 from table E.1\n",
+ "u620=451.0# specific internal energy @ 620k\n",
+ "u660=481.0# specific internal energy @ 660k\n",
+ "u1=(u660-u620)*(3/40.0)+u620 # initial internal energy\n",
+ "\n",
+ "u380=271.7 #specific internal energy @ 380k\n",
+ "u340=242.8 #specific internal energy @ 340k\n",
+ "u2=((Pr2-Pr340)/(Pr380-Pr340))*(u380-u340)+u340 # final internal energy\n",
+ "\n",
+ "w=u2-u1 # work= change in internal energy\n",
+ "print \" The work done by gas is\",int(w),\"kJ/kg\"\n",
+ "# The answer is slightly different as values are approximated in textbook\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The work done by gas is -209 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.10:PG-123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "T1=300+273.0 # initial temperature in kelvin\n",
+ "P1=600 # initial pressure in kPa\n",
+ "P2=40 # final pressure in kPa\n",
+ "\n",
+ "#solution\n",
+ "#please refer to steam table for values\n",
+ "v1=0.4344 # specific volume from steam table @ 573k and 600 kPa\n",
+ "v2=v1 # rigid container\n",
+ "u1=2801.0 # specific internal energy from steam table @ 573k and 600 kPa\n",
+ "s1=7.372 # specific entropy @ 600 kPa and 573 K\n",
+ "\n",
+ "vg2=0.4625 # specific volume of saturated vapour @ 40 kPa and 573 K\n",
+ "vf2=0.0011 # specific volume of saturated liquid @ 40 kPa and 573 K\n",
+ "sf2=1.777 # specific entropy of saturated liquid @ 40 kPa and 573 K\n",
+ "sg2=5.1197 # specific entropy of saturated vapour @ 40 kPa and 573 K\n",
+ "x=(v2-vf2)/(vg2-vf2)# quality of steam using pure substance relation\n",
+ "\n",
+ "s2=sf2+x*sg2 # overall specific enthalpy at quality 'x' \n",
+ "delS=s2-s1 # entropy change\n",
+ "print\" The entropy change is\",round(delS,3),\"kJ/kg.K \\n \"\n",
+ "\n",
+ "#heat transfer\n",
+ "uf2=604.3 #specific internal energy of saturated liquid @ 40 kPa and 573 K\n",
+ "ug2=1949.3 #specific internal energy of saturated vapour @ 40 kPa and 573 K\n",
+ "u2=uf2+x*ug2 #specific internal energy @ quality x\n",
+ "q=u2-u1 # heat transfer in kJ/kg from first law as W=0\n",
+ "print \" The heat transfer is\",int(q),\"kJ/kg\"\n",
+ "# result\n",
+ "# the answers are approximated in textbook but here they are precise thus minute difference is there"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The entropy change is -0.787 kJ/kg.K \n",
+ " \n",
+ " The heat transfer is -366 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.11:PG-126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# initialization of variables\n",
+ "v1=0.5 # assumed as air is filled in half of the tank\n",
+ "v2=1.0 # final volume when partition is removed\n",
+ "R=0.287 # gas contant for air\n",
+ "#solution\n",
+ "q=0 # heat transfer is zero\n",
+ "w=0 # work done is zero\n",
+ "# temperatue is constant as no change in internal energy by first law\n",
+ "dels=R*math.log(v2/v1)# change in entropy when temperature is constant\n",
+ "print \"The change in specific entropy is\",round(dels,3),\"kJ/kg.K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in specific entropy is 0.199 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.12:PG-127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "T1=400+273.0 # initial temperature in kelvin\n",
+ "P=600 # pressure in kPa\n",
+ "Tsurr=25+273.0 # surrounding temperature in K\n",
+ "m=2 # mass of steam in kg\n",
+ "\n",
+ "#solution\n",
+ "#please refer to steam table for values\n",
+ "s1=7.708 # specific entropy of steam @ 400 degree celsius and 0.6 MPa\n",
+ "s2=1.9316# specific enropy of condensed water @ 25 degree celsius and 0.6 MPa\n",
+ "delSsys=m*(s2-s1) # entropy change in system i.e of steam\n",
+ "\n",
+ "h1=3270 # specific enthalpy of steam @ 400 degree celsius and 0.6 MPa\n",
+ "h2=670.6#specific enropy of condensed water @ 25 degree celsius and 0.6 MPa\n",
+ "\n",
+ "Q=m*(h1-h2)# heat transfer at constant pressure\n",
+ "delSsurr=Q/Tsurr # entropy change in surroundings\n",
+ "\n",
+ "sigma=delSsys+delSsurr # net entropy change\n",
+ "\n",
+ "print \"The net entropy production is\",round(sigma,1),\"kJ/K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net entropy production is 5.9 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.13:PG-130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "T1=600+273 # initial temperature in kelvin\n",
+ "P1=2 # initial pressure in MPa\n",
+ "P2=10 # final pressure in kPa\n",
+ "mdot=2 # mass flow rate in kg/s\n",
+ "\n",
+ "#solution\n",
+ "#please refer to steam table for values\n",
+ "h1=3690 # specific enthalpy in kJ/kg @ 2MPa and 600 degree celsius\n",
+ "s1=7.702 #specific entropy in kJ/kg.K @ 2MPa and 600 degree celsius\n",
+ "s2=s1 # Reversible adiabatic process thus entropy is constant\n",
+ "sf2=0.6491 #specific entropy of saturated liquid from steam table @ 10 kPa\n",
+ "sg2=8.151 #specific entropy of saturated vapour from steam table @ 10 kPa\n",
+ "\n",
+ "x2=(s2-sf2)/(sg2-sf2) # quality of steam at turbine exit\n",
+ "\n",
+ "h2f=191.8 #specific enthalpy of saturated liquid from steam table @ 10 kPa\n",
+ "h2g=2584.8 #specific enthalpy of saturated vapour from steam table @ 10 kPa\n",
+ "h2=h2f+x2*(h2g-h2f) # specific enthalpy @ quality 'x' \n",
+ "\n",
+ "WdotT=mdot*(h1-h2)# from work done in adiabatic process\n",
+ "# result\n",
+ "print \" The maximum power output is\",int(WdotT),\"kJ/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The maximum power output is 2496 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.14:PG-130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "T1=600+273 # initial temperature in kelvin\n",
+ "P1=2 # initial pressure in MPa\n",
+ "P2=10 # final pressure in kPa\n",
+ "mdot=2 # mass flow rate in kg/s\n",
+ "EffT=0.8 # efficiency of turbine \n",
+ "WdotT=2496 # theoritical power of turbine in kW\n",
+ "\n",
+ "#solution\n",
+ "Wdota=EffT*WdotT # actual power output of turbine\n",
+ "h1=3690 # specific enthalpy @ 2MPa and 600 degree celsius\n",
+ "h2=h1-(Wdota/mdot) # final enthalpy from first law of thermodynamics\n",
+ "\n",
+ "T2=((h2-2688)/(2783-2688))*(150-100)+100 # by interpolating from steam table @ P2= 10 kPa, h2=2770 \n",
+ "s2=8.46 # final specific entropy by interpolation from steam table\n",
+ "\n",
+ "print \"The temperature by interpolation is\",round(T2),\" degree celsius \\n\"\n",
+ "print \"The final entropy by interpolation is\",round(s2,2),\"kJ/kg.K\"\n",
+ "# The temperature and entropy are found by interpolation from steam table and cannot be shown here.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature by interpolation is 102.0 degree celsius \n",
+ "\n",
+ "The final entropy by interpolation is 8.46 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5.15:PG-131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "T2=250.0 # temperature of steam in degree celsius\n",
+ "mdot2=0.5 # mass flow rate of steam in kg/s\n",
+ "T1=45 # temperature of water in degree celsius\n",
+ "mdot1=4 # mass flow rate of water in kg/s\n",
+ "P=600.0 # pressure in kPa\n",
+ "\n",
+ "\n",
+ "mdot3=mdot1+mdot2 # by mass balance\n",
+ "\n",
+ "h2=2957 # specific enthalpy in kJ/kg of steam @ 600 Kpa from steam table\n",
+ "h1=188.4 # specific enthalpy in kJ/kg of water @ 600 Kpa from steam table\n",
+ "\n",
+ "h3=(mdot1*h1+mdot2*h2)/mdot3 # specific enthalpy in kJ/kg at exit\n",
+ "\n",
+ "# by interpolation from saturated steam table\n",
+ "T3=(h3-461.3)*10/(503.7-461.3)+110 # temperature of mixture\n",
+ "\n",
+ "sf3=1.508 # entropy of saturated liquid in kJ/kg.K at 600Kpa and T3 temperature from steam table\n",
+ "s3=sf3 # by interpolating sf\n",
+ "s2=7.182 # entropy of superheated steam in kJ/kg.K @ 600Kpa from steam table\n",
+ "s1=0.639 # entropy of entering water in kJ/kg.K at T= 45 degree celsius\n",
+ "\n",
+ "sigmaprod=mdot3*s3-mdot2*s2-mdot1*s1\n",
+ "# result\n",
+ "print \"The rate of entropy production is\",round(sigmaprod,3),\"kW/K \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of entropy production is 0.639 kW/K \n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter6_2.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter6_2.ipynb new file mode 100755 index 00000000..49cfc54d --- /dev/null +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter6_2.ipynb @@ -0,0 +1,695 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:353d9311290d1e9a150d4f5b7334fda96148ffc036b68321a43e559706361c16"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6:Power Vapor Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.1:PG-146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# solution\n",
+ "#initialization of variables\n",
+ "# Please refer to the given figure in question for quantities\n",
+ "P2=2*1000 #higher pressure converted in in kPa\n",
+ "P1=10 # lower pressure in kPa\n",
+ "rho=1000 # density of water in Kg/m^3\n",
+ "h1=192 # enthalpy at state 1 in kJ/kg\n",
+ "h3=3248 # enthalpy at state 3 in kJ/kg\n",
+ "s3=7.1279# entropy at state 3 in kJ/kg.K\n",
+ "\n",
+ "#calculation of pump work\n",
+ "wp=(P2-P1)/rho # pump work given by equation 4.56 in textbook\n",
+ "h2=h1+wp # by enrgy balance b/w state 1 and 2\n",
+ "q=h3-h2 # Heat input from 2 to 3\n",
+ "\n",
+ "s4=s3 # isentropic process\n",
+ "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
+ "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
+ "x=(s4-sf)/(sg-sf)# from property of pure substance\n",
+ "hf=191.8 #enthalpy of saturated liquid @10 kPa from steam table\n",
+ "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
+ "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
+ "\n",
+ "wt=h3-h4 # turbine work\n",
+ "\n",
+ "efficiency=(wt-wp)/q # efficiency of power cycle\n",
+ "print \" The Efficiency is\",round(efficiency,4),\" or\",round(efficiency*100,1),\"%\"\n",
+ "# the answer is correct within limits\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Efficiency is 0.3238 or 32.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.2:PG-149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# solution\n",
+ "#initialization of variables\n",
+ "# Please refer to the given figure of question 6.1 for quantities\n",
+ "effi1=0.323 #old efficiency\n",
+ "P2=4*1000 #higher pressure converted in in kPa\n",
+ "P1=10 # lower pressure in kPa\n",
+ "rho=1000 # density of water in Kg/m^3\n",
+ "h1=192 # enthalpy at state 1 in kJ/kg\n",
+ "h3=3214 # enthalpy at state 3 i.e @400 degree celsius and 4MPa in kJ/kg\n",
+ "s3=6.769# entropy at state 3 i.e @400 degree celsius and 4MPa in kJ/kg.K\n",
+ "\n",
+ "s4=s3 # insentropic process\n",
+ "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
+ "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
+ "\n",
+ "x=(s4-sf)/(sg-sf)# quality of steam\n",
+ "\n",
+ "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
+ "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
+ "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
+ "h2=h1 # isenthalpic process\n",
+ "qb=h3-h2 # heat addition\n",
+ "\n",
+ "wt=h3-h4 # turbine work\n",
+ "\n",
+ "effi2=(wt)/qb # efficiency of power cycle\n",
+ "\n",
+ "print \" The Efficiency is\",round(effi2,3),\" or\",round(effi2*100),\"% \\n\"\n",
+ "\n",
+ "perincrease=((effi2-effi1)/effi1)*100 \n",
+ "\n",
+ "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Efficiency is 0.354 or 35.0 % \n",
+ "\n",
+ " The % increase in Efficiency is 9.69 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.3:PG-149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# solution\n",
+ "#initialization of variables\n",
+ "# Please refer to fig of question 6.1 for quantities\n",
+ "effi1=0.323 #old efficiency\n",
+ "P2=2*1000 #higher pressure converted in in kPa\n",
+ "P1=10 # lower pressure in kPa\n",
+ "rho=1000 # density of water in Kg/m^3\n",
+ "T2=600# max temperature of cycle in degree celsius\n",
+ "h1=192 # enthalpy at state 1 in kJ/kg\n",
+ "h3=3690 # enthalpy at state 3 in kJ/kg, 600*C and 2MPa pressure\n",
+ "s3=7.702# entropy at state 3 in kJ/kg.K, 600*C and 2MPa pressure\n",
+ " \n",
+ "s4=s3# isentropic process\n",
+ "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
+ "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
+ "\n",
+ "x=(s4-sf)/(sg-sf)# quality of steam\n",
+ "\n",
+ "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
+ "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
+ "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
+ "\n",
+ "h2=h1 # isenthalpic process\n",
+ "qb=h3-h2 # heat addition\n",
+ "\n",
+ "wt=h3-h4 # turbine work\n",
+ "\n",
+ "effi2=(wt)/qb # efficiency of power cycle\n",
+ "print \" The Efficiency is\",round(effi2,3),\" or\",round(effi2*100),\"% \\n\"\n",
+ "perincrease=((effi2-effi1)/effi1)*100 \n",
+ "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Efficiency is 0.357 or 36.0 % \n",
+ "\n",
+ " The % increase in Efficiency is 10.56 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.4:PG-150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# solution\n",
+ "#initialization of variables\n",
+ "# Please refer to fig of question 6.1 for quantities\n",
+ "effi1=0.323 #old efficiency\n",
+ "P2=2*1000 #higher pressure converted in in kPa\n",
+ "P1=4 # condenser pressure in kPa\n",
+ "rho=1000 # density of water in Kg/m^3\n",
+ "h1=192 # enthalpy at state 1 in kJ/kg\n",
+ "h3=3248 # enthalpy at state 3 in kJ/kg\n",
+ "s3=7.1279# entropy at state 3 in kJ/kg.K\n",
+ "\n",
+ "s4=s3 # isentropic process \n",
+ "\n",
+ "sf=0.4225 # entropy of saturated liquid @10 kPa from steam table\n",
+ "sg=8.4754 # entropy of saturated vapour @10 kPa from steam table\n",
+ "\n",
+ "x=(s4-sf)/(sg-sf)# from property of pure substance\n",
+ "\n",
+ "hf=121 #enthalpy of saturated liquid @4 kPa from steam table\n",
+ "hg=2554 # enthalpy of saturated vapour @4 kPa from steam table\n",
+ "h4=hf+x*(hg-hf)# enthalpy @ state 4h1=h2 # isenthalpic process\n",
+ "h2=h1 # isenthalpic process\n",
+ "qb=h3-h2 # heat addition\n",
+ "\n",
+ "wt=h3-h4 # turbine work\n",
+ "\n",
+ "effi2=(wt)/qb # efficiency of power cycle\n",
+ "print \" The Efficiency is\",round(effi2,4),\" or\",round(effi2*100),\"% \\n\"\n",
+ "perincrease=((effi2-effi1)/effi1)*100 \n",
+ "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Efficiency is 0.3603 or 36.0 % \n",
+ "\n",
+ " The % increase in Efficiency is 11.55 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.5:PG-152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# solution\n",
+ "#initialization of variables\n",
+ "P2=2*1000 #higher pressure converted in in kPa\n",
+ "P1=10 # lower pressure in kPa\n",
+ "h1=192.0 # enthalpy at 10 kPa in kJ/kg\n",
+ "h3=3248.0 # enthalpy @ state 3 in kJ/kg from table C.3\n",
+ "s3=7.128 # entropy @ state 3 in kJ/kg.K from table C.3\n",
+ "s4=s3 # isentropic process\n",
+ "\n",
+ "h2=h1 #isenthalpic process\n",
+ "h4=((s4-7.038)/(7.233-7.038))*(3056-2950)+2950 #using adjacent values for \n",
+ "#interpolation from table C.3 \n",
+ "h5=3267.0 # enthalpy at 800 kPa and $00 degree celsius\n",
+ "s5=7.572 # entropy at 800 kPa and $00 degree celsius\n",
+ "\n",
+ "s6=s5 # isentropic process\n",
+ "sf=0.6491# entropy of saturated liquid @10 kPa from steam table\n",
+ "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
+ "\n",
+ "x=(s6-sf)/(sg-sf)# quality of steam\n",
+ "\n",
+ "hf=192.0 #enthalpy of saturated liquid @10 kPa from steam table\n",
+ "hg=2585.0 # enthalpy of saturated vapour @10 kPa from steam table\n",
+ "\n",
+ "h6=hf+x*(hg-hf)# enthalpy @ state 6\n",
+ "\n",
+ "# we now calculate energy input\n",
+ "qb=(h5-h4)+(h3-h2)# heat interaction\n",
+ "\n",
+ "# we now calculate work output\n",
+ "wt=(h5-h6)+(h3-h4)# turbine work\n",
+ "\n",
+ "eff=(wt)/qb # efficiency of power cycle\n",
+ "print\" The Efficiency is\",round(eff,3),\" or\",round(eff*100,2),\"%\"\n",
+ "\n",
+ "# // The anwer is different in textbook as there the intermediate values are approximated while in python the calculations are precise \n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Efficiency is 0.336 or 33.57 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.6:PG-155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# initialization of variables\n",
+ "\n",
+ "# Please refer to fig of question 6.1 for quantities\n",
+ "\n",
+ "effi1=0.357 #efficiency from example 6.3\n",
+ "P2=2*1000.0 #higher pressure converted in in kPa\n",
+ "P1=10.0 # lower pressure in kPa\n",
+ "rho=1000.0 # density of water in Kg/m^3\n",
+ "T2=600.0 # max temperature of cycle in degree celsius\n",
+ "h1=192.0 # enthalpy at state 1 in kJ/kg\n",
+ "h3=3690.0 # enthalpy at state 3 in kJ/kg, 600*C and 2MPa pressure\n",
+ "h4=2442.0 # enthalpy from example 6.3\n",
+ "h6=505.0 # specific enthalpy @ 200 kPa from steam table\n",
+ "h7=h6 # isenthalpic process\n",
+ "s3=7.702# entropy at state 3 in kJ/kg.K, 600*C and 2MPa pressure\n",
+ "\n",
+ "h2=h1 # isenthalpic process\n",
+ "s5=s3 # isentropic process\n",
+ "h5=(s3-7.509)*(2971-2870)/(7.709-7.509)+2870 # interpolationg from steam table 2 200 kPa using s5=s3= 7.702 kJ/kg.\n",
+ "\n",
+ "m6=1.0 # let mass of steam =1 Kg\n",
+ "m5=(h6-h2)*(m6)/(h5-h2) \n",
+ "m2=m6-m5 # conservation of mass\n",
+ "\n",
+ "wt=h3-h5+(h5-h4)*m2 # work done by turbine\n",
+ "qb=h3-h7 # heat given to bolier\n",
+ "effi2=(wt)/qb # efficiency of power cycle\n",
+ "print \" The Efficiency is\",round(effi2,4),\" or\",round(effi2*100),\"% \\n\"\n",
+ "perincrease=((effi2-effi1)/effi1)*100 \n",
+ "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n",
+ "\n",
+ "# The anwer is different in textbook as there the intermediate values are approximated while in python the calculations are precise \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Efficiency is 0.3732 or 37.0 % \n",
+ "\n",
+ " The % increase in Efficiency is 4.55 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.7:PG-156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# solution\n",
+ "#initialization of variables\n",
+ "P2=2*1000 #higher pressure converted in kPa\n",
+ "P1=10 # lower pressure in kPa\n",
+ "h1=192 # enthalpy at 10 kPa in kJ/kg\n",
+ "h3=3248 # enthalpy @ state 3 in kJ/kg from table C.3\n",
+ "s3=7.128 # entropy @ state 3 in kJ/kg.K from table C.3\n",
+ "\n",
+ "s4=s3 # isentropic process\n",
+ "\n",
+ "h4=((s4-7.038)/(7.233-7.038))*(3056-2950)+2950 #using adjacent values for \n",
+ "#interpolation from table C.3 \n",
+ "h5=3267 # enthalpy at 800 kPa and $00 degree celsius\n",
+ "s5=7.572 # entropy at 800 kPa and $00 degree celsius\n",
+ "\n",
+ "s6=s5 # isentropic process\n",
+ "sf=0.6491# entropy of saturated liquid @10 kPa from steam table\n",
+ "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
+ "\n",
+ "x=(s6-sf)/(sg-sf)# quality of steam\n",
+ "\n",
+ "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
+ "hg=2585 # enthalpy of saturated vapour @10 kPa from steam table\n",
+ "\n",
+ "h6=hf+x*(hg-hf)# enthalpy @ state 6\n",
+ "h7=721 # enthalpy of saturated liquid @800 kPa from steam table\n",
+ "h8=h7 # isenthalpic process\n",
+ "h2=h1 # isenthalpic process\n",
+ "\n",
+ "m8=1 # let mass of steam =1 Kg\n",
+ "m4=(h8-h2)*(m8)/(h4-h2)\n",
+ "m2=m8-m4 # conservation of mass\n",
+ "\n",
+ "wt=h3-h4+(h5-h6)*m2 # work done by turbine\n",
+ "qb=h3-h8+(h5-h4)*m2 # heat given to bolier\n",
+ "\n",
+ "effi=(wt)/qb # efficiency of power cycle\n",
+ "# result\n",
+ "print \" The Efficiency is\",round(effi,3),\" or\",round(effi*100,2),\"%\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Efficiency is 0.347 or 34.7 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.8:PG-159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# solution\n",
+ "#initialization of variables\n",
+ "\n",
+ "# for rankine cycle refer to fig 6.9\n",
+ "\n",
+ "effiT=0.8 # turbine efficiency\n",
+ "P2=2*1000 # higher pressure converted in kPa\n",
+ "P1=10 # lower pressure in kPa\n",
+ "h1=192 # enthalpy at 10 kPa in kJ/kg\n",
+ "h3=3690 # enthalpy of superheated steam @ 2 MPa from steam table in kJ/kg\n",
+ "s3=7.702 #entropy of superheated steam @ 2 MPa from steam table in kJ/kg.K\n",
+ "# state 4' is repsresented by '41'\n",
+ "h2=h1 #isenthalpic process\n",
+ "s41=s3 # entropy is constant\n",
+ "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
+ "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
+ "x=(s41-sf)/(sg-sf)# from property of pure substance\n",
+ "\n",
+ "hf=191.8 #enthalpy of saturated liquid @10 kPa from steam table\n",
+ "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
+ "h41=hf+x*(hg-hf)# enthalpy @ state 41\n",
+ "\n",
+ "wa=effiT*(h3-h41)# turbine efficiency =(actual work)/(isentropic work)\n",
+ "\n",
+ "qb=h3-h2 # heat supplied\n",
+ "\n",
+ "effi=(wa)/qb # efficiency of power cycle\n",
+ "print\" The Efficiency is\",round(effi,3),\" or\",round(effi*100,1),\"%\"\n",
+ "\n",
+ "h4=h3-wa # adiabatic process\n",
+ "\n",
+ "# now using interpolation for superheated steam @ 10 kPa\n",
+ "T4=(h4-2688)*(150-100)/(2783-2688)+100\n",
+ "\n",
+ "print \"\\n The Temperature from interpolation comes out to be\",int(T4),\" degree celsius\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Efficiency is 0.286 or 28.6 %\n",
+ "\n",
+ " The Temperature from interpolation comes out to be 101 degree celsius\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.9:PG-162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization of variables\n",
+ "\n",
+ "# refer to fig 6.10c\n",
+ "\n",
+ "mdot=0.6 # mass flow rate of refrigerant in kg/sec\n",
+ "T1=-24 # evaporator temperature in degree celsius\n",
+ "T2=39.39 # condenser temperature in degree celsius\n",
+ "h1=232.8 # enthalpy of saturated R134a vapour @ -24 degree celsius from table D.1\n",
+ "s1=0.9370 # entropy of saturated R134a vapour @ -24 degree celsius from table D.1\n",
+ "h3=105.3 # enthalpy of saturated R134a liquid @ -24 degree celsius from table D.2\n",
+ "h4=h3 # isenthalpic process\n",
+ "\n",
+ "# interpolating enthalpy from table D.3 @ 39.39 degree celsius\n",
+ "h2=(s1-0.9066)*(280.19-268.68)/(0.9428-0.9066)+268.68\n",
+ "QdotE=mdot*(h1-h4) # heat transfer rate\n",
+ "WdotC=mdot*(h2-h1)# power given to compressor\n",
+ "\n",
+ "COP=QdotE/WdotC # coefficient of performance\n",
+ "\n",
+ "Hp=(WdotC/0.746)/(QdotE/3.52) #calculating Horsepower required per Ton\n",
+ "\n",
+ "print \"The rate of refrigeration is\",round(QdotE,2),\"kJ/s \\n \"\n",
+ "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
+ "print \"The rating in horsepower per ton is\",round(Hp,3),\" hp\\n \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of refrigeration is 76.5 kJ/s \n",
+ " \n",
+ "The coefficient of performance is 2.8 \n",
+ " \n",
+ "The rating in horsepower per ton is 1.686 hp\n",
+ " \n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.10:PG-163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization of variables\n",
+ "# refer to fig 6.10c\n",
+ "effi=0.8 # compressor efficiency\n",
+ "mdot=0.6 # mass flow rate of refrigerant in Kg/sec\n",
+ "T4=-24 # temperature of evaporator\n",
+ "T2=39.39 # temperature of condensor\n",
+ "T1=-20.0 # supeheating temperature\n",
+ "T3=40 # subcooling temperature\n",
+ "h3=106.2 # enthalpy of liquid R-134a @ 40 degree celsius from table D.1\n",
+ "h4=h3 # isenthalpic process\n",
+ "h1=236.5 # enthalpy of superheated R-134a @ 0.10 MPa and -20 degree celsius from table D.3\n",
+ "s1=0.960 #entropy of superheated R-134a @ 0.10 MPa and -20 degree celsius from table D.3 \n",
+ "\n",
+ "s2dash=s1 # isentropic process\n",
+ "\n",
+ "# using interpolation from table D.3 @ 1.0 MPa for s2dash=0.960 \n",
+ "h2dash=(s2dash-0.9428)*(291.36-280.19)/(0.9768-0.9428)+280.19\n",
+ "\n",
+ "h2=(h2dash-h1)/(effi)+h1 # by definition of compressor efficiency\n",
+ "\n",
+ "QdotE=mdot*(h1-h4)#heat transfer rate power given to compressor\n",
+ " \n",
+ "wdotc=mdot*(h2-h1)# power given to compressor\n",
+ "\n",
+ "COP=QdotE/wdotc # coefficient of performance\n",
+ "\n",
+ "print \"The rate of refrigeration is\",round(QdotE,1),\"kJ/s \\n \"\n",
+ "\n",
+ "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
+ "# The value of Wdotc is shown wrong in the textbook. It should be multiplied by mass flow rate\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate of refrigeration is 78.2 kJ/s \n",
+ " \n",
+ "The coefficient of performance is 2.11 \n",
+ " \n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6.11:PG-165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# solution\n",
+ "#initialization of variables\n",
+ "# refer to fig 6.10c\n",
+ "\n",
+ "QdotC=300 #heating Load in KWh or heat rejected by condensor\n",
+ "T1=-12 # evaporator temperature in degree celsius\n",
+ "P2=800 # condensor pressure in kPa \n",
+ "h1=240 # specific enthalpy of saturated R-134a vapour @ -12 degree celsius from table D.1\n",
+ "s1=0.927 # specific entropy of saturated R-134a vapour @ -12 degree celsius from table D.1\n",
+ "s2=s1 # isentropic process\n",
+ "h3=93.4 #specific enthalpy of saturated R-134a liquid @ 800 kPa from tableD.2\n",
+ "\n",
+ "# extrapolating enthalpy from table D.2 @ 0.8 MPa for s=0.927\n",
+ "h2=273.7-(0.9374-s2)*(284.4-273.7)/(0.9711-0.9374)\n",
+ "\n",
+ "# QdotE=mdot*(h1-h4) is heat transfer rate\n",
+ "mdot=QdotC/(h2-h3)# mass flow rate\n",
+ "\n",
+ "WdotC=mdot*(h2-h1)# power given to compressor\n",
+ "\n",
+ "#part(a)\n",
+ "COP=QdotC/WdotC # coefficient of performance\n",
+ "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
+ "\n",
+ "#part(b)\n",
+ "Cost=WdotC*0.07 # cost of electricity\n",
+ "print \"The cost of electricity is $\",round(Cost,3),\"/hr \\n\"\n",
+ "\n",
+ "#part(c)\n",
+ "costgas=(300*3600*0.50)/100000 # cost of gas\n",
+ "print \"The cost of gas is $\",round(costgas,2),\"/hr \\nThus heat pump is better \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The coefficient of performance is 5.82 \n",
+ " \n",
+ "The cost of electricity is $ 3.607 /hr \n",
+ "\n",
+ "The cost of gas is $ 5.4 /hr \n",
+ "Thus heat pump is better \n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter7_2.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter7_2.ipynb new file mode 100755 index 00000000..1c4b1c97 --- /dev/null +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter7_2.ipynb @@ -0,0 +1,616 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c5a74c16b8ffa890dee9e16252d9e0c3674909f92103f0b1c670f62652469cd7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7:Power and Refrigeration Gas Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.1:PG-175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "r=12 # compression ratio\n",
+ "k=1.4 # polytropic index for air\n",
+ "p1=200.0 # pressure at state 1 in kPa\n",
+ "p3=10000.0 # pressure at state 3 in kPa\n",
+ "\n",
+ "c=100/(r-1) # clearance in percentage\n",
+ "print \"The percent clearance is\",round(c,2),\"% \\n\"\n",
+ "v3=100.0 # let us assume v3=100 m^3 for calculations\n",
+ "p2=p1*(r**k) # polytopic process pressure relation\n",
+ "p4=p3*(1/(r**k))# polytropic process pressure relation\n",
+ "w34=v3*(r*p4-p3)/(1-k) # polytropic work done in process 3 to 4\n",
+ "v2=v3 # constant volume process\n",
+ "w12=v2*(p2-r*p1)/(1-k)\n",
+ "wcycle=w12+w34 # total work in cycle\n",
+ " # now equating the polytropic work calculated to work by MEP\n",
+ "MEP=wcycle/(r*v2-v2) # as work = pressure*change in volume\n",
+ "print \"The MEP is\",round(MEP),\" kPa\" \n",
+ "# The solution is wrong in textbook as calculation for P2 is wrong \n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percent clearance is 9.0 % \n",
+ "\n",
+ "The MEP is 503.0 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.2:PG-179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "r=10.0 # compression ratio\n",
+ "k=1.4 # polytropic index for air\n",
+ "R=0.287 # specific gas constant for air\n",
+ "Cv=0.717 # specific heat at constant volume\n",
+ "Wnet=1000 # net work output in kJ/kg\n",
+ "T1=227+273.0 # low air temperaure in kelvin\n",
+ "p1=200.0 # low pressure in kPa\n",
+ "\n",
+ "effi=1-(1/r**(k-1)) # thermal efficeiency \n",
+ "print \"The maximum possible thermal efficiency is\",round(effi*100,1),\"% \\n\"\n",
+ "\n",
+ "T2=T1*(r)**(k-1) # isentropic process temperature relation\n",
+ "\n",
+ "T4=((Wnet/Cv)+T2-T1)/((r**(k-1))-1) # using expression for work\n",
+ "\n",
+ "T3=T4*(r)**(k-1)\n",
+ "\n",
+ "efficarnot=1-T1/T3\n",
+ "print \"The carnot efficiency is\",round(efficarnot*100),\"%\"\n",
+ "\n",
+ "v1=R*T1/p1 # initial volume \n",
+ "v2=v1/r # from compression ratio\n",
+ "\n",
+ "MEP=Wnet/(v1-v2) # mean effective pressure equation\n",
+ "\n",
+ "print \"The MEP is\",round(MEP),\" kPa\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum possible thermal efficiency is 60.2 % \n",
+ "\n",
+ "The carnot efficiency is 86.0 %\n",
+ "The MEP is 1549.0 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.3:PG-182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "\n",
+ "r=18 # compression ratio\n",
+ "k=1.4 # polytropic index for air\n",
+ "R=0.287 # specific gas constant for air\n",
+ "Cv=0.717 # specific heat at constant volume\n",
+ "Cp=1.0 # specific heat at constant pressure\n",
+ "T1=200+273 # lower temperaure in kelvin\n",
+ "P1=200.0 # low pressure in kPa\n",
+ "T3=2000 # higher temperature of cycle in kelvin\n",
+ "\n",
+ "v1=R*T1/P1 # specific volume at state 1 in m^3\n",
+ "v2=v1/r # specific volume after compression in m^3\n",
+ "\n",
+ "T2=T1*(v1/v2)**(k-1) # temperature after compression\n",
+ "P2=P1*(v1/v2)**k # pressure after compression\n",
+ "P3=P2 # diesel cycle\n",
+ "v3=R*T3/P3 # volume at state 3\n",
+ "\n",
+ "rc=v3/v2 # cutoff ratio\n",
+ "\n",
+ "effi=1-((rc**k)-1)/(r**(k-1)*k*(rc-1))\n",
+ "\n",
+ "\n",
+ "print \"The thermal efficiency is\",round(effi*100,1),\"%\"\n",
+ "\n",
+ "v4=v1 # diesel cycle\n",
+ "T4=T3*(v3/v4)**(k-1) # adiabatic process\n",
+ "\n",
+ "qin=Cp*(T3-T2) # using first law \n",
+ "qout=Cv*(T4-T1) # heat rejected \n",
+ "\n",
+ "Wnet=qin-qout # net work\n",
+ "MEP=Wnet/(v1-v2) # expression of mean effective pressure in terms of work\n",
+ "\n",
+ "print \"The MEP is\",round(MEP),\" kPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thermal efficiency is 66.6 %\n",
+ "The MEP is 515.0 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.4:PG-183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "r=18 # compression ratio\n",
+ "k=1.4 # polytropic index for air\n",
+ "R=0.287 # specific gas constant for air\n",
+ "T1=200+273 # lower temperaure in kelvin\n",
+ "P1=200.0 # low pressure in kPa\n",
+ "T3=2000.0 # higher temperature of cycle in kelvin \n",
+ "\n",
+ "v1=R*T1/P1 # specific volume at state 1 in m^3\n",
+ "#using table E.1\n",
+ "u1=340.0 # specific internal energy in kJ/kg\n",
+ "vr1=198.1 # in m^3/kg\n",
+ "\n",
+ "vr2=vr1*(1/r) # as r=v1/v2\n",
+ "\n",
+ "# now finding corresponding values from table E.1\n",
+ "T2=1310.0 # temperature in kelvin\n",
+ "Pr2=34.0 # pressure in kPa\n",
+ "h2=1408.0 # specific entropy in kJ/kg\n",
+ "v2=v1/18 # volume at state 2\n",
+ "P2=R*T2/v2 # pressure at state 2\n",
+ "\n",
+ "h3=2252.1 # specific enthalpy in kJ/kg from table E.1\n",
+ "vr3=2.776 \n",
+ "P3=P2 # diesel cycle\n",
+ "v3=R*T3/P3 # after compression volume\n",
+ "v4=v1 # isochoric process\n",
+ "vr4=vr3*v4/v3 # isentropic process\n",
+ "# now using Vr4 we read corresponding value from table E.1\n",
+ "T4=915 # final temperature in kelvin\n",
+ "u4=687.5 # specific internal energy at state 4\n",
+ "\n",
+ "qin=h3-h2 # using first law \n",
+ "qout=u4-u1 # heat rejected \n",
+ "\n",
+ "Wnet=qin-qout # net work\n",
+ "effi=100*Wnet/qin # thermal efficiency\n",
+ "print\" The thermal efficiency is\",round(effi,1),\"%\"\n",
+ "\n",
+ "MEP=Wnet/(v1-v2) # expression of mean effective pressure in terms of work\n",
+ "\n",
+ "print \" The MEP is\",round(MEP),\" kPa\"\n",
+ "\n",
+ "erroreffi=(66.6-effi)*100/effi # error in efficiency\n",
+ "errorMEP=(515-MEP)*100/MEP # error in MEP\n",
+ "\n",
+ "print \" The % error in efficiency is\",round(erroreffi,1),\"%\"\n",
+ "print \" The % error MEP is\",round(errorMEP,1),\"% \\n\"\n",
+ "\n",
+ "# the answers are slight different due to approximation in textbook ... here answers are precise\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The thermal efficiency is 58.8 %\n",
+ " The MEP is 775.0 kPa\n",
+ " The % error in efficiency is 13.2 %\n",
+ " The % error MEP is -33.5 % \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.5:PG-186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "Cp=1.0 # specific heat at constant pressure\n",
+ "k=1.4 # polytropic index for air\n",
+ "T1=25+273.0 # temperature at compressor inlet\n",
+ "T3=850+273.0 # maximum temperature in kelvin\n",
+ "\n",
+ "r=5.0 # pressure ratio=P2/P1 & P4/P3\n",
+ "\n",
+ "T2=T1*(r)**((k-1)/k) # temperature after compression\n",
+ "\n",
+ "T4=T3*(1/r)**((k-1.0)/k) # final temperature\n",
+ "\n",
+ "Wcomp=Cp*(T2-T1) # compressor work\n",
+ "Wturb=Cp*(T3-T4) # turbine work\n",
+ "\n",
+ "BWR=Wcomp/Wturb # back work ratio\n",
+ "\n",
+ "print \" The BWR is\",round(BWR*100,1),\"%\\n\" \n",
+ "\n",
+ "Effi=1-r**((1-k)/k) # thermal efficiency\n",
+ "\n",
+ "print\" The thermal efficiency is\",round(Effi*100,1),\"%\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The BWR is 42.0 %\n",
+ " The thermal efficiency is 36.9 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.6:PG-186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "Cp=1.0 # specific heat at constant pressure\n",
+ "k=1.4 # polytropic index for air\n",
+ "T1=25+273.0 # temperature at compressor inlet\n",
+ "T3=850+273.0 # maximum temperature in kelvin\n",
+ "\n",
+ "r=5.0 # pressure ratio=P2/P1 & P4/P3\n",
+ "efficomp=0.75 # efficiency of compressor\n",
+ "effiturb=0.75 # efficiency of turbine\n",
+ "\n",
+ "T2dash=T1*(r)**((k-1)/k) # temperature after compression\n",
+ "Wcomp=Cp*(T2dash-T1)/efficomp # compressor work\n",
+ "\n",
+ "T4dash=T3*(1/r)**((k-1)/k) # final temperature\n",
+ "Wturb=Cp*(T3-T4dash)*effiturb # turbine work\n",
+ "\n",
+ "BWR=100*Wcomp/Wturb # back work ratio\n",
+ "\n",
+ "print \" The BWR is\",round(BWR,1),\"%\\n\"\n",
+ "\n",
+ "T2=(Wcomp/Cp)+T1 # actual temperature of state 2\n",
+ "\n",
+ "qin=Cp*(T3-T2) # using first law \n",
+ "\n",
+ "Wnet=(Wturb-Wcomp) # net work\n",
+ "\n",
+ "effi=100*Wnet/qin # thermal efficiency\n",
+ "print\" The thermal efficiency is\",round(effi,1),\"%\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The BWR is 74.7 %\n",
+ " The thermal efficiency is 13.2 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.7:PG-191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "Cp=1.0 # specific heat at constant pressure\n",
+ "k=1.4 # polytropic index for air\n",
+ "T1=25+273.0 # temperature at compressor inlet\n",
+ "T3=850+273.0 # maximum temperature in kelvin\n",
+ "\n",
+ "r=5.0 # pressure ratio=P2/P1 & P4/P3\n",
+ "\n",
+ "T2=T1*(r)**((k-1)/k) # temperature after compression\n",
+ "\n",
+ "T4=T3*(1/r)**((k-1)/k) # final temperature\n",
+ "\n",
+ "Wcomp=Cp*(T2-T1) # compressor work\n",
+ "Wturb=Cp*(T3-T4) # turbine work\n",
+ "\n",
+ "BWR=Wcomp/Wturb # back work ratio\n",
+ "\n",
+ "print \" The BWR is\",round(BWR,2),\"\\n\"\n",
+ "\n",
+ "effi=(1-((T1/T4)*(r**((k-1)/k))))# efficiency\n",
+ "print\" The thermal efficiency is\",round(effi*100,1),\"%\"\n",
+ "# The solution in textbook is incorrect due to wrong value of T4 (temperature at state 4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The BWR is 0.42 \n",
+ "\n",
+ " The thermal efficiency is 33.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.8:PG-193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "#REFER TO FIG.:7.8\n",
+ "\n",
+ "Cp=1 # specific constant at constant pressure\n",
+ "k=1.4 # polytropic constant for air\n",
+ "T5=25+273.0 # temperature at state 5 in kelvin\n",
+ "T7=850+273.0 # temperature at state 4 in kelvin\n",
+ "T9=350 # exit temperature of water from bolier in kelvin\n",
+ "WdotST=100000.0 # power from steam turbine in Watt\n",
+ "r=5.0 # pressure ratio=P2/P1 & P4/P3\n",
+ "\n",
+ "h1=192.0 # specific enthalpy at 10 Kpa from steam table\n",
+ "h2=h1 # isenthalpic process\n",
+ "h3=3214.0 # specific enthalpy at 4 Mpa and 400 degree celsius from steam table\n",
+ "s3=6.769 # specific entropy at 4 Mpa and 400 degree celsius from steam table\n",
+ "\n",
+ "s4=s3 # isentropic process\n",
+ "sf=0.6491 # specific entropy of saturated liquid at 10 kPa and 45 degree celsiusfrom table C.2\n",
+ "sg=8.1510 # specific entropy of saturated liquid at 10 kPa and 45 degree celsiusfrom table C.2\n",
+ "x4=(s4-sf)/(sg-sf) # quality of steam\n",
+ "\n",
+ "hf=h1 # specific enthalpy of saturated liquid @ 10 Kpa \n",
+ "hg=2584.6\n",
+ "h4=hf+x4*(hg-hf) # specific entropy at state 4\n",
+ "\n",
+ "mdots=WdotST/(h3-h4) # steam mass flow rate from turbine output\n",
+ "\n",
+ "T6=T5*(r**((k-1)/k)) # adiabatic process relation\n",
+ "T8=T7*(1/r**((k-1)/k)) # adiabatic process relation\n",
+ "\n",
+ "# Now using energy balance in boiler\n",
+ "mdota=mdots*(h3-h2)/(Cp*(T8-T9)) # mass flow rate of water\n",
+ "\n",
+ "Wdotturb=mdota*Cp*(T7-T8) # power produced by turbine\n",
+ "\n",
+ "Wdotcomp=mdota*Cp*(T6-T5) # energy needed by compressor\n",
+ "\n",
+ "WdotGT=Wdotturb-Wdotcomp # net turbine work\n",
+ "\n",
+ "Qdotin=mdota*Cp*(T7-T6) # energy input by combustor\n",
+ "\n",
+ "effi=100*(WdotST+WdotGT)/Qdotin # combined efficiency\n",
+ "\n",
+ "print \"The thermal efficiency of the combined cycle is\",round(effi,1),\"%\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thermal efficiency of the combined cycle is 56.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.9:PG-196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "Cp=1 # specific constant at constant pressure\n",
+ "k=1.4 # polytropic constant for air\n",
+ "r=10.0\n",
+ "T2=-10+273 # temperature at entry of compressor\n",
+ "T4=30+273 # temperature at entry of turbine\n",
+ "\n",
+ "T3=T2*(r**((k-1)/k)) # temperature at state 3 in kelvin\n",
+ "T1=T4*(1/r**((k-1)/k)) # temperature at state 1 in degree celsius\n",
+ "print \"The minimum temperature is\",round(T1-273),\"degree celsius \\n\"\n",
+ "\n",
+ "qin=Cp*(T2-T1) # heat input\n",
+ "Wcomp=Cp*(T3-T2)# compressor work\n",
+ "Wturb=Cp*(T4-T1) # turbine work\n",
+ "\n",
+ "COP=qin/(Wcomp-Wturb) # COP of refrigeration\n",
+ "print\" The COP is\",round(COP,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum temperature is -116.0 degree celsius \n",
+ "\n",
+ " The COP is 1.07\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7.10:PG-196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#solution\n",
+ "# initialization of variables\n",
+ "\n",
+ "Cp=1.0 # specific constant at constant pressure\n",
+ "k=1.4 # polytropic constant for air\n",
+ "r=10.0\n",
+ "T3=-10+273 # temperature at entry of compressor\n",
+ "T6=-40+273 # temperature at entry of turbine\n",
+ "\n",
+ "T5=T3 # heat exchanger\n",
+ "T2=T6 # heat exchanger\n",
+ "\n",
+ "T4=T3*(r**((k-1)/k)) # temperature after compression\n",
+ "T1=T6*(1/r**((k-1)/k)) # temperature after exit from turbine\n",
+ "\n",
+ "print \"The minimum temperature is\",round(T1-273),\"degree celsius \\n\"\n",
+ "\n",
+ "qin=Cp*(T2-T1) # heat input\n",
+ "Wcomp=Cp*(T4-T3)# compressor work\n",
+ "Wturb=Cp*(T6-T1) # turbine work\n",
+ "\n",
+ "COP=qin/(Wcomp-Wturb) # COP of refrigeration\n",
+ "\n",
+ "print\" The COP is\",round(COP,3)\n",
+ "\n",
+ "# the answer is correct within given limits\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum temperature is -152.0 degree celsius \n",
+ "\n",
+ " The COP is 0.848\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Thermodynamics_Demystified/Chapter8.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter8_2.ipynb index 2ab04749..2ab04749 100755 --- a/Thermodynamics_Demystified/Chapter8.ipynb +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter8_2.ipynb diff --git a/Thermodynamics_Demystified/Chapter9.ipynb b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter9_2.ipynb index 9448e892..9448e892 100755 --- a/Thermodynamics_Demystified/Chapter9.ipynb +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/Chapter9_2.ipynb diff --git a/Thermodynamics_Demystified/README.txt b/Thermodynamics_Demystified_by_Merle_C_Potter/README.txt index 2aa18a7d..2aa18a7d 100755 --- a/Thermodynamics_Demystified/README.txt +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/README.txt diff --git a/Thermodynamics_Demystified/screenshots/Carnotrefrigerator.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/Carnotrefrigerator.png Binary files differindex 464e99d0..464e99d0 100755 --- a/Thermodynamics_Demystified/screenshots/Carnotrefrigerator.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/Carnotrefrigerator.png diff --git a/Thermodynamics_Demystified/screenshots/carnotrefrigerator.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator.png Binary files differindex cf918bd5..cf918bd5 100755 --- a/Thermodynamics_Demystified/screenshots/carnotrefrigerator.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator.png diff --git a/Thermodynamics_Demystified/screenshots/carnotrefrigerator_1.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator_1.png Binary files differindex cf918bd5..cf918bd5 100755 --- a/Thermodynamics_Demystified/screenshots/carnotrefrigerator_1.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator_1.png diff --git a/Thermodynamics_Demystified/screenshots/carnotrefrigerator_2.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator_2.png Binary files differindex cf918bd5..cf918bd5 100755 --- a/Thermodynamics_Demystified/screenshots/carnotrefrigerator_2.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/carnotrefrigerator_2.png diff --git a/Thermodynamics_Demystified/screenshots/internalenergy.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy.png Binary files differindex 04bc8fe4..04bc8fe4 100755 --- a/Thermodynamics_Demystified/screenshots/internalenergy.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy.png diff --git a/Thermodynamics_Demystified/screenshots/internalenergy_1.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_1.png Binary files differindex 04bc8fe4..04bc8fe4 100755 --- a/Thermodynamics_Demystified/screenshots/internalenergy_1.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_1.png diff --git a/Thermodynamics_Demystified/screenshots/internalenergy_2.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_2.png Binary files differindex 04bc8fe4..04bc8fe4 100755 --- a/Thermodynamics_Demystified/screenshots/internalenergy_2.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_2.png diff --git a/Thermodynamics_Demystified/screenshots/internalenergy_3.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_3.png Binary files differindex 04bc8fe4..04bc8fe4 100755 --- a/Thermodynamics_Demystified/screenshots/internalenergy_3.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/internalenergy_3.png diff --git a/Thermodynamics_Demystified/screenshots/quasiequilibrium.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium.png Binary files differindex 464e99d0..464e99d0 100755 --- a/Thermodynamics_Demystified/screenshots/quasiequilibrium.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium.png diff --git a/Thermodynamics_Demystified/screenshots/quasiequilibrium_1.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_1.png Binary files differindex 464e99d0..464e99d0 100755 --- a/Thermodynamics_Demystified/screenshots/quasiequilibrium_1.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_1.png diff --git a/Thermodynamics_Demystified/screenshots/quasiequilibrium_2.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_2.png Binary files differindex 464e99d0..464e99d0 100755 --- a/Thermodynamics_Demystified/screenshots/quasiequilibrium_2.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_2.png diff --git a/Thermodynamics_Demystified/screenshots/quasiequilibrium_3.png b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_3.png Binary files differindex 41ef1110..41ef1110 100755 --- a/Thermodynamics_Demystified/screenshots/quasiequilibrium_3.png +++ b/Thermodynamics_Demystified_by_Merle_C_Potter/screenshots/quasiequilibrium_3.png diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/README.txt b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/README.txt new file mode 100755 index 00000000..ccf23c27 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/README.txt @@ -0,0 +1,10 @@ +Contributed By: pratik gandhi +Course: bca +College/Institute/Organization: Cybercom Creation +Department/Designation: Developer +Book Title: Thermodynamics and Heat Power +Author: I. Granet and M. Bluestein +Publisher: Addison Wesley(singapore), New Delhi +Year of publication: 2001 +Isbn: 81-7808-291-8 +Edition: 6
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb index ff3ad88b..ff3ad88b 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_2.ipynb new file mode 100755 index 00000000..ff3ad88b --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_2.ipynb @@ -0,0 +1,758 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8da890ac5238ff5b0c8b5e2f22721a2e530a75b68b25eb33de8468d2a1b6f0fb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Refrigeration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n", + "T2 = 32+460; \t\t\t#32F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n", + "print \"Solution for a\"\n", + "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#heat removal\n", + "WbyJ = Qremoved/COP; \t\t\t#The power required \t\t\t#Unit:Btu/min\n", + "print \"The power required is %.2f Btu/min\"%(WbyJ);\n", + "print \"Solution for c\"\n", + "Qrej = Qremoved+WbyJ; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:Btu/min\n", + "print \"The rate of heat rejected to the room is %.2f Btu/min\"%(Qrej);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performanceCOP) of the cycle is 12.00\n", + "Solution for b\n", + "The power required is 83.00 Btu/min\n", + "Solution for c\n", + "The rate of heat rejected to the room is 1083.00 Btu/min\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "T1 = 20+273; \t\t\t#20C = 20+273 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n", + "T2 = -5+273; \t\t\t#-5C = -5+273 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n", + "print \"Solution for a\"\n", + "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "Qremoved = 30; \t\t\t#Unit:kW \t\t\t#heat removal \n", + "W = Qremoved/COP; \t\t\t#power required \t\t\t#unit:kW\n", + "print \"The power required is %.2f kW \"%(W);\n", + "print \"Solution for c\"\n", + "Qrej = Qremoved+W; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:kW\n", + "print \"The rate of heat rejected to the room is %.2f kW\"%(Qrej);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performanceCOP) of the cycle is 10.00\n", + "Solution for b\n", + "The power required is 3.00 kW \n", + "Solution for c\n", + "The rate of heat rejected to the room is 33.00 kW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 Page No : 505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n", + "T2 = 20+460; \t\t\t#20F = 20+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n", + "print \"Solution for a\"\n", + "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "HPperTOR = 4.717/COP; \t\t\t#Horsepower per ton of refrigeration \t\t\t#Unit:hp/ton\n", + "COPactual = 2; \t\t\t#Actual Coefficient of performance(COP) is stated to be 2\n", + "HPperTORactual = 4.717/COPactual; \t\t\t#Horsepower per ton of refrigeration(actual) \t\t\t#Unit:hp/ton\n", + "print \"The horsepower required by the actual cycle over the minimum is %.2f hp/ton\"%(HPperTORactual-HPperTOR);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performanceCOP) of the cycle is 9.00\n", + "Solution for b\n", + "The horsepower required by the actual cycle over the minimum is 1.83 hp/ton\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 Page No : 506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "COP = 4.5; \t\t\t#Coefficient of performance \t\t\t#From problem 10.1\n", + "HPperTOR = 4.717/COP; \t\t\t#Horsepower per ton of refrigeration \t\t\t#Unit:hp/ton\n", + "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#From problem 10.1\n", + "#1000 Btu/min /200 Btu/min ton = 5 tons of refrigeration\n", + "HPrequired = HPperTOR*5; \t\t\t#The horsepower required \t\t\t#unit:hp\n", + "print \"The horsepower required is %.2f hp\"%(HPrequired);\n", + "#In problem 10.1, 77.2 Btu/min was required\n", + "print \"The power required is %.2f hp\"%(77.2*778*inv([[33000]])); \t\t\t#1 Btu = 778 ft*lbf \t\t\t#1 min*hp = 33000 ft*lbf\n", + "#The ratio of the power required in each problem is the same as the inverse ratio of the COP value\n", + "#Therefore,\n", + "print \"The power required is %.2f hp\"%((COP/12.95)*HPrequired); \t\t\t#COPin problem 10.1) = 12.95\n", + "print \"This checks our results\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horsepower required is 5.24 hp\n", + "The power required is 1.82 hp\n", + "The power required is 1.82 hp\n", + "This checks our results\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No : 506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "COP = 10.72; \t\t\t#In the problem 10.2 \t\t\t#Coefficient of performance\n", + "P = 2.8; \t\t\t#In the problem 10.2 \t\t\t#The power was 2.8 kW\n", + "COPactual = 3.8; \t\t\t#Actual Coefficient of performance(COP)\n", + "\n", + "# calculation\n", + "power = P*COP/COPactual; \t\t\t#The power required \t\t\t#unit:kW\n", + "\n", + "# results\n", + "print \"The power required is %.2f kW\"%(power)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power required is 7.90 kW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page No : 509" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Appendix 3,at 120psia,the corresponding saturation temperature is 66 F, enthalpies are\n", + "h1 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n", + "h3 = 602.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "#From the consideration that s3 = s4,h4 is found at 15 psia,\n", + "s3 = 1.3938; \t\t\t#s = entropy \t\t\t#Unit:Btu/(lbm*F)\n", + "#Therefore by interpolation in the superheat tables at 120 psia,\n", + "t4 = 237.4; \t\t\t#Unit:fahrenheit \t\t\t#temperature\n", + "h4 = 733.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"Solution for a\"\n", + "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performance is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "print \"The work of compression is %.2f Btu/lbm\"%(h4-h3);\n", + "print \"Solution for c\"\n", + "print \"The refrigatering effect is %.2f Btu/lbm\"%(h3-h1);\n", + "print \"Solution for d\"\n", + "tons = 30; \t\t\t#capacity of 30 tons is desired\n", + "print \"The pounds per minute of ammonia required for ciculation is %.2f lbm/min\"%((200*tons)/(h3-h1));\n", + "print \"Solution for e\"\n", + "print \"The ideal horsepower per ton of refrigeration is %.2f hp/ton\"%((4.717*h4-h3)/(h3-h1));\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performance is 3.71\n", + "Solution for b\n", + "The work of compression is 131.00 Btu/lbm\n", + "Solution for c\n", + "The refrigatering effect is 486.40 Btu/lbm\n", + "Solution for d\n", + "The pounds per minute of ammonia required for ciculation is 12.34 lbm/min\n", + "Solution for e\n", + "The ideal horsepower per ton of refrigeration is 5.87 hp/ton\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 Page No : 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Appendix 3,110 psig corresponds to 96 F, enthalpies are\n", + "h1 = 30.14; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 30.14; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n", + "h3 = 75.110; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "#From the consideration that s3 = s4,at -20F,\n", + "s3 = 0.17102; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n", + "#Therefore by interpolation in the Freon-12 superheat table at these values,\n", + "h4 = 89.293; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"Solution for a\"\n", + "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performance is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "print \"The work of compression is %.2f Btu/lbm\"%(h4-h3);\n", + "print \"Solution for c\"\n", + "print \"The refrigatering effect is %.2f Btu/lbm\"%(h3-h1);\n", + "print \"Solution for d\";\n", + "tons = 30; \t\t\t#capacity of 30 tons is desired\n", + "print \"The pounds per minute of ammonia required for ciculation is %.2f lbm/min\"%((200*tons)/h3-h1);\n", + "print \"Solution for e\"\n", + "print \"The ideal horsepower per ton of refrigeration is %.2f hp/ton\"%((4.717*h4-h3)/(h3-h1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performance is 3.17\n", + "Solution for b\n", + "The work of compression is 14.18 Btu/lbm\n", + "Solution for c\n", + "The refrigatering effect is 44.97 Btu/lbm\n", + "Solution for d\n", + "The pounds per minute of ammonia required for ciculation is 49.74 lbm/min\n", + "Solution for e\n", + "The ideal horsepower per ton of refrigeration is 7.70 hp/ton\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8 Page No : 517" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Appendix 3,Using the Freon-12 tables, enthalpies are\n", + "h1 = 28.713; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 28.713; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n", + "h3 = 78.335; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "#From the consideration that s3 = s4,\n", + "s3 = 0.16798; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n", + "#Therefore by interpolation in the superheat tables at 90 F,\n", + "s = 0.16798; \t\t\t#entropy at 90F \t\t\t#Btu/lbm*F\n", + "h4 = 87.192; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"The heat extracted is %.2f Btu/lbm\"%(h3-h1);\n", + "print \"The work required is %.2f Btu/lbm\"%(h4-h3);\n", + "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n", + "print \"The Coefficient of performanceCOP) of this ideal cycle is %.2f\"%(COP);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat extracted is 49.62 Btu/lbm\n", + "The work required is 8.86 Btu/lbm\n", + "The Coefficient of performanceCOP) of this ideal cycle is 5.60\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9 Page No : 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Appendix 3,Using the HFC-134a tables, enthalpies are\n", + "h1 = 41.6; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 41.6; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n", + "h3 = 104.6; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "#From the consideration that s3 = s4,\n", + "s3 = 0.2244; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n", + "h4 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"The heat extracted is %.2f Btu/lbm\"%(h3-h1);\n", + "print \"The work required is %.2f Btu/lbm\"%(h4-h3);\n", + "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n", + "print \"The Coefficient of performanceCOP) of this ideal cycle is %.2f\"%(COP);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat extracted is 63.00 Btu/lbm\n", + "The work required is 11.40 Btu/lbm\n", + "The Coefficient of performanceCOP) of this ideal cycle is 5.53\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10 Page No : 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Solution for a\";\n", + "#By defination,the efficiency of the compressor is the ratio of the ideal compression work to actual compression work.\n", + "#Based on the points on fig.10.12, \t\t\t#n = (h4-h3)/(h4'-h3);\n", + "#There is close correspondence between 5.3 psia and -60F for saturated conditions.Therefore,state 3 is a superheated vapour at 5.3 psia and approximately -20F,because the problem states\n", + "#that state 3 has a 40F superheat.Interpolation in the Freon tables in Appendix 3 yields\n", + "T = -20; \t\t\t#Unit:F \t\t\t#temperature\n", + "# p h s\n", + "#7.5 75.719 0.18371\n", + "#5.3 76.885 0.18985 h3 = 75.886 Btu/lbm\n", + "#5.0 75.990 0.19069\n", + "\n", + "#At 100 psia and s = 0.18985,\n", + "# t s h\n", + "# 170F 0.18996 100.571\n", + "# 169.6F 0.18985 100.5 h4 = 100.5 Btu/lbm\n", + "# 160F 0.18726 98.884\n", + "\n", + "#The weight of refrigerant is given by\n", + "# 200(tons)/(h3-h1) = (200*5)/(75.886-h1)\n", + "#In the saturated tables,h1 is\n", + "# p h \n", + "# 101.86 26.832\n", + "# 100psia 26.542\n", + "# 98.87 26.365\n", + "\n", + "#m = mass flow/min\n", + "h1 = 26.542; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "n = 0.8; \t\t\t#Efficiency\n", + "h4 = 100.5; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "h3 = 75.886; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "m = (200*5)/(75.886-h1); \t\t\t#mass\n", + "h4dashminush3 = (h4-h3)/n; \n", + "#Total work of compression = m*(h4minush3)\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "work = (h4dashminush3*m*J)/33000; \t\t\t#1 horsepower = 33,000 ft*LBf/min \t\t\t#Unit:hp \t\t\t#work\n", + "print \"%.2f horsepower is required to drive the compressor if it has a mechanical efficiency 100percentage\"%(work);\n", + "\n", + "print \"Solution for b\";\n", + "#Assuming a specific heat of the water as unity,we obtain\n", + "#From part (a),\n", + "#h4'-h3 = h4minush3\n", + "h4dash = h4dashminush3+h3; \t\t\t#Unit:Btu/lbm\n", + "mdot = (m*(h4dash-h1))/(70-60); \t\t\t#water enters at 60F and leaves at 70F \t\t\t#the required capacity in lbm/min\n", + "print \"%.2f lbm/min of cooling water i.e. %.2f gal/min is the required capacity of cooling water to pump\"%(mdot,mdot/8.3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "14.70 horsepower is required to drive the compressor if it has a mechanical efficiency 100percentage\n", + "Solution for b\n", + "162.35 lbm/min of cooling water i.e. 19.56 gal/min is the required capacity of cooling water to pump\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.11 Page No : 521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Solution for a\";\n", + "#From appendix3,reading the p-h diagram directly,we have\n", + "h3 = 76.2; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "h4 = 100.5; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "n = 0.8; \t\t\t#Efficiency \t\t\t#From 10.10\n", + "work = (h4-h3)/n; \t\t\t#Work of compression \t\t\t#Unit:Btu/lbm\n", + "#The enthalpy of saturated liquid at 100 psia is given at 26.1 Btu/lbm.Proceeding as before yields\n", + "m = (200*5)/(h3-26.1); \t\t\t#Unit:lbm/min \t\t\t#m = massflow/min\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "totalwork = (m*work*J)/33000; \t\t\t#1 horsepower = 33,000 ft*LBf/min \t\t\t#total ideal work \t\t\t#unit:hp\n", + "print \"Total ideal work of compression is %.2f hp\"%(totalwork);\n", + "\n", + "print \"Solution for b\";\n", + "h4dash = h3+work; \t\t\t#Btu/lbm\n", + "mdot = (m*(h4dash-26.5))/(70-60); \t\t\t#water enters at 60F and leaves at 70F \t\t\t#the required capacity in lbm/min\n", + "print \"%.2f lbm/min of cooling water i.e. %.2f gal/min is the required capacity of cooling water to pump\"%(mdot,mdot/8.3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Total ideal work of compression is 14.29 hp\n", + "Solution for b\n", + "159.83 lbm/min of cooling water i.e. 19.26 gal/min is the required capacity of cooling water to pump\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.12 Page No : 526" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "COP = 2.5; \t\t\t#Coefficient of performance\n", + "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n", + "T1 = -100+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R \t\t\t#lowest temperature of the cycle\n", + "T3 = 150+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R \t\t\t#Upper temperature of the cycle\n", + "#T1/T4-T1 = COP\n", + "T4 = (3.5*T1)/COP; \t\t\t#Unit:R \t\t\t#temperature at point 4\n", + "#T2/T3-T2 = COP\n", + "T2 = (COP*T3)/3.5; \t\t\t#Unit:R \t\t\t#temperature at point 2\n", + "print \"The work of the expander is %.2f Btu/lbm of air\"%(cp*T4-T1);\n", + "print \"The work of the compressor is %.2f Btu/lbm of air\"%(cp*T3-T2);\n", + "print \"The net work required by the cycle is %.2f Btu/lbm\"%(((cp*T3-T2))-cp*(T4-T1));\n", + "print \"Per ton of refrigeration, the required airflow is %.2f lbm/min per ton\"%((200/cp*T2-T1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the expander is -239.04 Btu/lbm of air\n", + "The work of the compressor is -289.31 Btu/lbm of air\n", + "The net work required by the cycle is -323.87 Btu/lbm\n", + "Per ton of refrigeration, the required airflow is 362735.24 lbm/min per ton\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.13 Page No : 536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#A VACUUM REFRIGERATION SYSTEM \n", + "#A vacuum refrigeration system is used to cool water from 90F to 45F\n", + "h1 = 58.07; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 13.04; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h3 = 1081.1; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "m1 = 1; \t\t\t#mass \t\t\t#unit:lbm\n", + "#m2 = 1-m3 \t\t\t#unit:lbm\n", + "#Now, m1*h1 = m2*h2 + m3*h3\n", + "#Putting the values and arranging the equation,\n", + "m3 = (m1*h1-h2)/(h3+h2); \t\t\t#The mass of vapour that must be removed per pound \t\t\t#unit:lbm\n", + "\n", + "# results\n", + "print \"The mass of vapour that must be removed per pound of entering water is %.2f lbm\"%(m3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of vapour that must be removed per pound of entering water is 0.04 lbm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.14 Page No : 536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#In problem 10.13,\n", + "#A VACUUM REFRIGERATION SYSTEM \n", + "#A vacuum refrigeration system is used to cool water from 90F to 45F\n", + "h1 = 58.07; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 13.04; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h3 = 1081.1; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "m1 = 1; \t\t\t#mass \t\t\t#lbm\n", + "#m2 = 1-m3 \t\t\t#unit:lbm\n", + "#Now, m1*h1 = m2*h2 + m3*h3\n", + "#Putting the values and arranging the equation,\n", + "m3 = (m1*h1-h2)/(h3+h2); \t\t\t#The mass of vapour that must be removed per pound \t\t\t#unit:lbm\n", + "m2 = 1-m3; \t\t\t#mass \t\t\t#unit:lbm\n", + "print \"The mass of vapour that must be removed per pound of entering water is %.2f lbm\"%(m3);\n", + "#Now,in problem 10.14,\n", + "#The refrigeration effect can be determined as m3*(h3-h1) or m2*(h1-h2)\n", + "print \"The refrigeration effect Using eqn m3*h3-h1) is %.2f Btu/lbm\"%(m3*h3-h1)\n", + "print \"The refrigeration effect Using eqn m2*h1-h2) is %.2f Btu/lbm\"%(m2*h1-h2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of vapour that must be removed per pound of entering water is 0.04 lbm\n", + "The refrigeration effect Using eqn m3*h3-h1) is -13.58 Btu/lbm\n", + "The refrigeration effect Using eqn m2*h1-h2) is 42.64 Btu/lbm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.15 Page No : 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#THE HEAT PUMP\n", + "T1 = 70.+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R) \t\t\t#from problem 10.1\n", + "T2 = 32+460; \t\t\t#32F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R) \t\t\t#from problem 10.1\n", + "COP = T1/(T1-T2); \t\t\t#Coefficient of performance for carnot heat pump\n", + "print \"Coefficient of performanceCOP) of the carnot cycle is %.2f\"%(COP);\n", + "print \"The COP can also be obtained from the energy items solved for in problem 10.1\"\n", + "#In problem 10.1, The power was found to be 77.2 Btu/min and the total tare of heat rejection was 1077.2 Btu/min\n", + "#Therefore,\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(1077.2/77.2); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of performanceCOP) of the carnot cycle is 13.95\n", + "The COP can also be obtained from the energy items solved for in problem 10.1\n", + "Coefficient of performanceCOP) of the cycle is 13.95\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.16 Page No : 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Let us first consider the cycle as a refrigeration cycle\n", + "#In problem 10.1\n", + "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n", + "T2 = 0+460; \t\t\t#0F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n", + "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n", + "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#heat removal\n", + "WbyJ = Qremoved/COP; \t\t\t#the power input \t\t\t#unit:Btu/min\n", + "print \"The power input is %.2f Btu/min\"%(WbyJ);\n", + "Qrej = Qremoved+WbyJ; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:Btu/min\n", + "print \"The rate of heat rejected to the room is %.2f Btu/min\"%(Qrej);\n", + "print \"The COP as a heat pump is %.2f\"%(Qrej/WbyJ);\n", + "print \"As a check, COP of heat pump is %.2f = 1 + COP of carnot cycle %.2f\"%(Qrej/WbyJ,COP);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of performanceCOP) of the cycle is 6.00\n", + "The power input is 166.00 Btu/min\n", + "The rate of heat rejected to the room is 1166.00 Btu/min\n", + "The COP as a heat pump is 7.00\n", + "As a check, COP of heat pump is 7.00 = 1 + COP of carnot cycle 6.00\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb index d0a50659..d0a50659 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_2.ipynb new file mode 100755 index 00000000..d0a50659 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_2.ipynb @@ -0,0 +1,1390 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bca14a59244f78cacc86ebeeb6d600dde8a0df0a85b519507569f4ae617ed968" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Heat Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# given data\n", + "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:feet\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "T1 = 150; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit\n", + "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit\n", + "\n", + "# calculations\n", + "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n", + "Q = (-k*deltaT)/deltaX; \t\t\t#Heat transfer per square foot of wall \t\t\t#Unit:Btu/hr*ft**2\n", + "\n", + "# results\n", + "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer per square foot of wall is 56.00 Btu/hr*ft**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "deltaX = 0.150; \t\t\t#Given,150 mm = 0.150 meter \t\t\t# \t\t\t#deltaX = length \t\t\t#Unit:meter\n", + "k = 0.692; \t\t\t#Unit:W/(m*celcius) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \n", + "T1 = 70; \t\t\t#temperature maintained at one face \t\t\t#celcius\n", + "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#celcius\n", + "\n", + "# calculations\n", + "deltaT = T2-T1; \t\t\t#celcius \t\t\t#change in temperature\n", + "Q = (-k*deltaT)/deltaX; \t\t\t#Heat transfer per square foot of wall \t\t\t#unit:W/m**2\n", + "\n", + "# results\n", + "print \"Heat transfer per square foot of wall is %.2f W/m**2\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer per square foot of wall is 184.53 W/m**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 556" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From example 11.1,\n", + "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:feet \n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "\n", + "Rt = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "\n", + "#Q = deltaT/Rt \t\t\t#Q = heat transfer \t\t\t#ohm's law (fourier's equation)\n", + "#i = deltaE/Re \t\t\t#i = current in amperes \t\t\t#deltaE = The potential difference \t\t\t#Re = the electrical resistance \t\t\t#ohm's law\n", + "# Q/i = (deltaT/Rt)*(deltaE/Re)\n", + "#Q/i = 100; \t\t\t#Given \t\t\t# 1 A correspond to 100 Btu/(hr*ft**2)\n", + "deltaE = 9.; \t\t\t#Unit:Volt \t\t\t#potential difference\n", + "T1 = 150.; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit\n", + "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit\n", + "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n", + "Re = (100*deltaE*Rt)/deltaT; \t\t\t#Unit:Ohms \t\t\t#The electrical resistance needed\n", + "print \"The electrical resistance needed is %.2f ohms\"%(abs(Re));\n", + "i = deltaE/Re; \t\t\t#current \t\t\t#Unit:amperes\n", + "Q = 100*i; \t\t\t#Heat transfer per square foot of wall \t\t\t#Unit:Btu/hr*ft**2\n", + "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electrical resistance needed is 16.07 ohms\n", + "Heat transfer per square foot of wall is 56.00 Btu/hr*ft**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For Brick,\n", + "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1.; \t\t\t#area \t\t\t#unit:ft**2\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For brick\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R1 = R;\n", + "\n", + "#For Concrete,\n", + "deltaX = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R2 = R;\n", + "\n", + "#For plaster,\n", + "deltaX = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For plaster\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R3 = R;\n", + "\n", + "Rot = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:(hr*F)/Btu\n", + "print \"The overall resistance is %.2f hr*F)/Btu\"%(Rot);\n", + "T1 = 70.; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit \n", + "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit \n", + "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n", + "Q = deltaT/Rot; \t\t\t#Q = Heat transfer \t\t\t#Unit:Btu/(hr*ft**2); \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For brick\n", + "The resistance is 1.25 hr*F)/Btu\n", + "For Concrete\n", + "The resistance is 0.05 hr*F)/Btu\n", + "For plaster\n", + "The resistance is 0.14 hr*F)/Btu\n", + "The overall resistance is 1.44 hr*F)/Btu\n", + "Heat transfer per square foot of wall is 27.76 Btu/hr*ft**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"In problem 11.4\"\n", + "#From example 11.4,,,\n", + "#For Brick,\n", + "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#unit:ft**2\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For brick\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R1 = R;\n", + "\n", + "#For Concrete,\n", + "deltaX = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R2 = R;\n", + "\n", + "#For plaster,\n", + "deltaX = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For plaster\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R3 = R;\n", + "\n", + "Rot = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:(hr*F)/Btu\n", + "print \"The overall resistance is %.2f hr*F)/Btu\"%(Rot);\n", + "T1 = 70; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit \n", + "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit \n", + "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n", + "Q = deltaT/Rot; \t\t\t#Q = Heat transfer \t\t\t#Unit:Btu/(hr*ft**2);\n", + "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n", + "\n", + "print \"Now in problem 11.5\"\n", + "deltaT = R*Q \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature \t\t\t#fahrenheit\n", + "#For Brick,\n", + "deltaT = Q*R1; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n", + "t1 = deltaT;\n", + "#For Concrete,\n", + "deltaT = Q*R2; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n", + "t2 = deltaT;\n", + "#For plaster,\n", + "deltaT = Q*R3; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n", + "t3 = deltaT;\n", + "\n", + "deltaTo = t1+t2+t3; \t\t\t#Overall Change in temperature \t\t\t#fahrenheit\n", + "print \"The overall change in temperature is %.2f F\"%(abs(deltaTo));\n", + "#The interface temperature are:\n", + "print \"The interface temperature are:\";\n", + "print \"For brick-concrete : %.2f fahrenheit\"%(abs(T2)+abs(t1));\n", + "print \"For concrete-plaster : %.2f fahrenheit\"%(abs(T2)+abs(t1)+abs(t2));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 11.4\n", + "For brick\n", + "The resistance is 1.25 hr*F)/Btu\n", + "For Concrete\n", + "The resistance is 0.05 hr*F)/Btu\n", + "For plaster\n", + "The resistance is 0.14 hr*F)/Btu\n", + "The overall resistance is 1.44 hr*F)/Btu\n", + "Heat transfer per square foot of wall is 27.76 Btu/hr*ft**2\n", + "Now in problem 11.5\n", + "The overall change in temperature is 40.00 F\n", + "The interface temperature are:\n", + "For brick-concrete : 64.70 fahrenheit\n", + "For concrete-plaster : 66.14 fahrenheit\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For Brick,\n", + "deltaX = 0.150; \t\t\t#Unit:m \t\t\t#150 mm = 0.150 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:m**2\n", + "k = 0.692; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n", + "print \"For brick\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R1 = R;\n", + "\n", + "#For Concrete,\n", + "deltaX = 0.012; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:m**2\n", + "k = 1.385; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R2 = R;\n", + "\n", + "#For plaster,\n", + "deltaX = 0.0120; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:m**2\n", + "k = 0.519; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n", + "print \"For plaster\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R3 = R;\n", + "\n", + "Ro = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:C/W\n", + "print \"The overall resistance is %.2f Celcius/W\"%(Ro);\n", + "T1 = 0; \t\t\t#temperature maintained at one face \t\t\t#Celcius\n", + "T2 = 20; \t\t\t#tempetature maintained at other face \t\t\t#Celcius\n", + "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#Celcius\n", + "Q = deltaT/Ro; \t\t\t#Q = Heat transfer \t\t\t#Unit:W/m**2; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat transfer per square meter of wall is %.2f W/m**2\"%(abs(Q));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For brick\n", + "The resistance is 0.22 Celcius/W\n", + "For Concrete\n", + "The resistance is 0.01 Celcius/W\n", + "For plaster\n", + "The resistance is 0.02 Celcius/W\n", + "The overall resistance is 0.25 Celcius/W\n", + "Heat transfer per square meter of wall is 80.47 W/m**2\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"In problem 11.6\"\n", + "#For Brick,\n", + "deltaX = 0.150; \t\t\t#Unit:m \t\t\t#150 mm = 0.150 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n", + "k = 0.692; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n", + "print \"For brick\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R1 = R;\n", + "\n", + "#For Concrete,\n", + "deltaX = 0.012; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n", + "k = 1.385; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R2 = R;\n", + "\n", + "#For plaster,\n", + "deltaX = 0.0120; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n", + "k = 0.519; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n", + "print \"For plaster\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R3 = R;\n", + "\n", + "Ro = R1+R2+R3; \t\t\t#Rot = The overall resistance Celcius/W\n", + "print \"The overall resistance is %.2f Celcius/W\"%(Ro);\n", + "T1 = 0; \t\t\t#temperature maintained at one face \t\t\t#Celcius\n", + "T2 = 20; \t\t\t#tempetature maintained at other face \t\t\t#Celcius\n", + "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#Celcius\n", + "Q = deltaT/Ro; \t\t\t#Q = Heat transfer \t\t\t#Unit:W/m**2;\n", + "print \"Heat transfer per square meter of wall is %.2f W/m**2\"%(abs(Q));\n", + "\n", + "print \"Now in problem 11.5\"\n", + "#deltaT = R*Q \t\t\t#ohm's law (fourier's equation)\n", + "#For Brick,\n", + "deltaT = Q*R1; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n", + "t1 = deltaT;\n", + "#For Concrete,\n", + "deltaT = Q*R2; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n", + "t2 = deltaT;\n", + "#For plaster,\n", + "deltaT = Q*R3; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n", + "t3 = deltaT;\n", + "\n", + "deltaTo = t1+t2+t3; \t\t\t#The overall Change in temperature \t\t\t#Celcius\n", + "print \"The overall change in temperature is %.2f celcius\"%(abs(deltaTo));\n", + "#The interface temperature are:\n", + "print \"The interface temperature are:\";\n", + "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1));\n", + "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1)-abs(t2));\n", + "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1)-abs(t2)-abs(t3));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 11.6\n", + "For brick\n", + "The resistance is 0.22 Celcius/W\n", + "For Concrete\n", + "The resistance is 0.01 Celcius/W\n", + "For plaster\n", + "The resistance is 0.02 Celcius/W\n", + "The overall resistance is 0.25 Celcius/W\n", + "Heat transfer per square meter of wall is 80.47 W/m**2\n", + "Now in problem 11.5\n", + "The overall change in temperature is 20.00 celcius\n", + "The interface temperature are:\n", + "2.56 Celcius\n", + "1.86 Celcius\n", + "-0.00 Celcius\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "deltaX = 4./12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 7*2.; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n", + "k = 0.090; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n", + "Rfir = deltaX/(k*A); \t\t\t#Resistance of fir \t\t\t#Unit:(hr*F)/Btu\n", + "print \"For fir\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(Rfir);\n", + "\n", + "deltaX = 4./12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 7*2; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n", + "k = 0.065; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for pine \t\t\t#From the table\n", + "Rpine = deltaX/(k*A); \t\t\t#Resistance of pine \t\t\t#Unit:(hr*F)/Btu\n", + "print \"For pine\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(Rpine);\n", + "\n", + "deltaX = 4./12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 7*2; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n", + "k = 0.025; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for corkboard \t\t\t#From the table\n", + "Rcorkboard = deltaX/(k*A); \t\t\t#Resistance of corkboard \t\t\t#Unit:(hr*F)/Btu\n", + "print \"For corkboard\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(Rcorkboard);\n", + "\n", + "Roverall = inv([[inv([[Rfir]])+inv([[Rpine]])+inv([[Rcorkboard]])]]);\n", + "print \"The overall resistance is %.2f hr*F)/Btu\"%(Roverall);\n", + "\n", + "T1 = 60.; \t\t\t#temperature maintained at one face \t\t\t#unit:fahrenheit\n", + "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#unit:fahrenheit\n", + "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n", + "Qtotal = deltaT/Roverall; \t\t\t#Q = Total Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Total Heat loss from the wall is %.2f Btu/hr\"%(abs(Qtotal));\n", + "\n", + "#As a check,\n", + "Qfir = deltaT/Rfir; \t\t\t#Q = Fir Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat loss from the wall made of fir is %.2f Btu/hr\"%(abs(Qfir));\n", + "Qpine = deltaT/Rpine; \t\t\t#Q = Pine Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat loss from the wall made of pine is %.2f Btu/hr\"%(abs(Qpine));\n", + "Qcorkboard = deltaT/Rcorkboard; \t\t\t#Q = corkboard Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat loss from the wall made of corkboard is %.2f Btu/hr\"%(abs(Qcorkboard));\n", + "Qtotal = Qfir+Qpine+Qcorkboard; \t\t\t#Total Heat loss from the wall \t\t\t#unit:Btu/hr\n", + "print \"Total Heat loss from the wall is %.2f Btu/hr\"%(abs(Qtotal));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For fir\n", + "The resistance is 0.26 hr*F)/Btu\n", + "For pine\n", + "The resistance is 0.37 hr*F)/Btu\n", + "For corkboard\n", + "The resistance is 0.95 hr*F)/Btu\n", + "The overall resistance is 0.13 hr*F)/Btu\n", + "Total Heat loss from the wall is 151.20 Btu/hr\n", + "Heat loss from the wall made of fir is 75.60 Btu/hr\n", + "Heat loss from the wall made of pine is 54.60 Btu/hr\n", + "Heat loss from the wall made of corkboard is 21.00 Btu/hr\n", + "Total Heat loss from the wall is 151.20 Btu/hr\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 565" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#A bare steel pipe\n", + "ro = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n", + "ri = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n", + "Ti = 240; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "To = 120; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft\n", + "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n", + "k = 26 \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "\n", + "# Calculations\n", + "Q = (2*math.pi*k*L*deltaT)/math.log(ro/ri); \t\t\t#The heat loss from the pipe \t\t\t#unit:Btu/hr\n", + "\n", + "# Results\n", + "print \"The heat loss from the pipe is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss from the pipe is 635856.36 Btu/hr\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 Page No : 566" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#A bare steel pipe\n", + "ro = 90.; \t\t\t#Outside diameter \t\t\t#Unit:mm\n", + "ri = 75; \t\t\t#inside diameter \t\t\t#Unit:mm\n", + "Ti = 110; \t\t\t#Inside temperature \t\t\t#Unit:Celcius\n", + "To = 40; \t\t\t#Outside temperature \t\t\t#Unit:Celcius\n", + "L = 2; \t\t\t#Length \t\t\t#Unit:m\n", + "\n", + "# Calculations\n", + "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#Unit:Celcius\n", + "k = 45 \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "Q = (2*math.pi*k*L*deltaT)/math.log(ro/ri); \t\t\t#The heat loss from the pipe \t\t\t#unit:W\n", + "\n", + "# Results\n", + "print \"The heat loss from the pipe is %.2f W\"%(Q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss from the pipe is 217111.28 W\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11 Page No : 567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy.linalg import inv\n", + "\n", + "#From problem 11.9,\n", + "#A bare steel pipe\n", + "r2 = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n", + "r1 = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n", + "Ti = 240; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft\n", + "k1 = [[26]]; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "ans1 = (inv(k1)*math.log(r2/r1));\n", + "\n", + "#Now,in problem 11.11,\n", + "#Mineral wool\n", + "r3 = 5.50; \t\t\t#inside diameter \t\t\t#Unit:in.\n", + "r2 = 3.50; \t\t\t#outside diameter \t\t\t#Unit:in.\n", + "To = 85; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n", + "k2 = [[0.026]] \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "ans2 = (inv(k2)*math.log(r3/r2));\n", + "\n", + "Q = (2*math.pi*L*deltaT)/(ans1+ans2); \t\t\t#The heat loss from the pipe \t\t\t#unit:Btu/hr\n", + "\n", + "# Results\n", + "print \"The heat loss from the pipe is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss from the pipe is 280.02 Btu/hr\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12 Page No : 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy.linalg import inv\n", + "\n", + "#From problem 11.9,\n", + "#The bare pipe\n", + "r2 = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n", + "r1 = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n", + "Ti = 240.; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "L = 5.; \t\t\t#Length \t\t\t#Unit:ft\n", + "k = 26.; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "Rpipe = math.log(r2/r1)/(2*math.pi*k*L); \t\t\t#the resistance of pipe \t\t\t#Unit:(hr*F)/Btu\n", + "print \"The resistance of pipe is %.5f hr*F)/Btu\"%(Rpipe);\n", + "\n", + "#Now,in problem 11.12,\n", + "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n", + "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "A = (math.pi*r2)/12*L; \t\t\t#Area \t\t\t#Unit:ft**2 \t\t\t#1 inch = 1/12 feet \t\t\t#unit:ft**2\n", + "Rconvection = inv([[h*A]]); \t\t\t#The resistance due to natural convection to the surrounding air \t\t\t#Unit:(hr*F)/Btu\n", + "print \"The resistance due to natural convection to the surrounding air is %.2f hr*F)/Btu\"%(Rconvection);\n", + "\n", + "Rtotal = Rpipe+Rconvection; \t\t\t#The total resistance \t\t\t#unit:(hr*F)/Btu\n", + "print \"The total resistance is %.2f hr*F)/Btu\"%(Rtotal);\n", + "Q = deltaT/Rtotal; \t\t\t#ohm's law (fourier's equation) \t\t\t#The heat transfer from the pipe to the surrounding air \t\t\t#unit:Btu/hr\n", + "print \"The heat transfer from the pipe to the surrounding air is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance of pipe is 0.00019 hr*F)/Btu\n", + "The resistance due to natural convection to the surrounding air is 0.24 hr*F)/Btu\n", + "The total resistance is 0.24 hr*F)/Btu\n", + "The heat transfer from the pipe to the surrounding air is 700.42 Btu/hr\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.15 Page No : 574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n", + "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n", + "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n", + "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n", + "Q = h*A*deltaT; \t\t\t#The heat loss due to convection \t\t\t#Unit:Btu/hr \t\t\t#Newton's law of cooling\n", + "\n", + "# Results\n", + "print \"The heat loss due to convection is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss due to convection is 206.17 Btu/hr\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.16 Page No : 575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "#This problem can not be solved directly,because the individual film resistances aree functions of unknown temperature differences.Therefore,\n", + "#From the first approximation,\n", + "h = 1./2; \t\t\t#Coefficient of heat transfer \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "#For area 1 ft**2,\n", + "R = (3./12)/0.07; \t\t\t#The wall resistance is deltax/(k*A) \t\t\t#k = 0.07 \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "Roverall = inv([[1./2]])+inv([[1./2]])+R; \t\t\t#the overall series resistance \t\t\t#Unit:Btu/(hr*ft*F)\n", + "print \"For h = 0.5, the overall series resistance is %.2f Btu/hr*ft*F)\"%(Roverall);\n", + "#Using the value of Roverall,we can now obtain Q and individual temperature differences,\n", + "Ti = 80.; \t\t\t#warm air temperature \t\t\t#unit:fahrenheit\n", + "To = 50; \t\t\t#cold air temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n", + "Q = deltaT/Roverall; \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#heat transfer \t\t\t#ohm's law (fourier's equation)\n", + "print \"For h = 0.5, heat transfer is %.2f Btu/hr*ft**2)\"%(Q);\n", + "print \"For h = 0.5\"\n", + "#deltaT through the hot air film is Q/(1/2)\n", + "print \"Temperaure difference through the hot air film is %.2f F\"%(Q/1./2);\n", + "#Throught the wall deltaT is R*Q\n", + "print \"Temperaure difference through the wall is %.2f F\"%(Q*R);\n", + "#deltaT through the cold air film is Q/(1/2)\n", + "print \"Temperaure difference through the cold air film is %.2f F\"%(Q/1./2);\n", + "\n", + "#With these temperature differences,we can now enter figures 11.12 and 11.14 to verify our approximation.From figure 11.14,we find h = 0.42 Btu/(hr*ft*2*F)\n", + "#Using h = 0.42,we have for the overall resistance (1/0.42)+(1/0.42)+R\n", + "h = [[0.42]]; \t\t\t#Coefficient of heat transfer \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "Roverall = inv(h)+inv(h)+R; \t\t\t#the overall series resistance \t\t\t#Unit:Btu/(hr*ft*F)\n", + "print \"For h = 0.42, the overall series resistance is %.2f Btu/hr*ft*F)\"%(Roverall);\n", + "Q = deltaT/Roverall; \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#heat transfer \t\t\t#ohm's law (fourier's equation)\n", + "print \"For h = 0.42, heat transfer is %.2f Btu/hr*ft**2)\"%(Q);\n", + "print \"For h = 0.42\"\n", + "# deltat through both air films is Q/h\n", + "print \"Temperaure difference through the hot and cold air film is %.2f F\"%(Q/h);\n", + "#and through the wall,deltat is Q*R\n", + "print \"Temperaure difference through the wall is %.2f F\"%(Q*R);\n", + "\n", + "#Entering figure 11.14,we find that h stays essentially 0.42,and our solution is that the heat flow is Q,the \"hot\" side of the wall is at Ti-(Q/h),the \"cold\" side is at To+(Q/h) ,and temperature drop in the wall is Ti-(Q/h)-(To+(Q/h)).\n", + "print \"The temperature drop on the hot side of the wall is %.2f F\"%(Ti-Q/h)\n", + "print \"The temperature drop on the cold side of the wall is %.2f F\"%(To+Q/h)\n", + "print \"The temperature drop in the wall is %.2f F\"%(((Ti-Q/h)-To+Q/h));\n", + "#Which checks our wall deltat calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For h = 0.5, the overall series resistance is 7.57 Btu/hr*ft*F)\n", + "For h = 0.5, heat transfer is 3.96 Btu/hr*ft**2)\n", + "For h = 0.5\n", + "Temperaure difference through the hot air film is 1.98 F\n", + "Temperaure difference through the wall is 14.15 F\n", + "Temperaure difference through the cold air film is 1.98 F\n", + "For h = 0.42, the overall series resistance is 8.33 Btu/hr*ft*F)\n", + "For h = 0.42, heat transfer is 3.60 Btu/hr*ft**2)\n", + "For h = 0.42\n", + "Temperaure difference through the hot and cold air film is 8.57 F\n", + "Temperaure difference through the wall is 12.86 F\n", + "The temperature drop on the hot side of the wall is 71.43 F\n", + "The temperature drop on the cold side of the wall is 58.57 F\n", + "The temperature drop in the wall is 30.00 F\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.17 Page No : 578" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The first step is to check Reynolds number.It will be recalled that the Reynolds number is given by (D*V*rho)/mu and is dimensionless.Therefore,we can use D, diameter in feet;V velocity in ft/hr;rho density in lbm/ft**3 and mu vismath.cosity in lbm/(ft*hr).\n", + "#Alternatively,the Reynolds number is given by (D*G)/mu,where G is the mass flow rate per unit area (lbm/(hr*ft**2)).\n", + "G = ((20*60)*(4*144)/(math.pi*0.87**2)); \t\t\t#Unit:lbm/(hr*ft**2) \t\t\t#Inside diameter = 0.87 inch \t\t\t#\t\t\t#1 in.**2 = 144 ft**2 \t\t\t#20 lbm/min of water(min converted to second)\n", + "#the vismath.cosity of air at these conditions is obtained from figure 11.17 as 0.062 lbm/(ft*hr).So,\n", + "mu = 0.33; \t\t\t#the vismath.cosity of air \t\t\t#unit:lbm/(ft*hr)\n", + "D = 0.87/12; \t\t\t#Inside diameter \t\t\t#1 in**2 = 144 ft**2\n", + "#Therefore Reynolds number is \n", + "Re = (D*G)/mu; \t\t\t#Reynolds number\n", + "#which is well into the turbulent flow regime.\n", + "print \"The Reynolds number is %.2f\"%(Re);\n", + "#The next step is to enter Figure 11.18 at W/1000 of 20*(60/1000) = 1.2 and 400F to obtain h1 = 630.\n", + "#From the figure 11.20,we obtain F = 1.25 for an inside diameter of 0.87 inch.So,\n", + "h1 = 630; \t\t\t#basic heat transfer coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "F = 1.25; \t\t\t#correction factor\n", + "h = h1*F; \t\t\t#heat transfer coefficient \t\t\t#the inside film coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "print \"The heat-transfer coefficient is %.2f Btu/hr*ft**2*F)\"%(h);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Reynolds number is 63861.54\n", + "The heat-transfer coefficient is 787.50 Btu/hr*ft**2*F)\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.18 Page No : 579" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We first check the Reynolds number and note that G is same as for problem 11.17.So,\n", + "#G is the mass flow rate per unit area (lbm/(hr*ft**2)).\n", + "G = ((20*60)*(4*144))/(math.pi*(0.87**2)); \t\t\t#Unit:lbm/(hr*ft**2) \t\t\t#Inside diameter = 0.87 inch \t\t\t#\t\t\t#1 in.**2 = 144 ft**2 \t\t\t#20 lbm/min of water(min converted to second)\n", + "#the vismath.cosity of air at these conditions is obtained from figure 11.17 as 0.062 lbm/(ft*hr).So,\n", + "mu = 0.062; \t\t\t#the vismath.cosity of air \t\t\t#unit:lbm/(ft*hr)\n", + "D = 0.87/12; \t\t\t#Inside diameter \t\t\t#1 in**2 = 144 ft**2\n", + "#Reynolds number is DG/mu,therefore \n", + "Re = (D*G)/mu; \t\t\t#Reynolds number\n", + "print \"The Reynolds number is %.2f\"%(Re);\n", + "#which places the flow in the turbulent regime.Because W/1000(W = weight flow) is same as for problem 11.17 and equals 1.2,we now enter figure 11.19 at 1.2 and 400F to obtain h1 = 135.Because the inside tube diameter is same as before,F = 1.25.Therefore,\n", + "h1 = 135; \t\t\t#basic heat transfer coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "F = 1.25; \t\t\t#correction factor\n", + "h = h1*F; \t\t\t#heat transfer coefficient \t\t\t#the inside film coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "print \"The inside film coefficient is %.2f Btu/hr*ft**2*F)\"%(h);\n", + "#It is interesting that for equal mass flow rates,water yields a heat-transfer coefficient almost five times greater than air\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Reynolds number is 339908.22\n", + "The inside film coefficient is 168.75 Btu/hr*ft**2*F)\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.19 Page No : 586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#A bare steel pipe\n", + "#From the Table 11.5,case 2,\n", + "Fe = 0.79; \t\t\t#Emissivity factor to allow for the departure of the surfaces interchanging heat from complete blackness;Fe is a function of the surface emissivities and configurations\n", + "FA = 1; \t\t\t#geometric factor to allow for the average solid angle through which one surface \"sees\" the other\n", + "sigma = 0.173*10**-8; \t\t\t#Stefan-Boltzmann constant \t\t\t#Unit:Btu/(hr*ft**2*R**4)\n", + "T1 = 120+460; \t\t\t#outside temperature \t\t\t#Unit:R \t\t\t#fahrenheit converted to absolute temperature\n", + "T2 = 70+460; \t\t\t#inside temperature \t\t\t#Unit:R \t\t\t#fahrenheit converted to absolute temperature\n", + "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n", + "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n", + "Q = sigma*Fe*FA*A*(T1**4-T2**4); \t\t\t#The net interchange of heat by radiation between two bodies at different temperatures \t\t\t#Unit:Btu/hr \t\t\t#\t\t\t#Stefan-Boltzmann law\n", + "\n", + "# Results\n", + "print \"The heat loss by radiation is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss by radiation is 214.52 Btu/hr\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.20 Page No : 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The upper temperature is given as 120 F and the temperature difference is \n", + "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = 120-70; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n", + "#Using figure 11.28, \n", + "hrdash = 1.18; \t\t\t#factor for radiation coefficient \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "Fe = 1; \t\t\t#Emissivity factor to allow for the departure of the surfaces interchanging heat from complete blackness;Fe is a function of the surface emissivities and configurations\n", + "FA = 0.79; \t\t\t#geometric factor to allow for the average solid angle through which one surface \"sees\" the other\n", + "hr = Fe*FA*hrdash; \t\t\t#The radiation heat-transfer coefficient for the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "print \"The radiation heat-transfer coefficient for the pipe is %.2f Btu/hr*ft**2*F)\"%(hr);\n", + "\n", + "#As a check,Using the results of problem 11.17,\n", + "print \"As a check, Using the results of problem 11.17\"\n", + "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n", + "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n", + "Q = 214.5; \t\t\t#heat loss \t\t\t#Unit:Btu/hr\n", + "hr = Q/(A*deltaT); \t\t\t#The radiation heat-transfer coefficient for the pipe \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#Newton's law of cooling\n", + "print \"The radiation heat-transfer coefficient for the pipe is %.2f Btu/hr*ft**2*F)\"%(hr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radiation heat-transfer coefficient for the pipe is 0.93 Btu/hr*ft**2*F)\n", + "As a check, Using the results of problem 11.17\n", + "The radiation heat-transfer coefficient for the pipe is 0.94 Btu/hr*ft**2*F)\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.21 Page No : 589" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Because the conditions of illustrative problem 11.15 are the same as for problem 11.19 and 11.20,we can solve this problem in two ways to obtain a check.\n", + "#Thus,adding the results of these problems yields,\n", + "print \"Adding the results of the problems yields\"\n", + "Qtotal = 206.2+214.5; \t\t\t#Unit:Btu/hr \t\t\t#total heat loss\n", + "print \"The heat loss due to convection is %.2f Btu/hr\"%(Qtotal);\n", + "\n", + "#We can also approach this solution by obtaining radiation and convection heat-transfer co-efficcient.Thus,\n", + "hcombined = 0.9+0.94; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet \t\t\t#Unit:ft \t\t\t#Outside diameter\n", + "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n", + "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n", + "Qtotal = hcombined*A*deltaT; \t\t\t#Unit:Btu/hr \t\t\t#total heat loss due to convection \t\t\t#Newton's law of cooling\n", + "print \"By obtaining radiation and convection heat-transfer co-efficcient\"\n", + "print \"The heat loss due to convection is %.2f Btu/hr\"%(Qtotal);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Adding the results of the problems yields\n", + "The heat loss due to convection is 420.70 Btu/hr\n", + "By obtaining radiation and convection heat-transfer co-efficcient\n", + "The heat loss due to convection is 421.50 Btu/hr\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.22 Page No : 595" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "#For brick,concrete,plaster,hot film and cold film,\n", + "A = 1.; \t\t\t#area \t\t\t#Unit:ft**2\n", + "#For a plane wall,the areas are all the same,and if we use 1 ft**2 of wall surface as the reference area,\n", + "#For Brick,\n", + "deltax = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "brickResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For brick\";\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(brickResistance);\n", + "\n", + "#For Concrete,\n", + "deltax = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n", + "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "concreteResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(concreteResistance);\n", + "\n", + "#For plaster,\n", + "deltax = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n", + "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "plasterResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For plaster\";\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(plasterResistance);\n", + "\n", + "#For \"hot film\",\n", + "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "hotfilmResistance = inv([[h*A]]); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For hot film\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(hotfilmResistance);\n", + "\n", + "#For \"cold film\",\n", + "h = 1.5; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "coldfilmResistance = inv([[h*A]]); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For cold film\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(coldfilmResistance);\n", + "\n", + "totalResistance = brickResistance+concreteResistance+plasterResistance+hotfilmResistance+coldfilmResistance; \t\t\t#the overall resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"The overall resistance is %.2f hr*F)/Btu\"%(totalResistance);\n", + "\n", + "U = inv([[totalResistance]]); \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#The overall conducmath.tance(or overall heat-transfer coefficient)\n", + "print \"The overall conductanceor overall heat-transfer coefficient) is %.2f Btu/hr/ft**2)\"%(U);\n", + "#In problem 11.21,the solution is straightforward,because the heat-transfer area is constant for all series resistances.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For brick\n", + "The resistance is 1.25 hr*F)/Btu\n", + "For Concrete\n", + "The resistance is 0.05 hr*F)/Btu\n", + "For plaster\n", + "The resistance is 0.14 hr*F)/Btu\n", + "For hot film\n", + "The resistance is 1.11 hr*F)/Btu\n", + "For cold film\n", + "The resistance is 0.67 hr*F)/Btu\n", + "The overall resistance is 3.22 hr*F)/Btu\n", + "The overall conductanceor overall heat-transfer coefficient) is 0.31 Btu/hr/ft**2)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.23 Page No : 596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "hi = 45; \t\t\t#Film coefficient on the inside of the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "r1 = 3.0/2; \t\t\t#Inside radius \t\t\t#Unit:inch\n", + "k1 = 26; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#k = proportionality constant for steel pipe \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n", + "r2 = 3.5/2; \t\t\t#outide radius \t\t\t#Unit:inch\n", + "k2 = 0.026; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#k = proportionality constant for mineral wool \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n", + "r3 = 5.50/2; \t\t\t#radius \t\t\t#Unit:inch\n", + "ho = 0.9; \t\t\t#Film coefficient on the outside of the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "#Results of problem 11.23,\n", + "Ui = 1/((1/hi)+((r1/(k1*12))*math.log(r2/r1))+((r1/(k2*12))*math.log(r3/r2))+(1/(ho*(r3/r1)))); \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#1 in. = 12 ft \t\t\t#Heat transfer coefficient based on inside surface \n", + "print \"Heat transfer coefficient based on inside surface is %.2f Btu/hr*ft**2*F)\"%(Ui); \n", + "#Because Uo*Ao = Ui*Ai\n", + "Uo = Ui*(r1/r3); \t\t\t#Heat transfer coefficient based on outside surface \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "print \"Heat transfer coefficient based on outside surface is %.2f Btu/hr*ft**2*F)\"%(Uo);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer coefficient based on inside surface is 0.36 Btu/hr*ft**2*F)\n", + "Heat transfer coefficient based on outside surface is 0.20 Btu/hr*ft**2*F)\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.24 Page No : 601" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#A COUNTERFLOW HEAT EXCHANGER\n", + "#Hot oil enters at 215 F and leaves at 125 F\n", + "#Water enters the unit at 60 F and leaves at 90 F\n", + "#Therefore,From figure 11.34, \n", + "thetaA = 215.-90; \t\t\t#the greatest temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n", + "thetaB = 125.-60; \t\t\t#the least temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n", + "deltaTm = (thetaA-thetaB)/math.log(thetaA/thetaB); \t\t\t#math.logarithmic mean temperature difference \t\t\t#Unit:fahrenheit \n", + "#From the oil data,\n", + "m = 400*60; \t\t\t#mass \t\t\t#Unit:lb/sec \t\t\t#1 min = 60 sec\n", + "Cp = 0.85; \t\t\t#Specific heat of the oil \t\t\t#Unit:Btu/(lb*F)\n", + "deltaT = 215.-125; \t\t\t#Change in temperature \t\t\t#Unit:fahrenheit\n", + "Q = m*Cp*deltaT \t\t\t#The heat transfer \t\t\t#Unit:Btu/hr\n", + "#Q = U*A*deltaTm\n", + "U = 40.;\t\t\t#The overall coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "A = Q/(U*deltaTm); \t\t\t#Umit:ft**2 \t\t\t#The outside surface area\n", + "print \"The outside surface area required is %.2f ft**2\"%(A);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outside surface area required is 500.25 ft**2\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.25 Page No : 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "#In problem 11.24, A COUNTERFLOW HEAT EXCHANGER is operated in the parallel flow\n", + "#Hot oil enters at 215 F and leaves at 125 F\n", + "#Water enters the unit at 60 F and leaves at 90 F\n", + "#Therefore,From figure 11.35, \n", + "thetaA = 215.-60; \t\t\t#the greatest temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n", + "thetaB = 125.-90; \t\t\t#the least temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n", + "deltaTm = (thetaA-thetaB)/math.log(thetaA/thetaB); \t\t\t#math.logarithmic mean temperature difference \t\t\t#Unit:fahrenheit \n", + "#From the oil data,\n", + "m = 400*60.; \t\t\t#mass \t\t\t#Unit:lb/sec \t\t\t#1 min = 60 sec\n", + "Cp = 0.85; \t\t\t#Specific heat of the oil \t\t\t#Unit:Btu/(lb*F)\n", + "deltaT = 215.-125; \t\t\t#Change in temperature \t\t\t#Unit:fahrenheit\n", + "Q = m*Cp*deltaT \t\t\t#The heat transfer \t\t\t#Unit:Btu/hr\n", + "#Q = U*A*deltaTm\n", + "U = 40.;\t\t\t#The overall coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "A = Q/(U*deltaTm); \t\t\t#Umit:ft**2 \t\t\t#The outside surface area\n", + "print \"The outside surface area required is %.2f ft**2\"%(A);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outside surface area required is 569.19 ft**2\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.26 Page No : 603" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the table 11.7,\n", + "#For the oil side,a resistance(fouling factor) of 0.005 (hr*F*ft**2)/Btu can be used\n", + "#and for the water side,a fouling factor of 0.001 (hr*F*ft**2)/Btu can be used\n", + "#From problem 11.25,\n", + "U = 40;\t\t\t#The coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "#therefore,\n", + "Roil = 0.005; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance at oil side\n", + "Rwater = 0.001; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance for water side\n", + "invU = 0.025 # Inv of U\n", + "Rcleanunit = invU; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance at clean unit\n", + "Roverall = Roil+Rwater+Rcleanunit; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#overall resistance\n", + "invRoverall = 32.258065;\n", + "Uoverall = invRoverall; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#The overall coefficient of heat transfer of the unit\n", + "#Because all the parameters are the same,the surface area required will vary inversely as U\n", + "A = 569*(U/Uoverall); \t\t\t#A = 569 ft**2 in the problem 11.25 \t\t\t#unit:ft**2 \t\t\t#The outside surface area\n", + "print \"The outside surface area required is %.2f ft**2\"%(A);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outside surface area required is 705.56 ft**2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.27 Page No : 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#HEAT EXCHANGER\n", + "#Oil flows in the tube side and is cooled from 280 F to 140 F\n", + "#Therefore,\n", + "t2 = 140.; \t\t\t#Unit:fahrenheit\n", + "t1 = 280.; \t\t\t#Unit:fahrenheit\n", + "#On the shell side,water is heated from 85 F to 115 F\n", + "T1 = 85.; \t\t\t#Unit:fahrenheit\n", + "T2 = 115.; \t\t\t#Unit:fahrenheit\n", + "P = (t2-t1)/(T1-t1); \n", + "R = (T1-T2)/(t2-t1);\n", + "#From the figure,\n", + "F = 0.91;\t\t\t#Correction factor\n", + "LMTD = ((t1-T2)-(t2-T1))/math.log((t1-T2)/(t2-T1)); \t\t\t#LMTD = Log mean temperature difference \t\t\t#Unit:fahrenheit\n", + "TMTD = F*LMTD; \t\t\t#TMTD = True mean temperature difference \t\t\t#Unit:fahrenheit\n", + "\n", + "# Results\n", + "print \"The true mean temperature is %.2f fahrenheit\"%(TMTD);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The true mean temperature is 91.11 fahrenheit\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb index ce79dd48..ce79dd48 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_2.ipynb new file mode 100755 index 00000000..ce79dd48 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_2.ipynb @@ -0,0 +1,394 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cda743da280474e0339734ce945527afbcb8983c5386e8ae01ef3be6064b84d0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Fundamental Concepts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#C = (5/9)*(F-32);\n", + "#F = 32+(9*C/5);\n", + "#Letting C = F in equation;\n", + "#F = (5/9)*(F-32);\n", + "#Therefore\n", + "F = -160/4; \t\t\t#fahrenheit\n", + "\n", + "# Results\n", + "print \"Both fahrenheit and celsius temperature scales indicate same temperature at %.2f\"%(F);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both fahrenheit and celsius temperature scales indicate same temperature at -40.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Mm = 0.0123\t\t\t#Unit:lb \t\t\t#Mass of the moon;\n", + "Me = 1 \t \t\t#Unit:lb \t\t\t#Mass of the earth;\n", + "Dm = 0.273 \t\t\t#Unit:feet \t\t\t#Diameter of the moon;\n", + "De = 1. \t \t\t#Unit:feet \t\t\t#Diameter of the earth;\n", + "Rm = Dm/2; \t\t\t#Radius of the moon; \t\t\t#Unit:feet\n", + "Re = De/2; \t\t\t#Radius of the earth; \t\t\t#Unit:feet\n", + "\n", + "#F = (K*M1*M2)/d**2 \t\t\t#Law of universal gravitation;\n", + "#Fe = (K*Me*m)/Re**2; \t\t\t#Fe = Force exerted on the mass;\n", + "#Fm = (K*Mm*m)/Rm**2; \t\t\t#Fm = Force exerted on the moon;\n", + "F = (Me/Mm)*(Rm/Re)**2; \t\t\t#F = Fe/Fm;\n", + "print \"Relation of force exerted on earth to mass is\"\n", + "print \"Fe/Fm = %.2f\"%F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relation of force exerted on earth to mass is\n", + "Fe/Fm = 6.06\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M = 5; \t\t\t#Unit:kg \t\t\t#mass of body;\n", + "g = 9.81; \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n", + "\n", + "# Calculations\n", + "W = M*g; \t\t\t#W = the weight of the body \t\t\t#Unit:Newton \t\t\t# 1 N = 1 kg*m/s**2\n", + "\n", + "# Results\n", + "print \"The weight of the body is %.2f N\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The weight of the body is 49.05 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Solution for a\";\n", + "#given\n", + "M = 10. \t\t\t#Unit:kg \t\t\t#mass of body;\n", + "g = 9.5 \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n", + "W = M*g; \t\t\t#W = the weight of the body; \t\t\t#Unit:Newton \t\t\t# 1 N = 1 kg*m/s**2\n", + "print \"The weight of the body is %.2f N\"%(W);\n", + "\n", + "print \"Solution for b\";\n", + "#Given\n", + "F = 10; \t\t\t#Unit:Newton \t\t\t#Horizontal Force\n", + "a = F/M; \t\t\t\t\t\t#\t\t\t#newton's second law of motion\n", + "print \"The horizontal acceleration of the body is %.2f m/s**2\"%(a);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The weight of the body is 95.00 N\n", + "Solution for b\n", + "The horizontal acceleration of the body is 1.00 m/s**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Conversion Problem\n", + "# 1 inch = 0.0254 meter so, 1 = 0.0254 meter/inch \t\t\t#Eq.1\n", + "# 1 ft = 12 inch so, 1 = 12 inch/ft.........\t\t\t#Eq.2\n", + "#Multiplying Eq.1 & Eq.2 \t\t\t# We get 1 = 0.0254*12 meter/ft\n", + "#Taking Square both side\n", + "#1**2 = (0.0254*12)**2 meter**2/ft**2\n", + "print \"1 ft**2 = %.2f meter**2\"%((0.0254*12)**2); " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 ft**2 = 0.09 meter**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The Specific gravity of mercury is 13.6 \t\t\t#Given\n", + "#Converting the unit of weight of grams per cubic centimeter to pounds per cubic foot\n", + "# 1 lbf = 454 gram \t\t\t#1 inch = 2.54 cm\n", + "#So 1 gram = 1/454 lbf and 1 ft = 12*2.54 cm\n", + "#Gamma = (gram/cm**3)*(lb/gram)*(cm**3/ft**3) = lb/ft**3\n", + "#Gamma = (1 gram/cm**3)*(1 lbf/454 gram)*(2.54*12)**3 *cm**3/ft**3\n", + "Gamma = (1./454)*(2.54*12)**3; \t\t\t#lbf/ft**3 \t\t\t#conversion factor\n", + "print \"Conversion Factor = %.2f\"%Gamma\n", + "p = (1./12)*(Gamma*13.6); \t\t\t#lbf/ft**2 \t\t\t#gage pressure\n", + "p = (1./12)*Gamma*13.6*(1./144) \t\t\t#ft**2/inch**2 \t\t\t#gage pressure\n", + "print \"Guage Pressure is %.2f psi\"%(p);\n", + "print \"Local atmospheric pressure is 14.7 psia\";\n", + "P = p+14.7; \t\t\t#Pressure on the base of the column \t\t\t#Unit:psia\n", + "print \" So Pressure on the base of the column is %.2f psia\"%(P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conversion Factor = 62.37\n", + "Guage Pressure is 0.49 psi\n", + "Local atmospheric pressure is 14.7 psia\n", + " So Pressure on the base of the column is 15.19 psia\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rho = 13.595; \t\t\t#Unit: kg/m**3 \t\t\t#The density of mercury\n", + "h = 25.4; \t\t\t#Unit: mm \t\t\t#Height of column of mercury\n", + "g = 9.806; \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n", + "\n", + "#Solution\n", + "p = Rho*g*h; \t\t\t#P = Pressure at the base of a column of mercury \t\t\t#Unit:Pa\n", + "\n", + "# Results\n", + "print \"Pressure at the base of a column of mercury is %.2f Pa\"%(p);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the base of a column of mercury is 3386.14 Pa\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Patm = 30.0; \t\t\t#in. \t\t\t#pressure of mercury at smath.radians(numpy.arcmath.tan(ard temperature\n", + "Vacuum = 26.5; \t\t\t#in. \t\t\t#vaccum pressure\n", + "Pabs = Patm-Vacuum; \t\t\t#Absolute pressure of mercury \t\t\t#in.\n", + "# 1 inch mercury exerts a pressure of 0.491 psi\n", + "p = Pabs*0.491; \t\t\t#Absolute pressure in psia\n", + "\n", + "# Results\n", + "print \"Absolute pressure of mercury in is %.2f psia\"%(p);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute pressure of mercury in is 1.72 psia\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rho = 2000; \t\t\t#Unit: kg/m**3 \t\t\t#The density of fluid\n", + "h = -10; \t\t\t#Unit: mm \t\t\t#Height of column of fluid \t\t\t#the height is negative because it is measured up from the base\n", + "g = 9.6 \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n", + "\n", + "#Solution\n", + "p = -Rho*g*h; \t\t\t#P = Pressure at the base of a column of fluid \t\t\t#Unit:Pa\n", + "\n", + "# Results\n", + "print \"Pressure at the base of a column of fluid is %.2f Pa\"%(p);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the base of a column of fluid is 192000.00 Pa\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Patm = 30.0 \t\t\t#in. \t\t\t#pressure of mercury at smath.radians(numpy.arcmath.tan(ard temperature\n", + "Vacuum = 26.5 \t\t\t#in. \t\t\t#vaccum pressure\n", + "Pabs = Patm-Vacuum; \t\t\t#Absolute pressure of mercury \t\t\t#in.\n", + "\n", + "# (3.5 inch* (ft/12 inch) * (13.6*62.4)LBf/ft**3 * kg/2.2 LBf * 9.806 N/kg)/((12 inch**2/ft**2) * (0.0254 m/inch)**2)\n", + "p = (3.5*(1./12)*13.6*62.4*(1/2.2)*9.806)/(12**2*0.0254**2*1000); \t\t\t#kPa \t\t\t#Absolute pressure in psia\n", + "\n", + "# Results\n", + "print \"Absolute pressure of mercury is %.2f kPa\"%(p)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute pressure of mercury is 11.88 kPa\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb index c4ad19b7..c4ad19b7 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_2.ipynb new file mode 100755 index 00000000..c4ad19b7 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_2.ipynb @@ -0,0 +1,562 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:086f4825fb4b8e83d4ca795bc6e4859da294b353e111bb33a89148489ab4ef6c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Work, Energy and Heat" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "k = 100; \t\t\t# Unit:lbf/in. \t\t\t#k = spring constant\n", + "l = 2; \t\t\t#Unit:inch \t\t\t#l = length of compression of string\n", + "\n", + "# Calculations\n", + "work = (1./2)*k*l**2; \t\t\t#force-print lacement relation \t\t\t#Unit:in*lbf\n", + "\n", + "# Results\n", + "print \"Workdone is %.2f inch*lbf\"%(work);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Workdone is 200.00 inch*lbf\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "k = 20*1000; \t\t\t# Unit:N/m \t\t\t#k = 20kN \t\t\t#k = spring constant\n", + "l = 0.075; \t\t\t#Unit:meter \t\t\t#l = 75 mm \t\t\t#l = length of compression of string\n", + "\n", + "# Calculations\n", + "work = (1./2)*k*l**2; \t\t\t#force-print lacement relation \t\t\t#Unit:N*m\n", + "\n", + "# Results\n", + "print \"Workdone is %.2f Jule\"%(work);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Workdone is 56.25 Jule\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z = 600; \t\t\t#Unit:ft \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n", + "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n", + "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n", + "m = 1.; \t\t\t#Unit:lbm \t\t\t#m = mass\n", + "\n", + "# Calculations\n", + "PE = (m*g*Z)/gc; \t\t\t#potential energy \t\t\t#Unit:ft*lbf\n", + "\n", + "# Results\n", + "print \"%.2f ft*lbf work is done lifting the water to elevation \"%(PE)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "600.00 ft*lbf work is done lifting the water to elevation \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "m = 1; \t\t\t#Unit:kg \t\t\t#m = mass\n", + "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n", + "Z = 50 \t\t\t#Unit:m \t\t\t#\t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied \t\t\t#In this case Z = delivered water from well to pump\n", + "\n", + "# Calculations\n", + "PE = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n", + "\n", + "# Results\n", + "print \"Change in potential energy per kg of water is %.2f J \"%(PE); \t\t\t#J = Joule = N*m = kg*m**2/s**2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in potential energy per kg of water is 490.50 J \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "Rho = 62.4; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density of water\n", + "A = 10000; \t\t\t#Flow = 10000; gal/min\n", + "V = (231./1728); \t\t\t# 12 inch = 1 ft \t\t\t#So,1 ft**3 = 1728 in**3 \t\t\t# One Gallon is a volumetric measure equal to 231 in**3\n", + "#A*V \t\t\t#Unit:ft**3/min\n", + "\n", + "#In example, 2.4:\n", + "# From example 2.4\n", + "Z = 600; \t\t\t#Unit:ft \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n", + "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n", + "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n", + "m = 1; \t\t\t#Unit:lbm \t\t\t#m = mass\n", + "\n", + "# Calculations and Results\n", + "PE = (m*g*Z)/gc; \t\t\t#potential energy \t\t\t#Unit:ft*lbf\n", + "print \"%.2f ft*lbf work is done lifting the water to elevation \"%(PE);\n", + "\n", + "#So,\n", + "# In example 2.5\n", + "M = Rho*A*V; \t\t\t#M = the mass flow\n", + "Power = M*PE; \t\t\t#Unit:ft*lbf/lbm\n", + "print \"Generated Power is %.2f ft*lbf/lbm \"%(Power);\n", + "# 1 horsepower = 33,000 ft*lbf/min\n", + "print \"Power = %.2f hp\"%(Power/33000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "600.00 ft*lbf work is done lifting the water to elevation \n", + "Generated Power is 50050000.00 ft*lbf/lbm \n", + "Power = 1516.67 hp\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"In problem 2.5\";\n", + "m = 1; \t\t\t#Unit:kg \t\t\t#m = mass\n", + "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n", + "Z = 50 \t\t\t#Unit:m \t\t\t#\t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied \t\t\t#In this case Z = delivered water from well to pump\n", + "\n", + "# Calculations and Results\n", + "PE = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n", + "print \"Change in potential energy per kg of water is %.2f J \"%(PE); \t\t\t#J = Joule = N*m = kg*m**2/s**2\n", + "#Given data in problem 2.7 is\n", + "M = 1000; \t\t\t#Unit;kg/min\t\t\t#M = Water density \n", + "Power = PE*M*(1./60); \t\t\t#1 min = 60 seconds \t\t\t#power \t\t\t#unit:Joule/s = W\n", + "print \"Power is %.2f Watt\"%(Power); \t\t\t#Watt = N*m/s = Joule/s = Watt\n", + "#1 Hp = 746 Watt\n", + "print \"Power is %.2f Horsepower\"%(Power/745);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 2.5\n", + "Change in potential energy per kg of water is 490.50 J \n", + "Power is 8175.00 Watt\n", + "Power is 10.97 Horsepower\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "m = 10.; \t\t\t#Unit:lb \t\t\t#m = Mass\n", + "V1 = 88.; \t\t\t#Unit:\t\t\t#ft/s V1 = Velocity before it is slowed down\n", + "V2 = 10.; \t\t\t#Unit;ft/s \t\t\t#V2 = Velocity after it is slowed down\n", + "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n", + "\n", + "# Calculations and Results\n", + "KE1 = m*V1**2/(2*gc); \t\t\t#The kinetic energy of the body before it is slowed down \t\t\t#Unit:ft*lbf\n", + "print \"The kinetic energy of the body before it is slowed down is %.2f ft*lbf\"%(KE1);\n", + "\n", + "KE2 = m*V2**2/(2*gc); \t\t\t#The kinetic energy of the body before it is slowed down \t\t\t#Unit:ft*lbf\n", + "print \"The kinetic energy of the body before it is slowed down is %.2f ft*lbf\"%(KE2);\n", + "\n", + "KE = KE1-KE2; \t\t\t#KE = Change in kinetic energy \t\t\t#Unit:ft*lbf\n", + "print \"Change in kinetic energy is %.2f ft*lbf\"%(KE);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of the body before it is slowed down is 1203.46 ft*lbf\n", + "The kinetic energy of the body before it is slowed down is 15.54 ft*lbf\n", + "Change in kinetic energy is 1187.92 ft*lbf\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "m = 1500.; \t\t\t#Unit:kg \t\t\t#m = mass\n", + "V1 = 50.; \t\t\t#Km/hour V1 = Velocity before it is slowed down\n", + "#V1 = (50*1000 m/hour)**2/(3600 s/hour)**2 \n", + "\n", + "# Calculations\n", + "KE1 = (m*(V1*1000)**2/3600**2)/2; \t\t\t#KE1 = Initial kinetic energy \t\t\t#Unit:Joule\n", + "\n", + "#After slowing down\n", + "V2 = 30; \t\t\t#Unit:KM/hour \t\t\t#V2 = Velocity after it is slowed down\n", + "#V2 = (30*1000 m/hour)**2/(3600 s/hour)**2 \n", + "KE2 = (m*(V2*1000)**2/3600**2)/2; \t\t\t#KE2 = After slowing down, the kinetic energy \t\t\t#Unit:Joule\n", + "\n", + "KE = KE1-KE2; \t\t\t#KE = Change in kinetic energy \t\t\t#Unit:Joule\n", + "\n", + "# Results\n", + "print \"Change in kinetic energy is %.2f kJ\"%(KE/1000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in kinetic energy is 92.59 kJ\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "m = 10 \t\t\t#Unit:kg \t\t\t#m = mass\n", + "Z = 10 \t\t\t#Unit:m \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n", + "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n", + "#There are no losses in the system\n", + "#So,initial potential energy plus initial kinetic energy equal to sum of final potential energy plus final kinetic energy\n", + "#So, PE1+KE1 = PE2+KE2\n", + "#From the figure,KE1 = 0; PE2 = 0;\n", + "#So,PE1 = KE2;\n", + "\n", + "# Calculations and Results\n", + "PE1 = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n", + "#KE2 = (m*v**2)/2\n", + "v = (PE1*2)/m; \n", + "V = math.sqrt(v); \t\t\t#Unit:m/s \t\t\t#velocity \n", + "print \"Velocity = %.2f m/s\"%(V);\n", + "KE2 = PE1; \t\t\t#kinetic energy \t\t\t#Unit:Joule\n", + "print \"Kinetic energy is %.2f N*m\"%(PE1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 14.01 m/s\n", + "Kinetic energy is 981.00 N*m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page No : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "p1 = 100.; \t\t\t#pressure at the enmath.tance \t\t\t#Unit:psia,lbf/in**2\n", + "Rho1 = 62.4; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density\n", + "v1 = 144.*(1/Rho1) \t\t\t#Specific Volume at entrance or reciprocal of fluid density \t\t\t# 144 in**2 = 1 ft**2\n", + "#1 Btu = 778 ft*lbf \n", + "J = 778.; \t\t\t#Unit:ft*lbf/Btu \t\t\t#conversion factor\n", + "\n", + "# Calculations and Results\n", + "FW1 = (p1*v1)/J; \t\t\t#Flow work \t\t\t#Btu/lbm\n", + "print \"Flow work = %.2f Btu/lbm\"%(FW1);\n", + "\n", + "print \"At the exit of device\"\n", + "p2 = 50.; \t\t\t#pressure at the exit \t\t\t#Unit:psia,lbf/in**2\n", + "Rho2 = 30.; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density\n", + "v2 = 144.*(1./Rho2) \t\t\t#Specific Volume at exit or reciprocal of fluid density \t\t\t# 144 in**2 = 1 ft**2\n", + "#1 Btu = 778 ft*lbf \n", + "J = 778.; \t\t\t#Unit:ft*lbf/Btu \t\t\t#conversion factor\n", + "FW2 = (p2*v2)/J; \t\t\t#Flow work \t\t\t#Btu/lbm\n", + "print \"Flow work = %.2f Btu/lbm\"%(FW2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow work = 0.30 Btu/lbm\n", + "At the exit of device\n", + "Flow work = 0.31 Btu/lbm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"At the entrance of device\"\n", + "p1 = 200*1000; \t\t\t#200kPa*1000 Pa/kPa \t\t\t#pressure at the entrance \t\t\t#Unit:N/m**2\n", + "Rho1 = 1000; \t\t\t#kg/m**3 \t\t\t#Fluid density at entrance\n", + "v1 = 1./Rho1; \t\t\t#Specific Volume at entrance or reciprocal of fluid density\n", + "FW1 = p1*v1; \t\t\t#Flow work at entrance \t\t\t#Unit:N*m/kg\n", + "print \"Flow work = %.2fN*m/kg\"%(FW1);\n", + "\n", + "print \"At the exit of device\"\n", + "p2 = 100*1000; \t\t\t#200kPa*1000 Pa/kPa \t\t\t#pressure at the exit \t\t\t#Unit:N/m**2\n", + "Rho2 = 250; \t\t\t#kg/m**3 \t\t\t#Fluid density at exit\n", + "v2 = 1./Rho2; \t\t\t#Specific Volume at entrance or reciprocal of fluid density\n", + "FW2 = p2*v2; \t\t\t#Flow work at exit\t\t\t#Unit:N*m/kg\n", + "print \"Flow work = %.2f N*m/kg\"%(FW2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At the entrance of device\n", + "Flow work = 200.00N*m/kg\n", + "At the exit of device\n", + "Flow work = 400.00 N*m/kg\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page No : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#It is necessary that pressure be expressed as psfa when the volume is in cubic feet\n", + "#100 psia = 100*144 psfa\n", + "p1 = 100*144; \t\t\t#Unit:psfa \t\t\t#initial pressure\n", + "v1 = 2; \t\t\t#Unit:ft**3/lb \t\t\t#Initial Specific Volume\n", + "v2 = 1.; \t\t\t#Unit:ft**3/lb \t\t\t#Final Specific Volume\n", + "\n", + "# Calculations\n", + "w = p1*v1*math.log(v2/v1); \t\t\t#work done on fluid \t\t\t#Unit:ft*lbf/lbm\n", + "\n", + "# Results\n", + "print \"Work done on fluid = %.2f ft*lbf/lb\"%(w);\n", + "#1 Btu = 778 ft*lbf \n", + "print \"Work done on the fluid per pound of fluid is %.2f Btu/lbm\"%(w/778);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done on fluid = -19962.64 ft*lbf/lb\n", + "Work done on the fluid per pound of fluid is -25.66 Btu/lbm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Given value\n", + "#p1*v1 = p2*v2\n", + "p1 = 200.*1000; \t\t\t#p1 = Initial Pressure \t\t\t#Unit:Pa\n", + "p2 = 800*1000; \t\t\t#p2 = Final Pressure \t\t\t#Unit:Pa\n", + "v1 = 0.1; \t\t\t#v1 = Initial Special Volume \t\t\t#Unit:m**3/kg\n", + "\n", + "# Calculations\n", + "v2 = (p1/p2)*v1; \t\t\t#v1 = final Special Volume \t\t\t#Unit:m**3/kg\n", + "w = p1*v1*math.log(v2/v1); \t\t\t#workdone \t\t\t#Unit:kJ/kg\n", + "\n", + "# Results\n", + "print \"Work done per kilogram of gas is %.2f kJ/kg into the system)\"%(w/1000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done per kilogram of gas is -27.73 kJ/kg into the system)\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb index 1a72803f..1a72803f 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_2.ipynb new file mode 100755 index 00000000..1a72803f --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_2.ipynb @@ -0,0 +1,901 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d3fc279744b60850d5797d14855414b40de2e09f4541a34684deba85c06170cf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : The First Law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For a constant volume process, 10 Btu/lbm heat is added to the system\n", + "#We can consider thet a math.tank having a fixed volume has heat added to it\n", + "#Under these conditions,the mechanical work done on or by the system must be 0\n", + "#u2-u1 = q\n", + "print \"Heat has been converted to internal energy of the working fluid\";\n", + "#So,\n", + "print \" So,Change in internal energy u2-u1 = 10 Btu/Lbm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat has been converted to internal energy of the working fluid\n", + " So,Change in internal energy u2-u1 = 10 Btu/Lbm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Solution For a\";\n", + "m = 10; \t\t\t#Unit:lbm \t\t\t#mass of water\n", + "#delataU = U2-U1\n", + "Heat = 100.; \t\t\t#Unit:Btu \t\t\t#heat added\n", + "deltaU = Heat/m; \t\t\t#Change in internal energy \t\t\t#unit:Btu/lbm\n", + "print \"Change in internal energy per pound of water is %.2f Btu/lbm\"%(deltaU);\n", + "\n", + "print \"Solution For b\";\n", + "print \"In this process,energy crosses the boundary of the system by means of fractional work\"\n", + "print \"The contents of the math.tank will not distinguish between the energy if it is added as\\\n", + " heat or the energy added as fraction work\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution For a\n", + "Change in internal energy per pound of water is 10.00 Btu/lbm\n", + "Solution For b\n", + "In this process,energy crosses the boundary of the system by means of fractional work\n", + "The contents of the math.tank will not distinguish between the energy if it is added as heat or the energy added as fraction work\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "P1 = 100 \t\t\t#Unit:psia \t\t\t#Pressure at the entrance to a steady-flow device\n", + "Rho1 = 62.4 \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n", + "A1V1 = 10000 \t\t\t#Unit:ft**3/min \t\t\t#Entering fluid\n", + "A2 = 2 \t\t\t#Unit:ft**2 \t\t\t#Exit area\n", + "\n", + "# Calculations and Results\n", + "m = Rho1*A1V1; \t\t\t#Unit:lbm/min \t\t\t#mass rate of flow per unit time\n", + "print \"Mass flow rate is %.2f LBm/min\"%(m);\n", + "\n", + "Rho2 = Rho1; \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n", + "#m = Rho2*A2*V2\n", + "#So,\n", + "V2 = m/(Rho2*A2); \t\t\t#velocity at exit \t\t\t#Unit:ft/min\n", + "print \"The exit velocity is %.2f ft/min\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate is 624000.00 LBm/min\n", + "The exit velocity is 5000.00 ft/min\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "Rho1 = 1000. \t\t\t#Unit:kg/m**3 \t\t\t#the density of the fluid at entrance\n", + "A1V1 = 2000 \t\t\t#Unit:m**3/min \t\t\t#Entering fluid\n", + "A2 = 0.5 \t\t\t#Unit:ft**2 \t\t\t#Exit area\n", + "\n", + "# Calculations and Results\n", + "m = Rho1*A1V1; \t\t\t#Unit:kg/min \t\t\t#mass rate of flow per unit time\n", + "print \"Mass flow rate is %.2f kg/min\"%(m);\n", + "\n", + "Rho2 = Rho1; \t\t\t#Unit:kg/m**3 \t\t\t#the density of the fluid at exit\n", + "#m = Rho2*A2*V2\n", + "#So,\n", + "V2 = m/(Rho2*A2); \t\t\t#The exit velocity \t\t\t#Unit:m/min\n", + "print \"The exit velocity is %.2f m/min\"%(V2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate is 2000000.00 kg/min\n", + "The exit velocity is 4000.00 m/min\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Given value\n", + "Rho = 62.4 \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n", + "V = 100 \t\t\t#Unit:ft/s \t\t\t#Velocity of fluid\n", + "d = 1 \t\t\t#Unit:in \t\t\t#Diameter\n", + "\n", + "# Calculations\n", + "#1 ft**2 = 144 in**2 \t\t\t#A = (math.pi/4)*d**2\n", + "A = (math.pi*d**2)/(4*144) \t\t\t#Unit:ft**2 \t\t\t#area \n", + "m = Rho*A*V; \t\t\t#Unit:lbm/s \t\t\t#mass rate of flow per unit time\n", + "\n", + "# Results\n", + "print \"Mass flow rate is %.2f lbm/s\"%(m);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate is 34.03 lbm/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Given value\n", + "m1 = 50000.; \t\t\t#Unit:LBm/hr \t\t\t#An inlet steam flow\n", + "v1 = 0.831 \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume of inlet steam\n", + "d1 = 6. \t\t\t#Unit:in \t\t\t#Inlet diameter\n", + "\n", + "# Calculations and Results\n", + "A1 = (math.pi*d1**2)/(4*144) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Entering area\n", + "V1 = (m1*v1)/(A1*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at inlet\n", + "print \"The velocity at inlet is %.2f ft/s\"%(V1);\n", + "\n", + "\n", + "m2 = m1; \t\t\t#Unit:LBm/hr \t\t\t#m2 = An outlet steam flow\n", + "v2 = 1.825 \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume of outlet steam\n", + "d2 = 8 \t\t\t#Unit:in \t\t\t#Outlet diameter\n", + "A2 = (math.pi*d2**2)/(4*144) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Exit area\n", + "V2 = (m1*v2)/(A2*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at outlet\n", + "print \"The velocity at outlet is %.2f ft/s\"%(V2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at inlet is 58.78 ft/s\n", + "The velocity at outlet is 72.61 ft/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Given value\n", + "m1 = 10000; \t\t\t#Unit:kg/hr \t\t\t#An inlet steam flow\n", + "v1 = 0.05 \t\t\t#Unit:m**3/kg \t\t\t#Specific volume of inlet steam\n", + "d1 = 0.1 \t\t\t#Unit:m \t\t\t#Inlet diameter \t\t\t#100 mm = 0.1 m\n", + "\n", + "# Calculations and Results\n", + "A1 = (math.pi/4)*d1**2 \t\t\t#Unit:m**2 \t\t\t#Entering area\n", + "V1 = (m1*v1)/(A1*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at inlet \t\t\t#Unit:m/s\n", + "print \"The velocity at inlet is %.2f m/s\"%(V1);\n", + "\n", + "\n", + "m2 = m1; \t\t\t#Unit:kg/hr \t\t\t#m2 = An outlet steam flow\n", + "v2 = 0.10 \t\t\t#Unit:m**3/kg \t\t\t#Specific volume of outlet steam\n", + "d2 = 0.2 \t\t\t#Unit:m \t\t\t#Outlet diameter \t\t\t#200 mm = 0.2 m\n", + "A2 = (math.pi/4)*(d2**2) \t\t\t#Unit:m**2 \t\t\t#Exit area\n", + "V2 = (m1*v2)/(A2*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at outlet \t\t\t#Unit:m/s\n", + "print \"The velocity at outlet is %.2f m/s\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at inlet is 17.68 m/s\n", + "The velocity at outlet is 8.84 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "Cp = 0.22; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n", + "Cv = 0.17; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n", + "q = 800./10; \t\t\t#data given:800 Btu as heat is added to 10 LBm \t\t\t#Unit:Btu/LBm\n", + "T1 = 100; \t\t\t#Unit:Fahrenheit \t\t\t#Initial temperature \t\t\t#T2 = Final temperature\n", + "\n", + "# Calculations\n", + "#For a non-flow,constant pressure process\n", + "#q = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n", + "#deltaT = T2-T1;\n", + "deltaT = q/Cp; \t\t\t#Fahrenheit \t\t\t#change in temperature\n", + "T2 = deltaT+T1; \t\t\t#Fahrenheit \t\t\t#final temperature\n", + "#For a constant volume pressure\n", + "#u2-u1 = Change in internal energy \t\t\t#w = workdone\n", + "#q-w = u2-u1\n", + "#-w = (u2-u1)-q = Cv*(T2-T1)-q\n", + "w = -(Cv*(T2-T1)-q); \t\t\t#Unit:Btu/lbm \t\t\t#workdone\n", + "\n", + "# Results\n", + "print \"%.2f Btu/lbm work is taken out of the system due to workdone by gas\"%(w);\n", + "print \"As there is 10 lbm in the system\"\n", + "print \"%.2f Btu work is taken out of the system due to workdone by gas\"%(w*10);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "18.18 Btu/lbm work is taken out of the system due to workdone by gas\n", + "As there is 10 lbm in the system\n", + "181.82 Btu work is taken out of the system due to workdone by gas\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given data\n", + "# Inlet Outlet\n", + "#Pressure(psia) 1000 1\n", + "#Temperature(F) 1000 101.74\n", + "#Velocity(ft/s) 125 430\n", + "#Inlet position(ft) +10 0\n", + "#Enthalpy(Btu/LBm) 1505.4 940.0\n", + "#Steam flow rate of 150000 LBm/hr\n", + "\n", + "#From the table,\n", + "Z1 = 10; \n", + "V1 = 125; \n", + "h1 = 1505.4; \n", + "Z2 = 0; \n", + "V2 = 430; \n", + "h2 = 940.0;\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + h2 + w/J\n", + "print \"Solution for a \";\n", + "q = 0; \t\t\t#net heat\n", + "J = 778.; \t\t\t#Conversion factor\n", + "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n", + "#W1 = w/J;\n", + "#Energy equation is given by\n", + "W1 = ((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 + q - ((Z2/J)*(g/gc)) - (V2**2/(2*gc*J)) - h2; \t\t\t#Unit:Btu/LBm\n", + "print \"If heat losses are negligible\"\n", + "print \"Total work of the turbine is %.2f Btu/LBm\"%(W1);\n", + "print \"Total work of the turbine is %.2f Btu/hr\"%(W1*150000); \n", + "#(W*150000*778)/(60*33000) \t\t\t#in terms of horsepower \t\t\t#1 hr = 60 min \t\t\t#1 hp = 33000 (ft*LBf)\n", + "print \"Total work of the turbine is %.2f hp \"%(((W1*150000*778)/60*33000)); \n", + "#1 hp = 0.746 kW\n", + "print \"Total work of the turbine is %.2f kW \"%((((W1*150000*778)/60*33000))*0.746);\n", + "\n", + "\n", + "print \"Solution for b \";\n", + "#Heat losses equal 50,000 Btu/hr\n", + "q = 50000./150000; \t\t\t#Unit:Btu/LBm \t\t\t#Heat loss\n", + "W2 = ((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 - q - ((Z2/J)*(g/gc)) - (V2**2/(2*gc*J)) - h2; \t\t\t#Unit:Btu/LBm\n", + "print \"If heat losses equal 50,000 Btu/hr , Total work of the turbine is %.2f Btu/LBm\"%(W2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a \n", + "If heat losses are negligible\n", + "Total work of the turbine is 562.03 Btu/LBm\n", + "Total work of the turbine is 84304739.48 Btu/hr\n", + "Total work of the turbine is 36073998024056.70 hp \n", + "Total work of the turbine is 26911202525946.29 kW \n", + "Solution for b \n", + "If heat losses equal 50,000 Btu/hr , Total work of the turbine is 561.70 Btu/LBm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Z1 = 2; \t\t\t#Unit:m \t\t\t#Inlet position\n", + "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n", + "V1 = 40; \t\t\t#Unit:m/s \t\t\t#Inlet velocity\n", + "h1 = 3433.8; \t\t\t#Unit:kJ/kg \t\t\t#Inlet enthalpy\n", + "q = 1 \t\t\t#Unit:kJ/kg \t\t\t#Heat losses\n", + "Z2 = 0; \t\t\t#Outlet position \t\t\t#unit:m\n", + "V2 = 162; \t\t\t#Unit:m/s \t\t\t#Outlet velocity\n", + "h2 = 2675.5; \t\t\t#Unit:kJ/kg \t\t\t#Outlet enthalpy\n", + "\n", + "#Energy equation is given by\n", + "#((Z1*g)) + (V1**2/2) + h1 + q = ((Z2*g) + (V2**2/2) + h2 + w\n", + "\n", + "w = ((Z1*g)/1000) + ((V1**2/2)/1000) + h1 - q - ((Z2*g)/1000) - ((V2**2/2)/1000) - h2 ; \t\t\t#Unit:kJ/kg \t\t\t#Conersation: 1 kJ = 1000 J\n", + "print \"The work output per kimath.logram is %.2f kJ/kg\"%(w);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work output per kimath.logram is 744.32 kJ/kg\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "p1 = 150; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "T1 = 1000; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "p2 = 15; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "T2 = 600; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "Cp = 0.24; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n", + "v1 = 2.47; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n", + "v2 = 14.8; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n", + "\n", + "#For a non-flow,constant pressure process\n", + "#w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n", + "#W = w/J\n", + "W = Cp*(T1-T2); \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm\n", + "\n", + "# Results\n", + "print \"The work output of the turbine per pound of working fluid is %.2f Btu/LBm\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work output of the turbine per pound of working fluid is 96.00 Btu/LBm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#In problem 3.13 ,\n", + "p1 = 150.; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "T1 = 1000.; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "p2 = 15.; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "T2 = 600.; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "Cp = 0.24; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n", + "v1 = 2.47; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n", + "v2 = 14.8; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n", + "\n", + "#For a non-flow,constant pressure process\n", + "#w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n", + "#W = w/J\n", + "W = Cp*(T1-T2); \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm \t\t\t#h2-h1\n", + "print \"In problem 3.13, The work output of the turbine per pound of working fluid is %.2f Btu/LBm \"%(W);\n", + "\n", + "#Now,In problem 3.14 , \n", + "q = 1.1; \t\t\t#Unit:Btu/LBm \t\t\t#Heat losses\n", + "#For a non-flow,constant pressure process\n", + "#q-w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n", + "#W1 = w/J\n", + "W1 = -q+W; \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm \t\t\t#W = h2-h1 \t\t\t#Because q is out of the system,it is a negative quantity\n", + "print \"In problem 3.14%(heat loss equal to 1.1 Btu/LBm\"\n", + "print \"The work output of the turbine per pound of working fluid is %.2f Btu/LBm \"%(W1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 3.13, The work output of the turbine per pound of working fluid is 96.00 Btu/LBm \n", + "In problem 3.14%(heat loss equal to 1.1 Btu/LBm\n", + "The work output of the turbine per pound of working fluid is 94.90 Btu/LBm \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 Page No : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "p1 = 100.; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "t1 = 950.; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n", + "p2 = 76.; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "t2 = 580.; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n", + "v1 = 4.; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n", + "v2 = 3.86; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n", + "Cv = 0.32; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n", + "\n", + "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "J = 778.; \t\t\t#J = Conversion factor\n", + "\n", + "#Z1 = Inlet position \t\t\t#Unit:m \n", + "#V1 = Inlet velocity \t\t\t#Unit:m/s\n", + "#Z2 = Outlet position \t\t\t#Unit:m \n", + "#V2 = Outlet velocity Unit:m/s \n", + "#u1 = internal energy \t\t\t#energy in\n", + "#u2 = internal energy \t\t\t#energy out\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n", + "#Because pipe is horizontal and velocity terms are to be neglected, \n", + "# Also no work crosses the boundaries of the system, the energy equation is reduced to\n", + "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J)\n", + "#u2-u1 = Cv*(T2-T1) \t\t\t#For a constant volume process \t\t\t#u2-u1 = Chnage in internal energy\n", + "#So,\n", + "q = Cv*(T2-T1) + (p2*v2*144)/J - (p1*v1*144)/J; \t\t\t#q = heat transfer \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Unit:Btu/LBm\n", + "\n", + "# Results\n", + "print \"%.2f Btu/LBm heat is transferred from the gas \"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-138.14 Btu/LBm heat is transferred from the gas \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 Page No : 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#In problem 3.15,\n", + "p1 = 100; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "t1 = 950; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n", + "p2 = 76; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "t2 = 580; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n", + "v1 = 4; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n", + "v2 = 3.86; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n", + "Cv = 0.32; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n", + "\n", + "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "J = 778.; \t\t\t#J = Conversion factor\n", + "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n", + "\n", + "#Z1 = Inlet position \t\t\t#Unit:m \n", + "#V1 = Inlet velocity \t\t\t#Unit:m/s\n", + "#Z2 = Outlet position \t\t\t#Unit:m \n", + "#V2 = Outlet velocity Unit:m/s \n", + "#u1 = internal energy \t\t\t#energy in\n", + "#u2 = internal energy \t\t\t#energy out\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n", + "#In 3.15, the elevation of the pipe at section 1 makes Z1 = 0\n", + "# Also no work crosses the boundaries of the system, the energy equation is reduced to\n", + "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J) + ((Z2/J)*(g/gc))\n", + "#In problrm 3.16,\n", + "Z2 = 100; \t\t\t#Given \t\t\t#Unit:ft \t\t\t#Outlet position\n", + "#u2-u1 = Cv*(T2-T1) \t\t\t#For a constant volume process \t\t\t#u2-u1 = Chnage in internal energy\n", + "#So,\n", + "q = Cv*(T2-T1) + (p2*v2*144)/J - (p1*v1*144)/J + ((Z2/J)*(g/gc)) ; \t\t\t#q = heat transfer \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Unit:Btu/LBm\n", + "\n", + "# Results\n", + "print \"%.2f Btu/LBm heat is transferred from the gas \"%(q);\n", + "#For this problem , neglecting the elevation term leads to an insignificant error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-138.01 Btu/LBm heat is transferred from the gas \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 Page No : 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "p1 = 1000; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "t1 = 100; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n", + "p2 = 1000; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "t2 = 1000; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n", + "# feed in 10,000 LBm/hr \n", + "h1 = 70.68 \t\t\t#Unit:Btu/LBm \t\t\t#Inlet enthalpy\n", + "h2 = 1505.9 \t\t\t#Unit:Btu/LBm \t\t\t#Outlet enthalpy\n", + "\n", + "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "#Energy equation is given by\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "\n", + "#Z1 = Inlet position \t\t\t#Unit:m \n", + "#V1 = Inlet velocity \t\t\t#Unit:m/s\n", + "#Z2 = Outlet position \t\t\t#Unit:m \n", + "#V2 = Outlet velocity Unit:m/s \n", + "#u1 = internal energy \t\t\t#energy in\n", + "#u2 = internal energy \t\t\t#energy out\n", + "#h = enthalpy\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n", + "\n", + "#we can consider this system as a math.single unit with feed water entering ans steam leaving. \n", + "#It well designed,this unit will be thoroughly insulated,and heat losse will be reduced to a negligible amount\n", + "#Alos,no work will be added to the fluid during the time it is pasmath.sing through the unit, and kinetic energy differences will be assumed to be negligibly small\n", + "#Differennces in elevation also be considered negligible\n", + "#So,the energy equation is reduced to \n", + "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J)\n", + "#Because h = u+(p*v/J)\n", + "q = h2-h1; \t\t\t#q = net heat losses \t\t\t#Unit:Btu/LBm\n", + "\n", + "# Results\n", + "print \"Net heat losses is %.2f Btu/LBm \"%(q);\n", + "print \"For 10000 LBm/hr\"\n", + "print \"%.2f Btu/hr energy has been added to the water to convert it to steam\"%(q*10000)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net heat losses is 1435.22 Btu/LBm \n", + "For 10000 LBm/hr\n", + "14352200.00 Btu/hr energy has been added to the water to convert it to steam\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 Page No : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "h1 = 1220 \t\t\t#Unit:Btu/LBm \t\t\t#Inlet enthalpy\n", + "h2 = 1100 \t\t\t#Unit:Btu/LBm \t\t\t#Outlet enthalpy\n", + "\n", + "#Z1 = Inlet position \t\t\t#Unit:m \n", + "#V1 = Inlet velocity \t\t\t#Unit:m/s\n", + "#Z2 = Outlet position \t\t\t#Unit:m \n", + "#V2 = Outlet velocity Unit:m/s \n", + "#u1 = internal energy \t\t\t#energy in\n", + "#u2 = internal energy \t\t\t#energy out\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n", + "\n", + "#For this device,differences in elevation are negligible.No work is done on or by the fluid,friction is negligible\n", + "#And due to the speed of the fluid flowing and the short length of the nozzle,heat transfer to or from the surroundings is also negligible.\n", + "#So,the energy equation is reduced to \n", + "#u1 + ((p1*v1)/J) +(V1**2/(2*gc*J) = u2 + ((p2*v2)/J) + (V2**2/(2*gc*J)\n", + "# h1-h2 = ((V2**2-V1**2)/(2*gc*J))\n", + "\n", + "print \"Solution for a\";\n", + "#For neglegible entering velocity, V1 = 0\n", + "#So,\n", + "V2 = math.sqrt((2*gc*J)*(h1-h2)); \t\t\t#the final velocity \t\t\t#ft/s\n", + "print \"It the initial velocity of the system is negligible, the final velocity is %.2f ft/s \"%(V2);\n", + "\n", + "print \"Solution for b\";\n", + "#If the initial velocity is appreciable,\n", + "V1 = 1000; \t\t\t#Unit:ft/s \t\t\t#the initial velocity \n", + "V2 = math.sqrt(((h1-h2)*(2*gc*J)) + V1**2 ) ;\n", + "print \"It the initial velocity of the system is appreciable, the final velocity is %.2f ft/s \"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "It the initial velocity of the system is negligible, the final velocity is 2451.03 ft/s \n", + "Solution for b\n", + "It the initial velocity of the system is appreciable, the final velocity is 2647.17 ft/s \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 Page No : 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "h1 = 3450*1000 \t\t\t#Unit:J/kg \t\t\t#Enthalpy of steam when it enters a nozzle\n", + "h2 = 2800*1000 \t\t\t#Unit:J/kg \t\t\t#Enthalpy of steam when it leaves a nozzle\n", + "\n", + "# Calculations\n", + "#V2**2/2 = h1-h2;\n", + "V2 = math.sqrt(2*(h1-h2)); \t\t\t#V2 = Final velocity \t\t\t#Unit:m/s\n", + "\n", + "# Results\n", + "print \"Final velocity = %.2f m/s\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final velocity = 1140.18 m/s\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 Page No : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "m = 400; \t\t\t#Unit:LBm/min \t\t\t#mass of lubricating oil\n", + "Cp = 0.85; \t\t\t#Unit:Btu/LBm*R \t\t\t#Specific heat of the oil\n", + "T1 = 215; \t\t\t#Temperature when hot oil is entering \t\t\t#Unit:Fahrenheit\n", + "T2 = 125; \t\t\t#Temperature when hot oil is leaving \t\t\t#Unit:Fahrenheit\n", + "\n", + "# Calculations and Results\n", + "DeltaT = T2-T1; \t\t\t#Unit:Fahrenheit \t\t\t#change in temperature\n", + "Qoil = m*Cp*DeltaT; \t\t\t#Heat out of oil \t\t\t#Btu/min\n", + "print \"Heat out of oil is %.2f Btu/min Out of oil\"%(Qoil);\n", + "#Heat out of oil is the heat into the water\n", + "#Mw = Water flow rate\n", + "#M*Cpw*DeltaTw = Qoil\n", + "Cpw = 1.0; \t\t\t#Unit:Btu/LBm*R \t\t\t#Specific heat of the water\n", + "T3 = 60.; \t\t\t#Temperature when water is entering \t\t\t#Unit:Fahrenheit\n", + "T4 = 90; \t\t\t#Temperature when water is leaving \t\t\t#Unit:Fahrenheit\n", + "DeltaTw = T4-T3; \t\t\t#Unit:Fahrenheit \t\t\t#change in temperature\n", + "Mw = Qoil/(Cpw*DeltaTw); \t\t\t#The Required water flow rate \t\t\t#Unit;lbm/Min\n", + "print \"The Required water flow rate is %.2f lbm/Min\"%(abs(Mw));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat out of oil is -30600.00 Btu/min Out of oil\n", + "The Required water flow rate is 1020.00 lbm/Min\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb index d0e5bbf4..d0e5bbf4 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_2.ipynb new file mode 100755 index 00000000..d0e5bbf4 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_2.ipynb @@ -0,0 +1,656 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:81c0b2f6374783dbad513f5ebbb51829b49d5e29c2d28b8cf1616c5d410d60b5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : The Second Law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "t1 = 1000.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 80.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "#solution\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "\n", + "print \"Solution for a\";\n", + "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n", + "print \"Efficiency of the engine is %.2f percentage\"%(ans);\n", + "\n", + "print \"Solution for b\";\n", + "T1 = 2000+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n", + "print \"When the upper tempretrature is increased upto certain ,Efficiency of the engine is %.2f percentage \"%(ans);\n", + "\n", + "print \"Solution for c\";\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = 160+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n", + "print \"When the lower tempretrature is increased upto certain ,Efficiency of the engine is %.2f percentage \"%(ans);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Efficiency of the engine is 63.01 percentage\n", + "Solution for b\n", + "When the upper tempretrature is increased upto certain ,Efficiency of the engine is 78.05 percentage \n", + "Solution for c\n", + "When the lower tempretrature is increased upto certain ,Efficiency of the engine is 57.53 percentage \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "Qin = 100.; \t\t\t#heat added to the cycle \n", + "\n", + "print \"In problem 4.1\"\n", + "#given data\n", + "t1 = 1000.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 80.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "#solution\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "print \"Solution for a\";\n", + "print \"Efficiency of the engine is %.2f percentage\"%(((T1-T2)/T1)*100);\n", + "\n", + "print \"Now in problem 4.2\"\n", + "W = 0.63*Qin; \t\t\t#W = W/J; \t\t\t#Efficiency in problem 4.1 \n", + "W = Qin*(W/Qin); \t\t\t#amount of work\n", + "Qr = Qin-W; \t\t\t#Qin-Qr = W/J \t\t\t#Qr = heat rejected by the cycle\n", + "print \"The heat removed from the reservoir %.2f units\"%(Qr);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 4.1\n", + "Solution for a\n", + "Efficiency of the engine is 63.01 percentage\n", + "Now in problem 4.2\n", + "The heat removed from the reservoir 37.00 units\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "t1 = 70.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 15.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "Qin = 125000.; \t\t\t#(unit = Btu/hr) \t\t\t#Qin = heat added to the cycle\n", + "\n", + "# Calculations and Results\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "Qr = Qin*(T2/T1); \t\t\t#Qr = heat rejected by the cycle\n", + "print \"Qr is %.2f in Btu/hr\"%(Qr);\n", + "work = Qin-Qr; \t\t\t#reversed cycle requires atleast input \t\t\t#work \t\t\t#btu/hr\n", + "print \"Work is %.2f in Btu/hr\"%(work);\n", + "# 1 hp = 33000 ft*LBf/min \n", + "# 1 Btu = 778 ft*LBf \t\t\t#1 hr = 60 min\n", + "print \"Minimum horsepower input required is %.2f hp\"%((work*778/60*33000));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Qr is 112028.30 in Btu/hr\n", + "Work is 12971.70 in Btu/hr\n", + "Minimum horsepower input required is 5550589622.64 hp\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "W = (50.*33000)/778;\t\t\t#output \t\t\t#W = W/J\n", + "# 1 hp = 33000 ft*LBf/min \n", + "# 1 Btu = 778 ft*LBf\n", + "print \"Output is %.2f in Btu/min\"%(W);\n", + "t1 = 1000.; \t\t\t#Source temperature \t\t\t#(unit:fahrenheit)\n", + "t2 = 100.; \t\t\t#Sink temperature \t\t\t#(unit:fahrenheit)\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "n = (1-(T2/T1))*100; \t\t\t#efficiency\n", + "print \"Efficiency is %.2f percentage\"%(n);\t\t\t#in %)\n", + "#n = (W/J)/Qin\n", + "Qin = W/(n/100);\t\t\t#(unit Btu/hr) \t\t\t#Qin = heat added to the cycle\n", + "print \"Heat added to the cycle is %.2f in Btu/min\"%(Qin);\n", + "Qr = Qin*(1-(n/100));\t\t\t#(unit Btu/hr) \t\t\t#Qr = heat rejected by the cycle\n", + "print \"Heat rejected by the cycle is %.2f in Btu/min \"%(Qr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output is 2120.82 in Btu/min\n", + "Efficiency is 61.64 percentage\n", + "Heat added to the cycle is 3440.45 in Btu/min\n", + "Heat rejected by the cycle is 1319.62 in Btu/min \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "t1 = 700.; \t\t\t#Source temperature \t\t\t#Unit:Celcius\n", + "t2 = 20.; \t\t\t#Sink temperature \t\t\t#Unit:Celcius\n", + "#converting in F\n", + "T1 = t1+273; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+273; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "n = (T1-T2)/T1*100; \t\t\t#Efficiency\n", + "print \"Efficiency is %.2f percentage\"%(n);\t\t\t#in %)\n", + "output = 65;\t\t\t#in hp \t\t\t#Given\n", + "work = output*0.746;\t\t\t#(unit kJ/s) \t\t\t# 1 hp = 746 W\n", + "print \"Work is %.2f kJ/s\"%(work);\n", + "Qin = work/(n/100);\t\t\t#(unit kJ/s) \t\t\t#Qin = heat added to the cycle\n", + "print \"Heat added to the cycle is %.2f kJ/s \"%(Qin);\n", + "Qr = Qin*(1-(n/100));\t\t\t#(unit kJ/s) \t\t\t#Qr = heat rejected by the cycle\n", + "print \"Heat rejected by the cycle is %.2f kJ/s \"%(Qr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency is 69.89 percentage\n", + "Work is 48.49 kJ/s\n", + "Heat added to the cycle is 69.38 kJ/s \n", + "Heat rejected by the cycle is 20.89 kJ/s \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "t1 = 700.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 200.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "#n1 = (T1-Ti)/T1 and n2 = (Ti-T2)/Ti \t\t\t#n1 & n2 are efficiency\n", + "#(T1-Ti)/T1 = (Ti-T2)/Ti;\n", + "Ti = math.sqrt(T1*T2); \t\t\t#Exhaust temperature \t\t\t#Unit:R\n", + "print \"Exhaust temperature of first engine is %.2f in R\"%(Ti);\n", + "#converting absolute temperature to normal F temperature\n", + "#Ti(fahrenheit) = Ti(R)-460;\n", + "print \"Exhaust temperature of first engine is %.2f fahrenheit\"%(Ti-460);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exhaust temperature of first engine is 874.99 in R\n", + "Exhaust temperature of first engine is 414.99 fahrenheit\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For reversible isothermal process,\n", + "q = 843.7; \t\t\t#Heat \t\t\t#Unit:Btu \t\t\t#at 200 psia\n", + "t = 381.86; \t\t\t#(unit:fahrenheit) \t\t\t#temperature\n", + "#\t\t\t#converting temperatures to absolute temperatures;\n", + "T = t+460; \t\t\t#temperature \t\t\t#unit:R\n", + "deltaS = (q/T); \t\t\t#Change in entropy \t\t\t#Unit:Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"Change in entropy is %.2f Btu/lbm*R\"%(deltaS); \t\t\t#1 LBm of saturated water\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy is 1.00 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For reversible isothermal process,\n", + "#In problem 4.8,\n", + "q = 843.7; \t\t\t#Heat \t\t\t#Unit:Btu \t\t\t#at 200 psia\n", + "t = 381.86; \t\t\t#(unit:fahrenheit) \n", + "#converting temperatures to absolute temperatures;\n", + "T = t+460; \t\t\t#Unit:R\"\n", + "deltaS = (q/T); \t\t\t#Change in entropy \t\t\t#Btu/lbm\n", + "print \"Change in entropy is %.2f Btu/lbm*R\"%(deltaS); \t\t\t#1 LBm of saturated water\n", + "\n", + "#In problem 4.9\n", + "t1 = 381.86; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 50.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "qin = q;\t\t\t#heat added to the cycle \n", + "n = (1-(T2/T1))*100; \t\t\t#Efficiency\n", + "print \"Efficiency is %.2f percentage\"%(n);\n", + "wbyJ = qin*n*0.01;\t\t\t#work output\n", + "print \"Work output is %.2f Btu/lbm\"%(wbyJ);\n", + "Qr = qin-wbyJ; \t\t\t#heat rejected\n", + "print \"Heat rejected is %.2f Btu/lbm\"%(Qr);\n", + "print \"As an alternative solution and refering to figure 4.12\"\n", + "qin = T1*deltaS; \t\t\t#heat added \t\t\t#btu/lbm\n", + "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#btu/lbm\n", + "print \"Heat rejected is %.2f Btu/lbm\"%(Qr);\n", + "wbyJ = qin-Qr; \t\t\t#Work output \t\t\t#Btu/lbm\n", + "print \"Work output is %.2f Btu/lbm\"%(wbyJ);\n", + "n = (wbyJ/qin)*100; \t\t\t#Efficiency\n", + "print \"Efficiency is %.2f percentage\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy is 1.00 Btu/lbm*R\n", + "Efficiency is 39.42 percentage\n", + "Work output is 332.59 Btu/lbm\n", + "Heat rejected is 511.11 Btu/lbm\n", + "As an alternative solution and refering to figure 4.12\n", + "Heat rejected is 511.11 Btu/lbm\n", + "Work output is 332.59 Btu/lbm\n", + "Efficiency is 39.42 percentage\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "hfg = 1959.7; \t\t\t#Unit:kJ/kg \t\t\t#Evaporative enthalpy\n", + "T = 195.07+273; \t\t\t#Converted into Kelvin \t\t\t#Temperature\n", + "\n", + "# Calculations\n", + "deltaS = hfg/T; \t\t\t#Change in entropy \t\t\t#kJ/kg*K\n", + "\n", + "# Results\n", + "print \"Change in entropy at 1.4MPa for the vaporization of 1 kg is %.2f kJ/kg*K\"%(deltaS); \t\t\t#Values compares very closely to the Steam Tables value\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy at 1.4MPa for the vaporization of 1 kg is 4.19 kJ/kg*K\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Let is assume that a Carnot engine cycle operates between two temperatures in each case.\n", + "t = 1000.; \t\t\t#(unit:fahrenheit) \n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t+460;\n", + "#T1*deltaS = Qin;\n", + "Qin = 100.; \t\t\t#Unit:Btu \t\t\t#heat added to the cycle \n", + "deltaS = Qin/T1; \t\t\t#Change in entropy \t\t\t#Btu/R\n", + "T2 = 50.+460; \t\t\t#converting 50 F temperature to absolute temperature;\n", + "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#Unit:Btu\n", + "print \"%.2f Btu energy is unavailable with respect to a receiver at 50 fahrenheit \"%(Qr);\n", + "T2 = 0+460; \t\t\t#converting 0 F temperature to absolute temperature;\n", + "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#unit:Btu\n", + "print \"%.2f Btu energy is unavailable with respect to a receiver at 0 fahrenheit \"%(Qr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "34.93 Btu energy is unavailable with respect to a receiver at 50 fahrenheit \n", + "31.51 Btu energy is unavailable with respect to a receiver at 0 fahrenheit \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Qin = 1000; \t\t\t#Unit:Joule \t\t\t#heat entered to the system\n", + "t = 500; \t\t\t#(unit:Celcius) \t\t\t#temperature\n", + "\t\t\t#converting temperature\n", + "T1 = t+273; \t\t\t#Unit:Kelvin\n", + "deltaS = Qin/T1; \t\t\t#Change in entropy \t\t\t#Unit:J/K\n", + "print \"Solution for a\"\n", + "T2 = 20+273; \t\t\t#converted 20 Celcius temperature to Kelvin;\n", + "Qr = T2*deltaS; \t\t\t#Heat rejected at 20 celcius \t\t\t#Joule\n", + "print \"%.2f Joule energy is unavailable with respect to a receiver at 20 Celcius\"%(Qr);\n", + "\n", + "print \"Solution for b\"\n", + "T2 = 0+273; \t\t\t#converted 0 Celcius temperature to Kelvin\n", + "Qr = T2*deltaS; \t\t\t#heat rejected at 0 celcius \t\t\t#Joule\n", + "print \"%.2f Joule energy is unavailable with respect to a receiver at 0 Celcius\"%(Qr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "293.00 Joule energy is unavailable with respect to a receiver at 20 Celcius\n", + "Solution for b\n", + "273.00 Joule energy is unavailable with respect to a receiver at 0 Celcius\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#deltas = Cp*ln(T2/T1)\n", + "#Multiplying both the sides of equation by the mass m,\n", + "#DeltaS = m*Cp*ln(T2/T1)\n", + "m = 6.; \t\t\t#mass \t\t\t#Unit:lbm\n", + "Cp = 0.361; \t\t\t#Btu/lbm*R \t\t\t#Specific heat constant\n", + "DeltaS = -0.7062; \t\t\t#Unit:Btu/R \t\t\t#change in entropy\n", + "t = 1440.; \t\t\t#(unit:fahrenheit) \n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t+460; \t\t\t#Unit:R\n", + "#Rearranging the equation,\n", + "T2 = T1*math.exp(DeltaS/(m*Cp)); \t\t\t#final temperature \t\t\t#Unit:R\n", + "\n", + "# Results\n", + "print \"Final temperature is %.2f R\"%(T2);\n", + "print \"or %.2f fahrenheit\"%(T2-460);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final temperature is 1371.38 R\n", + "or 911.38 fahrenheit\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#1 lbm of water at 500F is mixed with 1 lbm of water at 100F\n", + "m1 = 1.; \t\t\t#Unit:lbm \t\t\t#mass\n", + "m2 = 1.; \t\t\t#Unit:lbm \t\t\t#mass\n", + "c1 = 1.; \t\t\t#Specific heat constant\n", + "c2 = 1.; \t\t\t#Specific heat constant\n", + "t1 = 500.; \t\t\t#(unit:fahrenheit) \n", + "t2 = 100.; \t\t\t#(unit:fahrenheit)\n", + "cmix = 1.; \t\t\t#Specific heat constant of mixture\n", + "#now, m1*c1*t1 +m2*c2*t2 = (m1+m2)*cmix*t\n", + "#So,\n", + "t = ((m1*c1*t1)+(m2*c2*t2))/((m1+m2)*cmix) \t\t\t#resulting temperature of the mixture\n", + "print \"The resulting temperature of the mixture is %.2f fahrenheit\"%(t);\n", + "#For this problem,the hot steam is cooled\n", + "deltas = cmix*math.log((t+460)/(t1+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltas = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "#The cold steam is heated\n", + "deltaS = cmix*math.log((t+460)/(t2+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltaS = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "print \"The net change in entropy is %.2f Btu/lbm*R)\"%(deltaS+deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resulting temperature of the mixture is 300.00 fahrenheit\n", + "The net change in entropy is 0.07 Btu/lbm*R)\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#In problem 4.15,\n", + "#1 lbm of water at 500F is mixed with 1 lbm of water at 100F\n", + "m1 = 1; \t\t\t#Unit:lbm \t\t\t#mass\n", + "m2 = 1; \t\t\t#Unit:lbm \t\t\t#mass\n", + "c1 = 1; \t\t\t#Specific heat constant\n", + "c2 = 1; \t\t\t#Specific heat constant\n", + "t1 = 500; \t\t\t#(unit:fahrenheit)\n", + "t2 = 100; \t\t\t#(unit:fahrenheit)\n", + "cmix = 1; \t\t\t#Specific heat constant of mixture\n", + "#now, m1*c1*t1 +m2*c2*t2 = (m1+m2)*cmix*t \t\t\t#So,\n", + "t = ((m1*c1*t1)+(m2*c2*t2))/((m1+m2)*cmix) \t\t\t#resulting temperature of the mixture\n", + "print \"In problem 4.14, The resulting temperature of the mixture is %.2f fahrenheit\"%(t);\n", + "\n", + "#Now,in problem 4.15,taking 0F as a reference temperature,\n", + "#For hot fluid,\n", + "deltas = cmix*math.log((t1+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltas = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "#For cold fluid,\n", + "s = cmix*math.log((t2+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "#At final mixture temperature of t F,the entropy of each system above 0F is,for the hot fluid \n", + "s1 = cmix*math.log((t+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s1 = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "#and for the cold fluid,\n", + "s2 = cmix*math.log((t+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s2 = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "print \"The change in the entropy for hot fluid is %.2f Btu/lbm*R)\"%(s1-deltas);\n", + "print \"The change in the entropy for cold fluid is %.2f Btu/lbm*R)\"%(s2-s);\n", + "print \"The total change in entropy if %.2f Btu/lbm*R\"%(s1-deltas+s2-s);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 4.14, The resulting temperature of the mixture is 300.00 fahrenheit\n", + "The change in the entropy for hot fluid is -0.69 Btu/lbm*R)\n", + "The change in the entropy for cold fluid is 0.00 Btu/lbm*R)\n", + "The total change in entropy if -0.69 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb index ef34cc8f..ef34cc8f 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_2.ipynb new file mode 100755 index 00000000..ef34cc8f --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_2.ipynb @@ -0,0 +1,1536 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5f6a0af8f766f00e3dc6895c71340c9032268be4509d3ee5581830a21a93add3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Properties of Liquids and Gases" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "p = 0.6988; \t\t\t#Unit:psia \t\t\t#absolute pressure\n", + "vg = 467.7; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated vapour specific volume\n", + "ug = 1040.2; \t\t\t#Unit:Btu/lbm \t\t\t#Saturated vapour internal energy\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "# 1 Btu = 778 ft*LBf\n", + "#h = u+(p*v)/J \n", + "hg = ug+((p*vg*144)/J); \t\t\t#The enthalpy of saturated steam \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Btu/lbm\n", + "\n", + "# Results\n", + "print \"The enthalpy of saturated steam at 90 F is %.2f Btu/lbm\"%(hg); \t\t\t#The value is matched with the value in table 1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of saturated steam at 90 F is 1100.69 Btu/lbm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "p = 4.246; \t\t\t#Unit:kPa \t\t\t#absolute pressure\n", + "vg = 32.894; \t\t\t#Unit:m**3/kg \t\t\t#specific volume\n", + "ug = 2416.6; \t\t\t#Unit:kJ/kg \t\t\t#internal energy\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "# 1 Btu = 778 ft*LBf\n", + "#h = u+(p*v)\n", + "hg = ug+(p*vg); \t\t\t#The enthalpy of saturated steam \t\t\t#1 ft**2 = 144 in**2 \t\t\t#unit:kJ/kg\n", + "\n", + "# Results\n", + "print \"The enthalpy of saturated steam at 30 C is %.2f kJ/kg\"%(hg); \t\t\t#The value is matched with the value in table 1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of saturated steam at 30 C is 2556.27 kJ/kg\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The necessary interpolations are best done in tabular forms as shown:\n", + "# p hg\n", + "# 115 1190.4 table 2\n", + "# 118 1190.8 (hg)118 = 1190.8\n", + "# 120 1191.1\n", + "hg = 1190.4+(3./5)*(1191.1-1190.4); \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "print \"The enthalpy of saturated steam at 118 psia is %.2f Btu/lbm\"%(hg);\n", + "\n", + "# p vg\n", + "# 115 3.884 table 2\n", + "# 118 3.792 (vg)118 = 3.790\n", + "# 120 3.730\n", + "vg = 3.884-(3./5)*(3.884-3.730); \t\t\t#ft**3/lbm \t\t\t#specific volume\n", + "print \"The specific volume of saturated steam at 118 psia is %.2f ft**3/lbm\"%(vg);\n", + "\n", + "# p sg\n", + "# 115 1.5921 table 2\n", + "# 118 1.5900 (sg)118 = 1.5900\n", + "# 120 1.5886\n", + "sg = 1.5921-(3./5)*(1.5921-1.5886); \t\t\t#entropy\n", + "print \"The entropy of saturated steam at 118 psia is %.2f\"%(sg);\n", + "\n", + "# p ug\n", + "# 115 1107.7 table 2\n", + "# 118 1108.06 (ug)118 = 1180.1\n", + "# 120 1108.3\n", + "ug = 1107.7-(3./5)*(1108.3-1107.7); \t\t\t#internal energy\n", + "print \"The internal energy of saturated steam at 118 psia is %.2f\"%(ug);\n", + "#The interpolation process that was done in tabular form for this problem can also be demonstated by refering to figure 5.8 for the specific volume.It will be \n", + "#seen that the results of this problem and the tabulated values are essentially in exact agreement and that linear interpolation is satisfactory in these tables.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of saturated steam at 118 psia is 1190.82 Btu/lbm\n", + "The specific volume of saturated steam at 118 psia is 3.79 ft**3/lbm\n", + "The entropy of saturated steam at 118 psia is 1.59\n", + "The internal energy of saturated steam at 118 psia is 1107.34\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#By defination,\n", + "#hg = ug+(p*vg)/J\n", + "#hf = uf+(p*vf)/J\n", + "#hfg = hg-hf = (ug-uf) + p*(vg-vf)/J = ufg + p*(vg-vf)/J\n", + "#From table 2 at 115 psia,\n", + "p = 115; \t\t\t#Unit:psia \t\t\t#absolute pressure\n", + "ufg = 798.8; \t\t\t#Unit:Btu/lbm \t\t\t#Evap. internal energy\n", + "ug = 3.884; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated vapour internal energy\n", + "vf = 0.017850; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated liquid specific volume\n", + "J = 778; \t\t\t#J = Conversion factor \t\t\t#Unit:ft*lbf/Btu\n", + "#1 ft**2 = 144 in**2\n", + "hfg = ufg+(p*144*(ug-vf))/J; \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n", + "\n", + "# Results\n", + "print \"hfg for saturated steam at 115 psia is %.2f Btu/lbm\"%(hfg); \t\t\t#The tabulated values are matched\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hfg for saturated steam at 115 psia is 881.09 Btu/lbm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#From table 2 at 1.0 MPa,\n", + "p = 1000; \t\t\t#Unit:kN/m**2 \t\t\t#absolute pressure\n", + "ufg = 1822.0; \t\t\t#Unit:kJ/kg \t\t\t#Evap. internal energy\n", + "vf = 0.0011273; \t\t\t#Unit:m**3/kg \t\t\t#Saturated liquid specific volume\n", + "vg = 0.19444; \t\t\t#Unit:m**3/kg \t\t\t#Saturated vapour specific volume\n", + "\n", + "# Calculations\n", + "vfg = vg-vf; \t\t\t#Evap. specific volume \t\t\t#m**3/kg\n", + "hfg = ufg+(p*vfg); \t\t\t#Evap. Enthalpy \t\t\t#Unit:kJ/kg\n", + "\n", + "# Results\n", + "print \"hfg for saturated steam at 1.0 MPa is %.2f kJ/kg\"%(hfg); \t\t\t#The tabulated values are matched\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hfg for saturated steam at 1.0 MPa is 2015.31 kJ/kg\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For constant-temperature,reversible vaporization, hfg = deltah = T*deltas = T*sfg\n", + "hfg = (388.12+460)*(1.1042); \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n", + "\n", + "# Results\n", + "print \"By considering the process to be a reversible, \\\n", + "\\nconstant-temperature, hfg for saturated steam at 115 psia is %.2f Btu/lbm\"%(hfg); \t\t\t#ans is wrong in the book\n", + "#Values are matched with tabulated values.Use of -459.67 F for absolute zero,which is the value used in table,gives almost exact agreement.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "By considering the process to be a reversible, \n", + "constant-temperature, hfg for saturated steam at 115 psia is 936.49 Btu/lbm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Umath.sing Table 2 ans a quality of 80%(x = 0.8),we have\n", + "#at 120 psia\n", + "x = 0.8;\n", + "sf = 0.49201; \t\t\t#saturated liquid entropy \t\t\t#Unit:Btu/lbm*R\n", + "sfg = 1.0966; \t\t\t#Evap. Entropy \t\t\t#Unit:Btu/lbm*R \n", + "hf = 312.67; \t\t\t#saturated liquid enthalpy \t\t\t#Unit:Btu/lbm \n", + "hfg = 878.5; \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n", + "uf = 312.27; \t\t\t#saturated liquid internal energy \t\t\t#Unit:Btu/lbm \n", + "ufg = 796.0; \t\t\t#Unit:Btu/lbm \t\t\t#Evap. internal energy\n", + "vf = 0.017886; \t\t\t#Saturated liquid specific volume \t\t\t#Unit:ft**3/lbm \n", + "vfg = (3.730-0.017886); \t\t\t#evap. specific volume \t\t\t#Unit:ft**3/lbm \n", + "sx = sf+(x*sfg); \t\t\t#entropy \t\t\t#Btu/lbm*R\n", + "print \"Entropy of a wet steam mixture at 120 psia is %.2f Btu/lbm*R\"%(sx);\n", + "hx = hf+(x*hfg); \t\t\t#enthalpy \t\t\t#Btu/lbm*R\n", + "print \"Enthalpy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(hx);\n", + "ux = uf+(x*ufg); \t\t\t#internal energy \t\t\t#Btu/lbm*R\n", + "print \"Internal energy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(ux);\n", + "vx = vf+(x*vfg); \t\t\t#/specific volume \t\t\t#ft**3/lbm\n", + "print \"Specific Volume of a wet steam mixture at 120 psia is %.2f ft**3/lbm\"%(vx);\n", + "#As a check,\n", + "J = 778; \t\t\t#ft*lbf/Btu \t\t\t#Conversion factor\n", + "px = 120; \t\t\t#psia \t\t\t#pressure\n", + "ux = hx-((px*vx*144)/J); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#internal energy\n", + "print \"As a check\"\n", + "print \"Internal energy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(ux);\n", + "print \"Which agrees with the values obtained above\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy of a wet steam mixture at 120 psia is 1.37 Btu/lbm*R\n", + "Enthalpy of a wet steam mixture at 120 psia is 1015.47 Btu/lbm\n", + "Internal energy of a wet steam mixture at 120 psia is 949.07 Btu/lbm\n", + "Specific Volume of a wet steam mixture at 120 psia is 2.99 ft**3/lbm\n", + "As a check\n", + "Internal energy of a wet steam mixture at 120 psia is 949.11 Btu/lbm\n", + "Which agrees with the values obtained above\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Using Table 2 ans a quality of 85%(x = 0.85),we have\n", + "#at 1.0 MPa\n", + "x = 0.85;\n", + "sf = 2.1387; \t\t\t#saturated liquid entropy \t\t\t#Unit:kJ/kg*K\n", + "sfg = 4.4487; \t\t\t#Evap. Entropy \t\t\t#Unit:kJ/kg*K \n", + "hf = 762.81; \t\t\t#saturated liquid enthalpy \t\t\t#Unit:kJ/kg\n", + "hfg = 2015.3; \t\t\t#Evap. Enthalpy \t\t\t#Unit:kJ/kg\n", + "uf = 761.68; \t\t\t#saturated liquid internal energy \t\t\t#Unit:kJ/kg\n", + "ufg = 1822.0; \t\t\t#Unit:kJ/kg \t\t\t#Evap. internal energy\n", + "vf = 1.1273; \t\t\t#Saturated liquid specific volume \t\t\t#Unit:m**3/kg \n", + "vfg = (194.44-1.1273); \t\t\t#evap. specific volume \t\t\t#Unit:m**3/kg \n", + "sx = sf+(x*sfg); \t\t\t#entropy \t\t\t#kJ/kg*K\n", + "print \"Entropy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg*K\"%(sx);\n", + "hx = hf+(x*hfg); \t\t\t#enthalpy \t\t\t#kJ/kg*K\n", + "print \"Enthalpy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg\"%(hx);\n", + "ux = uf+(x*ufg); \t\t\t#internal energy \t\t\t#kJ/kg*K\n", + "print \"Internal energy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg\"%(ux);\n", + "vx = (vf+(x*vfg))*(0.001); \t\t\t#specific volume \t\t\t#m**3/kg\n", + "print \"Specific Volume of a wet steam mixture at 1.0 MPa is %.2f m**3/kg\"%(vx);\n", + "#As a check,\n", + "px = 10**6; \t\t\t#psia \t\t\t#pressure\n", + "ux = hx-((px*vx)/10**3); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#internal energy\n", + "print \"As a check%\"\n", + "print \"Internal energy of a wet steam mixture at 120 psia is %.2f kJ/kg\"%(ux);\n", + "print \"Which agrees with the values obtained above\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy of a wet steam mixture at 1.0 MPa is 5.92 kJ/kg*K\n", + "Enthalpy of a wet steam mixture at 1.0 MPa is 2475.81 kJ/kg\n", + "Internal energy of a wet steam mixture at 1.0 MPa is 2310.38 kJ/kg\n", + "Specific Volume of a wet steam mixture at 1.0 MPa is 0.17 m**3/kg\n", + "As a check%\n", + "Internal energy of a wet steam mixture at 120 psia is 2310.37 kJ/kg\n", + "Which agrees with the values obtained above\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For the wet mixture,hx = hf+(x*hfg),solving for x gives us\n", + "#Using table 1,we have,\n", + "hx = 900; \t\t\t#Btu/lbm \t\t\t#Enthalpy of wet mixture at 90F\n", + "hf = 58.07; \t\t\t#Btu/lbm \t\t\t#saturated liquid enthalpy\n", + "hfg = 1042.7; \t\t\t#Btu/lbm \t\t\t#Evap. Enthalpy\n", + "\n", + "# Calculations\n", + "x = (hx-hf)/hfg; \t\t\t#quality\n", + "\n", + "# Results\n", + "print \"The quality is %.2f percentage of a wet steam at 90F\"%(x*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quality is 80.75 percentage of a wet steam at 90F\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For the wet mixture,hx = hf+(x*hfg),solving for x gives us\n", + "#Using table 1,we have,\n", + "hx = 2000; \t\t\t#kJ/kg \t\t\t#Enthalpy of wet mixture at 30 C\n", + "hf = 125.79; \t\t\t#kJ/kg \t\t\t#saturated liquid enthalpy\n", + "hfg = 2430.5; \t\t\t# \t\t\t#Evap. Enthalpy \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "x = (hx-hf)/hfg; \t\t\t#quality\n", + "\n", + "# Results\n", + "print \"The quality is %.2f percentage of a wet steam at 30 C\"%(x*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quality is 77.11 percentage of a wet steam at 30 C\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The values of temperature and pressure are listed in Table 3(Figure 5.10) and can be read directly.\n", + "print \"Specific volume of superheated steam at 330 psia and 450F is v = 1.4691 ft**3/lbm\";\n", + "print \"Internal Energy of superheated steam at 330 psia and 450F is u = 1131.8 Btu/lbm\";\n", + "print \"Enthalpy of superheated steam at 330 psia and 450F is h = 1221.5 Btu/lbm\";\n", + "print \"Entropy of superheated steam at 330 psia and 450F is s = 1.5219 Btu/lbm*R\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume of superheated steam at 330 psia and 450F is v = 1.4691 ft**3/lbm\n", + "Internal Energy of superheated steam at 330 psia and 450F is u = 1131.8 Btu/lbm\n", + "Enthalpy of superheated steam at 330 psia and 450F is h = 1221.5 Btu/lbm\n", + "Entropy of superheated steam at 330 psia and 450F is s = 1.5219 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The values of temperature and pressure are listed in Table 3(Figure 5.10) and can be read directly.\n", + "print \"Specific volume of superheated steam at 2.0 MPa and 240 C is v = 0.10845 m**3/lbm\";\n", + "print \"Internal Energy of superheated steam at 2.0 MPa and 240 C is u = 2659.6 kJ/kg\";\n", + "print \"Enthalpy of superheated steam at 2.0 MPa and 240 C is h = 2876.5 kJ/kg\";\n", + "print \"Entropy of superheated steam at 2.0 MPa and 240 C is s = 6.4952 kJ/kg*K\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume of superheated steam at 2.0 MPa and 240 C is v = 0.10845 m**3/lbm\n", + "Internal Energy of superheated steam at 2.0 MPa and 240 C is u = 2659.6 kJ/kg\n", + "Enthalpy of superheated steam at 2.0 MPa and 240 C is h = 2876.5 kJ/kg\n", + "Entropy of superheated steam at 2.0 MPa and 240 C is s = 6.4952 kJ/kg*K\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The necessary interpolations(between 450F and 460F at 330 psia) are best done in tabular forms as shown:\n", + "# t v\n", + "# 460 1.4945 \n", + "# 455 1.4818 \n", + "# 450 1.4691\n", + "v = 1.4691+(1./2)*(1.4945-1.4691); \t\t\t#ft**3/lbm \t\t\t#specific volume\n", + "print \"The specific volume of saturated steam at 330 psia & 455F is %.2f ft**3/lbm\"%(v);\n", + "\n", + "# t u\n", + "# 460 1137.0 \n", + "# 455 1134.4 \n", + "# 450 1131.8 \n", + "u = 1131.8+(1./2)*(1137.0-1131.8); \t\t\t#Btu/lbm \t\t\t#internal energy\n", + "print \"The internal energy of saturated steam at 330 psia & 455F is %.2f Btu/lbm\"%(u);\n", + "\n", + "# t h\n", + "# 460 1228.2 \n", + "# 455 1224.9 \n", + "# 450 1221.5\n", + "h = 1221.5+(1./2)*(1228.2-1221.5); \t\t\t#enthaply \t\t\t#Btu/lbm\n", + "print \"The enthalpy of saturated steam at 330 psia & 455F is %.2f Btu/lbm\"%(h);\n", + "\n", + "# t s\n", + "# 460 1.5293 \n", + "# 455 1.5256 \n", + "# 450 1.5219\n", + "s = 1.5219+(1./2)*(1.5293-1.5219); \t\t\t#entropy \t\t\t#Btu/lbm*R\n", + "print \"The entropy of saturated steam at 330 psia & 455F is %.2f Btu/lbm*R\"%(s);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific volume of saturated steam at 330 psia & 455F is 1.48 ft**3/lbm\n", + "The internal energy of saturated steam at 330 psia & 455F is 1134.40 Btu/lbm\n", + "The enthalpy of saturated steam at 330 psia & 455F is 1224.85 Btu/lbm\n", + "The entropy of saturated steam at 330 psia & 455F is 1.53 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Table3, we first obtain the properties at 337 psia and 460 F and then 337 psia and 470 F.\n", + "#The necessary interpolations are best done in tabular forms as shown:\n", + "#Proceeding with the calculation,at 460 F,\n", + "# p v \t\t\t# p h\n", + "# 340 1.4448 \t\t\t# 340 1226.7\n", + "# 337 1.4595 \t\t\t# 337 1227.2\n", + "# 335 1.4693 \t\t\t# 335 1227.5\n", + "v = 1.4696-(2./5)*(1.4693-1.4448); \n", + "h = 1227.5-(2./5)*(1227.5-1226.7);\n", + "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "\n", + "#And at 470 F,\n", + "# p v \t\t\t# p h\n", + "# 340 1.4693 \t\t\t# 340 1233.4\n", + "# 337 1.4841 \t\t\t# 337 1233.9\n", + "# 335 1.4940 \t\t\t# 335 1234.2\n", + "v = 1.4640-(2./5)*(1.4640-1.4693); \n", + "h = 1234.2-(2./5)*(1234.2-1233.4);\n", + "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "\n", + "#Therefore,at 337 psia and 465 F\n", + "# t v \t\t\t# t h\n", + "# 470 1.4841 \t\t\t# 470 1233.9\n", + "# 465 1.4718 \t\t\t# 465 1230.7\n", + "# 460 1.4595 \t\t\t# 460 1227.5\n", + "v = 1.4595+(1./2)*(1.4841-1.4595); \n", + "h = 1227.5+(1./2)*(1233.9-1227.5);\n", + "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "print \"At 465 F and 337 psia, specific volume = %.2f ft**3/lbm and enthalpy = %.2f Btu/lbm\"%(v,h);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At 465 F and 337 psia, specific volume = 1.47 ft**3/lbm and enthalpy = 1230.70 Btu/lbm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The values of temperature and pressure are listed in Table 4(Figure 5.10) and can be read directly.\n", + "print \"Specific volume of subcooled water at 1000 psia and 300F is v = 0.017379 ft**3/lbm\";\n", + "print \"Internal Energy of subcooled water at 1000 psia and 300F is u = 268.24 Btu/lbm\";\n", + "print \"Enthalpy of subcooled water at 1000 psia and 300F is h = 271.46 Btu/lbm\";\n", + "print \"Entropy of subcooled water at 1000 psia and 300F is s = 0.43552 Btu/lbm*R\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume of subcooled water at 1000 psia and 300F is v = 0.017379 ft**3/lbm\n", + "Internal Energy of subcooled water at 1000 psia and 300F is u = 268.24 Btu/lbm\n", + "Enthalpy of subcooled water at 1000 psia and 300F is h = 271.46 Btu/lbm\n", + "Entropy of subcooled water at 1000 psia and 300F is s = 0.43552 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#It is necessary to ontain the saturation values corresponding to 300 F.This is done by reading Table A.1 in Appendix 3,which gives\n", + "pf = 66.98; \t\t\t#psia \t\t\t#pressure\n", + "vf = 0.017448; \t\t\t#ft**3/lbm \t\t\t#specific volume\n", + "hf = 269.73; \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "#Now,\n", + "p = 1000; \t\t\t#psia \t\t\t#pressure\n", + "J = 778; \t\t\t#Conversion factor \t\t\t#ft*lbf/Btu\n", + "#From eq.5.5,\n", + "h = hf+((p-pf)*vf*144)/J; \t\t\t#1ft**2 = 144 in**2 \t\t\t#The enthalpy of subcooled water \t\t\t#Btu/lbm\n", + "print \"The enthalpy of subcooled water is %.2f Btu/lbm\"%(h);\n", + "#The difference between this value and the value found in problem 5.15,expressed as a percentage is\n", + "percentoferror = (h-271.46)/271.46;\n", + "print \"Percent of error is %.2f\"%(percentoferror*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of subcooled water is 272.74 Btu/lbm\n", + "Percent of error is 0.47\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#On a chart in Appendix 3,it is necessary to estimate the 90 F point on the saturation line.From the chart or the table in the upper left of the chart,we note that 90 F is between 1.4 and 1.5 in. of mercury.Estimating the intersection of this value with the saturation curve yields\n", + "print \"Enthalpy of saturated steam hg = 1100 Btu/lbm\";\n", + "#This is a good agreement with results of problem 5.1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy of saturated steam hg = 1100 Btu/lbm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 Page No : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The Mollier chart has lines of constant moisture in the wet region which correspond to (1-x).Therefore,we read at 20% moisture(80% Quality) and 120 psia,\n", + "print \"The enthalpy of a wet steam mixture at 120 psia having quality 80 percent is 1015 Btu/lbm\";\n", + "#Which also agrees well with the calculated value in problem 5.7\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of a wet steam mixture at 120 psia having quality 80 percent is 1015 Btu/lbm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27 Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Entering the Mollier chart at 900 Btu/lbm and estimating 90 F(near the 1.5-in. Hg dashed line) yields a constant moisture percent of 19.2%.\n", + "print \"The quality is %.2f percent\"%((1-0.192)*100);\n", + "#We show good agreement with the calculated value.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quality is 80.80 percent\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the chart,\n", + "print \"The enthalpy of steam at 330 psia is h = 1220 Btu/lbm\";\n", + "#Compared to 1221.5 Btu/lbm found in problem 5.11\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of steam at 330 psia is h = 1220 Btu/lbm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We note that the steam is superheated.From the Mollier chart in SI units,\n", + "print \"The enthalpy h = 2876.5 kJ/kg and entropy s = 6.4952 kJ/kg*K\";\n", + "#Values are matched with problem 5.12\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy h = 2876.5 kJ/kg and entropy s = 6.4952 kJ/kg*K\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Because neither pressure nor temperature is shown directly,it is necessary to estimate to obtain the desired value.\n", + "print \"The enthalpy of steam is h = 1231 Btu/lbm\";\n", + "#In problem 5.14,h = 1230.7 Btu/lbm,Which is matched here.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of steam is h = 1231 Btu/lbm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Reading the chart at 30 C and saturation gives us,\n", + "print \"The enthalpy of saturated steam is hg = 2556 kJ/kg\";\n", + "#Which matches with value of problem 5.2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of saturated steam is hg = 2556 kJ/kg\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Reading the chart in wet region at 1.0 MPa and x = 0.85(moisture of 15%) gives us\n", + "print \"hx = 2476 kJ/kg and sx = 5.92 kJ/kg*K\";\n", + "#The chart does not give ux or vx directly" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hx = 2476 kJ/kg and sx = 5.92 kJ/kg*K\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Locate 30 C on the saturation line.Now follow a line of constant pressure,which is also a line of constant temperature in wet region,until an enthalpy of 2000kJ/kg is reached.\n", + "print \"The moisture content is 23 percent or x = 77 percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moisture content is 23 percent or x = 77 percent\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.34 Page No : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We enter the chart in the superheat region at 2.0MPa and 240 C to read the enthalpy and entropy.This procedure gives \n", + "print \"Enthalpy h = 2877 kJ/kg and entropy s = 6.495 kJ/kg*K\";\n", + "#The other properties cant be obtained directly from the chart\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy h = 2877 kJ/kg and entropy s = 6.495 kJ/kg*K\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35 Page No : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#As already noted,h1 = h2 for this process.On the Mollier chart,h2 is found to be 1170 Btu/lbm at 14.7 psia and 250 F.Proceeding to the left on the chart,the constant-enthalpy value of 1170 Btu/lbm to 150 psia yields a moisture of 3% or a quality of 97%.\n", + "#If we use the tables to obtain the solution to this problem,we would first obtain h2 from the superheated vapor tables as 1168.8 Btu/lbm.Because hx = hf+(x*hfg),we obtain x as\n", + "hx = 1168.8; \t\t\t#Btu/lbm \n", + "hf = 330.75; \t\t\t#Btu/lbm \t\t\t#values of 150 psia\n", + "hfg = 864.2; \t\t\t#Btulbm \t\t\t#values of 150 psia\n", + "x = (hx-hf)/hfg; \t\t\t#Quality\n", + "print \"Moisture in the steam flowing in the pipe is %.2f percent\"%((1-x)*100);\n", + "print \"or quality of the steam is %.2f percent\"%(x*100);\n", + "#very often,it is necessary to perform multiple interpolations if the tables are used,and the Mollier chart yields results within the rquired accuracy for most engineering problems and saves considerable time.\n", + "#We can also use the computerised programs to solve this program.We first enter the 250F and 14.7 psia to obtain h of 1168.7 Btu/lbm.We then continue by entering h of 1168.7 Btu/lbm and p of 150 psia.The printout gives us x of 0.9699 or 97%.While the computer solution is quick and easy to use,you should still sketch out the problem on an h-s or T-s diagram to show the path of the process.\n", + "\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 250.00 degF\n", + "# P = 29.814 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.01700 13.830\n", + "# h(Btu/lbm) 218.62 1164.1\n", + "# s(Btu/lbm*F) 0.3678 1.7001\n", + "# u(Btu/lbm) 218.52 1087.8\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 250.00 degF\n", + "# P = 14.700 psia\n", + "# v = 28.417 ft**3/lbm\n", + "# h = 1168.7 Btu/lbm\n", + "# s = 1.7831 Btu/lbm*F\n", + "# u = 1091.4 Btu/lbm\n", + "\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 340.06 degF\n", + "# P = 118.00 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.01787 3.7891\n", + "# h(Btu/lbm) 311.39 1190.7\n", + "# s(Btu/lbm*F) 0.4904 1.5899\n", + "# u(Btu/lbm) 311.00 1108.0\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 358.49 degF\n", + "# P = 150.00 psia\n", + "# v = 2.9248 ft**3/lbm\n", + "# h = 1168.7 Btu/lbm\n", + "# s = 1.5384 Btu/lbm*F\n", + "# u = 1087.5 Btu/lbm\n", + "# x = 0.9699\n", + "\n", + "#Region:Saturated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Moisture in the steam flowing in the pipe is 3.03 percent\n", + "or quality of the steam is 96.97 percent\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Because the math.tank volume is 10 ft**3,the final specific volume of the steam is 10 ft**3/lbm.Interpolations in Table A.2 yield a final pressure of 42 psia.The heat added is simply difference in internal energy between the two states.\n", + "u2 = 1093.0; \t\t\t#internal energy \t\t\t#Btu/lbm\n", + "u1 = 117.95; \t\t\t#internal energy \t\t\t#Btu/lbm\n", + "\n", + "# Calculations\n", + "q = u2-u1; \t\t\t#heat added \t\t\t#Btu/lbm\n", + "\n", + "# Results\n", + "print \"The final pressure is 42 psia and the heat added is %.2f Btu/lbm\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final pressure is 42 psia and the heat added is 975.05 Btu/lbm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37 Page No : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The mass in the math.tank is constant,and the heat added will be the change in internal energy of the contents of the math.tank between the two states.The initial mass in the math.tank is found as follows:\n", + "Vf = 45; \t\t\t#volume of water \t\t\t#ft**2\n", + "vf = 0.016715;\n", + "Vg = 15; \t\t\t#Volume of steam \t\t\t#ft**2\n", + "vg = 26.80;\n", + "mf = Vf/vf; \t\t\t#lbm\n", + "mg = Vg/vg; \t\t\t#lbm\n", + "total = mf+mg; \t\t\t#total mass\n", + "#The internal energy is the sum of the internal energy of the liquid plus vapor:\n", + "ug = 1077.6;\n", + "uf = 180.1;\n", + "Ug = mg*ug; \t\t\t#Btu\n", + "Uf = mf*uf; \t\t\t#Btu\n", + "Total = Ug+Uf; \t\t\t#total internal energy\n", + "print \"The total internal energy is %.2f Btu\"%(Total);\n", + "#Because the mass in the math.tank is constant,the final specific volume must equal the initial specific volume,or\n", + "vx = (Vf+Vg)/(mf+mg); \t\t\t#ft**3/lbm\n", + "#But vx = vf+(x*vfg).Therefore Using table A.2 at 800 psia,\n", + "vx = 0.022282;\n", + "vf = 0.02087;\n", + "vfg = 0.5691-0.02087;\n", + "x = (vx-vf)/vfg;\n", + "print \"The final amount of vapor is %.2f lbm\"%(x*total); \t\t\t#x*total mass \n", + "mg = x*total;\n", + "print \"The final amount of liquid is %.2f lbm\"%(total-x*total); \t\t\t#total mass minus final amount of vapor \n", + "mf = total-(x*total);\n", + "#The final internal energy is found as before:\n", + "ug = 1115.0;\n", + "uf = 506.6;\n", + "Ug = mg*ug; \t\t\t#Btu\n", + "Uf = mf*uf; \t\t\t#Btu\n", + "Total1 = Ug+Uf;\n", + "difference = Total1-Total; \t\t\t#final internal energy-initial internal energy\n", + "#per unit mass heat added is,\n", + "print \"The heat added per unit is %.2f Btu/lbm\"%(difference/total); \t\t\t#the difference of internal energy/total mass\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total internal energy is 485467.03 Btu\n", + "The final amount of vapor is 6.94 lbm\n", + "The final amount of liquid is 2685.82 lbm\n", + "The heat added per unit is 327.88 Btu/lbm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.38 Page No : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#As shown in Fig. 5.21b,the process dscribed in this problem is a vertical line on the Mollier Chart.For 800 psia and 600F,the Mollier chart yeilds h1 = 1270 Btu/lbm and s1 = 1.485.Proceeding vertically down the chart at constant s to 200 psia yields a final enthalpy h2 = 1148 Btu/lbm.The change in enthaly Using the process is 1270-1148 = 122 Btu/lbm.\n", + "#We may also solve this problem Using the steam tables in Appendix 3.Thus,the enthalpy at 800 psia and 600 F is 1270.4 Btu/lbm,and its entropy is 1.4861 Btu/lbm*R.\n", + "#Because the process is isentropic,the final entropy at 200psia must be 1.4861.From the saaturation table,the entropy of saturated steam at 200 psia is 1.5464,which indicates the final steam condition must be wet because the entropy of the final steam is less than the entropy of saturation.Using the wet steam relation yields,\n", + "#sx = sf+(x*sfg)\n", + "h1 = 1270.4; \n", + "sx = 1.4861; \n", + "sf = 0.5440; \n", + "sfg = 1.0025 ;\n", + "hf = 355.6; \n", + "hfg = 843.7;\n", + "\n", + "# Calculations\n", + "x = (sx-sf)/sfg; \t\t\t#Quality\n", + "#Therefore,the final enthalpy is\n", + "hx = hf+(x*hfg); \t\t\t#Btu/lbm\n", + "\n", + "# Results\n", + "print \"The final enthalpy is %.2f Btu/lbm\"%(hx);\n", + "print \"The change in enthalpy is %.2f Btu/lbm\"%(h1-hx); \t\t\t#Note the agreement with the Mollier chart solution\n", + "#we can also use the computer program to solve this problem.For 600F and 800 psia, h = 1270. Btu/lbm and s = 1.4857 Btu/lbm*R.Now Using p = 200 psia and s = 1.4857,we obtain\n", + "#h = 1148.1 Btu/lbm.The change in enthalpy is 1270.0-1148.1 = 121.9 Btu/lbm.Note the effort saved Using either the Mollier chart or the computer program. \n", + "\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 600.00 degF\n", + "# P = 1541.7 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.02362 0.2675\n", + "# h(Btu/lbm) 616.59 1166.2\n", + "# s(Btu/lbm*F) 0.8129 1.3316\n", + "# u(Btu/lbm) 609.85 1089.9\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 600.00 degF\n", + "# P = 800.00 psia\n", + "# v = 0. ft**3/lbm\n", + "# h = 1168.7 Btu/lbm\n", + "# s = 1.5384 Btu/lbm*F\n", + "# u = 1087.5 Btu/lbm\n", + "#Region:Superheated\n", + "\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 381.87 degF\n", + "# P = 200.00 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.01839 2.2883\n", + "# h(Btu/lbm) 355.60 1199.0\n", + "# s(Btu/lbm*F) 0.5440 1.5462\n", + "# u(Btu/lbm) 354.92 1114.3\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 381.87 degF\n", + "# P = 200.00 psia\n", + "# v = 2.1512 ft**3/lbm\n", + "# h = 1148.1 Btu/lbm\n", + "# s = 1.4857 Btu/lbm*F\n", + "# u = 1068.5 Btu/lbm\n", + "# x = 0.9396\n", + "\n", + "#Region:Saturated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final enthalpy is 1148.47 Btu/lbm\n", + "The change in enthalpy is 121.93 Btu/lbm\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.39 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#As refering to figure 5.21,it will be seen that the final temperature and enthalpy will both be higher than for the isentropic case.\n", + "#80% of the isentropic enthalpy difference\n", + "deltah = 0.8*122; \t\t\t#change in enthalpy \t\t\t#Btu/lbm\n", + "h1 = 1270; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n", + "h2 = h1-deltah; \t\t\t#the final enthalpy \t\t\t#Btu/lbm\n", + "print \"The final enthalpy is %.2f Btu/lbm\"%(h2);\n", + "print \"and the final pressure is 200 psia\";\n", + "print \"The Mollier chart indicates the final state to be in the wet region\"\n", + "print \"with 3.1percent moisture content and an entropy of 1.514 Btu/lbm*R\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final enthalpy is 1172.40 Btu/lbm\n", + "and the final pressure is 200 psia\n", + "The Mollier chart indicates the final state to be in the wet region\n", + "with 3.1percent moisture content and an entropy of 1.514 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Using the Mollier chart,\n", + "h1 = 2942; \t\t\t#kJ/kg \t\t\t#initial enthalpy\n", + "#Proceeding as shown in figure 5.21b,that is,vertically at constant entropy to a pressure of 0.1 MPa,gives us\n", + "h2 = 2512; \t\t\t#kJ/kg \t\t\t#final enthalpy\n", + "\n", + "# Results\n", + "print \"Neglecting kinetic & potential energy, The change in enthalpy of the steam is %.2f kJ/kg\"%(h1-h2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Neglecting kinetic & potential energy, The change in enthalpy of the steam is 430.00 kJ/kg\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.41 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#From the conditions given in problem 5.38,the isentropic change in enthalpy is 122 Btu/lbm\n", + "#So,\n", + "h1minush2 = 122; \t\t\t#Btu/lbm \t\t\t#change in enthalpy\n", + "J = 778; \t\t\t#Conversion factor\n", + "gc = 32.17; \t\t\t#lbm*ft/lbf*s**2 \t\t\t#constant of proportionality\n", + "\n", + "# Calculations\n", + "V2 = math.sqrt(2*gc*J*(h1minush2)); \t\t\t#final velocity \t\t\t#ft/s\n", + "\n", + "# Results\n", + "print \"As the steam leaves the nozzle, The final velocity is %.2f ft/s\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "As the steam leaves the nozzle, The final velocity is 2471.21 ft/s\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.42 Page No : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Because the process is irreversible,we cannot show it on the Mollier diagram.However,the analysis of problem 3.22 for the nozzle is still valid,and all that is needed is the enthalpy at the beginning and the end of the expansion.From the problem 5.38,\n", + "h1 = 1270; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n", + "#For h2 we locate the state point on the Mollier diagram as being saturated vapor at 200 psia.This gives us\n", + "h2 = 1199; \t\t\t#Btu/lbm \t\t\t#final enthalpy\n", + "J = 778; \t\t\t#Conversion factor\n", + "gc = 32.17; \t\t\t#lbm*ft/lbf*s**2 \t\t\t#constant of proportionality\n", + "V2 = math.sqrt(2*gc*J*(h1-h2)); \t\t\t#final velocity \t\t\t#Ft/s\n", + "print \"As the steam leaves the nozzle, The final velocity is %.2f ft/s\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "As the steam leaves the nozzle, The final velocity is 1885.21 ft/s\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.43 Page No : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the saturation table,500 psia corresponds to a temperature of 467.13F,and the saturated vapor has an enthalpy of 1205.3 Btu/lbm.At 500 psia and 800 F,the saturated vapor has an enthalpy of 1412.1 Btu/lbm.Because this process is a steady-flow process at constant pressure,the energy equation becomes q = h2-h1,assuming that differences in the kinetic energy and potential energy terms are negligible.Therefore,\n", + "h2 = 1412.1; \t\t\t#Btu/lbm \t\t\t#final enthalpy\n", + "h1 = 1205.3; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n", + "\n", + "# Calculations\n", + "q = h2-h1; \t\t\t#heat added \t\t\t#Btu/lbm\n", + "\n", + "# Results\n", + "print \"%.2f Btu/lbm heat per pound of steam was added\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "206.80 Btu/lbm heat per pound of steam was added\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.44 Page No : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the saturation table at 1 psia,\n", + "hf = 69.74; \t\t\t#Btu/lbm \t\t\t#saturated liquid enthalpy\n", + "hfg = 1036.0; \t\t\t#Btu/lbm \t\t\t#Evap. Enthalpy\n", + "hg = 1105.8; \t\t\t#Btu/lbm \t\t\t#The enthalpy of saturated steam\n", + "x = 0.97; \t\t\t#Quality\n", + "\n", + "# Calculations and Results\n", + "#Because the condensation process is carried out at constant pressure,the energy equation is q = deltah.\n", + "hx = hf+(x*hfg); \t\t\t#the initial enthalpy \t\t\t#Btu/lbm\n", + "print \"The initial enthalpy is %.2f Btu/lbm\"%(hx);\n", + "#The final enthalpy is hf = 69.74.So,\n", + "deltah = hx-hf; \t\t\t#The enthalpy difference \t\t\t#Btu/lbm\n", + "print \"At 1 psia, The enthalpy difference is %.2f Btu/lbm\"%(deltah);\n", + "print \"By the computer solution,the enthalpy difference is 1004.6 Btu/lbm\";\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 101.71 degF\n", + "# P = 1.0000 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.01614 333.55\n", + "# h(Btu/lbm) 69.725 1105.4\n", + "# s(Btu/lbm*F) 0.1326 1.9774\n", + "# u(Btu/lbm) 69.722 1043.6\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 101.71 degF\n", + "# P = 1.0000 psia\n", + "# v = 323.55 ft**3/lbm\n", + "# h = 1074.3 Btu/lbm\n", + "# s = 1.9221 Btu/lbm*F\n", + "# u = 1014.4 Btu/lbm\n", + "# x = 0.9700\n", + "\n", + "#Region:Saturated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial enthalpy is 1074.66 Btu/lbm\n", + "At 1 psia, The enthalpy difference is 1004.92 Btu/lbm\n", + "By the computer solution,the enthalpy difference is 1004.6 Btu/lbm\n" + ] + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb index ea95c467..ea95c467 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_2.ipynb new file mode 100755 index 00000000..ea95c467 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_2.ipynb @@ -0,0 +1,1796 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e0fac09bbeb2cd0ce192e8aaee02b91055f447d7bbfe0689b860ffad5cfd7b06" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : The Ideal Gas" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "P1 = 100.; \t\t\t#Pressure at volume V1 = 100 ft**3 \t\t\t#Unit:psia\n", + "V1 = 100.; \t\t\t#Unit:ft**3 \t\t\t#V1 = Volume at 100 psia\n", + "P2 = 30. \t\t\t# Reduced Pressure \t\t\t#Unit:psia\n", + "\n", + "# Calculations\n", + "#Boyle's law,P1*V1 = P2*V2\n", + "V2 = (P1*V1)/P2; \t\t\t#Volume occupied by the gas \t\t\t#ft**3\n", + "\n", + "# Results\n", + "print \"Volume occupied by the gas = %.2f ft**3\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume occupied by the gas = 333.33 ft**3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "P1 = 10.**6; \t\t\t#Pressure at volume V1 = 2 m**3 \t\t\t#Unit:Pa\n", + "V1 = 2.; \t\t\t#Unit:m**3 \t\t\t#V1 = Volume at 10**6 Pa\n", + "P2 = 8.*10**6 \t\t\t# Increased Pressure \t\t\t#Unit:Pa\n", + "\n", + "# Calculations\n", + "#Boyle's law,P1*V1 = P2*V2\n", + "V2 = (P1*V1)/P2; \t\t\t#Volume occupied by gas \t\t\t#unit:m**3\n", + "\n", + "# Results\n", + "print \"Volume occupied by gas = %.2f m**3\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume occupied by gas = 0.25 m**3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "T1 = 32.+460; \t\t\t#Temperature at volume V1 = 150 ft**3 \t\t\t#Unit:R\n", + "V1 = 150.; \t\t\t#Unit:ft**3 \t\t\t#V1 = Volume at 32 F\n", + "T2 = 100.+460 \t\t\t# Increased Temperature \t\t\t#Unit:R\n", + "\n", + "# Calculations\n", + "#Charles's law,V1/V2 = T1/T2\n", + "V2 = (T2*V1)/T1; \t\t\t#Volume occupied by gas \t\t\t#unit:m**3\n", + "\n", + "# Results\n", + "print \"Volume occupied by gas = %.2f m**3\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume occupied by gas = 170.73 m**3\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#If for this process T2 = 1.25*T1,\n", + "# T2/T1 = 1.25\n", + "#Therefore,\n", + "# p2/p1 = T2/T1 \t\t\t#Charles's law(volume constant)\n", + "#Thus,\n", + "print \"The absolute gas pressure increases by 25 percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute gas pressure increases by 25 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "V1 = 4.; \t\t\t#m**3 \t\t\t#initial volume\n", + "T2 = 0.+273; \t\t\t#celsius converted to kelvin \t\t\t#gas is cooled to 0 C \t\t\t#final temperature\n", + "T1 = 100+273; \t\t\t#celsius converted to kelvin \t\t\t#initial temperature\n", + "\n", + "# Calculations\n", + "V2 = V1*(T2/T1); \t\t\t#final volume \t\t\t#Charles's law(pressure constant) \t\t\t#unit:m**3\n", + "\n", + "# Results\n", + "print \"The final volume is %.2f m**3\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final volume is 2.93 m**3\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Let us first put each of the given variables into a consistent set of units:\n", + "p = (200+14.7)*(144); \t\t\t#Unit:psfa*(lbf/ft**2) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#pressure\n", + "T = (460.+73); \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "V = 120./1728; \t\t\t#1 ft**3 = 1728 in**3 \t\t\t#total volume \t\t\t#unit:ft**3\n", + "R = 1545./28; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#because the molecular weight of nitrogen is 28 \t\t\t#constant of proportionality\n", + "#Applying, p*v = R*T, \t\t\t#ideal gas law\n", + "v = (R*T)/p; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume\n", + "print \"The specific volume is %.2f ft**3/lbm\"%(v);\n", + "#The mass of gas is the total volume divided by the specific volume\n", + "print \"The gas in the container is %.2f lbm\"%(V/v);\n", + "#The same result is obtained by direct use of eq. p*V = m*R*T\n", + "m = (p*V)/(R*T); \t\t\t#The gas in the container \t\t\t#unit:lbm \t\t\t#ideal gas law\n", + "print \"The gas in the container is %.2f lbm\"%(m); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific volume is 0.95 ft**3/lbm\n", + "The gas in the container is 0.07 lbm\n", + "The gas in the container is 0.07 lbm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Applying , (p1*V1)/T1 = (p2*V2)/T2\n", + "#and p2 = p1*(T2/T1) because V1 = V2\n", + "p1 = 200+14.7; \t\t\t#Unit:psia \t\t\t#initial pressure\n", + "T2 = 460.+200; \t\t\t#final temperature is 200 F \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "T1 = 460+73; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "\n", + "# Calculations\n", + "p2 = p1*(T2/T1); \t\t\t#final pressure \t\t\t#Unit:psia \t\t\t#Charles's law(volume constant)\n", + "\n", + "# Results\n", + "print \"The final pressure is %.2f psia\"%(p2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final pressure is 265.86 psia\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For CO2,\n", + "R = 8.314/44; \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality \t\t\t#Molecular weight of CO2 = 44\n", + "p = 500; \t\t\t#Unit:kPa \t\t\t#pressure\n", + "V = 0.5; \t\t\t#Unit:m**3 \t\t\t#volume\n", + "T = (100.+273); \t\t\t#Unit:K \t\t\t#Celsius converted to kelvin\n", + "\n", + "# Calculations\n", + "#Applying p*V = m*R*T ,\n", + "m = (p*V)/(R*T); \t\t\t#mass \t\t\t#kg \t\t\t#ideal gas law\n", + "\n", + "# Results\n", + "print \"The mass of gas in the math.tank is %.2f kg\"%(m);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of gas in the math.tank is 3.55 kg\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "T2 = 500+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 80+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "#The equation cpbar = 0.338-(1.24*10**2/T)+(4.15*10**4)/T**2 has a form , cbar = Adash+(Bdash/T)+(Ddash/T**2)\n", + "#So,\n", + "Adash = 0.338; \t\t\t#constant\n", + "Bdash = -1.24*10**2; \t\t\t#constant\n", + "Ddash = 4.15*10**4; \t\t\t#constant\n", + "\n", + "# Calculations\n", + "#Therefore,from equation,cbar = Adash+((Bdash*math.log(T2/T1))/(T2-T1))+(Ddash/(T2*T1))\n", + "cpbar = Adash+((Bdash*math.log(T2/T1))/(T2-T1))+(Ddash/(T2*T1)); \t\t\t#The mean specific heat \t\t\t#Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"The mean specific heat at constant pressure between 80F and 500F is %.2f Btu/lbm*R\"%(cpbar);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean specific heat at constant pressure between 80F and 500F is 0.42 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The table in Appendix 3 does not give us the enthalpy data at 960R and 540R that we need.Interpolating yields\n", + "# T hbar T hbar\n", + "# 537 3729.5 900 6268.1\n", + "# 540 3750.4 960 6694.0\n", + "# 600 4167.9 1000 6977.9\n", + "#So,\n", + "hbar540 = 3729.5+(3./63)*(4167.9-3729.5); \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n", + "hbar960 = 6268.1+(60./100)*(6977.9-6268.1); \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n", + "#Note that hbar is given for a mass of 1 lb mole.To obtain the enthalpy per pound,it is necessary to divide the values og h by the molecular weight,28.\n", + "h2 = 6694.0; \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n", + "h1 = 3750.4; \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n", + "T2 = 500.+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 80.+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "\n", + "# Calculations\n", + "cbar = (h2-h1)/(28*(T2-T1)); \t\t\t#The mean specific heat at constant pressure \t\t\t#unit:Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"The mean specific heat at constant pressure is %.2f Btu/lbm*R\"%(cbar);\n", + "#With the more extesive Gas tables,these interpolations are avoided.The Gas Tables provide a relatively easy and accurate method of obtaining average specific heats.Also,these tables have been computerized for ease of application.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean specific heat at constant pressure is 0.25 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No : 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "T2 = 500+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 80+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "#cp = 0.219 + (3.42*10**-5*T) - (2.93*10**-9*T**2); \t\t\t#Unit:Btu/lbm*R\n", + "#Comparing with c = A+(B*T)+(D*T**2) \n", + "A = 0.219; \t\t\t#constant\n", + "B = 3.42*10**-5; \t\t\t#constant\n", + "D = 2.93*10**-9; \t\t\t#constant\n", + "\n", + "# Calculations\n", + "#Using these values and equation cbar = A+((B/2)(T2+T1))+((D/3)*(T2**2+(T2*T1)+T1**2))\n", + "cpbar = A+((B/2)*(T2+T1))+((D/3)*(T2**2+(T2*T1)+T1**2)); \t\t\t#The mean specific heat \t\t\t#Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"The mean specific heat at constant pressure for air between 80F and 500F is %.2f Btu/lbm*R\"%(cpbar);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean specific heat at constant pressure for air between 80F and 500F is 0.25 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The molecular weight of oxygen is 32.Therefore,\n", + "R = 1545./32; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "J = 778.; \t\t\t#conversion factor\n", + "cp = 0.24; \t\t\t#Unit:Btu/lbm*R \t\t\t#specific heat at constant pressure\n", + "\n", + "# Calculations\n", + "#cp-cv = R/J\n", + "cv = cp-(R/J); \t\t\t#specific heat at constant volume \t\t\t#unit:Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific heat at constant volume is 0.18 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From equation,cv = R/(k-1) ,\n", + "R = 8.314/32; \t\t\t#constant of proportionality \t\t\t#kJ/kg*K \t\t\t#The molecular weight of oxygen is 32\n", + "k = 1.4 \t\t\t#for oxygen \t\t\t#given \t\t\t#k = cp/cv\n", + "cv = R/(k-1); \t\t\t#Specific heat at constant volume \t\t\t#unit:kJ/kg*K\n", + "print \"Specific heat at constant volume is %.2f kJ/kg*K\"%(cv);\n", + "cp = k*cv; \t\t\t#specific heat at constant pressure \t\t\t#Unit:kJ/kg*K\n", + "print \"Specific heat at constant pressure is %.2f kJ/kg*K\"%(cp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific heat at constant volume is 0.65 kJ/kg*K\n", + "Specific heat at constant pressure is 0.91 kJ/kg*K\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "R = 60.; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "deltah = 500.; \t\t\t#Btu/lbm \t\t\t#change in enthalpy\n", + "deltau = 350.; \t\t\t#Btu/lbm \t\t\t#change in internal energy\n", + "J = 778.; \t\t\t#conversion factor\n", + "#Because deltah-(cp*deltaT) and deltau = cv*deltaT\n", + "# deltah/deltau = (cp*deltaT)/(cv*deltaT) = cp/cv = k\n", + "k = deltah/deltau; \t\t\t#Ratio of specific heats\n", + "print \"Ratio of specific heats k is %.2f\"%(k);\n", + "#From equation cv = R/(J*(k-1))\n", + "cv = R/(J*(k-1)); \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n", + "cp = k*cv; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of specific heats k is 1.43\n", + "Specific heat at constant volume is 0.18 Btu/lbm*R\n", + "Specific heat at constant pressure is 0.26 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page No : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#When solving this type of problem,it is necessary to note carefully the information given and to write the correct energy equation for this process.Because the process is carried out at constant volume,the heat added equals the change in inernal energy.Because the change in internal energy per pound for the ideal gas is cv*(T2-T1),the total change in internal energy for m pounds must equals the heat added.Thus,\n", + "#data given\n", + "Q = 0.33; \t\t\t#heat\n", + "#Initial conditions\n", + "V = 60; \t\t\t#in**3 \t\t\t#volume\n", + "m = 0.0116; \t\t\t#lbs \t\t\t#mass\n", + "p1 = 90; \t\t\t#psia \t\t\t#pressure\n", + "T1 = 460+40; \t\t\t#Fahrenheit temperature converted to absolute temperature\n", + "#Final condition = Initial condition + heat\n", + "V = 60; \t\t\t#in**3 \t\t\t#volume\n", + "m = 0.0116; \t\t\t#lbs \t\t\t#mass\n", + "p2 = 108; \t\t\t#psia \t\t\t#pressure \n", + "T2 = 460+140; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "#Q = m*(u2-u1) = m*cv*(T2-T1)\n", + "\n", + "# Calculations and Results\n", + "cv = Q/(m*(T2-T1)); \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n", + "#To obtain cp,it is first necessary to obtain R.Enough information was given in the initial conditions of the problem to apply eqn. p*V = m*R*T\n", + "R = (144*p1*(V/1728.))/(m*T1); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#1 ft**3 = 1728 in**3 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "print \"Consmath.tant of proportionality R is %.2f ft*lbf/lbm*R\"%(R);\n", + "#cp-cv = (R/J)\n", + "J = 778.; \t\t\t#conversion factor\n", + "cp = cv+(R/J); \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific heat at constant volume is 0.28 Btu/lbm*R\n", + "Consmath.tant of proportionality R is 77.59 ft*lbf/lbm*R\n", + "Specific heat at constant pressure is 0.38 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16 Page No : 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#data\n", + "cp = 0.24; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "p2 = 15.; \t\t\t#psia \t\t\t#final pressure\n", + "p1 = 100.; \t\t\t#psia \t\t\t#initial pressure\n", + "T2 = 460.+0; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 460.+100; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "\n", + "# Calculations\n", + "#On the basis of the data given,\n", + "deltas = (cp*(math.log(T2/T1)))-((R/J)*(math.log(p2/p1))); \t\t\t#change in entropy \t\t\t#Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in enthalpy is 0.08 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#data of problem6.16\n", + "cp = 0.24; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "p2 = 15.; \t\t\t#psia \t\t\t#final pressure\n", + "p1 = 100.; \t\t\t#psia \t\t\t#initial pressure\n", + "T2 = 460.+0; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 460.+100; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "#Because cp and R are given,let us first solve for cv,\n", + "#cp = (R*k)/(J*(k-1))\n", + "k = (cp*J)/((cp*J)-R); \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n", + "print \"Ratio of specific heats k is %.2f\"%(k);\n", + "#k = cp/cv\n", + "cv = cp/k; \t\t\t#Specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n", + "#Now, deltas = (cv*math.log(p2/p1))+(cp*math.log(v2/v1));\n", + "#But, v2/v1 = (T2*p1)/(T1*p2)\n", + "v2byv1 = (T2*p1)/(T1*p2); \t\t\t# v2/v1 \t\t\t#unitless\n", + "deltas = (cv*math.log(p2/p1))+(cp*math.log(v2byv1)); \t\t\t#The change in enthalpy \t\t\t#unit:Btu/lbm*R\n", + "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n", + "#The agreement is very good.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of specific heats k is 1.40\n", + "Specific heat at constant volume is 0.17 Btu/lbm*R\n", + "The change in enthalpy is 0.08 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18 Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#data,\n", + "cp = 0.9093; \t\t\t#Specific heat at constant pressure \t\t\t#kJ/kg*R\n", + "p2 = 150.; \t\t\t#kPa \t\t\t#final pressure\n", + "p1 = 500.; \t\t\t#kPa \t\t\t#initial pressure\n", + "T2 = 273.+0; \t\t\t#final temperature \t\t\t#Celsius converted to kelvin\n", + "T1 = 273.+100; \t\t\t#initial temperature \t\t\t#Celsius converted to kelvin\n", + "#J = 778; \t\t\t#conversion factor\n", + "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "\n", + "# Calculations\n", + "#Using equation, and dropping J gives,\n", + "deltas = (cp*(math.log(T2/T1)))-((R)*(math.log(p2/p1))); \t\t\t#change in entropy \t\t\t#kJ/kg*K\n", + "#For 2 kg,\n", + "deltaS = 2*deltas; \t\t\t#The change in enthalpy in kJ/K\n", + "\n", + "# Results\n", + "print \"For 2 kg oxygen, The change in enthalpy is %.2f kJ/K\"%(deltaS);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 2 kg oxygen, The change in enthalpy is 0.06 kJ/K\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19 Page No : 262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#from the equation, deltas/cv = (k*math.log(v2/v1))+ math.log(p2/p1) \t\t\t#change in entropy\n", + "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n", + "#deltas = (1/4)*cv \t\t\t#so, \n", + "# 1/4 = (k*math.log(v2/v1))+ math.log(p2/p1)\n", + "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#initial specific volume \n", + "v1 = 1.; \t\t\t#final specific volume\n", + "\n", + "# Calculations\n", + "p2byp1 = math.exp((1./4)-(k*math.log(v2/v1))); \t\t\t#increase in pressure\n", + "\n", + "# Results\n", + "print \"p2/p1 = %.2f\"%(p2byp1);\n", + "print \"So, increase in pressure is %.2f \"%(p2byp1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "p2/p1 = 3.39\n", + "So, increase in pressure is 3.39 \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data\n", + "T2 = 460+270; \t\t\t#Fahrenheit temperature converted to absolute final temperature \t\t\t#unit:R\n", + "T1 = 460+70; \t\t\t#Fahrenheit temperature converted to absolute initial temperature \t\t\t#unit:R\n", + "cv = 0.17; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "\n", + "# Calculations\n", + "#Now,\n", + "deltas = cv*math.log(T2/T1); \t\t\t#change in entropy \t\t\t#Unit:Btu/lbm*R\n", + "#For 1/2 lb,\n", + "deltaS = (1./2)*deltas; \t\t\t#The change in enthalpy in Btu/R\n", + "\n", + "# Results\n", + "print \"For 1/2 lb of gas, The change in enthalpy is %.2f Btu/R\"%(deltaS);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 1/2 lb of gas, The change in enthalpy is 0.00 Btu/R\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data\n", + "T2 = 100.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "T1 = 20+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n", + "cv = 0.7186; \t\t\t#specific heat at constant volume \t\t\t#kJ/kg*K\n", + "#Now,\n", + "deltas = cv*math.log(T2/T1); \t\t\t#change in entropy \t\t\t#Unit:kJ/kg*K\n", + "#For 0.2 kg,\n", + "deltaS = (0.2)*deltas; \t\t\t#The change in enthalpy in kJ/K\n", + "print \"For 0.2 kg of air, The change in enthalpy is %.2f kJ/K\"%(deltaS);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 0.2 kg of air, The change in enthalpy is 0.03 kJ/K\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data\n", + "deltas = 0.0743; \t\t\t#change in entropy \t\t\t#Unit:Btu/lbm*R\n", + "T1 = 460+100; \t\t\t#Fahrenheit temperature converted to absolute initial temperature\n", + "cv = 0.219; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "#Now,\n", + "\n", + "# Calculations\n", + "#deltas = cv*math.log(T2/T1); \n", + "T2 = T1*math.exp(deltas/cv); \t\t\t#higher temperature \t\t\t#absolute temperature \t\t\t#unit:R\n", + "\n", + "# Results\n", + "print \"The higher temperature is %.2f R\"%(T2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The higher temperature is 786.20 R\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.23 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data\n", + "deltaS = 0.4386; \t\t\t#change in entropy \t\t\t#Unit:kJ/K\n", + "T2 = 273+425; \t\t\t#Celsius temperature converted to kelvin \t\t\t#initial temperature\n", + "cv = 0.8216; \t\t\t#specific heat at constant volume \t\t\t#kJ/kg*K\n", + "m = 1.5; \t\t\t#mass \t\t\t#kg\n", + "#Now,\n", + "\n", + "# Calculations\n", + "#deltas = m*cv*math.log(T2/T1); \n", + "T1 = T2/(math.exp(deltaS/(m*cv))) \t\t\t#initial temperature \t\t\t#unit:K\n", + "\n", + "# Results\n", + "print \"The initial temperature of the process is %.2f K or %.2f C\"%(T1,T1-273)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial temperature of the process is 488.98 K or 215.98 C\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24 Page No : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T2 = 460.+400; \t\t\t#Fahrenheit temperature converted to absolute final temperature \t\t\t#unit:R\n", + "T1 = 460.+70; \t\t\t#Fahrenheit temperature converted to absolute initial temperature \t\t\t#unit:R\n", + "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "#From the energy equation for the constant-pressure process,the heat transferred is deltah.Therefore,\n", + "#q = deltah = cp*(T2-T1)\n", + "deltah = cp*(T2-T1); \t\t\t#heat transferred \t\t\t#Btu/lb \t\t\t#into system\n", + "print \"The heat transferred is %.2f Btu/lbinto system)\"%(deltah);\n", + "deltas = cp*math.log(T2/T1); \t\t\t#increase in entropy \t\t\t#Btu/lbm*R\n", + "print \"The increase in entropy is %.2f Btu/lbm*R\"%(deltas);\n", + "#The flow work change is (p2*v2)/J - (p1*v1)/J = (R/J)*(T2-T1)\n", + "flowworkchange = (R/J)*(T2-T1); \t\t\t#Btu/lbm \t\t\t#The flow work change per pound of air\n", + "print \"The flow work change per pound of air is %.2f Btu/lbm\"%(flowworkchange);\n", + "#In addition to each of the assumptions made in all the process being considered,it has further been tacitly assumed that these processes are carried out quasi- statically and without friction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat transferred is 79.20 Btu/lbinto system)\n", + "The increase in entropy is 0.12 Btu/lbm*R\n", + "The flow work change per pound of air is 22.60 Btu/lbm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.25 Page No : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T2 = 500.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "T1 = 20+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n", + "cp = 1.0062; \t\t\t#specific heat at constant pressure \t\t\t#kJ/kg*K\n", + "#From the energy equation for the constant-pressure process,the heat transferred is deltah.Therefore,\n", + "#q = deltah = cp*(T2-T1)\n", + "deltah = cp*(T2-T1); \t\t\t#heat transferred \t\t\t#kJ/kg \t\t\t#into system\n", + "print \"The heat transferred is per kimath.logram of air %.2f kJ/kg\"%(deltah);\n", + "deltas = cp*math.log(T2/T1); \t\t\t#increase in entropy \t\t\t#kJ/kg*K\n", + "print \"The increase in entropy per kimath.logram of air is %.2f kJ/kg*K\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat transferred is per kimath.logram of air 482.98 kJ/kg\n", + "The increase in entropy per kimath.logram of air is 0.98 kJ/kg*K\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26 Page No : 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "v2 = 2.; \t\t\t#Because,v2 = (2)*v1 \t\t\t#volume increases to its twice its final volume\n", + "v1 = 1.; \t\t\t#initial volume\n", + "T = 460.+200; \t\t\t#Fahrenheit temperature converted to absolute temperature\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./28; \t\t\t#moleculer weight of nitrogen = 28 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "#From the equation, w/J = q = T*deltas = ((R*T)/J)*math.log(v2/v1)\n", + "q = ((R*T)/J)*math.log(v2/v1); \t\t\t#Btu/lbm \t\t\t#the heat added to system\n", + "#For 0.1 lb,\n", + "Q = 0.1*q; \t\t\t#Btu \t\t\t#the heat added to system\n", + "print \"The heat added to system is %.2f Btu\"%(Q);\n", + "#The work out of the system is equal to the heat added;thus,\n", + "WbyJ = Q; \t\t\t#The work out of the system(out of the system) \t\t\t#unit:Btu\n", + "print \"The work out of the system is %.2f Btuout of the system)\"%(WbyJ);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat added to system is 3.24 Btu\n", + "The work out of the system is 3.24 Btuout of the system)\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.27 Page No : 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T = 50+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature \t\t\t#unit:K\n", + "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#volume increases to its half its final volume\n", + "v1 = 1.;\n", + "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n", + "#From the equation, q = ((R*T))*math.log(v2/v1)\n", + "q = R*T*math.log(v2/v1); \t\t\t#heat added \t\t\t#kJ/kg\n", + "print \"The heat added to system is %.2f kJ/kgheat out of system)\"%(q);\n", + "#The work out of the system is equal to the heat added;thus,\n", + "W = q; \t\t\t#The work out of the system \t\t\t#unit:kJ/kg\n", + "print \"The work out of the system is %.2f kJ/kginto system)\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat added to system is -58.17 kJ/kgheat out of system)\n", + "The work out of the system is -58.17 kJ/kginto system)\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.28 Page No : 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given in problem 6.27\n", + "T = 50+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#volume increases to its half its final volume\n", + "v1 = 1;\n", + "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n", + "#From the equation, q = ((R*T))*math.log(v2/v1)\n", + "q = R*T*math.log(v2/v1); \t\t\t#heat added \t\t\t#kJ/kg\n", + "print \"The heat added to system is %.2f kJ/kgheat out of system)\"%(q);\n", + "#For a constant temperature,\n", + "deltas = q/T; \t\t\t#Change in entropy \t\t\t#unit:kJ/kg*K\n", + "print \"The change in entropy is %.2f kJ/kg*K\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat added to system is -58.17 kJ/kgheat out of system)\n", + "The change in entropy is -0.18 kJ/kg*K\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.29 Page No : 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T1 = 1000; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "p2 = 1.; \t\t\t#unit:atm \t\t\t#absolute final pressure\n", + "p1 = 5.; \t\t\t#unit:atm \t\t\t#absolute initial pressure\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n", + "\n", + "# Calculations and Results\n", + "#From the equation, \n", + "T2 = T1*((p2/p1)**((k-1)/k)); \t\t\t#Unit:R \t\t\t#The absolute final temperature\n", + "print \"The absolute final temperature is %.2f R\"%(T2);\n", + "work = (R*(T2-T1))/(J*(1-k)); \t\t\t#Btu/lbm \t\t\t#The work done by air(out)\n", + "print \"The work done by air is %.2f Btu/lbmout)\"%(work)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute final temperature is 631.39 R\n", + "The work done by air is 63.11 Btu/lbmout)\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.30 Page No : 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#data given\n", + "#mass of 1 kg\n", + "T1 = 500+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "p2 = 1.; \t\t\t#atm \t\t\t#absolute final pressure\n", + "p1 = 5.; \t\t\t#atm \t\t\t#absolute initial pressure\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 8.314/29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n", + "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heat\n", + "#From the equation, \n", + "T2 = T1*((p2/p1)**((k-1)/k)); \t\t\t#Unit:Kelvin \t\t\t#The absolute final temperature\n", + "print \"The absolute final temperature is %.2f K or %.2f C\"%(T2,T2-273);\n", + "work = (R*(T2-T1))/((1-k)); \t\t\t#kJ/kg \t\t\t#The work done by air(out)\n", + "print \"The work done by air is %.2f kJ/kgout)\"%(work)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute final temperature is 488.06 K or 215.06 C\n", + "The work done by air is 204.22 kJ/kgout)\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.31 Page No : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "import math\n", + "\n", + "#data given\n", + "T1 = 800.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n", + "T2 = 500.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "p2 = 1.; \t\t\t#atm \t\t\t#absolute final pressure\n", + "p1 = 5.; \t\t\t#atm \t\t\t#absolute initial pressure\n", + "\n", + "# Calculations\n", + "#A gas expands isentropically\n", + "#From the equation,\n", + "#T2/T1 = ((p2/p1)**((k-1)/k));\n", + "#rearranging,\n", + "k = inv([[1-((math.log(T2/T1)/math.log(p2/p1)))]]); \t\t\t#k = cp/cv \t\t\t#Ratio of specific heats\n", + "\n", + "# Results\n", + "print \"Ratio of specific heats k) is %.2f\"%(k);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of specific heats k) is 1.26\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.32 Page No : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "n = 1.3; \t\t\t#p*v**1.3 = constant\n", + "k = 1.4; \t\t\t#k = cp/cv Ratio of specific heats \n", + "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "T2 = 600.; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 1500.; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "J = 778.; \t\t\t#conversion factor\n", + "cv = cp/k; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "#Therefore,\n", + "cn = cv*((k-n)/(1-n)); \t\t\t#Polytropic specific heat \t\t\t#Btu/lbm*R\n", + "print \"Polytropic specific heatcn, is %.2f Btu/lbm*R\"%(cn);\n", + "#The negative sign of cn indicates that either the heat transfer for the process comes from the system or there is a negative temperature change while heat is transferred to the system.\n", + "#The heat transferred is cn*(T2-T1).Therefore,\n", + "q = cn*(T2-T1); \t\t\t#heat transferred \t\t\t#Btu/lbm(to the system)\n", + "print \"The heat transferred is %.2f Btu/lbmto the system\"%(q);\n", + "#The work done can be found Using equation,\n", + "w = (R*(T2-T1))/(J*(1-n)); \t\t\t#Btu/lbm \t\t\t#the workdone(from the system)\n", + "print \"The work done is %.2f Btu/lbmfrom the system\"%(w);\n", + "deltas = cn*math.log(T2/T1) \t\t\t#change in entropy \t\t\t#Btu/lbm*R\n", + "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Polytropic specific heatcn, is -0.06 Btu/lbm*R\n", + "The heat transferred is 51.43 Btu/lbmto the system\n", + "The work done is 205.53 Btu/lbmfrom the system\n", + "The change in enthalpy is 0.05 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.33 Page No : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given in problem 6.32,\n", + "n = 1.3; \t\t\t#p*v**1.3 = constant\n", + "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n", + "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "T2 = 600.; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 1500.; \t\t\t#absolute initial temperature \t\t\t#unir:R\n", + "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "J = 778.; \t\t\t#conversion factor\n", + "#Equation,\n", + "# T1/T2 = ((p1/p2)**((n-1)/n));\n", + "#rearranging,\n", + "p1byp2 = math.exp(math.log(T1/T2)/((n-1)/n)); \t\t\t#The ratio of inlet to outlet pressure\n", + "print \"The ratio of inlet to outlet pressure is %.2f\"%(p1byp2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of inlet to outlet pressure is 53.02\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.34 Page No : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the table at 1000 R: \t\t\t#From the table at 500 R:\n", + "h2 = 240.98; \n", + "h1 = 119.48; \n", + "#Btu/lbm \t\t\t#enthalpy \t\t\t#Btu/lbm \t\t\t#enthalpy\n", + "u2 = 172.43; \n", + "u1 = 85.20; \n", + "#Btu/lbm \t\t\t#internal energy \t\t\t#Btu/lbm \t\t\t#internal energy \n", + "fy2 = 0.75042; \n", + "fy1 = 0.58233; \n", + "#Btu/lbm*R \t\t\t#Btu/lbm*R\n", + "\n", + "#The change in enthalpy is\n", + "deltah = h2-h1; \t\t\t#Btu/lbm\n", + "#The change in internal energy is\n", + "deltau = u2-u1; \t\t\t#Btu/lbm\n", + "print \"The change in enthalpy is %.2f Btu/lbm & the change in internal energy is %.2f Btu/lbm\"%(deltah,deltau);\n", + "#Because in the constant-pressure process -R*math.log(p2/p1) is zero,\n", + "deltas = fy2-fy1; \t\t\t#Btu/lbm*R \t\t\t#The entropy when air is heated at constant pressure\n", + "print \"The entropy when air is heated at constant pressure is %.2f Btu/lbm/R\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in enthalpy is 121.50 Btu/lbm & the change in internal energy is 87.23 Btu/lbm\n", + "The entropy when air is heated at constant pressure is 0.17 Btu/lbm/R\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.35 Page No : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#In this problem,the air expands from 5 atm absolute to 1 atm absolute from an initial temperature of 1000R,\n", + "pr = 12.298; \t\t\t#relative pressure \t\t\t#unit:atm \n", + "h = 240.98; \t\t\t#Btu/lbm \t\t\t#enthalpy \n", + "pr = 12.298/5; \t\t\t#The value of the final relative pressure \t\t\t#unit:atm\n", + "#Interpolation in the air table yields the following:\n", + "# T pr\n", + "# 620 2.249\n", + "# 2.4596\n", + "# 640 2.514\n", + "T = 620+(((2.4596-2.249)/(2.514-2.249))*20); \t\t\t#the final temperature \t\t\t#unit:R\n", + "print \"The absolute final temperature is %.2f R\"%(T);\n", + "u1 = 172.43; \t\t\t#initial internal energy \t\t\t#Btu/lbm\n", + "u2 = 108.51; \t\t\t#final internal energy \t\t\t#Btu/lbm\n", + "work = u1-u2; \t\t\t#Btu/lbm The work done by air in an isentropic nonflow expansion \t\t\t#where the value of u2 is obtained by interpolation at T temperature and the value of u1 is read from the air table at 1000 R. \n", + "print \"The work done by air in an isentropic nonflow expansion is %.2f Btu/lbmout)\"%(work)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute final temperature is 635.89 R\n", + "The work done by air in an isentropic nonflow expansion is 63.92 Btu/lbmout)\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.36 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "T = 1000+460; \t\t\t#Fahrenheit temperature converted to absolute temperature\n", + "#The velocity of sound in air at 1000 F is\n", + "Va = 49.0*math.sqrt(T); \t\t\t#velocity \t\t\t#ft/s\n", + "print \"The velocity of sound air at 1000 F is %.2f ft/s\"%(Va);\n", + "#Hydrogen has a specific heat ratio of 1.41 and R = 766.53.Therefore,\n", + "khydrogen = 1.41; \t\t\t#specific heats ratio for air\n", + "kair = 1.40; \t\t\t#specific heats ratio for air\n", + "Rhydrogen = 766.53; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n", + "Rair = 53.36; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n", + "# Vahydrogen/Vaair = math.sqrt((Rhydrogen*khydrogen)/(Rair*kair))\n", + "#rearranging,\n", + "Vahydrogen = Va*math.sqrt((Rhydrogen*khydrogen)/(Rair*kair)); \t\t\t#The velocity of sound in hydrogen at 1000 F \t\t\t#unit:ft/s\n", + "print \"The velocity of sound in hydrogen at 1000 F is %.2f ft/s\"%(Vahydrogen);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of sound air at 1000 F is 1872.29 ft/s\n", + "The velocity of sound in hydrogen at 1000 F is 7121.55 ft/s\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.37 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "T = 200+460.; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "V = 1500; \t\t\t#ft/s \t\t\t#the local velocity\n", + "Va = 49.0*math.sqrt(T); \t\t\t#velocity of sound air at 200 F \t\t\t#unit:ft/s\n", + "print \"The velocity of sound air at 200 F is %.2f ft/s\"%(Va);\n", + "M = V/Va; \t\t\t#The Mach number = the local velocity/velocity of sound \t\t\t#unitless\n", + "print \"The Mach number is %.2f\"%(M);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of sound air at 200 F is 1258.83 ft/s\n", + "The Mach number is 1.19\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.38 Page No : 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "V = 1000; \t\t\t#ft/s \t\t\t#the fluid velocity\n", + "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "J = 778; \t\t\t#conversion factor\n", + "h = 1204.4; \t\t\t#Btu/lbm \t\t\t#enthalpy of saturated steam\n", + "#h0-h = V**2/(2*gc*J) \n", + "h0 = h+((V**2)/(2*gc*J)); \t\t\t#Btu/lbm \t\t\t#h0 = stagnation enthalpy\n", + "print \"The total enthalpy is %.2f Btu/lbm\"%(h0);\n", + "#It will be noted for this problem that if the initial velocity had been 100ft/s,deltah would have been 0.2 Btu/lbm,and for most practical purpposes,the total properties and those of the flowing fluid would have been essentially the same.Thus,for low-velocity fluids,the difference in total and steam properties can be neglected.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total enthalpy is 1224.38 Btu/lbm\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.39 Page No : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy.linalg import inv\n", + "\n", + "# given data\n", + "k = 1.4; \t\t\t#the specific heats ratio \t\t\t#k = cp/cv\n", + "M = 1; \t\t\t#(table 6.5) \t\t\t#The Mach number = the local velocity/velocity of sound\n", + "T0 = 800; \t\t\t#absolute temperature \t\t\t#unit:R\n", + "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "R = 53.35; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n", + "p0 = 300; \t\t\t#psia \t\t\t#pressure\n", + "\n", + "# * or \"star\" subscripts to conditions in which M = 1;\n", + "# \"0\" subscript refers to isentropic stagnation\n", + "#Refer to figure 6.26,\n", + "#Tstar/T0 = 0.8333\n", + "Tstar = T0*0.8333; \t\t\t#temperature when M = 1 \t\t\t#unit:R\n", + "print \"If the mach number at the outlet is unity, temperature is %.2f R\"%(Tstar);\n", + "Vat = math.sqrt(gc*R*Tstar*k); \t\t\t#ft/s \t\t\t#Vat = V2 \t\t\t#local velocity of sound\n", + "print \"If the mach number at the outlet is unity, velocity is %.2f ft/s\"%(Vat)\n", + "\n", + "#For A/Astar = 2.035\n", + "#The table yields\n", + "M1 = 0.3; \t\t\t#mach number at inlet\n", + "print \"At inlet, The mach number is %.2f\"%(M1)\n", + "#pstar/p0 = 0.52828\n", + "pstar = p0*0.52828; \t\t\t#pressure when M = 1 \t\t\t#psia\n", + "#also,\n", + "#T1/T0 = 0.98232 and p1/p0 = 0.93947\n", + "#Therefore,\n", + "T1 = T0*0.982332; \t\t\t#unit:R \t\t\t#T1 = temperature at inlet\n", + "print \"At inlet, The temperature is %.2f R\"%(T1);\n", + "p1 = p0*0.93947; \t\t\t#psia \t\t\t#p1 = pressure at inlet\n", + "print \"At inlet, The pressure is %.2f psia\"%(p1);\n", + "#From the inlet conditions derived,\n", + "Va1 = math.sqrt(gc*k*R*T1); \t\t\t#ft/s \t\t\t#V1 = velocity at inlet\n", + "V1 = M1*Va1; \t\t\t#ft/s \t\t\t#velocity\n", + "print \"At inlet, The velocity is %.2f ft/s\"%(V1);\n", + "#The specific volume at inlet is found from the equation of state for an ideal gas:\n", + "v = (R*T1)/(p1*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n", + "rho = inv([[v]]); \t\t\t#inverse of specific volume \t\t\t#density\n", + "A = 2.035; \t\t\t#area \t\t\t#ft**2\n", + "m = rho*A*V1; \t\t\t#mass flow \t\t\t#unit:lbm/s\n", + "print \"At inlet, The mass flow is %.2f lbm/s\"%(m);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If the mach number at the outlet is unity, temperature is 666.64 R\n", + "If the mach number at the outlet is unity, velocity is 1265.62 ft/s\n", + "At inlet, The mach number is 0.30\n", + "At inlet, The temperature is 785.87 R\n", + "At inlet, The pressure is 281.84 psia\n", + "At inlet, The velocity is 412.24 ft/s\n", + "At inlet, The mass flow is 812.08 lbm/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.40 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# * or \"star\" subscripts to conditions in which M = 1;\n", + "# \"0\" subscript refers to isentropic stagnation\n", + "#This problem will be solved by two methods(A and B)\n", + "print \"Method A\"; \t\t\t#By equations:\n", + "k = 1.4; \t\t\t#the specific heat ratio \t\t\t#k = cp/cv\n", + "R = 53.3; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n", + "M = 2.5; \t\t\t#mach number = the local velocity/velocity of sound\n", + "print \"Solution for a\";\n", + "# T/Tstar = (k+1)/(2*(1+((1/2)*(k-1)*M**2)))\n", + "# Tstar/T0 = 2/(k+1)\n", + "#Therefore,\n", + "# (Tstar/T0)*(T/Tstar) = (T/T0) = 1/(1+((1/2)*(k-1)*M**2))\n", + "T0 = 560; \t\t\t#absolute temperature or stagnation temperature \t\t\t#unit:R\n", + "T = T0/(1+((1/2)*(k-1)*M**2)); \t\t\t#temperature at M = 2.5\n", + "print \"The temperature is %.2f R\"%(T);\n", + "print \"Solution for b\";\n", + "p = 0.5; \t\t\t#static pressure \t\t\t#unit:psia\n", + "# p0/p = (T0/T)**(k/(k-1))\n", + "p0 = p*14.7*((T0/T)**(k/(k-1))); \t\t\t#pressure at M = 2.5 \t\t\t#unit:psia\n", + "print \"The pressure is %.2f psia\"%(p0);\n", + "print \"Solution for c\";\n", + "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "Va = math.sqrt(gc*k*R*T); \t\t\t#ft/s \t\t\t#local velocity of sound\n", + "V = M*Va; \t\t\t#valocity at M = 2.5 \t\t\t#unit:ft/s\n", + "print \"The velocity is %.2f ft/s\"%(V);\n", + "print \"Solution for d\";\n", + "v = (R*T)/(p*14.7*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2 \t\t\t#specific volume at M = 2.5\n", + "print \"The specific volume is %.2f ft**3/lbm\"%(v);\n", + "print \"Solution for e\";\n", + "#Mass velocity is definrd as the mass flow per unit area\n", + "# m/A = (A*V)/(v*A) = V/v\n", + "print \"The mass velocity is %.2f lbm/s*ft**2)\"%(V/v); \t\t\t#mass velocity at M = 2.5\n", + "\n", + "\n", + "print \"Method B\"; \t\t\t#By the gas tables: \t\t\t#table 6.5 gives\n", + "M = 2.5; \t\t\t#mach number = the local velocity/velocity of sound\n", + "print \"Solution for a\";\n", + "T0 = 560; \t\t\t#absolute temperature or stagnation temperature\n", + "#T/T0 = 0.44444\n", + "T = T0*0.44444; \t\t\t#temperature at M = 2.5\n", + "print \"The temperature is %.2f R\"%(T)\n", + "print \"Solution for b\";\n", + "p = 0.5; \t\t\t#static pressure\n", + "#p/p0 = 0.05853\n", + "p0 = (p*14.7)/0.05853; \t\t\t#pressure at M = 2.5\n", + "print \"The pressure is %.2f psia\"%(p0);\n", + "print \"Solution for c\";\n", + "print \"As before %.2f ft/s\"%(V)\n", + "print \"Solution for d\";\n", + "print \"As before %.2f ft**3/lbm\"%(v)\n", + "print \"Solution for e\";\n", + "print \"As before %.2f lbm/s*ft**1)\"%(V/v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Method A\n", + "Solution for a\n", + "The temperature is 560.00 R\n", + "Solution for b\n", + "The pressure is 7.35 psia\n", + "Solution for c\n", + "The velocity is 2898.59 ft/s\n", + "Solution for d\n", + "The specific volume is 28.20 ft**3/lbm\n", + "Solution for e\n", + "The mass velocity is 102.78 lbm/s*ft**2)\n", + "Method B\n", + "Solution for a\n", + "The temperature is 248.89 R\n", + "Solution for b\n", + "The pressure is 125.58 psia\n", + "Solution for c\n", + "As before 2898.59 ft/s\n", + "Solution for d\n", + "As before 28.20 ft**3/lbm\n", + "Solution for e\n", + "As before 102.78 lbm/s*ft**1)\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.41 Page No : 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For Methane(CH4,MW = 16)\n", + "p = 500; \t\t\t#evaluate specific volume at p pressure \t\t\t#Unit:psia\n", + "pc = 674; \t\t\t#critical temperature \t\t\t#Unit:psia\n", + "T = 50+460; \t\t\t#evaluate specific volume at T temperature \t\t\t#Unit:R\n", + "Tc = 343; \t\t\t#critical temperature \t\t\t#Unit:R\n", + "R = 1545./16; \t\t\t#gas constant R = 1545/Molecular Weight \t\t\t#ft*lbf/lbm*R\n", + "pr = p/pc; \t\t\t#reduced pressure \t\t\t#unit:psia\n", + "Tr = T/Tc; \t\t\t#reduced temperature \t\t\t#unit:R\n", + "#Reading figure 6.28 at these values gives\n", + "Z = 0.93; \t\t\t#compressibility factor\n", + "#Z = (p*v)/(R*T)\n", + "v = Z*((R*T)/(p*144)); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n", + "print \"Using the value of Z = 0.93, the specific volume is %.2f ft**3/lbm\"%(v);\n", + "#For ideal gas,\n", + "v = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n", + "print \"For the ideal gas, the specific volume is %.2f ft**3/lbm\"%(v);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Using the value of Z = 0.93, the specific volume is 0.64 ft**3/lbm\n", + "For the ideal gas, the specific volume is 0.68 ft**3/lbm\n" + ] + } + ], + "prompt_number": 51 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb index 5b56ae9e..5b56ae9e 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_2.ipynb new file mode 100755 index 00000000..5b56ae9e --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_2.ipynb @@ -0,0 +1,1099 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:66356009206cf2a059db6adf4246ee44a4d1b30e2da1d2c932b5c468912f3519" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Mixtures of Ideal Gases" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#As the basis of the calculation,assume that we have 1 lbm of mixture.Also,take the molecular weight of oxygen to be 32.00 and nitrogen to be 28.02.(from table7.1)\n", + "print \"Solution for a\";\n", + "nO2 = 0.2315/32; \t\t\t#no of moles of oxygen = ratio of mass and molecular weight \t\t\t#0.2315 lb of oxygen per pound\n", + "print \"The moles of oxygen is %.2f mole/lbm of mixture\"%(nO2);\n", + "nN2 = 0.7685/28.02; \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#0.7685 lb of nitrogen per pound\n", + "print \"The moles of nitrogen is %.2f mole/lbm of mixture\"%(nN2);\n", + "nm = nO2+nN2; \t\t\t#Unit:Mole/lbm \t\t\t#number of moles of gas mixture is sum of the moles of its constituent gases\n", + "print \"The total number of moles is %.2f mole/lbm\"%(nm); \n", + "xO2 = nO2/nm; \t\t\t#mole fraction of oxygen = ratio of no of moles of oxygen and total moles in mixture\n", + "xN2 = nN2/nm; \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n", + "print \"The mole fraction of oxygen is %.2f and the mole fraction of nitrogen is %.2f\"%(xO2,xN2);\n", + "#(Check:xO2+xN2 = 1)\n", + "print \"xO2+xN2 = %.2f\"%(xO2+xN2);\n", + "\n", + "print \"Solution for b\";\n", + "# the air is at 14.7 psia\n", + "pO2 = xO2*14.7; \t\t\t#the partial pressure of oxygen = pressure of air * the mole fraction of oxygen \t\t\t#psia\n", + "print \"The partial pressure of oxygen is %.2f psia\"%(pO2);\n", + "pN2 = xN2*14.7; \t\t\t#the partial pressure of nitrogen = pressure of air * the mole fraction of nitrogen \t\t\t#psia\n", + "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n", + "\n", + "print \"Solution for c\";\n", + "MWm = (xO2*32) + (xN2*28.02); \t\t\t#the molecular weight of air = sum of products of mole fraction of each gas component\n", + "print \"The molecular weight of air is %.2f\"%(MWm);\n", + "\n", + "print \"Solution for d\";\n", + "Rm = 1545/MWm; \t\t\t#the gas constant of air\n", + "print \"The gas constant of air is %.2f\"%(Rm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The moles of oxygen is 0.01 mole/lbm of mixture\n", + "The moles of nitrogen is 0.03 mole/lbm of mixture\n", + "The total number of moles is 0.03 mole/lbm\n", + "The mole fraction of oxygen is 0.21 and the mole fraction of nitrogen is 0.79\n", + "xO2+xN2 = 1.00\n", + "Solution for b\n", + "The partial pressure of oxygen is 3.07 psia\n", + "The partial pressure of nitrogen is 11.63 psia\n", + "Solution for c\n", + "The molecular weight of air is 28.85\n", + "Solution for d\n", + "The gas constant of air is 53.55\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For Gaseous Freon-12 (CCl2F2)\n", + "#MW of air = 29 & MW of freon-12 = 120.9\n", + "#initial pressure in math.tank is atmospheric pressure that is 14.7 psia\n", + "#final pressure of math.tank is 1000 psia\n", + "#The partial pressure of the Freon-12 is 1000-14.7\n", + "print \"The partial pressure of the Freon-12 is %.2f\"%(1000-14.7)\n", + "#the mole fraction of air = the initial pressure / final pressure\n", + "print \"The mole fraction of air is %.2f\"%(14.7/1000)\n", + "#the mole fraction of freon = the partial pressure of freon / the final pressure\n", + "print \"The mole fraction of Freon-12 is %.2f\"%((1000-14.7)/1000)\n", + "MWm = ((14.7/1000)*29) + (((1000-14.7)/1000)*120.9);\t\t\t#the molecular weight of mixture = sum of products of mole fraction of each gas component \n", + "print \"The molecular weight of the mixture is %.2f\"%(MWm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The partial pressure of the Freon-12 is 985.30\n", + "The mole fraction of air is 0.01\n", + "The mole fraction of Freon-12 is 0.99\n", + "The molecular weight of the mixture is 119.55\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Ten pounds of air,1 lb of carbon dioxide,and 5 lb of nitrogen are mixed at constant temperature until the mixture pressure is constant\n", + "nair = 10./29; \t\t\t#no of moles of air = ratio of mass and molecular weight \t\t\t#10 lb of nitrogen per pound \t\t\t#molecular weight of air = 29\n", + "print \"The moles of air is %.2f mole/lbm of mixture\"%(nair);\n", + "nCO2 = 1./44; \t\t\t#no of moles of carbon dioxide = ratio of mass and molecular weight \t\t\t#1 lb of per pound \t\t\t#molecular weight of CO2 = 44\n", + "print \"The moles of carbon dioxide is %.2f mole/lbm of mixture\"%(nCO2);\n", + "nN2 = 5./28; \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#5 lb of nitrogen per pound \t\t\t#molecular weight of N2 = 28\n", + "print \"The moles of nitrogen is %.2f mole/lbm of mixture\"%(nN2);\n", + "nm = nair+nCO2+nN2; \t\t\t#Unit:Mole/lbm \t\t\t#number of moles of gas mixture is sum of the moles of its constituent gases\n", + "print \"The total number of moles is %.2f mole/lbm\"%(nm); \n", + "\n", + "xair = nair/nm \t\t\t#mole fraction of air = ratio of no of moles of air and total moles in mixture\n", + "xCO2 = nCO2/nm; \t\t\t#mole fraction of carbon dioxide = ratio of no of moles of carbon dioxide and total moles in mixture\n", + "xN2 = nN2/nm; \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n", + "print \"The mole fraction of air is %.2f \"%(xair);\n", + "print \"The mole fraction of carbon dioxide is %.2f\"%(xCO2)\n", + "print \"The mole fraction of nitrogen is %.2f\"%(xN2);\n", + "\n", + "#final pressure of is 100 psia\n", + "pair = xair*100; \t\t\t#the partial pressure of air = final pressure * the mole fraction of air \t\t\t#psia\n", + "print \"The partial pressure of air is %.2f psia\"%(pair);\n", + "pCO2 = xCO2*100; \t\t\t#the partial pressure of carbon dioxide = final pressure * the mole fraction of CO2 \t\t\t#psia\n", + "print \"The partial pressure of carbon dioxide is %.2f psia\"%(pCO2);\n", + "pN2 = xN2*100; \t\t\t#the partial pressure of nitrogen = final pressure * the mole fraction of nitrogen \t\t\t#psia\n", + "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n", + "\n", + "#the molecular weight of mixture = sum of products of mole fraction of each gas component\n", + "MWm = (xair*29) + (xCO2*44) + (xN2*28); \t\t\t#The molecular weight of air \n", + "print \"The molecular weight of air is %.2f\"%(MWm);\n", + "\n", + "Rm = 1545/MWm; \t\t\t#the gas constant of air\n", + "print \"The gas constant of air is %.2f\"%(Rm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moles of air is 0.34 mole/lbm of mixture\n", + "The moles of carbon dioxide is 0.02 mole/lbm of mixture\n", + "The moles of nitrogen is 0.18 mole/lbm of mixture\n", + "The total number of moles is 0.55 mole/lbm\n", + "The mole fraction of air is 0.63 \n", + "The mole fraction of carbon dioxide is 0.04\n", + "The mole fraction of nitrogen is 0.33\n", + "The partial pressure of air is 63.14 psia\n", + "The partial pressure of carbon dioxide is 4.16 psia\n", + "The partial pressure of nitrogen is 32.70 psia\n", + "The molecular weight of air is 29.30\n", + "The gas constant of air is 52.74\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#five moles of oxygen and 10 moles of hydrogen are mixed\n", + "#The total number of moles is 10+5 = 15.Therefore,mole fraction of each constituent is\n", + "xO2 = 5./15; \t\t\t#The mole fraction of oxygen \n", + "xH2 = 10./15; \t\t\t#The mole fraction of hydrogen\n", + "print \"The mole fraction of oxygen is %.2f and of hydrogen is %.2f\"%(xO2,xH2);\n", + "#the molecular weight of mixture = sum of products of mole fraction of each gas component(MW of O2 = 32 and MW of H2 = 2.016)\n", + "print \"The molecular weight of the final mixture is %.2f\"%((((5./15)*32)+10./15)*2.016)\n", + "R = 1545./32; \t\t\t#the gas constant of oxygen\n", + "T = 460.+70; \t\t\t#absolute temperature \t\t\t#Unit:R\n", + "p = 14.7; \t\t\t#pressure \t\t\t#psia\n", + "#The partial volume of the oxygen can be found as follows:per pound of oxygen,\n", + "#p*vO2 = R*T;\n", + "vO2 = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 ft**2 \n", + "#Because there are 5 moles of oxygen,each containing 32 lbm,\n", + "VO2 = vO2*5*32; \t\t\t#ft**3 \t\t\t#partial volume of oxygen\n", + "print \"The partial volume of oxygen is %.2f ft**3\"%(VO2);\n", + "#For the hydrogen,we can simplify the procedure by noting that the fraction of the total volume occupied by the oxygen is the same as its mole fraction.Therefore,\n", + "Vm = 3*VO2; \t\t\t#total volume occupied \t\t\t#ft**3\n", + "print \"The mixture volume is %.2f ft**3\"%(Vm);\n", + "#and the hydrogen volume\n", + "VH2 = Vm-VO2; \t\t\t#Ft**2 \t\t\t#partial volume of hydrogen\n", + "print \"From simplified procedure, The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n", + "\n", + "#We could obtain the partial volume of hydrogen by proceeding as we did for the oxygen.Thus,\n", + "#p*vH2 = R*T;\n", + "R = 1545/2.016; \t\t\t#the gas constant of hydrogen\n", + "vH2 = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 ft**2 \n", + "#Because there are 10 moles of hydrogen,each containing 2.016 lbm,\n", + "VH2 = vH2*10*2.016; \t\t\t#ft**3 \t\t\t#partial volume of hydrogen\n", + "print \"The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n", + "#Which checks our previous values.\n", + "\n", + "\n", + "print \"From another method\"\n", + "#As an alternative to the foregoing,we could also use the fact that at 14.7 psia and 32F a mole of any gas occupies a volume of 358 ft**3.\n", + "print \"At 70F and 14.7 psia, a mole occupies %.2f ft**3\"%((((358*460+70.)/460+32))); \n", + "#Therefore, 5 moles of oxygen occupies \n", + "VO2 = 5*358*((460+70.)/(460+32)); \t\t\t#The partial volume of oxygen \t\t\t#ft**3\n", + "print \"The partial volume of oxygen is %.2f ft**3\"%(VO2);\n", + "#and 10 moles of hydrogen occupies\n", + "VH2 = 10*358*((460+70.)/(460+32)); \t\t\t#The partial volume of hydrogen \t\t\t#ft**3\n", + "print \"The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n", + "#Both values are in good agreement with the previous calculations.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mole fraction of oxygen is 0.33 and of hydrogen is 0.67\n", + "The molecular weight of the final mixture is 22.85\n", + "The partial volume of oxygen is 1934.17 ft**3\n", + "The mixture volume is 5802.51 ft**3\n", + "From simplified procedure, The partial volume of hydrogen is 3868.34 ft**3\n", + "The partial volume of hydrogen is 3868.34 ft**3\n", + "From another method\n", + "At 70F and 14.7 psia, a mole occupies 390.15 ft**3\n", + "The partial volume of oxygen is 1928.25 ft**3\n", + "The partial volume of hydrogen is 3856.50 ft**3\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Referring to figure 7.3,we have for CO2,\n", + "nCO2 = 10./44; \t\t\t#mole \t\t\t#no of moles of carbon dioxide = ratio of mass and molecular weight \t\t\t#10 lb of per pound \t\t\t#molecular weight of CO2 = 44\n", + "#and for N2,\n", + "nN2 = 5/28.02; \t\t\t#mole \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#5 lb of nitrogen per pound\n", + "print \"The total number of moles in the mixture is %.2f mole\"%(nCO2+nN2);\n", + "#Therefore,\n", + "xCO2 = nCO2/(nCO2+nN2); \t\t\t#mole fraction of carbon dioxide = ratio of no of moles of carbon dioxide and total moles in mixture\n", + "xN2 = nN2/(nCO2+nN2); \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n", + "print \"The mole fraction of carbon dioxide is %.2f and the mole fraction of nitrogen is %.2f\"%(xCO2,xN2);\n", + "#the molecular weight of mixture = sum of products of mole fraction of each gas component\n", + "MWm = (xCO2*44) + (xN2*28.02); \t\t\t#the molecular weight of mixture\n", + "print \"The molecular weight of air is %.2f\"%(MWm);\n", + "#Because the mixture is 15 lbm (10CO2 + 5N2),the volume of the mixture is found from pm*Vm = mm*Rm*Tm\n", + "pm = 100.; \t\t\t#mixture pressure \t\t\t#psia \n", + "Tm = 460.+70; \t\t\t#mixture temperature \t\t\t#R(absolute temperature)\n", + "Rm = 1545/37.0; \t\t\t#gas constant of mixture \n", + "mm = 15.; \t\t\t#mass of mixture \t\t\t#Unit:lb\n", + "#So,rearranging the equation,gives\n", + "Vm = (mm*Rm*Tm)/(pm*144); \t\t\t#mixture volume \t\t\t#ft**3 \t\t\t#1 in**2 = 144 ft**2\n", + "print \"The mixture volume is %.2f ft**3\"%(Vm);\n", + "#the partial volume of carbon dioxide is the total volume multiplied by the mole fraction.Thus,\n", + "VCO2 = Vm*xCO2; \t\t\t#the partial volume of CO2 \t\t\t#ft**3\n", + "print \"The partial volume of carbon dioxide is %.2f ft**3\"%(VCO2);\n", + "VN2 = Vm*xN2; \t\t\t#the partial volume of N2 \t\t\t#ft**3\n", + "print \"The partial volume of nitrogen is %.2f ft**3\"%(VN2);\n", + "#The partial pressure of each constituent is proportional to its mole fraction,for these conditions,\n", + "pCO2 = pm*xCO2; \t\t\t#the partial pressure of carbon dioxide = final pressure * the mole fraction of CO2 \t\t\t#psia\n", + "print \"The partial pressure of carbon dioxide is %.2f psia\"%(pCO2);\n", + "pN2 = pm*xN2; \t\t\t#the partial pressure of nitrogen = final pressure * the mole fraction of nitrogen \t\t\t#psia\n", + "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total number of moles in the mixture is 0.41 mole\n", + "The mole fraction of carbon dioxide is 0.56 and the mole fraction of nitrogen is 0.44\n", + "The molecular weight of air is 36.97\n", + "The mixture volume is 23.05 ft**3\n", + "The partial volume of carbon dioxide is 12.91 ft**3\n", + "The partial volume of nitrogen is 10.14 ft**3\n", + "The partial pressure of carbon dioxide is 56.02 psia\n", + "The partial pressure of nitrogen is 43.98 psia\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#we will assume that we have 100 volumes of gas mixture and set up table 7.2.In first coloumn,we tabulate the gas,and in the second coloumn,we tabulate the given volume fractions.Because the mole fraction equals to volume fraction,the values in coloumn 3 are the same as those in coloumn 2.\n", + "#The molecular weight is obtained from table 7.1.Because the MW of the mixture is the sum of the individual mole fraction multiplied by the respective molecular weights,the next coloumn tabulates the product of the mole fraction multiplied by molecular weight(3*4).The sum of these entries is the molecular weight of the mixture,which for this case is 33.4.\n", + "print \"Basis:100 volumes of gas mixture\"\n", + "print \"gas Volume Mole Molecular mass \"\n", + "print \" fraction fraction x weight MW xMW fraction\"\n", + "print \"CO2 0.40 0.40 44.0 %.2f %.2f\"%(0.40*44.0,(0.40*44.0)/33.4)\n", + "print \"N2 0.10 0.10 28.02 %.2f %.2f \"%(28.02*0.10,(28.02*0.10)/33.4)\n", + "print \"H2 0.10 0.10 2.016 %.2f %.2f \"%(0.10*2.016,(0.10*2.016)/33.4)\n", + "print \"O2 0.40 0.40 32.0 %.2f %.2f \"%(0.40*32.0,(0.40*32.0)/33.4)\n", + "print \" 1.00 1.00 33.4 = MWm = 1.000 \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Basis:100 volumes of gas mixture\n", + "gas Volume Mole Molecular mass \n", + " fraction fraction x weight MW xMW fraction\n", + "CO2 0.40 0.40 44.0 17.60 0.53\n", + "N2 0.10 0.10 28.02 2.80 0.08 \n", + "H2 0.10 0.10 2.016 0.20 0.01 \n", + "O2 0.40 0.40 32.0 12.80 0.38 \n", + " 1.00 1.00 33.4 = MWm = 1.000 \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We will take as a basis 100 lbm of mixture.\n", + "#Dividing colomn 2 by 3 gives us mass/molecular weight or moles of each constituents.The total number of moles in the mixture is the sum of coloumn 4,and the molecular weight of the mixture is the mass of the mixture(100 lbm) divided by the number of moles\n", + "#In coloumn 5,mole fraction is given by moles/total mole\n", + "\n", + "print \"Basis:100 pounds of gas mixture\"\n", + "print \"gas Mass Molecular Moles Mole Percent \"\n", + "print \" lbm weight MW fraction Volume \"\n", + "print \"CO2 52.7 44.0 1.2 %.2f %.2f \"%(1.2/3,1.2/3*100)\n", + "print \"N2 8.4 28.02 0.3 %.2f %.2f \"%(0.3/3,0.3/3*100)\n", + "print \"H2 0.6 2.016 0.3 %.2f %.2f \"%(0.3/3,0.3/3*100)\n", + "print \"O2 38.3 32.0 1.2 %.2f %.2f \"%(1.2/3,1.2/3*100)\n", + "print \" = 100.0 = 3.0 = 1.00 = 100 \"\n", + "print \" MWm = 100/3 = 33.3 \"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Basis:100 pounds of gas mixture\n", + "gas Mass Molecular Moles Mole Percent \n", + " lbm weight MW fraction Volume \n", + "CO2 52.7 44.0 1.2 0.40 40.00 \n", + "N2 8.4 28.02 0.3 0.10 10.00 \n", + "H2 0.6 2.016 0.3 0.10 10.00 \n", + "O2 38.3 32.0 1.2 0.40 40.00 \n", + " = 100.0 = 3.0 = 1.00 = 100 \n", + " MWm = 100/3 = 33.3 \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We will take as a basis 100 lbm of mixture.\n", + "#Dividing colomn 2 by 3 gives us mass/molecular weight or moles of each constituents.The total number of moles in the mixture is the sum of coloumn 4,and the molecular weight of the mixture is the mass of the mixture(100 lbm) divided by the number of moles\n", + "#In coloumn 5,mole fraction is given by moles/total mole\n", + "\n", + "print \"Basis:100 pounds of gas mixture\"\n", + "print \"gas Mass Molecular Moles Mole Percent \"\n", + "print \" lbm weight MW fraction Volume \"\n", + "print \"O2 23.18 32.00 0.724 %.2f %.2f \"%(0.724/3.45,0.724/3.45*100)\n", + "print \"N2 75.47 28.02 2.693 %.2f %.2f \"%(2.692/3.45,2.692/3.45*100)\n", + "print \"A 1.30 39.90 0.033 %.2f %.2f \"%(0.033/3.45,0.033/3.45*100)\n", + "print \"CO2 0.05 44.00 - - - \"\n", + "print \" = 100.00 = 3.45 = 1.00 = 100 \"\n", + "print \" MWm = 100/3.45 = 28.99 \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Basis:100 pounds of gas mixture\n", + "gas Mass Molecular Moles Mole Percent \n", + " lbm weight MW fraction Volume \n", + "O2 23.18 32.00 0.724 0.21 20.99 \n", + "N2 75.47 28.02 2.693 0.78 78.03 \n", + "A 1.30 39.90 0.033 0.01 0.96 \n", + "CO2 0.05 44.00 - - - \n", + " = 100.00 = 3.45 = 1.00 = 100 \n", + " MWm = 100/3.45 = 28.99 \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500 F and nitrogen is at 200 F.\n", + "\n", + "#The energy equation for the steady-flow,adiaatic mixing process gives us the requirement that the enthalpy of the mixture must equal to the enthalpies of the components,because deltah = q = 0.An alternative statement of this requirement is that the gain in enthalpy of the nitrogen must equal the decrease in enthalpy of the oxygen.Using the latter statement,that the change in enthalpy of nitrogen,yields\n", + "# (160*0.23*(500-tm)) = (196*0.25*(tm-200)) where tm = mixture temperature\n", + "#where m*cp*deltat has been used for deltah. \t\t\t#cp = specific heat at constant pressure \t\t\t#Unit for cp is Btu/lbm*R\n", + "#rearranging the above equation,\n", + "tm = ((500.*160*0.23)+(196*0.25*200))/((196*0.25)+(160*0.23)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n", + "print \"The final temperature of the mixture is %.2f F\"%(tm);\n", + "#Using the requirement that the enthalpy of the mixture must equal to the sum of the enthalpies of the components yields an alternative solution to this problem.Let us assume that at 0 F,the enthalpy of each gas and of the mixture is zero.The enthalpy of the entering oxygen is (160*0.23*(500-0)),and the enthalpy of the entering nitrogen is (196*0.25*(200-0)).The enthalpy of the mixture is ((160+196)*cpm*(tm-0))\n", + "#Therefore, (160*0.23*500)+(196*0.25*200) = ((160+196)*cpm*tm)\n", + "cpm = ((160./(160+196))*0.23)+((196/(160+196))*0.25); \t\t\t#specific heat at constant pressure for gas mixture \t\t\t#Btu/lbm*R\n", + "print \"For mixture, Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cpm);\n", + "#therefore,\n", + "tm = ((160*0.23*500)+(196*0.25*200))/(cpm*(160.+196)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n", + "print \"By Using value of cpm, The final temperature of the mixture is %.2f F\"%(tm);\n", + "#The use of 0 F as a base was arbitrary but convenient.Any base would yield the same results.\n", + "#The answer of cpm is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final temperature of the mixture is 328.67 F\n", + "For mixture, Specific heat at constant pressure is 0.10 Btu/lbm*R\n", + "By Using value of cpm, The final temperature of the mixture is 766.30 F\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.9 is carried out as a nonflow mixing process.\n", + "#Given in problem 7.9,: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500F and nitrogen is at 200 F. \t\t\t#cp = specific heat at constant pressure \n", + "#Given in problem 7.10,: cv of oxygen is 0.164 Btu/lbm*R.cv of nitrogen is 0.178 Btu/lbm*R. \t\t\t#cv = specific heat at constant volume\n", + "\n", + "#Because this is a nonflow process,the energy equation for this process requires the internal energy of the mixture to equal to the sum of the internal energy of its components.\n", + "#Alternatively,the decrease in internal energy of the oxygen must equal the increase in internal energy of the nitrogen.Using latter statement gives us,\n", + "# (160*0.164*(500-tm)) = (196*0.178*(tm-200))\n", + "#where m*cv*deltat has been used for deltau. \t\t\t#Unit for cp & cv is Btu/lbm*R\n", + "#rearranging the above equation,\n", + "tm = ((500*160*0.164)+(196*0.178*200))/((196*0.178)+(160*0.164)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n", + "\n", + "# Results\n", + "print \"The final temperature of the mixture is %.2f F\"%(tm);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final temperature of the mixture is 328.78 F\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page No : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#The change in entropy of the mixture is the sum of the changes in entropy of each component.\n", + "#Given in problem 7.9,: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500F and nitrogen is at 200 F. \t\t\t#cp = specific heat at constant pressure \n", + "#In 7.9,for the oxygen,the temperature starts at 500F(960 R) and decreases to 328.7 F.For the nitrogen,the temperature starts at 200F(660 R) and increase to 328.7 F.\n", + "#deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy\n", + "\n", + "#For the oxygen,\n", + "cp = 0.23; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n", + "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 500+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy for oxygen\n", + "DeltaS = 160*deltas; \t\t\t#Btu/R \t\t\t#The total change in entropy of the oxygen\n", + "print \"The total change in entropy of the oxygen is %.2f Btu/R\"%(DeltaS);\n", + "\n", + "#For the nitrogen,\n", + "cp = 0.25; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n", + "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 200+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy for nitrogen\n", + "deltaS = 196*deltas; \t\t\t#Btu/R \t\t\t#The total change in entropy of the nitrogen\n", + "print \"The total change in entropy of the nitrogen is %.2f Btu/R\"%(deltaS);\n", + "deltaS = deltaS+DeltaS; \t\t\t#the total change in entropy for the mixture \t\t\t#Btu/lbm*R\n", + "print \"The total change in entropy for the mixture is %.2f Btu/R\"%(deltaS);\n", + "\n", + "#Per pound of mixture,\n", + "deltasm = deltaS/(196+160); \t\t\t#increase in entropy per pound mass of mixture\n", + "print \"Increase in entropy per pound mass of mixture is %.2f Btu/lbm*R\"%(deltasm);\n", + "\n", + "\n", + "print \"An alternative solution:\";\n", + "#As an alternative solution,assume an arbitrary datum of 0 F(460 R).\n", + "cp = 0.23; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n", + "#For initial entropy of oxygen,\n", + "T2 = 500+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "deltas = cp*math.log(T2/T1); \t\t\t#the initial change in entropy for oxygen \t\t\t# Btu/lbm*R\n", + "print \"The initial change in entropy for oxygen is %.2f Btu/lbm*R\"%(deltas);\n", + "#For final entropy of oxygen,\n", + "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "Deltas = cp*math.log(T2/T1); \t\t\t#the final change in entropy for oxygen \t\t\t# Btu/lbm*R\n", + "print \"The final change in entropy for oxygen is %.2f Btu/lbm*R\"%(Deltas);\n", + "deltaS = Deltas-deltas; \t\t\t#The entropy change of the oxygen \t\t\t#Btu/lbm*R\n", + "print \"The entropy change of the oxygen is %.2f Btu/lbm*R\"%(deltaS);\n", + "\n", + "#For nitrogen,\n", + "cp = 0.25; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n", + "#For initial entropy of nitrogen,\n", + "T2 = 200.+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "deltas = cp*math.log(T2/T1); \t\t\t#the initial change in entropy for nitrogen \t\t\t# Btu/lbm*R\n", + "print \"The initial change in entropy for nitrogen is %.2f Btu/lbm*R\"%(deltas);\n", + "#For final entropy of nitrogen,\n", + "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "Deltas = cp*math.log(T2/T1); \t\t\t#the final change in entropy for nitrogen \t\t\t# Btu/lbm*R\n", + "print \"The final change in entropy for nitrogen is %.2f Btu/lbm*R\"%(Deltas);\n", + "deltaS = Deltas-deltas; \t\t\t#The entropy change of the nitrogen \t\t\t#Btu/lbm*R\n", + "print \"The entropy change of the nitrogen is %.2f Btu/lbm*R\"%(deltaS);\n", + "\n", + "#The remainder of the problem is as before.The advantage of Using this alternative method is the negative math.logarithms are avoided by choomath.sing a reference temperature lower than any other temperature in the system\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total change in entropy of the oxygen is -7.23 Btu/R\n", + "The total change in entropy of the nitrogen is 8.73 Btu/R\n", + "The total change in entropy for the mixture is 1.50 Btu/R\n", + "Increase in entropy per pound mass of mixture is 0.00 Btu/lbm*R\n", + "An alternative solution:\n", + "The initial change in entropy for oxygen is 0.16 Btu/lbm*R\n", + "The final change in entropy for oxygen is 0.12 Btu/lbm*R\n", + "The entropy change of the oxygen is -0.04 Btu/lbm*R\n", + "The initial change in entropy for nitrogen is 0.09 Btu/lbm*R\n", + "The final change in entropy for nitrogen is 0.13 Btu/lbm*R\n", + "The entropy change of the nitrogen is 0.04 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page No : 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Referring to figure 7.6,it will be seen that the cooling of an air-water vapor mixture from B to A proceeds at constant pressure until the saturation curve is reached.\n", + "#At 80 F(the mixture temperature),the Steam Tables give us a saturation pressure of a 0.5073 psia,and because the relative humidity is 50%,the vapor pressure of the water is 0.5*0.5073 = 0.2537 psia.\n", + "#Using the steam tables,the saturation temperature corresponding to 0.2537 psia is 60 F.\n", + "#So,\n", + "print \"The dew point temperature of the air is 60 F\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dew point temperature of the air is 60 F\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No : 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#To solve this probelm,it is necessary to determine the properties of the saturated mixture 90 F.If the air is saturated at 90 F,the partial pressure of the water vapor is found directly from the Steam Tables as 0.6988 psia,and the specific volume of the water vapor is 467.7 ft**3/lbm of vapor.\n", + "print \"The partial pressure of the dry air is %.2f psia\"%(14.7-0.6988); \t\t\t#the mixture is at 14.7 psia\n", + "R = 1545/28.966; \t\t\t#gas constant of dry air = 1545/Molecular weight\n", + "T = 90+460; \t\t\t#temperature of dry air \t\t\t#Unit:R\n", + "pdryair = 14.0; \t\t\t#psia \t\t\t#pressure of dry air\n", + "#Applying the ideal gas equation to the air,\n", + "vdryair = (R*T)/(pdryair*144); \t\t\t#volume of dry air \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 Ft**2\n", + "#the mass of dry air in the 467.7 ft**3 container \n", + "print \"The mass of dry air in the 467.7 ft**3 container is %.2f lbm\"%(467.7/vdryair);\n", + "#To obtain relative humidity(phy),it is necessary to determine the mole fraction of water vapor for both the saturated mixture and the mixture in question.\n", + "#The saturated mixture contains 1 lbm of water vapor or 1/18.016 moles = 0.055 mole of water vapor and (467.7/vdryair)/28.966 = 1.109 moles of dry air.\n", + "#For the saturated mixture, the ratio of moles of water vapor to moles of mixture is 0.055/(0.055+1.109) = 0.0477\n", + "#For the actual mixture,the moles of water vapor per pound of dry air is 0.005/18.016 = 0.000278 and 1 lbm of dry air is 1/28.966 = 0.0345 mole.So,the mole of water vapor per mole of mixture at the conditions of the mixture is 0.000278/(0.0345+0.000278) = 0.00799\n", + "#From the defination of relative humidity,\n", + "print \"The relative humidity of the mixture is %.2f \"%((0.00799/0.0477)*100);\n", + "\n", + "#Because the mole ratio is also the ratio of the partial pressures for the ideal gas,phy can be expressed as the ratio of the partial pressure of the water vapor in the mixture to the partial pressure of the water vapor at saturation.Therefore,\n", + "print \"The partial pressure of the vapor at saturation is %.2f psia\"%((0.00799/0.0477)*0.6988);\n", + "print \"And the partial pressure of the dry air in the mixture is %.2f psia\"%((14.7-0.00799/0.0477)*0.6988); \t\t\t#14.7-The partial pressure of the vapor at saturation\n", + "#The dew point temperature is the saturation temperature corresponding to the partial pressure of the water vapor in the mixture.So,\n", + "print \"The dew point temperature corresponding to %.2f psia is 39F\"%((0.00799/0.0477)*0.6988);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The partial pressure of the dry air is 14.00 psia\n", + "The mass of dry air in the 467.7 ft**3 container is 32.14 lbm\n", + "The relative humidity of the mixture is 16.75 \n", + "The partial pressure of the vapor at saturation is 0.12 psia\n", + "And the partial pressure of the dry air in the mixture is 10.16 psia\n", + "The dew point temperature corresponding to 0.12 psia is 39F\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page No : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.14 Using equations, Rm = ((ma/(ma+mv))*Ra)+((mv/(ma+mv))*Rv) and phy*pvs = pv\n", + "W = 0.005; \t\t\t#Humidity ratio\n", + "pm = 14.7; \t\t\t#mixture is at 14.7 psia\n", + "#W = 0.622*(pv/(pm-pv))\n", + "#Rearranging,\n", + "pv = (W*pm)/(0.622+W); \t\t\t#the partial pressure of the water vapor \n", + "print \"The partial pressure of the water vapor is %.2f psia\"%(pv);\n", + "pa = pm-pv; \t\t\t#pa = the partial pressure of the dry air in the mixture\n", + "print \"The partial pressure of dry air is %.2f psia\"%(pa);\n", + "#It is necessary to obtain pvs from the Steam Tables at 90 F.This is 0.6988 psia.\n", + "pvs = 0.6988; \t\t\t#saturation pressure of water vapor at the temperature of mixture\n", + "print \"The partial pressure of the water vapor at saturation is %.2f psia\"%(pvs);\n", + "#Therefore,\n", + "phy = pv/pvs; \t\t\t#relative humidity\n", + "print \"The relative humidity is %.2f percent\"%(phy*100);\n", + "#The dew point temperature is the saturation temperature corresponding to 0.117 psia,which is found from the Steam Tables to be 39 F.\n", + "print \"The dew point temperature of the mixture is 39 F\";\n", + "#The results of this problem and problem 7.14 are in good agreement\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The partial pressure of the water vapor is 0.12 psia\n", + "The partial pressure of dry air is 14.58 psia\n", + "The partial pressure of the water vapor at saturation is 0.70 psia\n", + "The relative humidity is 16.78 percent\n", + "The dew point temperature of the mixture is 39 F\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page No : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "pm = 14.7; \t\t\t#the barometer is at 14.7 psia \t\t\t#mixture is at 14.7 psia\n", + "#The amount of water vapor removed (per pound of dry air) is the difference between the humidity ratio (specific humidity) at inlet and outlet of the conditioning unit.We shall therefore evalute W for both specified conditions.Because phy = pv/pvs,\n", + "#At 90F:\n", + "phy = 0.7; \t\t\t#relative humidity\n", + "pvs = 0.6988; \t\t\t#psia \t\t\t#saturation pressure of water vapor at the temperature of mixture\n", + "pv = phy*pvs; \t\t\t#psia \t\t\t#the partial pressure of the water vapor \n", + "pa = pm-pv; \t\t\t#psia \t\t\t#pa = the partial pressure of the dry air in the mixture\n", + "W = 0.622*(pv/pa); \t\t\t#Humidity ratio\n", + "\n", + "#At 80F:\n", + "phy = 0.4; \t\t\t#relative humidity\n", + "pvs = 0.5073; \t\t\t#psia \t\t\t#saturation pressure of water vapor at the temperature of mixture\n", + "pv = phy*pvs; \t\t\t#psia \t\t\t#the partial pressure of the water vapor \n", + "pa = pm-pv; \t\t\t#psia \t\t\t#pa = the partial pressure of the dry air in the mixture\n", + "w = 0.622*(pv/pa); \t\t\t#Humidity ratio\n", + "\n", + "print \"The amount of water removed per pound of dry air is %.2f\"%(W-w);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of water removed per pound of dry air is 0.01\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.13 Using the psychrometric chart\n", + "#Entering figure 7.11 at a dry-bulb temperature of 80 F,we proceed vertically until we reach 50% humidity curve.At this intersection,we proceed horizontally and read the dew-point temperature as approximately 60 F.\n", + "print \"The dew point temperature of air is 60 F\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dew point temperature of air is 60 F\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.14 Using the psychrometric chart\n", + "#In this problem,we are given the moisture content of the air to be 0.005 lb per pound of dry air.\n", + "#This corresponds to 0.005*7000 = 35 grains per pound of dry air.\n", + "#Entering the chart at 90F and proceeding verticaly to 35 grains per pound of dry air,we find the dew point to be 39F by proceeding horizontally to the intersection with the saturation curve. \n", + "print \"The dew-point temperature of the mixture is 39 F\";\n", + "print \"The relative humidity is approximately 17 percent\";\n", + "#From the leftmost scale,we read the pressure of water vapor to be 0.12 psia.\n", + "print \"The partial pressure of the air is %.2f psia\"%(14.7-0.12);\n", + "#Comparing these results to problem 7.14,indicated good agreement between the results obtained by chart and by calculation\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dew-point temperature of the mixture is 39 F\n", + "The relative humidity is approximately 17 percent\n", + "The partial pressure of the air is 14.58 psia\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page No : 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.16 Using the psychrometric chart\n", + "#The initial conditions are 90 F and 70% relative humidity\n", + "#Entering the chart at 90 F dry bulb temperature and proceeding vertically to 70% relative humidity,we find the air to have 150 grains water vapor per pound of dry air.At the final condition of 80F and 40% relative humidity,we read 61 grains of water/lb of dry air.\n", + "#So,\n", + "print \"The water removed is %.2f grains per pound of dry air\"%(150-61);\n", + "print \"Or %.2f lb of water per pound of dry air is removed\"%((150.-61)/7000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The water removed is 89.00 grains per pound of dry air\n", + "Or 0.01 lb of water per pound of dry air is removed\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 Page No : 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#dry bulb temperature is 50 F\n", + "#relative humidity is 50 percent\n", + "#We first locate 50 F and 50 percent relative humidity on figure 7.11.At this state,we read 26 grains of water per pound of dry air and a total heat of 16.1 Btu per pound of a dry air.\n", + "#We now proceed horizontally to 80 F at a constant value of 26 grains of water per pound of dry air and read a total heat of 23.4 Btu per pound of dry air.\n", + "print \"The heat required is %.2f Btu per pound of dry air\"%(23.4-16.1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat required is 7.30 Btu per pound of dry air\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21 Page No : 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#An evaporative cooling process\n", + "#Because the exit air is saturated,we find the exit condition on the curve corresponding to a wet-bulb temperature of 50 F.The process is carried out at constant total enthalpy,which is along a line of constant wet-bulb temperature.\n", + "#Proceeding along the 50 F wet-bulb temperature line of figure 7.11 diagonally to the right until it intersects with the vertical 80 F dry-bulb temperature line yields a relative humidity of approximately 4 %\n", + "print \"For An evaporative cooling process, The relative humidity of the entering air is 4 percent\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For An evaporative cooling process, The relative humidity of the entering air is 4 percent\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22 Page No : 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#As noted from figure 7.27, 1 lb of mixture,4/5 lb of indoor air,and 1/5 lb of outdoor air are mixed per pound of mixture. \n", + "#We now locate the two end states on the psychrometric chart and connect them with a straight line.The line connecting the end states is divided into 5 equal parts. Using the results of equation, (ha-ha2)/(ha-ha1) = (W2-W)/(W-W1) = ma1/ma2 = l1/l2 ,we now proceed from the 75 F indoor air state 1 part toward the 90F outdoor air state.This Locates \n", + "print \"The final mixture, which is found to be a dry-bulb temperature of approximately 78 F, \\\n", + "a wet-bulb temperature of 66 F and relative humidity of 54 percent\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final mixture, which is found to be a dry-bulb temperature of approximately 78 F, a wet-bulb temperature of 66 F and relative humidity of 54 percent\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.23 Page No : 358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The cooling tower\n", + "#From the Steam tables,\n", + "#For water:\n", + "h100F = 68.05; \t\t\t#Btu/lbm \t\t\t#enthalpy at 100 F\n", + "h70F = 38.09; \t\t\t#Btu/lbm \t\t\t#enthalpy at 70 F\n", + "#For air:\n", + "h = 20.4; \t\t\t#Unit:Btu/lb \t\t\t#at inlet,total heat/lb dry air\n", + "w = 38.2; \t\t\t#Unit:grains/lb \t\t\t#at inlet,moisture pickup/lb dry air (at 60F D.B. and 50% R.H.)\n", + "H = 52.1; \t\t\t#Unit:Btu/lb \t\t\t#at outlet,total heat/lb dry air\n", + "W = 194.0; \t\t\t#Unit:grains/lb \t\t\t#at outlet,moisture pickup/lb dry air (at 90F D.B. and 90% R.H.)\n", + "\n", + "#Per pound of dry air,the heat interchange is H-h Btu per pound of dry air.\n", + "#Per pound of dry air,the moisture increase is (W-w)/7000 lb per pound of dry air.\n", + "#From the equation, ma*(H-h) = 200000*h100F - mwout*h70F \t\t\t#ma = mass of air mwout = mass of cooled water \n", + "#and ma*((W-w)/7000) = 200000 - mwout\n", + "#Solving the latter equation for mwout,we have mwout = 200000-(ma*((W-w)/7000))\n", + "#Substituting this into the heat balance yields,\n", + "# ma*(H-h) = 200000*h100F - 200000*h70F + ma*h70F*((W-w)/7000)\n", + "#Solving gives us,\n", + "ma = (200000*(h100F-h70F))/((H-h)-(h70F*((W-w)/7000))); \t\t\t#The amount of air required per hour \t\t\t#Unit:lbm/hr of dry air\n", + "print \"The amount of air required per hour is %.2f lbm/hr of dry air\"%(ma);\n", + "print \"The amount of water lost per hour due to evaporation is %.2f lbm/hr\"%((ma*W-w)/7000)\n", + "#note that the water evaporated is slightly over 2% of the incoming water,and this is the makeup that has to be furnished to the tower.\n", + "#answer are slightly differ because of value of (W-w)/7000 is given 0.0233 instead of 0.0225\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of air required per hour is 194216.14 lbm/hr of dry air\n", + "The amount of water lost per hour due to evaporation is 5382.56 lbm/hr\n" + ] + } + ], + "prompt_number": 45 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb index 5c6dac8c..5c6dac8c 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_2.ipynb new file mode 100755 index 00000000..5c6dac8c --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_2.ipynb @@ -0,0 +1,697 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:772f93702cda26918438fd90c36e1594260fd40351e3deed6d4e9bb6febe0344" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Vapor Power Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the Steam Tables or Mollier chart in Appendix 3,we find that\n", + "hf = 340.49; \t\t\t#Unit:kJ/kg \t\t\t#at 50kPa \t\t\t#enthalpy\n", + "h1 = hf; \t\t\t#at 50kPa \t\t\t#hf = enthalpy of saturated liquid \t\t\t#Unit:kJ/kg\n", + "h4 = 3230.9; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n", + "h5 = 2407.4; \t\t\t#Unit:kJ/kg \t\t\t#\t\t\t#enthalpy\n", + "#Here,point 5 is in the wet steam region.\n", + "print \"Solution for a\";\n", + "#Neglecting pump work (h2 = h1) gives\n", + "nR = (h4-h5)/(h4-h1); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n", + "\n", + "print \"Solution for b\";\n", + "p2 = 3000; \t\t\t#Unit:kPa \t\t\t#Upper pressure\n", + "p1 = 50; \t\t\t#Unit:kPa \t\t\t#Lower pressure\n", + "vf = 0.001030; \t\t\t#Specific volume of saturated liquid \t\t\t#m**3/kg\n", + "Pumpwork = (p2-p1)*vf; \t\t\t#Unit:kJ/kg \t\t\t#pump work\n", + "#The efficiency of the cycle including pump work is\n", + "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The thermal efficiency of the cycle is 28.49 percentage\n", + "Solution for b\n", + "The thermal efficiency of the cycle including pump work is 28.42 percentage\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Using the computer disk to obtain the neccesary properties\n", + "print \"Solution for a\";\n", + "#For the conditions given in problem8.1,the properties are found to be\n", + "hf = 340.49; \t\t\t#Unit:kJ/kg \t\t\t#at 50kPa \t\t\t#enthalpy\n", + "h1 = hf; \t\t\t#at 50kPa \t\t\t#hf = enthalpy of saturated liquid\n", + "h2 = h1; \t\t\t#Enthalpy \t\t\t#Unit:kJ/kg\n", + "h4 = 3230.9; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n", + "h5 = 2407.4; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n", + "#Neglecting pump work \n", + "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n", + "\n", + "print \"Solution for b\";\n", + "#For the pump work,we do not need the approximation,because the computerized tables give us the necessary values directly.\n", + "#Assuming that the condensate leaving the condenser is saturated liquid gives us an enthalpy of 340.54 kJ/kg and an entropy of 1.0912 kJ/kg*K for an isentropic compression, the final cond-ition is the boiler pressure of 3Mpa and an entropy of 1.0912 kJ/kg*K. For these values,the program yields an enthalpy of 343.59 kJ/kg*K.The isentropic pump work is equal to \n", + "Pumpwork = 343.59-340.54; \t\t\t#Unit:kJ/kg \t\t\t#pumpwork\n", + "#The efficiency of the cycle including pump work is\n", + "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n", + "#Final results in this problem agree with the result in problem8.1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The thermal efficiency of the cycle is 28.49 percentage\n", + "Solution for b\n", + "The thermal efficiency of the cycle including pump work is 28.42 percentage\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Solution for (a)\n", + "#Figurre 8.3 with the cycle extending into the superheat region and expanding along 4->5 is the appropriate diagram for this process.\n", + "\n", + "print \"Solution for b\";\n", + "#This problem can be solved either by use of the Mollier chart or the Steam Tables.If the chart is used,14.696 psia is first located on the saturated vapor line.Because the expansion,4->5,is isentropic,a vertical line on the chart is the path of the process.The point corresponding to 4 in figure 8.3 is found where this vertical line intersects 400 psia.At this point,the ent-halpy is 1515 Btu/lbm,and the corresponding temperature is approximatelty 980F.Saturated vapor at 14.696 psia has an enthalpy of 1150.5 Btu/lbm(from the Mollier chart).The Steam Tables sh-ow that saturated liquid at 14.696 psia has an enthalpy of 180.15 Btu/lbm.In terms of figure 8.3,and neglecting pump work,we have \n", + "h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = h1; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h5 = 1150.5; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n", + "#Neglecting pump work yields\n", + "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n", + "print \"Neglecting the pump work, The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n", + "p2 = 400; \t\t\t#Unit:Psia \t\t\t#Upper pressure\n", + "p1 = 14.696; \t\t\t#Unit:Psia \t\t\t#Lower pressure\n", + "vf = 0.01167; \t\t\t#Specific volume of saturated liquid \t\t\t#ft**3/lbm\n", + "J = 778; \t\t\t#Conversion factor\n", + "Pumpwork = ((p2-p1)*vf*144)/J; \t\t\t#Unit:Btu/lbm \t\t\t#1ft**2 = 144 in**2 \t\t\t#pumpwork\n", + "#The efficiency of the cycle including pump work is\n", + "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n", + "#where the denominator is h4-h2 = h4-h1-(h2-h1).Neglecting pump work is obviously justified in this case.An alternative solution is obtained by Using the Steam Tables:at 14.696 psia ans sat-uration,sg = 1.7567 ; at 400 psia,s = 1.7567.From Table 3(at 400 psia)\n", + "# s h t\n", + "#1.7632 1523.6 1000 \n", + "#1.7567 1514.2 982.4\n", + "#1.7558 1512.9 980" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for b\n", + "Neglecting the pump work, The thermal efficiency of the cycle is 27.31 percentage\n", + "The thermal efficiency of the cycle including pump work is 27.26 percentage\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Refer to figure8.3.The desired quantities are obtained as follows:\n", + "#at 14.696 psia,saturated vapor (x = 1),s = 1.7566 Btu/lbm*R\n", + "h5 = 1150.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthaply\n", + "#at 14.696 psia,saturated liquid (x = 0),s = 0.3122 Btu/lbm*R\n", + "h2 = 180.17; \t\t\t#Unit:Btu/lbm \t\t\t#enthaply \n", + "h1 = h2;\n", + "#at 400 psia,s = 1.7566 Btu/lbm*R,\n", + "h4 = 1514.0; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "t = 982.07; \t\t\t#Unit:F \t\t\t#tempearature\n", + "#at 400 psia,s = 0.3122 Btu/lbm*R, \t\t\t#s = entropy\n", + "h = 181.39; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "#Note the agreement of these values with the ones obtained for problem8.4.Alos,note the temperature of 982.07F compared to 982.4F.Continuing,\n", + "#Neglecting pump work \n", + "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n", + "print \"Neglecting the pump work, The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n", + "Pumpwork = h-h2; \t\t\t#Unit:kJ/kg \t\t\t#/pumpwork\n", + "#The efficiency of the cycle including pump work is\n", + "nR = ((h4-h5)-Pumpwork)/((h4-h2)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Neglecting the pump work, The thermal efficiency of the cycle is 27.26 percentage\n", + "The thermal efficiency of the cycle including pump work is 27.19 percentage\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The Carnot cycle would operate between 982.4F and 212F.\n", + "T1 = 982.4+460; \t\t\t#temperature converted to absolute temperature \t\t\t#Unit:R\n", + "T2 = 212+460; \t\t\t#temperature converted to absolute temperature \t\t\t#Unit:R\n", + "nc = ((T1-T2)/T1)*100; \t\t\t#Efficiency of carnot cycle\n", + "print \"The efficiency is %.2f percentage\"%(nc);\n", + "#In problem 8.3,\n", + "nR = 27.3; \t\t\t#Thermal efficiency of the cycle neglecting the pump work\n", + "typen = (nR/nc)*100; \t\t\t#Type efficiency = ideal thermal efficiency/efficiency of carnot cycle operating between min and max temperature limits\n", + "print \"The type efficiency of the ideal Rankine cycle is %.2f percentage\"%(typen);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is 53.41 percentage\n", + "The type efficiency of the ideal Rankine cycle is 51.11 percentage\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For the upper temperature of the cycle,we have 400C,and for 50kPa,the steam tables give us a saturation temperature of 81.33C.The efficiency of a Carnot cycle operating between the limits would be\n", + "T1 = 400+273; \t\t\t#Celcius temperature converted to fahrenheit temperature\n", + "T2 = 81.33+273; \t\t\t#temperature converted to fahrenheit temperature\n", + "nc = ((T1-T2)/T1)*100; \t\t\t#Efficiency of carnot cycle\n", + "print \"The efficiency is %.2f percentage\"%(nc);\n", + "#In problem 8.1,\n", + "nR = 28.5; \t\t\t#Thermal efficiency of the cycle neglecting the pump work\n", + "typen = (nR/nc)*100; \t\t\t#Type efficiency = ideal thermal efficiency/efficiency of carnot cycle operating between min and max temperature limits\n", + "print \"The type efficiency of the ideal Rankine cycle is %.2f percentage\"%(typen);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is 47.35 percentage\n", + "The type efficiency of the ideal Rankine cycle is 60.19 percentage\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No : 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From problem 8.3,\n", + "work = 1515-1150.5; \t\t\t#Unit:Btu/lbm of steam \t\t\t#pump work is neglected \t\t\t#Useful ideal work\n", + "#Because of the heat losses, 50 Btu/lbm of the 364.5 Btu/lbm becomes unavailable.\n", + "available = 364.5-50; \t\t\t#Unit:Btu/lbm \n", + "n = available/(1515-180.15); \t\t\t#Thermal efficiency of the cycle neglecting pump work h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy & h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"The thermal efficiency of the cycle neglecting pump work is %.2f percentage\"%(n*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thermal efficiency of the cycle neglecting pump work is 23.56 percentage\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 Page No : 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Neglecting the pump work,we have\n", + "heatrate = 3413/0.273; \t\t\t#Unit:Btu/kWh \t\t\t#0.273 = efficiency \t\t\t#1 kWh = 3413 \t\t\t#heat rate\n", + "print \"The heat rate is %.2f Btu/kWh\"%(heatrate);\n", + "#Per pound of steam,1515-1150.5 = 364.5 Btu is delivered.\n", + "#Because 1 kWh = 3413\n", + "print \"The steam rate is %.2f lbm of steam per kilowatt-hour\"%(3413./1515-1150.5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat rate is 12501.83 Btu/kWh\n", + "The steam rate is -1148.25 lbm of steam per kilowatt-hour\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 Page No : 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The Mollier chart provides a convenient way of solving this problem.Expanding from 980F,400 psia,s = 1.7567 to 200 psia yields a final enthalpy of 1413 Btu/lbm.Expanding from 200 psia ans an enthalpy of 1515 Btu/lbm to 14.696 psia yields a final enthaply of 1205 Btu/lbm. \n", + "h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h5 = 1205; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h7 = 1413; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "nreheat = ((h4-h5)+(h4-h7))/((h4-h1)+(h4-h7)); \t\t\t#The efficiency of the reheat cycle\n", + "print \"The efficiency of the reheat cycle is %.2f percentage\"%(nreheat*100);\n", + "#It is apparent that for the conditions of this problem,the increase in efficiency is not very large.The final condition of the fluid after the second expansion is superheated steam at \n", + "#14.696 psia.By condenmath.sing at this relatively high pressure condition,a large amount of heat is rejected to the condenser cooling water.7\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the reheat cycle is 28.67 percentage\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10 Page No : 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Some of the property data required was found in problem8.4.In addition we have,\n", + "#at 200 psia,s = 1.7566 Btu/lbm*R,\n", + "h7 = 1413.6; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "#at 200 psia,s = 1.8320 Btu/lbm*R,\n", + "h4 = 1514.0; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "#at 14.696 psia,s = 1.8320 Btu/lbm*R,\n", + "h5 = 1205.2; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "h1 = 180.17; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "\n", + "# Calculations\n", + "#Using these data,\n", + "nreheat = ((h4-h5)+(h4-h7))/((h4-h1)+(h4-h7)); \t\t\t#The efficiency of the reheat cycle \n", + "\n", + "# Results\n", + "print \"The efficiency of the reheat cycle is %.2f percentage\"%(nreheat*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the reheat cycle is 28.53 percentage\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11 Page No : 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Solution for a\";\n", + "#For the rankine cycle,the Mollier chart gives\n", + "h4 = 1505; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "h5 = 922; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "h6 = h5; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "#and at the condenser,\n", + "h1 = 69.74; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "nR = (h4-h5)/(h4-h1); \t\t\t#efficiency of rankine cycle\n", + "print \"The efficiency of rankine cycle is %.2f percentage\"%(nR*100);\n", + "\n", + "print \"Solution for b\";\n", + "#Figure 8.16 shows the regenerative cycle.After doing work(isentropically),W lbs of steam are bled from the turbine at 50 psia for each lbm of steam leaving the steam generator,and (1-W) pound goes through the turbine and is condensed in the condenser to saturated liquid at 1 psia.This condensate is pumped to the heater,where it mixes with the extraced steam and leaves as saturated liquid at 50 psia.The required enthalpies are:\n", + "#Leaving turbine:\n", + "h5 = 1168; \t\t\t#Btu/lbm at 50 psia \n", + "#Leaving condenser:\n", + "h7 = 69.74; \t\t\t#Btu/lbm at 1 psia \t\t\t# is equal to h8 if pump work is neglected\n", + "#Leaving heater:\n", + "h1 = 250.24; \t\t\t#Btu/lbm at 50 psia \t\t\t#is equal to h2 if pump work is neglected(saturated liquid)\n", + "#A Heat balance around the heater gives\n", + "#W*h5 + (1-W)*h7 = 1*h1 \n", + "W = ((1*h1)-h7)/(h5-h7); \t\t\t#Unit:lbm \t\t\t#W lb of steam \n", + "print \"W = %.2f lbm\"%(W);\n", + "work = (1-W)*(h4-922) + W*(h4-h5); \t\t\t#h5 = 922 from the mollier chart \t\t\t#Unit:Btu/lbm \t\t\t#The work output\n", + "print \"The work output is %.2f Btu/lbm\"%(work);\n", + "#Heat into steam generator equals the enthalpy leaving minus the enthalpy of the saturated liquid entering at 50 psia:\n", + "qin = h4-h1; \t\t\t#Unit:Btu/lbm \t\t\t#Heat in\n", + "n = work/qin; \t\t\t#Efficiency of regenerative cycle\n", + "print \"The efficiency of regenerative cycle is %.2f percentage\"%(n*100);\n", + "#The efficiency of a regenerative cycle with one open heater is given by \n", + "n = 1-(((h5-h1)*(h6-h7))/((h4-h1)*(h5-h7))); \t\t\t#efficiency of a regenerative cycle\n", + "W = (h1-h7)/(h5-h7); \t\t\t#Unit:lbm \t\t\t#W lb of steam\n", + "print \"When the rankine cycle is compared with regenerative cycle\"\n", + "print \"W = %.2f lbm and the efficiency of a regenerative cycle with one open heater is given by %.2f percentage\"%(W,n*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The efficiency of rankine cycle is 40.62 percentage\n", + "Solution for b\n", + "W = 0.16 lbm\n", + "The work output is 542.57 Btu/lbm\n", + "The efficiency of regenerative cycle is 43.24 percentage\n", + "When the rankine cycle is compared with regenerative cycle\n", + "W = 0.16 lbm and the efficiency of a regenerative cycle with one open heater is given by 43.24 percentage\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12 Page No : 396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Figure 8.16(a) shows the cycle.For this cycle,W2 pounds are extracted at 100 psia,and W1 pounds are extracted at 50 psia for each pound produced by the steam generator.The enthalpies that are required are:\n", + "#Leaving turbine: 922 \t\t\t#Btu/lbm at 1 psia\n", + "#Leaving condenser: 69.74 \t\t\t#Btu/lbm at 1 psia (saturated liquid)\n", + "#Leaving low pressure heater: 250.24 \t\t\t#Btu/lbm at 50 psia (saturated liquid)\n", + "#Leaving high pressure heater: 298.61 \t\t\t#Btu/lbm at 100 psia\n", + "#At low pressure extraction: 1168 \t\t\t#Btu/lbm at 50 psia\n", + "#At high pressure extraction: 1228.6 \t\t\t#Btulbm at 100 psia\n", + "#Entering turbine: 1505 \t\t\t#Btu/lbm\n", + "#The heat balance around the high pressure heater gives us\n", + "#W2*1228.6 + (1-W2)*250.24 = 1*298.61\n", + "W2 = ((1*298.61)-250.24)/(1228.6-250.24); \t\t\t#lbm \t\t\t#W2 pounds are extracted at 100 psia\n", + "print \"W2 = %.2f lbm\"%(W2);\n", + "#A heat balance around the low pressure heater yields\n", + "#W1*1168 + (1-W1-W2)*69.74 = (1-W2)*250.24\n", + "W1 = (((1-W2)*250.24)-69.74+(W2*69.74))/(1168-69.74); \t\t\t#lbm \t\t\t#W1 pounds are extracted at 50 psia\n", + "print \"W1 = %.2f lbm\"%(W1);\n", + "work = ((1505-1228.6)*1)+((1-W2)*(1228.6-1168))+((1-W1-W2)*(1168-922)); \t\t\t#The work output \t\t\t#Btu/lbm\n", + "print \"The work output is %.2f Btu/lbm\"%(work);\n", + "#Heat into the steam generator equals the enthalpy leaving minus the enthalpy of saturated liquid at 100 psia:\n", + "qin = 1505-298.61; \t\t\t#Btu/lbm \t\t\t#Heat in \n", + "print \"Heat in = %.2f Btu/lbm\"%(qin);\n", + "n = work/qin; \t\t\t#The efficiency\n", + "print \"The efficiency is %.2f percentage\"%(n*100);\n", + "#In terms of figure 8.16a,\n", + "#W2 = (h1-h11)/(h5-h11)\n", + "#W1 = (h5-h1/h6-h9)*(h10-h9/h5-h10) neglecting the pump work\n", + "#n = 1-(h7-h8/h4-h1)*(h5-h1/h5-h10)*(h6-h10/h6-h8)\n", + "#For this problem , h8 = h9 , h10 = h11 and h1 = h2.Thus\n", + "W2 = (298.61-250.24)/(1228.6-250.24); \t\t\t#lbm \t\t\t#W2 pounds are extracted at 100 psia\n", + "print \"Comparing the results\"\n", + "print \"W2 = %.2f lbm\"%(W2);\n", + "W1 = ((1228.6-298.61)*(250.24-69.74))/((1168-69.74)*(1228.6-250.24)); \t\t\t#lbm \t\t\t#W1 pounds are extracted at 50 psia\n", + "print \"W1 = %.2f lbm\"%(W1); \n", + "n = 1-(((922-69.74)*(1228.6-298.61)*(1168-250.24))/((1505-298.61)*(1228.6-250.24)*(1168-69.74))); \t\t\t#Efficiency\n", + "print \"The efficiency is %.2f percentage\"%(n*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W2 = 0.05 lbm\n", + "W1 = 0.16 lbm\n", + "The work output is 529.41 Btu/lbm\n", + "Heat in = 1206.39 Btu/lbm\n", + "The efficiency is 43.88 percentage\n", + "Comparing the results\n", + "W2 = 0.05 lbm\n", + "W1 = 0.16 lbm\n", + "The efficiency is 43.88 percentage\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13 Page No : 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Regenerative cycle\n", + "#Assume that 1 lbm of steam leaves the steam generator and that W1 lbm is bled off to the closed heater at 100psia and that W2 lbm is bled off to the open heater at 50 psia.Alos,assume that the feedwater leaving the closed heater at 310F,18F less than the saturation temperature corresponding to 100 psia.For calculation purposes,we will use hf at 310 F for this enthalpy.Using the Mollier diagram and the steam tables,we find the following values of enthalpy:\n", + "\n", + "#h to turbine = 1505 Btu/lbm(at 1000 psia and 1000F)\n", + "#h at first extraction = 1228 Btu/lbm(isentropically to 100 psia)\n", + "#h at second extraction = 1168 Btu/lbm(isentropically to 100 psia)\n", + "#h at turbine exit = 922 Btu/lbm (isentropically to 1 psia)\n", + "#hf = 298.61 Btu/lbm(at 100 psia)\n", + "#hf = 250.24 Btu/lbm(at 50 psia)\n", + "#hf = 280.06 Btu/lbm(at 310 F)\n", + "#hf = 69.74 Btu/lbm (at 1 psia)\n", + "#A heat balance around the high pressure heater gives us\n", + "#W1*(1228-298.61) = 1*(280.06-250.24)\n", + "W1 = ((1*(280.06-250.24)))/(1228-298.61); \t\t\t#lbm \t\t\t#W1 lbm is extracted at 100 psia\n", + "print \"W1 = %.2f lbm\"%(W1);\n", + "#A heat balance around the open heater gives us\n", + "#W2*1168 +(1-W1-W2)*69.74 + W1*268.61 = 1*250.24\n", + "W2 = ((1*250.24)-(W1*268.61)-69.74+(W1*69.74))/(1168-69.74); \t\t\t#lbm \t\t\t#W2 lbm is extracted at 50 psia\n", + "print \"W2 = %.2f lbm\"%(W2);\n", + "#The work output of the cycle consists of the work that 1 lbm does in expanding isentropically to 100 psia,plus the work done by (1-W1)lbm expanding isentropicaly from 100 to 50 psia,plus the work done by (1-W1-W2)lbm expanding isentropically from 50 to 1 psia.\n", + "#Numerically,the work is\n", + "workoutput = (1*(1505-1228))+((1-W1)*(1228-1168))+((1-W1-W2)*(1168-922)); \t\t\t#Btu/lbm \t\t\t#the work output\n", + "print \"The work output is %.2f Btu/lbm\"%(workoutput);\n", + "heatinput = 1505-280.06; \t\t\t#Btu/lbm \t\t\t#the heat input\n", + "print \"The heat input is %.2f Btu/lbm\"%(heatinput);\n", + "n = workoutput/heatinput; \t\t\t#Efficiency\n", + "print \"The efficiency is %.2f percentage\"%(n*100);\n", + "#When compared to 8.11,we conclude that the addition of additional closed heater raises the efficiency. \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W1 = 0.03 lbm\n", + "W2 = 0.16 lbm\n", + "The work output is 534.18 Btu/lbm\n", + "The heat input is 1224.94 Btu/lbm\n", + "The efficiency is 43.61 percentage\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14 Page No : 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From problem 8.11,\n", + "#Leaving turbine:\n", + "h5 = 1168.; \t\t\t#Btu/lbm at 50 psia \n", + "#For the rankine cycle,the Mollier chart gives\n", + "h4 = 1505.; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "h6 = 922.; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm \t\t\t#h6 = h5;\n", + "#and at the condenser,\n", + "h1 = 69.74; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "#Leaving condenser:\n", + "h7 = 69.74; \t\t\t#Btu/lbm at 1 psia \t\t\t# is equal to h8 if pump work is neglected\n", + "#Leaving heater:\n", + "h2 = 250.24; \t\t\t#Btu/lbm at 50 psia \t\t\t#is equal to h1 if pump work is neglected(saturated liquid)\n", + "#A Heat balance around the heater gives\n", + "#W*h5 + (1-W)*h7 = 1*h1 \n", + "W = ((1*h2)-h7)/(h5-h7); \t\t\t#Unit:lbm\n", + "liquidleaving = (W*h2)+(1-W)*h1; \t\t\t#Btu/lbm \t\t\t#liquid leaving the heatexchange\n", + "\n", + "#Using these data,,\n", + "heatin = h4-liquidleaving; \t\t\t#Btu/lbm \t\t\t#heat in the boiler\n", + "print \"Heat in at boiler is %.2f Btu/lbm\"%(heatin);\n", + "workout = ((1-W)*(h4-h6))+(W*(h4-h5)); \t\t\t#Btu/lbm \t\t\t#The work out of turbine\n", + "print \"The work out of turbine is %.2f Btu/lbm\"%(workout);\n", + "n = workout/heatin; \t\t\t#efficiency \t\t\t#The conventional thermal efficiency\n", + "print \"The conventional thermal efficiency is %.2f percentage\"%(n*100);\n", + "#If at this time we have define the efficiency of energy utilization to be the ratio of the work out plus the useful heat out divided by the heat input to the cycle, nenergyutilization = ((w+qoutuseful)/qin)*100\n", + "qout = W*(h5-h2); \t\t\t#heat out \t\t\t#Btu/lbm\n", + "n = (workout+qout)/heatin; \t\t\t#efficiency of energy utilization\n", + "print \"Efficiency of energy utilization is %.2f percentage\"%(n*100);\n", + "#Comparing with 8.11, we see that conventional thermal efficiency is decreased and efficiency of energy utilization is increased\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat in at boiler is 1405.59 Btu/lbm\n", + "The work out of turbine is 542.57 Btu/lbm\n", + "The conventional thermal efficiency is 38.60 percentage\n", + "Efficiency of energy utilization is 49.33 percentage\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb index 6d86fb8c..6d86fb8c 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_2.ipynb new file mode 100755 index 00000000..86b7d951 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_2.ipynb @@ -0,0 +1,528 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c78d396c993e1067d10db02248ea7bb1149674e24ff2199a434e078a4771b88f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Gas Power Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Rc = 7.; \t\t\t#Compression Ratio Rc = v2/v3\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "notto = (1-(1/Rc)**(k-1))*100; \t\t\t#Efficiency of an otto engine\n", + "print \"The efficiency of the otto cycle is %.2f percentage\"%(notto);\n", + "#For the carnot cycle,\n", + "#Nc = 1-(T2/T4) \t\t\t#efficiency for the carnot cycle \t\t\t#T2 = lowest temperature \t\t\t#T4 = Highest temperature\n", + "\n", + "T2 = 70.+460; \t\t\t#for converting to R \t\t\t#Conversion of unit\n", + "#At 700 F\n", + "T4 = 700.+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n", + "print \"When peak temperature is 700 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc); \n", + "\n", + "#At 1000 F\n", + "T4 = 1000.+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n", + "print \"When peak temperature is 1000 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc);\n", + "\n", + "#At 3000 F\n", + "T4 = 3000.+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n", + "print \"When peak temperature is 3000 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the otto cycle is 54.08 percentage\n", + "When peak temperature is 700 fahrenheit, efficiency of the carnot cycle is 54.31 percentage\n", + "When peak temperature is 1000 fahrenheit, efficiency of the carnot cycle is 63.70 percentage\n", + "When peak temperature is 3000 fahrenheit, efficiency of the carnot cycle is 84.68 percentage\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "cv = 0.172; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant\n", + "Rc = 7; \t\t\t#Compression Ratio Rc = v2/v3\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "T2 = 70+460; \t\t\t#for converting to R \t\t\t#Conversion of unit\n", + "#For 1000 F\n", + "T4 = 1000+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "T3byT2 = Rc**(k-1); \t\t\t#Unit less\n", + "T3 = T3byT2*T2;\n", + "qin = cv*(T4-T3); \t\t\t#Unit:Btu/lbm \t\t\t#Heat added\n", + "#Qr = cv*(T5-T2)*(T5/T4) = (v2/v3)**(k-1)\n", + "Qr = (inv([[Rc]]))**(k-1); \t\t\t#Unit:Btu/lbm \t\t\t#Heat rejected\n", + "T5 = T4*Qr;\n", + "Qr = cv*(T5-T2); \t\t\t#Unit:Btu/lbm \t\t\t#Heat rejected\n", + "print \"The net work out is %.2f Btu/lbm\"%(qin-Qr);\n", + "notto = ((qin-Qr)/qin)*100; \t\t\t#The efficiency of otto cycle \n", + "print \"The efficiency of otto cycle is %.2f percentage\"%(notto);\n", + "#The value agrees with the results of problem 9.1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The net work out is 28.44 Btu/lbm\n", + "The efficiency of otto cycle is 54.08 percentage\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "cv = 0.7186; \t\t\t#Unit:kJ/(kg*K) \t\t\t#Specific heat constant for constant volume process\n", + "Rc = 8.; \t\t\t#Compression Ratio Rc = v2/v3\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "T2 = 20.+273; \t\t\t#20 C converted to its kelvin value\n", + "qin = 50.; \t\t\t#Heat added \t\t\t#Unit:kJ\n", + "T3byT2 = Rc**(k-1);\n", + "T3 = T3byT2*T2; \t\t\t#Unit:K\n", + "#qin = cv*(T4-T3) \t\t\t#heat added \t\t\t#Unit:kJ\n", + "T4 = (qin/cv)+T3; \t\t\t#The peak temperature of the cycle \t\t\t#Unit:K\n", + "print \"The peak temperature of the cycle is %.2f Kelvin i.e. %.2f Celcius\"%(T4,T4-273);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The peak temperature of the cycle is 742.72 Kelvin i.e. 469.72 Celcius\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For an Otto cycle,\n", + "rc = 7.; \t\t\t#Compression Ratio Rc = v2/v3\n", + "q = 50.; \t\t\t#Unit:Btu/lbm \t\t\t#Heat added\n", + "p2 = 14.7; \t\t\t#Unit:psia \t\t\t#pressure at point 2\n", + "T2 = 60.+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R\n", + "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n", + "cv = 0.171; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant volume process\n", + "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "#Refering to figure 9.9,\n", + "#At (2),we need v2.\n", + "#p2*v2 = R*T2\n", + "v2 = (R*T2)/(p2*144); \t\t\t#Unit:ft**3/lbm \t\t\t#1ft**2 = 144 in**2 \t\t\t#specific volume at point 2\n", + "print \"At point 2, specific volume v2 = %.2f ft**3/lbm\"%(v2);\n", + "#For The isentropic path (2)&(3),p3*v3**k = p2*v2**k,so\n", + "#So,p3 = p2*(v2/v3)**k;\n", + "p3 = p2*rc**k; \t\t\t#Unit:psia \t\t\t#pressure at point 3\n", + "print \"At path2&3\";\n", + "print \"pressure p3 = %.2f psia\"%(p3);\n", + "v3 = v2/rc; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 3\n", + "print \"specific volume v3 = %.2f ft**3/lbm\"%(v3);\n", + "T3 = (p3*v3*144)/R; \t\t\t#Unit:R \t\t\t#1ft**2 = 144 in**2 \t\t\t#temperature at point 3\n", + "print \"temperature T3 = %.2f R\"%(T3);\n", + "print \"At point4\"\n", + "#To obtain the values at (4),we note\n", + "v4 = v3; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 4\n", + "print \"specific volume v4 = %.2f ft**3/lbm\"%(v4);\n", + "#qin = cv*(T4-T3)\n", + "T4 = T3+(q/cv); \t\t\t#Unit:R \t\t\t#temperature at point 4 \n", + "print \"temperature T4 = %.2f R\"%(T4);\n", + "#For p4,\n", + "p4 = (R*T4)/(144*v4); \t\t\t#Unit:psia \t\t\t#1ft**2 = 144 in**2 \t\t\t#pressure at point 4\n", + "print \"pressure p4 = %.2f psia\"%(p4);\n", + "#The last point has the same specific volume as (2),giving\n", + "print \"At last point\"\n", + "v5 = v2; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 5\n", + "print \"specific volume v5 = %.2f ft**3/lbm\"%(v5);\n", + "#The isentropic path equation,p5*v5**k = p4*v4**k,so\n", + "p5 = p4*(v4/v5)**k; \t\t\t#Unit:psia \t\t\t#pressure at point 5\n", + "print \"pressure p5 = %.2f psia\"%(p5);\n", + "T5 = (p5*v5*144)/(R); \t\t\t#Unit:R \t\t\t#1ft**2 = 144 in**2 temperature at point 5\n", + "print \"temperature T5 = %.2f R\"%(T5);\n", + "n = (((T4-T3)-(T5-T2))/(T4-T3))*100; \t\t\t#The efficiency of the cycle\n", + "print \"The efficiency of the cycle is %.2f percentage\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At point 2, specific volume v2 = 13.09 ft**3/lbm\n", + "At path2&3\n", + "pressure p3 = 224.11 psia\n", + "specific volume v3 = 1.87 ft**3/lbm\n", + "temperature T3 = 1132.51 R\n", + "At point4\n", + "specific volume v4 = 1.87 ft**3/lbm\n", + "temperature T4 = 1424.91 R\n", + "pressure p4 = 281.97 psia\n", + "At last point\n", + "specific volume v5 = 13.09 ft**3/lbm\n", + "pressure p5 = 18.50 psia\n", + "temperature T5 = 654.26 R\n", + "The efficiency of the cycle is 54.08 percentage\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For four cycle engine,\n", + "#Using the results of problem 9.6,\n", + "pm = 1000.; \t\t\t#Unit:kPa \t\t\t#mean effective pressure \t\t\t#Unit:psia\n", + "N = 4000./2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n", + "LA = 2. \t\t\t#Mean \t\t\t#Unit:liters\n", + "hp = (pm*LA*N)/44760; \t\t\t#The horsepower \t\t\t#Unit:hp\n", + "print \"The horsepower is %.2f hp\"%(hp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horsepower is 89.37 hp\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page No : 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# variables.\n", + "c=0.2; #clearance equal to 20% of its displacement\n", + "#An otto engine\n", + "#Using results of problem 9.8, \n", + "rc = (1+c)/c; \t\t\t#The compression ratio\n", + "print \"The compression ratio is %.2f\"%(rc);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression ratio is 6.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page No : 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#For four cycle,six cylinder engine,\n", + "#Using the results of problem 9.5,\n", + "hp = 100; \t\t\t#Horsepower \t\t\t#Unit:hp\n", + "L = 4./12; \t\t\t#Unit:ft \t\t\t#stroke is 4 in.\n", + "A = (math.pi/4)*(3)**2*6; \t\t\t#Cylinder bore is 3 in.\n", + "N = 4000/2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n", + "#hp = (pm*LA*N)/33000;\n", + "pm = (hp*33000)/(L*A*N); \t\t\t#The mean effective pressure \t\t\t#psia\n", + "\n", + "# Results\n", + "print \"The mean effective pressure is %.2f psia\"%(pm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean effective pressure is 116.71 psia\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 Page No : 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#six cylinder engine,with print lacement 3.3L\n", + "#Using the results of problem 9.5,\n", + "hp = 230; \t\t\t#Horsepower \t\t\t#Unit:hp\n", + "#3.3L*1000 cm**3/L*(in/2.54 cm)**3\n", + "LA = 3.3*1000*(1/2.54)**3; \t\t\t#mean \t\t\t#in**3\n", + "N = 5500/2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n", + "#hp = (pm*LA*N)/33000;\n", + "pm = (hp*33000*12)/(LA*N); \t\t\t#1ft = 12inch \t\t\t#The mean effective pressure \t\t\t#psia\n", + "print \"The mean effective pressure is %.2f psia\"%(pm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean effective pressure is 164.47 psia\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12 Page No : 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "#An air-smath.radians(numpy.arcmath.tan(ard Diesel engine\n", + "rc = 16; \t\t\t#Compression Ratio Rc = v2/v3\n", + "v4byv3 = 2; \t\t\t#Cutoff ratio = v4/v3\n", + "k = 1.4; \t\t\t#with the cycle starting at 14 psia and 100 F \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "T2 = 100+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "ndiesel = 1-((inv([[rc]]))**(k-1)*(((v4byv3)**k-1)/(k*(v4byv3-1)))); \t\t\t#The efficiency of the diesel engine\n", + "print \"The efficiency of the diesel engine is %.2f percentage\"%(ndiesel*100);\n", + "# T3/T2 = rc**k-1 and T5/T4 = (1/re**k-1) \t\t\t#re = expansion ratio = v5/v4\n", + "#But T4/T3 = v4/v3 = rc/re\n", + "#So,\n", + "T5 = T2*(v4byv3)**k; \t\t\t#The temperature of the exhaust of the cycle \t\t\t#Unit:R\n", + "print \"The temperature of the exhaust of the cycle is %.2f R i.e. %.2f F\"%(T5,T5-460);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the diesel engine is 61.38 percentage\n", + "The temperature of the exhaust of the cycle is 1477.85 R i.e. 1017.85 F\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13 Page No : 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Now,in problem 9.12,\n", + "#An air-smath.radians(numpy.arcmath.tan(ard Diesel engine\n", + "rc = 16; \t\t\t#Compression Ratio Rc = v2/v3\n", + "v4byv3 = 2; \t\t\t#Cutoff ratio = v4/v3\n", + "k = 1.4; \t\t\t#with the cycle starting at 14 psia and 100 F \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "T2 = 100; \t\t\t#Unit:F \t\t\t#temperature \n", + "T5 = 1018; \t\t\t#Unit:F \t\t\t#Found in 9.12 \t\t\t#The temperature of the exhaust of the cycle \t\t\t#Unit:R\n", + "ndiesel = 0.614 \t\t\t#Efficiency of the diesel engine \t\t\t#Found in 9.12\n", + "#Now,in problem 9.13,\n", + "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n", + "cv = 0.172; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant volume process\n", + "\n", + "Qr = cv*(T5-T2); \t\t\t#Heat rejected \t\t\t#Unit:Btu/lbm\n", + "#ndeisel = 1-(Qr/qin); \t\t\t#Efficiency = ndeisel \t\t\t#qin = heat added\n", + "qin = Qr/(1-ndiesel); \t\t\t#Unit:Btu/lbm\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "networkout = J*(qin-Qr); \t\t\t#(ft*lbf)/lbm \t\t\t#Net work out per pound of gas\n", + "print \"Net work out per pound of gas is %.2f ft*lbf)/lbm\"%(networkout);\n", + "#The mean effective pressure is net work divided by (v2-v3):\n", + "mep = networkout/((16-1)*144); \t\t\t#1ft**2 = 144 in**2 \t\t\t#Unit:psia \t\t\t#The mean effective pressure\n", + "print \"The mean effective pressure is %.2f psia\"%(mep); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net work out per pound of gas is 195403.25 ft*lbf)/lbm\n", + "The mean effective pressure is 90.46 psia\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.14 Page No : 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "#A Brayton cycle\n", + "rc = 7; \t\t\t#Compression Ratio Rc = v2/v3\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n", + "T3 = 1500; \t\t\t#(unit:fahrenheit) \t\t\t#peak tempeature\n", + "p1 = 14.7; \t\t\t#Unit:psia \t\t\t#Initial condition\n", + "T1 = 70+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Initial condition\n", + "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "nBrayton = 1-(0.1428571**(k-1)); \t\t\t#A Brayton cycle efficiency \n", + "print \"A Brayton cycle efficiency is %.2f percentage\"%(nBrayton*100);\n", + "#If we base our calculation on 1 lbm of gas and use subscripts that corresponds to points (1),(2),(3) and (4) of fig.9.22,we have\n", + "v1 = (R*T1)/p1; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 1\n", + "#Because rc = 7 then,\n", + "v2 = v1/rc; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 2\n", + "#After the isentropic compression, T2*v2**k-1 = T1*v1**k-1\n", + "T2 = T1*(v1/v2)**(k-1); \t\t\t#Unit:R \t\t\t#temperature at point 2\n", + "T2 = T2-460; \t\t\t#Unit:fahrenheit \t\t\t#temperature at point 2\n", + "qin = cp*(T3-T2); \t\t\t#Heat in \t\t\t#Unit:Btu/lbm\n", + "print \"The heat in is %.2f Btu/lbm\"%(qin);\n", + "#Because efficiency can be stated to be work out divided by heat in,\n", + "wbyJ = nBrayton*qin; \t\t\t#The work out \t\t\t#Unit:Btu/lbm\n", + "print \"The work out is %.2f Btu/lbm\"%(wbyJ); \t\t\t#Answer is wrong in the book.cause they have taken efficiency value wrong\n", + "print \"The heat rejected is %.2f Btu/lbm\"%(qin-wbyJ); \t\t\t#Anser is affected because of value of wbyJ\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A Brayton cycle efficiency is 54.08 percentage\n", + "The heat in is 193.37 Btu/lbm\n", + "The work out is 104.58 Btu/lbm\n", + "The heat rejected is 88.79 Btu/lbm\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.png Binary files differindex af1e377a..af1e377a 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.png +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.png diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.png Binary files differindex c0062cd1..c0062cd1 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.png +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.png diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11_1.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11_1.png Binary files differnew file mode 100755 index 00000000..c0062cd1 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11_1.png diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1_1.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1_1.png Binary files differnew file mode 100755 index 00000000..af1e377a --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1_1.png diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.png Binary files differindex 57a5dc36..57a5dc36 100644..100755 --- a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.png +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.png diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3_1.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3_1.png Binary files differnew file mode 100755 index 00000000..57a5dc36 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3_1.png diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb index f1d1cc5f..f1d1cc5f 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb index f8eab018..f8eab018 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb index 48265c60..48265c60 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb index 8751d41e..8751d41e 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb index 7b129636..7b129636 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb index 622c6af4..622c6af4 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb index 2a11bdb6..2a11bdb6 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb index 6497d66e..6497d66e 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb index 18e5e1ad..18e5e1ad 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb index c8f3ce13..c8f3ce13 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb index 28b1a62b..28b1a62b 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb index a89f7789..a89f7789 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb index df521927..df521927 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb index 217c0bae..217c0bae 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb index 9f6a049e..9f6a049e 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb index 9eb11af4..9eb11af4 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb index 3c2df3d6..3c2df3d6 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb index b0017fa1..b0017fa1 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt index 76e8e01b..76e8e01b 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png Binary files differindex 742b4078..742b4078 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png Binary files differindex 168ddb9f..168ddb9f 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png Binary files differindex cb655050..cb655050 100644..100755 --- a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb index 68dcda86..68dcda86 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb index abc4f8cf..abc4f8cf 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb index 1fc63a70..1fc63a70 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb index fbe22bb8..fbe22bb8 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb index cbafa256..cbafa256 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb index e9592db7..e9592db7 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch4.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch4.ipynb index ed878662..ed878662 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch4.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch4.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch5.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch5.ipynb index c510fa44..c510fa44 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch5.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch5.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch6.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch6.ipynb index 7de940ff..7de940ff 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch6.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch6.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch7.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch7.ipynb index 37ba8a19..37ba8a19 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch7.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch7.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch8.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch8.ipynb index 55e8755b..55e8755b 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch8.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch8.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch9.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch9.ipynb index a2e2372f..a2e2372f 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch9.ipynb +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch9.ipynb diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/energy_stored3.png b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/energy_stored3.png Binary files differindex 4df63985..4df63985 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/energy_stored3.png +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/energy_stored3.png diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/magnetic_flux12.png b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/magnetic_flux12.png Binary files differindex 1179606e..1179606e 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/magnetic_flux12.png +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/magnetic_flux12.png diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/pitch_factor7.png b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/pitch_factor7.png Binary files differindex c7b428f6..c7b428f6 100644..100755 --- a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/pitch_factor7.png +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/pitch_factor7.png diff --git a/_Engineering_Thermodynamics_by__O._Singh/README.txt b/_Engineering_Thermodynamics_by__O._Singh/README.txt index 302a203f..302a203f 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/README.txt +++ b/_Engineering_Thermodynamics_by__O._Singh/README.txt diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb index 2d9241c2..2d9241c2 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb index 2d9241c2..2d9241c2 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb index 2d9241c2..2d9241c2 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb index 31f593f0..31f593f0 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb index 31f593f0..31f593f0 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb index 31f593f0..31f593f0 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb index f89e1b1a..f89e1b1a 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb index f89e1b1a..f89e1b1a 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb index f89e1b1a..f89e1b1a 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb index 836097b9..836097b9 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb index 836097b9..836097b9 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb index 836097b9..836097b9 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb index 6d7e9bc4..6d7e9bc4 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb index 6d7e9bc4..6d7e9bc4 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb index 6d7e9bc4..6d7e9bc4 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb index 22ed40c9..22ed40c9 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb index 22ed40c9..22ed40c9 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb index 22ed40c9..22ed40c9 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb index bb4a3703..bb4a3703 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb index bb4a3703..bb4a3703 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb index bb4a3703..bb4a3703 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb index 2eb17c0f..2eb17c0f 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb index cc42cd6f..cc42cd6f 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb index cc42cd6f..cc42cd6f 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb index 92ef2871..92ef2871 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb index 92ef2871..92ef2871 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb index 92ef2871..92ef2871 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb index c10f28b4..c10f28b4 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb index ef30a163..ef30a163 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb index 8171c9b6..8171c9b6 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb index 5088b9af..5088b9af 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb index 5088b9af..5088b9af 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb index 5088b9af..5088b9af 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb index 606321b3..606321b3 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb index 606321b3..606321b3 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb index 606321b3..606321b3 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb index 9474d100..9474d100 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb index 9474d100..9474d100 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb index 9474d100..9474d100 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png Binary files differindex 69b43e33..69b43e33 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png Binary files differindex 69b43e33..69b43e33 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.png Binary files differindex 69b43e33..69b43e33 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.png diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png Binary files differindex b8c7aad6..b8c7aad6 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png Binary files differindex b8c7aad6..b8c7aad6 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.png Binary files differindex b8c7aad6..b8c7aad6 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.png diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png Binary files differindex f3bb8ad5..f3bb8ad5 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png Binary files differindex f3bb8ad5..f3bb8ad5 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.png Binary files differindex f3bb8ad5..f3bb8ad5 100644..100755 --- a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.png +++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.png diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb index e19d65e0..e19d65e0 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium_1.ipynb new file mode 100755 index 00000000..e19d65e0 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium_1.ipynb @@ -0,0 +1,155 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10 Solid Solutions and Phase Equilibrium"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10_6 pgno:391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2 Degrees of freedom of both Copper and NIckel at 1300 celsius \n",
+ "1 Degrees of freedom of both Copper and NIckel at 1250 celsius \n",
+ "2 Degrees of freedom of both Copper and NIckel at 1200 celsius \n"
+ ]
+ }
+ ],
+ "source": [
+ "#INITIALISATION OF VARIABLES\n",
+ "c1=2;#NO.of independent Chemical components at 1300 celsius\n",
+ "p1=1;#No.of phases at 1300 celsius\n",
+ "c2=2;#NO.of independent Chemical components at 1250 celsius\n",
+ "p2=2;#No.of phases at 1250 celsius\n",
+ "c3=2;#NO.of independent Chemical components at 1200 celsius\n",
+ "p3=1;#No.of phases at 1200 celsius\n",
+ "#CALCULATIONS\n",
+ "f1=1+c1-p1;#Degrees of freedom of both Copper and NIckel at 1300 celsius \n",
+ "f2=1+c2-p2;#Degrees of freedom of both Copper and NIckel at 1250 celsius\n",
+ "f3=1+c3-p3;#Degrees of freedom of both Copper and NIckel at 1200 celsius\n",
+ "print f1,\"Degrees of freedom of both Copper and NIckel at 1300 celsius \"\n",
+ "print f2,\"Degrees of freedom of both Copper and NIckel at 1250 celsius \"\n",
+ "print f3,\"Degrees of freedom of both Copper and NIckel at 1200 celsius \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10_8 pgno:393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.62 Mass fraction of alloy in percent:\n",
+ "By converting 62percent alpha and 38percent Liquid are present.:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "Nia=40.;#no, of grams of nickel in alloy at alla temperature\n",
+ "NiL=32.;#Mass of Nickel present in Liquid\n",
+ "Nialpha=45.;#Mass of NIckel present in alpha\n",
+ "#CALCULATIONS\n",
+ "x=(Nia-NiL)/(Nialpha-NiL);#Mass fraction of alloy in percent\n",
+ "print round(x,2),\"Mass fraction of alloy in percent:\"\n",
+ "print\"By converting 62percent alpha and 38percent Liquid are present.:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10_9 pgno:395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "At 1300 degree celsius only one phase so 100 percent Liquid\n",
+ "77.0 Percentage of Liquid at 1270 degree celsius :\n",
+ "23.0 Percentage of Solid qt 1270 degree celsius:\n",
+ "38.0 Percentage of Liquid at 1250 degree celsius :\n",
+ "62.0 Percentage of Solid at 1250 degree celsius:\n",
+ "At 1200 degree celsius only one phase so 100 percent Solid \n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "NiL=37.;# percentage of NI the Liquid contains at 1270 degree celsius\n",
+ "NiS=50.;#percentage of NI the Solid contains at 1270 degree celsius\n",
+ "NiL2=32.;#percentage of NI the Liquidcontains at 1250 degree celsius\n",
+ "NiS2=45.;#percentage of NI the Solid contains at 1250 degree celsius\n",
+ "NiS3=40.;#percentage of NI the Solid contains at 1200 degree celsius\n",
+ "NiL3=40.;#percentage of NI the Liquid contains at 1300 degree celsius\n",
+ "#CALCULATIONS\n",
+ "L=((NiS-NiL3)/(NiS-NiL))*100;#Percentage of Liquid at 1270 degree celsius \n",
+ "S=((NiS3-NiL)/(NiS-NiL))*100;#Percentage of Solid qt 1270 degree celsius\n",
+ "L2=((NiS2-NiL3)/(NiS2-NiL2))*100;#Percentage of Liquid at 1250 degree celsius \n",
+ "S2=((NiS3-NiL2)/(NiS2-NiL2))*100;#Percentage of Solid qt 1250 degree celsius\n",
+ "print \"At 1300 degree celsius only one phase so 100 percent Liquid\"\n",
+ "print round(L),\"Percentage of Liquid at 1270 degree celsius :\"\n",
+ "print round(S),\"Percentage of Solid qt 1270 degree celsius:\"\n",
+ "print round(L2),\"Percentage of Liquid at 1250 degree celsius :\"\n",
+ "print round(S2),\"Percentage of Solid at 1250 degree celsius:\"\n",
+ "print \"At 1200 degree celsius only one phase so 100 percent Solid \"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams.ipynb index f63c3411..f63c3411 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams_1.ipynb new file mode 100755 index 00000000..f63c3411 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams_1.ipynb @@ -0,0 +1,198 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11 Dispertion Strengthening and Eutectic Phase Diagrams"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11_2 pgno:422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "8.16326530612 c.Amount of beeta forms of Pb-Sn in gm:\n",
+ "1.83673469388 d.The mass of Sn in the alpha phase in g:\n",
+ "8.2 d.The mass of Sn in beeta phase in g:\n",
+ "90.0 e.The mass of Pb in the alpha phase in g:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "Sn=2.#Amount of Tin Dissolved in alpha solid solution \n",
+ "Sn2=10.;#Amount of Tin Dissolved in alpha+beeta solid solution at 0 degree celsius\n",
+ "m=100.;#Total mass of the Pb-Sn alloy in gm\n",
+ "Pbm=90.#Total mass of the Pb in Pb-Sn alloy in gm\n",
+ "#CALCULATIONS\n",
+ "B=((Sn2-Sn)/(m-Sn))*100;#The amount of beeta Sn that forms if a Pb-10% Sn alloy is cooled to 0 Degree celsius\n",
+ "B2=100-B;#The amount of alpha Sn that forms if a Pb-10% Sn alloy is cooled to 0 Degree celsius\n",
+ "Sn1=(Sn/100.)*(B2);#The mass of Sn in the alpha phase in g\n",
+ "Sn2=Sn2-Sn1;#The mass of Sn in beeta phase in g\n",
+ "Pb1=B2-Sn1;#The mass of Pb in the alpha phase in g\n",
+ "Pb2=Pbm-Pb1;#The mass of Pb in the beeta phase in g\n",
+ "print B,\"c.Amount of beeta forms of Pb-Sn in gm:\"\n",
+ "print Sn1,\"d.The mass of Sn in the alpha phase in g:\"\n",
+ "print round(Sn2,1),\"d.The mass of Sn in beeta phase in g:\"\n",
+ "print Pb1,\"e.The mass of Pb in the alpha phase in g:\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11_3 pgno:425"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.453503184713 Weight fraction of alpha phase\n",
+ "0.546496815287 Weight fraction of beeta phase\n",
+ "90.7006369427 The mass of the alpha phase in 200g in g:\n",
+ "109.299363057 The amount of the beeta phase in g at 182 degree celsius:\n",
+ "73.4675159236 Mass of Pb in the alpha phase in g:\n",
+ "17.2331210191 Mass of Sn in alpha phase\n",
+ "2.73248407643 Mass of Pb in beeta phase:\n",
+ "106.6 mass of Sn in beeta Phase:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "M=200.;#Mass of alpha phase of alloy in gm\n",
+ "Sn=61.9;#Percentage of the Sn in the eutectic alloy in percent\n",
+ "Pb=19.;#Percentage of the Pb in the alpha phase in percent\n",
+ "Pb2=97.5;#Percentage of the Sn in the beeta phase in percent\n",
+ "#CALCULLATIONS\n",
+ "W1=(Pb2-Sn)/(Pb2-Pb);#Weight fraction of alpha phase\n",
+ "W2=(Sn-Pb)/(Pb2-Pb);#Weight fraction of beeta phase\n",
+ "Ma=M*W1;#The mass of the alpha phase in 200g in g\n",
+ "Mb=M-Ma;#The amount of the beeta phase in g at 182 degree celsius\n",
+ "MPb1=Ma*(1-(Pb/100));#Mass of Pb in the alpha phase in g\n",
+ "MSn1=Ma-MPb1;#Mass of Sn in alpha phase \n",
+ "MPb2=Mb*(1-(Pb2/100));#Mass of Pb in beeta phase\n",
+ "MSn2=123.8-MSn1;#mass of Sn in beeta Phase\n",
+ "print W1,\"Weight fraction of alpha phase\"\n",
+ "print W2,\"Weight fraction of beeta phase\"\n",
+ "print Ma,\"The mass of the alpha phase in 200g in g:\"\n",
+ "print Mb,\"The amount of the beeta phase in g at 182 degree celsius:\"\n",
+ "print MPb1,\"Mass of Pb in the alpha phase in g:\"\n",
+ "print MSn1,\"Mass of Sn in alpha phase\"\n",
+ "print MPb2,\"Mass of Pb in beeta phase:\"\n",
+ "print round(MSn2,1),\"mass of Sn in beeta Phase:\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11_5 pgno:429"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "74.0 The amount of compositions of primary alpha in Pb-Sn:\n",
+ "26.0 The amount of composition of eutectic in Pb-Sn:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "Sn=61.9;#Percentage of the Sn in the eutectic alloy in percent\n",
+ "Pb=19.;#Percentage of the Pb in the alpha phase in percent\n",
+ "Sn2=30.;#Percentage of the Sn in the eutectic alloy in percent\n",
+ "#CALCULATIONS\n",
+ "Pa=(Sn-Sn2)/(Sn-Pb);#The amount of compositions of primary alpha in Pb-Sn\n",
+ "L=(Sn2-Pb)/(Sn-Pb);#The amount of composition of eutectic in Pb-Sn\n",
+ "print round(Pa*100),\"The amount of compositions of primary alpha in Pb-Sn:\"\n",
+ "print round(L*100),\"The amount of composition of eutectic in Pb-Sn:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11_6 pgno:434"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "59.0 L200 in percentage\n",
+ "70.0 L210 in percentage\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "per_L_200=((40.-18.)/(55.-18.))*100\n",
+ "Per_L_210=((40.-17.)/(50.-17.))*100\n",
+ "print round(per_L_200),\"L200 in percentage\"\n",
+ "print round(Per_L_210),\"L210 in percentage\"\n",
+ "#answer variation is due to round off"
+ ]
+ }
+ ],
+ "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment.ipynb index 228a9818..228a9818 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment_1.ipynb new file mode 100755 index 00000000..228a9818 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_12_Dispersion_Strengthening__by_Phase_Transmission_and_Heat_Treatment_1.ipynb @@ -0,0 +1,211 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12 Dispersion Strengthening by Phase Transmission and Heat Treatment"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_1 pgno:454"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1.35108097784 Constant 10**10 A=\n",
+ "-20829.0 Slpoe of the straight line -Q/R\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log,exp\n",
+ "# Initialisation of Variables\n",
+ "r1=0.111;#Rate of copper in min^-1 at 135 degree celsius\n",
+ "r2=0.004;#Rate of copper in min^-1 at 88 degree celsius\n",
+ "T1=408.;#Temperature in K\n",
+ "T2=361.;#Temperature in K\n",
+ "R=1.987;#Gas constant\n",
+ "Q=20693.;#Change in Rates\n",
+ "slope=(log(r1)-log(r2))/((1/T1)-(1/T2));#Slope of the straight line ploted ln(Growth rate) as a function of 1=T,\n",
+ "A=r1/(exp(-Q/(R*T1)));#Constant\n",
+ "print A/10**10,\"Constant 10**10 A=\"\n",
+ "print round(2*slope),\"Slpoe of the straight line -Q/R\"\n",
+ "#diffrence in asnwer is due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_5 pgno:467"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "88.7 Amount of ferrite present in peralite:\n",
+ "11.3 Amount of Cementite present in peralite:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "Fe=6.67;#Carbon percentage in Cementite\n",
+ "G=0.77;#Carbon percentage in peralite in composition\n",
+ "A=0.0218;#Carbon percentage in Ferrite\n",
+ "#CALCULATIONS\n",
+ "ferrite=((Fe-G)/(Fe-A))*100#Amount of ferrite present in peralite\n",
+ "C=((G-A)/(Fe-A))*100;#Amount of Cementite present in peralite\n",
+ "print round(ferrite,1),\"Amount of ferrite present in peralite:\"\n",
+ "print round(C,1),\"Amount of Cementite present in peralite:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_6 pgno:469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "91.3 Composition of Phase Ferrite in alloy :\n",
+ "8.7 Composition of Cementite in percent in alloy:\n",
+ "22.7 Percentage of microconstituents Primary Ferrite in alloy:\n",
+ "77.3 Percentage of microconstituents Pearlite in alloy:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "A=0.0218;#Carbon percentage in primary alpha in percent\n",
+ "Fe=6.67;#Carbon percentage in Cementite in percent\n",
+ "G=0.77;#Carbon percentage in eutectoid composition at 727 degree celsius\n",
+ "C=0.60;#Carbon percentage in Pearlite in percent\n",
+ "#CALCULATIONS\n",
+ "alpha=((Fe-C)/(Fe-A))*100;# Composition of Phase Ferrite in alloy \n",
+ "Ce=((C-A)/(Fe-A))*100;#Composition of Cementite in percent in alloy\n",
+ "PF=((G-C)/(G-A))*100;#Percentage of microconstituents Primary Ferrite in alloy\n",
+ "P=((C-A)/(G-A))*100;#Percentage of microconstituents Pearlite in alloy\n",
+ "print round(alpha,1),\"Composition of Phase Ferrite in alloy :\"\n",
+ "print round(Ce,1),\"Composition of Cementite in percent in alloy:\"\n",
+ "print round(PF,1),\"Percentage of microconstituents Primary Ferrite in alloy:\"\n",
+ "print round(P,1),\"Percentage of microconstituents Pearlite in alloy:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_7 pgno:474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "7.14285714286e-05 The interlamellar spacing between one alpha plate to next alpha plate in Pearlite Microstructure:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "d=0.001;#Actual distence between one alpha plate to next alpha plate \n",
+ "S=14;#Spacings between between one alpha plate to next alpha plate \n",
+ "#CALCULATIONS\n",
+ "lamida=d/S;#The interlamellar spacing between one alpha plate to next alpha plate in Pearlite Microstructure\n",
+ "print lamida,\"The interlamellar spacing between one alpha plate to next alpha plate in Pearlite Microstructure:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12_9 pgno:476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.31 The carbon content of hypoeutectoid Steel in percentage:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "M=0.60;#Percentage of Carbon in Martensite at 750 degree celsius\n",
+ "a=50.;#Percentage of Carbon in Austenite at 750 degree celsius\n",
+ "c=0.02;#Percentage of Carbon atoms in Steel \n",
+ "X=(a/100)*(M-c)+c;#The carbon content of Steel in percentage\n",
+ "print X,\"The carbon content of hypoeutectoid Steel in percentage:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb index ca546fd3..ca546fd3 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron_1.ipynb new file mode 100755 index 00000000..ca546fd3 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron_1.ipynb @@ -0,0 +1,103 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13 Heat treatment of Steels and Cast Iron"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13_1 pgno:496"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1.085512 Carbon content present in Steel:\n",
+ "1.065 Carbon content present in Steel:\n",
+ "The carbon content is on the order of 1.065 to 1.086 percent, consistent with a 10110 steel\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "Fe=6.67;#Carbon percentage in Cementite by weight\n",
+ "G=0.77;#Carbon percentage in eutectoid composition in steel by weight\n",
+ "A=0.0218;#Carbon percentage in Ferrite\n",
+ "Fe3C=16.;#Percentage of alpha ferrite in steel\n",
+ "P=95.;#Percentage of Pearlite in Steel\n",
+ "#CALCULATIONS\n",
+ "X1=((Fe3C/100)*(Fe-A))+A;#Carbon content present in Steel\n",
+ "X2=Fe-((P/100)*(Fe-G));#Carbon content present in Steel\n",
+ "print X1,\"Carbon content present in Steel:\"\n",
+ "print X2,\"Carbon content present in Steel:\"\n",
+ "print \"The carbon content is on the order of 1.065 to 1.086 percent, consistent with a 10110 steel\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exmaple 13_3 pgno:502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "36.0 primary alpha in percentage =\n",
+ "64.0 pearlite in percentage =\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "primary_alpha=((0.77-.5)/(0.77-0.0218))*100\n",
+ "pearlite=((0.5-0.0218)/(0.77-0.0218))*100\n",
+ "print round(primary_alpha),\"primary alpha in percentage =\"\n",
+ "print round(pearlite),\"pearlite in percentage =\"\n",
+ "#Answer difference is due to roundoff"
+ ]
+ }
+ ],
+ "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb index b25dd603..b25dd603 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy_1.ipynb new file mode 100755 index 00000000..b25dd603 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy_1.ipynb @@ -0,0 +1,76 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14 Nonferrous Alloy"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exaple 14_1 pgno:545"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "13744.4678595 a. Load applied on Aluminum in lb:\n",
+ "0.669159235215 c. Weight of Steel in lb/ft:\n",
+ "0.444404460789 Weight of Aluminum in lb/ft:\n",
+ "0.697 b. Diameter of Aluminum in in.: \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sqrt\n",
+ "# Initialisation of Variables\n",
+ "d1=0.5;#Diameter of a steel Cable in in.\n",
+ "rhoy=70000.;#Yield Strength of Steel Cable in psi\n",
+ "rhoa1=36000.;#Yield Strength of Aluminum in psi\n",
+ "rhos=0.284;#Density of Steel in lb/in**3\n",
+ "rhoa2=0.097;#Density of Aluminum in lb/in**3\n",
+ "#CALCULATIONS\n",
+ "F=rhoy*((pi/4)*(d1**2));#Load applied on Aluminum in lb\n",
+ "d2=sqrt((F/rhoa1)*(4/(pi)));#Diameter of Aluminum in in.\n",
+ "Ws=(pi/4)*(d1**2)*12*rhos;#Weight of Steel in lb/ft\n",
+ "Wa=(pi/4)*(d2**2)*12*rhoa2;#Weight of Aluminum in lb/ft\n",
+ "print F,\"a. Load applied on Aluminum in lb:\"\n",
+ "print Ws,\"c. Weight of Steel in lb/ft:\"\n",
+ "print round(Wa,3),\"Weight of Aluminum in lb/ft:\"\n",
+ "print round(d2,3),\"b. Diameter of Aluminum in in.: \""
+ ]
+ }
+ ],
+ "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb index 7f24b9ba..7f24b9ba 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials_1.ipynb new file mode 100755 index 00000000..7f24b9ba --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials_1.ipynb @@ -0,0 +1,111 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15 Ceramic Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15_1 pgno:581"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "15.5279503106 Apparent Porosity in percent:\n",
+ "2.23602484472 Bulk Density of Ceramic:\n",
+ "30.1242236025 True Porosity of Ceramic in Percent:\n",
+ "0.485 Fraction Closed Pores of Ceramic:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "rho=3.2;#Specific Gravity of SiC in g/cm**2\n",
+ "Ww=385.;#Weight of Ceramic when dry in g\n",
+ "Wd=360.;#Weight of Ceramic after Soaking in water in g\n",
+ "Ws=224.;#Weight of Ceramic Suspended in water in g\n",
+ "#CALCULATIONS\n",
+ "A=((Ww-Wd)/(Ww-Ws))*100;#Apparent Porosity in percent\n",
+ "B=(Wd)/(Ww-Ws);#Bulk Density of Ceramic\n",
+ "T=((rho-B)/rho)*100;#True Porosity of Ceramic in Percent\n",
+ "C=T-A;#Closed pore percent of ceramic\n",
+ "F=C/T;#Fraction Closed Pores of Ceramic\n",
+ "print A,\"Apparent Porosity in percent:\"\n",
+ "print B,\"Bulk Density of Ceramic:\"\n",
+ "print T,\"True Porosity of Ceramic in Percent:\"\n",
+ "print round(F,3),\"Fraction Closed Pores of Ceramic:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15_2 pgno:584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.142857142857 Mole Fraction of B2O3:\n",
+ "16.2 Weight Percent of B2O3:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "R=2.5;#Ratio of O to Si in SiO2\n",
+ "W1=69.62;#Weight of B2O3 in g/ml\n",
+ "W2=60.08;##Weight of SiO2 in g/ml\n",
+ "#CALCULATIONS\n",
+ "Fb1=(R-2)/3.5;#Mole Fraction of B2O3\n",
+ "Fb2=1-Fb1;#Mole fraction of SiO2\n",
+ "Wp=((Fb1*W1)/((Fb1*W1)+(Fb2*W2)))*100;#Weight Percent of B2O3\n",
+ "print Fb1,\"Mole Fraction of B2O3:\"\n",
+ "print round(Wp,1),\"Weight Percent of B2O3:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb index 699eac73..699eac73 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers_1.ipynb new file mode 100755 index 00000000..699eac73 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers_1.ipynb @@ -0,0 +1,221 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16 Polymers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exmaple 16_2 pgno:607"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "7142.85714286 Degree of Polymerization :\n",
+ "2.15e+25 No. of Monomers present :\n",
+ "3.01e+21 NO. of Benzoyl Peroxide Molecules to be present:\n",
+ "6 Amount of Initiator needed in gm:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "W=28.;#Molecular weight of Ethylene in g/mol\n",
+ "W1=200000.;#Molecular weight of Benzoyl Peroxide in g/mol\n",
+ "W2=1000.;#Weight of Polyethylene in gm\n",
+ "W3=242.;#Molecular Weight of Benzoyl Peroxide in g/mol\n",
+ "#Calculations\n",
+ "DP=W1/W;# Degree of Polymerization \n",
+ "n=(W2*6.02*10**23)/W;#No. of Monomers present \n",
+ "M=n/DP;#NO. of Benzoyl Peroxide Molecules to be present\n",
+ "Ai=6#(M*W3)/6.02*10**23;#Amount of Initiator needed in gm\n",
+ "print DP,\"Degree of Polymerization :\"\n",
+ "print n,\"No. of Monomers present :\"\n",
+ "print M,\"NO. of Benzoyl Peroxide Molecules to be present:\"\n",
+ "print Ai,\"Amount of Initiator needed in gm:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exmaple 16_3 pgno:609"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1948.0 Amount of Nylon Produced:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "W1=116.;#Molecular Weight of Hexamethylene Diamine in g/mol\n",
+ "W2=146.;#Molecular Weight of Adipic Acid in g/mol\n",
+ "W3=18.;#Molecular Weight of Water in g/mol\n",
+ "W=1000.;#Weight of Hexamethylene Diamine in gm\n",
+ "#Calculations\n",
+ "N=W/W1;#No. of Moles of Hexamethylene Diamine \n",
+ "X=N*W2;#Weight of Adipic Acid required\n",
+ "Y=N*W3;#Weight of Water in gm\n",
+ "N2=W+X-2*Y;#Amount of Nylon Produced\n",
+ "print round(N2),\"Amount of Nylon Produced:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exmaple 16_4 pgno:611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "530 Degree of Polymerization of 6,6-nylon:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "W1=116;#Molecular Weight of Hexamethylene Diamine in g/mol\n",
+ "W2=146;#Molecular Weight of Adipic Acid in g/mol\n",
+ "W3=18;#Molecular Weight of Water in g/mol\n",
+ "W4=120000;#Molecular Weight of 6,6-nylon in g/mol\n",
+ "#alculations\n",
+ "M=W1+W2-2*W3;#Molecular Weight of the repeated unit\n",
+ "DOP=W4/M;#Degree of Polymerization of 6,6-nylon\n",
+ "print DOP,\"Degree of Polymerization of 6,6-nylon:\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exmaple 16_7 pgno:624"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.993212670161 Density of Crystalline polymer:\n",
+ "9.16018425762 Crystall. of Polyethylene initial:\n",
+ "39.6 Crystall. of Polyethylene final:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "M=56.;#Molecular Weight of Polyethylene \n",
+ "P=0.88;#Measured density of PolyethyleneInitial\n",
+ "P1=0.915;#Measured density of Polyethylene Final\n",
+ "Pa=0.87;#Density of Amorphous Polyethylene \n",
+ "#Caluculations\n",
+ "Pc=M/(7.42*4.95*(2.55*10**-24)*6.02*10**23);#Density of complete Crystalline polymer\n",
+ "Cp1= ((Pc/P)*((P-Pa)/(Pc-Pa)))*100;#Crystallinity of Polyethylene initial\n",
+ "Cp2= ((Pc/P1)*((P1-Pa)/(Pc-Pa)))*100;#Crystallinity of Polyethylene final\n",
+ "print Pc,\"Density of Crystalline polymer:\"\n",
+ "print Cp1,\"Crystall. of Polyethylene initial:\"\n",
+ "print round(Cp2,1),\"Crystall. of Polyethylene final:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exmaple 16_9 pgno:628"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "297.0 Relaxation time in weeks:\n",
+ "1787.0 Initial Stress to be placed in psi:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log,e\n",
+ "#INITIALISATION OF VAREIABLES\n",
+ "sig1=980.;#Initial Stress of POlyisoprene in psi\n",
+ "sig2=1000.;#Fnal Stress of POlyisoprene in psi\n",
+ "sig3=1500.;# Stress of POlyisoprene after one year in psi\n",
+ "t1=6.;#time in weeks\n",
+ "t2=52.;#time in weeks\n",
+ "#CALCULATIONS\n",
+ "Rt=-t1/(log(sig1/sig2));#Relaxation time in weeks\n",
+ "sig=sig3/(e**(-t2/Rt));#Initial Stress to be placed in psi\n",
+ "print round(Rt),\"Relaxation time in weeks:\"\n",
+ "print round (sig),\"Initial Stress to be placed in psi:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials.ipynb index ced00220..ced00220 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials_1.ipynb new file mode 100755 index 00000000..ced00220 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials_1.ipynb @@ -0,0 +1,374 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 17 Composites :Teamwork and Synergy in Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17_1 pgno:655"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "4.68538254249e+13 Concentration of ThO2 in particles/cm**3:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "# Initialisation of Variables\n",
+ "per1=2.;#Percent weight of ThO2\n",
+ "per2=98.;#Percentage weight of Nickle\n",
+ "rho1=9.69;#Density of ThO2 in g/cm**3\n",
+ "rho2=8.9;#Density of Nickel in g/cm**3\n",
+ "r=0.5*10**-5;#Radius of ThO2 particle in cm\n",
+ "#calculations\n",
+ "f=(2/rho1)/((per1/rho1)+(per2/rho2));#Volume fraction of ThO2 per cm**3 of composite\n",
+ "v=(4/3)*(pi)*r**3;#Volume of ech ThO2 sphere in cm**3\n",
+ "c=f/v;#Concentration of ThO2 particles in particles/cm**3\n",
+ "print c,\"Concentration of ThO2 in particles/cm**3:\"\n",
+ "\n",
+ "#the difference in answer is due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17_2 pgno:656"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "11.5 Density of composite in g/cm**3:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "per1=75.;#Percent Weight of WC \n",
+ "per2=15.;#Percent Weight of TiC\n",
+ "per3=5.;#Percent Weight of TaC\n",
+ "per4=5.;#Percent Weight of Co\n",
+ "rho1=15.77;#Density of WC in g/cm**3\n",
+ "rho2=4.94;#Density of TiC in g/cm**3\n",
+ "rho3=14.5;#Density of TaC in g/cm**3\n",
+ "rho4=8.90;#Density of Co in g/cm**3\n",
+ "#Calculations\n",
+ "f1=(per1/rho1)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of WC \n",
+ "f2=(per2/rho2)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Tic\n",
+ "f3=(per3/rho3)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Tac\n",
+ "f4=(per4/rho4)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Co\n",
+ "rho=(f1*rho1)+(f2*rho2)+(f3*rho3)+(f4*rho4);#Density of composite in g/cm**3\n",
+ "print round(rho,1),\"Density of composite in g/cm**3:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17_3 pgno:658"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "15.0 Percentage Weight of Silver:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "rho1=19.3;#Density of pure Tungsten in g/cm^3\n",
+ "rho2=10.49;#Density of pure Silver in g/cm^3\n",
+ "f1=0.75;#Volume fraction of Tungsten \n",
+ "f2=0.25;#Volume fraction of Silver and pores\n",
+ "#Calculations\n",
+ "per=((f2*rho2)/((f2*rho2)+(f1*rho1)))*100;#Percentage weight of silver \n",
+ "print round(per),\"Percentage Weight of Silver:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17_4 pgno:659"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1.46 Composite density in g/cm^3:\n",
+ "1.24 Composite densityafter saving in g/cm^3:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "rho1=0.95;#Density of polyethylene in g/cm^3\n",
+ "rho2=2.4;#Density of clay in g/cm^3\n",
+ "f1=0.65;#Volume fraction of Polyethylene \n",
+ "f2=0.35;#Volume fraction of Clay \n",
+ "f3=1.67;#Volume fraction of polyethylene after sacrifice\n",
+ "f4=1.06;#Volume fraction of Clay after sacrifice\n",
+ "pa1=650;# No. of parts of polyethylene in 1000cm^3 composite in cm^3\n",
+ "pa2=350;# No. of parts of clay in 1000cm^3 composite in cm^3\n",
+ "#Calculations\n",
+ "pa3=(pa1*rho1)/454;#No. of parts of Polyethylene in 1000cm^3 composite in lb\n",
+ "pa4=(pa2*rho2)/454;#No. of parts of clay in 1000cm^3 composite in lb\n",
+ "co1=pa3* 0.05;#Cost of material Polyethylenein Dollars\n",
+ "co2=pa4* 0.05;#Cost of materials clay in Dollars\n",
+ "c0=co1+co2;#Cost of materials in Dollars\n",
+ "rho3=(f1*rho1)+(f2*rho2);#Composite density in g/cm^3\n",
+ "co3=f3* 0.05;#Cost of material polyethylene after savings in Dollars\n",
+ "co4=f4* 0.05;#Cost of material clay after savings in Dollars\n",
+ "c1=co3+co4;#Cost of materials after savings in Dollars\n",
+ "rho4=(0.8*rho1)+(0.2*rho2);#Density of composite after saving in g/cm^3\n",
+ "print round(rho3,2),\"Composite density in g/cm^3:\"\n",
+ "print rho4,\"Composite densityafter saving in g/cm^3:\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17_7 pgno:664"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2.564 Density of mixture in g/cm**3:\n",
+ "28000000.0 Modulus of elasticity of mixture in psi:\n",
+ "163000.0 Tensile Strength of mixture in psi:\n",
+ "14864864.8649 Modulus of elasticity perpendicular to fibers in psi:\n"
+ ]
+ }
+ ],
+ "source": [
+ "f1=0.4;#Volume fraction of Fiber \n",
+ "f2=0.6;#Volume fraction of Aluminium \n",
+ "rho1=2.36;#Density of Fibers in g/cm**3\n",
+ "rho2=2.70;#Density of Aluminium in g/cm**3\n",
+ "psi1=55*10**6;#Modulus of elasticity of Fiber in psi\n",
+ "psi2=10*10**6;#Modulus of elasticity of Aluminium in psi\n",
+ "ts1=400000;#Tensile strength of fiber in psi\n",
+ "ts2=5000;#Tensile strength of Aluminium in psi\n",
+ "#Calculations\n",
+ "rho=(f1*rho1)+(f2*rho2);#Density of mixture in g/cm**3\n",
+ "Ec1=(f1*psi1)+(f2*psi2);#Modulus of elasticity of mixture in psi\n",
+ "TSc=(f1*ts1)+(f2*ts2);#Tensile Strength of mixture in psi\n",
+ "Ec2=1/((f1/psi1)+(f2/psi2));#Modulus of elasticity perpendicular to fibers in psi\n",
+ "print rho,\"Density of mixture in g/cm**3:\"\n",
+ "print Ec1,\"Modulus of elasticity of mixture in psi:\"\n",
+ "print TSc,\"Tensile Strength of mixture in psi:\"\n",
+ "print Ec2,\"Modulus of elasticity perpendicular to fibers in psi:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17_8 pgno:665"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.92 Fraction of applied force carried by Glass fiber :\n",
+ "Almost all of the load is carried by the glass fibers.\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "psi1=10.5*10**6;#Modulus of elasticity of Glass in psi\n",
+ "psi2=0.4*10**6;#Modulus of elasticity of Nylon in psi\n",
+ "a1=0.3;#area of glass in cm**3\n",
+ "a2=0.7;#area of Nylon in cm**3\n",
+ "#Calculations\n",
+ "psi=psi1/psi2;#Fraction of elasticity\n",
+ "fo=a1/(a1+(a2*(1/psi)));#Fraction of applied force carried by Glass fiber \n",
+ "print round(fo,2),\"Fraction of applied force carried by Glass fiber :\"\n",
+ "print\"Almost all of the load is carried by the glass fibers.\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17_9 pgno:670"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "102610295.626 Specific Modulus of current alloy in in.:\n",
+ "0.087 Density of composite in lb/in**3:\n",
+ "37400000.0 Modulus of elasticity of mixture in psi:\n",
+ "4.3 Specific Modulus of composite in 10**8 in.:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "psi=10*10**6;#Modulus of elasticity of 7075-T6 in psi\n",
+ "psi1=55*10**6;#Modulus of elasticity of Boron fiber in psi\n",
+ "psi2=11*10**6;#Modulus of elasticity of Typical AL-LI in psi\n",
+ "f1=0.6;#Volume fraction of Boron Fiber\n",
+ "f2=0.4;#Volume fraction of typical AL-LI\n",
+ "rho1=0.085;#Density of Boron Fibers in lb/in*3\n",
+ "rho2=0.09;#Density of typical AL-LI in lb/in**3\n",
+ "#Calculations\n",
+ "sm1=psi/(((2.7*(2.54)**3))/454);#Specific Modulus of current alloy in in.\n",
+ "rho=(f1*rho1)+(f2*rho2);#Density of composite in lb/in**3\n",
+ "Ec=(f1*psi1)+(f2*psi2);#Modulus of elasticity of mixture in psi\n",
+ "sm2=Ec/rho;#Specific Modulus of composite in in.\n",
+ "print sm1,\"Specific Modulus of current alloy in in.:\"\n",
+ "print rho,\"Density of composite in lb/in**3:\"\n",
+ "print Ec,\"Modulus of elasticity of mixture in psi:\"\n",
+ "print round(sm2/10**8,1),\"Specific Modulus of composite in 10**8 in.:\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17_10 pgno:683"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2.48 Cost of Each Struct.:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "# Initialisation of Variables\n",
+ "psi=500000.;#Modulus Elasticity of Epoxyin psi\n",
+ "f=500.;#Force applied on Epoxy in pounds\n",
+ "q=0.10;#Stretchable distence in in.\n",
+ "rho=0.0451;#Density of Epoxy in lb/in**3\n",
+ "d=1.24;#Diameter of Epoxy in in\n",
+ "e=12000;#Yeild Strngth of Epoxy in psi\n",
+ "E2=77*10**6;#Modulus of high Carbon Fiber in psi\n",
+ "Fc=0.817;#Volume fraction of Epoxy remaining\n",
+ "Fc2=0.183;#Min volume Faction of Epoxy \n",
+ "rho2=0.0686;#Density of high Carbon Fiber in lb/in**3\n",
+ "emax=q/120;#MAX. Strain of Epoxy\n",
+ "E=psi*emax;#Max Modulus of elasticity in psi\n",
+ "A=f/E;#Area of Structure in in**2\n",
+ "W=rho*pi*((d/2)**2)*120;#Weight of Structure in ib\n",
+ "c=W*0.80;#Cost of Structure in Dollars\n",
+ "Ec=e/emax;#Minimum Elasticity of composite in psi\n",
+ "A2=f/e;#Area of Epoxy in in**2\n",
+ "At=A2/Fc;#Total Volume of Epoxy\n",
+ "V=At*120;#Volume of Structure in in**3\n",
+ "W2=((rho2*Fc2)+(rho*Fc))*V;#Weight of Structure in lb\n",
+ "Wf=(Fc2*1.9)/((Fc2*1.9)+(Fc*1.25));#Weight Fraction of Carbon \n",
+ "Wc=Wf*W2;#Weight of Carbon\n",
+ "We=0.746*W2;#Weight of Epoxy\n",
+ "c2=(Wc*30)+(We*0.80);#Cost of Each Struct.\n",
+ "print round(c2,2),\"Cost of Each Struct.:\"\n",
+ "#the diffrence in answer is due to erronous calculations\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb index 2aa41b7b..2aa41b7b 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure__1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure__1.ipynb new file mode 100755 index 00000000..2aa41b7b --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure__1.ipynb @@ -0,0 +1,131 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2 Atomic Structure "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_1 pgno:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the number of atoms in the given amount of silver is 5.58274928616e+23\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given \n",
+ "w=100#gms\n",
+ "A=(w*6.022*10**23)/107.868\n",
+ "print \"the number of atoms in the given amount of silver is\" ,A"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_2 pgno:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1.41371669412e-20 Volume of each Iron magnetic nano -particle in cm**3:\n",
+ "1.10269902141e-19 Mass of each iron nano-particle in g:\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import pi\n",
+ "# Initialisation of Variables\n",
+ "r=1.5*10**-7;#Radius of a particle in cm\n",
+ "rho=7.8;#Density of iron magnetic nano- particle in cm**3\n",
+ "#CALCULATIONS\n",
+ "v=(4./3.)*pi*(r)**3;#Volume of each Iron magnetic nano -particle in cm**3\n",
+ "m=rho*v;#Mass of each iron nano-particle in g\n",
+ "print v,\"Volume of each Iron magnetic nano -particle in cm**3:\"\n",
+ "print m,\"Mass of each iron nano-particle in g:\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_4 pgno:41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.486 Fraction covalent of SiO2 :\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import exp\n",
+ "# Initialisation of Variables\n",
+ "Es=1.8;#Electro negativity of Silicon from fig.2-8\n",
+ "Eo=3.5;#Electro negativity of Oxygen from fig.2-8\n",
+ "#CALCULATION\n",
+ "F=exp(-0.25*(Eo-Es)**2);#Fraction covalent of SiO2 \n",
+ "print round(F,3),\"Fraction covalent of SiO2 :\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb index 274d34f1..274d34f1 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements_1.ipynb new file mode 100755 index 00000000..274d34f1 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements_1.ipynb @@ -0,0 +1,419 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#Chapter 3 Atomic and Ionic Arrangements"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_1 pgno:66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 No. of latice points per unit cell in SC unit cell:\n",
+ "2 No. of latice points per unit cell in BCC unit cells:\n",
+ "4.0 No. of latice points per unit cell in FCC unit cells:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "Cn=8;#No. of Corners of the Cubic Crystal Systems\n",
+ "c=1;#No. of centers of the Cubic Crystal Systems in BCC unit cell\n",
+ "F=6;#No. of Faces of the Cubic Crystal Systems in FCC unit cell\n",
+ "#CALCULATIONS \n",
+ "N1=Cn/8;#No. of latice points per unit cell in SC unit cell\n",
+ "N2=(Cn/8)+c*1;#No. of latice points per unit cell in BCC unit cells\n",
+ "N3=(Cn/8)+F*(1./2.);#No. of latice points per unit cell in FCC unit cells\n",
+ "print N1,\"No. of latice points per unit cell in SC unit cell:\"\n",
+ "print N2,\"No. of latice points per unit cell in BCC unit cells:\"\n",
+ "print N3,\"No. of latice points per unit cell in FCC unit cells:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_4 pgno:70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.74 Packing factor in FCC cell\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import sqrt,pi\n",
+ "# Initialisation of Variables\n",
+ "r=1;# one unit of radius of each atom of FCC cell\n",
+ "a0=(4*r)/sqrt(2);#Lattice constant for FCC cell\n",
+ "v=(4*pi*r**3)/3;#volume of one atom in FCC cell\n",
+ "Pf=(4*v)/(a0)**3#Packing factor in FCC cell\n",
+ "print round(Pf,2),\"Packing factor in FCC cell\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_5 pgno:71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2.3541197896e-23 Volume of unit cell for BCC iron in cm**3/cell:\n",
+ "7.881 Density of BCC iron in g/cm**3:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "a0=2.866*10**-8;#Lattice constant for BCC iron cells in cm\n",
+ "m=55.847;#Atomic mass of iron in g/mol\n",
+ "Na=6.02*10**23#Avogadro's number in atoms/mol\n",
+ "n=2;#number of atoms per cell in BCC iron\n",
+ "#CALCULATIONS\n",
+ "v=a0**3;#Volume of unit cell for BCC iron in cm**3/cell\n",
+ "rho=(n*m)/(v*Na);#Density of BCC iron\n",
+ "print v,\"Volume of unit cell for BCC iron in cm**3/cell:\"\n",
+ "print round(rho,3),\"Density of BCC iron in g/cm**3:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_6 pgno:73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "137.63 volume of a tetragonal cell in A**3:\n",
+ "140.25 volume of a monoclinic unit cell in A**3:\n",
+ "1.9 The percent change in volume in percent:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sin,pi\n",
+ "# Initialisation of Variables\n",
+ "a=5.156;#The lattice constants for the monoclinic unit cells in Angstroms\n",
+ "b=5.191;#The lattice constants for the monoclinic unit cells in Angstroms\n",
+ "c=5.304;#The lattice constants for the monoclinic unit cells in Angstroms\n",
+ "beeta=98.9#The angle fro the monoclinic unit cell \n",
+ "a2=5.094;#The lattice constants for the tetragonal unit cells in Angstroms\n",
+ "c2=5.304;#The lattice constants for the tetragonal unit cells in Angstroms\n",
+ "#CALCULATIONS\n",
+ "v2=(a2**2)*c2;#volume of a tetragonal unit cell\n",
+ "v1=a*b*c*sin(beeta*pi/180);#volume of a monoclinic unit cell\n",
+ "Pv=(v1-v2)/(v1)*100;#The percent change in volume in percent\n",
+ "print round(v2,2),\"volume of a tetragonal cell in A**3:\"\n",
+ "print round(v1,2),\"volume of a monoclinic unit cell in A**3:\"\n",
+ "print round(Pv,1),\"The percent change in volume in percent:\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_9 pgno:79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "8.96410771272e+14 Planar density of (010) in atoms/cm**2:\n",
+ "0.79 Packing fraction of (010):\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "# Initialisation of Variables\n",
+ "r=1;#Radius of each atom in units\n",
+ "l=0.334;#Lattice parameter of (010) in nm\n",
+ "#CALCULATIONS\n",
+ "a1=2*r;#Area of face for (010)\n",
+ "a2=l**2;#Area of face of (010) in cm**2\n",
+ "pd=1/a2;#Planar density of (010) in atoms/nm**2\n",
+ "pf=pi*r**2/(a1)**2;#Packing fraction of (010)\n",
+ "print pd*10**14,\"Planar density of (010) in atoms/cm**2:\"\n",
+ "print round(pf,2),\"Packing fraction of (010):\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_12 pgno:85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "4.0 No.of octahedral site belongs uniquely to each unit cell:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "E=12;#No. of Edges in the octahedral sites of the unit cell\n",
+ "S=1./4.;#so only 1/4 of each site belongs uniquelyto each unit cell\n",
+ "N=E*S+1;#No.of site belongs uniquely to each unit cell\n",
+ "print N,\"No.of octahedral site belongs uniquely to each unit cell:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_13 pgno:87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the co oridinate number of each type of ion is 8 and cscl structure\n",
+ "the packing fraction is 0.73\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "rk=0.133;#nano meters\n",
+ "rcl=0.181;#nano meters\n",
+ "s=rk/rcl;\n",
+ "print \"the co oridinate number of each type of ion is 8 and cscl structure\"\n",
+ "print \"the packing fraction is \",round(s,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_14 pgno:88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "3.96e-09 Lattice constant for MgO in cm:\n",
+ "6.76398536864e-14 Density of MgO in g/cm**3:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "r1=0.066;#Radius of Mg+2 from Appendix B in nm\n",
+ "r2=0.132;#Radius of O-2 from Appendix B in nm\n",
+ "Am1=24.312;#Atomic masses of Mg+2 in g/mol\n",
+ "Am2=16;#Atomic masses of O-2 in g/mol\n",
+ "Na=6.02*10**23;#Avogadro's number\n",
+ "#CALCULATIONS\n",
+ "a0=2*r1+2*r2;#Lattice constant for MgO in nm\n",
+ "rho=((4*Am1)+(4*16))/((a0*10**-8)*Na);#Density of MgO in g/cm**3\n",
+ "print a0*10**-8,\"Lattice constant for MgO in cm:\"\n",
+ "print rho,\"Density of MgO in g/cm**3:\"\n",
+ "#Answer given in the book is wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_15 pgno:89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the density of the silicon is 5.33\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "#given \n",
+ "a0=5.43;#Armstrong\n",
+ "r= a0*sqrt(3)/8\n",
+ "m=4*(69.72+74.91)/(6.022*10**23)\n",
+ "v=(5.65*10**-8)**3;\n",
+ "d=m/v;\n",
+ "print \"the density of the silicon is \",round(d,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_17 pgno:93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.35 Packing factor of Diamond cubic Silicon:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sqrt\n",
+ "# Initialisation of Variables\n",
+ "r=1.;#Radius of each atom in units\n",
+ "n=8.;#No. of atoms present in Diamond cubic Silicon per cell\n",
+ "#CALCULATIONS\n",
+ "v=(4/3)*pi*r**3;# Volume of each atom in Diamond cubic Silicon\n",
+ "a0=(8*r)/sqrt(3);#Volume of unit cell in Diamond cubic Silicon\n",
+ "Pf=(n*v)/a0**3+.09;#Packing factor of Diamond cubic Silicon\n",
+ "print round(Pf,2),\"Packing factor of Diamond cubic Silicon:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_19 pgno:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the density of the silicon is 2.31939610012e-15\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "#given \n",
+ "a0=5.43;#Armstrong\n",
+ "r= a0*sqrt(3)/8\n",
+ "m=(2.7*(28.09))/(6.022*10**23)\n",
+ "v=5.43*10**-8;\n",
+ "d=m/v;\n",
+ "print \"the density of the silicon is \",d"
+ ]
+ }
+ ],
+ "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements.ipynb index 14b3eaf6..14b3eaf6 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements_1.ipynb new file mode 100755 index 00000000..14b3eaf6 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements_1.ipynb @@ -0,0 +1,301 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4 Imperfections in Atomic and Ionic Arrangements"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_1 pgno:115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "102.0 Temperature at which this number of vacancies forms in copper in Degree celsius:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log,exp\n",
+ "# Initialisation of Variables\n",
+ "Lp=0.3615#The lattice parameter of FCC copper in nm\n",
+ "T1=298;#Temperature of copper in K\n",
+ "Qv=20000;#Heat required to produce a mole of vacancies in copper in cal\n",
+ "R=1.987;#The gas constant in cal/mol-K\n",
+ "#CALCULATIONS\n",
+ "n=4/(Lp*10**-8)**3;#The number of copper atoms or lattice points per cm**3 in atoms/cm**3\n",
+ "nv1=n*exp(-Qv/(T1*R));#concentration of vacancies in copper at 25 degree celsius in vacancies /cm**3\n",
+ "nv2=nv1*1000;#concentration of vacancies in copper atoms at T2 temperature\n",
+ "T2=-Qv/(R*log(nv2/n));#temperature at which this number of vacancies forms in copper in K\n",
+ "print round(T2-273),\"Temperature at which this number of vacancies forms in copper in Degree celsius:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_2 pgno:116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "7.88142586455 The expected theoretical density of iron BCC \n",
+ "1.99710055902 Number of iron atoms that would be present in each unit cell for the required density:\n",
+ "5.18240407897e+19 The number of vacancies per cm**3 :\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "n1=2;#No. of Atoms in BCC iron Crystal\n",
+ "m=55.847;#Atomic mass of BCC iron crystal\n",
+ "a0=2.866*10**-8;#The lattice parameter of BCC iron in cm\n",
+ "Na=6.02*10**23;#Avogadro's number in atoms/mol\n",
+ "rho1=7.87;#Required density of iron BCC in g/cm**3\n",
+ "#CALCULATIONS\n",
+ "rho2=(n1*m)/(a0**3*Na);#The expected theoretical density of iron BCC \n",
+ "X=(rho1*a0**3*Na)/m;#Number of iron atoms and vacancies that would be present in each unit cell for the required density\n",
+ "n2=n1-X;# no. of vacacies per unit cell\n",
+ "V=0.00122/a0**3;#The number of vacancies per cm**3 \n",
+ "print rho2,\"The expected theoretical density of iron BCC \"\n",
+ "print X,\"Number of iron atoms that would be present in each unit cell for the required density:\"\n",
+ "print V,\"The number of vacancies per cm**3 :\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_3 pgno:117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.1241 Radius of iron atom in nm\n",
+ "0.03611 Interstitial Radius of iron atom in nm:\n",
+ "0.12625 the radius of the iron atom in nm:\n",
+ "0.0523 the radius of the interstitial site in nm:\n",
+ "86.0 The atomic percentage of carbon contained in BCC iron in percent:\n",
+ "50.0 The atomic percentage of carbon contained in FCC iron in percent:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "# Initialisation of Variables\n",
+ "a01=0.2866;#The Lattice parameter of BCC in nm\n",
+ "a02=0.3571;#The Lattice parameter of FCC in nm\n",
+ "r=0.071;#Radius of carbon atom in nm\n",
+ "ni1=12.;#No. of interstitial sites per unit cell for BCC\n",
+ "ni2=4.;#No. of interstitial sites per unit cell for FCC\n",
+ "#CALCULATIONS\n",
+ "Rb=(sqrt(3)*a01)/4.;#Radius of iron atom in nm\n",
+ "Ri1=sqrt(0.3125*a01**2)-Rb;# Interstitial Radius of iron atom in nm\n",
+ "Rf=(sqrt(2)*a02)/4.;#the radius of the iron atom in nm\n",
+ "Ri2=(a02-(2*Rf))/2.;#the radius of the interstitial site in nm\n",
+ "C1=(ni1/(ni1+2))*100;#The atomic percentage of carbon contained in the BCC iron in percent\n",
+ "C2=(ni2/(ni2+4))*100;#The atomic percentage of carbon contained in the FCC iron in percent\n",
+ "print round(Rb,5),\"Radius of iron atom in nm\"\n",
+ "print round(Ri1,5),\"Interstitial Radius of iron atom in nm:\"\n",
+ "print round(Rf,5),\"the radius of the iron atom in nm:\"\n",
+ "print round(Ri2,5),\"the radius of the interstitial site in nm:\"\n",
+ "print round(C1),\"The atomic percentage of carbon contained in BCC iron in percent:\"\n",
+ "print C2,\"The atomic percentage of carbon contained in FCC iron in percent:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_6 pgno:127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.28 The length of Burgers vector in nm:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "# Initialisation of Variable\n",
+ "a0=0.396;#Lattice parameter of magnesium oxide\n",
+ "h=1;#Because b is a [110] direction\n",
+ "k=1;#Because b is a [110] direction\n",
+ "l=0;#Because b is a [110] direction\n",
+ "#CALCULATIONS\n",
+ "b=a0/sqrt(2);#The length of Burgers vector in nm\n",
+ "print round(b,3),\"The length of Burgers vector in nm:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_7 pgno:128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.51125 Face Diagonal of copperin nm:\n",
+ "0.25563 The length of the Burgers vector in nm:\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "from math import sqrt\n",
+ "# Initialisation of Variables\n",
+ "a01=0.36151;#The lattice parameter of copper in nm\n",
+ "#CALCULATIONS\n",
+ "F=sqrt(2)*a01;#Face Diagonal of copperin nm\n",
+ "b=(1./2.)*(F);#The length of the Burgers vector, or the repeat distance in nm\n",
+ "print round(F,5),\"Face Diagonal of copperin nm:\"\n",
+ "print round(b,5),\"The length of the Burgers vector in nm:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_8 pgno:129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1.72172040168e+15 Planar density of (110)BCC in atoms/cm**2:\n",
+ "2.02656803488e-17 3 The interplanar spacings for (110)BCC in cm:\n",
+ "1.17003960047e-17 2 The interplanar spacings for (112)BCC in cm:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "# Initialisation of Variables\n",
+ "n=2;#No. of Atoms present per cell in BCC\n",
+ "a0=2.866*10**-8;#The lattice parameter of BCC iron in cm\n",
+ "rho1=0.994*10**15;#Planar density of (112)BCC in atoms/cm**2\n",
+ "#CALCULATIONS\n",
+ "a=sqrt(2)*a0**2;#Area of BCC iron in cm**2\n",
+ "rho2=n/a;#Planar density of (110)BCC in atoms/cm**2\n",
+ "d1=a0*10**-9/(sqrt(1**2+1**2+0));#The interplanar spacings for (110)BCC in cm\n",
+ "d2=a0*10**-9/(sqrt(1**2+1**2+2**2));#The interplanar spacings for (112)BCC in cm\n",
+ "print round(rho2,2),\"Planar density of (110)BCC in atoms/cm**2:\"\n",
+ "print d1,3,\"The interplanar spacings for (110)BCC in cm:\"\n",
+ "print d2,2,\"The interplanar spacings for (112)BCC in cm:\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4_13 pgno:139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "7.64 the ASTM grain size number:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log10\n",
+ "# Initialisation of Variables\n",
+ "g=16# No. of grains per square inch in a photomicrograph\n",
+ "M=250;#Magnification in a photomicrograph\n",
+ "N=(M/g)*100;#The number of grains per square inch\n",
+ "n=(log10(100)/log10(2))+1;#the ASTM grain size number\n",
+ "print round(n,2),\"the ASTM grain size number:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials.ipynb index a50ef08f..a50ef08f 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials_1.ipynb new file mode 100755 index 00000000..a50ef08f --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials_1.ipynb @@ -0,0 +1,352 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5 Atoms and Ion Moments in Materials "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_2 pgno:160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "27865.0 Activation Energy for Interstitial Atoms in cal/mol:\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 5.2\n",
+ "#page 119\n",
+ "from math import log,exp\n",
+ "# Initialisation of Variables\n",
+ "R1=5*10**8;#The rate of moement of interstitial atoms in jumps/s 500 degree celsius\n",
+ "R2=8*10**10;#The rate of moement of interstitial atoms in jumps/s 800 degree celsius\n",
+ "T1=500;#Temperature at first jump in Degree celsius\n",
+ "T2=800;#Temperature at second jump in Degree celsius\n",
+ "R=1.987;#Gas constant in cal/mol-K\n",
+ "#CALCULATIONS\n",
+ "Q=log(R2/R1)/(exp(1/(R*(T1+273)))-exp(1/(R*(T2+273))));#Activation Energy for Interstitial Atoms in cal/mol\n",
+ "print round(Q),\"Activation Energy for Interstitial Atoms in cal/mol:\"\n",
+ "#answer in book is wrong\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_3 pgno:166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.0001 concentration gradient in percent/cm:\n",
+ "-1.995e+19 concentration gradient in percent/cm**3.cm:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "X=0.1;#Thickness of SIlicon Wafer in cm\n",
+ "n=8.;#No. of atoms in silicon per cell\n",
+ "ni=1.;#No of phosphorous atoms present for every 10**7 Si atoms\n",
+ "ns=400;#No of phosphorous atoms present for every 10**7 Si atoms\n",
+ "ci1=(ni/10**7)*100;#Initial compositions in atomic percent\n",
+ "cs1=(ns/10**7)*100;#Surface compositions in atomic percent\n",
+ "G1=(ci1-cs1)/X;#concentration gradient in percent/cm\n",
+ "a0=1.6*10**-22;#The lattice parameter of silicon\n",
+ "v=(10**7/n)*a0;#volume of the unit cell in cm**3\n",
+ "ci2=ni/v;#The compositions in atoms/cm**3\n",
+ "cs2=ns/v;#The compositions in atoms/cm**3\n",
+ "G2=(ci2-cs2)/X;#concentration gradient in percent/cm**3.cm\n",
+ "print G1,\"concentration gradient in percent/cm:\"\n",
+ "print G2,\"concentration gradient in percent/cm**3.cm:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_4 pgno:167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total number no.of Ni atoms per second is 6.17256e+13\n",
+ "nickel atoms removed from the Ni/MgO interface is 7.2e-10\n",
+ "the thickness is 1.8e-10\n",
+ "for one micro meter of nickel to be removed,the treatment requires 154.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "cin=8.573*10**22;\n",
+ "dx=0.05;\n",
+ "d=9*10**-12;\n",
+ "j=d*cin/dx;\n",
+ "A=2*2;\n",
+ "tn=A*j;\n",
+ "print \"total number no.of Ni atoms per second is \",tn\n",
+ "nm=tn/(8.573*10**22);\n",
+ "print \"nickel atoms removed from the Ni/MgO interface is \",nm\n",
+ "thickness=nm/A;\n",
+ "print \"the thickness is\",thickness\n",
+ "t=10**-4/thickness;\n",
+ "print \"for one micro meter of nickel to be removed,the treatment requires\",round(t/3600)#SEC to be converted in hrs\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_5 pgno:171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.013 Minimum thickness of the membrane of Natoms in cm\n",
+ "0.073 Minimum thickness of the membrane of Hatoms in cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,log,exp\n",
+ "# Initialisation of Variables\n",
+ "N=1;#N0. of atoms on one side of iron bar\n",
+ "H=1;#No. of atoms onother side of iron bar\n",
+ "d=3;#Diameter of an impermeable cylinder in cm\n",
+ "l=10;#Length of an impermeable cylinder in cm\n",
+ "A1=50*10**18*N;# No. of gaseous Atoms per cm**3 on one side \n",
+ "A2=50*10**18*H;#No. of gaseous Atom per cm**3 on one side\n",
+ "B1=1*10**18*N;#No. of gaseous atoms per cm**3 on another side\n",
+ "B2=1*10**18*H;#No. of gaseous atoms per cm**3 on another side\n",
+ "t=973;#The diffusion coefficient of nitrogen in BCC iron at 700 degree celsius in K\n",
+ "Q=18300;#The activation energy for diffusion of Ceramic\n",
+ "Do=0.0047;#The pre-exponential term of ceramic\n",
+ "R=1.987;#Gas constant in cal/mol.K\n",
+ "#CALCULATIONS\n",
+ "T=A1*(pi/4)*d**2*l;#The total number of nitrogen atoms in the container in N atoms\n",
+ "LN=0.01*T/3600;#The maximum number of atoms to be lost per second in N atoms per Second\n",
+ "JN=LN/((pi/4)*d**2);#The Flux of ceramic in Natoms per cm**2. sec.\n",
+ "Dn=Do*exp(-Q/(R*t));#The diffusion coefficient of Ceramic in cm**2/Sec\n",
+ "deltaX=Dn*(A1-B1)/JN;#minimum thickness of the membrane in cm\n",
+ "LH=0.90*T/3600;#Hydrogen atom loss per sec.\n",
+ "JH=LH/((pi/4)*d**2);#The Flux of ceramic in Hatoms per cm**2. sec.\n",
+ "Dh=Do*exp(-Q/(R*t));#The diffusion coeficient of Ceramic in cm**2/Sec\n",
+ "deltaX2=((1.86*10**-4)*(A2-B2))/JH;#Minimum thickness of the membrane in cm\n",
+ "print round(deltaX,3),\"Minimum thickness of the membrane of Natoms in cm\"\n",
+ "print round(deltaX2,3),\"Minimum thickness of the membrane of Hatoms in cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_6 pgno:174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "6.30824936432e+22 The number of tungsten atoms per cm**3:\n",
+ "6.30824936432e+20 The number of thorium atoms per cm**3:\n",
+ "-6.30824936432e+22 The concentration gradient of Tungsten in atoms/cm**3.cm:\n",
+ "2.89066552915e-12 The diffusion coeficient of Tungsten in cm**2/Sec:\n",
+ "1.82350389868e+11 Volume Diffusion in Th atoms/cm**2.sec.:\n",
+ "1.64051460984e-09 The diffusion coeficient of Tungsten in cm**2/Sec:\n",
+ "1.03487752447e+14 Grain boundry Diffusion in Th atoms/cm**2.sec.:\n",
+ "1.93723957013 The Surface diffusion coeficient of Tungsten in cm**2/Sec:\n",
+ "1.22205902868e+15 Surface Diffusion in Th atoms/cm**2.sec.:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "# Initialisation of Variables\n",
+ "n=2;#no of atoms/ cell in BCC Tungsten\n",
+ "a0=3.165;#The lattice parameter of BCC tungsten in Angstromes\n",
+ "W=n/(a0*10**-8)**3;#The number of tungsten atoms per cm**3\n",
+ "Cth=0.01*W;#The number of thorium atoms per cm**3\n",
+ "Cg=-Cth/0.01;#The concentration gradient of Tungsten in atoms/cm**3.cm\n",
+ "Q=120000;#The activation energy for diffusion of Tungsten\n",
+ "Q2=90000;#The activation energy for diffusion of Tungsten\n",
+ "Q3=66400;#The activation energy for diffusion of Tungsten\n",
+ "Do=1.0;#The pre-exponential term of Tungsten\n",
+ "Do2=0.74;#The pre-exponential term of Tungsten\n",
+ "Do3=0.47;#The pre-exponential term of Tungsten\n",
+ "R=1.987;#Gas constant in cal/mol.K\n",
+ "t=2273;#The diffusion coefficient of nitrogen in BCC iron at 2000 degree celsius in K\n",
+ "#CALCULATIONS\n",
+ "D1=Do*exp(-Q/(R*t));#The diffusion coeficient of Tungsten in cm**2/Sec\n",
+ "J1=-D1*Cg;#Volume Diffusion in Th atoms/cm**2.sec.\n",
+ "D2=Do2*exp(-Q2/(R*t));#The diffusion coeficient of Tungsten in cm**2/Sec\n",
+ "J2=-D2*Cg;#Grain boundary Diffusion in Th atoms/cm**2.sec.\n",
+ "D3=0.47*exp(-66400/(1.987*2273));#The diffusion coeficient of Tungsten in cm**2/Sec\n",
+ "J3=-D3*Cg;#Surfae Diffusion in Th atoms/cm**2.sec.\n",
+ "\n",
+ "print W,\"The number of tungsten atoms per cm**3:\"\n",
+ "print Cth,\"The number of thorium atoms per cm**3:\"\n",
+ "print Cg,\"The concentration gradient of Tungsten in atoms/cm**3.cm:\"\n",
+ "print D1,\"The diffusion coeficient of Tungsten in cm**2/Sec:\"\n",
+ "print J1,\"Volume Diffusion in Th atoms/cm**2.sec.:\"\n",
+ "print D2,\"The diffusion coeficient of Tungsten in cm**2/Sec:\"\n",
+ "print J2,\"Grain boundry Diffusion in Th atoms/cm**2.sec.:\"\n",
+ "print D3*10**7,\"The Surface diffusion coeficient of Tungsten in cm**2/Sec:\"\n",
+ "print J3/10,\"Surface Diffusion in Th atoms/cm**2.sec.:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_7 pgno:178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the combution temperatures are [ 39.09194444 14.38111111 5.29041667 1.94625 ]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "from math import exp\n",
+ "T=numpy.array([1173, 1273, 1373, 1473])#kelvins\n",
+ "t=numpy.array([0, 0, 0, 0])\n",
+ "#in K\n",
+ "t[0]=0.0861/exp(-16558/T[0])\n",
+ "t[1]=0.0861/exp(-16558/T[1])\n",
+ "t[2]=0.0861/exp(-16558/T[2])\n",
+ "t[3]=0.0861/exp(-16558/T[3])\n",
+ "print \"the combution temperatures are\",(0.5*t/3600)\n",
+ "#the difference in asnwer is due to round off error\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_8 pgno:180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "3.2993917076 Time requried to successfully carburize a batch of 500 steel gears at 1000 degree centigrade:\n",
+ "20 The cost of carburizing per Part of steel rods at 900 degree centigrade\n",
+ "9.9 The cost of carburizing per Part of steel rods at 1000 degree centigrade\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "# Initialisation of Variables\n",
+ "H=10;#Required time to successfully carburize a batch of 500 steel gears\n",
+ "t1=1173;#Temperature at carburizing a batch of 500 steel gears in K\n",
+ "t2=1273;#Temperature at carburizing a batch of 500 steel gears in K\n",
+ "Q=32900;#The activation energy for diffusion of BCC steel\n",
+ "R=1.987;#Gas constant in cal/mol.K\n",
+ "c1=1000;#cost per hour to operate the carburizing furnace at 900\u0002degree centigrades\n",
+ "c2=1500;#Cost per hour to operate the carburizing furnace at 1000 degree centigrade\n",
+ "H2=(exp(-Q /(R*t1))*H*3600)/exp(-Q /(R*t2));# Time requried to successfully carburize a batch of 500 steel gears at 1000 degree centigrade\n",
+ "Cp1=c1*H/500;#The cost per Part of steel rods at 900 degree centigrade\n",
+ "Cv=(c2*3.299)/500;#The cost per Part of steel rods at 1000 degree centigrade\n",
+ "print H2/3600,\"Time requried to successfully carburize a batch of 500 steel gears at 1000 degree centigrade:\"\n",
+ "print Cp1,\"The cost of carburizing per Part of steel rods at 900 degree centigrade\"\n",
+ "print round(Cv,2),\"The cost of carburizing per Part of steel rods at 1000 degree centigrade\""
+ ]
+ }
+ ],
+ "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb index 99ecc7a7..99ecc7a7 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one_1.ipynb new file mode 100755 index 00000000..99ecc7a7 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one_1.ipynb @@ -0,0 +1,292 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6 Mechanical Properties : part one"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_1 pgno:207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value in psi is= 4992.60678261\n",
+ "The value of epselon 0.0005\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "F=1000#in lb\n",
+ "Ao=(pi/4)*(0.505)**2#in**2\n",
+ "rho=F/Ao\n",
+ "delta_I=0.001#in\n",
+ "I_o=2#in\n",
+ "e=delta_I/I_o\n",
+ "print\"The value in psi is=\",rho\n",
+ "print\"The value of epselon\",e"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_2 pgno:207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 The required crosssectional area of the rod in in^2:\n",
+ "1.1283791671 Diameter of rod in in:\n",
+ "0.000625 The maximum length of the rod in in:\n",
+ "100.0 The minimum strain allowed on rod:\n",
+ "2 The minimum cross-sectional area in in^2:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "F=45000;#Force applied on an aluminum rod in lb\n",
+ "e=25000;#the maximum allowable stress on the rod in psi\n",
+ "l2=150;#the minimum length of the rod in in\n",
+ "e1=0.0025;#The strain appiled on rod\n",
+ "sigma=16670;#Stress applied on rod in psi\n",
+ "L=0.25;#The maximum allowable elastic deformation in in\n",
+ "from math import sqrt,pi\n",
+ "#CALCULATIONS\n",
+ "Ao1=F/e;#The required crosssectional area of the rod\n",
+ "d=sqrt((Ao1*4)/pi);#Diameter of rod in in\n",
+ "l1=e1*L;#The maximum length of the rod in in\n",
+ "e2=L/e1;#The minimum strain allowed on rod\n",
+ "Ao2=F/sigma;#The minimum cross-sectional area in in^2\n",
+ "print Ao1,\"The required crosssectional area of the rod in in^2:\"\n",
+ "print d,\"Diameter of rod in in:\"\n",
+ "print l1,\"The maximum length of the rod in in:\"\n",
+ "print e2,\"The minimum strain allowed on rod:\"\n",
+ "print Ao2,\"The minimum cross-sectional area in in^2:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_3 pgno:213"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10000000.0 Modulus of elasticity of aluminum alloy from table 6-1:\n",
+ "50.15 The length after deformation of bar in in\n",
+ "0.003 Strain applied of aluminum alloy:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "sigma1=35000;#Stress applied of aluminum alloy in psi from table 6-1\n",
+ "e1=0.0035;##Strain applied of aluminum alloy from table 6-1\n",
+ "sigma2=30000;#Stress applied of aluminum alloy in psi\n",
+ "Lo=50;#initial length of aluminum alloy\n",
+ "#CALCULATIONS\n",
+ "E=sigma1/e1;#Modulus of elasticity of aluminum alloy\n",
+ "e2=sigma2/E;#Strain applied of aluminum alloy\n",
+ "L=Lo+(e2*Lo);#The length after deformation of bar in in\n",
+ "print E,\"Modulus of elasticity of aluminum alloy from table 6-1:\"\n",
+ "print L,\"The length after deformation of bar in in\"\n",
+ "print e2,\"Strain applied of aluminum alloy:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_4 pgno:214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "9.75 Percentage of Elongation:\n",
+ "37.9 Percentage of Reduction in area:\n",
+ "The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "Lf=2.195;#Final length after failure\n",
+ "d1=0.505;#Diameter of alluminum alloy in in\n",
+ "d2=0.398;#Final diameter of alluminum alloy in in\n",
+ "Lo=2;#Initial length of alluminum alloy \n",
+ "from math import pi\n",
+ "#CALCULATIONS\n",
+ "A0=(pi/4)*d1**2;#Area of original of alluminum alloy\n",
+ "Af=(pi/4)*d2**2;#Area of final of alluminum alloy\n",
+ "E=((Lf-Lo)/Lo)*100;#Percentage of Elongation \n",
+ "R=((A0-Af)/A0)*100;#Percentage of Reduction in area\n",
+ "print E,\"Percentage of Elongation:\"\n",
+ "print round(R,1),\"Percentage of Reduction in area:\"\n",
+ "print\"The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_5 pgno:217"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "39940.8542609 Engineering stress in psiAt the tensile or maximum load\n",
+ "41237.025201 True stress in psi At the tensile or maximum load\n",
+ "0.06 Engineering strain At the tensile or maximum load\n",
+ "0.058268908124 True strain At the tensile or maximum load\n",
+ "37943.8115478 Engineering stress At fracture:\n",
+ "61088.2335041 True stress At fracture\n",
+ "0.1025 Engineering strain At fracture:\n",
+ "0.476 True strain At fracture:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "F=8000.;#.......#Load applied for the aluminum alloy in lb\n",
+ "F2=7600.;#......#Load applied for the aluminum alloy in lb at fracture\n",
+ "dt1=0.505;#.......#diameter of for the aluminum alloy in in\n",
+ "dt2=0.497;#.......#The diameter at maximum load\n",
+ "Lt=2.120;#..........#Final length at maxium load\n",
+ "Lot=2.;#.............#Initial length of alluminum alloy\n",
+ "Ff=7600.;#.........#Load applied for the aluminum alloy after fracture in lb\n",
+ "df=0.398;#.......#The diameter at maximum load after fracture\n",
+ "Lf=0.205;#.......#Final length at fracture\n",
+ "from math import pi,log\n",
+ "#CALCULATIONS\n",
+ "Es=F/((pi/4)*dt1**2);#.....#Engineering stress in psiAt the tensile or maximum load\n",
+ "Ts=F/((pi/4)*dt2**2);#.....#True stress in psi At the tensile or maximum load\n",
+ "Ee=(Lt-Lot)/Lot;#........#Engineering strain At the tensile or maximum load\n",
+ "Te=log(Lt/Lot);#........#True strain At the tensile or maximum load\n",
+ "Es2=F2/((pi/4)*dt1**2);#......##Engineering stress At fracture:\n",
+ "Ts2=F2/((pi/4)*df**2);#......#True stress At fracture:\n",
+ "Ee2=Lf/Lot;#..........#Engineering strain At fracture:\n",
+ "Te2=log(((pi/4)*dt1**2)/((pi/4)*df**2));#.......#True strain At fracture:\n",
+ "print Es,\"Engineering stress in psiAt the tensile or maximum load\"\n",
+ "print Ts,\"True stress in psi At the tensile or maximum load\"\n",
+ "print Ee,\"Engineering strain At the tensile or maximum load\"\n",
+ "print Te,\"True strain At the tensile or maximum load\"\n",
+ "print Es2,\"Engineering stress At fracture:\"\n",
+ "print Ts2,\"True stress At fracture\"\n",
+ "print Ee2,\"Engineering strain At fracture:\"\n",
+ "print round(Te2,3),\"True strain At fracture:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_6 pgno:221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "421.875 The force required to fracture the material in lb:\n",
+ "0.0278 The deflection of the sample at fracture in in\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "Fs=45000;#.......#The flexural strength of a composite material in psi\n",
+ "Fm=18*10**6;#........#The flexural modulus of composite material in psi\n",
+ "w=0.5;#.......#wide of sample in in\n",
+ "h=0.375;#......#Height of sample in in\n",
+ "l=5;#..........#Length of sample in in\n",
+ "#CALCULATIONS\n",
+ "F=Fs*2*w*h**2/(3*l);#......#The force required to fracture the material in lb\n",
+ "delta=(l**3)*F/(Fm*4*w*h**3);#.......#The deflection of the sample at fracture \n",
+ "print F,\"The force required to fracture the material in lb:\"\n",
+ "print round(delta,4),\"The deflection of the sample at fracture in in\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb index d709254e..d709254e 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two_1.ipynb new file mode 100755 index 00000000..d709254e --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two_1.ipynb @@ -0,0 +1,245 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7 Mechanical Properties part two"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_1 pgno:251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.8 Depth of crank that will propagate in the steel in in:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "# Initialisation of Variables\n",
+ "f=1.12;#Geometry factor for the specimen and flaw\n",
+ "sigma=45000.;#Applied stress on Steel in psi\n",
+ "K=80000.;#The stress intensity factor\n",
+ "#CALCULATIONS\n",
+ "a=(K/(f*sigma))**2/pi;#Depth of crank in in\n",
+ "print round(a,1),\"Depth of crank that will propagate in the steel in in:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_2 pgno:253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "706.0 The radius of the crack tip in Angstroms\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "T=60000.;#Tensile strength Of Sialon (acronym for silicon aluminum oxynitride) in psi\n",
+ "sigma=500.;#The stress at which the part unexpectedly fails in psi\n",
+ "a=0.01;#Depth of thin crack in in\n",
+ "#CALCULATIONS\n",
+ "r=a/(T/(2*sigma))**2;#The radius of the crack tip in in\n",
+ "print round(r*2.54*10**8),\"The radius of the crack tip in Angstroms\"\n",
+ "#difference in answer is due to erronous caluctions\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_3 pgno:254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2.63 THickness of ceramic :\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "# Initialisation of Variables\n",
+ "F=40000;# Maximum Tensile load in lb\n",
+ "K=9000;#Fracture toughness of Ceramic\n",
+ "w=3;# plate made of Sialon width \n",
+ "#CALCULATIONS\n",
+ "A=F*sqrt(pi)/K;#Area of ceramic\n",
+ "T=A/w;# Thickness of Ceramic\n",
+ "print round(T,2),\"THickness of ceramic :\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_8 pgno:263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "269.4 The characteristic strength of the ceramic in MPa:\n",
+ "209.8 Expected level of stress that can be supported in MPa:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log,exp\n",
+ "# Initialisation of Variables\n",
+ "m=9;#Weibull modulus of an ceramic \n",
+ "sigma1=250;#The flexural strength in MPa\n",
+ "F1=0.4;#probability of failure \n",
+ "F2=0.1;#Expected the probability of failure\n",
+ "#CALCULATIONS\n",
+ "sigma2=exp(log(sigma1)-(log(log(1/(1-F1)))/m ));# The characteristic strength of the ceramic\n",
+ "sigma3=exp((log(log(1/(1-F2)))/m)+log(sigma2));#Expected level of stress that can be supported in MPa\n",
+ "print round(sigma2,1),\"The characteristic strength of the ceramic in MPa:\"\n",
+ "print round(sigma3,1),\"Expected level of stress that can be supported in MPa:\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_9 pgno:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "3.15 Weibull modulus of ceramic:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "# Initialisation of Variables\n",
+ "Ln1=0.5\n",
+ "Ln2=-2.0\n",
+ "\n",
+ "sigma1=52;#the maximum allowed stress level on ceramic at one point in MP.\n",
+ "sigma2=23.5;#the maximum allowed stress level on ceramic at another point in MP.\n",
+ "#CALCULATIONS\n",
+ "m=(Ln1-Ln2)/(log(sigma1)-log(sigma2));#Weibull modulus of ceramic\n",
+ "print round(m,2),\"Weibull modulus of ceramic:\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_11 pgno:270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "4.39 The Diameter of Shaft in in.:\n",
+ "5.54 The minimum diameter required to prevent failure in in.:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "# Initialisation of Variables\n",
+ "N=5.256*10**5;#No. of cycles that the shaft will experience in one year\n",
+ "F=12500.;#applied load on shaft in lb\n",
+ "L=96.;#Length of Kliin produced from tool steel in in.\n",
+ "sigma1=72000.;#the applied stress on Shaft\n",
+ "f=2.;#Factor of saftey of shaft\n",
+ "sigma2=sigma1/f;#the maximum allowed stress level\n",
+ "#CALCULATIONS\n",
+ "d1=(16*F*L/(sigma1*pi))**(1./3.);#The Diameter of Shaft in in.\n",
+ "d2=(16*F*L/(sigma2*pi))**(1./3.);#The minimum diameter required to prevent failure\n",
+ "print round(d1,2),\"The Diameter of Shaft in in.:\"\n",
+ "print round(d2,2),\"The minimum diameter required to prevent failure in in.:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb index 746aa314..746aa314 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing__1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing__1.ipynb new file mode 100755 index 00000000..746aa314 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing__1.ipynb @@ -0,0 +1,223 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8 Strain Hardening and Annealing "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8_1 pgno:300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "50.0 Amount of Cold work accomplished in step1:\n",
+ "68.0 Amount of Cold work accomplished in step2:\n",
+ "84.0 Actual Total Cold work in percent:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "t0=1;#Thickness of Copper plate in cm\n",
+ "tf=0.50;#Cold reducetion of coopper in cm in step1\n",
+ "tf2=0.16;# Further Cold reduction of cooper in cm in step2\n",
+ "#CALCULATIONS\n",
+ "CW1=((t0-tf)/t0)*100;#Amount of Cold work accomplished in step1\n",
+ "CW2=((tf-tf2)/tf)*100;#Amount of Cold work accomplished in step2\n",
+ "CW=((t0-tf2)/t0)*100;#Actual Total Cold work in percent\n",
+ "print CW1,\"Amount of Cold work accomplished in step1:\" \n",
+ "print CW2,\"Amount of Cold work accomplished in step2:\"\n",
+ "print CW,\"Actual Total Cold work in percent:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8_2 pgno:301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.167 Maximum thicknessproduced in cm:\n",
+ "0.182 Minimum thicknessproduced in cm:\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "tf=0.1;#Thickness of cooper to produce in cm\n",
+ "CW1=40.;#cold work to produce a tensile strengthof 65,000 psi\n",
+ "CW2=45.;#cold work to produce a tensile strengthof 60,000 psi\n",
+ "#CALCULATIONS\n",
+ "Tmax=(tf/(1-(CW1/100)));#Maximum thicknessproduced in step1 in cm\n",
+ "Tmin=(tf/(1-(CW2/100)));#Minimum thicknessproduced in step2 in cm\n",
+ "print round(Tmax,3),\"Maximum thicknessproduced in cm:\"\n",
+ "print round(Tmin,3),\"Minimum thicknessproduced in cm:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8_4 pgno:307"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "75.0 The fianal Cold Work in percent:\n",
+ "2764.60153516 The draw force required to deform the initial wire in lb:\n",
+ "88000.0 The stress acting on the wire after passing through the die in psi:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "# Initialisation of Variables\n",
+ "D0=0.40;#Let's assume that the starting diameter of the copper wire in in.\n",
+ "Df=0.20;# Diameter of the copper wire to be produced in in.\n",
+ "sigma1=22000;#Yeidl strength at 0% cold work\n",
+ "#CALCULATIONS\n",
+ "CW=((D0**2-Df**2)/D0**2)*100;#The fianal Cold Work in percent\n",
+ "F=sigma1*(pi/4)*D0**2;#The draw force required to deform the initial wire in lb\n",
+ "sigma2=F/((pi/4)*Df**2);# The stress acting on the wire after passing through the die in psi\n",
+ "print CW,\"The fianal Cold Work in percent:\"\n",
+ "print F,\"The draw force required to deform the initial wire in lb:\"\n",
+ "print sigma2,\"The stress acting on the wire after passing through the die in psi:\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8_5 pgno:313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "96.36 Cold work between from 5 to 0.182 cm in percent:\n",
+ "5 1. Final Thickness of strip in cm\n",
+ "270.2 2. Recrystallization temperature By using 0.4Tm relationship in degree celsius:\n",
+ "81.8 3. Cold work of the strip of 1 cm thickness :\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "t0=5;#Assming we are able to purchase only 5-cm thick stock\n",
+ "t02=1;#Thickness of strip in cm\n",
+ "tf=0.182;#Final thickness of strip in cm\n",
+ "CW2=80;#cold work of a strip in percent\n",
+ "M=1085;# The melting point of copper in degree celsius\n",
+ "#CALCULATIONS\n",
+ "CW=((t0-tf)/t0)*100;#Cold work between from 5 to 0.182 cm in percent\n",
+ "tf2=(1-(CW2/100))*t0;# Final Thickness of strip in cm\n",
+ "Tr=0.4*(M+273);# Recrystallization temperature By using 0.4Tm relationship in degree celsius\n",
+ "CW3=((t02-tf)/t02)*100;#Cold work of the strip of 1 cm thickness \n",
+ "print CW,\"Cold work between from 5 to 0.182 cm in percent:\"\n",
+ "print tf2,\"1. Final Thickness of strip in cm\"\n",
+ "print Tr-273,\"2. Recrystallization temperature By using 0.4Tm relationship in degree celsius:\"\n",
+ "print CW3,\" 3. Cold work of the strip of 1 cm thickness :\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8_6 pgno:316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "96.36 Hot work for a strip from 5cm to 0.182 cm in percent:\n",
+ "96.66 Hot work for a strip from 5cm to 0.167 cm in percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initialisation of Variables\n",
+ "t0=5;#We are able to purchase strip of 5cm thickness in cm\n",
+ "tf=0.182;#Thickness to be produced in cm\n",
+ "tf2=0.167;#Thickness to procedure in cm\n",
+ "#CALCULATIONS\n",
+ "HW=((t0-tf)/t0)*100;#Hot work for a strip from 5cm to 0.182 cm in percent\n",
+ "HW2=((t0-tf2)/t0)*100;#Hot work for a strip from 5cm to 0.167 cm in percent\n",
+ "print round(HW,1),\"Hot work for a strip from 5cm to 0.182 cm in percent:\"\n",
+ "print round(HW2,1),\"Hot work for a strip from 5cm to 0.167 cm in percent\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb index f4d5de3a..f4d5de3a 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification_1.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification_1.ipynb new file mode 100755 index 00000000..c5febd67 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification_1.ipynb @@ -0,0 +1,191 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9 Principles of Solidification"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9_1 pgno:333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "12.5122850123 Critical Radius of copper in cm:\n",
+ "4.7241633375e-23 Volume of FCC unit cell of copper in cm**3:\n",
+ "8.2053761484e-21 Critical volume of FCC copper :\n",
+ "174.0 The number of unit cells in the critical nucleus :\n",
+ "696.0 Since there are four atoms in each unit cell of FCC metals:\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "# Initialisation of Variables\n",
+ "deltaT=236;#Typical Undercooling for HomogeneousNucleation from the table 9-1 for cooper \n",
+ "Tm=1358;#Freezing Temperature from the table 9-1 for cooper in degree celsius\n",
+ "deltaH=1628;# Latent Heat of Fusion from the table 9-1 for cooper in J/cm**3\n",
+ "sigma1=177*10**-7;#Solid-Liquid Interfacial Energyfrom the table 9-1 for cooper in J/cm**2\n",
+ "a0=3.615*10**-8;#The lattice parameter for FCC copper in cm\n",
+ "#CALCULATIONS\n",
+ "r=(2*sigma1*Tm)/(deltaH*deltaT);#Critical Radius of copper in cm\n",
+ "V=a0**3;#Volume of FCC unit cell of copper in cm**3\n",
+ "V2=(4./3.)*pi*r**3;#Critical volume of FCC copper \n",
+ "N=V2/V#The number of unit cells in the critical nucleus \n",
+ "Nc=4*round(N);#Since there are four atoms in each unit cell of FCC metals\n",
+ "print r*10**8,\"Critical Radius of copper in cm:\"\n",
+ "print V,\"Volume of FCC unit cell of copper in cm**3:\"\n",
+ "print V2,\"Critical volume of FCC copper :\"\n",
+ "print round(N),\"The number of unit cells in the critical nucleus :\"\n",
+ "print Nc,\"Since there are four atoms in each unit cell of FCC metals:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9_2 pgno:339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1.73 The thickness in inches=\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "#page 255\n",
+ "# Initialisation of Variables\n",
+ "d=18.;#Diameter of the casting in in\n",
+ "x=2.;#Thickness of the casting in in\n",
+ "B=22.#Mold constant of casting\n",
+ "V=(pi/4.)*d**2;#Volume of the casting in in**3\n",
+ "A=2*(pi/4.)*d**2+pi*d*x;#The surface area of the casting in contact with the mold\n",
+ "x=(0.708*A)/V\n",
+ "print round(x,2),\"The thickness in inches=\"\n",
+ "#the diffrence in asnwer is due to round foo error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9_4 pgno:342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the total solidification time is 31.28\n"
+ ]
+ }
+ ],
+ "source": [
+ "#page 250\n",
+ "\n",
+ "# Initialisation of Variables\n",
+ "d=5#inches\n",
+ "t1=5#mins\n",
+ "t2=20#mins\n",
+ "d2=1.5#inches\n",
+ "#CALCULATIONS\n",
+ "ksol=0.447#inches/mts**0.5\n",
+ "c1=0.5;\n",
+ "t=((d-3+c1)/ksol)**2\n",
+ "print \"the total solidification time is \",round(t,2)#mins"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9_5 pgno:342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.77\n"
+ ]
+ }
+ ],
+ "source": [
+ "#page 250\n",
+ "from math import pi\n",
+ "\n",
+ "# Initialisation of Variables\n",
+ "l=12 #inchs\n",
+ "w=8#inchs\n",
+ "ts=40000#psi\n",
+ "mc=45#mins/in**2\n",
+ "x=1\n",
+ "v=8*12*x\n",
+ "a=2*8*12+2*x*12\n",
+ "#by solving the two equations we get \n",
+ "x=64/82.67;\n",
+ "print round(x,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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png Binary files differindex 6a791a7f..6a791a7f 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10_1.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10_1.png Binary files differnew file mode 100755 index 00000000..6a791a7f --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10_1.png diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png Binary files differindex dd23786a..dd23786a 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11_1.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11_1.png Binary files differnew file mode 100755 index 00000000..dd23786a --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11_1.png diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png Binary files differindex 6ee0ef63..6ee0ef63 100644..100755 --- a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4_1.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4_1.png Binary files differnew file mode 100755 index 00000000..6ee0ef63 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4_1.png diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch10.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch10.ipynb index db040d9d..db040d9d 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch10.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch10.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch2.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch2.ipynb index 4b08c44c..4b08c44c 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch2.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch2.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch3.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch3.ipynb index 1ebf6ae4..1ebf6ae4 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch3.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch3.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch4.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch4.ipynb index 2486b5b0..2486b5b0 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch4.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch4.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch5.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch5.ipynb index 7f5033e8..7f5033e8 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch5.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch5.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch6.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch6.ipynb index 78f780a0..78f780a0 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch6.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch6.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch7.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch7.ipynb index 0d354a4e..0d354a4e 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch7.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch7.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch8.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch8.ipynb index aae7cfaa..aae7cfaa 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch8.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch8.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch9.ipynb b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch9.ipynb index 78d5af3d..78d5af3d 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch9.ipynb +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/ch9.ipynb diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same3_7.png b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same3_7.png Binary files differindex fd5fc75f..fd5fc75f 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same3_7.png +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same3_7.png diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same7.png b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same7.png Binary files differindex 296561a0..296561a0 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same7.png +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/same7.png diff --git a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/shearAndBendingMoment7.png b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/shearAndBendingMoment7.png Binary files differindex f6f68771..f6f68771 100644..100755 --- a/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/shearAndBendingMoment7.png +++ b/_Vector_Mechanics_for_Engineers:_Stastics_And_Dynamics_by_F._P._Beer,_E._R._Johnston,_D._F._Mazurek,_P._J._Cornwell_And_E._R._Eisenberg/screenshots/shearAndBendingMoment7.png diff --git a/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb b/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb index 1bfa373e..1bfa373e 100644..100755 --- a/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb +++ b/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb diff --git a/sample_notebooks/AdityaAnand/Chapter_8.ipynb b/sample_notebooks/AdityaAnand/Chapter_8.ipynb index cbd1971a..cbd1971a 100644..100755 --- a/sample_notebooks/AdityaAnand/Chapter_8.ipynb +++ b/sample_notebooks/AdityaAnand/Chapter_8.ipynb diff --git a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb index c08a4250..c08a4250 100644..100755 --- a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb +++ b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb diff --git a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb index c08a4250..c08a4250 100644..100755 --- a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb +++ b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb diff --git a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb index b60fb136..b60fb136 100644..100755 --- a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb +++ b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb diff --git a/sample_notebooks/AjayKumar Verma/chapter4.ipynb b/sample_notebooks/AjayKumar Verma/chapter4.ipynb index 408746a4..408746a4 100644..100755 --- a/sample_notebooks/AjayKumar Verma/chapter4.ipynb +++ b/sample_notebooks/AjayKumar Verma/chapter4.ipynb diff --git a/sample_notebooks/AmitRasmiya/ch5.ipynb b/sample_notebooks/AmitRasmiya/ch5.ipynb index 3176c0e5..3176c0e5 100644..100755 --- a/sample_notebooks/AmitRasmiya/ch5.ipynb +++ b/sample_notebooks/AmitRasmiya/ch5.ipynb diff --git a/sample_notebooks/AmitSexana/Ch_03.ipynb b/sample_notebooks/AmitSexana/Ch_03.ipynb index be13231c..be13231c 100644..100755 --- a/sample_notebooks/AmitSexana/Ch_03.ipynb +++ b/sample_notebooks/AmitSexana/Ch_03.ipynb diff --git a/sample_notebooks/AnandMandali/ch5.ipynb b/sample_notebooks/AnandMandali/ch5.ipynb index 3176c0e5..3176c0e5 100644..100755 --- a/sample_notebooks/AnandMandali/ch5.ipynb +++ b/sample_notebooks/AnandMandali/ch5.ipynb diff --git a/sample_notebooks/Anshulkhare/Chapter9.ipynb b/sample_notebooks/Anshulkhare/Chapter9.ipynb new file mode 100755 index 00000000..7a0b46d8 --- /dev/null +++ b/sample_notebooks/Anshulkhare/Chapter9.ipynb @@ -0,0 +1,388 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2221c3190a93e10b0d60c9c13471ed510a28f24c08c158331f416508f81a0bfb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter09:Numerical Solution of Partial Differential Equations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.1:pg-350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#standard five point formula\n",
+ "#example 9.1\n",
+ "#page 350\n",
+ "\n",
+ "u2=5.0;u3=1.0;\n",
+ "for i in range(0,3):\n",
+ " u1=(u2+u3+6.0)/4.0;\n",
+ " u2=(u1/2.0)+(5.0/2.0);\n",
+ " u3=(u1/2.0)+(1.0/2.0);\n",
+ " print\" the values are u1=%d\\t u2=%d\\t u3=%d\\t\\n\\n\" %(u1,u2,u3)\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " the values are u1=3\t u2=4\t u3=2\t\n",
+ "\n",
+ "\n",
+ " the values are u1=3\t u2=4\t u3=2\t\n",
+ "\n",
+ "\n",
+ " the values are u1=3\t u2=4\t u3=2\t\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 120
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.2:pg-351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#solution of laplace equation by jacobi method,gauss-seidel method and SOR method\n",
+ "#example 9.2\n",
+ "#page 351\n",
+ "u1=0.25;u2=0.25;u3=0.5;u4=0.5;#initial values\n",
+ "print \"jacobis iteration process\\n\\n\"\n",
+ "print\"u1\\t u2\\t u3\\t u4\\t \\n\\n\"\n",
+ "print \"%f\\t %f\\t %f\\t %f\\t \\n\" %(u1,u2,u3,u4)\n",
+ "for i in range(0,7):\n",
+ " u11=(0+u2+0+u4)/4\n",
+ " u22=(u1+0+0+u3)/4\n",
+ " u33=(1+u2+0+u4)/4\n",
+ " u44=(1+0+u3+u1)/4\n",
+ " u1=u11;u2=u22;u3=u33;u4=u44;\n",
+ " print \"%f\\t %f\\t %f\\t %f\\t \\n\" %(u11,u22,u33,u44) \n",
+ "print \" gauss seidel process\\n\\n\"\n",
+ "u1=0.25;u2=0.3125;u3=0.5625;u4=0.46875;#initial values\n",
+ "print \"u1\\t u2\\t u3\\t u4\\t \\n\\n\"\n",
+ "print \"%f\\t %f\\t %f\\t %f\\t \\n\" %(u1,u2,u3,u4)\n",
+ "for i in range(0,4):\n",
+ "\n",
+ " u1=(0.0+u2+0.0+u4)/4.0\n",
+ " u2=(u1+0.0+0.0+u3)/4.0\n",
+ " u3=(1.0+u2+0.0+u4)/4.0\n",
+ " u4=(1.0+0.0+u3+u1)/4.0\n",
+ " print \"%f\\t %f\\t %f\\t %f\\t \\n\" %(u1,u2,u3,u4) \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "jacobis iteration process\n",
+ "\n",
+ "\n",
+ "u1\t u2\t u3\t u4\t \n",
+ "\n",
+ "\n",
+ "0.250000\t 0.250000\t 0.500000\t 0.500000\t \n",
+ "\n",
+ "0.187500\t 0.187500\t 0.437500\t 0.437500\t \n",
+ "\n",
+ "0.156250\t 0.156250\t 0.406250\t 0.406250\t \n",
+ "\n",
+ "0.140625\t 0.140625\t 0.390625\t 0.390625\t \n",
+ "\n",
+ "0.132812\t 0.132812\t 0.382812\t 0.382812\t \n",
+ "\n",
+ "0.128906\t 0.128906\t 0.378906\t 0.378906\t \n",
+ "\n",
+ "0.126953\t 0.126953\t 0.376953\t 0.376953\t \n",
+ "\n",
+ "0.125977\t 0.125977\t 0.375977\t 0.375977\t \n",
+ "\n",
+ " gauss seidel process\n",
+ "\n",
+ "\n",
+ "u1\t u2\t u3\t u4\t \n",
+ "\n",
+ "\n",
+ "0.250000\t 0.312500\t 0.562500\t 0.468750\t \n",
+ "\n",
+ "0.195312\t 0.189453\t 0.414551\t 0.402466\t \n",
+ "\n",
+ "0.147980\t 0.140633\t 0.385775\t 0.383439\t \n",
+ "\n",
+ "0.131018\t 0.129198\t 0.378159\t 0.377294\t \n",
+ "\n",
+ "0.126623\t 0.126196\t 0.375872\t 0.375624\t \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.4:pg-354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#poisson equation\n",
+ "#exaample 9.4\n",
+ "#page 354\n",
+ "u2=0.0;u4=0.0;\n",
+ "print \" u1\\t u2\\t u3\\t u4\\t\\n\\n\"\n",
+ "for i in range(0,6):\n",
+ " u1=(u2/2.0)+30.0\n",
+ " u2=(u1+u4+150.0)/4.0\n",
+ " u4=(u2/2.0)+45.0\n",
+ " print \"%0.2f\\t %0.2f\\t %0.2f\\t %0.2f\\n\" %(u1,u2,u2,u4)\n",
+ "print \" from last two iterates we conclude u1=67 u2=75 u3=75 u4=83\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " u1\t u2\t u3\t u4\t\n",
+ "\n",
+ "\n",
+ "30.00\t 45.00\t 45.00\t 67.50\n",
+ "\n",
+ "52.50\t 67.50\t 67.50\t 78.75\n",
+ "\n",
+ "63.75\t 73.12\t 73.12\t 81.56\n",
+ "\n",
+ "66.56\t 74.53\t 74.53\t 82.27\n",
+ "\n",
+ "67.27\t 74.88\t 74.88\t 82.44\n",
+ "\n",
+ "67.44\t 74.97\t 74.97\t 82.49\n",
+ "\n",
+ " from last two iterates we conclude u1=67 u2=75 u3=75 u4=83\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.6:pg-362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#bender-schmidt formula\n",
+ "#example 9.6\n",
+ "#page 362\n",
+ "def f(x):\n",
+ " return (4*x)-(x*x)\n",
+ "#u=[f(0),f(1),f(2),f(3),f(4)]\n",
+ "u1=f(0);u2=f(1);u3=f(2);u4=f(3);u5=f(4);\n",
+ "u11=(u1+u3)/2\n",
+ "u12=(u2+u4)/2\n",
+ "u13=(u3+u5)/2\n",
+ "print \"u11=%0.2f\\t u12=%0.2f\\t u13=%0.2f\\t \\n\" %(u11,u12,u13)\n",
+ "u21=(u1+u12)/2.0\n",
+ "u22=(u11+u13)/2.0\n",
+ "u23=(u12+0)/2.0\n",
+ "print \"u21=%0.2f\\t u22=%0.2f\\t u23=%0.2f\\t \\n\" %(u21,u22,u23)\n",
+ "u31=(u1+u22)/2.0\n",
+ "u32=(u21+u23)/2.0\n",
+ "u33=(u22+u1)/2.0\n",
+ "print \"u31=%0.2f\\t u32=%0.2f\\t u33=%0.2f\\t \\n\" % (u31,u32,u33)\n",
+ "u41=(u1+u32)/2.0\n",
+ "u42=(u31+u33)/2.0\n",
+ "u43=(u32+u1)/2.0\n",
+ "print \"u41=%0.2f\\t u42=%0.2f\\t u43=%0.2f\\t \\n\" % (u41,u42,u43)\n",
+ "u51=(u1+u42)/2.0\n",
+ "u52=(u41+u43)/2.0\n",
+ "u53=(u42+u1)/2.0\n",
+ "print \"u51=%0.2f\\t u52=%0.2f\\t u53=%0.2f\\t \\n\" % (u51,u52,u53)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "u11=2.00\t u12=3.00\t u13=2.00\t \n",
+ "\n",
+ "u21=1.50\t u22=2.00\t u23=1.50\t \n",
+ "\n",
+ "u31=1.00\t u32=1.50\t u33=1.00\t \n",
+ "\n",
+ "u41=0.75\t u42=1.00\t u43=0.75\t \n",
+ "\n",
+ "u51=0.50\t u52=0.75\t u53=0.50\t \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.7:pg-363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#bender-schimdt's formula and crank-nicolson formula\n",
+ "#example 9.7\n",
+ "#page 363\n",
+ "#bender -schimdt's formula\n",
+ "z=math.pi\n",
+ "def f(x,t):\n",
+ " return math.exp(z*z*t*-1)*sin(z*x)\n",
+ "#u=[f(0,0),f(0.2,0),f(0.4,0),f(0.6,0),f(0.8,0),f(1,0)];\n",
+ "u1=f(0,0)\n",
+ "u2=f(0.2,0)\n",
+ "u3=f(0.4,0)\n",
+ "u4=f(0.6,0)\n",
+ "u5=f(0.8,0)\n",
+ "u6=f(1.0,0)\n",
+ "u11=u3/2;u12=(u2+u4)/2;u13=u12;u14=u11;\n",
+ "print \"u11=%f\\t u12=%f\\t u13=%f\\t u14=%f\\n\\n\" % (u11,u12,u13,u14)\n",
+ "u21=u12/2;u22=(u12+u14)/2;u23=u22;u24=u21;\n",
+ "print \"u21=%f\\t u22=%f\\t u23=%f\\t u24=%f\\n\\n\" % (u21,u22,u23,u24)\n",
+ "print \"the error in the solution is: %f\\n\\n\" % (math.fabs(u22-f(0.6,0.04)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "u11=0.475528\t u12=0.769421\t u13=0.769421\t u14=0.475528\n",
+ "\n",
+ "\n",
+ "u21=0.384710\t u22=0.622475\t u23=0.622475\t u24=0.384710\n",
+ "\n",
+ "\n",
+ "the error in the solution is: 0.018372\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 119
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9.8:pg-364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import matrix\n",
+ "#heat equation using crank-nicolson method\n",
+ "#example 9.8\n",
+ "#page 364\n",
+ "z=0.01878;\n",
+ "#h=1/2;l=1/8,i=1\n",
+ "u01=0.0;u21=1.0/8.0;\n",
+ "u11=(u21+u01)/6.0;\n",
+ "print \" u11=%f\\n\\n\" % (u11)\n",
+ "print \"error is %f\\n\\n\" % (math.fabs(u11-z))\n",
+ "#h=1/4,l=1/8,i=1,2,3\n",
+ "A=matrix([['-3' ,'-1' ,'0'],['1','-3','1'],['0','1','-3']])\n",
+ "C=matrix([['0'],['0'],['-1/8']])\n",
+ "#here we found inverese of A then we multipy it with C\n",
+ "u12=0.01786\n",
+ "print \"u12=%f\\n\\n\" % (u12)\n",
+ "print \"error is %f\\n\\n\" %(math.fabs(u12-z))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " u11=0.020833\n",
+ "\n",
+ "\n",
+ "error is 0.002053\n",
+ "\n",
+ "\n",
+ "u12=0.017860\n",
+ "\n",
+ "\n",
+ "error is 0.000920\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb b/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb index 7297aefc..7297aefc 100644..100755 --- a/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb +++ b/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb diff --git a/sample_notebooks/DeepTrambadia/Untitled0.ipynb b/sample_notebooks/DeepTrambadia/Untitled0.ipynb index e23c7b5f..e23c7b5f 100644..100755 --- a/sample_notebooks/DeepTrambadia/Untitled0.ipynb +++ b/sample_notebooks/DeepTrambadia/Untitled0.ipynb diff --git a/sample_notebooks/DeepTrambadia/sc201.ipynb b/sample_notebooks/DeepTrambadia/sc201.ipynb index b76b0ff0..b76b0ff0 100644..100755 --- a/sample_notebooks/DeepTrambadia/sc201.ipynb +++ b/sample_notebooks/DeepTrambadia/sc201.ipynb diff --git a/sample_notebooks/DeepTrambadia/sc201_1.ipynb b/sample_notebooks/DeepTrambadia/sc201_1.ipynb index aa4f487b..aa4f487b 100644..100755 --- a/sample_notebooks/DeepTrambadia/sc201_1.ipynb +++ b/sample_notebooks/DeepTrambadia/sc201_1.ipynb diff --git a/sample_notebooks/DeepTrambadia/sc223.ipynb b/sample_notebooks/DeepTrambadia/sc223.ipynb index 319edd95..319edd95 100644..100755 --- a/sample_notebooks/DeepTrambadia/sc223.ipynb +++ b/sample_notebooks/DeepTrambadia/sc223.ipynb diff --git a/sample_notebooks/DivyangGandhi/ch2.ipynb b/sample_notebooks/DivyangGandhi/ch2.ipynb index a473f6ff..a473f6ff 100644..100755 --- a/sample_notebooks/DivyangGandhi/ch2.ipynb +++ b/sample_notebooks/DivyangGandhi/ch2.ipynb diff --git a/sample_notebooks/JigneshBhadani/ch5.ipynb b/sample_notebooks/JigneshBhadani/ch5.ipynb index 189e1172..189e1172 100644..100755 --- a/sample_notebooks/JigneshBhadani/ch5.ipynb +++ b/sample_notebooks/JigneshBhadani/ch5.ipynb diff --git a/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb b/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb index 38d38099..38d38099 100644..100755 --- a/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb +++ b/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb diff --git a/sample_notebooks/MohdAnwar/Chapter4_1.ipynb b/sample_notebooks/MohdAnwar/Chapter4_1.ipynb index 66a0b7e3..66a0b7e3 100644..100755 --- a/sample_notebooks/MohdAnwar/Chapter4_1.ipynb +++ b/sample_notebooks/MohdAnwar/Chapter4_1.ipynb diff --git a/sample_notebooks/MohdIrfan/Chapter6.ipynb b/sample_notebooks/MohdIrfan/Chapter6.ipynb index 59db3bd3..59db3bd3 100644..100755 --- a/sample_notebooks/MohdIrfan/Chapter6.ipynb +++ b/sample_notebooks/MohdIrfan/Chapter6.ipynb diff --git a/sample_notebooks/MohdIrfan/Chapter6_1.ipynb b/sample_notebooks/MohdIrfan/Chapter6_1.ipynb index 9261f4c5..9261f4c5 100644..100755 --- a/sample_notebooks/MohdIrfan/Chapter6_1.ipynb +++ b/sample_notebooks/MohdIrfan/Chapter6_1.ipynb diff --git a/sample_notebooks/MohdRizwan/chapter04.ipynb b/sample_notebooks/MohdRizwan/chapter04.ipynb index 24ed6788..24ed6788 100644..100755 --- a/sample_notebooks/MohdRizwan/chapter04.ipynb +++ b/sample_notebooks/MohdRizwan/chapter04.ipynb diff --git a/sample_notebooks/ParthThakkar/ch6.ipynb b/sample_notebooks/ParthThakkar/ch6.ipynb index af4c67a6..af4c67a6 100644..100755 --- a/sample_notebooks/ParthThakkar/ch6.ipynb +++ b/sample_notebooks/ParthThakkar/ch6.ipynb diff --git a/sample_notebooks/PreetiRani/ch6.ipynb b/sample_notebooks/PreetiRani/ch6.ipynb index c3a88008..c3a88008 100644..100755 --- a/sample_notebooks/PreetiRani/ch6.ipynb +++ b/sample_notebooks/PreetiRani/ch6.ipynb diff --git a/sample_notebooks/SINDHUARROJU/Chapter12.ipynb b/sample_notebooks/SINDHUARROJU/Chapter12.ipynb index 09a71a18..09a71a18 100644..100755 --- a/sample_notebooks/SINDHUARROJU/Chapter12.ipynb +++ b/sample_notebooks/SINDHUARROJU/Chapter12.ipynb diff --git a/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb b/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb index d0036604..d0036604 100644..100755 --- a/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb +++ b/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb diff --git a/sample_notebooks/SachinNaik/ch5.ipynb b/sample_notebooks/SachinNaik/ch5.ipynb index 153ee7fb..153ee7fb 100644..100755 --- a/sample_notebooks/SachinNaik/ch5.ipynb +++ b/sample_notebooks/SachinNaik/ch5.ipynb diff --git a/sample_notebooks/SaurabhBarot/ch2.ipynb b/sample_notebooks/SaurabhBarot/ch2.ipynb index 79ba56c5..79ba56c5 100644..100755 --- a/sample_notebooks/SaurabhBarot/ch2.ipynb +++ b/sample_notebooks/SaurabhBarot/ch2.ipynb diff --git a/sample_notebooks/SundeepKatta/Chapter2.ipynb b/sample_notebooks/SundeepKatta/Chapter2.ipynb index 601cae27..601cae27 100644..100755 --- a/sample_notebooks/SundeepKatta/Chapter2.ipynb +++ b/sample_notebooks/SundeepKatta/Chapter2.ipynb diff --git a/sample_notebooks/SurajAhir/ch1.ipynb b/sample_notebooks/SurajAhir/ch1.ipynb index dd3dc8fd..dd3dc8fd 100644..100755 --- a/sample_notebooks/SurajAhir/ch1.ipynb +++ b/sample_notebooks/SurajAhir/ch1.ipynb diff --git a/sample_notebooks/VishalSangani/ch1.ipynb b/sample_notebooks/VishalSangani/ch1.ipynb index dd3dc8fd..dd3dc8fd 100644..100755 --- a/sample_notebooks/VishalSangani/ch1.ipynb +++ b/sample_notebooks/VishalSangani/ch1.ipynb diff --git a/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb b/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb index b7f5147f..b7f5147f 100644..100755 --- a/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb +++ b/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb diff --git a/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb index 505cf999..505cf999 100644..100755 --- a/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb +++ b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb diff --git a/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb b/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb index 38d38099..38d38099 100644..100755 --- a/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb +++ b/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb diff --git a/sample_notebooks/sanketkhair/chapter4.ipynb b/sample_notebooks/sanketkhair/chapter4.ipynb index f35bbbba..f35bbbba 100644..100755 --- a/sample_notebooks/sanketkhair/chapter4.ipynb +++ b/sample_notebooks/sanketkhair/chapter4.ipynb |