summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xApplied_Thermodynamics/Chapter1.ipynb1252
-rwxr-xr-xApplied_Thermodynamics/Chapter11.ipynb918
-rwxr-xr-xApplied_Thermodynamics/Chapter12.ipynb1023
-rwxr-xr-xApplied_Thermodynamics/Chapter13.ipynb916
-rwxr-xr-xApplied_Thermodynamics/Chapter15.ipynb591
-rwxr-xr-xApplied_Thermodynamics/Chapter16.ipynb899
-rwxr-xr-xApplied_Thermodynamics/Chapter17.ipynb591
-rwxr-xr-xApplied_Thermodynamics/Chapter18.ipynb830
-rwxr-xr-xApplied_Thermodynamics/Chapter19.ipynb644
-rwxr-xr-xApplied_Thermodynamics/Chapter2.ipynb227
-rwxr-xr-xApplied_Thermodynamics/Chapter3.ipynb1090
-rwxr-xr-xApplied_Thermodynamics/Chapter4.ipynb765
-rwxr-xr-xApplied_Thermodynamics/Chapter5.ipynb879
-rwxr-xr-xApplied_Thermodynamics/Chapter6.ipynb1088
-rwxr-xr-xApplied_Thermodynamics/Chapter7.ipynb952
-rwxr-xr-xApplied_Thermodynamics/Chapter8.ipynb1667
-rwxr-xr-xApplied_Thermodynamics/Chapter9.ipynb841
-rwxr-xr-xApplied_Thermodynamics/README.txt10
-rwxr-xr-xApplied_Thermodynamics/screenshots/lossEnergy.pngbin0 -> 72738 bytes
-rwxr-xr-xApplied_Thermodynamics/screenshots/thermaleff.pngbin0 -> 79186 bytes
-rwxr-xr-xApplied_Thermodynamics/screenshots/work.pngbin0 -> 62379 bytes
-rwxr-xr-xChemistry/Chapter_1.ipynb310
-rwxr-xr-xChemistry/Chapter_11.ipynb226
-rwxr-xr-xChemistry/Chapter_12.ipynb446
-rwxr-xr-xChemistry/Chapter_13.ipynb441
-rwxr-xr-xChemistry/Chapter_14.ipynb359
-rwxr-xr-xChemistry/Chapter_15.ipynb472
-rwxr-xr-xChemistry/Chapter_16.ipynb584
-rwxr-xr-xChemistry/Chapter_17.ipynb92
-rwxr-xr-xChemistry/Chapter_18.ipynb284
-rwxr-xr-xChemistry/Chapter_19.ipynb267
-rwxr-xr-xChemistry/Chapter_23.ipynb66
-rwxr-xr-xChemistry/Chapter_3.ipynb676
-rwxr-xr-xChemistry/Chapter_4.ipynb290
-rwxr-xr-xChemistry/Chapter_5.ipynb768
-rwxr-xr-xChemistry/Chapter_6.ipynb422
-rwxr-xr-xChemistry/Chapter_7.ipynb312
-rwxr-xr-xChemistry/Chapter_9.ipynb130
-rwxr-xr-xChemistry/README.txt10
-rwxr-xr-xChemistry/screenshots/screen1.pngbin0 -> 27793 bytes
-rwxr-xr-xChemistry/screenshots/screen2.pngbin0 -> 26067 bytes
-rwxr-xr-xChemistry/screenshots/screen3.pngbin0 -> 15079 bytes
-rwxr-xr-xElectronic_Communication_Systems/Chapter1.ipynb115
-rwxr-xr-xElectronic_Communication_Systems/Chapter11.ipynb412
-rwxr-xr-xElectronic_Communication_Systems/Chapter12.ipynb736
-rwxr-xr-xElectronic_Communication_Systems/Chapter15.ipynb400
-rwxr-xr-xElectronic_Communication_Systems/Chapter17.ipynb140
-rwxr-xr-xElectronic_Communication_Systems/Chapter18.ipynb107
-rwxr-xr-xElectronic_Communication_Systems/Chapter2.ipynb266
-rwxr-xr-xElectronic_Communication_Systems/Chapter3.ipynb581
-rwxr-xr-xElectronic_Communication_Systems/Chapter4.ipynb460
-rwxr-xr-xElectronic_Communication_Systems/Chapter5.ipynb98
-rwxr-xr-xElectronic_Communication_Systems/Chapter7.ipynb164
-rwxr-xr-xElectronic_Communication_Systems/Chapter9.ipynb443
-rwxr-xr-xElectronic_Communication_Systems/README.txt10
-rwxr-xr-xElectronic_Communication_Systems/screenshots/capacityTele.pngbin0 -> 68704 bytes
-rwxr-xr-xElectronic_Communication_Systems/screenshots/cuttoff.pngbin0 -> 68725 bytes
-rwxr-xr-xElectronic_Communication_Systems/screenshots/maxModulation.pngbin0 -> 72190 bytes
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/README.txt10
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/UNIT_1,Chapter_1.ipynb889
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_1.ipynb734
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_2.ipynb665
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_6.ipynb110
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_9.ipynb64
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_3,Chapter_1.ipynb469
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_1.ipynb361
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_2.ipynb363
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_3.ipynb426
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_4.ipynb349
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_5.ipynb420
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/Unit_5,Chapter_5.ipynb992
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/screenshots/Requred_probablty.pngbin0 -> 16224 bytes
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/screenshots/atomc_no_he.pngbin0 -> 12501 bytes
-rwxr-xr-xIntroduction_To_Modern_Physics_Volume_1/screenshots/zeeman_shft.pngbin0 -> 20085 bytes
74 files changed, 31122 insertions, 0 deletions
diff --git a/Applied_Thermodynamics/Chapter1.ipynb b/Applied_Thermodynamics/Chapter1.ipynb
new file mode 100755
index 00000000..136a766b
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter1.ipynb
@@ -0,0 +1,1252 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3d30e44891eb37ef00ed656432995cc8c4288cfa1fdb5a14ded0356bbe856a8e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Fundamental Concepts and Definitions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 30*10**-2 #Manometer deflection of Mercury(in m):\n",
+ "d = 13550 #Density of mercury(in kg/m**3)\n",
+ "g = 9.78 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculations:\n",
+ "P = d*g*h #Pressure difference(in Pa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Pressure Difference: \" ,round(P,2),\"Pa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure Difference: 39755.7 Pa\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "#Variable Declaration: \n",
+ "d = 30*10**-2 #Diameter of the vessel(in m):\n",
+ "g = 9.78 #Accelertion due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "p = 76*(10**-2)*13550*g #Atmospheric pressure(in Pa):\n",
+ "a = (round(math.pi,2)*d**2)/4 #Area:\n",
+ "F = p*a #Effort required:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Effort required: \",round(F,2),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Effort required: 7115.48 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 30*10**-2 #Difference in mercury column(in m):\n",
+ "pa = 101 #Atmospheric Pressure(in kPa):\n",
+ "g = 9.78 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "gp = 13550*g*h*10**-3 #Guage pressure(in kPa):\n",
+ "ap = gp+pa #Actual pressure:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Actual pressure of air : \",round(ap,2),\" Kpa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual pressure of air : 140.76 Kpa\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 1 #Depth of tank(in m):\n",
+ "s = 0.8 #Specific gravity:\n",
+ "d = 1000 #Density of water(in kg/m**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "dO = s*d #Density of oil(in kg/m3):\n",
+ "gp = dO*g*h*10**-3 #Gauge pressure(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Gauge pressure\",gp,\"KPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gauge pressure 7.848 KPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 76*10**-2 #Barometer Reading(in m):\n",
+ "d = 13.6*10**3 #Density of mercury(in kg/m**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "h1 = 40*10**-2 #Difference of heights in gas barometer(in m):\n",
+ "pg = (d*g*h1+d*g*h)*10**-3 #Pressure of gas(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Pressure of gas:\",round(pg,2),\"kPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure of gas: 154.76 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 1 #Mass of water(in kg):\n",
+ "h = 1000 #Altitude(in m):\n",
+ "c = 4.18*10**3 #Specific heat of water(in J/kg-K):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = m*g*h #Heat required for heating = Potential energy \n",
+ "dT = Q/c\n",
+ "\n",
+ "#Results\n",
+ "print \"The change in temperature: \",round(dT,2),\"\u00baC\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in temperature: 2.35 \u00baC\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "w = 100 #Weight of object at standard gravitational acceleration(in N):\n",
+ "g = 9.81 #Standard acceleration due to gravity(in m/s**2):\n",
+ "g1 = 8.5 #Gravitation acceleration at given location(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "m = w/g #Mass of object(in kg):\n",
+ "s = m*g1 #Spring balance reading(in N):\n",
+ "\n",
+ "#Results:\n",
+ "print \"The spring balance reading:\",round(s,2),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The spring balance reading: 86.65 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "#Variable Declaration: \n",
+ "dia = 15*10**-2 #Diameter of cylinder(in m):\n",
+ "h = 12*10**-2 #Manometer difference in Hg column(in m):\n",
+ "d = 13.6*10**3 #Density of mercury(in kg/m**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "w = h*d*g*math.pi*dia**2/4 #Weight of piston(in N): pressure*area\n",
+ "m = w/g #Mass of the piston(in kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass of the piston:\",round(m,2),\"Kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of the piston: 28.84 Kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "Hab = 2*10**-2 #Height of water column in limb AB(in m):\n",
+ "Hcd = 10*10**-2 #Height of mercury column in limb CD(in m):\n",
+ "h = 76*10**-2 #Barometer reading for atmospheric pressure(in m):\n",
+ "dm = 13.6*10**3 #Density of mercury(in kg/m**3):\n",
+ "dw = 1000 #Density of water(in kg/m**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "Patm = dm*h*g*10**-3 #Atmospheric pressure(in kPa):\n",
+ "Pab = dw*Hab*g*10**-3 #Pressure of water in column AB(in kPa):\n",
+ "Pcd = dm*Hcd*g*10**-3 #Pressure of mercury in column CD(in kPa):\n",
+ "Ps = Patm+Pcd-Pab #Pressure of steam(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Pressure of steam:\",round(Ps,2),\"KPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure of steam: 114.54 KPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "Pa = 400 #Pressure in compartment A(in kPa):\n",
+ "Pb = 150 #Pressure in compartment B(in kPa):\n",
+ "h = 720*10**-3 #Reading of barometer(in m):\n",
+ "d = 13.6*10**3 #Density of mercury(in kg/m**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "Patm = d*g*h*10**-3 #Atmospheric pressure from barometer reading(in kPa):\n",
+ "PaA = Pa+Patm #Absolute pressure in compartment A(in kPa):\n",
+ "PaB = Pb+Patm #Absolute pressure in compartment B(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Absolute pressure in compartment A:\",round(PaA,2),\"KPa\"\n",
+ "print \"Absolute pressure in compartment B:\",round(PaB,2),\"KPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute pressure in compartment A: 496.06 KPa\n",
+ "Absolute pressure in compartment B: 246.06 KPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "Patm = 90 #Atmospheric pressure(in kPa):\n",
+ "dw = 1000 #Density of water(in kg/m**3):\n",
+ "doil = 850 #Density of oil(in kg/m**3):\n",
+ "dm = 13600 #Density of mercury(in kg/m**3):\n",
+ "h1 = 0.15 #Height of water column(in m):\n",
+ "h2 = 0.25 #Height of oil column(in m):\n",
+ "h3 = 0.40 #Height of mercury column(in m):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "Pw = dw*g*h1*10**-3 #Pressure due to water column at reference line(in kPa):\n",
+ "Po = doil*g*h2*10**-3 #Pressure due to oil column at reference line(in kPa):\n",
+ "Pm = dm*g*h3*10**-3 #Pressure due to mercury column at reference line(in kPa):\n",
+ "Pa = Patm+Pm-Pw-Po #Pressure due to air(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Air pressure:\" ,round(Pa,2),\"KPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air pressure: 139.81 KPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "v = 750.0 #Velocity of the object(in m/s):\n",
+ "F = 4000.0 #Gravitational force acting on the body(in N):\n",
+ "g = 8.0 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "m = F/g #Mass of the object(in kg):\n",
+ "KE = (m*v**2)/2 #Kinetic energy of the body(in J):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Kinetic energy:\",round(KE/10**8,1),\"x 10^8 J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic energy: 1.4 x 10^8 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "Cp = 2.286 #Specific heat at constant pressure(in kJ/kg-K):\n",
+ "Cv = 1.768 #Specific heat at constant volume(in kJ/kg-K):\n",
+ "Ru = 8.314 #Universal gas constant(in kJ/kg-K):\n",
+ "\n",
+ "#Calculation:\n",
+ "R = Cp-Cv #Gas constant(in kJ/kg-K):\n",
+ "m = Ru/R #Molecular weight of gas(in kg/K mol):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Molecular weight of gas:\" ,round(m,2),\"Kg/K mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Molecular weight of gas: 16.05 Kg/K mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 750*10**3 #Initial pressure(in Pa):\n",
+ "t1 = 600 #Initial temperature(in K):\n",
+ "v1 = 0.2 #Initial volume(in m**3):\n",
+ "p2 = 2*10**5 #Final pressure(in Pa):\n",
+ "v2 = 0.5 #Final volume(in m**3):\n",
+ "\n",
+ "#Calculation:\n",
+ "t2 = p2*v2*t1/(p1*v1) #Final temperature(in K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Final temperature:\",t2,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final temperature: 400.0 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 100 #Initial pressure(in kPa):\n",
+ "t1 = 300 #Initial temperature(in K):\n",
+ "v1 = 5 #Initial volume(in m**3):\n",
+ "p2 = 50 #Final pressure(in kPa):\n",
+ "t2 = 280 #Final temperature(in K):\n",
+ "v2 = 5 #Final volume(in m**3):\n",
+ "R = 287.0 #Gas constant for air(in J/kg-K):\n",
+ "\n",
+ "#Calculation:\n",
+ "m1 = p1*v1/(R*t1)*10**3 #Initial mass(in kg):\n",
+ "m2 = p2*v2/(R*t2)*10**3 #Final mass(in kg):\n",
+ "dm = m1-m2 #Mass removed(in kg):\n",
+ "V = dm*R*t1/p1/1000 #Volume of this mass of air at initial states(in m**3):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass of air removed: \",round(dm,3),\"Kg\"\n",
+ "print \"Volume of air at initial states: \",round(V,2),\"m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of air removed: 2.696 Kg\n",
+ "Volume of air at initial states: 2.32 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "#Variable Declaration: \n",
+ "d = 1 #Diameter of the vessel(in m):\n",
+ "h = 4 #Height of the vessel(in m):\n",
+ "p1 = 100 #Initial pressure(in kPa):\n",
+ "t1 = 300 #Initial temperature(in K):\n",
+ "p2 = 125 #Final pressure(in kPa):\n",
+ "Cp = 14.307 #Cp of hydrogen(in kJ/kg-K):\n",
+ "Cv = 10.183 #Cv of volume(in kJ/kg-K):\n",
+ "\n",
+ "#Calculation:\n",
+ "v = math.pi*d**2*h/4 #Volume of the vessel(in m**3):\n",
+ "t2 = p2*t1/p1 #Final temperature(in K):\n",
+ "R = Cp-Cv #Gas constant for hydrogen:\n",
+ "m = round(p1*v/(R*t1),3) #Mass of hydrogen(in kg):\n",
+ "Q = m*Cv*(t2-t1) #Heat supplied at const. volume(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat to be supplied: \",round(Q,2),\"KJ\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat to be supplied: 193.99 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "v = 2+2 #Total volume(in m**3):\n",
+ "m1 = 20 #Mass of air in container 1(in kg):\n",
+ "m2 = 4 #Mass of air in container 2(in kg):\n",
+ "t = 300 #Temperature of the system(in K):\n",
+ "R = 287 #Gas constant for air(in J/kg-K):\n",
+ "\n",
+ "#Calculation:\n",
+ "m = m1+m2 #Total mass after the valve is opened(in kg):\n",
+ "p = m*R*t/v*10**-3 #Final pressure(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Final pressure: \" ,p,\"KPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final pressure: 516.6 KPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 5 #Mass of gas(in kg):\n",
+ "v = 2 #Volume of the container(in m**3):\n",
+ "t = 300 #Temperature in the container(in K):\n",
+ "R = 8.314 #Universal gas constant(in kJ/kg-K):\n",
+ "a = 3628.5*10**2 #Vander-Waals Constant(from table):\n",
+ "b = 3.14*10**-2 #Vander-Waals Constant(from table):\n",
+ "mw = 44.01 #Molecular weight of CO2:\n",
+ "\n",
+ "#Calculation:\n",
+ "Rp = R*10**3/mw #Gas constant for CO2(in j/kg-K):#Considering it as a perfect gas\n",
+ "pp = m*Rp*t/v #Pressure of the gas(in N/m**2):\n",
+ "v1 = v*mw/m #Molar specific volume(in m**3/kg.mol): #Considering it as a real gas:\n",
+ "pr = R*10**3*t/(v1-b)-a/(v1**2)\t#Vanderwall eqn:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Pressure if considered perfect gas: \" ,round(pp/10**5,3),\"x 10^5 N/m^2\"\n",
+ "print \"Pressure if considered real gas: \",round(pr/10**5,3),\"x 10^5 N/m^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure if considered perfect gas: 1.417 x 10^5 N/m^2\n",
+ "Pressure if considered real gas: 1.408 x 10^5 N/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page no. 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p = 17672 #Pressure of steam(in kPa):\n",
+ "t = 712 #Temperature of steam(in K):\n",
+ "Pc = 22.09*10**3 #Critical pressure(in kPa):\n",
+ "Tc = 647.3 #Critical temperature(in K):\n",
+ "Rs = 0.4615 #Gas constant for steam(in kJ/kg-K):\n",
+ "\n",
+ "#Calculation:\n",
+ "vp = Rs*t/p #Specific volume(in m**3/kg) Considering perfect gas:\n",
+ "Rp = p/Pc #Reduced pressure: Considering real gas:\n",
+ "Rt = t/Tc #Reduced temperature:\n",
+ "Z = 0.785 #Value of compressibility factor(from chart for Rp & Rt):\n",
+ "vr = Z*vp #Specific volume(in m**3/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Specific volume considering perfect gas: \",round(vp,4),\"m**3/kg\"\n",
+ "print \"Specific volume considering real gas: \",round(vr,4),\"m**3/Kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume considering perfect gas: 0.0186 m**3/kg\n",
+ "Specific volume considering real gas: 0.0146 m**3/Kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20, page no. 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "d = 5.0 #Diameter of the balloon(in m):\n",
+ "p = 1.013*10**5 #Atmospheric pressure(in N/m**2):\n",
+ "t = 17+273 #Temperature of the surroundings(in K):\n",
+ "R = 8.314*10**3 #Universal gas constant(in J/kg-K):\n",
+ "mw = 2 #Molecular weight of hydrogen:\n",
+ "Ra = 287 #Gas constant for air(in J/kg-K):\n",
+ "th = 273+27 #Temperature of Hydrogen (in K):\n",
+ "\n",
+ "#Calculation:\n",
+ "v = round(4.0/3.0*math.pi*(d/2)**3,2) #Volume of the balloon(in m**3):\n",
+ "Rh = R/mw #Gas constant for H2(in kJ/kg-K):\n",
+ "mh = p*v/(Rh*th) #Mass of H2 in balloon(in kg):\n",
+ "vd = v #Volume of air printlaced(in m**3):\n",
+ "ma = round(p*vd/(Ra*t),2) #Mass of air printlaced(in kg):\n",
+ "L = ma-mh #Load lifting capacity due to buoyant force(in kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Load lifting capacity: \",round(L,3),\"Kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load lifting capacity: 74.344 Kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21, page no. 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math as m\n",
+ "#Variable Declaration: \n",
+ "v = 20 #Volume of vessel(in m**3):\n",
+ "q = 0.25 #Rate at which air is drawn(in m**3/min):\n",
+ "Pr = 4 #Initial pressure/final pressure (ratio):\n",
+ "\n",
+ "#Calculation:\n",
+ "t = v/q*m.log(Pr) #Time required(in min):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Time required: \",round(t,1),\"Minutes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time required: 110.9 Minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22, page no. 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "M = 5.0 #Total mass of system of gas(in kg):\n",
+ "n = 0.80 #Compostion of Nitrogen:\n",
+ "o = 0.18 #Compostion of Oxygen:\n",
+ "c = 0.02 #Composition of Carbon dioxide:\n",
+ "ro = 1.4 #Compression ratio for Oxygen:\n",
+ "rn = 1.4 #Compression ratio for Nitrogen:\n",
+ "rc = 1.3 #Compression ratio for Carbon dioxide:\n",
+ "R = 8314.0 #Universal gas constant(in J/kg-K):\n",
+ "mwn = 28.0 #Molecular weight of Nitrogen:\n",
+ "mwo = 32.0 #Molecular weight of Oxygen:\n",
+ "mwc = 44.0 #Molecular weight of Carbon dioxide:\n",
+ "\n",
+ "#Calculation:\n",
+ "Rn = round(R/mwn,1) #Gas constant for Nitrogen(in J/kg-K):\n",
+ "Ro = round(R/mwo,1) #Gas constant for Oxygen(in J/kg-K):\n",
+ "Rc = round(R/mwc,1) #Gas constant for Carbon dioxide(in J/kg-K):\n",
+ "Rm = round(n*Rn+o*Ro+c*Rc,2) #Gas constant for mixture(in J/kg-K):\n",
+ "Cpn = round((rn/(rn-1))*Rn,3) #Specific heat at constant pressure for Nitrogen(in kJ/kg-K):\n",
+ "Cpo = round((ro/(ro-1))*Ro,3) #Specific heat at constant pressure for Oxygen(in kJ/kg-K):\n",
+ "Cpc = round(rc/(rc-1)*Rc,3) #Specific heat at constant pressure for Carbon dioxide(in kJ/kg-K):\n",
+ "Cpm = round(n*Cpn+o*Cpo+c*Cpc,3) #Specific heat at constant pressure for the mixture(in kJ/kg-K):\n",
+ "nn = n*M/mwn #Number of moles of Nitrogen:\n",
+ "no = o*M/mwo #Number of moles of Oxygen:\n",
+ "nc = c*M/mwc #Number of moles of Carbon dioxide:\n",
+ "nt = nn+no+nc #Total number of moles:\n",
+ "xn = nn/nt #Mole fraction of Nitrogen:\n",
+ "xo = no/nt #Mole fraction of Oxygen:\n",
+ "xc = nc/nt #Mole fraction of Carbon dioxide:\n",
+ "mwm = xn*mwn+xo*mwo+xc*mwc #Molecular weight of the mixture\n",
+ "\n",
+ "#Results:\n",
+ "print \"Gas constant for Nitrogen: \",round(Rn,1),\"J/Kg-K\"\n",
+ "print \"Gas constant for Oxygen: \",round(Ro,1),\"J/Kg-K\"\n",
+ "print \"Gas constant for Carbon Diaoxide: \",round(Rc,1),\"J/Kg-K\"\n",
+ "print \"Gas constant for Mixture: \",round(Rm,2),\"J/Kg-K\"\n",
+ "print \"Specific heat at constant pressure for Nitrogen: \",round(Cpn/10**3,3),\"kJ/kg-K\"\n",
+ "print \"Specific heat at constant pressure for Oxygen: \",round(Cpo/10**3,3),\"kJ/kg-K\"\n",
+ "print \"Specific heat at constant pressure for Carbon Diaoxide: \",round(Cpc/10**3,3),\"kJ/kg-K\"\n",
+ "print \"Specific heat at constant pressure for Mixture: \",round(Cpm/10**3,3),\"kJ/kg-K\"\n",
+ "print \"The molecular weight of the mixture: \" ,round(mwm,2),\"Kg/Kmol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gas constant for Nitrogen: 296.9 J/Kg-K\n",
+ "Gas constant for Oxygen: 259.8 J/Kg-K\n",
+ "Gas constant for Carbon Diaoxide: 189.0 J/Kg-K\n",
+ "Gas constant for Mixture: 288.06 J/Kg-K\n",
+ "Specific heat at constant pressure for Nitrogen: 1.039 kJ/kg-K\n",
+ "Specific heat at constant pressure for Oxygen: 0.909 kJ/kg-K\n",
+ "Specific heat at constant pressure for Carbon Diaoxide: 0.819 kJ/kg-K\n",
+ "Specific heat at constant pressure for Mixture: 1.011 kJ/kg-K\n",
+ "The molecular weight of the mixture: 28.86 Kg/Kmol\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23, page no. 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "o = 0.18 #Composition of Oxygen:\n",
+ "n = 0.75 #Composition of Nitrogen:\n",
+ "c = 0.07 #Composition of Carbon dioxide:\n",
+ "p = 0.5 #Pressure of mixture(in MPa):\n",
+ "t = 107+273 #Temperature of the mixture(in K):\n",
+ "m = 5 #Total mass of the mixture(in kg):\n",
+ "mwn = 28 #Molecular weight of Nitrogen:\n",
+ "mwo = 32 #Molecular weight of Oxygen:\n",
+ "mwc = 44 #Molecular weight of Carbon dioxide:\n",
+ "v = 1 #Total values of mixture(assume):\n",
+ "\n",
+ "#Calculation:\n",
+ "xvo = o/v #Mole fraction of Oxygen(by volume):\n",
+ "xvn = n/v #Mole fraction of Nitrogen(by volume):\n",
+ "xvc = c/v#Mole fraction of Carbon dioxide(by volume):\n",
+ "mwm = o*mwo+n*mwn+c*mwc #Molecular weight of the mixture(in kg/kmol):\n",
+ "xmn = n*mwn/mwm#Mole fraction of Nitrogen(by mass):\n",
+ "xmo = o*mwo/mwm#Mole fraction of Oxygen(by mass):\n",
+ "xmc = c*mwc/mwm#Mole fraction of Carbon dioxide(by mass):\n",
+ "po = o*p#Partial pressure of Oxygen:\n",
+ "pn = n*p#Partial pressure of Nitrogen:\n",
+ "pc = c*p#Partial pressure of Carbon dioxide:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mole fraction of Oxygen by mass: \",round(xmo,3)\n",
+ "print \"Mole fraction of Nitrogen by mass: \",round(xmn,3)\n",
+ "print \"Mole fraction of Carbon dioxide by mass: \",round(xmc,3)\n",
+ "print \"Partial pressure of Oxygen: \",round(po,2),\"MPa\"\n",
+ "print \"Partial pressure of Nitrogen: \",round(pn,3),\"MPa\"\n",
+ "print \"Partial pressure of Carbon dioxide: \",round(pc,3),\"MPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mole fraction of Oxygen by mass: 0.193\n",
+ "Mole fraction of Nitrogen by mass: 0.704\n",
+ "Mole fraction of Carbon dioxide by mass: 0.103\n",
+ "Partial pressure of Oxygen: 0.09 MPa\n",
+ "Partial pressure of Nitrogen: 0.375 MPa\n",
+ "Partial pressure of Carbon dioxide: 0.035 MPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24, page no. 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "V = 3.0 #Volume of gas in 1 chamber(in m**3):\n",
+ "pn = 800.0 #Partial pressure of Nitrogen(in kPa):\n",
+ "pc = 400.0 #Partial pressure of Carbon dioxide(in kPa):\n",
+ "tn = 480.0 #Temperature of Nitrogen(in K):\n",
+ "tc = 390.0 #Temperature of Carbon dioxide(in K):\n",
+ "rn = 1.4 #Compression ratio for Nitrogen:\n",
+ "rc = 1.3 #Compression ratio for Carbon dioxide:\n",
+ "R = 8314.0 #Universal gas constant(in J/kg-K):\n",
+ "mwn = 28.0 #Molecular weight of Nitrogen:\n",
+ "mwc = 44.0 #Molecular weight of Carbon dioxide:\n",
+ "\n",
+ "#Calculation:\n",
+ "nn = pn*V/(R*tn) #Moles of Nitrogen:\n",
+ "nc = pc*V/(R*tc) #Moles of Carbon dioxide:\n",
+ "nt = round(nn+nc,6) #Total no of moles:\n",
+ "cvn = (R/mwn)/(rn-1) #Specific heat for Nitrogen at constant volume(in J/kg-K):\n",
+ "cvc = (R/mwc)/(rc-1) #Specific heat for Carbon dioxide at constant volume(in J/kg-K):\n",
+ "mn = nn*mwn #Mass of Nitrogen(in kg):\n",
+ "mc = nc*mwc #Mass of Carbon dioxide(in kg):\n",
+ "t = (mn*cvn*tn+mc*cvc*tc)/(mn*cvn+mc*cvc) #Equilibrium temperature of the mixture(in K):\n",
+ "p = nt*R*round(t,1)/(V+V) #Equilibrium pressure of the mixture(kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Equilibrium temperature: \",round(t,1),\"K\"\n",
+ "print \"Equilibrium pressure: \",round(p,3),\"KPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equilibrium temperature: 439.4 K\n",
+ "Equilibrium pressure: 591.205 KPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25, page no. 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable Declaration: \n",
+ "mh = 2 #Mass of hydrogen taken(in kg):\n",
+ "mhe = 3 #Mass of helium taken(in kg):\n",
+ "Ch = 11.23 #Specific heat at constant pressure for hydrogen(in kJ/kg-K):\n",
+ "Che = 5.193 #Specific heat at constant pressure for helium(in kJ/kg-K):\n",
+ "\n",
+ "#Calculation:\n",
+ "mt = mh+mhe #Total mass of the mixture(in kg):\n",
+ "Cm = (Ch*mh+Che*mhe)/mt #Specific heat at constant pressure for the mixture(in kJ/kg-K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Specific heat at constant pressure for the mixture: \",round(Cm,3),\"KJ/Kg-K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific heat at constant pressure for the mixture: 7.608 KJ/Kg-K\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26, page no. 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "mh = 18 #Mass of Hydrogen(in kg):\n",
+ "mn = 10 #Mass of Nitrogen(in kg):\n",
+ "mc = 2 #Mass of Carbon dioxide(in kg):\n",
+ "t1 = 27+273.15 #Initial temperature(in K):\n",
+ "t2 = 2*t1 #Final temperature(in K):\n",
+ "R = 8.314 #Universal gas constant(in kJ/kg-K):\n",
+ "mwh = 2 #Molecular weight of Hydrogen:\n",
+ "mwn = 28 #Molecular weight of Nitrogen:\n",
+ "mwc = 44 #Molecular weight of Carbon dioxide:\n",
+ "p1 = 101.325 #Initial pressure of the gases(in kPa)\n",
+ "\n",
+ "#Calculation:\n",
+ "Rh = R/mwh #Gas constant for Hydrogen(in kJ/kg-K):\n",
+ "Rn = R/mwn #Gas constant for Nitrogen(in kJ/kg-K):\n",
+ "Rc = R/mwc #Gas constant for Carbon dioxide(in kJ/kg-K):\n",
+ "Rm = (mh*Rh+mn*Rn+mc*Rc)/(mh+mn+mc) #Gas constant for the mixture(in kJ/kg-K):\n",
+ "V = (mh+mn+mc)*Rm*t1/p1 #Capacity of the vessel(in m**3):\n",
+ "p2 = p1*t2/t1 #Final pressure of the mixture(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Volume of the vessel: \",round(V,2),\"m**3\"\n",
+ "print \"Final pressure of the mixture\",round(p2,2),\"KPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume of the vessel: 231.57 m**3\n",
+ "Final pressure of the mixture 202.65 KPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 27, page no. 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math as m\n",
+ "#Variable Declaration: \n",
+ "t1 = 27+273.15 #Temperature of entering air(in K):\n",
+ "t2 = 500 #Temperature to which it gets heated up to(in K):\n",
+ "\n",
+ "#Calculation:\n",
+ "R = m.sqrt(t2/t1) #Ratio of exit to inlet diameter:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Ratio of exit to inlet diameter: \",round(R,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of exit to inlet diameter: 1.29\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 28, page no. 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "v = 2.0 #Volume of vessel(in m**3):\n",
+ "R = 8.314 #Univeresal gas constant(in kJ/kg-K):\n",
+ "mwh = 2.0 #Molecular weight of hydrogen:\n",
+ "\n",
+ "#Calculation:\n",
+ "p1 = 76/76*101.325 #Atmospheric pressure(in kPa):\n",
+ "t1 = 27+273.15 #Temperature of gas(in K):\n",
+ "t2 = t1\n",
+ "dp = 70.0/76*101.325 #Pressure difference(in kPa):\n",
+ "t3 = 10+273.15 #Temperature after cooling(in case 2)(in K):\n",
+ "Rh = R/mwh #Gas constant of hydrogen(in kJ/kg-K): #Case 1:\n",
+ "p2 = p1-dp #Final pressure of hydrogen(in kPa):\n",
+ "m = (p1-p2)*v/(Rh*t1) #Mass pumped out(in kg):\n",
+ "p3 = (t3/t2)*p2 #Pressure after cooling(in kPa): #Case 2:(temperature reduces till 10 degrees isochorically)\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass pumped out: \",round(m,2),\"Kg\"\n",
+ "print \"Final pressure fter cooling: \",round(p3,3),\"KPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass pumped out: 0.15 Kg\n",
+ "Final pressure fter cooling: 7.546 KPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter11.ipynb b/Applied_Thermodynamics/Chapter11.ipynb
new file mode 100755
index 00000000..57bf66e3
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter11.ipynb
@@ -0,0 +1,918 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6a2922d727738ae70604bae46fb35f03608e71a4b1a12c93dd485fb1323281a2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: Boilers and Boiler Calculations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "H = 30 #Height of chimney(in m):\n",
+ "Ta = 27+273 #Ambient air temperature(in K):\n",
+ "m = 20 #Mass per kg of fuel required for complete combustion(in kg):\n",
+ "hw = 12 #Height in the water column(in mm):\n",
+ "\n",
+ "#Calculations:\n",
+ "Tg = (Ta*353*H)/(353*H-hw*Ta)*(m)/(m+1)#Temperature of burnt gases(in K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Temperature of the burnt gases: \",round(Tg,2),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of the burnt gases: 432.86 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 18 #Mass per kg of fuel required for complete combustion(in kg):\n",
+ "hw = 20 #Height in the water column(in mm):\n",
+ "Ta = 27+273 #Ambient air temperature(in K):\n",
+ "Tg = 300+273 #Temperature of burnt gases(in K):\n",
+ "\n",
+ "#Calculations:\n",
+ "H = hw/(353*(1/Ta-(m+1)/(m*Tg)))#Height of chimney(in m):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Height of chimney: \",round(H,2),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Height of chimney: 37.99 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "H = 20 #Height of chimney(in m):\n",
+ "Tg = 380+273 #Temperature of burnt gases(in K):\n",
+ "Ta = 27+273 #Ambient air temperature(in K):\n",
+ "\n",
+ "#Calculations:\n",
+ "m = 2*Ta/(Tg-2*Ta) #Air supplied(in kg air per fuel):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Air supplied:\",round(m,2),\"kg/kg of fuel\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air supplied: 11.32 kg/kg of fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "H = 60 #Height of chimney(in m):\n",
+ "Ta = 17+273 #Ambient air temperature(in K):\n",
+ "Tg = 300+273 #Temperature of burnt gases(in K):\n",
+ "Tga = 150+273 #Temperature of the artificial burnt gases(in K):\n",
+ "m = 19 #Mass per kg of fuel required for complete combustion(in kg):\n",
+ "Cpg = 1.0032 #Specific heat of hot gases(in kJ/kg.K):\n",
+ "c = 32604 #Calorific value of burnt fuel(in kJ/kg):\n",
+ "\n",
+ "#Calculations:\n",
+ "hw = 353*H*(1/Ta-(m+1)/(m*Tg)) #Draught (in mm of water column):\n",
+ "n = 9.81*H*(m/(m+1)*Tg/Ta-1)/(Cpg*(Tg-Tga)*10**3)*100 #Chimney efficiency:\n",
+ "Q = (m+1)*Cpg*(Tg-Tga) #Extra heat carried away by flue gases(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Draught: \",round(hw,2),\" mm of water\"\n",
+ "print \"Chimney efficiency\",round(n,4),\"%\"\n",
+ "print \"Extra heat carried away by flue gases per kg of fuel burnt\",round(Q,1),\" kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Draught: 34.13 mm of water\n",
+ "Chimney efficiency 0.3431 %\n",
+ "Extra heat carried away by flue gases per kg of fuel burnt 3009.6 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "H = 80 #Height of chimney(in m):\n",
+ "Ta = 27+273 #Ambient air temperature(in K):\n",
+ "m = 20 #Mass per kg of fuel required for complete combustion(in kg):\n",
+ "Tga = 110+273 #Temperature of the artificial burnt gases(in K):\n",
+ "Cpg = 1.0032 #Specific heat of hot gases(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "Tg = Ta*2*(m+1)/m #Temperature of burnt gases(in K):\n",
+ "hw = 353*H*(1/Ta-(m+1)/(m*Tg)) #Draught in water column(in mm):\n",
+ "n = 9.81*H*(m/(m+1)*Tg/Ta-1)/(Cpg*(Tg-Tga)*10**3)*100 #Chimney efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Hot gas temperature in chimney: \",round(Tg),\"K\"\n",
+ "print \"Natural draught: \",round(hw,2),\"mm of water\"\n",
+ "print \"Chimney efficiency: \",round(n,4),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hot gas temperature in chimney: 630.0 K\n",
+ "Natural draught: 47.07 mm of water\n",
+ "Chimney efficiency: 0.3167 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "R = 2.5*10**3 #Rate at which coal is burnt(in kg/hr):\n",
+ "m = 20 #Mass per kg of fuel required for complete combustion(in kg):\n",
+ "Tg = 327+273 #Temperature of burnt gases(in K):\n",
+ "Ta = 27+273 #Ambient air temperature(in K):\n",
+ "h = 7+6+3+2 #Pressure head(in mm):\n",
+ "na = 0.90 #Ratio of actual natural draught to theoretical draught:\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculations:\n",
+ "hw = h/na #Actual natural draught(in mm of water):\n",
+ "H = hw/(353*(1/Ta-(m+1)/(m*Tg))) #Height of chimney(in m):\n",
+ "dg = 353/Tg*(m+1)/m #Density of hot gases(in kg/m**3):\n",
+ "hg = H*((m+1)/m*Tg/Ta-1) #Height of hot gases column(in m):\n",
+ "Mg = R*hw/3600 #Mass flow rate of hot gases(in kg/s):\n",
+ "C = sqrt(2*g*hg) #Velocity of got gases(in m/s):\n",
+ "D = sqrt((4*Mg)/(pi*C*dg)) #Diameter of chimney(in m):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Height of chimney:\",round(H,2),\"m\"\n",
+ "print \"Diameter of chimney:\",round(D,2),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Height of chimney: 35.78 m\n",
+ "Diameter of chimney: 1.01 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "hw = 50 #Draught in water column(in mm):\n",
+ "T = 300+273 #Temperature of burnt gases(in K):\n",
+ "m = 19 #Mass per kg of fuel required for complete combustion(in kg):\n",
+ "T1 = 27+273 #Ambient air temperature(in K):\n",
+ "T0 = 273 #Zero temperature(in K):\n",
+ "n = 0.90 #Mechanical efficiency:\n",
+ "d = 1.293 #Density of hot gases(in kg/m**3):\n",
+ "\n",
+ "#Calculations:\n",
+ "M = 2000/3600 #Rate at which coal is burnt(in kg/s):\n",
+ "P = hw*9.81 #Pressure applied by the draught water(in N/m**2):\n",
+ "PFD = P*m*M*T1/(d*T0*n*1000) #Power required in FD fan(kW):\n",
+ "P1D = P*m*M*T/(d*T0*n*1000) #Power required in 1D fan(kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Power for FD fan:\",round(PFD,2),\"kW\"\n",
+ "print \"Power for 1D fan:\",round(P1D,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power for FD fan: 4.89 kW\n",
+ "Power for 1D fan: 9.34 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 486"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Cpg = 1.0032 #Specific heat of hot gases(in kJ/kg.K):\n",
+ "Tg = 177+273 #Temperature of burnt gases(in K):\n",
+ "Ta = 27+273 #Ambient air temperature(in K):\n",
+ "Tn = 327+273 #Natural draught temperature(in K):\n",
+ "mn = 25 #Mass per kg of fuel required for natural draught(in kg):\n",
+ "ma = 20 #Mass per kg of fuel required for artificial draught(in kg):\n",
+ "r = Tg/Ta #Ratio of brake power for induced draught to forced draught:\n",
+ "\n",
+ "#Calculations:\n",
+ "Qgad = (ma+1)*Cpg*(Tg-Ta) #Heat carried by hot flue gases in artificial draught(in per kg of fuel burnt):\n",
+ "Qgnd = (mn+1)*Cpg*(Tn-Ta) #Heat carried by hot flue gases in natural draught(in per kg of fuel burnt):\n",
+ "rh = Qgad/Qgnd #Ratio of heat carried away:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Ratio of power required: \",round(r,1)\n",
+ "print \"Ratio of heat carried away: \",round(rh,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of power required: 1.5\n",
+ "Ratio of heat carried away: 0.404\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 486"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T = 27+273 #Feed water supply temperature(in K):\n",
+ "P = 10 #Mean steam generation pressure(in bar):\n",
+ "x = 0.95 #Dryness fravtion of steam generated:\n",
+ "Q = 2500 #Feed water supplied(in kg/hr):\n",
+ "Q1 = 275 #Coal burnt(in kg/hr):\n",
+ "d = 300 #Difference in mass of water after trial:\n",
+ "hf = 762.81 #kJ/kg #From steam tables:\n",
+ "hg = 2778.1 #kJ/kg\n",
+ "hfg = 2015.29 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "h = hf+x*hfg #Enthalpy of steam generated(in kJ/kg):\n",
+ "mw = Q+d #Mass of water evaporator per hour(in kg/hr):\n",
+ "Ae = mw/Q1 #Actual evaporation(in per kg of coal):\n",
+ "Ee = Ae*h/2257 #Equivalent evaporation(in kg per kg of coal):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Actual evaporation: \",round(Ae,2),\" kg per kg of coal\"\n",
+ "print \"Equivalent evaporation: \",round(Ee,2),\"kg per kg of coal\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual evaporation: 10.18 kg per kg of coal\n",
+ "Equivalent evaporation: 12.08 kg per kg of coal\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 487"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "p = 10 #Average pressure of the steam(in bar):\n",
+ "Ww = 15 #Weight of water consumed(in ton):\n",
+ "Wc = 1.5 #Weight of coal produced(in ton):\n",
+ "n = 1-0.03-0.04 #Percentage coal that caan be burnt:\n",
+ "nm = 0.03 #Composition of moisture in coal:\n",
+ "Tf = 35 #Temperature of feed water(in C):\n",
+ "hg = 2778.1 #From steam tables(kJ/kg) \n",
+ "\n",
+ "#Calculations:\n",
+ "h = hg-4.18*Tf #Enthalpy of steam generated(in kJ/kg):\n",
+ "m = Ww/Wc #Steam generated per kg of coal(in kg):\n",
+ "nb = m*h/(30.1*10**3)*100 #Boiler efficiency:\n",
+ "Ee = m*h/(2257*(1-nm)) #Equivalent evaporation per kg of dry coal(in kg:\n",
+ "Eea = Ee*(1-nm)/n #Equivalent evaporation per kg of combustible present in coal(in kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Boiler efficiency: \",round(nb,2),\"%\"\n",
+ "print \"Equivalent evaporation per kg of dry coal: \",round(Ee,2),\"kg\"\n",
+ "print \"Equivalent evaporation per kg of combustible present in coal: \",round(Eea,2),\"kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boiler efficiency: 87.44 %\n",
+ "Equivalent evaporation per kg of dry coal: 12.02 kg\n",
+ "Equivalent evaporation per kg of combustible present in coal: 12.54 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "t = 24 #Time of trial(in hrs):\n",
+ "p = 16 #Pressure at which steam is generated(in bar):\n",
+ "c = 10000 #Coal consumed(in kg):\n",
+ "r = 2500 #Rate of steam generation(in kg/hr):\n",
+ "Tf = 27 #Feed water temperature(in C):\n",
+ "hsa = 3000 #Total heating surface area(in m**2):\n",
+ "ga = 4 #Total grate area(in m**2):\n",
+ "C = 28000 #Calorific value of coal(in kJ/kg):\n",
+ "hg = 2794 #From steam tables(kJ/kg)\n",
+ "L = 2257 #Latent heat at 100 C:\n",
+ "\n",
+ "#Calculations:\n",
+ "m = c/t #Coal burnt per hour(in kg/hr):\n",
+ "mg = m/ga #Coal burnt per m**2 of grate per hour:\n",
+ "r1 = r/m #Rate of steam generated per kg of coal(in kg steam/kg coal):\n",
+ "Q = r1*(hg-4.18*Tf) #Heat added to steam per kg of coal(in kJ):\n",
+ "Ee = Q/L #Equivalent evaporation from and at 100 C per kg of coal(in kg):\n",
+ "Eepm = Ee*m/hsa #Equivalent evaporation from and at 100 C per m**2 of total surface per hour(in kg):\n",
+ "n = Ee*L/C*100 #Boiler efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass of coal burnt per m**2 of grate per hour: \",round(mg,2),\"kg\"\n",
+ "print \"Equivalent evaporation from and at 100 C per kg of coal: \",round(Ee,2),\"kg\"\n",
+ "print \"Equivalent evaporation from and at 100 C per m**2 of total surface per hour: \",round(Eepm,2),\"kg\"\n",
+ "print \"Boiler efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of coal burnt per m**2 of grate per hour: 104.17 kg\n",
+ "Equivalent evaporation from and at 100 C per kg of coal: 7.13 kg\n",
+ "Equivalent evaporation from and at 100 C per m**2 of total surface per hour: 0.99 kg\n",
+ "Boiler efficiency: 57.45 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 489"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p = 30 #Pressure at which steam is generated(in bar):\n",
+ "Ts = 300 #Temperature of steam(in C):\n",
+ "r = 11 #Rate at which feed water enters(in kg/s):\n",
+ "T1 = 100 #Temperature at which feed water enters the economiser(in C):\n",
+ "m = 5000 #Mass of fuel used(in kg):\n",
+ "C = 35000 #Calorific value of fuel(in kJ/kg.K):\n",
+ "T = 27 #Temperature of feed water(in C):\n",
+ "hg = 2993.5 #From steam tables:\n",
+ "L = 2257 #Latent heat at 100 C:\n",
+ "\n",
+ "#Calculations:\n",
+ "ms = r*3600/m #Mass of steam genrated per kg of fuel(in kg/kg fuel):\n",
+ "Q = hg-4.18*T #Heat added per kg of fuel(in kJ):\n",
+ "Ee = ms*Q/L #Equivalent evaporation from and at 100 C per kg of coal(in kg):\n",
+ "n = Ee*L/C*100 #Boiler efficiency:\n",
+ "Q1 = ms*4.18*(T1-T) #Heat utilised in economiser per kg of fuel(in kJ):\n",
+ "P = Q1/C*100 #Percentage of energy utilised in economiser:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Equivalent evaporation per kg of fuel: \",round(Ee,2),\"kg\"\n",
+ "print \"Boiler efficiency: \",round(n,2),\"%\"\n",
+ "print \"Percentage of energy utilised in economiser: \",round(P,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equivalent evaporation per kg of fuel: 10.11 kg\n",
+ "Boiler efficiency: 65.18 %\n",
+ "Percentage of energy utilised in economiser: 6.9 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 489"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 8 #Mass of steam genrated per kg of fuel:\n",
+ "Ts = 400 #Temperature of steam(in C):\n",
+ "p = 30 #Pressure of feed water(in bar):\n",
+ "T = 40 #Temperature of feed water(in C):\n",
+ "T1 = 150 #Temperature at which feed water leaves the economiser(in C):\n",
+ "x = 0.98 #Dryness fraction:\n",
+ "C = 29000 #Calorific value(in kJ/kg.K):\n",
+ "h = 3230.9 #Enthalpy of steam generated(in kJ/kg): #From steam tables:\n",
+ "hf = 1008.42 #kJ/kg\n",
+ "hfg = 1795.78 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "Q = h-4.18*T #Heat to be added(in kJ):\n",
+ "n = m*Q/C*100 #Boiler efficiency:\n",
+ "Q1 = 4.18*(T1-T) #Heat added in economiser per kg of steam generated(in kJ/kg):\n",
+ "r1 = Q1/Q*100 #Percentage fraction of heat in economiser:\n",
+ "Q2 = (hf+x*hfg)-4.18*T1 #Heat added in evaporator per kg of steam generated(in kJ/kg):\n",
+ "r2 = Q2/Q*100 #Percentage fraction of heat in economiser:\n",
+ "Q3 = Q-Q1-Q2 #Heat added in super heater per kg of steam generated by difference(in kJ/kg):\n",
+ "r3 = Q3/Q*100 #Percentage fraction of heat in economiser:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Boiler efficiency: \",round(n,2),\"%\"\n",
+ "print \"Percentage fraction of heat in economiser: \",round(r1,2),\"%\"\n",
+ "print \"Percentage fraction of heat in evaporator: \",round(r2,2),\"%\"\n",
+ "print \"Percentage fraction of heat in superheater: \",round(r3,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boiler efficiency: 84.52 %\n",
+ "Percentage fraction of heat in economiser: 15.01 %\n",
+ "Percentage fraction of heat in evaporator: 69.89 %\n",
+ "Percentage fraction of heat in superheater: 15.1 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 20 #Temperature at which feed water enters and leaves the economiser(in C):\n",
+ "T2 = 125\n",
+ "r = 3 #Rate at which feed water leaves the economiser(in kg/s):\n",
+ "T3 = 425 #Temperature of flue gases at inlet and outlet of economiser(in C):\n",
+ "T4 = 300\n",
+ "r1 = 18 #Rate at which coal is supplied(in kg/min):\n",
+ "nc = 0.80 #% of C in coal:\n",
+ "Cpg = 1.05 #Specific heat of flue gases(in kJ/kg.K):\n",
+ "Ta = 15 #Atmospheric temperature(in C):\n",
+ "m1 = 23.65 #Mass of dry flue gases at inlet and exit of economiser(in kg):\t\t\t\t#From table:\n",
+ "m2 = 24.78\n",
+ "\n",
+ "#Calculations:\n",
+ "A = m2-m1 #Air leakage in economiser per kg of coal:\n",
+ "Q1 = m1*Cpg*T3+A*Cpg*Ta #Heat entering economiser with flue gases and leakage(in kJ):\n",
+ "Q2 = m2*Cpg*T4 #Heat entering economiser with flue gases and leakage(in kJ):\n",
+ "Q = Q1-Q2 #Heat lost in economiser per kg of coal(in kJ):\n",
+ "Q3 = (r*60/r1)*4.18*(T2-T1)\t#Heat picked up by feed water in economiser per kg of coal(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat released by the flue gases: \",round(Q,2),\"kJ per kg of coal\"\n",
+ "print \"Air leakage: \",round(A,2),\"kg per kg of coal\"\n",
+ "print \"Heat gained by feed water: \",round(Q3),\"kJ per kg of coal\"\n",
+ "print \"___Please check there is a calculation mistake in book in calculating Q3____\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat released by the flue gases: 2765.91 kJ per kg of coal\n",
+ "Air leakage: 1.13 kg per kg of coal\n",
+ "Heat gained by feed water: 4389.0 kJ per kg of coal\n",
+ "___Please check there is a calculation mistake in book in calculating Q3____\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "CpKg = 0.84 #Carbon present per kg:\n",
+ "CpKgDf = 0.0495 #Carbon present per kgof dry fluegas:\n",
+ "sg = 8 #Steam generated (kg per kg of coal):\n",
+ "mh = 0.04*9 #H2O produced during the combustion(kg per kg of coal):\n",
+ "ash = 0.05 #Ash produced duing cumbustion(kg per kg of coal):\n",
+ "M = 0.015 #Moisture in coal burnt per kg of coal:\n",
+ "h = 3213.6 #Enthalpy of heat generated at 40 bar 400\u00b0C (KJ/Kg):\n",
+ "C = 4.18 #Heat capacity of water (KJ/Kg.K):\n",
+ "Ti = 27 #Feed water temperature at inlet to economiser (\u00b0C):\n",
+ "Te = 137 #Feed water temperature at exit of economiser(\u00b0C):\n",
+ "Tfe = 300 #Flue gas temperature entering air heater(\u00b0C):\n",
+ "Tae = 120 #Temperature of air entering boiler furnace(\u00b0C):\n",
+ "Tatm = 15 #Atmospheric air temperature(\u00b0C):\n",
+ "Hs = 32600 #Heat supplied by the fuel(KJ/Kg coal):\n",
+ "cp = 1.0032 #Heat capacity of air and dry gas (KJ/Kg.K):\n",
+ "sp = 2.0064 #Specific pressure of vapour(KJ/Kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "md = CpKg/CpKgDf #Mass of dry flue gas per kg of coal: #Specific pressure of vapour = 2.0064 kJ/kg K\t\t\t\t#Partial pressure of vapour in flue gas = 0.075 bar\t\t\t\t#For air and dry flue gas, cp = 1.0032 kJ/kg K\t\t\t\t#Calorific value of coal = 32600 kJ/kg\t\t\t\t#Datum temperature = 15C\t\t\t\t#Dry flue gas composition by volume = 12.5% CO2, 7.5% O2, 80% N2\t\t\t\t#Dry coal composition by mass = 84% C, 4% H2, 7% O2 and remainder ash\t\t\t\t#Temperature of air entering boiler furnace = 120C\t\t\t\t#Flue gas temperature leaving air heater and entering chimney = 150C\t\t\t\t#Flue gas temperature entering air heater = 300C\t\t\t\t#Moisture in coal burnt = 1.5%\t\t\t\t#Feed water temperature at exit of economiser = 137C\t\t\t\t#Feed water temperature at inlet to economiser = 27C\t\t\t\t#Steam generated per kg of coal = 8 kg\t\t\t\t#Steam generation: 40 bar, 400C\t\t\t\t#Atmospheric air temperature: 15C\n",
+ "ma = md-(1-ash-mh) #Amount of air supplied for combustion of one kg of dry coal(in kg):\n",
+ "m = M/(1-M) #Moisture per kg of dry coal(in kg):\n",
+ "mt = round(mh+m,4)#Total moisture per kg of coal(in kg):\n",
+ "sgd = sg/(1-M) #Steam generated per kg of dry coal(in kg steam):\n",
+ "H = sgd*(h-C*Ti) #Heat utilized by steam per kg of coal(KJ):\n",
+ "n = H/Hs*100 #Boiler efficiency:\n",
+ "Hu = ma*cp*(Tae-Tatm) #Heat utilized by air(KJ/Kg of coal)\n",
+ "Ha = (md*cp+mt*sp)*(Tfe-Te) #Heat available in air heater(KJ/Kg of coal):\n",
+ "na = Hu/Ha*100 #Efficiency of heat exchange in air heater:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Boiler efficiency: \",round(n,2),\"%\"\n",
+ "print \"Efficiency of heat exchange in air heater: \",round(na,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boiler efficiency: 77.25 %\n",
+ "Efficiency of heat exchange in air heater: 59.54 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 496"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p = 20 #Pressure at which steam is generated(in bar):\n",
+ "Ts = 300 #Temperature at which steam is generated(in C):\n",
+ "T1 = 50 #Temperature of feed water supplied to the boiler(in C):\n",
+ "C = 30000 #Calorific value of fuel(in kJ/kg):\n",
+ "r = 600 #Rate at which coal is used(in kg/hr):\n",
+ "r1 = 5000 #Rate at which steam is generated(in kg/hr):\n",
+ "T = 100 #Temperature of the boiler unit(in C):\n",
+ "L = 2257 #Latent heat(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "ms = r1/r #Steam generation per unit coal burnt per hour:\n",
+ "hfi = 3023.5 #Final enthalpy of the steam(in kJ/kg):\n",
+ "hfw = 209.33 #Enthalpy of feed water(in kJ/kg):\n",
+ "no = ms*(hfi-hfw)/C*100 #Overall efficiency of boiler:\n",
+ "Ee = ms*(hfi-hfw)/L #Equivalent evaporation of boiler unit(in kg steam per kg of coal):\n",
+ "Eea = Ee*r #Equivalent evaporation of boiler unit at 100 C(in kg/hr):\n",
+ "hfw1 = 313.93 #After fitting economiser the enthalp of feed water(in kJ/kg):\n",
+ "nom = no+5 #Modified overall efficiency of boiler unit:\n",
+ "mc = (hfi-hfw1)*r1*100/(C*nom) #Coal consumption(in kg/hr):\n",
+ "s = r-mc #Saving of coal(in kg/hr):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Saving of coal: \",round(s,2),\"kg/hr\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Saving of coal: 57.03 kg/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 497"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r = 5000 #Rate at which steam is generated(in kg/hr):\n",
+ "p = 20 #Pressure of steam(in bar):\n",
+ "x = 0.98 #Dryness fraction:\n",
+ "T = 60 #Temperature of feed water(in \u00b0C):\n",
+ "r1 = 600 #Rate at which coal is supplied(in kg/hr):\n",
+ "r2 = 16 #Rate at which air is supplied(in kg per kg coal):\n",
+ "C = 30000 #Cslorific value of coal(in kJ/kg):\n",
+ "Tr = 20 #Temperature of boiler room(in \u00b0C):\n",
+ "nl = 0.86 #Fraction of heat losr with flue gases:\n",
+ "Cpg = 1.005 #Specific heat of flue gases(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "hf = 908.79 #kJ/kg\n",
+ "hfg = 1890.7 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "ms = r/r1 #Mass of steam genrated per kg of coal:\n",
+ "hfi = hf+x*hfg #Enthalpy of final steam produced(in kJ/kg):\n",
+ "hfw = 251.13 #Enthalpy of feed water(in kJ/kg):\n",
+ "Q = ms*(hfi-hfw) #Heat used for steam generation(in kJ per kg of coal):\n",
+ "Ql = C-Q #Heat lost per kg of coal:\n",
+ "Qlf = nl*Ql #Heat lost with flue gases(in kJ per kg of coal):\n",
+ "Tgas = Tr+Qlf/((r2+1)*Cpg) #Temperature of flue gases(in \u00b0C):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Temperature of flue gases: \",round(Tgas,2),\" \u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of flue gases: 476.99 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page no. 498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "Ta = 20+273 #Ambient temperature(in K):\n",
+ "V = 20 #Velocity(in m/s):\n",
+ "hw1 = 30 #Draught lost through grate(in mm of water column):\n",
+ "nm = 0.80 #Mechanical efficiency:\n",
+ "mf = 1000 #Rate at which coal is burnt(in kg/hr):\n",
+ "ma = 16 #Rate at which air is supplied(in kg/hr):\n",
+ "pa = 1.01325 #Ambient pressure(in bar):\n",
+ "d = 1.29 #Density of air(in kg/m**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "T0 = 273 #Zero temperature(in K):\n",
+ "\n",
+ "#Calculations:\n",
+ "P1 = d*V**2/2 #Pressure equivalent to velocity head(in N/m**2):\n",
+ "P = P1/g #mm of water column\n",
+ "hw = hw1+P #Total draught loss(in mm of water column):\n",
+ "p = hw*g #Pressure required(in N/m**2):\n",
+ "PFD = p*mf*ma*Ta/(d*T0*nm*3600) #F.D. fan power requirement(in W):\n",
+ "\n",
+ "#Results:\n",
+ "print \"F.D. fan power: \",round(PFD/10**3,2),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F.D. fan power: 2.55 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter12.ipynb b/Applied_Thermodynamics/Chapter12.ipynb
new file mode 100755
index 00000000..f4ca6e3a
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter12.ipynb
@@ -0,0 +1,1023 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:03ceb37b3a4a8472aa1ee4a975815d12c81d178fb0d225989fe7ba93ade8f414"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: Steam Engine"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 0.2 #Pressure at which steam is supplied(in MPa):\n",
+ "T = 250 #Temperature of steam(in C):\n",
+ "p2 = 0.3 #Pressure upto which steam is expanded(in bar):\n",
+ "p3 = 0.05 #Pressure at which it is finally released(in bar):\n",
+ "\n",
+ "#From steam tables:\n",
+ "h1 = 2971 #kJ/kg\n",
+ "s1 = 7.7086 #kJ/kg.K\n",
+ "s2 = s1\n",
+ "h2 = 2601.97 #kJ/kg\n",
+ "v2 = 5.1767 #m**3/kg\n",
+ "hf = 137.82 #kJ/kg\n",
+ "Tmax = 393.23 #K\n",
+ "Tmin = 305.88 #K\n",
+ "\n",
+ "#Calculations:\n",
+ "W = h1-h2+v2*(p2-p3)*10**2 #Work output from engine cycle per kg of steam(in kJ/kg):\n",
+ "Q = h1-hf #Heat input per kg of steam(in kJ/kg):\n",
+ "n = W/Q*100 #Efficiency of modified Rankine cycle:\n",
+ "nc = (1-Tmin/Tmax)*100 #Carnot efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Modified Rankine cycle efficiency: \",round(n,2),\"%\"\n",
+ "print \"Carnot efficiency: \",round(nc,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Modified Rankine cycle efficiency: 17.59 %\n",
+ "Carnot efficiency: 22.21 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 537"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 10 #Pressure at which steam is supplied(in bar):\n",
+ "d = 0.3 #Diameter of the cylinder(in m):\n",
+ "L = 0.6 #Length of stroke(in m):\n",
+ "p2 = 0.75 #Pressure to which steam is expanded(in bar):\n",
+ "p3 = 0.25 #Pressure at which steam is released in the condensor(in bar):\n",
+ "#From steam tables:\n",
+ "h1 = 2676.2 #kJ/kg\n",
+ "s1 = 7.3614 #kJ/kg.K\n",
+ "v2 = 2.1833 #m**3/kg\n",
+ "h2 = 2628.35 #kJ/kg\n",
+ "h4 = 271.93 #kJ/kg\n",
+ "h6 = 2459.38 #kJ/kg\n",
+ "s6 = 7.3614 #kJ/kg.K\n",
+ "v6 = 5.784 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "s6 = s2\n",
+ "W = h1-h2+v2*(p2-p3)*10**2 #Work output from engine cycle per kg of steam(in kJ/kg):\n",
+ "Q = h1-h4 #Heat input per kg of steam(in kJ/kg):\n",
+ "n = W/Q*100 #Efficiency of modified Rankine cycle:\n",
+ "V = pi*d**2*L/4 #Volume of the cylinder(in m**3):\n",
+ "m = V/v2 #Mass of steam in a stroke(in kg):\n",
+ "V1 = m*v6 #Volume requiremnet at 6(in m**3):\n",
+ "L1 = V1*4/(pi*d**2) #New stroke length(in m):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Modified Rankine cycle efficiency: \",round(n,2),\"%\"\n",
+ "print \"New stroke length:\",round(L1*100,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Modified Rankine cycle efficiency: 6.53 %\n",
+ "New stroke length: 158.95 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 538"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import log,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "d = 0.3 #Diameter of the bore(in m):\n",
+ "L = 0.6 #Length of the stroke(in m):\n",
+ "r1 = 0.4 #Occerance od cut-off:\n",
+ "p1 = 7.5 #Pressure at which steam enters(in bar):\n",
+ "p3 = 0.1 #Pressure at exhaust(in bar):\n",
+ "n = 180 #Rpm of the engine:\n",
+ "d1 = 0.6 #Diagram factor:\n",
+ "\n",
+ "#Calculations:\n",
+ "r = 1/r1 #Expansion ratio:\n",
+ "mep = p1/r*(1+log(r))-p3 #Hypothetical mean effective pressure(in bar):\n",
+ "mepa = mep*d1 #Actual mean effective pressure(in bar):\n",
+ "IP = mepa*L*pi*d**2*2*n*10**2/(4*60)#Indicated power(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Indicated power: \",round(IP,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 86.25 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 539"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import log,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 15 #Steam is admitted at pressure(in bar):\n",
+ "p3 = 0.75 #Pressure at which steam exhausts(in bar):\n",
+ "r1 = 0.25 #Cut-off occuring at:\n",
+ "P = 150 #Power produced by the engine(in hp):\n",
+ "n = 240 #Rpm of engine:\n",
+ "nm = 0.85#Mechanical efficiency:\n",
+ "d1 = 0.7 #Diagram factor:\n",
+ "nb = 0.2 #Brake thermal efficiency:\n",
+ "r2 = 1.5 #Stroke to bore ratio:\n",
+ "h15 = 2803.3 #From steam tables:\n",
+ "hf = 384.39\n",
+ "\n",
+ "#Calculations:\n",
+ "r = 1/r1 #Expansion ratio:\n",
+ "mep = p1/r*(1+log(r))-p3 #Hypothetical mean effective pressure(in bar):\n",
+ "mepa = mep*d1 #Actual mean effective pressure(in bar):\n",
+ "IP = P/nm #Indicated horse power(in kW):\n",
+ "d = ((IP*4*60*0.7457)/(mepa*10**2*r2*pi*n))**(1/3) #Diameter of bore(in m):\n",
+ "L = d*r2 #Stroke length(in m):\n",
+ "Q = h15-hf #Heat added per kg of steam(in kJ/kg):\n",
+ "m = 0.7457*3600/(nb*Q) #Specific steam consumption(in kg/hp.hr):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Bore: \",round(d*100,2),\"cm\"\n",
+ "print \"Stroke: \",round(L*100,2),\"cm\"\n",
+ "print \"Specific steam consumption: \",round(m,2),\"kg/hp.hr\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bore: 36.51 cm\n",
+ "Stroke: 54.76 cm\n",
+ "Specific steam consumption: 5.55 kg/hp.hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import log,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 18/60 #Steam consumption rate(in kg/a):\n",
+ "IP = 100 #Indicated power(in kW):\n",
+ "n = 240 #Rpm of engine:\n",
+ "d = 0.3 #Bore diameter(in m):\n",
+ "L = 0.4 #Stroke length(in m):\n",
+ "p1 = 10 #Pressure at which steam is admitted(in bar):\n",
+ "p3 = 0.75 #Exhaust pressure(in bar):\n",
+ "r1 = 0.25 #Occurance of cut-off:\n",
+ "h1 = 2875.3 #Enthalpy of steam(in kJ/kg):\n",
+ "hf = 384.39 \n",
+ "\n",
+ "#Calculations:\n",
+ "Q = h1-hf #Heat added per kg of steam(in kJ/kg):\n",
+ "r = 1/r1 #Expansion ratio:\n",
+ "mep = p1/r*(1+log(r))-p3 #Hypothetical mean effective pressure(in bar):\n",
+ "IPt = mep*L*pi*d**2*n*10**2/(60)#Theoretical indicated power(in kW):\n",
+ "d1 = IP/IPt #Diagarm factor:\n",
+ "n = IPt/(m*Q)*100 #Indicated thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Diagram factor: \",round(d1,4)\n",
+ "print \"Indicated thermal efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diagram factor: 0.4238\n",
+ "Indicated thermal efficiency: 31.58 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 542"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 10 #Pressure at which steam is aupplied(in bar):\n",
+ "x = 0.9 #Dryness fraction:\n",
+ "p3 = 1 #Pressure at exhaust(in bar):\n",
+ "r1 = 0.6 #Occurence of cut-off:\n",
+ "#From steam tables:\n",
+ "h1 = 2576.58 #kJ/kg \n",
+ "v1 = 0.1751 #m**3/kg\n",
+ "hf = 417.46 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "Q = h1-hf #Heat added per kg of steam(in kJ/kg):\n",
+ "v2 = v1/r1 #Specific volume at state 2(inm**3/kg):\n",
+ "r = 1/r1 #Expansion ratio:\n",
+ "Wne = v1*(p1-p3)*10**2 #Net expansive work per kg of steam(in kJ/kg):\n",
+ "We = p1*v1*10**2*log(r)-p3*10**2*(v2-v1)#Expansive work per kg of steam(in kJ/kg):\n",
+ "Wt = Wne+We #Total work per kg of steam(in kJ/kg):\n",
+ "r2 = We/Wt*100 #Fraction of work obtained by expansive working:\n",
+ "n = Wt/Q*100 #Thermal efficiency of cycle:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Fraction of expansive work: \",round(r2,2),\"% of total output\"\n",
+ "print \"Thermal efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fraction of expansive work: 33.04 % of total output\n",
+ "Thermal efficiency: 10.9 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 543"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import log,sqrt,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P = 60 #Power produced(in bhp):\n",
+ "p1 = 12 #Pressure at which steam is admitted(in bar):\n",
+ "p3 = 1 #Pressure at exhaust(in bar):\n",
+ "n = 240 #Rpm of engine:\n",
+ "v = 2 #Piston speed(in m/s):\n",
+ "d = 0.04 #Diameter of piston(in m):\n",
+ "n = 0.60 #Occurence of cut-off:\n",
+ "r1 = 0.05 #Clearance volume to stroke volume ratio:\n",
+ "d1 = 0.8 #Diagram factor:\n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "\n",
+ "#Calculations:\n",
+ "r = (1+r1)/n #Expansion ratio:\n",
+ "mep = (p1*12*(1+log(r))-1*21-(12-1))/(21-1) #Mean effective pressure(in bar):\n",
+ "mepa = mep*d1 #Actual mean effective pressure(in bar):\n",
+ "A = P*0.7457/(nm*mepa*10**2*v) #Effective area(in m**2):\n",
+ "D = sqrt((A-pi*d**2/4)*4/(2*pi)) #Bore diameter(in m):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Bore: \",round(D*100,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bore: 14.05 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 545"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi,log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "D = 0.2 #Diameter of cylinder(in m):\n",
+ "L = 0.3 #Length of stroke(in m):\n",
+ "Vc = 2*10**3 #Clearance volume(in cm**3):\n",
+ "ms = 0.05 #Mass of steam used per stroke(in kg):\n",
+ "c = 0.80 #Point at which compression starts:\n",
+ "p4 = 1 #Pressure of steam when compression starts(in bar):\n",
+ "r1 = 0.10 #Cut-off point:\n",
+ "r2 = 0.90 #Release:\n",
+ "p1 = 15 #Pressure at states 1 & 2(in bar):\n",
+ "#From steam tables:\n",
+ "v4 = 1.6940 #m**3/kg\n",
+ "vg15 = 0.13177 #m**3/kg\n",
+ "vg3 = 0.6058 #m**3/kg\n",
+ "u1 = 1590.79 #kJ/kg\n",
+ "u2 = 1216.73 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "p2 = 3\n",
+ "V6 = Vc*10**(-6) #Clearance volume(in m**3):\n",
+ "V5 = V6\n",
+ "Vs = pi*D**2/4*L #Stroke volume(in m**3):\n",
+ "V3 = V6+Vs #Volume at state 3(in m**3):\n",
+ "V4 = V3-c*(V3-V6) #Volume at state 4(in m**3):\n",
+ "m4 = V4/v4 #Mass of steam at state 4(in kg):\n",
+ "m = m4+ms #Total mass of steam during expansion(in kg):\n",
+ "V1 = V6+r1*(V3-V6) #Volume at cut-off point(in m**3):\n",
+ "x1 = V1/(m*vg15) #Dryness fraction at cut-off point:\n",
+ "V2 = V6+r2*(V3-V6) #Volume at point of release(in m**3):\n",
+ "x2 = V2/(m*vg3) #Dryness fraction at point of release:\n",
+ "n = log(p1/p2)/log(V2/V1) #Index of expansion:\n",
+ "W = (p1*V1-p2*V2)/(n-1)*100 #Work done in a stroke(in kJ):\n",
+ "Ws = W/m #Work done per kg of steam(in kJ/kg):\n",
+ "du = u2-u1 #Change in internal energy(in kJ/kg):\n",
+ "dQ = du-Ws #Heat transfer(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Total mass of steam during expansion: \",round(m,6),\"kg\"\n",
+ "print \"Dryness fraction at cut-off and release: \",round(x1,4),round(x2,4)\n",
+ "print \"Heat leakage: \",round(-dQ,2),\"kJ/kg steam\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total mass of steam during expansion: 0.052293 kg\n",
+ "Dryness fraction at cut-off and release: 0.427 0.3309\n",
+ "Heat leakage: 465.0 kJ/kg steam\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "#Variable Declaration: \n",
+ "r1 = 0.3 #Point of sut-off:\n",
+ "p4 = 4 #Pressure at state 4(in bar):\n",
+ "V4 = 0.15 #Volume at state 4(in m**3):\n",
+ "p1 = 12 #Pressure at state 1(in m**3):\n",
+ "p2 = 5 #Pressure at release(in bar):\n",
+ "V2 = 0.5 #Indicated volume at release(in m**3):\n",
+ "d = 0.6 #Bore diameter(in m):\n",
+ "L = 1.20 #Stroke length(in m):\n",
+ "c = 0.10 #Clearance volume ratio:\n",
+ "ms = 1.5 #Mass of steam admitted(in kg/stroke):\n",
+ "nw = 180*60 #Number of working strokes(per second):\n",
+ "#From steam tables:\n",
+ "vg4 = 0.4625 #m**3/kg\n",
+ "vg12 = 0.16333 #m**3/kg\n",
+ "vg5 = 0.3749 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "Vs = pi*d**2/4*L #Stroke volume(in m**3):\n",
+ "V5 = c*Vs #Clearance volume(in m**3):\n",
+ "V3 = V5+Vs #Total volume of cylinder(in m**3):\n",
+ "V1 = V5+r1*Vs #Volume at cut-off point(in m**3):\n",
+ "m4 = V4/vg4 #Mass of steam at state 4(in kg):\n",
+ "m = m4+ms #Total mass during steam expansion(in kg):\n",
+ "x1 = V1/(m*vg12) #Dryness fraction at cut-off point:\n",
+ "mq1 = (m-m*x1)*nw #Missing quantity per hour(in kg):\n",
+ "x2 = V2/(m*vg5) #Dryness fraction at point of release:\n",
+ "mq2 = (m-m*x2)*nw #Missing quantity per hour(in kg):\n",
+ "P = (mq1-mq2)/mq1*100 #Percentage re-evaporation during expansion:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Dryness fraction at cut-off: \",round(x1,3)\n",
+ "print \"Dryness fraction at release: \",round(x2,3)\n",
+ "print \"Missing quanity at cut off: \",round(mq1,2),\"kg/hr\"\n",
+ "print \"Missing quanity at release: \",round(mq2,2),\"kg/hr\"\n",
+ "print \"Percentage re-evaporation: \",round(P,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction at cut-off: 0.455\n",
+ "Dryness fraction at release: 0.731\n",
+ "Missing quanity at cut off: 10728.59 kg/hr\n",
+ "Missing quanity at release: 5298.86 kg/hr\n",
+ "Percentage re-evaporation: 50.61 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 549"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi,log\n",
+ "#Variable Declaration: \n",
+ "p1 = 1.5*10**3 #Pressure at which steam is supplied(in kPa):\n",
+ "x1 = 0.9 #Dryness fraction:\n",
+ "p4 = 40 #Pressure at exhaust(in kPa):\n",
+ "d1LP = 0.8 #Diagram factor reffered to LP cylinder:\n",
+ "L = 0.38 #Stroke length(in m):\n",
+ "dHP = 0.20 #Bore of HP cylinder(in m):\n",
+ "dLP = 0.30 #Bore of LP cylinder(in m):\n",
+ "N = 240 #Rpm of engine:\n",
+ "\n",
+ "#Calculations:\n",
+ "AHP = pi*(dHP**2)/4 #Area of HP cylinder(in m**2):\n",
+ "ALP = pi*(dLP**2)/4 #Area of LP cylinder(in m**2):\n",
+ "p2 = 192 #Intermediate pressure(in kPa):\n",
+ "V2 = AHP*L #Volume at state 2(in m**3):\n",
+ "V1 = V2*p2/p1 #Volume at state 1(in m**3):\n",
+ "VLP = ALP*L #Volume of LP cylinder(in m**3):\n",
+ "r = VLP/V1 #Expansion ratio throughout the engine:\n",
+ "mep = p1/r*(1+log(r))-p4 #Mean effective pressure(in kPa):\n",
+ "mepa = mep*d1LP #Actual mep(in kPa):\n",
+ "IP = mepa*L*ALP*N/60*2 #Indicated power(in kW):\n",
+ "Vs = V1*N*2*60 #Volume of steam admitted per hour(in m**3):\n",
+ "v1 = 0.1187 #Specific volume of steam being admitted(in m**3/kg):\n",
+ "m = Vs/v1 #Steam consumption(in kg/hr):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Intermidiate pressure: \",round(p2),\"kPa\"\n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Steam consumption: \",round(m,2),\"kg/hr\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intermidiate pressure: 192.0 kPa\n",
+ "Indicated power: 49.85 kW\n",
+ "Steam consumption: 370.75 kg/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 550"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi,sqrt,log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1.4*10**3 #Pressure at which steam is supplied(in kPa):\n",
+ "p4 = 25 #Pressure at exhaust(in kPa):\n",
+ "r = 8 #Expansion ratio:\n",
+ "N = 240 #Rpm of engine:\n",
+ "d = 0.60 #Bore diameter(in m):\n",
+ "L = 0.60 #Stroke length(in m):\n",
+ "d1 = 0.8 #Diagram factor:\n",
+ "\n",
+ "#Calculations:\n",
+ "A = pi*d**2/4 #Area of cylinder(in m**2):\n",
+ "mep = p1/r*(1+log(r))-p4 #Hypothetical mep(in kPa):\n",
+ "mepa = mep*d1 #Actual mep(in kPa):\n",
+ "IP = mepa*L*A*N/60*2 #Indicated power(in kW):\n",
+ "W = mepa*A*L/2 #Work done in HP cylinder(in kJ):\n",
+ "V1 = pi*d**2*L/(4*8) #Volume at state 1(in m**3):\n",
+ "V2 = 2.71**(W/(p1*V1))*V1 #Volume at state 2(in m**3):\n",
+ "D = sqrt(V2*4/(L*pi)) #Diameter of HP cylinder(in m):\n",
+ "p2 = p1*V1/V2 #Intermediate pressure(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Diameter of HP cylinder: \",round(D*100,2),\"cm\"\n",
+ "print \"Intermediate pressure: \",round(p2,2),\"kPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 557.96 kW\n",
+ "Diameter of HP cylinder: 38.1 cm\n",
+ "Intermediate pressure: 434.06 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 552"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi, log,sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1.5*10**3 #Pressure at which steam is supplied(in kPa):\n",
+ "p4 = 25 #Pressure at exhaust(in kPa):\n",
+ "P = 250 #Power output(in kW):\n",
+ "r = 12 #Expansion ratio:\n",
+ "d = 0.40 #Diameter of LP cylinder(in m):\n",
+ "L = 0.60 #Stroke length(in m):\n",
+ "d1 = 0.75 #Diagram factor:\n",
+ "r1 = 2.5 #Expansion ratio in HP cylinder:\n",
+ "\n",
+ "#Calculations:\n",
+ "A = pi*d**2/4 #Area of cylinder(in m**2):\n",
+ "mep = p1/r*(1+log(r))-p4 #Hypothetical mep(in kPa):\n",
+ "mepa = mep*d1 #Actual mep(in kPa):\n",
+ "N = P/(mepa*L*A*2)*60 #Rpm of engine:\n",
+ "V3 = A*L #Volume of LP cylinder(in m**3):\n",
+ "V4 = V3\n",
+ "Vc = V4/r #Cut-off volume in HP cylinder(in m**3):\n",
+ "Vt = Vc*r1 #Total volume in HP cylinder(in m**3):\n",
+ "D = sqrt(Vt*4/(L*pi)) #Diameter of HP cylinder(in m):\n",
+ "\n",
+ "print \"Speed of engine: \",round(N),\"rpm\"\n",
+ "print \"Diameter of HP cylinder: \",round(D*100,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of engine: 323.0 rpm\n",
+ "Diameter of HP cylinder: 18.26 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 553"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi, log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "dhp = 0.25 #Diameter of HP, LP and IP cylinder(in m):\n",
+ "dip = 0.40\n",
+ "dlp = 0.85\n",
+ "mephp = 0.5*10**3 #MEPs of the cylinders(in kPa):\n",
+ "mepip = 0.3*10**3\n",
+ "meplp = 0.1*10**3\n",
+ "p1 = 1.5*10**3 #Pressure at which steam is supplied(in kPa):\n",
+ "p4 = 25 #Pressure at exhaust(in kPa):\n",
+ "r1 = 0.60 #Cut-off occurs at:\n",
+ "\n",
+ "#Calculations:\n",
+ "AHP = pi*dhp**2/4 #Area of HP cylinder(in m**2):\n",
+ "AIP = pi*dip**2/4 #Area of IP cylinder(in m**2):\n",
+ "ALP = pi*dlp**2/4 #Area of LP cylinder(in m**2):\n",
+ "mep1 = mephp*AHP/ALP #Mep of HP referred to LP cylinder(in kPa):\n",
+ "mep2 = mepip*AIP/ALP #Mep of IP referred to LP cylinder(in kPa):\n",
+ "mept = mep1+mep2+meplp #Overall mep referred to LP cylinder(in kPa):\n",
+ "r = ALP/(r1*AHP) #Overall expansion ratio:\n",
+ "mep = p1/r*(1+log(r))-p4 #Hypothetical mep(in kPa):\n",
+ "d1 = mept/mep #Overall diagram factor: \n",
+ "P1 = mep1/mept*100 #% of HP cylinder output:\n",
+ "P2 = mep2/mept*100 #% of HP cylinder output:\n",
+ "P3 = meplp/mept*100 #% of HP cylinder output:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Actual mep referred to LP: \",round(mept,2),\"kPa\"\n",
+ "print \"Hypothetical mep referred to LP: \",round(mep,2),\"kPa\"\n",
+ "print \"Overall diagram factor: \",round(d1,3)\n",
+ "print \"Percentage of HP, IP and LP cylinder outputs: \",round(P1,2),\"%\",round(P2,2),\"%\",round(P3,2),\"% respectively\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual mep referred to LP: 209.69 kPa\n",
+ "Hypothetical mep referred to LP: 283.18 kPa\n",
+ "Overall diagram factor: 0.74\n",
+ "Percentage of HP, IP and LP cylinder outputs: 20.63 % 31.68 % 47.69 % respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 555"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi, log\n",
+ "#Variable Declaration: \n",
+ "p1 = 7 #Pressure at which steam is supplied(in bars):\n",
+ "p5 = 0.25 #Pressure at exhaust(in bars):\n",
+ "dhp = 0.25 #Diameter of HP and LP cylinder(in m):\n",
+ "dlp = 0.50\n",
+ "r1 = 0.30 #Cut-off point of HP and LP cylinders:\n",
+ "r2 = 0.45\n",
+ "c1 = 0.10 #Clearance volume of HP and LP cylinders:\n",
+ "c2 = 0.05\n",
+ "d1hp = 0.8 #Diagram factors of HP and LP cylinders:\n",
+ "d1lp = 0.7\n",
+ "N = 100 #Rpm pf engine:\n",
+ "L = 1 #Let the length of stroke(in m):\n",
+ "\n",
+ "#Calculations:\n",
+ "VHP = pi*dhp**2/4*L #Volume of HP cylinder(in m**2):\n",
+ "VLP = pi*dlp**2/4*L #Volume of LP cylinder(in m**2):\n",
+ "V9 = c1*VHP #Clearance volume(in m**2):\n",
+ "V7 = c2*VLP\n",
+ "V2 = VHP+V9 #Total volume of cylinders(in m**3):\n",
+ "V5 = VLP+V7\n",
+ "V1 = V9+r1*VHP #Volume at cut-off in HP cylinder(in m**3):\n",
+ "V3 = V7+r2*VLP\n",
+ "rhp = V2/V1 #Expansion ratio:\n",
+ "rlp = V5/V3\n",
+ "p3 = p1*10**2*V1/V3 #Pressure at state 3(in kPa):\n",
+ "mepahp = d1hp*(p1*10**2*V1*(1+log(rhp))-p3*V2-(p1*10**2-p3)*V9)/VHP #Actual mep for HP cylinder(in kPa):\n",
+ "mepalp = 62.96 #Actual mep for LP cylinder(in kPa):\n",
+ "mepa = mepahp*VHP/VLP #Actual mep of HP reffered to LP cylinder:\n",
+ "mept = mepalp+mepa #Total mep(in kPa):\n",
+ "W = mept*VLP*100/60 #Total output(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"mep of Hp referred to LP: \",round(mepa,2),\"kPa\"\n",
+ "print \"mep of LP: \",round(mepalp,2),\"kPa\"\n",
+ "print \"Total output: \",round(W,2),\" x L kW where L is stroke length\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mep of Hp referred to LP: 70.65 kPa\n",
+ "mep of LP: 62.96 kPa\n",
+ "Total output: 43.72 x L kW where L is stroke length\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 557"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi\n",
+ "#Variable Declaration: \n",
+ "t = 15 #Duration of trial(in min):\n",
+ "d = 0.25 #Bore diameter(in m):\n",
+ "L = 0.30 #Stroke length(in m):\n",
+ "bd = 1.5 #Brake diameter(in m):\n",
+ "bl = 300 #Net brake load(in N):\n",
+ "N = 240 #Speed of engine:\n",
+ "p1 = 10 #Steam pressure(in bar):\n",
+ "x = 0.9 #Dryness fraction:\n",
+ "mep = 0.9#Mep at cover end(in bar):\n",
+ "m1 = 15 #Steam utilised(in kg):\n",
+ "\n",
+ "#Calculations:\n",
+ "m = m1/t*60 #Steam consumption per hour(in kg/hr):\n",
+ "IP = mep*10**2*L*pi*d**2*240*2/(4*0.7457*60)#Indicated horse power(in kW):\n",
+ "m2 = 60/IP #Steam used per(hp.hr):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Steam used per ihp.hr: \",round(m2,2),\"kg/ihp.hr\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam used per ihp.hr: 4.22 kg/ihp.hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "d = 0.38 #Bore diameter(in m):\n",
+ "L = 0.50 #Stroke length(in m):\n",
+ "pd = 0.05#Piston rod diameter(in m):\n",
+ "N = 150 #Speed of engine(in rpm):\n",
+ "m = 36 #Steam consumption(in kg/min):\n",
+ "F = 7 #Brake load(in kN):\n",
+ "bd = 2 #Brake diameter(in m):\n",
+ "aco = 28 #Area of indicator diagram at cover end(in cm**2):\n",
+ "acr = 26 #Area of indicator diagram at crank end(in cm**2):\n",
+ "l = 0.07 #Length of indicator diagram(in m):\n",
+ "s = 15 #Spring scale(in kPa/mm):\n",
+ "\n",
+ "#Calculations:\n",
+ "mepcr = acr*100*s/(l*10**3) #Mep at crank end(in kPa):\n",
+ "mepco = aco*100*s/(l*10**3) #Mep at cover end(in kPa):\n",
+ "IPcr = mepcr*L*pi*(d**2-pd**2)/4*N/60 #IP at crank end(in kW):\n",
+ "IPco = mepco*L*pi*(d**2)/4*N/60\t #IP at cover end(in kW):\n",
+ "IP = IPcr+IPco #IP(in kW):\n",
+ "BP = 2*pi*N/60*F*1 #Brake power(in kW):\n",
+ "n = BP/IP #Mechanical efficiency:\n",
+ "ISFC = m*60/IP #ISFC(in kg/kW.h):\n",
+ "BSFC = m*60/BP #BSFC(in kg/kW.h):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Brake power: \",round(BP,2),\"kW\"\n",
+ "print \"Indicated specific steam consumption: \",round(ISFC,2),\"kg/kW.h\"\n",
+ "print \"Brake specific steam consumption: \",round(BSFC,2),\"kg/kW.h\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 162.67 kW\n",
+ "Brake power: 109.96 kW\n",
+ "Indicated specific steam consumption: 13.28 kg/kW.h\n",
+ "Brake specific steam consumption: 19.64 kg/kW.h\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 559"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#From steam tables:\n",
+ "hf = 844.89 #kJ/kg\n",
+ "hfg = 1947.3 #kJ/kg\n",
+ "hcond = 209.33 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "BP = 2*pi*150*(120*9.81-100)*(100/2)*10**(-2)/(1000*60)#Brake power(in kW):\n",
+ "IPco = 1.8*10**2*0.34*pi/4*(0.24)**2*150/60#IP at cover end(in kW):\n",
+ "IPcr = 1.6*10**2*0.34*pi/4*(0.24**2-0.05**2)*150/60\t#IP at crank end(in kW):\n",
+ "IP = IPco+IPcr #Total IP(in kW):\n",
+ "n = BP/IP #Mechanical efficiency:\n",
+ "hs = hf+0.98*hfg #Enthalpy of steam at inlet(in kJ/kg):\n",
+ "E = hs-hcond #Energy supplied by the steam(in kJ/kg):\n",
+ "m = 4*60 #Steam consumption rate(in kg/hr):\n",
+ "nbth = 3600/((m/BP)*E)*100 #Brake thermal efficiency:\n",
+ "ISFC = m/IP #Indicated steam consumption(in kg/kW.h):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Brake thermal efficiency: \",round(nbth,2),\"%\" \n",
+ "print \"Indicated specific steam consumption: \",round(ISFC,2),\"kg/kW.h\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake thermal efficiency: 4.99 %\n",
+ "Indicated specific steam consumption: 18.74 kg/kW.h\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter13.ipynb b/Applied_Thermodynamics/Chapter13.ipynb
new file mode 100755
index 00000000..1d963cc2
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter13.ipynb
@@ -0,0 +1,916 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3c23e07bbff73d50716bb3f0344f5f19803ca8de755edfb991f464d2a6411a44"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: Nozzles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "p1 = 10 #Pressure of dry steam(in bar):\n",
+ "C1 = 100 #Velocity of steam entering(in m/s):\n",
+ "C2 = 300 #Velocity of steam leaving the nozzle(in m/s):\n",
+ "p2 = 5 #Pressure of steam at exit(in bar):\n",
+ "m = 16 #Mass flow rate(in kg/s):\n",
+ "q = 10 #Heat loss to surroundings(in kJ/kg):\n",
+ "#From steam tables:\n",
+ "h1 = 2778.1 #kJ/kg\n",
+ "hf = 640.23 #kJ/kg\n",
+ "hfg = 2108.5 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "dh = (q*10**3+(C1**2-C2**2)/2)/1000\t#Heat drop in the nozzle(in kJ/kg):\n",
+ "dQ = -dh*m #Total heat drop(in kJ/s):\n",
+ "h2 = h1+dh #Enthalpy at state 2(in kJ/kg):\n",
+ "x2 = (h2-hf)/hfg #Dryness fraction at state 2:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat drop in the nozzle: \",round(-dh,2),\"kJ/kg\" \n",
+ "print \"Total heat drop: \",round(dQ,2),\"kJ/s\"\n",
+ "print \"Dryness fraction at exit: \",round(x2,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat drop in the nozzle: 30.0 kJ/kg\n",
+ "Total heat drop: 480.0 kJ/s\n",
+ "Dryness fraction at exit: 0.9997\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 585"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 10 #Steam entering at pressure(in bar):\n",
+ "p2 = 6 #Pressure at which steam leaves(in bar):\n",
+ "A2 = 20 #Cross-section area of exit of nozzle(in cm**2):\n",
+ "#From steam tables:\n",
+ "h1 = 3478.5 #kJ/kg \n",
+ "s1 = 7.7622 #kJ/kg.K\n",
+ "T2 = 418.45 #C(by interpolation)\n",
+ "h2 = 3309.51 #kJ/kg\n",
+ "v2 = 0.5281 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "C2 = sqrt(2*(h1-h2)*10**3) #Velocity at exit(in m/s):\n",
+ "m = A2*10**(-4)*C2/v2 #Mass flow rate(in kg/s):\n",
+ "\n",
+ "#Result: \n",
+ "print \"Mass flow rate: \",round(m,3),\"kg/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate: 2.202 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 587"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 12 #Pressure of steam entering(in bar):\n",
+ "p2 = 6 #Pressure at exit(in bar):\n",
+ "m1 = 5 #Mass flow rate(in kg/s):\n",
+ "m2 = m1\n",
+ "m3 = m1\n",
+ "C3a = 500 #Exit velocity(in m/s):\n",
+ "#From steam tables:\n",
+ "h1 = 3045.8 #kJ/kg \n",
+ "h2 = 2900.05 #kJ/kg\n",
+ "s2 = 7.0317 #kJ/kg.K\n",
+ "v2 = 0.3466 #m**3/kg\n",
+ "h3 = 2882.55 #kJ/kg\n",
+ "v3 = 0.3647 #m**3/kg\n",
+ "n = 1.3 #For superheated steam:\n",
+ "\n",
+ "#Calculations:\n",
+ "s1 = s2\n",
+ "s3 = s2\n",
+ "p2 = p1*(2/(n+1))**(n/(n-1)) #Pressue at state 2(in bar):\n",
+ "C2 = sqrt(2*(h1-h2)*10**3) #Velocity at throat(in m/s):\n",
+ "A2 = m2*v2/C2 #Cross-sectional area at throat(in m**2):\n",
+ "C3 = sqrt(2*(h1-h3)*10**3) #Ideal velocity at exit(in m/s):\n",
+ "A3 = m3*v3/C3a #Cross-sectional area at exit(in m**2): \n",
+ "r = C3a/C3 #Coefficient of velocity:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Cross-sectional area at throat: \",round(A2*10**3,3),\" x 10^-3 m^2\"\n",
+ "print \"Cross-sectional area at exit: \",round(A3*10**3,3),\" x 10^-3 m^2\"\n",
+ "print \"Coefficient of velocity: \",round(r,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cross-sectional area at throat: 3.21 x 10^-3 m^2\n",
+ "Cross-sectional area at exit: 3.647 x 10^-3 m^2\n",
+ "Coefficient of velocity: 0.875\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 588"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 16 #Pressure of steam entering(in bar):\n",
+ "p3 = 5 #Pressure at exit(in bar):\n",
+ "m1 = 1 #Mass flow rate(in kg/s):\n",
+ "m2 = m1\n",
+ "m3 = m1\n",
+ "#From steam tables:\n",
+ "#For case 1:\n",
+ "h1 = 3034.8 #kJ/kg\n",
+ "s1 = 6.8844 #kJ/kg.K\n",
+ "v1 = 0.15862 #m**3/kg\n",
+ "n = 1.3\n",
+ "h2 = 2891.39 #kJ/kg\n",
+ "h3 = 2777 #kJ/kg\n",
+ "v2 = 0.2559 #m**3/kg\n",
+ "v3 = 0.3882 #m**3/kg\n",
+ "#For case 2:\n",
+ "h2a = 2905.73 #kJ/kg\n",
+ "v2a = 0.2598 #m**3/kg\n",
+ "v3a = 0.40023 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "p2 = p1*(2/(n+1))**(n/(n-1)) #Pressure at the throat of nozzle(in bar):\n",
+ "q12 = h1-h2 #Heat drop up to throat section(in kJ/kg):\n",
+ "C2 = sqrt(2*(h1-h2)*10**3) #Velocity at throat(in m/s):\n",
+ "q23 = h2-h3 #Heat drop from exit(in kJ/kg):\n",
+ "C3 = sqrt(2*(h2-h3)*10**3+C2**2) #Velocity at exit(in m/s):\n",
+ "A2 = m2*v2/C2 #Throat area(in m**2):\n",
+ "A3 = m3*v3/C3 #Exit area(in m**2):\n",
+ "q12a = 0.9*q12 #Considering expansion to have 10% friction loss:\n",
+ "C2a = sqrt(2*q12a*10**3) #Actual velocity at throat(in m/s):\n",
+ "A2a = m2*v2a/C2a #Actual throat area(in m**2):\n",
+ "q23a = 0.9*q23 #Actual drop at the exit of the nozzle(in kJ/kg):\n",
+ "h3a = h2a-q23a #Actual enthalpy at state 3(in kJ/kg):\n",
+ "C3a = sqrt(2*q23a*10**3+C2a**2) #Actual velocity at exit(in m/s):\n",
+ "A3a = m3*v3a/C3a #Actual area at exit(in m**2):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Throat area, without friction consideration: \",round(A2*10**4,2),\"cm**2\"\n",
+ "print \"Exit area, without friction consideration: \",round(A3*10**4,2),\"cm**2\"\n",
+ "print \"Throat area, with friction consideration: \",round(A2a*10**4,2),\"cm**2\"\n",
+ "print \"Exit area, with friction consideration: \",round(A3a*10**4,3),\"cm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Throat area, without friction consideration: 4.78 cm**2\n",
+ "Exit area, without friction consideration: 5.41 cm**2\n",
+ "Throat area, with friction consideration: 5.11 cm**2\n",
+ "Exit area, with friction consideration: 5.875 cm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 590"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt,pi\n",
+ "#Variable Declaration: \n",
+ "P = 1 #Power of turbine(in MW):\n",
+ "p1 = 20 #Pressure of steam entering(in bar):\n",
+ "m = 8 #Steam consumption rate(in kg/kW.h):\n",
+ "p3 = 0.2 #Pressure at which steam leaves(in bar):\n",
+ "d = 0.01 #Throat diameter(in m):\n",
+ "#From Mollier diagram:\n",
+ "q12 = 142 #kJ/kg \n",
+ "v2 = 0.20 #m**3/kg\n",
+ "q13 = 807 #kJ/kg\n",
+ "v3 = 7.2 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "C2 = sqrt(2*q12*10**3) #Velocity at throat(in m/s):\n",
+ "m2 = pi*d**2/4*C2/v2 #Mass flow rate:\n",
+ "m3 = m2\n",
+ "n = 10**3*m/(3600*m2) #Number of nozzles:\n",
+ "q13a = 0.90*q13 #Useful heat drop:\n",
+ "C3 = sqrt(2*10**3*q13a)#Velocity at exit(in m/s):\n",
+ "A3 = m3*v3/C3 #Area at exit(in m**2):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Number of nozzles required: \",round(n) \n",
+ "print \"Area at exit: \",round(A3*10**4,2),\"cm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of nozzles required: 11.0\n",
+ "Area at exit: 12.5 cm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 591"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi, atan, sqrt\n",
+ "#Variable Declaration: \n",
+ "p1 = 0.7 #Pressure at which steam is supplied(in MPa):\n",
+ "l = 0.06 #Length of diverging nozzle(in m):\n",
+ "d = 0.005 #Throat diameter(in mm):\n",
+ "p3 = 0.1 #Pressure at which steam leaves the nozzle(in MPa):\n",
+ "#From Mollier diagram:\n",
+ "q12 = 138 #kJ/kg\n",
+ "v2 = 0.58 #m**3/kg\n",
+ "T = 203 #\u00b0C\n",
+ "q23 = 247 #kJ/kg\n",
+ "q23a = 209.95 #kJ/kg\n",
+ "v3a = 1.7 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "C2 = sqrt(2*q12*10**3) #Velocity at throat(in m/s):\n",
+ "m1 = pi*d**2/4*C2/v2 #Mass flow rate(in kg/s):\n",
+ "m2 = m1\n",
+ "m3 = m1\n",
+ "q = q12+q23a #Total heat drop(in kJ/kg):\n",
+ "C3 = sqrt(2*10**3*q) #Velocity at exit(in m/s):\n",
+ "A3 = m3*v3a/C3 #Area at exit(in m**2):\n",
+ "d1 = (sqrt(A3*4/pi))*10**3 #Diameter at exit(in mm):\n",
+ "a = atan((d1-d*10**3)/(2*60))*180/pi\n",
+ "\n",
+ "#Results: \n",
+ "print \"With no losses, temperature at throat: \",round(T,2),\"\u00b0C\"\n",
+ "print \"Velocity at throat: \",round(C2,2),\"m/s\"\n",
+ "print \"With losses, cone angle: \",round(2*a,2),\"\u00b0\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "With no losses, temperature at throat: 203.0 \u00b0C\n",
+ "Velocity at throat: 525.36 m/s\n",
+ "With losses, cone angle: 1.71 \u00b0\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 593"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import sin,pi,sqrt\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "P = 5000 #Power of the turbine(in hp):\n",
+ "m = P*6/3600 #Steam required(in kg of steam/hp-hr):\n",
+ "n = 0.90 #Efficiency of nozzle:\n",
+ "a = 12 #Nozzle angle:\n",
+ "p = 5 #Pitch(in cm):\n",
+ "t = 0.3 #Thickness(in cm):\n",
+ "#From steam tables:\n",
+ "h1 = 2794 #kJ/kg\n",
+ "s1 = 6.4218 #kJ/kg.K\n",
+ "x2 = 0.9478\n",
+ "h2 = 2662.2 #kJ/kg\n",
+ "x2a = 0.9542\n",
+ "v2a = 0.2294 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "h12 = h1-h2 #Change in enthalpy(in kJ/kg):\n",
+ "h12a = n*h12 #Actual change(in kJ/kg):\n",
+ "C2 = sqrt(2*h12a*10**3) #Velocity at inlet(in m/s):\n",
+ "A2 = m*v2a/C2*10**4 #Area at exit of nozzle(in cm**2):\n",
+ "l = 60*pi/3 #Approximate length of the nozzle(in cm):\n",
+ "n = int(l/p)+1 #Number of nozzles:\n",
+ "l1 = n*p #Correct length of nozzle arc:\n",
+ "h = A2/((p*sin(a*pi/180)-t)*n)#Radial height of nozzle(in cm):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Length of nozzle: \",round(l1,2),\"cm\"\n",
+ "print \"Radial height of nozzle: \",round(h,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length of nozzle: 65.0 cm\n",
+ "Radial height of nozzle: 4.08 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 594"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 13 #Pressure at which steam enters(in bar):\n",
+ "p2 = 6 #Pressure at which steam leaves(in bar):\n",
+ "T1 = 150+273 #Temperature of steam entering(in K):\n",
+ "r = 1.4 #Adibatic insex of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1*(p2/p1)**((r-1)/r) #Final temperature of steam(in K):\n",
+ "C2 = sqrt(2*1.005*(T1-T2)) #Exit velocity(in m/s):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Exit velocity: \",round(C2,2),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Exit velocity: 12.98 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "F = 350 #Force on the plate(in N):\n",
+ "p1 = 8 #Initial pressure(in bar):\n",
+ "p3 = 1 #Final pressure(in bar):\n",
+ "A2 = 5*10**(-4) #Throat cross-sectional area(in m**2):\n",
+ "#From steam tables:\n",
+ "h1 = 2769.1 #kJ/kg\n",
+ "s1 = 6.6628 #kJ/kg.K\n",
+ "x2 = 0.9717\n",
+ "h2 = 2685.17 #kJ/kg\n",
+ "v2 = 0.3932 #m**3/kg\n",
+ "x3 = 0.8238\n",
+ "h3 = 2277.6 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "s3 = s1\n",
+ "h12 = h1-h2 #Enthalpy change(in kJ/kg):\n",
+ "C2 = sqrt(2*h12*10**3) #Velocity at throat(in m/s):\n",
+ "m = A2*C2/v2 #Discharge at throat(in kg/s):\n",
+ "C3a = F/m #Actual exit velocity(in m/s):\n",
+ "h23 = h2-h3 #Theoretical enthalpy drop(in kJ/kg):\n",
+ "n = C3a**2/(2*h23*10**3) #Nozzle efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Discharge at throat: \",round(m,3),\"kg/s\"\n",
+ "print \"Nozzle efficiency: \",round(n*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge at throat: 0.521 kg/s\n",
+ "Nozzle efficiency: 55.37 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 597"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 5/60 #Mass flow rate(in kg/s):\n",
+ "p3 = 1 #Pressure at which steam is discharged(in bar):\n",
+ "p1 = 10 #Initial pressure(in bar):\n",
+ "T1 = 200+273 #Initial temperature(in K)\n",
+ "n = 1.3 #Adiabatic index of compression:\n",
+ "\n",
+ "#From steam tables:\n",
+ "h1 = 2827.9 #kJ/kg\n",
+ "s1 = 6.6940 #kJ/kg.K\n",
+ "v1 = 0.2060 #m**3/kg\n",
+ "h2a = 2711.23 #kJ/kg\n",
+ "s2a = 6.6749 #kJ/kg.K\n",
+ "h3 = 2420.08 #kJ/kg\n",
+ "v3 = 1.5025 #m**3/kg\n",
+ "psat = 3.44 #bar (at T = 138.18 \u00b0C)\n",
+ "Tsat = 155.12 #C (at p = 5.45 bar)\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s2a\n",
+ "p2 = p1*(2/(n+1))**(n/(n-1)) #Pressure at throat(in bar):\n",
+ "C3 = sqrt(2*(h1-h3)*10**3) #Velocity at exit(in m/s):\n",
+ "A3 = m*v3/C3 #Exit area(in m**2):\n",
+ "d = sqrt(A3*4/pi) #Diameter of nozzle at exit(in m):\n",
+ "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at throat(in K):\n",
+ "d1 = p2/psat #Degree of supersaturation:\n",
+ "u = Tsat-(T2-273) #Amount of undercooling(in \u00b0C):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Degree of supersaturation: \",round(d1,2) \n",
+ "print \"Amount of undercooling: \",round(u,2),\"\u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Degree of supersaturation: 1.59\n",
+ "Amount of undercooling: 16.82 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 599"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 4 #Initial pressure(in bar):\n",
+ "T1 = 180+273 #Initial temperature(in K):\n",
+ "p2 = 1.5 #Final pressure(in bar):\n",
+ "n = 1.3 #Index of compression:\n",
+ "nn = 0.95 #Efficiency due to heat loss:\n",
+ "C = 2.174 #Specific heat(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "v1 = 0.5088 #m**3/kg \n",
+ "Tsat = 111.37+273 #K (at p = 1.5 bar)\n",
+ "\n",
+ "#Calculations:\n",
+ "h1 = p1*v1*10**2+2614 #Enthalpy at state 1(in kJ/kg):\n",
+ "v2 = v1*(p1/p2)**(1/n) #Specific volume at state 2(in m**3/kg):\n",
+ "h2 = p2*v2*10**2+2614 #Enthalpy at state 2(in kJ/kg):\n",
+ "dh = nn*(h1-h2) #Actual heat drop(in kJ/kg):\n",
+ "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n",
+ "dT = (1-nn)*(h1-h2)/C #Temperature rise due to supersaturation:\n",
+ "T2a = T2+dT #Actual temperature at state 2(in K):\n",
+ "u = Tsat-T2a #Amount of undercooling(in \u00b0C):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Actual heat drop: \",round(dh,2),\"kJ/kg\"\n",
+ "print \"Amount of undercooling: \",round(u,2),\"\u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual heat drop: 39.16 kJ/kg\n",
+ "Amount of undercooling: 22.18 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 600"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 14 #Initial pressure(in bar):\n",
+ "T1 = 400+273 #Initial temperature(in K):\n",
+ "N = 16 #Number of nozzles:\n",
+ "p2 = 10 #Final pressure(in bar):\n",
+ "m = 5 #Discharge(in kg/s):\n",
+ "nn = 0.90 #Nozzle efficiency:\n",
+ "C1 = 100 #Inlet velocity(in m/s):\n",
+ "n = 1.3 #Insex of compression:\n",
+ "\n",
+ "#From steam tables:\n",
+ "h1 = 3257.5 #kJ/kg \n",
+ "s1 = 7.3026 #kJ/kg.K\n",
+ "T2 = 350.46 #\u00b0C\n",
+ "h2 = 3158.7 #kJ/kg\n",
+ "v2 = 0.2827 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "h12 = (h1-h2)*nn #Actual enthalpy change(inn kJ/kg):\n",
+ "C2 = sqrt(2*h12*10**3) #Velocity at exit(in m/s):\n",
+ "A2 = m*v2/(C2*N)*10**4 #Cross-sectional area at exit(in cm**2):\n",
+ "C2a = sqrt(2*h12*10**3+C1**2)#Modified velocity at nozzle exit(in m/s):\n",
+ "ma = 16*2.13*433.41*10**(-4)/0.2827#ma = A2*C2a*N/v2*10**(-4) \n",
+ "p = (ma-m)/m*100 #% increase in discharge:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Cross-sectional area at exit of nozzle: \",round(A2,2),\"cm**2\"\n",
+ "print \"Percentage increase in discharge: \",round(p,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cross-sectional area at exit of nozzle: 2.09 cm**2\n",
+ "Percentage increase in discharge: 4.5 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 20 #Initial pressure(in bar):\n",
+ "p3 = 5 #Final pressure(in bar):\n",
+ "n = 1.3\n",
+ "#From steam tables:\n",
+ "T1 = 212.42+273 #K\n",
+ "Tsat = 186.43+273 #K (at 11.6 bar)\n",
+ "psat = 5.452 #bar (at 155.14 \u00b0C)\n",
+ "h1 = 2799.5 #kJ/kg\n",
+ "v1 = 0.009963 #m**3/kg\n",
+ "s1 = 6.3409 #kJ/kg.K\n",
+ "h2aa = 2693.98 #kJ/kg\n",
+ "s2a = 6.5484 #kJ/kg.K\n",
+ "h3a = 2632.76 #kJ/kg\n",
+ "h3 = 2544.21 #kJ/kg\n",
+ "p2 = p1*0.58 #Pressure at throat(in bar):\n",
+ "\n",
+ "#Calculations:\n",
+ "s2aa = s1\n",
+ "s3a = s2a\n",
+ "s3 = s1\n",
+ "T2 = T1*(p2/p1)**((n-1)/n)\t#Temperature at state 2(in K):\n",
+ "d = p2/psat #Degree of supersaturation:\n",
+ "d1 = Tsat-T2 #Degree of undercooling:\n",
+ "h12 = (n/(n-1))*p1*10**2*v1*(1-(T2/T1)) #Isentropic enthalpy drop:\n",
+ "h2 = h1-h12 #Enthalpy at state 2(in kJ/kg):\n",
+ "h12aa = h1-h2aa #Heat drop with no saturation(in kJ/kg):\n",
+ "L = h12aa-h12 #Loss of available heat drop(in kJ/kg):\n",
+ "s12a = L/Tsat #Increase in entropy(in kJ/kg.K):\n",
+ "L1 = h3a-h3 #Loss due to undercooling(in kJ/kg):\n",
+ "p = L1/(h1-h3)*100 #Percentage loss:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Degree of supersaturation: \",round(d,2)\n",
+ "print \"Degree of undercooling: \",round(d1,2),\"\u00b0C\"\n",
+ "print \"Entropy change: \",round(s12a,4),\"kJ/kg.K\"\n",
+ "print \"Loss due to undercooling: \",round(L1,2),\"kJ/kg\"\n",
+ "print \"Percentage loss: \",round(p,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Degree of supersaturation: 2.13\n",
+ "Degree of undercooling: 31.35 \u00b0C\n",
+ "Entropy change: 0.2075 kJ/kg.K\n",
+ "Loss due to undercooling: 88.55 kJ/kg\n",
+ "Percentage loss: 34.69\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 604"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m1 = 150/60 #Mass flow rate(in kg/s):\n",
+ "H = 5 #Height of water level from the axis of injector(in m):\n",
+ "p4 = 20 #Pressuer at which steam is injected(in bar):\n",
+ "Z4 = 0.8 #Water level in boiler from the injector(in m):\n",
+ "x1 = 0.95 #Dryness fraction at state 1:\n",
+ "C4 = 20 #Velocity in delivery pipe(in m/s):\n",
+ "p3 = 1.013 #Atmospheric pressure(in bar):\n",
+ "d = 10**3 #Density(in kg/m**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "Cps = 3.18 #Specific heat of steam(in kJ/kg.K):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "T1 = 212.42 #\u00b0C\n",
+ "Tw = 25 #\u00b0C\n",
+ "p2 = 0.7*p4\n",
+ "h1 = 2704.95 #kJ/kg\n",
+ "hfg1 = 1890.7 #kJ/kg\n",
+ "s1 = 6.1462 #kJ/kg.K\n",
+ "x2 = 0.923\n",
+ "h2 = 2639.10 #kJ/kg\n",
+ "v2 = 0.13 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "C2 = sqrt(2*(h1-h2)*10**3) #Velocity of steam at throat(in m/s):\n",
+ "C3 = sqrt(2*(g*Z4+p4*10**5/d+C4**2/2-p3*10**5/d))#Velocity at state 3(in m/s):\n",
+ "m = (C2-C3)/(sqrt(2*g*H)+C3) #Mass of water pumped per kg of steam(in kg):\n",
+ "m3 = m1+m1/m #Mass of mixture passing through state 3(in kg/s):\n",
+ "A3 = m3/(d*C3)*10**4 #Area of throat of mixing nozzle(in cm**2):\n",
+ "d3 = sqrt(A3*4/pi) #Diameter of throat of the mixing nozzle(in cm):\n",
+ "ms = m1/m #Mass of steam required for given flow rate(in kg/s):\n",
+ "A2 = ms*v2/C2*10**4 #Area at state 2(in cm**2):\n",
+ "d2 = sqrt(A2*4/pi) #Diameter of throat of steam nozzle(in cm):\n",
+ "T3 = (x1*hfg1+Cps*T1+m*Cpw*Tw)/(m*Cpw+Cps)#Temperature of water coming out of the injector(in C):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Mass of water pumped per kg of steam: \",round(m,2),\"kg\"\n",
+ "print \"Diameter of throat of the mixing nozzle: \",round(d3,3),\"cm\"\n",
+ "print \"Diameter of throat of steam nozzle: \",round(d2,2),\"cm\"\n",
+ "print \"Temperature of water coming out of the injector: \",round(T3,2),\"\u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of water pumped per kg of steam: 3.98 kg\n",
+ "Diameter of throat of the mixing nozzle: 0.783 cm\n",
+ "Diameter of throat of steam nozzle: 1.69 cm\n",
+ "Temperature of water coming out of the injector: 145.63 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 607"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p4 = 20 #Pressure at which steam is generated(in bar):\n",
+ "p1 = 1.5 #Pressure at inlet(in bar):\n",
+ "x1 = 0.9 #Dryness fraction:\n",
+ "M = 5000 #Mass of water taken from feed water tank(in kg/hr):\n",
+ "d = 10**3 #Density(in kg/m**3):\n",
+ "#From steam tables:\n",
+ "h1 = 2470.96 #kJ/kg \n",
+ "s1 = 6.6443 #kJ/kg.K\n",
+ "s2 = s1\n",
+ "x2 = 0.88\n",
+ "h2 = 2396.72 #kJ/kg\n",
+ "v2 = 1.7302 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "C2 = sqrt(2*(h1-h2)*10**3) #Steam velocity(in m/s):\n",
+ "C3 = sqrt(1.2*p4*2*10**5/d) #Velocity at 3(in m/s):\n",
+ "m = C2/C3-1 #Mass entrained per kg of steam:\n",
+ "ms = M/(3600*m) #Mass of steam supplied per second(in kg/s):\n",
+ "A2 = ms*v2/C2*10**4 #Area of steam nozzle(in cm**2):\n",
+ "D = M/3600+ms #Total discharge from injector(in kg/s):\n",
+ "A = D/(C3*d)*10**4 #Area of discharge orifice(in cm**2):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Mass of water pumped per kg of steam: \",round(m,2),\"kg water/kg of steam\"\n",
+ "print \"Area of steam nozzle: \",round(A2,2),\"cm**2\"\n",
+ "print \"Area of discharge orifice: \",round(A,3),\"cm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of water pumped per kg of steam: 4.56 kg water/kg of steam\n",
+ "Area of steam nozzle: 13.67 cm**2\n",
+ "Area of discharge orifice: 0.244 cm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter15.ipynb b/Applied_Thermodynamics/Chapter15.ipynb
new file mode 100755
index 00000000..4c14a1a7
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter15.ipynb
@@ -0,0 +1,591 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f7a19d25377671432cfde9f9d56148d23c8e97851f20fd5f765a471e71e2f5a2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15: Steam Condenser"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 695"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 71 #Height of mercury column in condenser(in mm of Hg):\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "mw = 800 #Rate at which cooling water is circulated(in kg/min):\n",
+ "ms = 25 #Condensate available at(in kg/min):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "ps = 5.62 #kPa\n",
+ "hf = 146.68 #kJ/kg\n",
+ "hfg = 2418.6 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "pt = (76-h)*10**(-2)*d*10**6*9.81*10**(-3)#Absolute pressure in the condenser(in kPa):\n",
+ "pa = pt-ps #Partial pressure of air(in kPa):\n",
+ "ma = pa/((273+35)*R) #Mass of air per m**3 of condenser volume:\n",
+ "hs = mw/ms*Cpw*(25-15)+Cpw*30#Enthalpy of steam(in kJ/kg):\n",
+ "x = (hs-hf)/hfg#Dryness fraction of the steam entering:\n",
+ "n = h*d*10**4*g/(76*d*10**4*g-ps*10**3)*100#Vacuum efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Mass of air of condenser volume: \",round(ma,3),\"kg/m**3\"\n",
+ "print \"Dryness fraction of steam entering: \",round(x,4)\n",
+ "print \"Vacuum efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of air of condenser volume: 0.012 kg/m**3\n",
+ "Dryness fraction of steam entering: 0.5442\n",
+ "Vacuum efficiency: 98.9 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 695"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 70 #Height of mercury column in condenser(in mm of Hg):\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "r = 2500 #Leakage of air in condenser:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "ps = 4.246 #kPa \n",
+ "vg = 32.89 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "pt = (76-h)*10**(-2)*d*10**6*9.81*10**(-3)#Absolute pressure in the condenser(in kPa):\n",
+ "pa = pt-ps #Partial pressure of air(in kPa):\n",
+ "m = 1/r #Mass of air accoumpanying per kg of steam due to leakage(in kg):\n",
+ "v = m*R*(273+30)/pa #Volume of air per kg of steam(in m**3/kg):\n",
+ "m1 = v/vg #Mass of water vapour accompanying air:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Capacity of air pump: \",round(v*10**3,2),\" x 10^-3 m**3 per kg steam\"\n",
+ "print \"Mass of water vapour accompanying air: \",round(m1*10**4,2),\" x 10^-4 kg/kg of steam\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of air pump: 9.26 x 10^-3 m**3 per kg steam\n",
+ "Mass of water vapour accompanying air: 2.82 x 10^-4 kg/kg of steam\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 696"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 67 #Height in mercury column in condenser(in cm):\n",
+ "pt = 10.67 #Absolute pressure in the condenser(in kPa):\n",
+ "ps = 7.384 #Partial pressure of steam(in kPa):\n",
+ "ms = 50 #Mass flow rate of steam(in kg/min):\n",
+ "mw = 1000 #Mass flow rate of water(in kg/min):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "#From steam tables:\n",
+ "hf = 167.57 #kJ/kg \n",
+ "hfg = 2406.7 #kJ/kg\n",
+ "vg = 19.52 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "cv = 76-(75-h) #Corrected vacuum(in cm):\n",
+ "pa = pt-ps #Partial pressure of air(in kPa):\n",
+ "n = h*d*10**4*g/(75*d*10**4*g-ps*10**3)*100\t#VAcuum efficiency:\n",
+ "u = 40-35 #Undercooling of condensate(in C):\n",
+ "n1 = (25-10)/(46.9-10)*100 #Condenser efficiency:\n",
+ "h = mw/ms*Cpw*(25-10)+Cpw*40 #Enthalpy of steam(in kJ/kg):\n",
+ "x = (h-hf)/hfg #Dryness fraction:\n",
+ "m = pa/(R*(273+40)) #Mass of air per m**3 of condenser volume(in kg/m**3):\n",
+ "m1 = pa*vg/(R*(273+40)) #Mass of air in 1kg of uncondensate steam(in kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Corrected vacuum: \",round(cv,2),\"cm of Hg\"\n",
+ "print \"Vacuum efficiency: \",round(n,2),\"%\"\n",
+ "print \"Undercooling: \",round(u,2),\"\u00b0C\"\n",
+ "print \"Dryness fraction of steam entering: \",round(x,4)\n",
+ "print \"Mass of air/m**3 of condenser volume: \",round(m,4),\"kg/m**3\"\n",
+ "print \"Mass of air in per kg of uncondensate steam: \",round(m1,3),\"kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Corrected vacuum: 68.0 cm of Hg\n",
+ "Vacuum efficiency: 96.45 %\n",
+ "Undercooling: 5.0 \u00b0C\n",
+ "Dryness fraction of steam entering: 0.5209\n",
+ "Mass of air/m**3 of condenser volume: 0.0366 kg/m**3\n",
+ "Mass of air in per kg of uncondensate steam: 0.714 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 697"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 69 #Height in mercury column in condenser(in cm):\n",
+ "T1 = 30 #Inlet temperature(in \u00b0C):\n",
+ "L = 60 #Leakage(in kg/hr):\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "n = 240 #Rpm of engine:\n",
+ "r = 1.5 #L/D ratio:\n",
+ "#From steam tables:\n",
+ "ps = 4.246 #kPa \n",
+ "vg = 32.89 #m**3/kg\n",
+ "pt = (76-h)*d*10**4*g #Absolute pressure at inlet to air pump(in kPa):\n",
+ "pa = 5.09 #Partial pressure of air(in kPa):\n",
+ "V = L*R*(273+T1)/pa #Volume of 60 kg air(in m**3/hr):\n",
+ "D = ((V*4)/(pi*r*n*60))**(1/3)*100 #Bore diameter(in cm):\n",
+ "l = D*r #Stroke length(in cm):\n",
+ "m = V/vg #Mass of water vapour extracted with air(in kg/hr):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Capacity of air pump: \",round(V,1),\"m**3/hr\"\n",
+ "print \"Bore: \",round(D,2),\"cm\"\n",
+ "print \"Stroke: \",round(l,2),\"cm\"\n",
+ "print \"Mass of water vapour extracted with air: \",round(m,2),\"kg/hr\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of air pump: 1025.1 m**3/hr\n",
+ "Bore: 39.24 cm\n",
+ "Stroke: 58.86 cm\n",
+ "Mass of water vapour extracted with air: 31.17 kg/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 698"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 70 #Height in mercury column in condenser(in cm):\n",
+ "T = 30+273 #Inlet temperature(in K):\n",
+ "m = 5*10**(-4) #Leakage(in kg/kg of steam):\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "dT = 15 #Increase in temperature of cooling water(in K):\n",
+ "x = 0.90 #Dryness fraction:\n",
+ "#From steam tables:\n",
+ "hf = 125.79 #kJ/kg\n",
+ "hfg = 2430.5 #kJ/kg\n",
+ "vg = 32.89 #m**3/kg\n",
+ "ps = 4.246 #kPa\n",
+ "\n",
+ "#Calculations:\n",
+ "pt = (77-h)*d*10**4*g #Absolute pressure in condenser(in kPa):\n",
+ "pa = 5.094 #Partial pressure of air(in kPa):\n",
+ "V = m*10**3*R*T/pa #Volume of air extracted per minute(in m**3/min):\n",
+ "ms = V/vg #Mass of steam extracted in maixture(in kg/min):\n",
+ "mt = m*10**3+ms #Mass handled by air extraction pump(in kg/min):\n",
+ "h = hf+x*hfg #Enthalpy of steam entering(in kJ/kg):\n",
+ "mw = 1000*(h-Cpw*T)/(Cpw*dT) #Water circulation rate(in kg/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Mass handled by air pump: \",round(mt,4),\"kg/min\"\n",
+ "print \"Water circulation rate: \",round(mw,2),\"kg/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass handled by air pump: 0.7595 kg/min\n",
+ "Water circulation rate: 16693.78 kg/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 699"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "h = 70 #Height in mercury column in condenser(in cm):\n",
+ "T = 30+273 #Inlet temperature(in K):\n",
+ "x = 0.85 #Dryness fraction:\n",
+ "m = 300 #Rate at which steam enters(in kg/min):\n",
+ "v = 50 #Velocity of water flow:\n",
+ "ph = 5 #Pressure head(in m):\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "ps = 4.246 #kPa \n",
+ "mw = 7415 #kg/min\n",
+ "A = 24.79 #Cooling surface area required(in m**2):\n",
+ "\n",
+ "#Calculations:\n",
+ "pt = (76-h)*d*10**4*g #Absolute pressure in condenser(in kPa):\n",
+ "pa = pt-ps #Partial pressure of air(in kPa):\n",
+ "V = mw/1000 #Volume flow of water(in m**3/min):\n",
+ "a = V/v #Flow surface area required(in m**2):\n",
+ "vh = 1/2*(v/60)**2/g #Velocity head present(in m):\n",
+ "th = ph+vh #Total head required(in m):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Flow surface area required: \",round(a,4),\"m**2\" \n",
+ "print \"Cooling surface area required: \",round(A,2),\"m**2\"\n",
+ "print \"Head required: \",round(th,4),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flow surface area required: 0.1483 m**2\n",
+ "Cooling surface area required: 24.79 m**2\n",
+ "Head required: 5.0354 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 700"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "m1 = 350 #Mass of steam entering(in kg/min):\n",
+ "v = 0.02 #Volume of water required(in m**3 per kg steam):\n",
+ "r = 0.05/100 #Amount of air mass going into condenser:\n",
+ "r1 = 5/100 #Volume of air dissolved in the water injected:\n",
+ "h = 68 #Height in mercury column in condenser(in cm):\n",
+ "T = 20+273 #Inlet temperature(in K):\n",
+ "p = 101.3 #Atmospheric pressure(in kPa):\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "n = 0.90 #Volumetric efficiency:\n",
+ "#From steam tables:\n",
+ "ps = 4.246 #kPa \n",
+ "vf = 0.001004 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "pt = (76-h)*d*10**4*g*10**(-3)#Absolute pressure in condenser(in kPa):\n",
+ "pa = pt-ps #Partial pressure of air(in kPa):\n",
+ "V1 = m1*v #Volume of cooling water required per minute(in m**3/min):\n",
+ "m2 = m1*r #Mass of air going into condenser(in kg/min):\n",
+ "V = V1*r1 #Volume of air entering per minute with cooling water(in m**3/min):\n",
+ "m = p*V/(R*T) #Mass of air with cooling water(in kg):\n",
+ "mt = m+m2 #Total mass of air inside condenser(in kg):\n",
+ "V2 = mt*R*(273+30)/pa #Volume of air corresponding:\n",
+ "V3 = m1*vf #Volume of steam condensed(in m**3/min):\n",
+ "Vt = V3+V2+V1 #Total volume(in m**3/min):\n",
+ "C = Vt/n #Actual capacity of air pump(in m**3/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Capacity of air pump: \",round(C,2),\"m**3/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of air pump: 17.14 m**3/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 701"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "H = 65 #Height in mercury column in condenser(in cm):\n",
+ "ms = 20 #Rate at which steam enters(in kg/min):\n",
+ "m = 12 #Mass of cooling water per kg of steam:\n",
+ "H1 = 66 #Height in mercury column in air pump(in cm):\n",
+ "p = 101.3 #Atmospheric pressure(in kPa):\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "ps = 7.384 #kPa\n",
+ "ps1 = 5.628 #kPa\n",
+ "hf = 167.57 #kJ/kg\n",
+ "hfg = 2406.7 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "pt = (76-H)*d*10**4*g*10**(-3) #Absolute pressure in condenser(in kPa):\n",
+ "pa = pt-ps #Partial pressure of air(in kPa):\n",
+ "mw = m*ms #Cooling water required(in kg/min):\n",
+ "h = ((ms+mw)*Cpw*40-mw*Cpw*20)/ms #Enthalpy of steam entering:\n",
+ "x = (h-hf)/hfg #Dryness fraction of steam entering:\n",
+ "pt1 = (76-H1)*d*10**4*g*10**(-3) #Absolute partial pressure at suction in air pump(in kPa): \n",
+ "pa1 = pt1-ps1 #Partial pressure of air(in kPa):\n",
+ "V = 2 #Volume of mixture(in m**3):\n",
+ "m1 = pa1*V/(R*(273+35)) #Mass of air entering(in kg/min):\n",
+ "H2 = (p-pt)/(g*d*10**3) #Head(in m):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Dryness fraction of steam entering: \",round(x,3)\n",
+ "print \"Mass of air entering: \",round(m1,4),\"kg/min\"\n",
+ "print \"Head: \",round(H2,4),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of steam entering: 0.417\n",
+ "Mass of air entering: 0.1744 kg/min\n",
+ "Head: 0.6496 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 702"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 3 #Leakage(in kg/min):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "ps = 5.628 #kPa\n",
+ "ps1 = 5.075 #kPa\n",
+ "ps2 = 5.352 #kPa\n",
+ "pt = ps #Absolute pressure in condenser(in kPa):\n",
+ "\n",
+ "#Calculations:\n",
+ "pa1 = pt-ps1 #Partial pressure of air(in kPa):\n",
+ "V1 = m*R*(273+33)/pa1 #Volume of air handled by air pump(in m**3/hr):\n",
+ "pa2 = pt-ps2 #Partial pressure of air(in kPa):\n",
+ "V2 = m*R*(273+34)/pa2 #Volume of mixture handled(in m**3/hr):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Volume of air handled: \",round(V1,2),\"m**3/hr\"\n",
+ "print \"Volume of mixture handled: \",round(V2,2),\"m**3/hr\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume of air handled: 476.43 m**3/hr\n",
+ "Volume of mixture handled: 957.71 m**3/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 703"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "H1 = 72 #Height in mercury column at inlet in condenser(in cm):\n",
+ "H2 = 73 #Height in mercury column at outlet in condenser(in cm):\n",
+ "x = 0.92 #Dryness fraction:\n",
+ "d = 0.0135951 #Density of mercury(in kg/cm**3):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "hf = 141.97 #kJ/kg\n",
+ "hfg = 2421.33 #kJ/kg\n",
+ "Tsat1 = 33.87 #\u00b0C\n",
+ "Tsat2 = 28.96 #\u00b0C\n",
+ "\n",
+ "#Calculations:\n",
+ "p1 = (76-H1)*d*10**4*g*10**(-3) #Inlet pressure in condenser(in kPa):\n",
+ "p2 = (76-H2)*d*10**4*g*10**(-3) #Outlet pressure in the condenser(in kPa):\n",
+ "u = Tsat1-Tsat2 #Undercooling(in C):\n",
+ "h = hf+x*hfg #Enthalpy of steam entering(in kJ/kg):\n",
+ "m = (h-Cpw*Tsat2)/(Cpw*13.87) #Cooling water requirement(in kg/kg steam):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Undercooling: \",round(u,2),\"\u00b0C\"\n",
+ "print \"Cooling water requirement: \",round(m,2),\"kg/kg steam\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Undercooling: 4.91 \u00b0C\n",
+ "Cooling water requirement: 38.78 kg/kg steam\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter16.ipynb b/Applied_Thermodynamics/Chapter16.ipynb
new file mode 100755
index 00000000..d678e85b
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter16.ipynb
@@ -0,0 +1,899 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:989996224965b46a7f7acf7a19fb2013a5188045b934aa862e6400be6d28d97c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16: Reciprocating and Rotary Compressor"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 742"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import log,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1*10**2 #Pressure of air entering(in kPa):\n",
+ "n = 1.2 #Index of compression:\n",
+ "p2 = 12*10**2 #Delivery pressure(in kPa):\n",
+ "N = 240 #Speed(in rpm):\n",
+ "T1 = 20+273 #Initial temperature(in K):\n",
+ "r1 = 1.8 #L/D ratio:\n",
+ "nm = 0.88 #Mechanical efficiency:\n",
+ "V1 = 1 #m**3\n",
+ "R = 0.287#Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "m = p1*V1/(R*T1) Mass of air delivered per minute:\n",
+ "T2 = T1*(p2/p1)**((n-1)/n)#Temperature at the end of compression(in K)\n",
+ "W = (n/(n-1))*m*R*(T2-T1)#Work required during compression process(in kJ/min):\n",
+ "Whp = W/60/0.7457 #Work required during compression process(hp): \n",
+ "C = Whp/nm#Capacity of drive required to run compressor(in hp):\n",
+ "Wiso = m*R*T1*log(p2/p1) #Isothermal work required for same compression(in kJ/min):\n",
+ "niso = Wiso/W*100#Isothermal efficiency:\n",
+ "v = 1/N#Volume of aur entering per cycle:\n",
+ "D = (v*4/(pi*r1))**(1/3)*100#Bore diameter(in cm):\n",
+ "L = r1*D#Stroke length(in cm):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Isothermal efficiency: \",round(niso,2),\"%\"\n",
+ "print \"Cylinder dimension, D: \",round(D,2),\"cm\"\n",
+ "print \" L: \",round(L,3),\"cm\"\n",
+ "print \"Rating of drive: \",round(C,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Isothermal efficiency: 80.72 %\n",
+ "Cylinder dimension, D: 14.34 cm\n",
+ " L: 25.808 cm\n",
+ "Rating of drive: 7.82 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 745"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi,log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r = 7 #Compression ratio:\n",
+ "r1 = 1.2 #L/D ratio:\n",
+ "N = 240 #Speed(in rpm):\n",
+ "p1 = 0.97 #Pressure(in bar):\n",
+ "T1 = 35+273 #Temperature(in K):\n",
+ "V = 20 #Volume(in m**3):\n",
+ "V3 = 0.05\n",
+ "V1 = 1.05\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "n = 1.25 #Index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "p2 = r*p1\n",
+ "m = 10**2*V/(R*300) #Mass of air delivered(in kg/min):\n",
+ "T2 = T1*r**((n-1)/n) #Temperature at state 2(in K):\n",
+ "V4 = V3*r**(1/n) #Volume at state 4(in m**3):\n",
+ "nv = p1*300/T1*(V1-V4)*100 #Volumetric efficiency:\n",
+ "Vs = V/(4*N) #Swept volume(in m**3/cycle):\n",
+ "D = (Vs*4/(pi*r1))**(1/3) #Bore(in m):\n",
+ "L = r1*D #Stroke(in m):\n",
+ "W = n/(n-1)*m*R*(T2-T1)/(60*0.7457) #Work required in reciprocating compressor(in hp):\n",
+ "Wiso = m*R*T1*log(r)/(60*0.7457) #Work done in isothermal process(in hp):\n",
+ "ni = Wiso/W*100 #Isothermal efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Volumetric efficiency: \",round(nv,2),\"%\"\n",
+ "print \"Bore: \",round(D*100,2),\"cm\"\n",
+ "print \"Stroke: \",round(L*100,2),\"cm\"\n",
+ "print \"Isothermal efficiency: \",round(ni,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric efficiency: 76.8 %\n",
+ "Bore: 28.06 cm\n",
+ "Stroke: 33.68 cm\n",
+ "Isothermal efficiency: 81.8 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 749"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p = 10**2 #Atmospheric pressure(in kPa):\n",
+ "p1 = 1\n",
+ "p3 = 8\n",
+ "Ta = 300 #Temperature(in K):\n",
+ "Va = 4\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "n = 1.2 #Index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "T1 = Ta\n",
+ "T2a = 273+30\n",
+ "V1 = Va\n",
+ "m = p*Va/(R*Ta) #Mass of air compressed(in kg/min):\n",
+ "Wi = n/(n-1)*p1*10**2*Va*((p3/p1)**((n-1)/n)-1)/(60*0.7457)#Work input(in hp):\n",
+ "p2 = sqrt(p1*p3) #Optimum intercooling pressure(in bar):\n",
+ "Wii = 2*n/(n-1)*p1*10**2*Va*((p3/p1)**((n-1)/(2*n))-1)/(60*0.7457)#Work input for 2nd stage compression(in hp):\n",
+ "Wii = 20.29\n",
+ "V2a = p1*V1/T1*T2a/p2 #Volume of air inlet of HP cylinder(in m**3/min):\n",
+ "W2 = n/(n-1)*p1*10**2*V1*((p2/p1)**((n-1)/n)-1)/(60*0.7457)+n/(n-1)*p2*10**2*V2a*((p3/p2)**((n-1)/n)-1)/(60*0.7457)\t\t\t\t#Work required(in hp):\n",
+ "W2 = 20.42\n",
+ "ps = (Wi-Wii)/Wi*100 #Percentage saving in work:\n",
+ "pe = (W2-Wii)/W2*100 #% excess work to be done:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Percentage saving in work: \",round(ps,2),\"%\"\n",
+ "print \"Percentage excess work to be done: \",round(pe,3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage saving in work: 8.68 %\n",
+ "Percentage excess work to be done: 0.637 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 750"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 2 #Rate at which air is delivered(in m**3/min):\n",
+ "p1 = 1 #Initial pressure(in bar):\n",
+ "T1 = 300 #K\n",
+ "p = 150 #bar\n",
+ "n = 1.25 #Polytropic index of compression:\n",
+ "p2 = 3.5\n",
+ "p3 = 12.25\n",
+ "p4 = 42.87\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T = T1*(p2/p1)**((n-1)/n) #Temperature at the end of fourth stage(in K):\n",
+ "m = p*10**2*2/(R*T) #Mass of air(in kg):\n",
+ "W = n/(n-1)*m*R*T1*((p2/p1)**((n-1)/n)-1)*4/(60*0.7457) #Work required(in kW):\n",
+ "\n",
+ "print \"Intermediate pressure: \",round(p2,2),\"bar\",round(p3,2),\"bar\",round(p4,2),\"bar respectively\"\n",
+ "print \"Work input: \",round(W,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intermediate pressure: 3.5 bar 12.25 bar 42.87 bar respectively\n",
+ "Work input: 2972.1 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 751"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p2 = 4\n",
+ "p3 = 16\n",
+ "n = 1.3 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "T1 = 17+273 #Temperature(in K):\n",
+ "nv = 0.90 #Volumetric efficiency:\n",
+ "Dhp = 0.06 #Bore diameters(in m):\n",
+ "Dlp = 0.12\n",
+ "\n",
+ "#Calculations:\n",
+ "W = n/(n-1)*R*T1*((p2/p1)**((n-1)/n)+(p3/p2)**((n-1)/n)-2) #Work required(in kJ/kg):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Work: \",round(W,2),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work: 271.95 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 752"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt,log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "N = 200 #Speed(in rpm):\n",
+ "m = 4 #Mass flow rate(in kg/min):\n",
+ "p1 = 1 #Pressure(in bar):\n",
+ "p6 = 25\n",
+ "T1 = 17+273 #Temperatures(in K):\n",
+ "Clp = 0.04 #Clearance volumes:\n",
+ "Chp = 0.05\n",
+ "n = 1.25 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T5 = T1\n",
+ "r = sqrt(p6/p1) #Pressure ratio:\n",
+ "T2 = T1*r**((n-1)/n) #Temperature at state 2(in K):\n",
+ "T6 = T5*r**((n-1)/n) #Temperature at state 6(in K):\n",
+ "W = 2*n/(n-1)*m*R*T1*(r**((n-1)/n)-1) #Actual compression work requirement(in kJ/min):\n",
+ "Wi = m*R*T1*log(p6/p1) #Work required if process is isothermal(in kJ/min):\n",
+ "ni = Wi/W #Isothermal efficiency:\n",
+ "Vf = m*R*T1/(p1*10**2)#Free air delivered(in m**3/min):\n",
+ "Q = W/2-m*Cp*(T2-T1) #Heat transferred in HP & LP cylinder(in kJ/min):\n",
+ "nvhp = 1+Chp-Chp*r**(1/n) #Volumetric efficiency of HP cylinder:\n",
+ "nvlp = 1+Clp-Clp*r**(1/n) #Volumetric efficiency of LP cylinder:\n",
+ "Vshp = Vf/(r*N*nvhp) #Stroke volume of HP cylinder(in m**3):\n",
+ "Vchp = Chp*Vshp #Clearance volume Of HP cylinder(in m**3):\n",
+ "Vthp = Vshp+Vchp #Total HP cylinder volume(in m**3):\n",
+ "Vslp = Vf/(N*nvlp) #Stroke volume of LP cylinder(in m**3):\n",
+ "Vclp = Clp*Vslp #Clearance volume of LP cylinder(in m**3):\n",
+ "Vtlp = Vslp+Vclp #Total LP cylinder volume(in m**3):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Power required: \",round(W/(60*0.7457),2),\"hp\"\n",
+ "print \"Isothermal efficiency: \",round(ni*100,2),\"%\"\n",
+ "print \"Free air delivered: \",round(Vf,2),\"m^3/min\"\n",
+ "print \"Heat transferred in HP & LP cylinder: \",round(Q,2),\"kJ/min\"\n",
+ "print \"HP cylinder volume: \",round(Vthp*10**3,3),\" x 10^-3 m^3\"\n",
+ "print \"LP cylinder volume: \",round(Vtlp,6),\"m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required: 28.26 hp\n",
+ "Isothermal efficiency: 84.77 %\n",
+ "Free air delivered: 3.33 m^3/min\n",
+ "Heat transferred in HP & LP cylinder: 190.2 kJ/min\n",
+ "HP cylinder volume: 4.024 x 10^-3 m^3\n",
+ "LP cylinder volume: 0.019342 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 755"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "N = 200 #Speed(in rpm):\n",
+ "n = 1.2 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n",
+ "D = 0.30 #Bore(in m):\n",
+ "L = 0.40 #Stroke(in m):\n",
+ "C = 0.05 #Clearance volume:\n",
+ "p1 = 1 #Pressure(in bar):\n",
+ "p5 = 2.9\n",
+ "p6 = 9\n",
+ "T1 = 25+273 #Temperatures(in K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T5 = T1\n",
+ "p2 = sqrt(p6/p1) #Optimum intercooling pressure(in bar):\n",
+ "Vlp = pi*D**2/4*L*N*2 #Volume of LP cylinder(in m**3/min):\n",
+ "nvlp = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency:\n",
+ "V1 = Vlp*nvlp #Volume of air inhaled in LP stage(in m**3/min):\n",
+ "m = p1*10**2*V1/(R*T1) #Mass of air per minute(in kg/min):\n",
+ "T2 = T1*(p2/p1)**((n-1)/n) #Temperature after compression(in K):\n",
+ "V5 = m*R*T5/(p5*10**2) #Volume of air going into HP cylinder(in m**3/min):\n",
+ "nvhp = nvlp\n",
+ "Vhp = V5/nvhp #Volume of HP cylinder(in m**3/min):\n",
+ "Dhp = sqrt(Vhp*4/(pi*L*2*N)) #Diameter of bore(in m):\n",
+ "Q = m*Cp*(T2-T5) #Heat rejected in intercooler(in kJ/min):\n",
+ "T6 = T5*(p6/p5)**((n-1)/n) #Temperature at state 6(in K):\n",
+ "Whp = n/(n-1)*m*R*(T6-T5)/(60*0.7457)#Work input required for HP stage(in kJ/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat rejected in intercooler: \",round(Q,2),\"kJ/min\"\n",
+ "print \"Bore of HP cylinder: \",round(Dhp*100,2),\"cm\"\n",
+ "print \"Horse power required to drive HP stage: \",round(Whp,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat rejected in intercooler: 734.86 kJ/min\n",
+ "Bore of HP cylinder: 17.62 cm\n",
+ "Horse power required to drive HP stage: 29.15 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 757"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi, sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 75.6 #Barometer reading(in cm):\n",
+ "d = 0.013591 #Density of mercury(in kg/cm**3):\n",
+ "d1 = 15*10**(-3) #Diameter of orifice(in m):\n",
+ "r1 = 0.65 #Coefficient of discharge:\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "T = 25+273 #Atmospheric temperature(in K):\n",
+ "h1 = 13 #Manometer reading(in cm):\n",
+ "R = 0.287\n",
+ "\n",
+ "#Calculations:\n",
+ "A = pi*d1**2/4 #Cross-sectional area of orifice(in m**2):\n",
+ "p = h*d*g*10 #Atmospheric pressure(in kPa):\n",
+ "v = (R*T)/p #Specific volume at atmospheric conditions(in m**3/kg):\n",
+ "da = 1/v #Density of air(in kg/m**3):\n",
+ "pd = h1*d*g*10 #Pressure difference across orifice(in kPa):\n",
+ "ha = pd*10**3/(da*g) #Height of air column(in m):\n",
+ "f = r1*A*sqrt(2*g*ha)*60 #Free air delivery(in m**3/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Free air delivery: \",round(f,3),\"m**3/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Free air delivery: 1.182 m**3/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 757"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi\n",
+ "#Variable Declaration: \n",
+ "D = 0.10 #Bore(in m):\n",
+ "L = 0.08 #Stroke(in m):\n",
+ "N = 500 #Speed(in rpm):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "T = 27+273 #Atmospheric temperature(in K):\n",
+ "r = 0.30 #Radius of arm of spring balance(in m):\n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "f = 15/60 #Free air delivery(in m**3/min):\n",
+ "\n",
+ "#Calculations:\n",
+ "V = pi*D**2*L/4 #Volume of cylinder(in m**3):\n",
+ "nv = f/(V*N)*100 #Volumetric efficiency:\n",
+ "W = 2*pi*N*100*g*r*10**(-3)/(60*0.7457) #Shaft output(in hp):\n",
+ "W1 = W/f #Shaft output per m**3 of free air per min:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Volumetric efficiency: \",round(nv,2),\"%\"\n",
+ "print \"Shaft output per m**3 of free air: \",round(W1,2),\"hp per m**3 of free air per minute\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric efficiency: 79.58 %\n",
+ "Shaft output per m**3 of free air: 82.66 hp per m**3 of free air per minute\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 758"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p2 = 180 #Pressures(in bar):\n",
+ "p1 = 1\n",
+ "T1 = 300 #Temperatures(in K):\n",
+ "T2 = 273+150\n",
+ "n = 1.25 #Index of polytropic compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "i = (n-1)/n*log(p2/p1)/log(T2/T1) #Number of stages:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Number of stages: \",round(i) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of stages: 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p10 = 20\n",
+ "T1 = 300 #Temperatures(in K):\n",
+ "C = 0.04 #Clearance:\n",
+ "D = 0.30 #Bore(in m):\n",
+ "L = 0.20 #Stroke(in m):\n",
+ "n = 1.25 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T5 = T1\n",
+ "T9 = T1\n",
+ "p2 = p1*(20)**(1/3) #Pressure at stage 2(in bar):\n",
+ "p6 = p10/(20**(1/3))\n",
+ "nvlp = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency of LP stage:\n",
+ "Vs = pi*D**2/4*L #LP swept volume(in m**3):\n",
+ "Vsa = nvlp*Vs #Effective swept volume(in m**3):\n",
+ "T10 = T9*(p10/p6)**((n-1)/n) #Temperature of air delivered(in K):\n",
+ "Vd = p1/p10*Vsa*T10/T1 #Volume of air delivered(in m**3):\n",
+ "W = 3*(n/(n-1))*R*T1*((p2/p1)**((n-1)/n)-1) #Total work done(in kJ/kg of air):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Intermediate pressure: \",round(p2,3),\"bar\",round(p6,3),\"bar\"\n",
+ "print \"Effective swept volume of LP cylinder: \",round(Vsa,5),\"m**3\"\n",
+ "print \"Temperature of air delivered: \",round(T10,2),\"K\"\n",
+ "print \"Volume of air delivered: \",round(Vd*10**4,4),\" x 10^-4 m**3\"\n",
+ "print \"Work done: \",round(W,2),\"kJ/kg of air\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intermediate pressure: 2.714 bar 7.368 bar\n",
+ "Effective swept volume of LP cylinder: 0.01345 m**3\n",
+ "Temperature of air delivered: 366.32 K\n",
+ "Volume of air delivered: 8.2089 x 10^-4 m**3\n",
+ "Work done: 285.49 kJ/kg of air\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 760"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p2 = 6\n",
+ "p6 = 30\n",
+ "T6 = 273+150 #Temperatures(in K):\n",
+ "T5 = 273+35\n",
+ "T1 = 300\n",
+ "Clp = 0.05 #Clearance volumes:\n",
+ "Chp = 0.07\n",
+ "m = 2 #Mass flow rate(in kg/s):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n",
+ "Cv = 0.72\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "p5 = p2\n",
+ "n = 1/(1-log(T6/T5)/log(p6/p5)) #Index of compression:\n",
+ "nvlp = 1+Clp-Clp*(p2/p1)**(1/n) #Volumetric efficiency of LP cylinder:\n",
+ "nvhp = 1+Chp-Chp*(p6/p5)**(1/n) #Volumetric efficiency of HP cylinder:\n",
+ "Vslp = m*R*T1*60/(p1*10**2*nvlp) #Swept volume of LP cylinder(in m**3/min):\n",
+ "Vshp = m*R*T5*60/(p2*10**2*nvhp) #Swept volume of HP cylinder(in m**3/min):\n",
+ "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n",
+ "Q = m*Cp*(T2-T5)#Cooling required in intercooler(in kW):\n",
+ "W = n/(n-1)*m*R*((T1*((p2/p1)**((n-1)/n)-1))+(T5*((p6/p5)**((n-1)/n)-1)))#Work input required(in kW):\n",
+ "Qlp = m*(r-n)/(n-1)*Cv*(T2-T1)#Heat transferred in LP cylinder(in kW):\n",
+ "Qhp = m*(r-n)/(n-1)*Cv*(T6-T5) #Heat transferred in HP cylinder(in kW):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Swept volume of LP cylinder: \",round(Vslp,2),\"m**3/min\"\n",
+ "print \"Swept volume of HP cylinder: \",round(Vshp,2),\"m**3/min\"\n",
+ "print \"Heat picked up in the intercooler: \",round(Q,2),\"kW\"\n",
+ "print \"Total work required: \",round(W,2),\"kW\"\n",
+ "print \"Amount of cooling required in LP cylinder: \",round(Qlp,2),\"kW\"\n",
+ "print \"Amount of cooling required in HP cylinder: \",round(Qhp,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Swept volume of LP cylinder: 123.11 m**3/min\n",
+ "Swept volume of HP cylinder: 21.69 m**3/min\n",
+ "Heat picked up in the intercooler: 238.94 kW\n",
+ "Total work required: 704.91 kW\n",
+ "Amount of cooling required in LP cylinder: 115.13 kW\n",
+ "Amount of cooling required in HP cylinder: 104.18 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 763"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "p2 = 2 #Pressures(in bar):\n",
+ "p1 = 1\n",
+ "V1 = 0.5 #Volume(in m**3):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "Wr = (p2-p1)*10**2*V1 #IP required(in kW):\n",
+ "Wi = r/(r-1)*p1*10**2*V1*((p2/p1)**((r-1)/r)-1)#IP when isentropic compression occurs(in kW):\n",
+ "ni = Wi/Wr*100 #Isentropic efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power of roots blower: \",round(Wr/0.7457,2),\"hp\"\n",
+ "print \"Isentropic efficiency: \",round(ni,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power of roots blower: 67.05 hp\n",
+ "Isentropic efficiency: 76.65 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V1 = 0.6 #Volume flow rate(in m**3/kg):\n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p2a = 2.3\n",
+ "r = 1.4\n",
+ "r1 = 0.7#Ratio of V1/V2:\n",
+ "\n",
+ "#Calculations: \n",
+ "p2 = p1*(1/r1)**r #Pressure at state 2(in bar):\n",
+ "Wv = (r/(r-1)*p1*10**2*V1*((p2/p1)**((r-1)/r)-1)+(p2a-p2)*10**2*V1*r1)/0.7457#IP required for vaned compressor(in hp):\n",
+ "Wi = (r/(r-1)*p1*10**2*V1*((p2a/p1)**((r-1)/r)-1))/0.7457 #Power requirement when compression occurs isentropically(in hp):\n",
+ "ni = Wi/Wv*100 #Isentropic efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power required: \",round(Wv,3),\"hp\"\n",
+ "print \"Isentropic efficiency: \",round(ni,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power required: 79.928 hp\n",
+ "Isentropic efficiency: 94.66 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 765"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T0 = 300 #Temperature(in K):\n",
+ "V1 = 50 #Velocity(in m/s):\n",
+ "m = 18 #Mass flow rate(in kg/min):\n",
+ "Cp = 1.0032 #Specifc heat(in kJ/kg.K):\n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "ni = 0.75 #Isentropic efficiency:\n",
+ "r1 = 4 #Pressure ratio:\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "T1 = T0+V1**2/(2*Cp*10**3) #Stagnation temperature(in K):\n",
+ "T2a = T1*r1**((r-1)/r)\n",
+ "T2 = (T2a-T1)/ni+T1\n",
+ "BP = m*Cp*(T2-T1)/(60*nm*0.7457) #Brake power required(in hp):\n",
+ " \n",
+ "#Results: \n",
+ "print \"Total head temperature at exit: \",round(T2,2),\"K\"\n",
+ "print \"Brake power required: \",round(BP,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total head temperature at exit: 496.45 K\n",
+ "Brake power required: 87.54 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 766"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V = 0.015 #Piston printlacement per revolution(in m**3/rev):\n",
+ "N = 500 #Speed(in rpm):\n",
+ "C = 0.05 #Clearance:\n",
+ "p2 = 6 #Pressures(in bar):\n",
+ "n = 1.3 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "T1 = 20+273 #Temperature(in K):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "Cv = 0.718 #Value of Cv(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "p1 = 1\n",
+ "nv = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency:\n",
+ "Vs = V*2*N #Swept volume(in m**3/min):\n",
+ "V1 = Vs*0.85 #Actual air inhaled(in m**3/min):\n",
+ "m = p1*10**2*V1/(R*T1) #Mass of air entering(in kg/min):\n",
+ "P = n/(n-1)*p1*10**2*V1*((p2/p1)**((n-1)/n)-1)#Power required(in kJ/min):\n",
+ "T2 = 298*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n",
+ "Q = m*Cv*(r-n)/(n-1)*(T2-T1) #Heat transferred during compression(in kJ/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Volumetric efficiency: \",round(nv*100,2),\"%\"\n",
+ "print \"Power required: \",round(P,2),\"kJ/min\"\n",
+ "print \"Heat rejected during compression: \",round(Q,2),\"kJ/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric efficiency: 85.16 %\n",
+ "Power required: 2829.21 kJ/min\n",
+ "Heat rejected during compression: 571.89 kJ/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter17.ipynb b/Applied_Thermodynamics/Chapter17.ipynb
new file mode 100755
index 00000000..897d24a0
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter17.ipynb
@@ -0,0 +1,591 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1c2e3038adc30a476d490492d6ffb75ea411a368f94f9012a25719b295c63337"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17: Introduction to Internal Combustion Engines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 790"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r1 = 1.2 #L/D ratio:\n",
+ "D = 0.12 #Cylinder diameter(in m):\n",
+ "A = 30*10**(-4) #Area of indicated diagram(in m**2):\n",
+ "k = 20*10**3 #Spring constant(in kN/m**2):\n",
+ "N = 2000 #Rpm of engine:\n",
+ "r = 0.10 #Percentage power lost:\n",
+ "\n",
+ "#Calculations:\n",
+ "L = r1*D #Stroke length(in m):\n",
+ "l = L/2 #Length of indicator diagram(in m):\n",
+ "mep = A*k*10**3/l #Mep(in N/m**2):\n",
+ "A2 = pi*D**2/4 #Cross-sectional area of piston(in m**2):\n",
+ "IP = 4*mep*A2*L*N/(2*60) #Total indicated power for 4 cylinders(in W):\n",
+ "FP = r*IP #Fricitional loss(in W):\n",
+ "BP = IP-FP #Brake power available(in W):\n",
+ "nm = BP/IP*100 #Mechanical efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power: \",round(IP,1),\"W\"\n",
+ "print \"Mechanical efficiency: \",round(nm,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 90477.9 W\n",
+ "Mechanical efficiency: 90.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 791"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "A = 40*10**(-4) #Indicator diagram area & length(in m**2 & m):\n",
+ "l = 0.08\n",
+ "D = 0.15 #Bore(in m):\n",
+ "L = 0.20 #Stroke(in m):\n",
+ "N = 100 #Rpm of motor:\n",
+ "\n",
+ "#Calculations:\n",
+ "k = 1.5*10**8 #Spring constant(in Pa/m):\n",
+ "mep = A*k/l #Mep(in Pa):\n",
+ "IP = (pi*D**2/4*L*mep*N/60*2)/10**3 #Indicated power(in kW):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Power required to drive: \",round(IP,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required to drive: 88.36 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 791"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "BP = 38 #Rating(in kW):\n",
+ "\n",
+ "#Calculations:\n",
+ "IP = BP/nm #Indicated power(in kW):\n",
+ "FP = IP-BP #Fricitional loss(in kW):\n",
+ "BP1 = 0.25*BP #Brake power at quater load(in kW):\n",
+ "nm1 = BP1/(BP1+FP)*100 #Mechanical efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power: \",round(IP,2),\"W\"\n",
+ "print \"Fricitonal power loss: \",round(FP,2),\"kw\"\n",
+ "print \"Mechanical efficiency: \",round(nm1,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 42.22 W\n",
+ "Fricitonal power loss: 4.22 kw\n",
+ "Mechanical efficiency: 69.23 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m1 = 0.25 #Specific fuel consumption(in kg/kW.h):\n",
+ "pbmep = 1.5*10**3 #Brake mean effective pressure(in kPa):\n",
+ "N = 100 #Speed of engine(in rpm):\n",
+ "D = 0.85 #Bore of cylinder(in m):\n",
+ "L = 2.20 #Stroke(in m):\n",
+ "C = 43*10**3 #Calorific value of diesel(in kJ/kg):\n",
+ "BP = pbmep*L*(pi*D**2/4)*N/60 #Brake power of engine(in kW):\n",
+ "m = m1*BP #Fuel consumption(in kg/hr):\n",
+ "q = m*C/3600 #Heat from fuel(in kJ/s):\n",
+ "nb = BP/q*100 #Brake thermal efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake power: \",round(BP/100,2),\"MW\"\n",
+ "print \"Fuel consumption rate: \",round(m,2),\"kg/hr\"\n",
+ "print \"Brake thermal efficiency: \",round(nb,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake power: 31.21 MW\n",
+ "Fuel consumption rate: 780.24 kg/hr\n",
+ "Brake thermal efficiency: 33.49 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "pb = 6*10**2 #Effective pressure(in kPa):\n",
+ "N = 600 #Speed:\n",
+ "m1 = 0.25 #Specific fuel consumption(in kg/kW.h)\n",
+ "D = 0.20 #BOre(in m):\n",
+ "L = 0.30 #Stroke length(in m):\n",
+ "r = 26 #Air fuel ratio:\n",
+ "C = 43*10**3 #Calorific value(in kJ/kg):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "p = 1*10**2 #kPa #Ambient conditions:\n",
+ "T = 300 #K\n",
+ "\n",
+ "#Calculation:\n",
+ "nb = 3600/(m1*C)*100 #Brake thermal efficiency:\n",
+ "BP = 4*pb*L*(pi*D**2/4)*N/60 #Brake power(in kW):\n",
+ "ma = m1*BP*r/60 #Air consumption rate(in kg/min):\n",
+ "Va = ma*R*T/p #Volume(in m**3/min):\n",
+ "Vs = pi*(0.3)**2*0.4/4 #Swept volume(in m**3):\n",
+ "nv = Va/(Vs*N/2*4)*100 #Volumetric efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake thermal efficiency: \",round(nb,2),\"%\"\n",
+ "print \"Brake power: \",round(BP,2),\"kW\"\n",
+ "print \"Volumetric efficiency: \",round(nv,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake thermal efficiency: 33.49 %\n",
+ "Brake power: 226.19 kW\n",
+ "Volumetric efficiency: 62.18 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 793"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "n = 0.7 #Volumetric efficiency\n",
+ "r = 19 #Air fuel ratio:\n",
+ "N = 3000 #Speed(in rpm):\n",
+ "m = 5 #Fuel consumption rate(in litres/hr):\n",
+ "sg = 0.7 #Specific gravity:\n",
+ "s = 500 #Piston speed(in m/min):\n",
+ "p = 6*10**2 #Mep(in kPa):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "nm = 0.8 #Mechanical efficiency:\n",
+ "\n",
+ "#Calculations:\n",
+ "L = s/(2*N) #Stroke length(in m):\n",
+ "ma = r*m*sg/60 #Air requirement(in kg/min):\n",
+ "Va = ma*R*288/(1.013*10**2) #Volume of air sucked(in m**3/min):\n",
+ "D = sqrt(Va*4/(pi*L*N*2*n)) #Bore diameter(in m):\n",
+ "IP = p*L*(pi*D**2/4*N*2)/60 #Indicated power(in kW):\n",
+ "BP = IP*nm #Brake power(in kW):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake power: \",round(BP,2),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake power: 10.34 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 794"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "FP = 5 #Friction power(in kW):\n",
+ "N = 3000 #Rpm:\n",
+ "D = 0.20 #Bore(in m):\n",
+ "L = 0.30 #Stroke(in m):\n",
+ "m = 0.15 #Fuel supplied at rate(in kg/min):\n",
+ "F = 20 #Load(in kg):\n",
+ "r = 0.5 #Radius(in m):\n",
+ "C = 43000 #Calorific value of fuel(in kJ/kg):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculations:\n",
+ "BP = 2*pi*N*(F*g*r*10**(-3))/60 #Brake power(in kW):\n",
+ "IP = BP+FP #Indicated power(in kW):\n",
+ "nm = BP/IP #Mechanical efficiency:\n",
+ "BSFC = m*60/BP #BSFC(in kg/kW.hr):\n",
+ "nbth = 3600/(BSFC*C)*100 #Brake thermal efficiency:\n",
+ "nith = nbth/nm #Indicated thermal efficiency:\n",
+ "Pimep = IP/(L*(pi*D**2/4)*N/60) #Indicated mep(in kPa):\n",
+ "Pbmep = Pimep*nm #Brake mep(in kPa):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake power: \",round(BP,2),\"KW\"\n",
+ "print \"Indicated power: \",round(IP,2),\"KW\"\n",
+ "print \"Mechanical efficiency: \",round(nm*100,2),\"%\"\n",
+ "print \"Brake thermal efficiency: \",round(nbth,2),\"%\"\n",
+ "print \"Indicated thermal efficiency: \",round(nith,2),\"%\"\n",
+ "print \"Brake mean effective pressure: \",round(Pbmep,2),\"kPa\"\n",
+ "print \"Indicated mean effective pressure: \",round(Pimep,2),\"kPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake power: 30.82 KW\n",
+ "Indicated power: 35.82 KW\n",
+ "Mechanical efficiency: 86.04 %\n",
+ "Brake thermal efficiency: 28.67 %\n",
+ "Indicated thermal efficiency: 33.32 %\n",
+ "Brake mean effective pressure: 65.4 kPa\n",
+ "Indicated mean effective pressure: 76.01 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 795"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "N = 300 #Speed(in rpm):\n",
+ "BP = 250 #Brake power(in kW):\n",
+ "D = 0.30 #Bore diameter(in m):\n",
+ "L = 0.25 #Stroke length(in m):\n",
+ "m = 1 #Fuel consumption rate(in kg/min):\n",
+ "r = 10 #Air fuel ratio:\n",
+ "C = 43000 #Calorific value of fuel(in kJ/kg):\n",
+ "\n",
+ "#Calculations:\n",
+ "Pimep = 0.8*10**3 #Indicated mep(in kPa):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "IP = Pimep*L*(pi*D**2/4)*N*4/60\t#Indicated power(in kW):\n",
+ "nm = BP/IP #Mechanical efficiency:\n",
+ "BSFC = m*60/BP #BSFC(in kg/kW.hr):\n",
+ "nbth = 3600/(BSFC*C)*100 #Brake thermal efficiency:\n",
+ "Vs = pi*D**2*L/4 #Swept volume(in m**3):\n",
+ "ma = round(1.013*10**2*Vs/(R*300),2)#Mass of air(in kg):\n",
+ "nv = m*r/(ma*4*N/2)*100\t#Volumetric efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Mechanical efficiency: \",round(nm*100,2),\"%\"\n",
+ "print \"Brake thermal efficiency: \",round(nbth,2),\"%\"\n",
+ "print \"Volumetric efficiency: \",round(nv,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 282.74 kW\n",
+ "Mechanical efficiency: 88.42 %\n",
+ "Brake thermal efficiency: 34.88 %\n",
+ "Volumetric efficiency: 83.33 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 796"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "k = 25 #Indicator constant(in kN/m**2):\n",
+ "N = 300 #Rpm:\n",
+ "Vs = 1.5*10**(-2) #Swept volume(in m**3):\n",
+ "F = 60 #Load(in kg):\n",
+ "r = 0.5 #Radius(in m):\n",
+ "C = 43000 #Calorific value of fuel(in kJ/kg):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "m = 0.12 #Fuel supplied at rate(in kg/min):\n",
+ "Pimep = 10*k #Indicatedmep(in kPa):\n",
+ "IP = Pimep*Vs*N/(2*60) #Indicated power(in kW):\n",
+ "BP = 2*pi*N/(2*60)*(F*g*r)*10**(-3)\t#Brake power(in kW):\n",
+ "nm = BP/IP #Mechanical efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Brake power: \",round(BP,2),\"W\"\n",
+ "print \"Mechanical efficiency: \",round(nm*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 9.38 kW\n",
+ "Brake power: 4.62 W\n",
+ "Mechanical efficiency: 49.31 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 796"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "k = 25 #Indicator constant(in kN/m**2):\n",
+ "N = 300 #Rpm:\n",
+ "Vs = 1.5*10**(-2) #Swept volume(in m**3):\n",
+ "F = 60 #Load(in kg):\n",
+ "r = 0.5 #Radius(in m):\n",
+ "C = 43000 #Calorific value of fuel(in kJ/kg):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "m = 0.12 #Fuel supplied at rate(in kg/min):\n",
+ "Pimep = 10*k #Indicatedmep(in kPa):\n",
+ "IP = Pimep*Vs*N/(2*60) #Indicated power(in kW):\n",
+ "BP = 2*pi*N/(2*60)*(F*g*r)*10**(-3)\t#Brake power(in kW):\n",
+ "nm = BP/IP #Mechanical efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Brake power: \",round(BP,2),\"W\"\n",
+ "print \"Mechanical efficiency: \",round(nm*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 9.38 kW\n",
+ "Brake power: 4.62 W\n",
+ "Mechanical efficiency: 49.31 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 797"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "N = 1500 #Speed of engine(in rpm):\n",
+ "T = 300 #Brake torque(in Nm):\n",
+ "m = 4 #Fuel consumed(in kg):\n",
+ "m1 = 15 #Cooling water circulated(in kg/min):\n",
+ "C = 42000 #Calorific value of fuel(in kJ/kg):\n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "\n",
+ "#Calculations:\n",
+ "BP = 2*pi*N*T/(60*10**3) #Brake power(in kW):\n",
+ "BSFC = m*60/(m1*BP) #BSFC(in kg/kW.hr):\n",
+ "IP = BP/nm #Indicated power(in kW):\n",
+ "nith = IP/(m*C/(m1*60))*100#Indicated thermal efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake power: \",round(BP,2),\"W\"\n",
+ "print \"Brake specific fuel consumption: \",round(BSFC,2),\"kg/kW.hr\"\n",
+ "print \"Indicated thermal efficiency: \",round(nith,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake power: 47.12 W\n",
+ "Brake specific fuel consumption: 0.34 kg/kW.hr\n",
+ "Indicated thermal efficiency: 28.05 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter18.ipynb b/Applied_Thermodynamics/Chapter18.ipynb
new file mode 100755
index 00000000..a243ce8d
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter18.ipynb
@@ -0,0 +1,830 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:59b1fc8c8d34f6daf41da52caf7a93f8b68598a246de207d874cbeb5751e9b6d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18: Introduction to Refrigeration and Airconditioning"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 838"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Q1 = 500 #Heat extracted by carnot cycle(in kJ/min):\n",
+ "T1 = -16+273 #Temperature of refrigerated space(in K):\n",
+ "T2 = 27+273 #Atmospheric temperature(in K):\n",
+ "\n",
+ "#Calculations:\n",
+ "Q2 = Q1*(T2/T1) #Heat rejected(in kJ/min):\n",
+ "W = Q2-Q1 #Work input required(in kJ/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Work input: \",round(W,2),\"kJ/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work input: 83.66 kJ/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 838"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = -5+273 #Operating temperature(in K):\n",
+ "T2 = 27+273\n",
+ "Cpw = 4.18 #Specific heats(in kJ/kg.K):\n",
+ "L = 335 #Latent heat(in kJ/kg):\n",
+ "C = 800 #Capacity(in tons):\n",
+ "\n",
+ "#Calculations:\n",
+ "q = C*3.5 #Heat extraction rate(in kJ/s):\n",
+ "q1 = Cpw*(27-0)+L #Heat to be removed per kg of water(in kJ/kg):\n",
+ "m = q/q1 #Ice formation rate(in kg/s):\n",
+ "COP = (T1/(T2-T1)) #COP:\n",
+ "W = q/COP/0.7457 #Work done(in hp):\n",
+ "\n",
+ "\n",
+ "print \"Mass rate of ice formation: \",round(m,2),\"kg/s\"\n",
+ "print \"HP required: \",round(W,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass rate of ice formation: 6.25 kg/s\n",
+ "HP required: 448.34 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 839"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "W = 3 #Work done(in hp):\n",
+ "T1 = -27+273 #Temperature to be maintained(in K):\n",
+ "\n",
+ "#Calculations:\n",
+ "COP = 1*3.5/(W*0.7457)#COP:\n",
+ "T2 = T1+T1/COP #Temperature of surroundings(in K):\n",
+ "\n",
+ "#Results: \n",
+ "print \"COP: \",round(COP,2)\n",
+ "print \"Temperature of surroundings: \",round(T2,2),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP: 1.56\n",
+ "Temperature of surroundings: 403.24 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 839"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r1 = 8 #Pressure ratio:\n",
+ "T1 = -33+273 #Operating temperatures(in K)\n",
+ "T3 = 27+273\n",
+ "nic = 0.85 #Isentropic efficiency of compression:\n",
+ "nie = 0.90 #Isentropic efficiency of expansion:\n",
+ "Cp = 1.005 #Specific heat(in kJ/kg):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "m = 1 #Air flow rate(in kg/s):\n",
+ "\n",
+ "#Calculations:\n",
+ "T2a = T1*(r1)**((r-1)/r) #Temperature at state 2'(in K):\n",
+ "T2 = (T2a-T1)/nic+T1 #Temperature at state 2(in K):\n",
+ "T4a = T3*(1/r1)**((r-1)/r) #Temperature at state 4'(in K):\n",
+ "T4 = T3-(T3-T4a)*nie #Temperature at state 2'(in K):\n",
+ "Wc = Cp*(T2-T1) #Work during compression(in kJ/s):\n",
+ "Wt = Cp*(T3-T4) #Work during expansion(in kJ/s):\n",
+ "Qref = Cp*(T1-T4) #Refrigeration effect(in kJ/s):\n",
+ "W = Wc-Wt #Net work required(in kJ/s):\n",
+ "COP = Qref/W #COP:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Refrigeration capacity: \",round(Qref,2),\"kJ/s\"\n",
+ "print \"COP: \",round(COP,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refrigeration capacity: 61.25 kJ/s\n",
+ "COP: 0.56\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 840"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 7+273 #Operating temperatures(in K)\n",
+ "T3 = 27+273\n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p2 = 5\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "Cp = 1.005 #Specific heat(in kJ/kg):\n",
+ "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n",
+ "T4 = T3/((p2/p1)**((r-1)/r)) #Temperature at state 4(in K):\n",
+ "Q23 = Cp*(T2-T3) #Heat rejected in process 2-3(in kJ/kg):\n",
+ "Q41 = Cp*(T1-T4) #Heat picked during process 4-1(in kJ/kg):\n",
+ "W = Q23-Q41 #Net work(in kJ/kg):\n",
+ "COP = Q41/W #COP:\n",
+ "\n",
+ "#Results: \n",
+ "print \"COP: \",round(COP,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP: 1.71\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 841"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressure(in bar):\n",
+ "p2 = 5.5\n",
+ "T1 = -10+273 #Operating temperatures(in K):\n",
+ "T3 = 27+273\n",
+ "m = 0.8 #Air flow rate(in kg/s):\n",
+ "Cp = 1.005 #Specific heat(in kJ/kg):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n",
+ "T4 = T3/((p2/p1)**((r-1)/r)) #Temperature at state 4(in K):\n",
+ "C = m*Cp*(T1-T4) #Refrigeration capacity(in kJ/s):\n",
+ "Wc = m*r/(r-1)*R*(T2-T1) #Work required to run the comoressor(in kJ/s):\n",
+ "W = m*Cp*((T2-T3)-(T1-T4)) #Net work input(in kJ/s):\n",
+ "COP = C/W #COP:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Refrigeration capacity: \",round(C,2),\"kJ/s\"\n",
+ "print \"HP required to run compressor: \",round(Wc/0.7457,2),\"hp\"\n",
+ "print \"COP: \",round(COP,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refrigeration capacity: 63.25 kJ/s\n",
+ "HP required to run compressor: 177.86 hp\n",
+ "COP: 1.59\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 843"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1.2 #Pressure(in bar):\n",
+ "p6 = p1\n",
+ "p3 = 4\n",
+ "p2 = p3\n",
+ "p4 = 1\n",
+ "p7 = 0.9\n",
+ "T1 = 288 #Temperatures(in K):\n",
+ "T6 = T1\n",
+ "T5 = 25+273\n",
+ "T3 = 323\n",
+ "T8 = 30+273\n",
+ "n = 1.45\n",
+ "n1 = 1.3\n",
+ "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n",
+ "T2 = 418.47\n",
+ "Cp = 1.005\n",
+ "\n",
+ "#Calculations: \n",
+ "T4 = T3*(p4/p3)**((n1-1)/n1) #Temperature at state 4(in K):\n",
+ "T4 = 234.57\n",
+ "m = 10*3.5/(Cp*(T5-T4)) #Refrigeration effect(in kg/s):\n",
+ "T7 = T6*(p7/p6)**((n1-1)/n1) #Temperature at state 7(in K):\n",
+ "rm = m*(T2-T3)/(T8-T7)+m #Ram air mass flow rate(in kg/s):\n",
+ "W = m*Cp*(T2-T1) #Work input to the compressor(in kJ/s):\n",
+ "COP = 10*3.5/W #COP:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Air mass flow rate in cabin: \",round(m,2),\"kg/s\"\n",
+ "print \"Ram air mass flow rate: \",round(rm,2),\"kg/s\"\n",
+ "print \"COP: \",round(COP,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air mass flow rate in cabin: 0.55 kg/s\n",
+ "Ram air mass flow rate: 2.11 kg/s\n",
+ "COP: 0.486\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 844"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p0 = 0.9 #Pressures(in bar):\n",
+ "p1 = 1\n",
+ "p2 = 4\n",
+ "p3 = p2\n",
+ "p4 = p3\n",
+ "p5 = 1.03\n",
+ "T6 = 298 #Temperatures(in K):\n",
+ "T0 = 276\n",
+ "Cp = 1.005 #Specific heat(in kJ/kg):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "C = 15 #Refrigeration capacity:\n",
+ "nic = 0.9 #Isentropic efficiency for compressor:\n",
+ "nit = 0.8 #Isentropic efficiency for turbine:\n",
+ "\n",
+ "#Calculations:\n",
+ "T1 = T0*(p1/p0)**((r-1)/r) #Temperature at state 1(in K):\n",
+ "T2a = T1*(p2/p1)**((r-1)/r) #Temperature at state 2'(in K):\n",
+ "T2 = T1+(T2a-T1)/nic #Temperature at state 2(in K):\n",
+ "T3 = 0.34*T2 #Temperature at state 3(in K):\n",
+ "T4 = T3-10 #Temperature at state 4(in K):\n",
+ "T5a = T4*(p5/p4)**((r-1)/r) #Temperature at state 5'(in K):\n",
+ "T5 = T4-(T4-T5a)*nit #Temperature at state 5(in K):\n",
+ "m = C*3.5/(Cp*(T6-T5)) #Mass flow rate(in kg/s):\n",
+ "W = m*Cp*(T2-T1) #Work input(in kJ/s):\n",
+ "COP = C*3.5/W #COP:\n",
+ "\n",
+ "#Results: \n",
+ "print \"COP: \",round(COP,2)\n",
+ "print \"HP required: \",round(W/0.7457,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP: 1.27\n",
+ "HP required: 55.51 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 846"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = -15+273\t\t #Operating temperatures(in K):\n",
+ "T2 = 25+273\n",
+ "h2 = 1317.95 #kJ/kg \n",
+ "s2 = 4.4809 #kJ/kg.K\n",
+ "h3 = 99.94 #kJ/kg\n",
+ "s3 = 0.3386 #kJ/kg.K\n",
+ "h9 = -54.51 #kJ/kg\n",
+ "s9 = -0.2132 #kJ/kg.K\n",
+ "s4 = 0.3855 #kJ/kg.K\n",
+ "\n",
+ "#Calculations:\n",
+ "h4 = h3\n",
+ "s8 = s3\n",
+ "s1 = s2\n",
+ "C = T1*(s1-s4)\t\t\t\t #Refrigeration effect(in kJ/kg):\n",
+ "W = h3-h9-T1*(s3-s9)+(T2-T1)*(s1-s8)\t#Work done(in kJ/kg):\n",
+ "COP = C/W\t\t\t\t #COP:\n",
+ "\n",
+ "#Results: \n",
+ "print \"COP: \",round(COP,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP: 5.94\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 848"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import e\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = -20+273\t\t\t#Operating temperature(in K):\n",
+ "T3 = 40+273\n",
+ "p2 = 9.61\t\t\t\t#Pressures(in bar):\n",
+ "p1 = 1.51\n",
+ "n = 1.13\n",
+ "N = 1200\t\t\t\t#Speed(in rpm):\n",
+ "h1 = 178.61 #kJ/kg\n",
+ "h3 = 73.53 #kJ/kg\n",
+ "h4 = h3\n",
+ "s1 = 0.7082 #kJ/kg.K\n",
+ "s2 = s1\n",
+ "sg = 0.682 #kJ/kg.K\n",
+ "Cpg = 0.747 #kJ/kg.K\n",
+ "hg = 203.05 #kJ/kg\n",
+ "vg = 0.1088 #m**3/kg\n",
+ "m1 = 2.86 #ton\n",
+ "C = 0.02\t\t\t #Clearance volume:\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T3*(e)**((s1-sg)/Cpg)\t#Temperature of state 2(in K):\n",
+ "h2 = hg+Cpg*(T2-T3)\t\t#Enthalpy after compression(in kJ/kg):\n",
+ "Wc = h2-h1\t\t\t\t#Compression work(in kJ/kg):\n",
+ "r = h1-h4\t\t\t\t#Refrigeration effect(in kJ/kg):\n",
+ "m = m1*3.5/r\t\t\t#Mass flow rate(in kg/s):\n",
+ "COP = r/Wc\t\t\t\t#COP:\n",
+ "nv = 1+C-C*(p2/p1)**(1/n)\t\t\t\t#Volumetric efficiency:\n",
+ "V = m*60*vg/(nv*N)\t\t\t\t#Piston printlacement(in m**3):\n",
+ "\n",
+ "#Results: \n",
+ "print \"COP: \",round(COP,3)\n",
+ "print \"Piston printlacement: \",round(V*10**6,2),\"cm**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP: 3.205\n",
+ "Piston printlacement: 565.05 cm**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 850"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#From steam tables:\n",
+ "h1 = 322.28 #kJ/kg\t\t\t\t\n",
+ "h2 = 342.32 #kJ/kg\n",
+ "s2 = 1.1937 #kJ/kg.K\n",
+ "x1 = 0.961\n",
+ "h1 = 312.08 #kJ/kg\n",
+ "h3 = 144.11 #kJ/kg\n",
+ "h4 = 115.22 #kJ/kg\n",
+ "m1 = 2\t\t\t\t#Refrigeration effect(in kW):\n",
+ "\n",
+ "#Calculations:\n",
+ "s1 = s2\n",
+ "h5 = h4\n",
+ "r = h1-h5\t\t\t\t#Refrigeration effect(in kJ/kg):\n",
+ "m = m1/r\t\t\t\t#Refrigerant flow rate(in kg/s):\n",
+ "Wc = h2-h1\t\t\t\t#Compressor work(in kJ/kg):\n",
+ "COP = r/Wc\t\t\t\t#COP:\n",
+ "\n",
+ "#Results: \n",
+ "print \"COP: \",round(COP,2)\n",
+ "print \"Mass flow rate: \",round(m,4),\"kg/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP: 6.51\n",
+ "Mass flow rate: 0.0102 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 851"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "w = 0.016\t\t\t\t#Specific humidity(in gm/kg):\n",
+ "pvsat = 0.03098\t\t\t#Saturated partial pressure of vapour(in bar):\n",
+ "pv = w/0.622*1.013/(1+w/0.622)#Partial pressure of vapour(in bar):\n",
+ "r = pv/pvsat*100\t\t\t#Relative humidity:\n",
+ "\n",
+ "#Calculations:\n",
+ "print \"Partial pressure of vapour: \",round(pv,4)\n",
+ "print \"Relative humidity: \",round(r,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Partial pressure of vapour: 0.0254\n",
+ "Relative humidity: 82.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 852"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r = 0.6\t\t\t\t#Relavite humidity\n",
+ "pvsat = 0.0425\t\t\t#Saturation pressure(in bar):\n",
+ "R = 0.287\t\t\t\t#Gas constant(in kJ/kg.K):\n",
+ "Ta = 303\t\t\t\t#Surrounding temperature(in K):\n",
+ "hg = 2504.1 #kJ/kg\n",
+ "Cp = 1.005\t\t\t\t#Specific heat(in kJ/kg.K):\n",
+ "T = 21.4 \t\t\t\t#Dew point temperature(in C) from steam table:\n",
+ "pv = 0.0255 #partial pressure of vapour(bar) from steam table:\n",
+ "#Calculations:\n",
+ "pa = 1.013-r*pvsat\t\t#Partial pressure of air(in bar):\n",
+ "w = 0.622*(pv/(1.013-pv))\t#Humidity ratio:\n",
+ "d = 1.013*10**2*(1+w)/(R*Ta)\t#Density of mixture(in kg/m**3):\n",
+ "h = Cp*30+w*(hg+1.860*(30-T))#Enthalpy of mixture(in kJ/kg of dry air):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Partial pressure of air: \",round(pa,4),\"bar\"\n",
+ "print \"Humidity ratio: \",round(w,5),\"jg/kg of dry air\"\n",
+ "print \"Dew point temperature: \",round(T,1),\"\u00b0C\"\n",
+ "print \"Density: \",round(d,4),\"kg/m**3\"\n",
+ "print \"Enthalpy of mixture: \",round(h,1),\"kJ/kg of air\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Partial pressure of air: 0.9875 bar\n",
+ "Humidity ratio: 0.01606 jg/kg of dry air\n",
+ "Dew point temperature: 21.4 \u00b0C\n",
+ "Density: 1.1836 kg/m**3\n",
+ "Enthalpy of mixture: 70.6 kJ/kg of air\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 852"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r = 0.80\t\t\t\t#Relavite humidity\n",
+ "#From pyschometric chart:\n",
+ "w1 = 0.0086 #kg/kg of air\t\t\t\t\n",
+ "w2 = 0.01 #kg/kg of air\n",
+ "h1 = 37 #kJ/kg\n",
+ "h2 = 50 #kJ/kg\n",
+ "v2 = 0.854 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "m = w2-w1\t\t\t\t#Mass of water added between states 1 and 2:\n",
+ "ma = r/v2\t\t\t\t#Mass flow rate:\n",
+ "m1 = m*ma\t\t\t\t#Total mass of water added(in kg/s):\n",
+ "q = ma*(h2-h1)\t\t\t\t#Heat transferred(in kJ/s):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Mass of water added: \",round(m1,6),\"kg/s\"\n",
+ "print \"Heat transferred: \",round(q,2),\"kJ/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of water added: 0.001311 kg/s\n",
+ "Heat transferred: 12.18 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m1 = 3\t\t\t\t#Mass flow rate(in kg/s):\n",
+ "m2 = 2\n",
+ "Cp = 1.005\t\t\t\t#Specific heat(in kJ/kg.K):\n",
+ "Cps = 1.86\t\t\t\t#Specofoc heat of stream(in kJ/kg.K):\n",
+ "r1 = 0.30\t\t\t\t#Relative humidity:\n",
+ "r2 = 0.85\n",
+ "#From psychometric chart:\n",
+ "pvsat1 = 0.04246 #bar\t\t\t\t\n",
+ "pvsat2 = 0.005628\n",
+ "hg1 = 2520.7 #kJ/kg\n",
+ "hg2 = 2559.9 #kJ/kg\n",
+ "T1 = 30 #\u00b0C\n",
+ "Tdp1 = 10.5\n",
+ "T2 = 35 \n",
+ "Tdp2 = 32\n",
+ "\n",
+ "#Calculations:\n",
+ "pv1 = pvsat1*r1\t\t\t\t#Partial pressure of vapour at 1(in bar):\n",
+ "w1 = 0.622*pv1/(1.013-pv1)\t\t#Specific humidity:\n",
+ "h1 = Cp*T1+w1*(hg1-Cps*(T1-Tdp1))\t#Enthalpy at state 1(in kJ/kg):\n",
+ "pv2 = pvsat2*r2\t\t\t\t#Partial pressure at state 2(in bar):\n",
+ "w2 = 0.622*pv2/(1.013-pv2)\t\t#Specific humidity:\n",
+ "h1 = Cp*T2+w2*(hg2-Cps*(T2-Tdp2))\t#Enthalpy at state 1(in kJ/kg):\n",
+ "mmix = 1/(m1+m2)*(w1*m1/(1+w1)+w2*m2/(1+w2))\t#Mass of vapour:\n",
+ "wmix = mmix/(1-mmix)\t\t\t#Specific humidity of mixture:\n",
+ "pv = 1.013*wmix/0.622/(1+w1/0.622)\t#Partial pressure of water vapour(in bar):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Specific humidity of mixture: \",round(wmix,5),\"kg/kg of dry air\"\n",
+ "print \"Partial pressure of water vapour in mixture: \",round(pv,5),\"bar\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific humidity of mixture: 0.00593 kg/kg of dry air\n",
+ "Partial pressure of water vapour in mixture: 0.00953 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 855"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r = 3\t\t\t\t#Rate at which air enters(in m**3/s):\n",
+ "h1 = 36.4 #kJ/kg\t\t\t\t#From steam tables:\n",
+ "h2 = 52 #kJ/kg\n",
+ "v1 = 0.825 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "m = 3/v1\t\t\t\t#Mass of air(in kg/s):\n",
+ "q = m*(h2-h1)\t\t\t\t#Amount of heat added(in kJ/s):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat added: \",round(q,2),\"kJ/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat added: 56.73 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter19.ipynb b/Applied_Thermodynamics/Chapter19.ipynb
new file mode 100755
index 00000000..250882b3
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter19.ipynb
@@ -0,0 +1,644 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f1f13cd9c3fdcfa7b8b8c8379d6bf486b07b707956742ab81238144bdac12268"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 19: Jet Propulsion and Rocket Engines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 873"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Cpg = 1.13 #Specific heat of gases(in kJ/kg.K):\n",
+ "Cpa = 1.005 \n",
+ "rg = 1.33\n",
+ "ra = 1.4\n",
+ "C = 41.84*10**3 #kJ/kg of fuel\n",
+ "T1 = 272 #Temperatures(in K):\n",
+ "T3 = 1000\n",
+ "nc = 0.84 #Compression efficiency:\n",
+ "p3 = 3\n",
+ "p2 = 3\n",
+ "p1 = 0.5\n",
+ "p5 = 0.4\n",
+ "nt = 0.82 #Turbine efficiency:\n",
+ "nn = 0.92 #Nozzle efficiency:\n",
+ "Ca = 200 #Speed(in m/s):\n",
+ "T2 = T1*(p2/p1)**((ra-1)/ra) #Temperature at state 2(in K):\n",
+ "T2a = T1+(T2-T1)/nc #Temperature at state 2'(in K):\n",
+ "Wc = Cpa*(T2a-T1) #Compressive work(in kW):\n",
+ "r = (C-Cpg*T3)/(Cpg*T3-Cpa*T2a) #Air fuel ratio:\n",
+ "T4a = T3-Cpa/Cpg*(T2a-T1)/(1+r) #Temperature at state 4'(in K):\n",
+ "T4a = 810.46\n",
+ "T4 = T3-(T3-T4a)/nt\n",
+ "p4 = p3*(T4/T3)**(rg/(rg-1)) #Pressure of gas leaving turbine(in bar):\n",
+ "T5 = T4a*(p5/p4)**((rg-1)/rg) #Temperature at state 5(in K):\n",
+ "T5a = T4a-nn*(T4a-T5) #Temperature at state 5'(in K):\n",
+ "C5a = sqrt(2*Cpg*(T4a-T5a)*10**3) #Exit jet velocity(in m/s):\n",
+ "Ce = C5a\n",
+ "T = (1+1/r)*Ce-Ca #Thrust per kg of air per second:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Power required for compressor: \",round(Wc,2),\"kW/kg\"\n",
+ "print \"Air fuel ratio: \",round(r,2)\n",
+ "print \"Pressure of gas leaving turbine: \",round(p4,2),\"bar\"\n",
+ "print \"Thrust: \",round(T,2),\"N/kg/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required for compressor: 217.55 kW/kg\n",
+ "Air fuel ratio: 63.7\n",
+ "Pressure of gas leaving turbine: 1.04 bar\n",
+ "Thrust: 405.75 N/kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 876"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 285 #K\n",
+ "p1 = 1 #bar\n",
+ "T3 = 773 #K\n",
+ "p2 = 4 #bar\n",
+ "r = 1.4\n",
+ "Cpa = 1.005 #kJ/kg.K\n",
+ "CV = 43100 #kJ/kg.K\n",
+ "T3 = 273+500 #K\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n",
+ "T2a = T1+1.1*(T2-T1) #Temperature at state 2'(in K):\n",
+ "Wc = Cpa*(T2a-T1) #Work required in compressor(in kJ/kg of air):\n",
+ "qa = Cpa*(T3-T2a) #Heat added in combustion chamber(in kJ/kg of air):\n",
+ "r1 = CV/qa #Air fuel ratio:\n",
+ "T5 = T3*(p1/p2)**((r-1)/r) #Temperature at state 5(in K):\n",
+ "hd = Cpa*(T3-T5-T2a+T1) #Enthalpy drop in the nozzle(in kJ/kg of air):\n",
+ "Ce = sqrt(2*hd*10**3) #Velocity of exit gas from nozzle(in m/s):\n",
+ "T = (1+1/r)*Ce #Thrust(in N/kg/s):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Power required to drive compressor: \",round(Wc,2),\"kW/kg of air\"\n",
+ "print \"Air-fuel ratio: \",round(r1,2)\n",
+ "print \"Thrust: \",round(Ce,2),\"N/kg of air/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required to drive compressor: 153.12 kW/kg of air\n",
+ "Air-fuel ratio: 127.77\n",
+ "Thrust: 449.34 N/kg of air/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 877"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Cpg = 1.14 #kJ/kg.K,Specific heat of gases(in kJ/kg.K):\n",
+ "Cpa = 1.005 #kJ/kg.K,Specific heat of gases(in kJ/kg.K):\n",
+ "nm = 0.96 #Mechanical efficiency:\n",
+ "nc = 0.87 #Polytropic efficiency of compressor:\n",
+ "nt = 0.90 #Turbine efficiency:\n",
+ "nn = 0.95 #Nozzle efficiency:\n",
+ "B = 5.5 #By pass ratio:\n",
+ "ma = 200 #Mass flow rate of air(in kg/s):\n",
+ "p2 = 1.5 #Pressures(in bar):\n",
+ "p1 = 1\n",
+ "p3 = 28\n",
+ "pa = p1\n",
+ "T1 = 288 #Temperatures(in K):\n",
+ "rg = 1.33\n",
+ "ra = 1.4\n",
+ "CV = 43100 #kJ/kg\n",
+ "T4 = 1573 #K\n",
+ "\n",
+ "#Calculations:\n",
+ "a1 = 1/nc*(ra-1)/ra #For compression:a1 = ((ne-1)/ne)\n",
+ "a1 = 0.328\n",
+ "a2 = nt*(rg-1)/rg #For expansion:a2 = (nt-1)/nt\n",
+ "a2 = 0.223\n",
+ "T2a = T1*(p2/p1)**a1 #Temperature at state 2'(in K):\n",
+ "T3a = T2a*(p3/p2)**a2 #Temperature at state 3'(in K):\n",
+ "dT = nn*T2a*(1-(pa/p2)**((ra-1)/ra))#Using nozzle efficiency:\n",
+ "C8 = sqrt(2*Cpa*10**3*dT) #Velocity at exit of nozzle(in m/s):\n",
+ "mab = ma*B/(B+1) #Mass flow rate of bypass air(in kg/s):\n",
+ "mca = ma-mab #Mass flow rate of hot gases(in kg/s):\n",
+ "Tb = mab*C8/10**3 #Thrust available due to by pass air(in kN):\n",
+ "r1 = (Cpg*T4-Cpa*T3a)/(CV-Cpg*T4) #Air fuel ratio:\n",
+ "T5a = T4-(Cpa*(T3a-T2a)/(nm*(1+r1)*Cpg))#Temperature at state 5'(in K):\n",
+ "T6a = (Cpg*nm*T5a-(1+B)*Cpa*(T2a-T1))/(Cpg*nm)#Temperature at state 6'(in K):\n",
+ "p4 = p3-p2 #Pressure at state 4(in bar):\n",
+ "p5 = p4*(T5a/T4)**(1/a2) #Pressure at state 5(in bar):\n",
+ "p6 = p5*(T6a/T5a)**(1/a2)#Pressure at state 6(in bar):\n",
+ "c = ((rg+1)/2)**(rg/(rg #Pressure at state 7(in bar):\n",
+ "dT1 = nn*T6a*(1-(p7/p6)**((rg-1)/rg))#For exit nozzle(in K):\n",
+ "C7 = sqrt(2*Cpg*10**3*dT1) #Velocity at exit of nozzle(in m/s):\n",
+ "Tg = mca*C7/10**3 #Thrust due to hot gases(in kN):\n",
+ "Tt = Tg+Tb #Total thrust(in kN):\n",
+ "st = Tt/ma #Specific thrust(in kN/kg/s):\n",
+ "sfc = r1*mca*3600/(Tt*10**3) #Specific fuel consumption(in kg/h.N):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Specific thrust: \",round(st,3),\"kN/kg/s\"\n",
+ "print \"Specific fuel consumption: \",round(sfc,2),\"kg/h.N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific thrust: 0.309 kN/kg/s\n",
+ "Specific fuel consumption: 0.05 kg/h.N\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 881"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Ca = 277.78 #Velociy of turbojet plane(in m/s):\n",
+ "r1 = 0.5 #Thrust to velocity ratio:\n",
+ "m = 50 #Rate at which air enters(in kg/s):\n",
+ "r = 52 #Air fuel ratio:\n",
+ "LCV = 43100 #Lower calorific value of fuel:\n",
+ "\n",
+ "#Calculations:\n",
+ "Ce = Ca/r1 #Jet velocity(in m/s):\n",
+ "T = (m+m/r)*Ce-m*Ca #Thrust(in N):\n",
+ "St = T/m #Specific thrust(in N/kg/s):\n",
+ "P = T*Ca/10**3 #Thrust power(in kW):\n",
+ "np = 2/(1+1/r1)*100 #Propulsive efficiency:\n",
+ "nt = ((1+1/r)*Ce**2-Ca**2)/(2*1/r*LCV)/10 #Thermal efficiency:\n",
+ "no = np*nt/100 #Overall efficiency:\n",
+ "sfc = m/r*3600/(T) #Specific fuel consumption(in kg/h.N):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Jet velocity: \",round(Ce,2),\"m/s\"\n",
+ "print \"Thrust: \",round(T/10**3,2),\"kN\"\n",
+ "print \"Specific thrust: \",round(St,2),\"N/kg/s\"\n",
+ "print \"Thrust power: \",round(P,2),\"kW\"\n",
+ "print \"Propulsive efficiency: \",round(np,2),\"%\"\n",
+ "print \"Thermal efficiency: \",round(nt,2),\"%\"\n",
+ "print \"Overall efficiency: \",round(no,2),\"%\"\n",
+ "print \"Specific fuel consumption: \",round(sfc,4),\"kg/h.N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Jet velocity: 555.56 m/s\n",
+ "Thrust: 14.42 kN\n",
+ "Specific thrust: 288.46 N/kg/s\n",
+ "Thrust power: 4006.47 kW\n",
+ "Propulsive efficiency: 66.67 %\n",
+ "Thermal efficiency: 14.32 %\n",
+ "Overall efficiency: 9.55 %\n",
+ "Specific fuel consumption: 0.24 kg/h.N\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 882"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 2.2 #Pressures(in bar):\n",
+ "T1 = 220 #Temperatures(in K):\n",
+ "T4 = 1273\n",
+ "C1 = 260 #Velocities(in m/s):\n",
+ "nn = 0.85 #Nozzle efficiency:\n",
+ "nt = 0.88 #Turbine efficiency:\n",
+ "nd = 0.90 #Diffuser efficiency:\n",
+ "Cp = 1.005#Specific heat(in kJ/kg.K):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "r1 = 12 #Pressure ratio:\n",
+ "T3a = 568.635\n",
+ "p6 = 2.2\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1+ C1**2/(2*Cp*1000) #Temperature at state 2(in K):\n",
+ "p2 = p1*(T2/T1)**(r/(r-1)) #Pressure at state 2(in bar):\n",
+ "p3 = p2*r1\n",
+ "p4 = p3\n",
+ "T3 = T2*(p3/p2)**((r-1)/r)#Temperature at state 3(in K):\n",
+ "T3a = T2+(T3-T2)/nn #Temperature at state 3'(in K):\n",
+ "T5a = T4-(T3a-T2) #Temperature at state 5'(in K):\n",
+ "T4 = T3a -T2 +T5a\n",
+ "T5 = T4-(T4-T5a)/nt #Temperature of state 5(in K):\n",
+ "p5 = p4*(T5/T4)**(r/(r-1)) #Pressure at state 5(in bar):\n",
+ "T6 = T5*(p6/p5)**((r-1)/r)\n",
+ "T2a = T1+(T2-T1)/nd #Temperature at state 2'(in K):\n",
+ "C6 = sqrt(2*(T5-T6)*Cp*10**3) #Velocity at exit of nozzle(in m/s):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Velocity of exit of nozzle: \",round(C6,2),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of exit of nozzle: 873.41 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 885"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "CV = 45000 #Calorific value(in kJ/kg):\n",
+ "T1 = 1000 #Inlet temperature(in C):\n",
+ "T4 = T1\n",
+ "nn = 0.9 #Nozzle efficiency:\n",
+ "nd = 0.9 #Diffuser efficiency:\n",
+ "nc = 0.8 #Compressive efficiency:\n",
+ "nt = 0.8 #Turbine efficiency:\n",
+ "Cp = 1.005 #Specific heat(in kJ/kg.K):\n",
+ "p3 = 7.248 #bar\n",
+ "r = 1.4\n",
+ "p6 = 0.7\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "T2a = 282.11 #Temperature at state 2(in K):\n",
+ "T3a = 568.635\n",
+ "\n",
+ "#Calculations:\n",
+ "p4 = p3-0.15\n",
+ "r1 = (CV-T1*Cp)/(Cp*T1-Cp*T3a) #Air fuel ratio:\n",
+ "T5a = T4-(T3a-T2a) #Temperature at state 5'(in K):\n",
+ "T5 = T4-(T4-T5a)/nt #Temperature at state 5(in K):\n",
+ "p5 = p4*(T5/T4)**(r/(r-1))\n",
+ "T6 = T5a*(p6/p5)**((r-1)/r) #Temperature at state 6(in K):\n",
+ "T6a = T5a-(T5a-T6)*nn #Temperature at state 6'(in K):\n",
+ "C6 = sqrt(2*Cp*(T5a-T6a)*10**3) #Velocity at exit of nozzle(in m/s):\n",
+ "v = 200/10 #Volume flow rate of air(in m**3/s):\n",
+ "m = 0.7*10**2*v/(R*260) #Mass flow rate(in kg/s):\n",
+ "St = (1+1/r1)*C6 #Specific thrust(in N/kg of air/s):\n",
+ "Tt = m*St #Total thrust(in N):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Specific thrust: \",round(St,2),\"N/kg of air/s\"\n",
+ "print \"Total thrust: \",round(Tt,2),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific thrust: 508.22 N/kg of air/s\n",
+ "Total thrust: 9535.07 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 886"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Cpa = 1.005 #Specific heat(in kJ/kg.K):\n",
+ "Cpg = 1.087\n",
+ "ra = 1.4\n",
+ "rg = 1.33\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "C0 = 250 #Speed of aeroplane(in m/s):\n",
+ "C4a = 180 #Velocity at exit of turbine(in m/s):\n",
+ "CV = 43000 #kJ/kg\n",
+ "P = 800 #Thrust power(in kW):\n",
+ "T0 = -20+273 #Temperatures(in K):\n",
+ "T2 = 474.25 \n",
+ "T3 = 973\n",
+ "p0 = 0.3 #Pressures(in bar):\n",
+ "p1 = 0.31\n",
+ "nc = 0.85 #Compressor efficiency:\n",
+ "nj = 0.90 #Jet engine efficiency:\n",
+ "r1 = 6 #Pressure ratio:\n",
+ "\n",
+ "#Calculations:\n",
+ "p5 = p0\n",
+ "T1 = T0+C0**2/(2*Cpa*10**3)\t#Temperature at state 2(in K):\n",
+ "T2a = T1+(T2-T1)/nc\n",
+ "p2 = p1*r1 #Pressure at state 2(in bar):\n",
+ "p3 = p2\n",
+ "FA = (Cpa*T3-Cpg*T2a)/(CV-Cpa*T3) #Fuel air ratio:\n",
+ "T4a = T3-Cpa/Cpg*(T2a-T1)/(1+FA) #Temperature at state 4'(in K):\n",
+ "T4 = T3-(T3-T4a)/nc #Temperature at state 4(in K):\n",
+ "p4 = p3*(T4/T3)**(rg/(rg-1)) #Pressure at state 4(in bar):\n",
+ "T5 = T4a*(p5/p4)**((rg-1)/rg) #Temperature at state 5(in K):\n",
+ "C5 = sqrt(2*nj*(Cpg*10**3*(T4a-T5)+C4a**2/2)) #Nozzle exit velocity(in m/s):\n",
+ "no = (((1+FA)*C5-C0)*C0)/(FA*CV*10**3)*100 #Overall efficiency:\n",
+ "ma = P*10**3/(((1+FA)*C5-C0)*C0) #Rate of air consumption(in kg/s):\n",
+ "Pt = ma*(1+FA)*Cpg*(T3-T4a) #Power produced by the turbine(in kW):\n",
+ "T5a = T4a-((C5**2-C4a**2)/(2*Cpg*10**3)) #Temperature at state 5'(in K):\n",
+ "d5a = p5*10**2/(R*T5a) #Density of exhaust gases(in m**3/kg):\n",
+ "Aj = ma*(1+FA)/(C5*d5a) #Jet exit area(in m**2):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Air-fuel ratio: \",round(1/FA,2),\":1\"\n",
+ "print \"Rate of air consumption: \",round(ma,2),\"kg/s\"\n",
+ "print \"Power produced by turbine: \",round(Pt,2),\"kW\"\n",
+ "print \"Jet exit area: \",round(Aj,2),\"m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air-fuel ratio: 98.67 :1\n",
+ "Rate of air consumption: 11.99 kg/s\n",
+ "Power produced by turbine: 2694.84 kW\n",
+ "Jet exit area: 0.15 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 889"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Ca = 250 #Speed of jet plane(in m/s):\n",
+ "d = 0.15 #Density of air(in kg/m**3):\n",
+ "D = 6800 #Drag(in kW):\n",
+ "np = 0.56 #Propulsive efficiency:\n",
+ "\n",
+ "#Calculations:\n",
+ "Ce = 2*Ca/np-Ca #Relative velocity(in m/s):\n",
+ "C = Ce-Ca #Absolute velocity of jet(in m/s):\n",
+ "ma = D/(Ce-Ca) #Mass flow rate(in kg/s):\n",
+ "v = ma/d #Volume flow rate(in m**3/s):\n",
+ "dj = sqrt(v*4/(2*pi*Ce)) #Jet diameter(in m):\n",
+ " \n",
+ "#Results: \n",
+ "print \"Jet diamter: \",round(dj*100,1),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Jet diamter: 33.8 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 889"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "r1 = 0.4 #Density ratio:\n",
+ "Cp = 1.005 #Specific heat(in kJ/kg.K):\n",
+ "d = 0.018 #Drag coefficient:\n",
+ "Ce = 550 #Jet velocity(in m/s):\n",
+ "A = 20 #Wing area(in m**2):\n",
+ "Ca = 900*1000/3600 #Speed of aeroplane(in m/s):\n",
+ "d1 = 1.01325*10**2/(R*288) #Density of STP(in kg/m**3):\n",
+ "d2 = r1*d1 #Density of air at altitude(in kg/m**3):\n",
+ "T = d*A*d2*Ca**2/2 #Thrust on aeroplane:\n",
+ "ma = T/(Ce-Ca) #Mass flow rate(in kg/s):\n",
+ "St = T/ma #Specific thrust(in N/kg of air):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Specific thrust: \",round(St),\"N/kg of air\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific thrust: 300.0 N/kg of air\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 890"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Ca = 250 #Speed of air craft(in m/s):\n",
+ "m = 55 #Mass flow rate(in kg/s):\n",
+ "r = 85 #Air fuel ratio:\n",
+ "nc = 0.96 #Combustion efficiency:\n",
+ "CV = 43000 #Lower calorific value(in kJ/kg):\n",
+ "dh = 220 #Isentropic enthalpy change(in kJ/kg):\n",
+ "n = 0.95 #Velocity coefficient:\n",
+ "\n",
+ "#Calculations:\n",
+ "Ce = n*sqrt(2*dh*10**3)#Jet velocity(in m/s):\n",
+ "Ce = 615.67\n",
+ "St = 400.67 #Specific thrust per kg of air(in N/kg air):\n",
+ "r1 = 1/r*3600*m #Fuel flow rate(in kg/hr):\n",
+ "sfc = r1/(St*m) #Specific fuel consumption(in kg/N.hr):\n",
+ "P = m*(Ce-Ca)*Ca/10**3 #Thrust power(in kW):\n",
+ "Pp = m*(Ce**2-Ca**2)/2/10**3 #Propulsive power(in kW):\n",
+ "np = P/Pp*100 #Propulsive efficiency:\n",
+ "no = P/(m/r*CV*nc)*100 #Overall efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Propulsive power: \",round(Pp,2),\"kW\"\n",
+ "print \"Propulsive efficiency: \",round(np,2),\"%\"\n",
+ "print \"Overall efficiency: \",round(no,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Propulsive power: 8705.11 kW\n",
+ "Propulsive efficiency: 57.76 %\n",
+ "Overall efficiency: 18.82 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter2.ipynb b/Applied_Thermodynamics/Chapter2.ipynb
new file mode 100755
index 00000000..f774f7a6
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter2.ipynb
@@ -0,0 +1,227 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1c6a10e6b876d2730bb167805af2fccb3104db62a9988f5aa3ef9c4c86e9b481"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Zeroth Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "Tf = 98.6 #Temperature of human body in degree Fahrenheit:\n",
+ "\n",
+ "#Calculation:\n",
+ "Tc = (Tf-32)/1.8 #Temperature of the body in degree Celcius:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Temperature of the human body \",Tc,\"\u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of the human body 37.0 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math as m\n",
+ "import numpy as n\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p0 = 3.0 #Thermodynamic property at T = 0:\n",
+ "p100 = 8.0 #Thermodynamic property at T = 100:\n",
+ "p = 6.5 #Thermodynamic property at which t is to be found\n",
+ "\n",
+ "#Calculation:\n",
+ "#Solving two linear equation by linear Algebra using matrices AX = B\n",
+ "A = n.matrix([[m.log(p0),0.5],[m.log(p100),0.5]])\n",
+ "B = n.matrix([[0],[100]])\n",
+ "X = n.matrix.getI(A)*B\n",
+ "a = round(X[0],2) #Thermodynamic constant a from matrix solution\n",
+ "b = round(X[1]) #Thermodynamic constant b from matrix solution\n",
+ "t = a*m.log(p)-b/2 #At thermodynamic property p = 6.5:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Temperature at the value of thermodynamic property (p = 6.5)\" ,round(t,2),\"\u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature at the value of thermodynamic property (p = 6.5) 302.83 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration:\n",
+ "T0 = 0 #Ice point (\u00b0C)\n",
+ "T100 = 100 #Steam Poiont (\u00b0C)\n",
+ "def E(t): #Function definition for above expression of EMF\n",
+ " return 0.003*t - 5*10**-7*t**2 + 0.5 *10**-3\n",
+ "\n",
+ "#Calculation:\n",
+ "t = (E(30)-E(0))/(E(100)-E(0))*(T100-T0) #Temperature shown by the thermometer at T = 30:\n",
+ "\n",
+ "#Results:\n",
+ "print \"!--Please check that there are calculation mistake done in the book \\nhence there is heavy difference in answer of book and the code--!\\n\"\n",
+ "print \"The temperature shown by thermometer: \",round(t,2),\"\u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "!--Please check that there are calculation mistake done in the book \n",
+ "hence there is heavy difference in answer of book and the code--!\n",
+ "\n",
+ "The temperature shown by thermometer: 30.36 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "t1 = 50 #Temperature of gas using gas thermometer:\n",
+ "def E(t): #Function Definition as per question:\n",
+ " return 0.18*t - 5.2*10**-4*t**2\n",
+ " \n",
+ "#Calculation:\n",
+ "t = (100-0)*E(t1)/(E(100)-E(0))\t#Temperature at EMF = E50:\n",
+ "p = (t-t1)/t1*100\n",
+ "\n",
+ "#Results:\n",
+ "print \"Percentage variation: \",round(p,2),\"%\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage variation: 20.31 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import numpy as n\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#Solving the conversion relation X = aC + b using matrices and finding a and b\n",
+ "B = n.matrix([[0],[1000]])\n",
+ "A = n.matrix([[0,1],[100,1]])\n",
+ "\n",
+ "#Calculations:\n",
+ "X = n.matrix.getI(A)*B\n",
+ "a = round(X[0]) #Value of a of equation X = aC + B\n",
+ "b = round(X[1]) #Value of b of equation X = aC + B\n",
+ "X = a*-273.15+b #Absolute temperature in new temperature scale:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Absolute temperature in new scale: \",X,\"\u00b0X\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute temperature in new scale: -2731.5 \u00b0X\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter3.ipynb b/Applied_Thermodynamics/Chapter3.ipynb
new file mode 100755
index 00000000..c0f77975
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter3.ipynb
@@ -0,0 +1,1090 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:8d4c3e3e1406cca57fa7a5e5be30daeeb95ae0c1a8fcd1dccf25d2f1f8ce833d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: First Law of Thermodynyamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "#Pressure in the gas cylinder(in kPa):\n",
+ "p=689\n",
+ "#Final volume(in m**3):\n",
+ "v2=0.045\n",
+ "#Initial volume(in m**3):\n",
+ "v1=0.04\n",
+ "#Work done by the paddle(in kJ):\n",
+ "Pw=-4.88\n",
+ "\n",
+ "#Calculation:\n",
+ "#Work done by the system on the piston(in kJ):\n",
+ "w=p*(v2-v1)\n",
+ "#Net Work of the system(in kJ):\n",
+ "wn=w+Pw\n",
+ "\n",
+ "#Results:\n",
+ "print \"Work done on the piston in kJ: \",w\n",
+ "print \"Work done on the system in kJ: \",-wn"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done on the piston in kJ: 3.445\n",
+ "Work done on the system in kJ: 1.435\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "#Mass of the gas(in kg):\n",
+ "m=0.5\n",
+ "#Initial internal energy(in kJ/kg):\n",
+ "u1=26.6\n",
+ "#Final internal energy(in kJ/kg):\n",
+ "u2=37.8\n",
+ "\n",
+ "#Calculation:\n",
+ "#Heat required(in kJ):\n",
+ "Q=(u2-u1)*m\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat required (kJ): \",Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat required (kJ): 5.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "#Mass flow rate(in kg/hr):\n",
+ "m=50\n",
+ "#Initial temp(in C):\n",
+ "t1=800\n",
+ "#Final temp(in C):\n",
+ "t2=50\n",
+ "#Heat capacity at const pressure(in kJ/kg.K):\n",
+ "Cp=1.08\n",
+ "\n",
+ "#Calculation:\n",
+ "#Heat to be removed(in kJ/hr):\n",
+ "Q=m*Cp*(t2-t1)\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat should be removed at (kJ/hr): \",-Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat should be removed at (kJ/hr): 40500.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "#Volume of the cylinnder(in m**3):\n",
+ "v=0.78\n",
+ "#Atmospheric pressure(in kPa):\n",
+ "p=101.325\n",
+ "\n",
+ "#Calculation:\n",
+ "#Work done(in kJ):\n",
+ "w=round(p*v,2)\n",
+ "\n",
+ "#Results: \n",
+ "print \"Work done by air (KJ): \",-w\n",
+ "print \"Work done by surroundings (KJ): \",w"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done by air (KJ): -79.03\n",
+ "Work done by surroundings (KJ): 79.03\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "#Mass of the gas(in kg):\n",
+ "m=5\n",
+ "#Value of n in P*(V**n)=const:\n",
+ "n=1.3\n",
+ "#Initial pressure(in MPa):\n",
+ "p1=1\n",
+ "#Initial volume(in m**3):\n",
+ "v1=0.5\n",
+ "#Final pressure(in MPa):\n",
+ "p2=0.5\n",
+ "\n",
+ "#Calculation:\n",
+ "#Final volume(in m**3):\n",
+ "v2=round(v1*((p1/p2)**(1/n)),3)\n",
+ "#Work done(in kJ):\n",
+ "w=(p2*v2-p1*v1)*10**3/(1-n)\n",
+ "#Change in internal energy(in kJ/kg):\n",
+ "du=1.8*(p2*v2-p1*v1)*10**3\n",
+ "#Heat interaction(in kJ):\n",
+ "Q=du+w\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat interaction (kJ): \",round(Q,1)\n",
+ "print \"Work interaction (kJ): \",round(w,1)\n",
+ "print \"Change in internal energy (kJ): \",round(du,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat interaction (kJ): 113.5\n",
+ "Work interaction (kJ): 246.7\n",
+ "Change in internal energy (kJ): -133.2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "#Initial pressure(in MPa):\n",
+ "p1=1.0\n",
+ "#Final pressure(in MPa):\n",
+ "p2=2.0\n",
+ "#Initial volume(in m**3):\n",
+ "v1=0.05\n",
+ "#Value of n:\n",
+ "n=1.4\n",
+ "\n",
+ "#Calculation:\n",
+ "#Final volume(in m**3):\n",
+ "v2=round(v1*((p1/p2)**(1/n)),2)\n",
+ "\n",
+ "#Change in internal energy(in kJ/kg):\n",
+ "du=7.5*(p2*v2-p1*v1)*10**3\n",
+ "#Work done(in kJ):\n",
+ "w=(p2*v2-p1*v1)*10**3/(1-n)\n",
+ "#Heat interaction(in kJ):\n",
+ "Q=du+w\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat interaction (kJ): \",Q\n",
+ "print \"Work interaction (kJ): \",w\n",
+ "print \"Change in internal energy (kJ): \",du\n",
+ "\n",
+ "#If 180 kJ heat transfer takes place:\n",
+ "#Work done(in kJ):\n",
+ "w2=180-du\n",
+ "print \"New work (kJ): \",w2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat interaction (kJ): 50.0\n",
+ "Work interaction (kJ): -25.0\n",
+ "Change in internal energy (kJ): 75.0\n",
+ "New work (kJ): 105.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration:\n",
+ "#Universal Gas Constant (in KJ.mol/Kg.K):\n",
+ "r=8.3143\n",
+ "#Molecular weight of perfect gas:\n",
+ "M=16\n",
+ "#Molar specific heat at constant pressure for perfect gas(KJ/Kg.K):\n",
+ "Cp=1.7\n",
+ "#Initial pressure (Kpa):\n",
+ "p1=101.3\n",
+ "#Final pressure (Kpa):\n",
+ "p2 = 600\n",
+ "#Initial tempreture (K):\n",
+ "T1 = 273+20\n",
+ "#Polytripic index from PV^1.3 = const\n",
+ "n = 1.3\n",
+ "\n",
+ "#Calculations:\n",
+ "#Characterstic Gas Constant (KJ/Kg.K):\n",
+ "R=r/M\n",
+ "#Molar specific heat at constant volume for perfect gas(KJ/Kg.K):\n",
+ "Cv=Cp-R\n",
+ "#Specific heat ratio:\n",
+ "y = Cp/Cv\n",
+ "#Final Tempreture (K):\n",
+ "T2 = T1*(p2/p1)**((n-1)/n)\n",
+ "#Polytropic work (KJ/Kg):\n",
+ "W = R*(T1-T2)/(n-1)\n",
+ "#Polytropic process heat (KJ/Kg):\n",
+ "Q = W*(y-n)/(y-1)\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat transfered (KJ/Kg): \",round(Q,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfered (KJ/Kg): -82.06\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math as m\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#Initial temperature(in K):\n",
+ "t1=627+273\n",
+ "#Final temperature(in K):\n",
+ "t2=27+273\n",
+ "#Specific heat at const pressure(in kJ/kg.K):\n",
+ "Cp=1.005\n",
+ "\n",
+ "#Calculation\n",
+ "#Exit velocity(in m/s):\n",
+ "c2=m.sqrt(2*Cp*10**3*(t1-t2))\n",
+ "\n",
+ "#Results: \n",
+ "print \"Exit Velocity (m/s): \" ,round(c2,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Exit Velocity (m/s): 1098.2\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "#Work interaction(in kJ):\n",
+ "w=-200\n",
+ "#Increase in enthalpy(in kJ/kg):\n",
+ "dh=100\n",
+ "#Heat picked up by the cooling water(in kJ/kg):\n",
+ "qc=-90\n",
+ "\n",
+ "#Calculation:\n",
+ "#Heat flow(in kJ/kg):\n",
+ "Q=dh+w\n",
+ "#Heat transferred to atmosphere(in kJ/kg):\n",
+ "Qa=Q-qc\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat transferred to atmosphere (kJ/kg): \",Qa"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred to atmosphere (kJ/kg): -10\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "c=500 #Seating capacity:\n",
+ "q=50 #Heat requirement per person(in kcal/hr):\n",
+ "h1=80 #Enthalpy of water entering the pipe(in kcal/kg):\n",
+ "h2=45 #Enthalpy of water leaving the pipe(in kcal/kg):\n",
+ "z=10 #Difference in elevation of inlet and exit pipe(in m):\n",
+ "g=9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "Q=c*q #Heat to be supplied(in kcal/hr):\n",
+ "Ql=-Q #Heat lost by water(in kcal/kg):\n",
+ "m=(Ql*10**3*4.18)/(g*z+(h2-h1)*10**3*4.18) #Quantity of water circulated(in kg/hr):\n",
+ "\n",
+ "\n",
+ "#Results: \n",
+ "print \"Water circulation rate (kg/min):\",round(m/60,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Water circulation rate (kg/min): 11.91\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "h1=720.0 #Enthalpy of steam entering the injector(in kcal/kg):\n",
+ "h2=24.6 #Enthalpy of water entering(in kcal/kg):\n",
+ "h3=100.0 #Enthalpy of water and steam mixture leaving the injector(in kcal/kg):\n",
+ "z=2.0 #Depth of water injector from steam injector(in m):\n",
+ "v1=50.0 #Velocity of steam entering the injector(in m/s):\n",
+ "v3=25.0 #Velocity of mixture leaving the injector(in m/s):\n",
+ "q=12.0 #Heat loss from injector to surroundings(in kcal/kg):\n",
+ "g=9.8 #Acceleration due to gravity (m/s^2):\n",
+ "\n",
+ "\n",
+ "#Calculation:\n",
+ "m=(((v3**2)/2+h3*10**3*4.18)-(h2*10**3*4.18+g*z))/(((v1**2)/2+h1*10**3*4.18)-((v3**2)/2+h3*10**3*4.18)-(q*10**3*4.18))\n",
+ "\n",
+ "#Results: \n",
+ "print \"Steam supply rate (kg/s): \",round(m,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam supply rate (kg/s): 0.124\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p=1.013 #Atmospheric pressure(in bar):\n",
+ "v=0.4 #Volume to which the baloon is inflated(in m**3):\n",
+ "w1=0 #Work done by cylinder(in kJ):\n",
+ "\n",
+ "#Calculation:\n",
+ "w2=p*10**5*v #Work done by the balloon(in kJ):\n",
+ "w=w1+w2 #Total work(in kJ):\n",
+ "\n",
+ "\n",
+ "#Results: \n",
+ "print \"Work done by the system upon atmoshere (KJ): \",w/(10**3)\n",
+ "print \"Work done by the atmoshere (KJ): \",-w/(10**3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done by the system upon atmoshere (KJ): 40.52\n",
+ "Work done by the atmoshere (KJ): -40.52\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "Qa=5000 #Heat added(in J/s):\n",
+ "\n",
+ "#Calculation:\n",
+ "Wt=0.25*Qa #Turbine work(in J/s):\n",
+ "Qr=0.75*Qa #Heat rejected(in J/s):\n",
+ "Wp=0.002*Qa #Work by feed pump(in J/s):\n",
+ "C=Wt-Wp #Capacity of generator(in W):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Capacity of generator (KW): \",C/(10**3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of generator (KW): 1.24\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math as m\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1=27+273 #Ambient temperature(in K):\n",
+ "T2=750+273 #Temperature of air inside heat exchanger(in K):\n",
+ "T3=600+273 #Temperature of air leaving turbine(in K):\n",
+ "T4=500+273 #Temperature of air leaving turbine(in K):\n",
+ "c2=50 #Velocity of air entering turbine(in m/s):\n",
+ "c3=60 #Velocity of air entering the nozzle(in m/s):\n",
+ "Cp=1.005#Specific heat at constant pressure(in kj?kg.K):\n",
+ "\n",
+ "\n",
+ "#Calculation:\n",
+ "Q12=Cp*(T2-T1) #Heat transfer to air in heat exchanger(in kJ):\n",
+ "Wt=Cp*(T2-T3)+(c2**2-c3**2)*10**(-3)/2 #Power output from turbine(in kJ/s):\n",
+ "c4=m.sqrt(2*(Cp*(T3-T4)+(c3**2)*10**(-3)/2))#Velocity at exit of the nozzle(in m/s):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat transfer to air in heat exchanger (KJ): \",round(Q12,2)\n",
+ "print \"Power output from turbine (KJ/s): \",Wt\n",
+ "print \"Velocity at exit of the nozzle (m/s): \",round(c4,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer to air in heat exchanger (KJ): 726.61\n",
+ "Power output from turbine (KJ/s): 150.2\n",
+ "Velocity at exit of the nozzle (m/s): 14.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math as m\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1=0.5 #Initial pressure(in MPa):\n",
+ "T1=400 #Initial temperature(in K):\n",
+ "r1=2 #Ratio of v2 to v1:\n",
+ "r2=6 #Ratio of v3 to v1:\n",
+ "R=8.314 #Universal gas constant(in kJ/kg):\n",
+ "\n",
+ "#Calculation:\n",
+ "Wa=R*T1 #Work from state 1 to 2(in kJ):\n",
+ "T2=2*T1 #Temperature at point 2(in K):\n",
+ "Wb=R*T2*m.log(r2/r1) #Work done from state 2 to 3(in kJ):\n",
+ "W=Wa+Wb#Total work done by air(in kJ):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Work done (KJ): \",round(W,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done (KJ): 10632.69\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "pi=0.5*10**6 #Initial pressure(in Pa):\n",
+ "vi=0.5 #Initial volume(in m**3):\n",
+ "pf=1*10**6 #Final pressure(in Pa):\n",
+ "patm=1.013*10**5 #Atmospheric pressure(in Pa):\n",
+ "\n",
+ "#Calculation:\n",
+ "vf=3*vi #Final volume(in m**3):\n",
+ "W=(vf-vi)*(pi+pf)/2 #Work done(in J):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Work done (MJ): \",W/10**6"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done (MJ): 0.75\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p1=0.5*10**6 #Initial pressure(in Pa):\n",
+ "pf=1*10**6 #Final pressure(in Pa):\n",
+ "v1=0.5 #Initial volume(in m**3):\n",
+ "v2=0.25 #Final volume(in m**3):\n",
+ "vN2=0.75#Final Nitrogen volume(in m**3):\n",
+ "T1=273+27#Initial Tempereature (K):\n",
+ "patm=1.013*10**5 #Atmospheric pressure(in Pa):\n",
+ "CpH2=14.307 #Cp of hydrogen (KJ/Kg)\n",
+ "CpN2=1.039 #Cp of hydrogen (KJ/Kg)\n",
+ "RN2=0.2968\n",
+ "RH2=4.1240 \n",
+ "\n",
+ "#Calculations:\n",
+ "rH2=CpH2/(CpH2-RH2) #Adiabatic index of compression for H2:\n",
+ "rN2=CpN2/(CpN2-RN2) #Adiabatic index of compression for N2:\n",
+ "p2=p1*(v1/v2)**rH2 #Final pressure of hydrogen(in Pa):\n",
+ "Pw=0 #Partition work:\n",
+ "WH2=(p1*v1-p2*v2)/(rH2-1) #Work done upon H2(in J):\n",
+ "WN2=-WH2 #Work done by nitrogen(in J):\n",
+ "mN2=round(p1*v1/(RN2*10**3*T1),1) #Mass of N2(in kg):\n",
+ "T2=p2*vN2*T1/(p1*v1) #Final temperature of N2(in K):\n",
+ "CvN2=CpN2-RN2 #Cv of N2(in kJ/kg):\n",
+ "QN2=mN2*CvN2*10**3*(T2-T1)+WN2 #Heat added to N2(in kJ):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Final pressure of hydrogen (MPa): \",round(p2/(10**6),3)\n",
+ "print \"Partition work (KJ): \",Pw\n",
+ "print \"Work done by hyrogen (10^5 J): \",round(WH2/10**5)\n",
+ "print \"Work done by nitrogen (10^5 J): \",round(WN2/10**5)\n",
+ "print \"Heat added to nitrogen (kJ): \",round(QN2/(10**3),2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final pressure of hydrogen (MPa): 1.324\n",
+ "Partition work (KJ): 0\n",
+ "Work done by hyrogen (10^5 J): -2.0\n",
+ "Work done by nitrogen (10^5 J): 2.0\n",
+ "Heat added to nitrogen (kJ): 2053.09\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "v1=2 #Volume of the cylinder(in m**3):\n",
+ "p1=0.5*10**6 #Pressure in the cylinder(in Pa):\n",
+ "T1=375 #Temperature of the cylinder(in K):\n",
+ "Cp=1.003 #Specific heat at const pressure(in kJ/kg.K):\n",
+ "Cv=0.716 #Specific heat at const volume(in kJ/kg.K):\n",
+ "Ra=0.287 #Gas constant for air(in kJ/kg.K):\n",
+ "patm=1.013*10**5 #Atmospheric pressure(in Pa):\n",
+ "r=1.4 #Compression ratio:\n",
+ "\n",
+ "#Calculation:\n",
+ "m1=p1*v1/(Ra*T1) #Initial mass of air(in kg):\n",
+ "T2=T1*(patm/p1)**((r-1)/r) #Final temperature(in K):\n",
+ "m2=patm*v1/(Ra*T2) #Final mass of air left in tank(in kg):\n",
+ "KE=m1*Cv*T1-m2*Cv*T2-(m1-m2)*Cp*T2 #Kinetic energy available(in kJ):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Amount of work available (KJ): \",round(KE/10**3,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amount of work available (KJ): 482.67\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page no. 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p1=0.5*10**6 #Pressure in the vessel(in Pa):\n",
+ "v1=0.5 #Volume of 1st chamber(in m**3):\n",
+ "T1=300 #Temperature in the vessel(in K):\n",
+ "p2=10**6 #Final pressure(in Pa):\n",
+ "v2=0.5 #Volume of 2nd chamber(in m**3):\n",
+ "T2=500 #Final temperature(in K):\n",
+ "R=8314 #Universal gas constant(in J/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "n1=p1*v1/(R*T1) #Moles in chamber 1:\n",
+ "n2=p2*v2/(R*T2) #Moles in chamber 2:\n",
+ "T3=(n1*T1+n2*T2)/(n1+n2) #Temperature of the mixture(in K):\n",
+ "p3=(n1+n2)*R*T3/(v1+v2) #Final pressure(in MPa):\n",
+ "\n",
+ "\n",
+ "#Results: \n",
+ "print \"Final pressure (MPa): \",p3/(10**6)\n",
+ "print \"Final temperature (K): \",round(T3,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final pressure (MPa): 0.75\n",
+ "Final temperature (K): 409.09\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20, page no. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "v=0.5 #Volume of the bottle(in m**3):\n",
+ "p=1.0135 #Pressure in the bottle(in Bar):\n",
+ "\n",
+ "#Calculation:\n",
+ "W=p*10**5*(0-v) #Displacement work(in N-m):\n",
+ "Q=-W #Heat transfer(in N-m):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat transferred (N-m): \",Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred (N-m): 50675.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21, page no. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "v1=0.3 #Volume of bottle(in m**3):\n",
+ "p1=35.0 #Pressure in the bottle(in bar):\n",
+ "T1=40.0+273.0 #Temperature in the bottle(in K):\n",
+ "w1=5.0 #Turbo generator's actual output(in kJ/s):\n",
+ "p2=1.0 #Final prssure(in bar):\n",
+ "v2=v1 #Final volume(in m**3):\n",
+ "Ra=0.287 #Gas constant for air(in kJ/kg.K):\n",
+ "r=1.4 #Compression ratio:\n",
+ "Cv=0.718 #Specific heat at const volume(in kJ/kg):\n",
+ "Cp=1.005 #Specific heat at const pressure(in kJ/kg):\n",
+ "\n",
+ "#Calculation:\n",
+ "T2=T1*(p2/p1)**((r-1)/r) #Final temperature(in K):\n",
+ "m1=p1*10**2*v1/(Ra*T1) #Initial mass in the bottle(in kg):\n",
+ "m2=p2*10**2*v2/(Ra*T2) #Final mass in the bottle(in kg):\n",
+ "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2 #Maximum work that can be obtained(in kJ):\n",
+ "i=w1/0.6 #Input to the turbo generator(in kJ/s):\n",
+ "t=W/round(i,2) #Time duration(in s):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Duration (Seconds): \",round(t,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Duration (Seconds): 159.11\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22, page no. 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math as M\n",
+ "#Variable Declaration: \n",
+ "p1=1.5 #Pressure at state 1(in bar):\n",
+ "T1=77+273 #Temperature at state 1(in K):\n",
+ "p2=7.5 #Pressure at state 2(in bar):\n",
+ "m=3 #Mass of the air(in kg):\n",
+ "n=1.2 #Value of n:\n",
+ "Ra=0.287 \n",
+ "\n",
+ "#Calculation:\n",
+ "T2=T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n",
+ "v1=m*Ra*T1/(p1*10**2) #Initial volume(in m**3):\n",
+ "v2=(p1*(v1**n)/p2)**(1/n) #Volume at state 2(in m**3):\n",
+ "T3=T1 #Temperature at state 3(in K):\n",
+ "v3=v2*T3/T2 #Volume at state 3(in m**3):\n",
+ "p3=7.5 #Pressure at state 3(in bar):\n",
+ "W12=m*Ra*(T2-T1)/(1-n) #Compression work during process 1-2(in kJ):\n",
+ "W23=p2*(10**2)*(v3-v2) #Work during process 2-3(in kJ):\n",
+ "W31=p3*10**2*v3*M.log(v1/v3) #Work during process 3-1(in kJ):\n",
+ "Wn=W12+W23+W31 #Net work(in kJ):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat transferred from the system (kJ): \",round(-Wn,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred from the system (kJ): 71.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23, page no. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "v1=0.15 #Volume of air bottle(in m**3):\n",
+ "p1=40 #Initial pressure(in bar):\n",
+ "T1=27+273 #Initial temperature(in K):\n",
+ "p2=2.0 #Final presure(in bar):\n",
+ "Ra=0.287 #Gas constant for air(in kJ/kg):\n",
+ "Cp=1.005 #Specific heat at const pressure(in kJ/kg):\n",
+ "Cv=0.718 #Specific heat at const volume(in kJ/kg):\n",
+ "r=1.4 #Compression ratio:\n",
+ "\n",
+ "#Calculation:\n",
+ "v2=v1 #Final volume(in m**3):\n",
+ "m1=p1*10**2*v1/(Ra*T1) #Initial mass of air in bottle(in kg):\n",
+ "T2=T1*(p2/p1)**((r-1)/r) #Final temperature(in K):\n",
+ "m2=p2*10**2*v2/(Ra*T2) #Final mass of air in bottle(in kg):\n",
+ "E=m1*Cv*T1-m2*Cv*T2-(m1-m2)*Cp*T2 #Energy available for running of turbine due to emptying of bottle(in kJ):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Work available from turbine(KJ):\",round(E,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work available from turbine(KJ): 638.33\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter4.ipynb b/Applied_Thermodynamics/Chapter4.ipynb
new file mode 100755
index 00000000..bac8596d
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter4.ipynb
@@ -0,0 +1,765 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e33e7b5760e325e5ce218821a1f69234bfd752dae7d88964f3e66dde5271fa8e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 400+273.0 #Highest temperature(in K):\n",
+ "T2 = 15+273.0 #Lowest temperature(in K):\n",
+ "w = 200 #Work produced(in kJ):\n",
+ "\n",
+ "#Calculation:\n",
+ "Q1 = w/(1-T2/T1) #Heat to be supplied(in kJ): #Ratio of Q1 to Q2 is same as T1 to T2\n",
+ "#Results:\n",
+ "print \"Heat to be supplied: \",round(Q1,1),\"KJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat to be supplied: 349.6 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 42+273.0 #Upper temperature(in K):\n",
+ "T2 = 4+273.0 #Lower temperature(in K):\n",
+ "Q2 = 2.0 #Rate at which heat is extracted(in kJ/s):\n",
+ "\n",
+ "#Calculation:\n",
+ "Q1 = T1/T2*Q2 #Heat to be supplied(in kJ/s):\n",
+ "P = Q1-Q2 #Power required(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Power required for driving the refrigerator: \",round(P,3),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required for driving the refrigerator: 0.274 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "T1 = 827+273.0 #Source temperature(in K):\n",
+ "T2 = 27+273.0 #Sink temperature(in K):\n",
+ "T3 = -13+273.0 #Temperature in the refrigerator(in K):\n",
+ "Q1 = 2000.0 #Heat input(in kJ):\n",
+ "W = 300.0 #Net work available(in kJ):\n",
+ "\n",
+ "#Calculation:\n",
+ "Q2 = Q1*T2/T1 #Rate at which heat is extracted(in kJ):\n",
+ "We = Q1-Q2 #Work in the engine(in kJ):\n",
+ "Wr = We-W #Work in the refrigerator(in kJ):\n",
+ "Q3 = Wr/(T2/T3-1) #Heat transferred to the refrigerant(in kJ):\n",
+ "Q4 = Q3+Wr #Heat transferred to reservoir by refrigerant(in kJ):\n",
+ "Wt = Q2+Q4 #Total heat transferred to low temperature reservoir(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat transferred to refrigerant: \",round(Q3,2),\"KJ\"\n",
+ "print \"Total heat transferred to low temperature reservoir: \",round(Wt,2),\"KJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred to refrigerant: 7504.55 KJ\n",
+ "Total heat transferred to low temperature reservoir: 9204.55 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 25+273.15 #Temperature inside the house(in K):\n",
+ "T2 = -1+273.15 #Temperature outside the house(in K):\n",
+ "Q1 = 125.0 #Heating load(in MJ/h):\n",
+ "\n",
+ "#Calculation:\n",
+ "COP = 1/(1-T2/T1) #COP:\n",
+ "W = Q1/COP #Minimum power required(in MJ/h):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Minimum power required: \",round(W,2), \"MJ/h\"\n",
+ "print \"Minimum power required: \",round(W*10**3/3600,2), \"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum power required: 10.9 MJ/h\n",
+ "Minimum power required: 3.03 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = -15+273.16 #Inside temperature(in K):\n",
+ "T2 = 35+273 #Atmospheric temperature(in K):\n",
+ "Q2 = 140.8 #Heat to be extracted (in kW):\n",
+ "\n",
+ "#Calculation:\n",
+ "COP1 = 1/(T2/T1-1) #Carnot COP of plant:\n",
+ "COP = COP1/4 #Actual COP:\n",
+ "W = Q2/COP #Power required(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Power required: \",round(W,2),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required: 108.73 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 1150+273.0 #Maximum temperature(in K):\n",
+ "T2 = 27+273.0 #Minimum temperature(in K):\n",
+ "\n",
+ "#Calculation:\n",
+ "n = 1-(T2/T1) #Efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Efficiency: \",round(n*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency: 78.92 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 27+273 #Maximum temperature(in K):\n",
+ "T2 = -8+273 #Minimum temperature(in K):\n",
+ "Q = 7.5/60 #Leakage(in kJ/s):\n",
+ "\n",
+ "#Calculation:\n",
+ "W = (T1-T2)*Q/T2 #Power required(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Power required: \" ,round(W,4),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required: 0.0165 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from sympy import *\n",
+ "from sympy import symbols,simplify,numer,denom,collect,Wild\n",
+ "from sympy.solvers import solve\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Tso = 1100 #Temperature of Source (K):\n",
+ "Ts = 300 #Temperature of Sink (K):\n",
+ "W1,Q1,T1,W2,Q2,T2,W3,Q3,T3 = symbols('W1,Q1,T1,W2,Q2,T2,W3,Q3,T3') #Creating symbolic Variables required:\n",
+ "p = Wild('p')\n",
+ "q = Wild('q')\n",
+ "\n",
+ "#Calculations:\n",
+ "HE1 = 1-T2/Tso #Engine 1 Efficiency:\n",
+ "Q1 = W1/HE1\n",
+ "Q2 = Q1 - W1 #Energy balance equation:\n",
+ "#W2byW1 = simplify((Q2*(1-(T3/T2)))/W1)\n",
+ "W2byW1 = (T2-T3)/(1100-T2)\n",
+ "EQ1 = 3*numer(W2byW1)-2*denom(W2byW1) #Creating EQ1 using above symbolic manipulation and given W1:W2 ratio of 3:2\n",
+ "HE2 = simplify(1 - T3/T2) #Engine 2 Efficiency:\n",
+ "Q2 = W2 + Q3 #Energy balance equation:\n",
+ "\n",
+ "\n",
+ "expr = W2*denom(HE2)-Q2*numer(HE2)\n",
+ "a = collect(simplify(expr),[W2,Q3]).match(-p*Q3+q)\n",
+ "\n",
+ "Q3 = a[q]/a[p]\n",
+ "HE3 = simplify(1-Ts/T3)\n",
+ "#W3byW2 = HE3*Q3/W2\n",
+ "W3byW2 = (T3/(T2-T3))*((T3-300)/T3)\n",
+ "EQ2 = 2*numer(W3byW2)-1*denom(W3byW2) #Creating EQ1 using above symbolic manipulation and given W2:W3 ratio of 2:1\n",
+ "Sol = solve([EQ1,EQ2],[T2,T3]) #Solving the two generated symbolic equations:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Intermediate Temperature, T2: \",Sol[T2],\"K\"\n",
+ "print \"Intermediate Temperature, T3: \",round(Sol[T3],2),\"K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intermediate Temperature, T2: 700 K\n",
+ "Intermediate Temperature, T3: 433.33 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 800.0 #Temperature at which heat is receieved (in K):\n",
+ "T2 = 280.0 #Temperature maintained by the carnot engine(in K):\n",
+ "\n",
+ "#Calculation:\n",
+ "T = 2*T1*T2/(T1+T2) #Temperature at which heat is rejected(in K):\n",
+ "n = (T1-T)/T1 #Efficiency:\n",
+ "COP = T2/(T-T2) #COP of refrigerator:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Efficiency: \",round(n,4)\n",
+ "print \"COP of refrigerator: \" ,round(COP,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Efficiency: 0.4815\n",
+ "COP of refrigerator: 2.077\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "#Variable Declaration: \n",
+ "n = 0.5 #Efficiency of carnot cycle:\n",
+ "m = 0.5 #Mass of air(in kg):\n",
+ "p2 = 7*10**5 #Initial pressure(in Pa):\n",
+ "v2 = 0.12 #Initial volume(in m**3):\n",
+ "Q23 = 40 #Heat transferred during the process 2-3(in kJ):\n",
+ "Cp = 1.008 #Specific heat at const pressure(in kJ/kg):\n",
+ "Cv = 0.721 #Specific heat at const volume(in kJ/kg):\n",
+ "Ra = 287 #Gas constant for air:\n",
+ "Q12 = 0 #Heat transfer in process 1-2(in kJ):\n",
+ "Q34 = 0 #Heat transfer in process 3-4(in kJ):\n",
+ "\n",
+ "#Calculation:\n",
+ "T2 = p2*v2/(m*Ra) #Maximum temperature of the cycle(in K):\n",
+ "T1 = T2/2 #Minimum temperature(in K):\n",
+ "v3 = v2*(math.e**(Q23/(m*Ra*10**(-3)*T2))) #Volume at state 3(in m**3):\n",
+ "r = Cp/Cv #Compression factor:\n",
+ "p1 = p2/((T2/T1)**(r/(r-1))) #Pressure at point 1(in Pa):\n",
+ "v1 = m*Ra*T1/p1 #Volume at point 1(in m**3):\n",
+ "T3 = T2 #Temperature at state 3(in K):\n",
+ "T4 = T1 #Temperature at state 4(in K):\n",
+ "W12 = -m*Cv*(T2-T1) #During process 1-2, work done(in kJ):\n",
+ "W23 = Q23 #Work done in process 2-3(in kJ):\n",
+ "W34 = -m*Cv*(T4-T3) #During process 3-4, work done(in kJ):\n",
+ "W41 = -W23 #During process 4-1, work done(in kJ):\n",
+ "Q41 = -Q23 #Heat transfer in process 4-1(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Process Heat transfer Work interaction\"\n",
+ "print \" 1-2 \",Q12,\"KJ \",round(W12,2)\n",
+ "print \" 2-3 \",Q23,\"KJ \",W23\n",
+ "print \" 3-4 \",Q34,\"KJ \",round(W34,2)\n",
+ "print \" 4-1 \",Q41,\"KJ \",W41\n",
+ "print \"Maximum temperature of the cycle: \",round(T2,2),\"KJ\"\n",
+ "print \"Minimum temperature of the cycle: \",round(T1,2),\"KJ\"\n",
+ "print \"Volume at the end of the expansion:\",round(v3,4),\"m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Process Heat transfer Work interaction\n",
+ " 1-2 0 KJ -105.51\n",
+ " 2-3 40 KJ 40\n",
+ " 3-4 0 KJ 105.51\n",
+ " 4-1 -40 KJ -40\n",
+ "Maximum temperature of the cycle: 585.37 KJ\n",
+ "Minimum temperature of the cycle: 292.68 KJ\n",
+ "Volume at the end of the expansion: 0.1932 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "Q1 = 5000 #Heat drawn from 400 K reservoir(in kJ):\n",
+ "W = 840 #Work output(in kJ):\n",
+ "\n",
+ "#Calculation:\n",
+ "Q2 = 3*(Q1/2-W) #Value of heat from heat engine(in kJ):\n",
+ "Q3 = Q1-W-Q2 #Value of heat to heat engine(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Q2 =\",Q2,\"kJ from heat engine\"\n",
+ "print \"Q3 =\",-Q3,\"kJ to heat engine\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q2 = 4980 kJ from heat engine\n",
+ "Q3 = 820 kJ to heat engine\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T3 = 3+273 #Temperature of the reservoir(in K):\n",
+ "T1 = 77+273 #Lower temperature limit(in K):\n",
+ "T2 = 1077+273 #Higher temperature limit(in K):\n",
+ "E = 100 #Energy supplied to the reservoir(in kJ/s):\n",
+ "\n",
+ "#Calculation:\n",
+ "n = 1-T1/T2 #Efficiency:\n",
+ "Q1 = 26.71 #Solving all the equations, we get: #It is given that Q2+Q4 = E #We get Q4 = 1.27*Q3\t\t\n",
+ "#COP for heat pump = Q4/(Q4-Q3) = T1/(T1-T3)\t\t\t\t#We get Q2 = 0.2593*Q1\t\t\t\t#n = 1-Q2/Q1\t\t\t\t\n",
+ "#Energy taken from the reservoir Q1 can be found by solving the simultaneous equations\n",
+ "\n",
+ "#Results:\n",
+ "print \"Energy taken from reservoir at 1077\u00baC: \",round(Q1,2),\"KJ\"\t\t\t\t#Results: "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy taken from reservoir at 1077\u00baC: 26.71 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "Qs = 2000.0 #Heat supplied(in kJ/s):\n",
+ "Tso = 1500 #Temperature of source(in K):\n",
+ "Tr = 15+273 #Temperature at which heat is rejected(in K):\n",
+ "Qt = 3000 #Total heat received(in kJ/s):\n",
+ "\n",
+ "#Calculation:\n",
+ "Qr = Qt-Qs #Heat rejected(in kJ/s):\n",
+ "Ts = Qt/(Qs/Tso+Qr/Tr) #Temperature of the sink(in K):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Temperature of the sink: \",round(Ts,2),\"K\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of the sink: 624.28 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "T1 = 500+273.0 #Maximum temperature(in K):\n",
+ "T2 = 200+273.0 #Minimum temperature(in K):\n",
+ "T3 = 450+273.0 #Temperature of the body(in K):\n",
+ "\n",
+ "#Calculation:\n",
+ "n = 1-T2/T1 #Efficiency:\n",
+ "r1 = n #Ratio of W to Q1:\n",
+ "COP = T3/(T3-T2) #COP of pump:\n",
+ "r2 = COP*2/3 #Ratio of Q3 to W:\n",
+ "r3 = r1*r2 #Ratio of Q3 to Q1:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Ratio of heat rejected to body at 450C to the heat supplied by the reservoir: \",round(r3,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of heat rejected to body at 450C to the heat supplied by the reservoir: 0.7483\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "W,Q1,Q2,Q3,T1,T2,T3 = symbols('W,Q1,Q2,Q3,T1,T2,T3') #Creating symbolic variables:\n",
+ "\n",
+ "#Calculations:\n",
+ "n = 1 - T3/T1 #Efficiency of heat engine:\n",
+ "COP = T2/(T3-T2) #COP of refrigerator:\n",
+ "r = 1/(n*COP) #Ratio of Q1:Q3 :\n",
+ "\n",
+ "#Results:\n",
+ "print \"Ratio of heat supplied from source to heat absorbed from cold body: \",(simplify(r))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of heat supplied from source to heat absorbed from cold body: "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-T1*(T2 - T3)/(T2*(T1 - T3))\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 900+273.0 #Maximum temperature(in K):\n",
+ "T2 = 50+273.0 #Minimum temperature(in K):\n",
+ "T3 = 50+273.0 #Temperature of the 3rd reservoir(in K):\n",
+ "T4 = 10+273.0 #Temperature of the 4th reservoir(in K):\n",
+ "Q3 = 15.0 #Heat picked up by Carnot cycle(in kW):\n",
+ "E = 25.0 #Energy required to run a machine(in kW):\n",
+ "\n",
+ "#Calculation:\n",
+ "n = 1-T2/T1 #Efficiency:\n",
+ "Q4 = Q3*T3/T4 #From the relation of COP:\n",
+ "Whp = Q4-Q3 #Work by heat pump(in kW):\n",
+ "Whe = Whp+E #Work in the heat engine(in kW):\n",
+ "Q1 = Whe/n #Heat from source at 1173 K(in kW):\n",
+ "Q2 = Q1-Whe #Heat rejected to the reservoir from engine 1(in kW):\n",
+ "Qt = Q2+Q4 #Total heat rejected to the reservoir(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat rejected to the reservoir: \",round(Qt,3),\"KW\" \n",
+ "print \"Heat received from the highest temperature reservoir: \",round(Q1,3),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat rejected to the reservoir: 27.426 KW\n",
+ "Heat received from the highest temperature reservoir: 37.426 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page no. 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "v1 = 1.8 #Volume of 1st tank(in m**3):\n",
+ "v2 = 3.6 #Volume of 2nd tank(in m**3):\n",
+ "p1 = 12 #Initial pressure(in bar):\n",
+ "T1 = 40+273 #Initial temperature(in K):\n",
+ "R = 0.208 #Gas constant for argon(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "pf = p1*v1/(v1+v2) #By gas law for final and initial state:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Final pressure: \",round(pf),\"bar\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final pressure: 4.0 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter5.ipynb b/Applied_Thermodynamics/Chapter5.ipynb
new file mode 100755
index 00000000..0c11c57f
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter5.ipynb
@@ -0,0 +1,879 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c0f28306b8717687dd43e0cba515058fc2c63cfc2e10a436e8c618a282c7ae33"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: Entropy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 5 #Initial pressure(in bar):\n",
+ "T1 = 300 #Initial temperature(in K):\n",
+ "p2 = 2 #Final pressure(in bar):\n",
+ "Cp = 1.004 #Cp for air(in kJ/kg.K):\n",
+ "R = 0.287 #Gas constant for air(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "T2 = T1 #As it is a throttling process:\n",
+ "dS = Cp*log(T2/T1)-R*log(p2/p1)\t#Change in entropy(in kJ/kg.K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Change in entropy: \",round(dS,3),\"KJ/Kg.K\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy: 0.263 KJ/Kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 5 #Mass of water(in kg):\n",
+ "T1 = 27+273.16 #Atmospheric temperature(in K):\n",
+ "T2 = 100+273.16 #Temperature of evaporation(in K):\n",
+ "T3 = 400+273.16 #Temperature at which steam is generated(in K):\n",
+ "Cp = 4.2 #Specific heat of water(in kJ/kg.K):\n",
+ "q2 = 2260 #Heat of vaporisation(in kJ/kg):\n",
+ "T = symbols('T') #Symbolic variable for Temperature:\n",
+ "R = 8.314 #Universal gas constant:\n",
+ "ms = 18 #Molar mass of steam (in g):\n",
+ "\n",
+ "#Calculation:\n",
+ "Q1 = m*Cp*(T2-T1) #Heat added for increasing water temperature from 27C to 100C(in kJ):\t\t\t\t\n",
+ "dS1 = Q1/T1 #Entropy change during water temperature rise(in kJ/K):\n",
+ "Q2 = m*q2 #Heat of vaporization(in kJ):\n",
+ "dS2 = Q2/T2 #Entropy change during water to steam change(in kJ/K):\n",
+ "Rs = round(R/ms,3) #Value of R for steam (KJ/Kg.K)\n",
+ "CP = Rs*(3.5+1.2*T+0.14*T**2) #Molar heat capacity at constant pressure for steam(J/Kg.K)\n",
+ "dQ = m*10**-3*CP\n",
+ "dS3 = round(integrate(apart(dQ/T),(T,T2,T3)),2)\n",
+ "dS = dS1+dS2+dS3 #Total entropy change(in kJ/K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"!--- Small differences in error is due to integration approximation in coding ---!\"\n",
+ "print \"Total change in entropy of universe: \",round(dS,2),\"KJ/K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "!--- Small differences in error is due to integration approximation in coding ---!\n",
+ "Total change in entropy of universe: 86.98 KJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 125 #Initial pressure(in kPa):\n",
+ "p2 = 375 #Final pressure(in kPa):\n",
+ "T1 = 27+273 #Intial temperature(in K):\n",
+ "R = 8.314/32 #Gas constant for oxygen(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "dS = -R*log(p2/p1) #Change in entropy(in kJ/kg.K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Change in entropy: \",round(dS,3),\"KJ/Kg.K\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy: -0.285 KJ/Kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 1 #Mass of the block(in kg):\n",
+ "T1 = 150+273.15 #Temperature of the block(in K):\n",
+ "T2 = 25+273.15 #Temperature of the sea(in K):\n",
+ "C = 0.393 #Heat capacity of copper(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "dSb = m*C*log(T2/T1) #Change in entropy of block(in kJ/K):\n",
+ "Q = m*C*(T1-T2) #Heat lost by water(in kJ): #Heat lost by the block will be equal to heat gained by the water\n",
+ "dSw = round(Q/T2,3) #Change in entropy of water(in kJ/K):\n",
+ "dSu = dSb+dSw #Entropy change of universe(in kJ/K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Change in entropy of universe: \",round(dSu*10**3,1),\"J/K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy of universe: 27.4 J/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 1 #Mass of the block(in kg):\n",
+ "T = 27+273 #Temperature of the block(in K):\n",
+ "h = 200 #Height(in m):\n",
+ "s = 0.393 #Heat capacity for copper(in kJ/kg.K):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "PE = m*g*h #Change in potential energy(in J):\n",
+ "Q = PE #In this case:\n",
+ "dSu = Q/T #Change in entropy of universe(in J/kg.K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Change in entropy of universe: \" ,round(dSu,2),\"J/kg.K\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy of universe: 6.54 J/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m1 = 1 #Mass(in kg) of Block 1:\n",
+ "T1 = 150+273 #Temperature(in K):\n",
+ "C1 = 0.393 #Specific heat(in kJ/kg.K):\n",
+ "m2 = 0.5 #Mass(in kg) of Block 2:\n",
+ "T2 = 0+273 #Temperature(in K):\n",
+ "C2 = 0.381 #Specific heat(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "Tf = (m1*C1*T1+m2*C2*T2)/(m1*C1+m2*C2) #Final temperature(in K):\n",
+ "dS1 = m1*C1*log(Tf/T1) #Entropy change in block 1(in kJ/K):\n",
+ "dS2 = m2*C2*log(Tf/T2) #Entropy change in block 2(in kJ/K):\n",
+ "dS = dS1+dS2 #Total entropy change(in kJ/K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Change in entropy of universe: \",round(dS,4),\"J/K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy of universe: 0.0116 J/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 1800 #Maximum temperature(in K):\n",
+ "T2 = 300 #Minimum temperature(in K):\n",
+ "Q1 = 5 #Rate at which heat is added(in MW):\n",
+ "W = 2 #Work output(in MW):\n",
+ "\n",
+ "#Calculation:\n",
+ "Q2 = Q1-W #Heat rejected(in MW):\n",
+ "dSg = (-Q1/T1+Q2/T2) #Entropy generated(in MW/K):\n",
+ "w = T2*dSg #Work lost(in MW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Work lost: \",round(w,2),\"MW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work lost: 2.17 MW\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 500 #Temperature of the system(in K):\n",
+ "T2 = 300 #Temperature of the reservoir(in K):\n",
+ "T = symbols('T') #Symbolic representation of tempreture:\n",
+ "\n",
+ "#Calculation:\n",
+ "C = 0.05*T**2 + 0.10*T + 0.085 #Heat Capacity:\n",
+ "Q1 = integrate(C,(T,T2,T1)) #Maximum heat(in J):\n",
+ "dSs =integrate(apart(C/T),(T,T1,T2)) #Entropy change of the system(in J/K):\n",
+ "W = (Q1/T2+dSs)*T2 #Maximum work available(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Maximum work: \",round(W/(10**3),2),\"KJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum work: 435.34 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 3000 #Initial pressure(in kPa):\n",
+ "v1 = 0.05 #Initial volume(in m**3):\n",
+ "v2 = 0.3 #Final volume(in m**3):\n",
+ "n = 1.4 #Value of n:\n",
+ "dS = 0 #Entropy change:\n",
+ "T,P = symbols('T,P') #Symbolic expressions for T and P respectively\n",
+ "\n",
+ "#Calculation:\n",
+ "p2 = round(p1*((v1/v2)**n)) #Final pressure(in MPa):\n",
+ "V = (p1*v1**n/P)**(1/n)\n",
+ "dH = integrate(V,(P,p2,p1)) #Change in enthalpy(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Enthalpy change: \",round(dH,1),\"KJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy change: 268.7 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 2 #Mass of air(in kg):\n",
+ "v1 = 1 #Initial volume(in m**3):\n",
+ "v2 = 10 #Final volume(in m**3):\n",
+ "R = 287 #Gas const(in J/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "dSa = m*R*log(v2/v1) #Change in entropy of air(in J/K):\n",
+ "dSs = 0 #During free expansion, entropy change of surroundings(in J/K):\n",
+ "dSu = dSa+dSs #Entropy change of universe(in J/K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Entropy change of air: \",round(dSa,2),\"J/K\" \n",
+ "print \"Entropy change of surroundings: \",round(dSs),\"J/K\"\n",
+ "print \"Entropy change of universe: \",round(dSu,2),\"J/K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change of air: 1321.68 J/K\n",
+ "Entropy change of surroundings: 0.0 J/K\n",
+ "Entropy change of universe: 1321.68 J/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 0.5 #Mass of air(in kg):\n",
+ "p1 = 1.013*10**5 #Initial pressure(in Pa):\n",
+ "p2 = 0.8*10**6 #Final pressure(in Pa):\n",
+ "T1 = 800 #Initial temperature(in K):\n",
+ "n = 1.2 #Index of compression:\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "Cv = 0.71*10**3 #Value of Cv(in J/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "T2 = T1*((p2/p1)**((n-1)/n)) #Final temperature(in K):\n",
+ "dS = m*Cv*((n-r)/(n-1))*log(T2/T1) #Total entropy change(in J/K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Entropy change: \",abs(round(dS,2)),\"J/K\"\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change: 122.27 J/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Q1 = 500 #Heat supplied by source (Kcal/s)\n",
+ "T1 = 600 #Temperature of source(K):\n",
+ "T2 = 300 #Temperature of sink(K):\n",
+ "def feasibility(Q2):\n",
+ " Y = Q1/T1 - Q2/T2\n",
+ " if(Y>0):\n",
+ " return \"Under this condition engine is not possible\"\n",
+ " elif (Y<0):\n",
+ " return \"Engine is feasible and cycle is irreversible\"\n",
+ " elif (Y==0):\n",
+ " return \"Engine is feasible and cycle is reversible\"\n",
+ "\n",
+ "#Results:\n",
+ "print \"(i) If heat rejected at 200 Kcal/s then \",feasibility(200)\n",
+ "print \"(ii) If heat rejected at 400 Kcal/s then \",feasibility(400)\n",
+ "print \"(iii) If heat rejected at 250 Kcal/s then \",feasibility(250) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) If heat rejected at 200 Kcal/s then Under this condition engine is not possible\n",
+ "(ii) If heat rejected at 400 Kcal/s then Engine is feasible and cycle is irreversible\n",
+ "(iii) If heat rejected at 250 Kcal/s then Engine is feasible and cycle is reversible\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 0.5 #Pressure at point 1(in MPa):\n",
+ "T1 = 400 #Temperature at point 1(in K):\n",
+ "p2 = 0.3 #Pressure at point 2(in MPa):\n",
+ "T2 = 350 #Temperature at point 2(in K):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cp = 1.004 #Value of Cp(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "ds = Cp*log(T1/T2)-R*log(p1/p2) #Entropy change(in kJ/kg.K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Change in entropy: \",round(ds,5),\"KJ/Kg.K\"\n",
+ "print \"Hence flow occurs from 1 to 2 i.e. from 0.5 MPa, 400 K to 0.3 MPa & 350 K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy: -0.01254 KJ/Kg.K\n",
+ "Hence flow occurs from 1 to 2 i.e. from 0.5 MPa, 400 K to 0.3 MPa & 350 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Q12 = 1000 #Heat added in process 1-2(in kJ):\n",
+ "Q34 = 800 #Heat added in process 3-4(in kJ):\n",
+ "T1 = 500 #Temperature at point 1(in K):\n",
+ "T3 = 400 #Temperature at point 3(in K):\n",
+ "T5 = 300 #Temperature at point 5(in K):\n",
+ "\n",
+ "#Calculation:\n",
+ "Qt = Q12+Q34 #Total heat added(in kJ):\n",
+ "S12 = Q12/T1 #Entropy change from state 1-2(in kJ/K):\n",
+ "S34 = Q34/T3 #Entropy change from state 3-4(in kJ/K):\n",
+ "S56 = S12+S34 #Entropy change from state 5-6(in kJ/K):\n",
+ "Q56 = T5*S56 #Heat rejected in process 5-6(in kJ):\n",
+ "W = Q12+Q34-Q56 #Net work done(in kJ):\n",
+ "n = W/Qt #Thermal efficiency of the cycle:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Work done: \",round(W),\"KJ\" \n",
+ "print \"Thermal efficiency: \",round(n*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done: 600.0 KJ\n",
+ "Thermal efficiency: 33.33 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "#Variable Declaration: \n",
+ "T1 = 800 #Temperature of the reservoirs(in K):\n",
+ "T2 = 700\n",
+ "T3 = 600\n",
+ "T4 = 320 #Temperature of the sink(in K):\n",
+ "Q2 = 10 #Total heat rejected to the heat sink(in kJ/s):\n",
+ "W = 20 #Work done(in kW):\n",
+ "Q11,Q12,Q13 = symbols('Q11,Q12,Q13')\n",
+ "\n",
+ "#Calculation:\n",
+ "Q1 = Q2+W #Total heat added(in kJ/s):\n",
+ "EQ1 = 0.7*Q12 - Q11 #Heat from reservoir 1(in kJ/s) formed as equation:\n",
+ "EQ2 = Q1-1.7*Q12 - Q13 #Heat from reservoir 3(in kJ/s) formed as equation:\n",
+ "EQ3 = Q11/T1 + Q12/T2 +Q13/T3 - Q2/T4 #For reversible engine\n",
+ "result = solve([EQ1,EQ2,EQ3],[Q11,Q12,Q13])\n",
+ "\n",
+ "#Results:\n",
+ "print \"!!!--There are some error in calculations in the book --!\"\n",
+ "print \"Heat supplied by reservoir at 800 K: \",round(result[Q11],2),\"KJ/s\" \n",
+ "print \"Heat supplied by reservoir at 700 K: \",round(result[Q12],2),\"KJ/s\"\n",
+ "print \"Heat supplied by reservoir at 600 K: \",round(result[Q13],2),\"KJ/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "!!!--There are some error in calculations in the book --!\n",
+ "Heat supplied by reservoir at 800 K: 24.78 KJ/s\n",
+ "Heat supplied by reservoir at 700 K: 35.39 KJ/s\n",
+ "Heat supplied by reservoir at 600 K: -30.17 KJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page no. 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "#Variable Declaration: \n",
+ "v1 = 0.04 #Volume of the chamber(in m**3):\n",
+ "p1 = 10 #Initial pressure(in bar):\n",
+ "T1 = 25+273 #Initial temperature(in K):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cv = 0.71 #Value of Cv(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "T2 = T1 #Final temperature(in K):\n",
+ "v2 = 2*v1 #Final volume(in m**3):\n",
+ "p2 = p1*v1/v2 #Final pressure(in bar):\n",
+ "m = p1*10**2*v1/(R*T1) #Initial mass(in kg):\n",
+ "dS = m*R*log(v2/v1)+m*Cv*log(T2/T1)\t#Change in entropy(in kJ/K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Entropy change: \",round(dS,5), \"KJ/K\" \n",
+ "print \"The process is irreversible\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change: 0.09304 KJ/K\n",
+ "The process is irreversible\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20, page no. 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "ma = 0.6 #Mass in tank A(in kg):\n",
+ "mb = 1 #Mass in tank B(in kg):\n",
+ "Ta = 90+273 #Temperature in tank A(in K):\n",
+ "Tb = 45+273 #Temperature in tank B(in K):\n",
+ "pa = 1 #Pressure in tank A(in bar):\n",
+ "pb = 2 #Pressure in tank B(in bar):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cp = 1.005 #Value of Cp(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "Tf = (ma*Ta+mb*Tb)/(ma+mb) #Final temperature(in K):\n",
+ "va = ma*R*Ta/pa #Volume of tank A(in m**3):\n",
+ "vb = mb*R*Tb/pb #Volume of tank B(in m**3):\n",
+ "pf = (ma+mb)*R*Tf/(va+vb) #Final pressure(in kPa):\n",
+ "dS = ma*(Cp*log(Tf/Ta)-R*log(pf/pa))+mb*(Cp*log(Tf/Tb)-R*log(pf/pb)) #Entropy change(in kJ/K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Final Pressure: \",round(pf,2),\"KPa\"\n",
+ "print \"Entropy produced: \",round(dS,5),\"KJ/K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final Pressure: 1.42 KPa\n",
+ "Entropy produced: 0.04061 KJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21, page no. 159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "va = 4 #Volume of the tanks(in m**3):\n",
+ "vb = 4\n",
+ "vc = 4\n",
+ "pa = 6 #Pressure in tank A(in bar):\n",
+ "Ta = 90+273 #Temperature in tank A(in K):\n",
+ "pb = 3 #Pressure in tank B(in bar):\n",
+ "Tb = 300+273 #Temperature in tank B(in K):\n",
+ "pc = 12 #Pressure in tank C(in bar):\n",
+ "Tc = 50+273 #Temperature in tank C(in K):\n",
+ "Ra = 0.287 #Gas constant for air(in kJ/kg.K):\n",
+ "Rn = 0.297 #Gas constant for nitrogen(in kJ/kg.K):\n",
+ "ra = 1.4 #Adiabatic index of compression for air:\n",
+ "rn = 1.4 #Adiabatic index of compression for nitrogen:\n",
+ "Cp = 1.005 #Value of Cp(in kJ/kg.K):\n",
+ "Cv = 0.718 #Value of Cv(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "ma = pa*10**2*va/(Ra*Ta) #Mass in tank A(in kg): #Part (i)\n",
+ "mb = pb*10**2*vb/(Ra*Tb) #Mass in tank B(in kg):\n",
+ "Td = (ma*Ta+mb*Tb)/(ma+mb) #Final temperature(in K):\n",
+ "pd = Ra*Td*(ma+mb)/((va+vb)*10**2) #Final pressure(in bar):\n",
+ "dS1 = ma*Cp*log(Td/Ta)-ma*Ra*log(pd/pa)+mb*Cp*log(Td/Tb)-mb*Ra*log(pd/pb) #Entropy change(in kJ/K):\n",
+ "mc = pc*10**2*vc/(Rn*Tc) #Mass in tank C(in kg): #Part (ii)\n",
+ "md = ma+mb #Mass in tank D(in kg):\n",
+ "Cvn = Rn/(rn-1) #Value of Cv for nitrogen(in kJ/kg.K):\n",
+ "Cpn = rn*Cvn #Value of Cp for nitrogen(in kJ/kg.K):\n",
+ "mf = md+mc #Total mass(in kg):\n",
+ "CvF = (md*Cv+mc*Cvn)/mf #Final Cv(in kJ/kg.K):\n",
+ "RF = (md*Ra+mc*Rn)/mf #Final gas constant(in kJ/kg.K):\n",
+ "TF = (md*Cv*Td+mc*Cvn*Tc)/(mf*CvF) #Final temperature(in K):\n",
+ "VF = va+vb+vc #Final volume(in m**3):\n",
+ "pF = mf*RF*TF/VF #Final pressure(in kPa):\n",
+ "dS2 = md*(Cp*log(TF/Td)-Ra*log(pF/(pd*10**2)))+mc*(Cpn*log(TF/Tc)-Rn*log(pF/(pc*10**2))) #Change in entropy(in kJ/K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Entropy change in case 1: \",round(dS1,3),\"KJ/K\"\n",
+ "print \"Entropy change in case 2: \",round(dS2,3),\"KJ/K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change in case 1: 1.677 KJ/K\n",
+ "Entropy change in case 2: 4.761 KJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter6.ipynb b/Applied_Thermodynamics/Chapter6.ipynb
new file mode 100755
index 00000000..d100fbbe
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter6.ipynb
@@ -0,0 +1,1088 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4c5adc7ff722a4bfcaaad47e052db064cf85c767ab3f0fe6ba8aa04ddc1a515a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: Thermodynamic Properties of Pure Substance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 10 #Pressure at which steam is entering(in MPa):\n",
+ "p2 = 0.05 #Pressure at which steam is coming out(in MPa):\n",
+ "T = 100 #Temperature of the steam(inC):\n",
+ "h2 = 2682.5 #Enthalpy of superheated steam at 0.05 MPa and 100 C(in kJ/kg): #From steam tables:\n",
+ "hf10 = 1407.56\n",
+ "hfg10 = 1317.1\n",
+ "\n",
+ "#Calculation:\n",
+ "h1 = h2 #Due to throttling:\n",
+ "x1 = (h1-hf10)/hfg10 #Dryness fraction:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Dryness fraction: \",round(x1,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction: 0.968\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p = 12 #Pressure(in MPa):\n",
+ "v = 0.017 #Specific volume(in m**3/kg):\n",
+ "h = 2848 #Enthaply(in kJ/kg):\n",
+ "\n",
+ "#Calculation:\n",
+ "u = h-p*10**3*v #Internal energy(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Internal energy: \",round(u),\"KJ/Kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal energy: 2644.0 KJ/Kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 5 #Mass of steam(in kg):\n",
+ "p = 2 #Pressure(in MPa):\n",
+ "Tss = 300+273.15 #Temperature of superheated steam(in K):\n",
+ "Cps = 2.1 #Specific heat of super heated steam(in kJ/kg.K):\n",
+ "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "hfg = 1890.7 #From steam tables:\n",
+ "\n",
+ "#Calculations:\n",
+ "Tsat = 212.42+273.15 #Saturation temperature(in K):\n",
+ "s = Cpw*log(Tsat/273.15)+hfg/Tsat+Cps*log(Tss/Tsat) #Entropy of unit mass of superheated steam with reference to absolute zero(in kJ/kg.K):\n",
+ "S = m*s #Entropy of 5 kg of steam(in kJ/K):\n",
+ "\n",
+ "#Result:\n",
+ "print \"Entropy of steam: \",round(S,2),\"KJ/K\"\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy of steam: 33.23 KJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration:\n",
+ "Tb = 110 #Boiling point(in\u00c2\u00b0C):\n",
+ "p = 143.27 #Pressure at which it boils(in kPa): #From steam table:\n",
+ "Tsat = 108.866 #From steam table this temperature(in \u00c2\u00b0C): #Boiling point at this depth = Tsat at 138.365\n",
+ "\n",
+ "#Calculation:\n",
+ "p1 = p-9.81*0.50 #Pressure at 50 cm depth(in kPa):\n",
+ "\n",
+ "#Result:\n",
+ "print \"Boiling point :\",round(Tsat,2),\"\u00b0C\"\t\t\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Boiling point : 108.87 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T = 100 #Temperature of the water vapor mixture(in \u00c2\u00b0C):\n",
+ "V = 0.5 #Volume of the rigid vessel(in m**3):\n",
+ "v2 = 0.003155 #Specific volume at state 2(in m**3/kg): #From steam tables:\n",
+ "vf = 0.001044\n",
+ "vg = 1.6729\n",
+ "\n",
+ "#Calculations:\n",
+ "v1 = v2 #Specific volume at state 1(in m**3/kg):\n",
+ "x1 = (v1-vf)/vg #Dryness fraction:\n",
+ "m = V/v2 #Total mass of fluid(in kg):\n",
+ "v = m*vf #Volume of water(in m**3):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass of water :\",round(m,2),\"Kg\" \n",
+ "print \"Volume of water :\",round(v,4),\"m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of water : 158.48 Kg\n",
+ "Volume of water : 0.1655 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p = 2 #Pressure(in MPa):\n",
+ "T = 500+273.15 #Temperature(in K):\n",
+ "\n",
+ "#Calculation:\n",
+ "s = T #Slope of isobar:(dh/ds)at constant pressure = T:\n",
+ "\n",
+ "#Result:\n",
+ "print \"Slope :\",s"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Slope : 773.15\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "x = 0.10 #Dryness fraction:\n",
+ "p = 0.15 #Pressure(in MPa):\n",
+ "hf = 467.11 #From steam tables:(at 0.15 MPa):\n",
+ "hg = 2693.6\n",
+ "vf = 0.001053\n",
+ "vg = 1.1593\n",
+ "sf = 1.4336\n",
+ "sg = 7.2233\n",
+ "\n",
+ "#Calculations:\n",
+ "h = hf+x*(hg-hf) #Enthalpy(in kJ/kg):\n",
+ "v = vf+x*(vg-vf) #Specific volume(in m**3/kg):\n",
+ "s = sf+x*(sg-sf) #Entropy(in kJ/kg.K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Enthalpy :\",h,\"KJ/Kg\"\n",
+ "print \"Specific volume :\",v,\"m**3/kg\"\n",
+ "print \"Entropy :\",s,\"KJ/Kg.K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy : 689.759 KJ/Kg\n",
+ "Specific volume : 0.1168777 m**3/kg\n",
+ "Entropy : 2.01257 KJ/Kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "#Initial State:\n",
+ "p1 = 1 #Pressure(in MPa):\n",
+ "V1 = 0.05 #Volume(in m**3):\n",
+ "x1 = 0.80 #Dryness fraction:\n",
+ "#Final state:\n",
+ "p2 = 1 #Pressure(in MPa):\n",
+ "V2 = 0.2 #Volume(in m**3):\n",
+ "\n",
+ "#From steam table:(at state 1):\n",
+ "vf = 0.001127 #(m3/kg) \n",
+ "vg = 0.19444 #(m3/kg)\n",
+ "uf = 761.68 #(kJ/kg)\n",
+ "ufg = 1822 #(kJ/kg)\n",
+ "\n",
+ "#Calculations:\n",
+ "W = p1*10**3*(V2-V1) #Work done(in kJ):\n",
+ "v1 = vf+x1*(vg-vf) #Specific volume at state 1(in m**3/kg):\n",
+ "m = V1/v1 #Mass of system(in kg):\n",
+ "v2 = V2/m #Specific volume at state 2(in m**3/kg):\n",
+ "Tf = 1077.61 #Temperature at final state(in C):\n",
+ "u2 = 4209.6 #Internal energy at final state(at 1077.61 C):\n",
+ "u1 = uf+x1*ufg #Internal energy at initial state(in kJ/kg):\n",
+ "Q = m*(u2-u1)+W #Heat added(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat added :\",round(Q,2),\"kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat added : 788.83 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 800 #Presure of the steam(in kPa):\n",
+ "T = 200 #Temperature(in \u00b0C)\n",
+ "Tsat = 170.43 #Saturation temp(in \u00b0C): \n",
+ "#From steam tables:\n",
+ "v1 = 0.2404 #Specific volume(in m**3/kg):\n",
+ "vgI = 0.2168\n",
+ "vgII = 0.2428\n",
+ "TI = 175\n",
+ "TII = 170\n",
+ "PI = 892\n",
+ "PII = 791.7\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = TI - (TI-TII)*(v1-vgI)/(vgII-vgI) #Final temperature after interpolation (in \u00b0C):\n",
+ "p2 = PI - (PI-PII)*(v1-vgI)/(vgII-vgI) #Final pressure after interpolation (in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Pressure :\",round(p2,2),\"kPa\"\n",
+ "print \"Temperature :\",round(T2,2),\"\u00b0C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure : 800.96 kPa\n",
+ "Temperature : 170.46 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "T = 30 #Temperature of water(in C):\n",
+ "p = 200 #Pressure(in kPa):\n",
+ "p1 = 4.25 #Corresponding pressure at 30 C(in kPa): #From steam tables:\n",
+ "v1 = 0.001004 #Specific volume(in m**3):\n",
+ "\n",
+ "#Calculations:\n",
+ "dh = v1*(p-p1) #Enthalpy change(in kJ/kg):\n",
+ "\n",
+ "#Result:\n",
+ "print \"Enthalpy change :\",dh,\"KJ/Kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy change : 0.196533 KJ/Kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "V1 = 3./5*2 #Volume occupied by water(in m**3):\n",
+ "V2 = 2./5*2 #Volume occupied by steam(in m**3):\n",
+ "#From steam table\n",
+ "vf = 0.001091 #(m**3/kg) \n",
+ "vg = 0.3928 #(m**3/kg)\n",
+ "\n",
+ "#Calculations:\n",
+ "mf = V1/vf #Mass of water(in kg):\n",
+ "mg = V2/vg #Mass of steam(in kg):\n",
+ "mt = mf+mg #Total mass(in kg):\n",
+ "x = mg/mt #Dryness fraction:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass :\",round(mt,2),\"kg\"\n",
+ "print \"Quality :\",round(x,6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass : 1101.95 kg\n",
+ "Quality : 0.001848\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p = 4 #Pressure of the steam(in MPa):\n",
+ "T1 = 300 #Temperature of steam entering(in \u00b0C):\n",
+ "T2 = 50 #Temperature of steam at turbine exit(in \u00b0C):\n",
+ "#From steam tables:\n",
+ "h1 = 2886.2 #kJ/kg \n",
+ "s1 = 6.2285 #kJ/kg.K\n",
+ "hf = 209.33 #kJ/kg\n",
+ "sf = 0.7038 #kJ/kg.K\n",
+ "hfg = 2382.7 #kJ/kg\n",
+ "sfg = 7.3725 #kJ/kg.K\n",
+ "\n",
+ "#Calculation:\n",
+ "s2 = s1 #Assumed\n",
+ "x2 = round((s2-sf)/sfg,4) #Dryness fraction:\n",
+ "h2 = hf+x2*hfg #Enthalpy at state 2(in kJ/kg):\n",
+ "W = h1-h2 #Turbine work(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Turbine output: \",round(W,2),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Turbine output: 891.27 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "m1 = 100 #Mass of steam(in kg):\n",
+ "p1 = 100 #Initial pressure(in kPa):\n",
+ "p2 = 1000 #Final pressure(in kPa):\n",
+ "x1 = 0.5 #Dryness fraction:\n",
+ "p3 = 2000 #Pressure of dry saturated steam(in kPa):\n",
+ "\n",
+ "#From steam tables:\n",
+ "hf100kPa = 417.46 #kJ/kg \n",
+ "uf100kPa = 417.36 #kJ/kg\n",
+ "vf100kPa = 0.001043 #m**3/kg\n",
+ "hfg100kPa = 2258 #kJ/kg\n",
+ "ufg100kPa = 2088.7 #kJ/kg\n",
+ "vg100kPa = 1.6940 #m**3/kg\n",
+ "vg2000kPa = 0.09963 #m**3/kg\n",
+ "ug2000kPa = 2600.3 #kJ/kg\n",
+ "hg2000kPa = 2799.5 #kJ/kg\n",
+ "hf1000kPa = 762.81 #kJ/kg,\n",
+ "hfg1000kPa = 2015.3 #kJ/kg \n",
+ "vf1000kPa = 0.001127 #m3/kg\n",
+ "vg1000kPa = 0.19444 #m3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "v1 = vf100kPa+x1*(vg100kPa-vf100kPa) #Initial specific volume(in m**3/kg):\n",
+ "h1 = hf100kPa+x1*hfg100kPa #Enthalpy at 1(in kJ/kg):\n",
+ "V = m1*x1*v1 #Volume of vessel(in m**3):\n",
+ "v2 = vg2000kPa*v1/(vg2000kPa+v1) #Final specific volume(in m**3/kg):\n",
+ "x2 = (v2-vf1000kPa)/(vg1000kPa-vf1000kPa)#Final dryness fraction:\n",
+ "h2 = hf1000kPa+x2*hfg1000kPa #Final enthalpy(in kJ/kg):\n",
+ "m = m1*(h1-h2)/(h2-hg2000kPa) #Mass of dry steam at 2000kPa(in kg):\n",
+ "U1 = m*(uf100kPa+x1*ufg100kPa) #Internal energy in the beginning(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass of dry steam at 2000 kPa to be added: \",round(m,2),\"kg\" \n",
+ "print \"Quality of final mixture: \",round(x2,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of dry steam at 2000 kPa to be added: 11.97 kg\n",
+ "Quality of final mixture: 0.455\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "r = 71.5 #Recorded condenser vacuum(cm of Mercury)\n",
+ "br = 76.8 #Barometer reading(cm of Mercury) \n",
+ "Tc = 35 #Temperature of condensation(\u00b0C)\n",
+ "Thw = 27.6 #Temperature of hot well(\u00b0C)\n",
+ "mc = 1930 #Mass of condensate per hour()Kg\n",
+ "mcw = 62000 #Mass of cooling water per hour(Kg)\n",
+ "Ti = 8.51 #Inlet temperature (\u00b0C)\n",
+ "To = 26.24 #Outlet temperature(\u00b0C)\n",
+ "#From steam tables:\n",
+ "hf = 146.68 #kJ/kg\n",
+ "hfg = 2418.6 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "pc = (br-r)/73.55*101.325 #Condensor pressure(in kPa):\n",
+ "ps = 5.628 #Partial pressure of steam corresponding to 35\u00c2\u00b0C from steam table(in kPa):\n",
+ "x = (mcw*(To-Ti)*4.18-mc*hf+mc*4.18*To)/(mc*hfg) #Dryness fraction:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Dryness fraction of the steam entering:\",round(x,2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of the steam entering: 0.97\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from math import pi\n",
+ "#Variable Declaration: \n",
+ "D = 0.2 #Diameter of the vessel(in m):\n",
+ "d = 0.02 #Depth(in m):\n",
+ "T = 150 #Temperature(in \u00b0C):\n",
+ "F = 10 #Force applied(in kN):\n",
+ "Q = 600 #Heat supplied(in kJ):\n",
+ "#From steam tables:\n",
+ "hf = 612.1 \n",
+ "hfg = 2128.7\n",
+ "vg = 0.4435\n",
+ "h2 = 1582.8\n",
+ "\n",
+ "#Calculations:\n",
+ "p = F/(pi*D**2)*4+101.3 #Pressure at which process is taking place(in kPa):\n",
+ "V1 = pi*D**2*d/4 #Volume of water contained(in m**3):\n",
+ "m = V1*1000 #Mass of water(in kg):\n",
+ "x = (Q-hf*m+4.18*T*m)/(hfg*m) #Dryness fraction:\n",
+ "U1 = m*4.18*T-p*V1 #Internal energy of water initially(in kJ):\n",
+ "V2 = m*x*vg #Final volume(in m**3):\n",
+ "U2 = m*h2-p*V2 #Internal energy at state 2(in kJ):\n",
+ "dU = U2-U1 #Change in internal energy(in kJ):\n",
+ "W = p*(V2-V1) #Work done(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Dryness fraction of the steam produced: \" ,round(x,3) \n",
+ "print \"Change in internal energy: \",round(dU,2), \"kJ\"\n",
+ "print \"Work done: \",round(W,2),\"kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of the steam produced: 0.456\n",
+ "Change in internal energy: 547.54 kJ\n",
+ "Work done: 53.01 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "ms = 40 #Mass of steam passed(in kg):\n",
+ "mw = 2.2 #Mass of water passed(in kg):\n",
+ "p1 = 1.47 #Initial pressure of steam(in MPa):\n",
+ "T = 120 #Temperature after throttling(in C):\n",
+ "p2 = 107.88 #Pressure after throttling(in kPa):\n",
+ "s = 2.09 #Specific heat of superheated steam(in kJ/kg.K):\n",
+ "hf = 840.513 #From steam tables:\n",
+ "hfg = 1951.02\n",
+ "h1 = 2673.95\n",
+ "\n",
+ "#Calculations:\n",
+ "ds = T-101.8 #Degree of superheat(in C):\n",
+ "h2 = h1+ds*s #Enthalpy of superheated steam(in kJ/kg):\n",
+ "x2 = (h2-hf)/hfg #Dryness fraction after throttling:\n",
+ "x1 = (ms-mw)/ms #Dryness fraction before throttling:\n",
+ "x = x1*x2 #Overall dryness fraction:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Dryness fraction \",round(x,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction 0.9065\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "Va = 0.4 #Initial volume in part A(in m**3):\n",
+ "pa = 10 #Pressure(in bar):\n",
+ "V = 0.4 #Initial volume in part B(in m**3):\n",
+ "p1 = 10 #Pressure in part B(in bar):\n",
+ "p2 = 15 #Final pressure in part B(in bar):\n",
+ "#From steam tables:\n",
+ "hf = 762.83 \n",
+ "hfg = 2015.3\n",
+ "h2 = 2792.2\n",
+ "\n",
+ "#Calculations:\n",
+ "Q = V*(p2-p1)*10**2 #Heat added(in kJ):\n",
+ "x1 = (h2-Q-hf)/hfg #Dryness fraction:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat added: \",round(Q),\"kJ\" \n",
+ "print \"Initial quality: \",round(x1,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat added: 200.0 kJ\n",
+ "Initial quality: 0.908\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page no. 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 3 #Mass of wet steam(in kg):\n",
+ "p1 = 1.4 #Initial pressure(in bar):\n",
+ "V1 = 2.25 #Initial volume(in m**3):\n",
+ "T = 400 #Final temperature of steam(in \u00b0C):\n",
+ "V2 = 4.65 #At 400 \u00b0C,volume of steam(in m**3):\n",
+ "#From steam tables:\n",
+ "vg = 1.2455 \n",
+ "hf = 457.99\n",
+ "hfg = 2232.3\n",
+ "h2 = 3276.6\n",
+ "uf = 457.84\n",
+ "ufg = 2059.34\n",
+ "u2 = 2966.7\n",
+ "\n",
+ "#Calculations:\n",
+ "v1 = V1/m #Specific volume of wer steam in cylinder(in m**3/kg):\n",
+ "x1 = v1/vg #Dryness fraction of initial steam:\n",
+ "h1 = hf+x1*hfg #Initial enthalpy of wet steam(in kJ/kg):\n",
+ "v2 = V2/m #At 400\u00b0C specific volume of steam(in m**3/kg):\n",
+ "p2 = 0.20 #Actual pressure(from steam table)(in MPa):\n",
+ "ds = T-120.23 #Finally the degree of superheat(in \u00b0C): #Saturation temp at this pressure = 120.23\u00c2\u00b0C\n",
+ "Q = m*(h2-h1) #Heat added during the process(in kJ):\n",
+ "u1 = uf+x1*ufg #Internal energy of initial wet steam(in kJ/kg):\n",
+ "dU = m*(u2-u1) #Change in internal energy(in kJ):\n",
+ "W = Q-dU #Work done(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat transfer: \",round(Q,2),\"kJ\" \n",
+ "print \"Work transfer : \",round(W,2),\"kJ\"\n",
+ "print \"____Note: Please check the value of x1 calculated and used: (calculated is 0.602 and used is 0.607 hence there is a difference in answer)____\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer: 4423.17 kJ\n",
+ "Work transfer : 616.8 kJ\n",
+ "____Note: Please check the value of x1 calculated and used: (calculated is 0.602 and used is 0.607 hence there is a difference in answer)____\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20, page no. 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "p1 = 10 #Pressure of the steam(in bar):\n",
+ "T = 500 #Temperature(in \u00b0C):\n",
+ "p2 = 1 #Final pressure(in bar):\n",
+ "#From steam tables:\n",
+ "h10bar500 = 3478.5 #kJ/kg \n",
+ "s10bar500 = 7.7622 #kJ/kg.K\n",
+ "v10bar500 = 0.3541 #m**3/kg\n",
+ "h1bar400 = 3278.2 #kJ/kg\n",
+ "h1bar500 = 3488.1 #kJ/kg\n",
+ "v1bar500 = 3.565 #m**3/kg\n",
+ "v1bar400 = 3.103 #m**3/kg\n",
+ "s1bar500 = 8.8342 #kJ/kg.K\n",
+ "s1bar400 = 8.5435 #kJ/kg.K\n",
+ "h2 = h10bar500\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = (h2-h1bar400)*(T-400)/(h1bar500-h1bar400)+400 #Final temperature(in \u00b0C):\n",
+ "s2 = s1bar400+(s1bar500-s1bar400)/(T-400)*(T2-400) #Final entropy(in kJ/kg.K):\n",
+ "ds = s2-s10bar500 #Change in entropy(in kJ/kg.K):\n",
+ "v2 = v1bar400+(v1bar500-v1bar400)/(T-400)*(T2-400) #Final specific volume(in m**3/kg):\n",
+ "p = v10bar500/v2*100 #Percentage volume occupied by steam:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Final temperature: \",round(T2,2),\"\u00b0C\" \n",
+ "print \"Change in entropy: \",round(ds,4),\"kJ/Kg K\"\n",
+ "print \"Percentage of vessel volume initially occupied by steam: \",round(p,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final temperature: 495.43 \u00b0C\n",
+ "Change in entropy: 1.0587 kJ/Kg K\n",
+ "Percentage of vessel volume initially occupied by steam: 9.99 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21, page no. 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "#Steam entering:\n",
+ "p1 = 2.5 #Pressure(in MPa): \n",
+ "T1 = 350 #Temperature(in \u00b0C):\n",
+ "#Steam rejected:\n",
+ "p2 = 20 #Pressure(in kPa):\n",
+ "x2 = 0.92 #Dryness fraction:\n",
+ "p3 = 30 #Pressure of one quater of intial steam(in kPa):\n",
+ "T0 = 30+273 #Temperature(in K):\n",
+ "m1 = 1\n",
+ "m2 = 0.25\n",
+ "m3 = 0.75\n",
+ "Q = -10 #Heat lost during expansion(in kJ):\n",
+ "#From steam tables:\n",
+ "h1 = 3126.3 #kJ/kg\n",
+ "s1 = 6.8403 #kJ/kg.K\n",
+ "h2 = 2878.6 #kJ/kg\n",
+ "s2 = 8.5309 #kJ/kg.K\n",
+ "h3 = 2421.04 #kJ/kg\n",
+ "s3 = 7.3425 #kJ/kg.K\n",
+ "hf = 251.40 #kJ/kg\n",
+ "hg = 2609.7 #kJ/kg\n",
+ "sf = 0.8320 #kJ/kg.K\n",
+ "sfg = 7.0766 #kJ/kg.K\n",
+ "h0 = 125.79 \n",
+ "s0 = 0.4369\n",
+ "\n",
+ "#Calculations:\n",
+ "A1 = (h1-h0)-T0*(s1-s0) #Availability of steam entering turbine(in kJ/kg):\n",
+ "A2 = (h2-h0)-T0*(s2-s0) #Availability of steam leaving turbine at state 2(in kJ/kg):\n",
+ "A3 = (h3-h0)-T0*(s3-s0) #Availability of steam leaving turbine at state 3(in kJ/kg):\n",
+ "Wmax = m1*A1-m2*A2-m3*A3 #Maximum work per kg of steam entering turbine(in kJ/kg):\n",
+ "I = T0*(m2*s2+m3*s3-m1*s1)-Q#Irreversibilty(in kJ/s):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Maximum work\",round(Wmax,2),\"kJ/kg\" \n",
+ "print \"Irreversibility\",round(I,2),\"kJ/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum work 833.06 kJ/kg\n",
+ "Irreversibility 252.19 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22, page no. 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 6 #Initial pressure(in MPa):\n",
+ "p2 = 5 #Final pressure(in MPa):\n",
+ "T1 = 400 #Initial temperature(in \u00b0C):\n",
+ "patm = 100 #Atmospheric pressure(in kPa):\n",
+ "Ta = 20+273 #Atmospheric temperature(in \u00b0K):\n",
+ "#From steam tables:\n",
+ "h1 = 3177.2 #kJ/kg \n",
+ "s1 = 6.5408 #kJ/kg.K\n",
+ "h2 = h1\n",
+ "T2 = 392.7 #\u00b0C(by interpolation)\n",
+ "s2 = 6.6172 #kJ/kg.K(#By interpolation Entropy)\n",
+ "h0 = 83.96 #kJ/kg\n",
+ "s0 = 0.2966 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "A1 = (h1-h0)-Ta*(s1-s0) #Availability at state 1(in kJ/kg):\n",
+ "A2 = (h2-h0)-Ta*(s2-s0) #Availability at state 2(in kJ/kg):\n",
+ "dA = A2-A1 #Change in availibilty(in kJ/kg):\n",
+ "\n",
+ "print \"Change in availability: \",round(-dA,1),\"kJ/kg decrease\","
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in availability: 22.4 kJ/kg decrease\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23, page no. 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable Declaration:\n",
+ "TH1 = 95 #Temperature of the hot water entering(in \u00c2\u00b0C):\n",
+ "TH2 = 50 #Temperature of the hot water at exit(in \u00c2\u00b0C): \n",
+ "mH = 0.8 #Mass flow rate(in kg/s):\n",
+ "TC1 = 15+273 #Temperature of cooling water entering(in \u00c2\u00b0K):\n",
+ "TC2 = 45+273 #Temperature of cooling water at exit(in \u00c2\u00b0K):\n",
+ "T0 = 25+273 #Temperature of dead state(in K):\n",
+ "#From steam tables:\n",
+ "h0 = 104.89 #kJ/kg\n",
+ "s0 = 0.3674 #kJ/kg.K\n",
+ "hH1 = 397.96 #kJ/kg\n",
+ "sH1 = 1.2500 #kJ/kg.K\n",
+ "hH2 = 209.33 #kJ/kg.K\n",
+ "sH2 = 0.7038 #kJ/kg.K\n",
+ "hC2 = 188.45 #kJ/kg.K\n",
+ "sC2 = 0.6387 #kJ/kg.K\n",
+ "hC1 = 62.99 #kJ/kg.K\n",
+ "sC1 = 0.2245 #kJ/kg.K\n",
+ "\n",
+ "#Calculations:\n",
+ "mC = mH*(TH1-TH2)/(TC2-TC1)\t#Mass flow rate of cooling water(in kg/s):\n",
+ "AH1 = mH*((hH1-h0)-T0*(sH1-s0))\t#Exergy entering through hot water stream(in kJ/s):\n",
+ "dAc = mC*((hC2-hC1)-T0*(sC2-sC1))#Rate of exergy increase in cold stream(in kJ/s):\n",
+ "n = dAc/AH1*100 #Second law efficiency:\n",
+ "dAh = mH*((hH1-hH2)-T0*(sH1-sH2))#Rate of exergy loss in hot stream(in kJ/s):\n",
+ "dA = dAh-dAc #Exergy destruction(in kJ/s):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Second law efficincy: \",round(n,2),\"%\" \n",
+ "print \"Exergy destruction: \",round(dA,2),\"kJ/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Second law efficincy: 10.12 %\n",
+ "Exergy destruction: 18.26 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter7.ipynb b/Applied_Thermodynamics/Chapter7.ipynb
new file mode 100755
index 00000000..8e346868
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter7.ipynb
@@ -0,0 +1,952 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4f8260f1b2df9e05157c56dfea1a72ed7a44f559ce07767048b00c505967ad51"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Availability and General Thermodynamic Relations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1.6 #Pressure of entering steam(in MPa):\n",
+ "T1 = 300+273 #Temperature of entering steam(in K):\n",
+ "p2 = 0.1 #Pressure of leaving steam(in MPa):\n",
+ "T2 = 150+273 #Temperature of leaving steam(in K):\n",
+ "c2 = 150 #Velocity of the leaving steam(in m/s):\n",
+ "m = 2.5 #Mass flow rate(in kg/s):\n",
+ "#From steam tables:\n",
+ "h1 = 3034.8 #kJ/kg\n",
+ "s1 = 6.8844 #kJ/kg.K\n",
+ "h2 = 2776.4 #kJ/kg\n",
+ "s2 = 7.6134 #kJ/kg.K\n",
+ "\n",
+ "#Calculations:\n",
+ "T0 = 15+273 #Surrounding temperature(in K):\n",
+ "Wmax = (h1-h2)-T0*(s1-s2)-(c2**2)/2*10**(-3) #Maxiimum work possible(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Maximum work possible: \",round(m*Wmax,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum work possible: 1142.76 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "pa = 1 #Pressure of air(in bar) for tank A:\n",
+ "m = 1 #Mass of air(in kg):\n",
+ "Cv = 0.717 #Value of Cv(in kJ/kg.K):\n",
+ "T = 50+273 #Temperature(in K):\n",
+ "R = 0.287 #Gas costant(in kJ/kg.K):\n",
+ "p0 = 1 #Atmospheric pressure(in bar):\n",
+ "T0 = 15+273 #Atmosphere temperature(in K):\n",
+ "Cp = 1.004 #Value of Cp(in kJ/kg.K):\n",
+ "pb = 3 #Pressure(in bar) for tank B:\n",
+ "\n",
+ "#Calculations:\n",
+ "AA = m*(Cv*(T-T0)+R*(p0/pa*T-T0)-T0*Cp*log(T/T0)+T0*R*log(pa/p0)) #Availability of air in tank A(in kJ):\n",
+ "AB = m*(Cv*(T-T0)+R*(p0/pb*T-T0)-T0*Cp*log(T/T0)+T0*R*log(pb/p0)) #Availability of air in tank B(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Availabiltiy of air in tank A: \",round(AA,2),\"kJ\"\n",
+ "print \"Availability of air in tank B: \",round(AB,2),\"kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Availabiltiy of air in tank A: 1.98 kJ\n",
+ "Availability of air in tank B: 30.98 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 15 #Mass of steam(in kg):\n",
+ "p1 = 10 #Pressure of entering steam(in bar):\n",
+ "T1 = 300+273 #Temperature(in K):\n",
+ "p2 = 0.05 #Pressure of leaving steam(in bar): \n",
+ "x = 0.95 #Dryness fraction:\n",
+ "v2 = 160 #Velocity(in m/s):\n",
+ "p0 = 1 #Atmosheric pressure(in bar):\n",
+ "T0 = 15+273 #Atmospheric temperature(in K):\n",
+ "#From steam tables:\n",
+ "h1 = 3051.2 #kJ/kg\n",
+ "s1 = 7.1229 #kJ/kg.K\n",
+ "sf = 0.4764 #kJ/kg.K\n",
+ "sfg = 7.9187 #kJ/kg.K\n",
+ "hf = 137.82 #kJ/kg\n",
+ "hfg = 2423.7 #kJ/kg\n",
+ "h0 = 62.99 #kJ/kg\n",
+ "s0 = 0.2245 #kJ/kg.K\n",
+ "\n",
+ "#Calculations:\n",
+ "h2 = hf+x*hfg #Enthalpy at exit of turbine(in kJ/kg):\n",
+ "s2 = sf+x*sfg #Entropy at exit of turbine(in kJ/kg.K):\n",
+ "W = (h1-h2)-v2**2/2*10**(-3) #Work output(in kJ/kg):\n",
+ "pW = m*W #Power output(in kW):\n",
+ "Wmax = (h1-T0*s1)-(h2+v2**2/2*10**(-3)-T0*s2) #Maximum work given end states(in kW):\n",
+ "Ae = (h2-h0)+v2**2/2*10**(-3)-T0*(s2-s0) #Maximum wor kavailable from exhaust steam(in kJ/kg):\n",
+ "Wme = m*Ae #Maximum power that could be obtained from exhaust steam(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Power output: \",round(pW,1), \"kW\" \n",
+ "print \"Maximum power output: \" ,round(m*Wmax,1), \"kW\"\n",
+ "print \"Maximum power from exhaust steam: \",round(Wme,1), \"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power output: 8971.0 kW\n",
+ "Maximum power output: 12756.4 kW\n",
+ "Maximum power from exhaust steam: 2265.6 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "m = 5 #Mass of steam(in kg):\n",
+ "z1 = 10 #Initial elevation(in m):\n",
+ "V1 = 25 #Initial velocity(in m/s):\n",
+ "z2 = 2 #Final elevation(in m):\n",
+ "V2 = 10 #Final velocity(in m/s):\n",
+ "#Dead state of water\n",
+ "u0 = 104.86 #kJ/kg \n",
+ "v0 = 1.0029*10**(-3)#m3/kg\n",
+ "s0 = 0.3673 #kJ/kg\u00b7K\n",
+ "p0 = 100 #kPa\n",
+ "T0 = 25+273 #K\n",
+ "#Initial state\n",
+ "u1 = 2550 #kJ/kg \n",
+ "v1 = 0.5089 #m3/kg\n",
+ "s1 = 6.93 #kJ/kg\u00b7K\n",
+ "#Final state\n",
+ "u2 = 83.94 #kJ/kg \n",
+ "v2 = 1.0018*10**(-3)#m3/kg\n",
+ "s2 = 0.2966 #kJ/kg\u00b7K\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculation:\n",
+ "A1 = m*((u1-u0)*10**3+p0*10**3*(v1-v0)-T0*(s1-s0)*10**3+V1**2/2+g*z1)#Availability at initial state(in kJ):\n",
+ "A2 = m*((u2-u0)*10**3+p0*10**3*(v2-v0)-T0*(s2-s0)*10**3+V2**2/2+g*z2)#Availability at final state(in kJ):\n",
+ "dA = A2-A1 #Change in availability(in kJ)\n",
+ "\n",
+ "#Results:\n",
+ "print \"Initial availabilty: \",round(A1/10**3,2), \"kJ\"\n",
+ "print \"Final availabilty:\",round(A2/10**3,2),\"kJ\"\n",
+ "print \"Availability decreases by: \",round(-dA/10**3,2), \"kJ\"\t\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Initial availabilty: 2703.28 kJ\n",
+ "Final availabilty: 1.09 kJ\n",
+ "Availability decreases by: 2702.19 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 800+273 #Temperature of IC engine(in K):\n",
+ "W = 1050 #Work per kg of gas in engine(in kJ/kg):\n",
+ "Cp = 1.1 #Cp of gas(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T0 = 30+273 #Temperature of the surroundings(in K):\n",
+ "dSsys = W/T1 #Change in entropy of system(in kJ/kg.K):\n",
+ "dSsurr = -Cp*(T1-T0)/T0 #Change in entropy of surroundings(in kJ/kg.K):\n",
+ "L = -T0*(dSsys+dSsurr) #Loss of available energy(in kJ/kg):\n",
+ "r = L/W #Ratio of lost available exhaust energy to engine work:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Ratio of available exhaust energy to engine work: \",round(r,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of available exhaust energy to engine work: 0.524\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 10 #Mass of water(in kg):\n",
+ "T1 = 150+273 #Initial temperature(in K):\n",
+ "V1 = 25 #Initial velocity(in m/s):\n",
+ "z1 = 10 #Initial elevation(in m):\n",
+ "T2 = 20+273 #Final temperature(in K):\n",
+ "V2 = 10 #Final velocity(in m/s):\n",
+ "z2 = 3 #Final elevation(in m):\n",
+ "p0 = 0.1 #Pressure of environment(in MPa):\n",
+ "T0 = 25+273.13 #Temperature of environment(in K):\n",
+ "g = 9.8 #Acceleration due to gravity(in m/s**2):\n",
+ "#Dead state of water, From steam tables:\n",
+ "u0 = 104.88 #kJ/kg\n",
+ "v0 = 1.003*10**(-3) #m3/kg\n",
+ "s0 = 0.3674 #kJ/kg\u00b7K\n",
+ "u1 = 2559.5 #kJ/kg\n",
+ "v1 = 0.3928 #m3/kg\n",
+ "s1 = 6.8379 #kJ/kg\u00b7K\n",
+ "u2 = 83.95 #kJ/kg\n",
+ "v2 = 0.001002 #m3/kg\n",
+ "s2 = 0.2966 #kJ/kg\u00b7K\n",
+ "A1 = m*((u1-u0)+p0*10**3*(v1-v0)-T0*(s1-s0)+(V1**2/2+g*z1)*10**-3)#Availability at initial state(in kJ):\n",
+ "A2 = m*((u2-u0)+p0*10**3*(v2-v0)-T0*(s2-s0)+(V2**2/2+g*z2)*10**-3)#Availability at final state(in kJ):\n",
+ "dA = A2-A1 #Change in availability(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Initial availabilty: \",round(A1,2),\"kJ\"\n",
+ "print \"Final availabilty: \",round(A2,2),\"kJ\"\n",
+ "print \"Availability decreases: \",round(-dA,2),\"kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Initial availabilty: 5651.6 kJ\n",
+ "Final availabilty: 2.57 kJ\n",
+ "Availability decreases: 5649.03 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 5 #Mass flow rate(in kg/s):\n",
+ "#At inlet to turbine,\n",
+ "p1 = 5 #MPa \n",
+ "T1 = 500+273.15 #K\n",
+ "h1 = 3433.8 #kJ/kg\n",
+ "s1 = 6.9759 #kJ/kg.K\n",
+ "#At exit from turbine.\n",
+ "p2 = 0.2 #MPa\n",
+ "T2 = 140+273.15 #K\n",
+ "h2 = 2748 #kJ/kg\n",
+ "s2 = 7.228 #kJ/kg\u00b7K\n",
+ "#At dead state,\n",
+ "p0 = 101.3 #kPa\n",
+ "T0 = 25+273.15 #K\n",
+ "h0 = 104.96 #kJ/kg\n",
+ "s0 = 0.3673 #kJ/kg\u00b7K\n",
+ "Q = 600 #Heat loss(in kJ/s):\n",
+ "\n",
+ "#Calculation:\n",
+ "A1 = m*((h1-h0)-T0*(s1-s0))\t#Availablity of steam at inlet(in kJ):\n",
+ "W = m*(h1-h2)-Q #Turbine output(in kW):\n",
+ "Wmax = m*((h1-h2)-T0*(s1-s2)) #Maximum output(in kW):\n",
+ "I = Wmax-W #Irreversibilty(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Availability of steam at inlet: \",round(A1,2),\"kJ\"\n",
+ "print \"Turbine output: \",round(W),\"kW\"\n",
+ "print \"Maximum output: \",round(Wmax,2),\"kW\"\n",
+ "print \"Irreversibility: \",round(I,2),\"kW\"\n",
+ "print \"_____Please Check there is a calculation mistake in Wmax hence answer differs_____\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Availability of steam at inlet: 6792.43 kJ\n",
+ "Turbine output: 2829.0 kW\n",
+ "Maximum output: 3804.82 kW\n",
+ "Irreversibility: 975.82 kW\n",
+ "_____Please Check there is a calculation mistake in Wmax hence answer differs_____\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Q = 500 #Heat removed(in kJ):\n",
+ "T1 = 835 #Temperature of the heat reservoir(in K):\n",
+ "T2 = 720 #Temperature of the system(in K):\n",
+ "T0 = 280 #Temperature of surroundings(in K):\n",
+ "\n",
+ "#Calculation:\n",
+ "A1 = T0*Q/T1 #Availability for heat reservoir(in kJ/kg.K):\n",
+ "A2 = T0*Q/T2 #Availability for system(in kJ/kg.K):\n",
+ "Anet = A1-A2 #Net loss of available energy(in kJ/kg.K):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Loss of available energy: \",round(-Anet,2),\"kJ/kg.K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss of available energy: 26.78 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h1 = 4142 #Enthalpy at entrance(in kJ/kg):\n",
+ "h2 = 2585 #Enthalpy at exit(in kJ/kg):\n",
+ "A1 = 1787 #Availability of steam at entrance(in kJ/kg):\n",
+ "A2 = 140 #Availability of steam at exit(in kJ):\n",
+ "\n",
+ "#Calculation:\n",
+ "Wmax = A1-A2 #Maximum work possible(in kJ/kg):\n",
+ "Wact = h1-h2 #Actual work from turbine(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Actual work: \",round(Wact),\"kJ/kg\" \n",
+ "print \"Maximum possible work: \",round(Wmax),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual work: 1557.0 kJ/kg\n",
+ "Maximum possible work: 1647.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "Tmin = 20+273 #Minimum temperature(in K):\n",
+ "Tmax = 500+273 #Maximum temperature(in K):\n",
+ "n = 0.25 #Efficiency of heat engine:\n",
+ "\n",
+ "#Calculations:\n",
+ "nrev = 1-Tmin/Tmax #Reversible engine efficiency:\n",
+ "n2 = n/nrev #Second law efficiency:\n",
+ "\n",
+ "#Result:\n",
+ "print \"Second law efficiency: \",round(n2*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Second law efficiency: 40.26 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import log\n",
+ "#Variable Declaration: \n",
+ "Va = 6 #Volume of compartment A(in m**3):\n",
+ "Vb = 4 #Volume of compartment B(in m**3):\n",
+ "p1 = 6 #Pressure in compartment A(in bar):\n",
+ "T1 = 600 #Temperature in compartment A(in K):\n",
+ "p0 = 1 #Atmosheric pressure(in bar):\n",
+ "T0 = 300 #Atmosheric temperature(in K):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "R = 0.287 #Gas constant(in J/kg.K):\n",
+ "Cv = 0.718 #Value of Cv(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "V2 = Va+Vb #Final volume(in m**3):\n",
+ "T2 = T1*(Va/V2)**(r-1) #Final temperature(in K):\n",
+ "m = p1*10**5*Va/(R*10**3*T1) #Mass of air(in kg):\n",
+ "dSs = round(m*(Cv*log(T2/T1)+R*log(V2/Va)),3)#Change in entropy of control system(in kJ/kg.K):\n",
+ "I = T0*dSs #Loss of available energy or irreversibilty(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Loss of available energy: \",round(-I,3),\"kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss of available energy: 0.6 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "Tmin = 30+273 #Minimum temperature(in K):\n",
+ "Tmax = 700+273 #Maximum temperature(in K):\n",
+ "T0 = 17+273 #Temperature of surroundings(in K):\n",
+ "Q1 = 2*10**4 #Rate at which engine receives heat(in kJ/min):\n",
+ "Wu = 0.13*10**3 #Measured output of the engine(in kW):\n",
+ "\n",
+ "#Calculation:\n",
+ "nrev = 1-Tmin/Tmax #Efficiency:\n",
+ "Wrev = nrev*Q1/60 #Availability or reversible work(in kJ/s):\n",
+ "I = Wrev-Wu #Rate of irreversibility(in kJ/s):\n",
+ "n2 = Wu/Wrev #Second law efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Availability: \",round(Wrev*60/10**4,2),\" x 10^4 kJ/min\"\n",
+ "print \"Rate of irreversibility: \",round(I,2),\"kW\"\n",
+ "print \"Second Law Efficiency: \",round(n2*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Availability: 1.38 x 10^4 kJ/min\n",
+ "Rate of irreversibility: 99.53 kW\n",
+ "Second Law Efficiency: 56.64 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "p1 = 1.5 #Initial pressure(in bar):\n",
+ "T1 = 60+273 #Initial temperature(in K):\n",
+ "p2 = 2.5 #Final pressure(in bar):\n",
+ "Tres = 400+273\t \t#Temperature of the reservoir(in K):\n",
+ "T0 = 27+273\t\t#Temperature of surroundings(in K):\n",
+ "Cp = 1.005\t\t#Cp of air(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1*p2/p1\t\t#Final temperature(in K):\n",
+ "Q = Cp*(T2-T1)\t\t#Heat addition to air in the tank(in kJ/kg):\n",
+ "dSs = Q/T1\t\t#Change in entropy of the system(in kJ/kg.K):\n",
+ "dSe = -Q/Tres\t\t#Change in entropy of environment(in kJ/kg.K):\n",
+ "dS = dSs+dSe\t\t#Total change in entropy(in kJ/kg.K):\n",
+ "L = T0*dS\t\t#Loss of available energy(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Loss of available energy:\",round(L,1),\"kJ/kg.K\"\t\t\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss of available energy: 101.5 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page no. 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#From steam tables:\n",
+ "vg = 0.12736\t\t\t\t\n",
+ "vf = 0.001157\n",
+ "p205 = 1.7230\n",
+ "p195 = 1.3978\n",
+ "T = 200+273\n",
+ "hfga = 1940.7\n",
+ "\n",
+ "#Calculation:\n",
+ "vfg = vg-vf\t\t\t\t#Value of vfg(in m**3/kg):\n",
+ "r = (p205-p195)/(205-195)\t\t#Value of dp/dT(in MPa/K):\n",
+ "hfg = T*vfg*r*10**3\t\t\t#By Clapeyron equation(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Calculated enthalpy of vaporization: \",round(hfg,2),\"kJ/kg\"\t\t\t\t\n",
+ "print \"Enthalpy of vaporization from steam table:\",round(hfga,1),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Calculated enthalpy of vaporization: 1941.25 kJ/kg\n",
+ "Enthalpy of vaporization from steam table: 1940.7 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20, page no. 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "from math import log\n",
+ "#Variable Declaration: \n",
+ "#From steam tables:\n",
+ "p5 = 260.96 #kPa\t\t\t\t\n",
+ "p15 = 182.60 #kPa\n",
+ "vg10 = 0.07665 #m**3/kg\n",
+ "vf10 = 0.00070 #m**3/kg\n",
+ "R = 0.06876 #kJ/kg.K\n",
+ "hfg10 = 156.3 #kJ/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "T = -5+273\n",
+ "T1 = -15+273\n",
+ "T2 = -5+273\n",
+ "hfg = T*(vg10-vf10)*(p5-p15)/(15-5)\t#Value of hfg, by Clapeyron equation:\n",
+ "hfg1 = log(p5/p15)*R*(T1*T2)/((T2-T1))\t#By Clapeyron-Clausius equation:\n",
+ "d = (hfg1-hfg)/hfg*100\t\t\t#Deviation:\n",
+ "\n",
+ "#Results:\n",
+ "print \"hfg by Clapeyron equation: \",round(hfg,2),\"kJ/kg\"\t\t\t\t\n",
+ "print \"hfg by Clapeyron-Clausius equation: \",round(hfg1,2),\"kJ/kg\"\n",
+ "print \"Percentage deviation in hfg value by Clapeyron-Clausius equation compared to the value from Clapeyron equation: \",round(d,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hfg by Clapeyron equation: 159.5 kJ/kg\n",
+ "hfg by Clapeyron-Clausius equation: 169.76 kJ/kg\n",
+ "Percentage deviation in hfg value by Clapeyron-Clausius equation compared to the value from Clapeyron equation: 6.44 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21, page no. 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#From steam tables:\n",
+ "v350 = 0.9534\t \n",
+ "v250 = 0.7964\n",
+ "v300 = 0.8753\n",
+ "v350kPa = 0.76505\n",
+ "v250kPa = 1.09575\n",
+ "\n",
+ "#Calculation:\n",
+ "ve = (v350-v250)/(v300*(350-250))\t#Volume expansivity(in 1/K):\n",
+ "ic = -(v350kPa-v250kPa)/(v300*(350-250))#Isothermal compressibility(in 1/kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Volume expansivity: \",round(ve*10**3,4),\"x 10^-3 K^-1\"\t\t\t\t\n",
+ "print \"Isothermal compressibility: \",round(ic*10**3,3),\"x 10^-3 kPa^-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume expansivity: 1.7937 x 10^-3 K^-1\n",
+ "Isothermal compressibility: 3.778 x 10^-3 kPa^-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22, page no. 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import log\n",
+ "#Variable Declaration: \n",
+ "V = 0.5\t\t\t\t#Volume of tank(in m**3):\n",
+ "p0 = 1\t\t\t\t#Atmospheric pressure(in bar):\n",
+ "T0 = 25+273\t\t\t#Atmospheric temperature(in K):\n",
+ "Cp = 1.005\t\t\t#Cp of gas(in kJ/kg.K):\n",
+ "Cv = 0.718\t\t\t#Cv of gas(in kJ/kg.K):\n",
+ "Ti = T0\t\t\t\t#Initial temperature(in K):\n",
+ "\n",
+ "#Calculations:\n",
+ "Tf = Cp/Cv*Ti\t\t\t#Inside final temperature(in K):\n",
+ "dSgen = Cp*log(Tf/Ti)\t\t#Change in entropy(in kJ/kg.K):\n",
+ "I = T0*dSgen\t\t\t#Irreversibility(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Inside final temperature\",round(Tf,2),\"K\"\t\t\t\t\n",
+ "print \"Change in entropy: \",round(dSgen,4),\"kJ/kg.K\"\n",
+ "print \"Irreversibility\",round(I,2),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inside final temperature 417.12 K\n",
+ "Change in entropy: 0.338 kJ/kg.K\n",
+ "Irreversibility 100.71 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23, page no. 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import log\n",
+ "#Variable Declaration: \n",
+ "m = 75\t\t\t\t#Mass of water(in kg):\n",
+ "T1 = 400+273\t\t\t#Temperature of hot water(in K):\n",
+ "T2 = 300\t\t\t#Final temperature(in K):\n",
+ "T0 = 27+273\t\t\t#Temperature of the environment(in K):\n",
+ "Cp = 4.18\t\t\t#Specific heat of water(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "Wmax = m*Cp*(T1-T2-T0*log(T1/T2))#Maximum work(in kJ):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Maximum work: \",round(Wmax,1),\"kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum work: 40946.6 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24, page no. 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 50\t\t #Pressure at which steam enters(in bar):\n",
+ "T1 = 600+273\t #Temperature at which steam enters(in K):\n",
+ "c1 = 150\t #Velocity at which steam enters(in m/s):\n",
+ "p2 = 0.1\t #Pressure at which steam leaves(in bar):\n",
+ "c2 = 50\t\t #Velocity at which steam leaves(in m/s):\n",
+ "W = 1000\t #Work delivered(in kJ/kg):\n",
+ "T0 = 25+273\t #Dead state temperature(in K):\n",
+ "#From steam tables:\n",
+ "h1 = 3666.5 #kJ/kg\t\t\t\t\n",
+ "s1 = 7.2589 #kJ/kg.K\n",
+ "h2 = 2584.7 #kJ/kg\n",
+ "s2 = 8.1502 #kJ/kg.K\n",
+ "\n",
+ "#Calculations:\n",
+ "A1 = h1+c1**2/2*10**(-3)-T0*s1\t#Inlet stream availability(in kJ/kg):\n",
+ "A2 = h2+c2**2/2*10**(-3)-T0*s2\t#Exit stream availability(in kJ/kg):\n",
+ "Wrev = A1-A2\t\t\t#Reversible work(in kJ/kg):\n",
+ "I = Wrev-W\t\t\t#Irreversibility(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Inlet stream availability: \",round(A1,2),\"kJ/kg\"\t\t\t\t\n",
+ "print \"Exit stream availability: \",round(A2,2),\"kJ/kg\"\n",
+ "print \"Irreversibility: \",round(I,1),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inlet stream availability: 1514.6 kJ/kg\n",
+ "Exit stream availability: 157.19 kJ/kg\n",
+ "Irreversibility: 357.4 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter8.ipynb b/Applied_Thermodynamics/Chapter8.ipynb
new file mode 100755
index 00000000..c026b231
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter8.ipynb
@@ -0,0 +1,1667 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ff76720b6d591e09d5857c774c4d9dbfbab10ecbdd3710baee1b7c89ef730620"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Vapor Power Cycle"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 7 #Lower pressure limit(in kPa):\n",
+ "p2 = 7 #Higher pressure limit(in MPa):\n",
+ "h2 = 2772.1 #Enthalpy at state 2(in kJ/kg): \n",
+ "s2 = 5.8133 #Entropy at state 2(in kJ/kg.K):\n",
+ "h3 = 1267 #Enthalpy at state 3(in kJ/kg):\n",
+ "s3 = 3.1211 #Entropy at state 3(in kJ/kg.K):\n",
+ "sf1 = 0.5564 #Value of sf at 7 kPa(in kJ/kg.K):\n",
+ "sfg1 = 7.7237 #Value of sfg at 7 kPa(in kJ/kg.K):\n",
+ "hf1 = 162.60 #Value of hf at 7 kPa(in kJ/kg):\n",
+ "hfg1 = 2409.54 #Value of hfg at 7 kPa(in kJ/kg):\n",
+ "s1 = s2 #Entropy at state 1(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "x1 = (s1-sf1)/sfg1 #Dryness fraction at state 1:\n",
+ "h1 = hf1+x1*hfg1 #Enthalpy at state 1(in kJ/kg):\n",
+ "s4 = s3 #Entropy at state 4(in kJ/kg.K):\n",
+ "x4 = (s4-sf1)/sfg1 #Dryness fraction for state 4:\n",
+ "h4 = hf1+x4*hfg1 #Enthalpy at state 4(in kJ/kg):\n",
+ "W1 = h2-h1 #Expansion work per kg(in kJ/kg):\n",
+ "W2 = h3-h4 #Compression work per kg(in kJ/kg):\n",
+ "H = h2-h3 #Heat added per kg(in kJ/kg):\n",
+ "W = W1-W2 #Net work done(in kJ/kg):\n",
+ "n = W/H #Thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Thermal Efficiency: \",round(n*100,2),\"%\"\n",
+ "print \"Turbine work: \",round(W1,2),\"KJ/Kg\"\n",
+ "print \"Compression work: \",round(W2,2),\"KJ/Kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal Efficiency: 44.2 %\n",
+ "Turbine work: 969.52 KJ/Kg\n",
+ "Compression work: 304.3 KJ/Kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 5 #Lower pressure limit(in kPa):\n",
+ "p2 = 5000 #Higher pressure limit(in kPa):\n",
+ "#From gas tables:\n",
+ "hf5M = 1154.23 #Value of hf at 5 MPa(in kJ/kg): \n",
+ "sf5M = 2.92 #Value of sf at 5 MPa(in kJ/kg.K):\n",
+ "hg5M = 2794.3 #Value of hg at 5 MPa(in kJ/kg):\n",
+ "sg5M = 5.97 #Value of sg at 5 MPa(in kJ/kg.K):\n",
+ "hf5k = 137.82 #Value of hf at 5 kPa(in kJ/kg):\n",
+ "sf5k = 0.4764 #Value of sf at 5 kPa(in kJ/kg.K):\n",
+ "hg5k = 2561.5 #Value of hg at 5 kPa(in kJ/kg):\n",
+ "sg5k = 8.3961 #Value of sg at 5 kPa(in kJ/kg.K):\n",
+ "vf5k = 0.001005 #/Value of vf at 5 kPa(in m**3/kg):\n",
+ "\n",
+ "#Calculation:\n",
+ "sfg5k = sg5k-sf5k #Value of sfg at 5 kPa(in kJ/kg.K):\n",
+ "hfg5k = hg5k-hf5k #Value of hfg at 5 kPa(in kJ/kg.K):\n",
+ "s2 = sg5M #Entropy at point 2(in kJ/kg.K): \n",
+ "s3 = s2 #As process 2-3 is isentropic:\n",
+ "x3 = (s3-sf5k)/sfg5k #Dryness fraction at point 3:\n",
+ "h3 = hf5k+x3*hfg5k #Enthalpy at point 3(in kJ/kg):\n",
+ "h2 = hg5M #Enthalpy at point 2(in kJ/kg):\n",
+ "s1 = sf5M #Entropy at point 1(in kJ/kg.K):\n",
+ "s4 = s1 #Process 1-4 is isentropic:\n",
+ "x4 = (s4-sf5k)/sfg5k #Dryness fraction at point 4:\n",
+ "h4 = hf5k+x4*hfg5k #Enthalpy at point 4(in kJ/kg):\n",
+ "h1 = hf5M #Enthalpy at point 1(in kJ/kg):\n",
+ "n = ((h2-h3)-(h1-h4))/(h2-h1) #Carnot efficiency:\n",
+ "Pw = vf5k*(p2-p1) #Pump work: \n",
+ "h5 = hf5k #Enthalpy at point 5(in kJ/kg):\n",
+ "h6 = h5+Pw #Enthalpy at point 6(in kJ/kg):\n",
+ "Nw = (h2-h3)-(h6-h5) #Net work in the cycle:\n",
+ "Ha = h2-h6 #Heat added:\n",
+ "nr = Nw/Ha #Rankine efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Carnot cycle efficiency: \",round(n*100,2)\n",
+ "print \"Rankine cycle efficiency: \",round(nr*100,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Carnot cycle efficiency: 43.09\n",
+ "Rankine cycle efficiency: 36.59\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "p1 = 40 #Pressure of steam entering(in bar):\n",
+ "T1 = 350+273 #Temperature(in K):\n",
+ "p4 = 0.05 #Pressure of steam leaving(in bar):\n",
+ "#From steam tables:\n",
+ "h2 = 3092.5 #kJ/kg\n",
+ "s2 = 6.5821 #kJ/kg.K\n",
+ "h4 = 137.82 #kJ/kg\n",
+ "s4 = 0.4764 #kJ/kg.K\n",
+ "v4 = 0.001005 #m**3/kg\n",
+ "sf = 0.4764 #kJ/kg.K\n",
+ "sfg = 7.9187 #kJ/kg.K\n",
+ "hf = 137.82 #kJ/kg\n",
+ "hfg = 2423.7 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s2 #Entropy at state 3:\n",
+ "x3 = (s3-sf)/sfg #Dryness fraction at state 3:\n",
+ "h3 = hf+x3*hfg #Enthalpy at state 3(in kJ/kg):\n",
+ "h1 = h4+v4*(p1-p4)*10**2 #Enthalpy at state 1(in kJ/kg):\n",
+ "Wp = h1-h4 #Pump work(in kJ/kg):\n",
+ "Wnet = h2-h3-Wp #Net work(in kJ/kg):\n",
+ "Q = h2-h1 #Heat added(in kJ/kg):\n",
+ "n = Wnet/Q*100 #Cycle efficiency(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Net work per kg of steam: \",round(Wnet,2),\"kJ/kg\"\n",
+ "print \"Cycle efficiency: \",round(n,2),\"%\"\n",
+ "print \"Pump work per kg of steam: \",round(Wp,2),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net work per kg of steam: 1081.88 kJ/kg\n",
+ "Cycle efficiency: 36.67 %\n",
+ "Pump work per kg of steam: 4.01 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "p1 = 20 #Pressure of the steam entering(in MPa):\n",
+ "T1 = 500+273 #Temperature(in K):\n",
+ "x = 0.90 #Dryness fraction of the steam leaving:\n",
+ "p6 = 0.005 #Condensor pressure(in MPa):\n",
+ "#From steam tables:\n",
+ "h2 = 3238.2 #kJ/kg\n",
+ "s2 = 6.1401 #kJ/kg.K\n",
+ "s3 = s2\n",
+ "hf = 137.82 #kJ/kg\n",
+ "hfg = 2423.7 #kJ/kg.K\n",
+ "sf = 0.4764 #kJ/kg.K\n",
+ "sfg = 7.9187 #kJ/kg.K\n",
+ "h6 = 137.82 #kJ/kg\n",
+ "h4 = 3474.1 #kJ/kg\n",
+ "sf1 = 2.2842 #kJ/kg.K\n",
+ "sfg1 = 4.1850 #kJ/kg.K\n",
+ "hf1 = 830.3 #kJ/kg\n",
+ "hfg1 = 1959.7 #kJ/kg\n",
+ "v6 = 0.001005 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "h5 = hf+x*hfg #Enthalpy at state 5(in kJ/kg):\n",
+ "s5 = sf+x*sfg\n",
+ "p4 = 1.4 #By interpolation, pressure at state 4(in bar):\n",
+ "x3 = (s3-sf1)/sfg1 #Dryness fraction at state 3:\n",
+ "h3 = hf1+x3*hfg1 #Enthalpy at state 3(in kJ/kg):\n",
+ "h1 = h6+v6*(p1-p6)*10**3 #Enthalpy at state 1(in kJ/kg):\n",
+ "Wnet = (h2-h3)+(h4-h5)-(h1-h6) #Net work per kg of steam(in kJ/kg):\n",
+ "Q = h2-h1 #Heat added per kg of steam(in kJ/kg):\n",
+ "n = Wnet/Q*100 #Thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Pressure of steam leaving HP turbine: \",round(p4,2),\"MPa\"\n",
+ "print \"Thermal efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure of steam leaving HP turbine: 1.4 MPa\n",
+ "Thermal efficiency: 56.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration:\n",
+ "p1 = 10 #Pressure of steam leaving the boiler(in MPa):\n",
+ "T1 = 700+273 #Temperature(in K):\n",
+ "p4 = 0.005 #Pressure of steam leaving the turbine(in MPa):\n",
+ "W = 50 #Output of the plant(in MW):\n",
+ "Twin = 15+273 #Temperature of the cooling water entering and leaving the condensor(in K):\n",
+ "Twout = 30+273\n",
+ "#From steam tables:\n",
+ "h2 = 3870.5 #kJ/kg \n",
+ "s2 = 7.1687 #kJ/kg.K\n",
+ "sf = 0.4764 #kJ/kg.K\n",
+ "sfg = 7.9187 #kJ/kg.K\n",
+ "hf = 137.82 #kJ/kg\n",
+ "hfg = 2423.7 #kJ/kg\n",
+ "v4 = 0.001005 #m**3/kg\n",
+ "Cp = 4.18 #Specific heat of water(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s2\n",
+ "h4 = hf\n",
+ "x3 = (s3-sf)/sfg #Dryness fraction at state 3:\n",
+ "h3 = hf+x3*hfg #Enthalpy at state 3(in kJ/kg):\n",
+ "h1 = h4+v4*(p1-p4) #Enthalpy at state 1(in kJ/kg):\n",
+ "Wnet = (h2-h3)-(h1-h4) #Net output per kg of steam(in kJ/kg):\n",
+ "ms = W*10**3/Wnet #Mass flow rate of steam(in kg/s):\n",
+ "mw = (h3-h4)*ms/(Cp*(Twout-Twin))#Mass flow rate of water(in kg/s):\n",
+ "Q = h2-h1 #Heat added per kg of steam(in kJ/kg):\n",
+ "n = Wnet/Q #Thermal efficiency:\n",
+ "r = (h2-h1)/(h3-h4)\t#Ratio of heat supplied:\n",
+ "\n",
+ "print \"Mass flow rate of steam: \",round(ms,2),\"kg/s\"\n",
+ "print \"Mass flow rate of condensor cooling water: \",round(mw,2),\"kg/s\"\n",
+ "print \"Thermal efficiency: \",round(n*100,2),\"%\"\n",
+ "print \"Ratio of heat supplied and rejected: \",round(r,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate of steam: 29.69 kg/s\n",
+ "Mass flow rate of condensor cooling water: 969.78 kg/s\n",
+ "Thermal efficiency: 45.12 %\n",
+ "Ratio of heat supplied and rejected: 1.822\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "p1 = 200 #Pressure of steam leaving the boiler(in MPa):\n",
+ "T1 = 650+273 #Temperature(in K):\n",
+ "p4 = 0.05 #Pressure of steam leaving the turbine(in MPa):\n",
+ "#From steam tables:\n",
+ "h2 = 3675.3 #kJ/kg\n",
+ "s2 = 6.6582 #kJ/kg.K\n",
+ "h4 = 137.82 #kJ/kg\n",
+ "v4 = 0.001005 #m**3/kg\n",
+ "sf = 0.4764 #kJ/kg.K\n",
+ "sfg = 7.9187 #kJ/kg.K\n",
+ "hf = 137.82 #kJ/kg\n",
+ "hfg = 2423.7 #kJ/kg\n",
+ "hf8 = 721.11 #kJ/kg\n",
+ "hfg8 = 2048 #kJ/kg\n",
+ "vf8 = 0.001115 #m**3/kg\n",
+ "sf8 = 2.0462 #kJ/kg.K\n",
+ "sfg8 = 4.6166 #kJ/kg.K\n",
+ "T10 = 370.36+273 #K(by interpolation)\n",
+ "h10 = 3141.81 #kJ/kg\n",
+ "sf4 = 1.7766 #kJ/kg.K\n",
+ "sfg4 = 5.1193 #kJ/kg.K\n",
+ "hf4 = 604.74 #kJ/kg\n",
+ "hfg4 = 2133.8 #kJ/kg\n",
+ "s3 = s2\n",
+ "s6 = s2 #For case b:\n",
+ "s10 = s2 #For case c:\n",
+ "s9 = s2\n",
+ "h11 = hf4\n",
+ "h13 = 1087.31 #kJ/kg\n",
+ "v11 = 0.001084 #m**3/kg\n",
+ "v13 = 0.001252 #m**3/kg\n",
+ "p10 = 40 #bar\n",
+ "p9 = 4 #bar\n",
+ "\n",
+ "#Calculations:\n",
+ "#Case a:\n",
+ "x3 = (s3-sf)/sfg #Dryness farction at state 3:\n",
+ "h3 = hf+x3*hfg #Enthalpy at state 3(in kJ/kg):\n",
+ "h1 = h4+v4*(p1-p4) #Enthalpy at state 1(in kJ/kg):\n",
+ "Wnet = (h2-h3)-(h1-h4) #Net output per kg of steam(in kJ/kg):\n",
+ "Q = h2-h1 #Heat added(in kJ/kg):\n",
+ "na = Wnet/Q*100 #Thermal efficiency:\n",
+ "#Case b:\n",
+ "x6 = (s6-sf8)/sfg8 #Dryness fraction at state 6(in kJ/kg.K): \n",
+ "h6 = hf8+x6*hfg8 #Enthalpy at state 6(in kJ/kg):\n",
+ "h7 = hf8 #Enthalpy at state 7(in kJ/kg):\n",
+ "h5 = h4+v4*(p1-p4)*10**2 #Enthalpy at state 5(in kJ/kg):\n",
+ "m = (h7-h5)/(h6-h5)\t #Mass of steam(in kg):\n",
+ "h1 = h7+vf8*(p1-p4)*10**2 #Enthalpy at state 1(in kJ/kg):\n",
+ "nb = ((h2-h6)+(1-m)*(h6-h3)-((1-m)*(h5-h4)+(h1-h7)))/(h2-h1)*100 #Thermal efficiency:\n",
+ "#Case c:\n",
+ "x9 = (s9-sf4)/sfg4 #Dryness fraction at state 9:\n",
+ "h9 = hf4+x9*hfg4 #Enthalpy at state 9(in kJ/kg):\n",
+ "h8 = h4+v4*(p9-p4)*10**2 #Enthalpy at state 8(in kJ/kg):\n",
+ "h12 = h11+v11*(p10-p9)*10**2#Enthalpy at state 12(in kJ/kg):\n",
+ "h1a = h13+v13*(p1-p10)*10**2#Enthalpy at state 1'(in kJ/kg):\n",
+ "m1 = (h13-h12)/(h10-h12) #Mass of steam flowing through first heater:\n",
+ "m2 = ((1-m1)*h11-(1-m1)*h8)/(h9-h8)#Mass of steam flowing through second heater:\n",
+ "Wcep = (1-m1-m2)*(h8-h4) #Work done by Condensate extraction pump(in kJ/kg):\n",
+ "WFP1 = h1a-h13 #Work done by feed pump 1(in kJ/kg):\n",
+ "WFP2 = (1-m1)*(h12-h11) #Work done by feed pump 2(in kJ/kg):\n",
+ "nc = ((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3)-(Wcep+WFP1+WFP2))/(h2-h1a)*100\t#Thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Thermal efficiency in case a: \",round(na,2),\"%\"\n",
+ "print \"Thermal efficiency in case b: \",round(nb,2),\"%\"\n",
+ "print \"Thermal efficiency in case c: \",round(nc,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency in case a: 46.51 %\n",
+ "Thermal efficiency in case b: 49.4 %\n",
+ "Thermal efficiency in case c: 51.39 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 50 #Pressure at which steam is generated(in bar):\n",
+ "T1 = 500+273 #Temperature of the steam(in K):\n",
+ "p3 = 5 #Pressure upto which steam is expanded(in bar):\n",
+ "T3 = 400+273 #Temperature(in K):\n",
+ "p5 = 0.05 #Final pressure(in bar):\n",
+ "#From steam tables:\n",
+ "h2 = 3433.8 #kJ/kg \n",
+ "s2 = 6.9759 #kJ/kg.K\n",
+ "s3 = s2\n",
+ "T3 = 183.14+273 #K(by interpolation)\n",
+ "h3 = 2818.03 #kJ/kg\n",
+ "h4 = 3271.9 #kJ/kg\n",
+ "s4 = 7.7938 #kJ/kg.K\n",
+ "s5 = s4\n",
+ "sf = 0.4764 #kJ/kg.K\n",
+ "sfg = 7.9187 #kJ/kg.K\n",
+ "hf = 137.82 #kJ/kg\n",
+ "hfg = 2423.7 #kJ/kg\n",
+ "h6 = hf\n",
+ "v6 = 0.001005 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "x5 = (s5-sf)/sfg #Dryness fraction at state 5:\n",
+ "h5 = hf+x5*hfg #Enthalpy at state 5(in kJ/kg):\n",
+ "h1 = h6+v6*(p1-p5)*10**2#Enthalpy at state 1(in kJ/kg):\n",
+ "Wt = (h2-h3)+(h4-h5) #Turbine work(in kJ/kg):\n",
+ "Wp = h1-h6 #Pump work(in kJ/kg):\n",
+ "Wnet = Wt-Wp #Net output per kg of steam(in kJ/kg):\n",
+ "Q = h2-h1 #Heat added per kg of steam(in kJ/kg):\n",
+ "n = Wnet/Q #Cycle efficiency:\n",
+ "ssc = 0.7457*3600/Wnet #Specific steam consumption(in kg/hp.hr):\n",
+ "r = Wnet/Wt #Work ratio:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Cycle efficiency: \",round(n*100,2),\"%\"\n",
+ "print \"Specific steam consumption: \",round(ssc,2),\"kg/hp.hr\"\n",
+ "print \"Work ratio: \",round(r,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cycle efficiency: 45.74 %\n",
+ "Specific steam consumption: 1.78 kg/hp.hr\n",
+ "Work ratio: 0.9967\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 0.144 #Mass of steam entering the feed pump(in kg):\n",
+ "p1 = 60 #Pressure of steam fed in HP turbine(in bar):\n",
+ "T1 = 450+273 #Temperature of the steam(in K):\n",
+ "p3 = 3 #Pressure of steam entering LP turbine(in bar):\n",
+ "p4 = 0.05 #Pressure of steam leaving the LP turbine(in bar):\n",
+ "T3 = 115 #Condensate temperature(in C):\n",
+ "W = 30 #Alternator output(in MW):\n",
+ "nb = 0.90 #Boiler efficiency:\n",
+ "na = 0.98 #Alternator efficiency:\n",
+ "#From steam tables:\n",
+ "h2 = 3301.8 #kJ/kg \n",
+ "s2 = 6.7198 #kJ/kg.K\n",
+ "hf = 137.82 #kJ/kg\n",
+ "hfg = 2423.7 #kJ/kg\n",
+ "vf = 0.001005 #m**3/kg\n",
+ "h8 = 561.47 #kJ/kg\n",
+ "sf3 = 1.6718 #kJ/kg.K\n",
+ "sfg3 = 5.3201 #kJ/kg.K\n",
+ "hf3 = 561.47 #kJ/kg\n",
+ "hfg3 = 2163.8 #kJ/kg\n",
+ "sf = 0.4764 #kJ/kg.K\n",
+ "sfg = 7.9187 #kJ/kg.K\n",
+ "\n",
+ "#Calculations:\n",
+ "h5 = hf\n",
+ "v5 = vf\n",
+ "s3 = s2\n",
+ "s4 = s2\n",
+ "h9 = h8\n",
+ "v6 = v5\n",
+ "x3 = (s3-sf3)/sfg3 #Dryness fraction at state 3:\n",
+ "x4 = (s4-sf)/sfg #Dryness fraction at state 4:\n",
+ "h3 = hf3+x3*hfg3 #Enthalpy at state 3(in kJ/kg): \n",
+ "h4 = hf+x4*hfg #Enthalpy at state 4(in kJ/kg): \n",
+ "h1 = 4.18*T3 #Enthalpy at state 1(in kJ/kg):\n",
+ "Wp = v5*(p1-p4)*10**2 #Pumping work(in kJ/kg) also equal to h7-h6:\n",
+ "Wnet = (h2-h3)+(1-m)*(h3-h4)-(1-m)*Wp#Net output(in kJ/kg):\n",
+ "ms = W*10**3/(na*Wnet) #Mass of steam required to be generated(in kg/hr):\n",
+ "Q = (h2-h1)/nb #Heat added(in kJ/kg):\n",
+ "no = Wnet/Q*100 #Overall thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Steam bled for feed heating: \",round(m,3),\"kg\"\n",
+ "print \"Capacity of boiler: \",round(ms,2)*3600,\"kg/hr\"\n",
+ "print \"Overall thermal efficiency: \",round(no,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam bled for feed heating: 0.144 kg\n",
+ "Capacity of boiler: 94464.0 kg/hr\n",
+ "Overall thermal efficiency: 37.21 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 30 #Pressure of steam entering(in bar):\n",
+ "T1 = 300 #Temperature(in C):\n",
+ "p3 = 6 #Pressure of steam leaving the first stage(in bar):\n",
+ "p4 = 1 #Steam leaving second stage at pressure(in bar):\n",
+ "p5 = 0.075 #Pressure of steam leaving the third stage(in bar):\n",
+ "T = 38 #Condenstate temperature(in C):\n",
+ "T8 = 150 #Temperature of water after leaving first and second heater(in C):\n",
+ "T13 = 95\n",
+ "n = 0.8 #Efficiency of turbine:\n",
+ "W = 15 #Turbine output(in MW):\n",
+ "#From steam tables:\n",
+ "h2 = 3230.9 #kJ/kg\n",
+ "s2 = 6.9212 #kJ/kg.K\n",
+ "T3 = 190.97 #K(by interpolation)\n",
+ "h3 = 2829.63 #kJ/kg\n",
+ "s3a = 7.1075 #kJ/kg.K\n",
+ "sf1 = 1.3026 #kJ/kg.K\n",
+ "sfg1 = 6.0568 #kJ/kg.K\n",
+ "hf1 = 417.46 #kJ/kg\n",
+ "hfg1 = 2258 #kJ/kg\n",
+ "h5 = 234.64 #kJ/kg\n",
+ "hf6 = 670.56 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s2\n",
+ "s4 = s3a\n",
+ "h11 = hf6\n",
+ "h3a = round(h2-n*(h2-h3),2) #Actual enthalpy at state 3(in kJ/kg):\n",
+ "x4 = round((s4-sf1)/sfg1,3) #Dryness fraaction at state 4:\n",
+ "h4 = hf1+x4*hfg1 #Enthalpy at state 4(in kJ/kg):\n",
+ "h4a = round(h3a-n*(h3a-h4),2) #Actual enthaly at state 4(in kJ/kg):\n",
+ "x4a = (h4a-hf1)/hfg1 #Actual dryness fraction at state 4:\n",
+ "s4a = sf1+x4a*sfg1 #Actual entropy at state 4(in kJ/kg.K):\n",
+ "s5 = s4a #Entropy at state 5(in kJ/kg.K):\n",
+ "x5 = 0.8735 #Dryness fraction:\n",
+ "h5 = 2270.43 #Enthalpy at state 5(in kJ/kg):\n",
+ "h5a = h4a-n*(h4a-h5) #Actual enthalpy at state 5(in kJ/kg):\n",
+ "m1 = 0.1293 \n",
+ "m2 = 0.1059 \n",
+ "Wt = (h2-h3a)+(1-m1)*(h3a-h4a)+(1-m1-m2)*(h4a-h5a) #Turbine output(in kJ/kg):\n",
+ "r = W*10**3/Wt*3600 #Rate of steam generation required(in kg/hr):\n",
+ "c = (m1+m2)*r #Capacity of drain pump(in kg/hr):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Capacity of drain pump: \",round(c,2),\"kg/hr\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of drain pump: 16273.8 kg/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 292"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 70 #Pressure of the steam entering(in bar):\n",
+ "T1 = 450 #Temperature of the steam entering the HP turbine(in C):\n",
+ "p3 = 30 #Pressure at which steam is extracted(in bar):\n",
+ "T4 = 400 #Temperature at which it is reheated(in C):\n",
+ "p6 = 0.075 #Pressure of steam after expanding(in bar):\n",
+ "T = 140 #Temperature at which steam is bled(in C):\n",
+ "nh = 0.80 #Efficiency of HP turbine:\n",
+ "nl = 0.85 #Efficiency of LP turbine:\n",
+ "#From steam tables:\n",
+ "h2 = 3287.1 #kJ/kg \n",
+ "s2 = 6.6327 #kJ/kg.K\n",
+ "h3 = 3049.48 #kJ/kg\n",
+ "h4 = 3230.9 #kJ/kg\n",
+ "s4 = 6.9212 #kJ/kg.K\n",
+ "h6 = 2158.55 #kJ/kg\n",
+ "p5 = 3.61 #bar\n",
+ "h5 = 2712.38 #kJ/kg\n",
+ "h9 = 1008.42 #kJ/kg\n",
+ "v7 = 0.001008 #m**3/kg\n",
+ "h7 = 168.79 #kJ/kg\n",
+ "h8 = 169.15 #kJ/kg\n",
+ "v9 = 0.00108 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s6 = s4\n",
+ "s5 = s4\n",
+ "h3a = h2-nh*(h2-h3) #Actual enthalpy at state 3(in kJ/kg):\n",
+ "h6a = h4-nl*(h4-h6) #Actual enthaly at state 6(in kJ/kg):\n",
+ "h5a = h4-nl*(h4-h5) #Actual enthaly at state 5(in kJ/kg):\n",
+ "h8 = h7+v7*(p5-p6)*10**2 #Enthalpy at state 8(in kJ/kg):\n",
+ "m = (h9-h8)/(h5a-h8) #Mass of bled steam per kg of steam generated(in kg/kg steam generated):\n",
+ "h1 = h9+v9*(p1-p5)*10**2 #Enthalpy at state 1(in kJ/kg):\n",
+ "Wnet = (h2-h3a)+(h4-h5a)+(1-m)*(h5a-h6a)-((1-m)*(h8-h7)+(h1-h9))#Net work per kg of steam generated(in kJ/kg):\n",
+ "Q = (h2-h1)+(h4-h3a) #Heat added per kg of steam generated(in kJ/kg):\n",
+ "n = Wnet/Q*100 #Thermal efficiency:\n",
+ "\n",
+ "#Result:\n",
+ "print \"Thermal efficiency: \",round(n,2),\"%\"\n",
+ "print \"___There is a calculation mistake in calculating h2-h1 in book hence difference in answer_____\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency: 39.22 %\n",
+ "___There is a calculation mistake in calculating h2-h1 in book hence difference in answer_____\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 150 #Pressure of the steam entering the boiler(in bar):\n",
+ "T1 = 450 #Temperature of the steam entering the turbine(in C):\n",
+ "p6 = 0.05 #Condensor pressure(in bar):\n",
+ "p3 = 10 #Pressure of steam bled out between 1st & 2nd stage and 2nd & 3rd(in bar):\n",
+ "p4 = 1.5\n",
+ "T11 = 150 #Temperature of feed water leaving closed water heater(in C):\n",
+ "m = 300 #Mass flow rate(in kg/s):\n",
+ "#From steam tables:\n",
+ "h2 = 3308.6 #kJ/kg \n",
+ "s2 = 6.3443 #kJ/kg.K\n",
+ "h3 = 2667.26 #kJ/kg\n",
+ "h4 = 2355.18 #kJ/kg\n",
+ "h5 = 1928.93 #kJ/kg\n",
+ "h6 = 137.82 #kJ/kg\n",
+ "v6 = 0.001005 #m**3/kg\n",
+ "h8 = 467.11 #kJ/kg\n",
+ "v8 = 0.001053 #m**3/kg\n",
+ "h10 = 1610.5 #kJ/kg\n",
+ "v10 = 0.001658 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s2\n",
+ "s4 = s2\n",
+ "s5 = s2\n",
+ "h7 = h6+v6*(p4-p6)*10**2 #Enthalpy at state 7(in kJ/kg):\n",
+ "h9 = round(h8+v8*(p1-p4)*10**2,2) #Enthalpy at state 9(in kJ/kg):\n",
+ "h12 = round(h10+v10*(p1-p3)*10**2,2) #Enthalpy at state 12(in kJ/kg):\n",
+ "m1 = round((4.18*T11-h9)/(h3-h9+4.18*T11-h10),2)#Mass of steam bled out in closed feed water heater(in kg/kg of steam generated):\n",
+ "m2 = round(((1-m1)*(h8-h7))/(h4-h7),2)\n",
+ "h1 = (4.18*T11)*(1-m1)+m1*h12 #Enthalpy at state 1(in kJ/kg):\n",
+ "Wnet = (h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+m1*(h12-h10))\t#Net work output per kg of steam generated(in kJ/kg):\n",
+ "Q = h2-h1 #Heat added(in kJ/kg):\n",
+ "n = Wnet/Q*100 #Cycle thermal efficiency:\n",
+ "P = Wnet*m #Net power developed(KW)\n",
+ "\n",
+ "#Results:\n",
+ "print \"Cycle thermal efficiency: \",round(n,1),\"%\"\n",
+ "print \"Net power developed: \",round(P),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cycle thermal efficiency: 47.6 %\n",
+ "Net power developed: 365700.0 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 100 #Pressure of the steam entering the boiler(in bar):\n",
+ "T1 = 500 #Temperature of the steam entering the turbine(in \u00baC):\n",
+ "p6 = 0.075 #Condensor pressure(in bar):\n",
+ "p3 = 20 #Pressure at which steam is extracted at exit of HPT(in bar):\n",
+ "p4 = 4 #Pressure at which steam is extracted at exit of IPT(in bar):\n",
+ "T = 200 #Temperature at which feed water leaves closed feed warere heater(in C):\n",
+ "W = 100 #Net power output(in MW):\n",
+ "#From steam tables:\n",
+ "h2 = 3373.7 #kJ/kg\n",
+ "s2 = 6.5966 #kJ/kg.K\n",
+ "T3 = 261.6 #C(by interpolation)\n",
+ "h3 = 2930.57 #kJ/kg\n",
+ "h4 = 2612.65 #kJ/kg\n",
+ "h5 = 2055.09 #kJ/kg\n",
+ "h10 = 908.79 #kJ/kg\n",
+ "h8 = 604.74 #kJ/kg\n",
+ "v6 = 0.001008 #m**3/kg\n",
+ "h6 = 168.79 #kJ/kg\n",
+ "h8 = 604.74 #kJ/kg\n",
+ "v8 = 0.001084 #m**3/kg\n",
+ "#For modified part:\n",
+ "h3a = 3247.6 #kJ/kg \n",
+ "s3a = 7.1271 #kJ/kg.K\n",
+ "T4 = 190.96 #C(by interpolation)\n",
+ "h4a = 2841.2 #kJ/kg\n",
+ "h5a = 2221.11 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s2\n",
+ "s4 = s2\n",
+ "s5 = s2\n",
+ "h1 = 4.18*T\n",
+ "h11 = h10\n",
+ "s4a = s3a\n",
+ "s5a = s3a\n",
+ "h7 = h6+v6*(p4-p6)*10**2 #Enthalpy at state 7(in kJ/kg):\n",
+ "h9 = h8+v8*(p3-p4)*10**2 #Enthalpy at state 9(in kJ/kg):\n",
+ "m1 = (h1-h9)/(h3-h10) #Mass of steam bled out in closed feed water heater(in kg/kg of steam generated):\n",
+ "m2 = ((h8-h7)-m1*(h11-h7))/(h4-h7)\n",
+ "Wnet = (h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(h9-h8)) #Net work per steam generated(in kJ/kg):\n",
+ "Q = h2-h1 #Heat added(in kJ/kg):\n",
+ "n = Wnet/Q*100 #Thermal efficiency:\n",
+ "sgc = W*10**3/Wnet #Steam genration rate(in kg/s):\n",
+ "m2a = ((h8-h7)-m1*(h11-h7))/(h4a-h7)#Mass of steam bled out in closed feed water heater(in kg/kg of steam generated):\t\t\t\t#For modified part:\n",
+ "Wneta = (h2-h3)+(1-m1)*(h3a-h4a)+(1-m1-m2a)*(h4a-h5a)-((1-m1-m2a)*(h7-h6)+(h9-h8)) #Net work per steam generated(in kJ/kg):\n",
+ "Qa = h2-h1+(1-m1)*(h3a-h3) #Heat added(in kJ/kg):\n",
+ "na = Wneta/Qa*100 #Thermal efficiency:\n",
+ "I = (na-n)/n*100 #% Increase in thermal efficiency due to reheating:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Thermal efficiency: \",round(n,2),\"%\"\n",
+ "print \"Steam generation rate: \",round(sgc,2),\"kg/s\"\n",
+ "print \"Thermal efficiency: \",round(na,2),\"%\"\n",
+ "print \"Percentage increase in efficiency due to reheating: \",round(I,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency: 44.8 %\n",
+ "Steam generation rate: 87.95 kg/s\n",
+ "Thermal efficiency: 45.04 %\n",
+ "Percentage increase in efficiency due to reheating: 0.52 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hd = 349 #Enthalpy of dry saturated vapour at 8.45 bar(KJ/Kg)\n",
+ "hi = 234.5 #Enthalpy after isentropic expansion to 0.07 bar(KJ/Kg)\n",
+ "hs = 35 #Enthalpy of saturated liquid at 0.07 bar (KJ/Kg)\n",
+ "n1 = 0.85 #Capability:\n",
+ "Cpw = 4.18 #Specific heat of water:\n",
+ "#From steam tables:\n",
+ "h1 = 2767.13 #kJ/kg \n",
+ "h2 = 3330.3 #kJ/kg\n",
+ "s2 = 6.9363 #kJ/kg.K\n",
+ "h3 = 2899.23 #kJ/kg\n",
+ "x4 = 0.93\n",
+ "h4 = 2517.4 #kJ/kg\n",
+ "x5 = 0.828\n",
+ "h5 = 2160.958 #kJ/kg\n",
+ "h6 = 168.79 #kJ/kg\n",
+ "v6 = 0.001008 #m**3/kg\n",
+ "h7 = 168.88 #kJ/kg\n",
+ "h9 = 417.46 #kJ/kg\n",
+ "h13 = 721.11 #kJ/kg\n",
+ "v13 = 0.001252 #m**3/kg\n",
+ "T1 = 150 #\u00baC\n",
+ "h10 = 418.19 #kJ/kg\n",
+ "m1 = 0.102\n",
+ "m2 = 0.073\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s2\n",
+ "s4 = s2\n",
+ "s5 = s2\n",
+ "qd = hd-hi #For mercury cycle,Isentropic heat drop: \n",
+ "qda = n1*qd#Actual heat drop:\n",
+ "qre = hd-qda-hs #Heat rejected in condenser(in kJ/kg):\n",
+ "qa = hd-hs #Heat added in the boiler(in kJ/kg):\n",
+ "qam = h1-Cpw*T1 #Heat added in the condenser of mercury cycle(in kJ/kg):\n",
+ "m = qam/qre #Mercury per steam required per kg of steam:\n",
+ "Wp = v13*(40-8)*10**2 #Pump work(in kJ/kg):\n",
+ "qt = m*qa+h2-h1 #Total heat supplied(in kJ/kg steam):\n",
+ "Wm = m*qda #Work done in mercury cycle(in kJ/kg):\n",
+ "Ws = (h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h7-h6)-m2*(h10-h9)-m1*Wp#Work done in steam cycle(in kJ/hr):\n",
+ "Wt = Wm+Ws #Total work done(in kJ/kg):\n",
+ "n = Wt/qt*100 #Thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Thermal efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency: 55.36 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from sympy import symbols,solve\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h1 = 3023.5 #KJ/Kg\n",
+ "s1 = 6.7664 #KJ/Kg.K\n",
+ "n = 0.8 #Efficiency ratio of HP and LP\n",
+ "W = 0.1 #Steam consumption at no load\n",
+ "P = 2500 #Pressure turbine output\n",
+ "mHP,cHP,mLP,cLP = symbols('mHp cHP mLP cLP') #Symbolic expressions for mHP,cHP,mLP,cLP respectively \n",
+ "LPavail = 1.5 #LP steam available(Kg/s) for getting 1000hp \n",
+ "DhLP = 387.49 #Actual enthalpy drop in LP(KJ/Kg)\n",
+ "\n",
+ "#From Table 3\n",
+ "sf = 0.5764\n",
+ "sfg = 7.6752\n",
+ "hf = 168.79\n",
+ "hfg = 2406.0\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "x3 = round((s2 - sf)/sfg,3)\n",
+ "h3HP = hf + x3*hfg\n",
+ "DhHP = n*(h1-h3HP) #Actual enthalpy drop in HP(KJ/Kg)\n",
+ "x3a = (7.1271-sf)/sfg\n",
+ "h3LP = hf+ x3a*hfg #Enthalpy at exit(KJ/Kg)\n",
+ "HPfull = P*0.7457/DhHP #HP steam consumption at full load(Kg/s)\n",
+ "HPNL = W*HPfull #HP steam consumption at no load(Kg/s)\n",
+ "LPfull = P*0.7457/DhLP #LP steam consumption at full load(Kg/s)\n",
+ "LPNL = W*LPfull ##LP steam consumption at no load(Kg/s)\n",
+ "HP = solve([mHP*P+cHP-HPfull,mHP*0+cHP-HPNL],[mHP,cHP])\n",
+ "LP = solve([mLP*P+cLP-LPfull,mLP*0+cLP-LPNL],[mLP,cLP])\n",
+ "xLP = (LPavail-LP[cLP])/LP[mLP]\n",
+ "xHP = 1000-xLP\n",
+ "yHP = HP[mHP]*xHP + HP[cHP]\n",
+ "\n",
+ "#Results:\n",
+ "print 'HP steam required:',round(yHP,2),'Kg/s'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "HP steam required: 0.63 Kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 304"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Cpw = 4.18 #Specific heat of water:\n",
+ "#From steam tables:\n",
+ "h2 = 2960.7 #kJ/kg \n",
+ "s2 = 6.3615 #kJ/kg\n",
+ "x3 = 0.863\n",
+ "h3 = 2404.94 #kJ/kg\n",
+ "h7 = 358.59 #kJ/kg\n",
+ "x10 = 0.754\n",
+ "h10 = 1982.91 #kJ/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "s3 = s2\n",
+ "s10 = s3\n",
+ "m1 = (1-x3)*0.5 #Mass pf moisture in separator(in kg):\n",
+ "m2 = 0.5-m1 #Mass of steam entering LPT(in kg):\n",
+ "m3 = 0.5+m1 #Mass of water entering the hot well(in kg):\n",
+ "T = (m3*90+m2*40) #Temperature of water leaving hotwell(in C):\n",
+ "Q = 0.5*(h3-h7) #Heat transferred per kg steam generated:\n",
+ "Wnet = (h2-h3)*1+m2*(h3-h10) #Net work output(in kJ/kg):\n",
+ "Qa = h2-Cpw*T #Heat added(in kJ/kg):\n",
+ "n = Wnet/Qa*100 #Thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Temperature of water leaving hotwell: \",round(T,3),\"\u00b0C\"\n",
+ "print \"Heat transferred per kg steam generated: \",round(Q,3),\"kJ/kg steam\"\n",
+ "print \"Thermal efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of water leaving hotwell: 68.425 \u00b0C\n",
+ "Heat transferred per kg steam generated: 1023.175 kJ/kg steam\n",
+ "Thermal efficiency: 27.59 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 306"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 35 #Steam flow rate(in kg/s):\n",
+ "#From steam tables:\n",
+ "h1 = 3530.9 #kJ/kg \n",
+ "s1 = 6.9486 #kJ/kg.K\n",
+ "x2 = 0.864\n",
+ "h2 = 2288.97 #kJ/kg\n",
+ "v3 = 0.001017 #m**3/kg\n",
+ "h3 = 251.40 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "Wp = v3*(70-0.20)*10**2 #Pump work(in kJ/kg):\n",
+ "Wt = h1-h2 #Turbine work(in kJ/kg):\n",
+ "Wnet = Wt-Wp #Net work(in kJ/kg):\n",
+ "P = m*Wnet/10**3 #Power produced(in MW):\n",
+ "h4 = h3+Wp #Enthalpy at state 4(in kJ/kg):\n",
+ "Q = m*(h1-h4) #Total heat supplied to the boiler(in kJ/s):\n",
+ "n = Wnet*m/Q*100 #Thermal efficiency:\n",
+ "\n",
+ "#results:\n",
+ "print \"Net power: \",round(P,2),\"MW\"\n",
+ "print \"Thermal efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net power: 43.22 MW\n",
+ "Thermal efficiency: 37.73 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 307"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P = 10 #Output(in MW):\n",
+ "#From steam tables:\n",
+ "h1 = 3625.3 #kJ/kg \n",
+ "s1 = 6.9029 #kJ/kg.K\n",
+ "h2 = 3105.08 #kJ/kg\n",
+ "x3 = 0.834\n",
+ "h3 = 2187.43 #kJ/kg\n",
+ "h6 = 908.79 #kJ/kg\n",
+ "h5 = 191.83 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "s3 = s2\n",
+ "h4 = h5\n",
+ "h7 = h6\n",
+ "mb = (h6-h5)/(h2-h5) #Steam bled per kg of steam passing through HP stage:\n",
+ "m = round(P*10**3/((h1-h2)+(1-mb)*(h2-h3)),2) #Mass of steam leaving boiler(in kg/s):\n",
+ "Q = m*(h1-h7) #Heat supplied to the boiler(in kJ/s):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Steam bled per kg of steam passing through HP stage: \",round(mb,3),\"kg\"\n",
+ "print \"Heat added: \",round(Q,2),\"kJ/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam bled per kg of steam passing through HP stage: 0.246 kg\n",
+ "Heat added: 22411.21 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P = 50 #Net output(in MW):\n",
+ "#From steam tables:\n",
+ "h1 = 3373.7 #kJ/kg\n",
+ "s1 = 6.5966 #kJ/kg.K\n",
+ "s3 = 7.7622 #kJ/kg.K\n",
+ "h6 = 2930.572 #kJ/kg\n",
+ "h3 = 3478.5 #kJ/kg\n",
+ "T2 = 181.8 #C\n",
+ "h2 = 2782.8 #kJ/kg\n",
+ "T8 = 358.98 #C\n",
+ "h8 = 3188.7 #kJ/kg\n",
+ "x4 = 0.95\n",
+ "h4 = 2462.99 #kJ/kg\n",
+ "h11 = 856.8 #kJ/kg\n",
+ "h9 = 604.74 #kJ/kg\n",
+ "h7 = 908.79 #kJ/kg\n",
+ "h4a = 191.83 #kJ/kg\n",
+ "v4a = 0.001010 #m**3/kg\n",
+ "v9 = 0.001084 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s6 = s1\n",
+ "s2 = s1\n",
+ "s8 = s3\n",
+ "s4 = s3\n",
+ "h7a = h7\n",
+ "h5 = h4a+v4a*(4-0.1)*10**2 #Enthalpy at state 5(in kJ/kg):\n",
+ "h10 = h9+v9*(100-4)*10**2 #Enthalpy at state 10(in kJ/kg):\n",
+ "m6 = (h11-h10)/(h6-h7) #Mass per kg of steam from boiler(in kg):\n",
+ "m8 = (h9-(1-m6)*h5-m6*h7a)/(h8-h5)\n",
+ "m6 = 0.135\n",
+ "m8 = 0.105\n",
+ "Whpt = (h1-h6)+(1-m6)*(h6-h2) #Work in turbines(in kJ/kg):\n",
+ "Wlpt = (1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)\n",
+ "Wcep = (1-m6-m8)*(h5-h4a) #Pump works(in kJ/kg)\n",
+ "Wfp = h10-h9\n",
+ "m = P*10**3/(Whpt+Wlpt-Wcep-Wfp)#Mass of steam entering first stage of turbine(in kg/s):\n",
+ "Q = m*(h1-h11) #Heat supplied in the boiler(in kJ/s):\n",
+ "n = P*10**3/Q*100 #Thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass of steam bled at 20 bar: \",round(m6,3),\" kg per kg of steam entering first stage\"\n",
+ "print \"Mass of steam bled at 4 bar: \",round(m8,3),\" kg per kg of steam entering first stage\"\n",
+ "print \"Mass of steam entering first stage: \",round(m,2),\" kg/s\"\n",
+ "print \"Thermal efficiency: \",round(n,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of steam bled at 20 bar: 0.135 kg per kg of steam entering first stage\n",
+ "Mass of steam bled at 4 bar: 0.105 kg per kg of steam entering first stage\n",
+ "Mass of steam entering first stage: 36.7 kg/s\n",
+ "Thermal efficiency: 54.13 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19, page no. 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "nt = 0.85 #Turbine efficiency:\n",
+ "ng = 0.90 #Generator efficiency:\n",
+ "nm = 0.95 #Mechanical efficiency:\n",
+ "Cpw = 4.18 #Specific heat of water:\n",
+ "#From steam tables:\n",
+ "h1 = 3450.02 #kJ/kg\n",
+ "s1 = 6.6923 #kJ/kg.K\n",
+ "h3 = 3576.99 #kJ/kg\n",
+ "s3 = 7.52411 #kJ/kg.K\n",
+ "h2 = 3010 #kJ/kg\n",
+ "h9 = 3175 #kJ/kg\n",
+ "h4 = 2300 #kJ/kg\n",
+ "h5 = 137.82 #kJ/kg\n",
+ "v5 = 0.001005 #m**3/kg\n",
+ "h8 = 962.11 #kJ/kg\n",
+ "h12 = 1407.56 #kJ/kg\n",
+ "h10 = 670.56 #kJ/kg\n",
+ "v10 = 0.001101 #m**3/kg\n",
+ "PO = 120 #Plant output(MW)\n",
+ "\n",
+ "#Calculations:\n",
+ "h2a = h1-(h1-h2)*nt #Enthalpy at state 2'(in kJ/kg):\n",
+ "h9a = h3-(h3-h9)*nt #Enthalpy at state 9'(in kJ/kg):\n",
+ "h4a = h3-(h3-h4)*nt #Enthalpy at state 4'(in kJ/kg):\n",
+ "h6 = h5+v5*(6-0.05)*10**2 #Enthalpy at state 6(in kJ/kg):\n",
+ "h6a = h5+(h6-h5)/ng #Enthalpy at state 6'(in kJ/kg):\n",
+ "h11 = h10+v10*(100-6)*10**2 #Enthalpy at state 11(in kJ/kg):\n",
+ "h11a = h10+(h11-h10)/ng #Enthalpy at state 11'(in kJ/kg):\n",
+ "m1 = round((h11a-h12)/(h8-h2a),3) #Mass flow rate(in kg/kg steam):\n",
+ "m2 = round((h10-m1*h8-(1-m1)*h6a)/(h9-h6a),3)\n",
+ "Whp = h1-h2a #Work from HP turbine(in kJ/kg):\n",
+ "Wlp = (1-m1)*(h3-h9a)+(1-m1-m2)*(h9a-h4a)#Work from LP turbine(in kJ/kg):\n",
+ "Wp = (1-m1-m2)*(h6a-h5)+(h11a-h10) #Pump work:\n",
+ "Wnet = Whp+Wlp-Wp #Net work(in kJ/kg):\n",
+ "ssc = 3600/(Wnet*ng*nm) #Specific steam consumption(in kg/kw.h):\n",
+ "ssc = 3.93\n",
+ "no = Wnet*nm*ng/((h1-h12)+(1-m1)*(h3-h2a))*100 #Overall thermal efficiency:\n",
+ "m = ssc*PO*10**3 #Mass of steam required(in kg/hr):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Specific steam consumption: \",round(ssc,2),\"kg/kw.h\"\n",
+ "print \"Overall efficiency: \",round(no,2),\"%\"\n",
+ "print \"Mass of steam held from HP turbine: \",round(m1*m,1),\"kg/hr\"\n",
+ "print \"Mass of steam held from LP turbine: \",round(m2*m,1),\"kg/hr\"\n",
+ "\n",
+ "print m1, m2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific steam consumption: 3.93 kg/kw.h\n",
+ "Overall efficiency: 36.57 %\n",
+ "Mass of steam held from HP turbine: 161758.8 kg/hr\n",
+ "Mass of steam held from LP turbine: 38671.2 kg/hr\n",
+ "0.343 0.082\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20, page no. 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P = 14000 #Power required(in kW):\n",
+ "r = 0.75 #Efficiency ratio of turbine:\n",
+ "#From steam tables:\n",
+ "h1 = 3137 #kJ/kg \n",
+ "s1 = 6.9563 #kJ/kg.K\n",
+ "x2 = 0.765\n",
+ "h2 = 2170.38 #kJ/kg\n",
+ "hf = 467.11 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "h2a = h1-(h1-h2)*r #Enthalpy at state 2'(in kJ/kg):\n",
+ "m = P/(h2a-hf) #Mass of steam required(in kg/s):\n",
+ "P1 = m*(h1-h2a) #Power available to the generator(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Power available to the generator: \",round(P1,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power available to the generator: 5218.46 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21, page no. 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "nt = 0.80 #Turbine efficiency:\n",
+ "nb = 0.80 #Boiler efficiency:\n",
+ "P = 9000 #Power required(in kW):\n",
+ "h1 = 3137 #kJ/kg #From steam tables:\n",
+ "s1 = 6.9563 #kJ/kg.K\n",
+ "s2 = s1\n",
+ "x2 = 0.960\n",
+ "h2 = 2638.34 #kJ/kg\n",
+ "hf = 503.71 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "h2a = h1-(h1-h2)*nt #Enthalpy at state 2'(in kJ/kg):\n",
+ "ms = P/(h2a-hf) #Mass flow rate(in kg/s):\n",
+ "P1 = ms*(h1-h2a) #Power developed(in kW):\n",
+ "pt = (h1-hf)*ms #Total heat consumption in the bolier(in kW):\n",
+ "pa = pt/nb #Actual heat consumption(in kJ/s):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Power developed: \",round(P1,2),\"kW\"\n",
+ "print \"Actual heat consumption: \",round(pa,2),\"kJ/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power developed: 1606.88 kW\n",
+ "Actual heat consumption: 13258.6 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22, page no. 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable Declaration: \n",
+ "P = 4500 #Total power required(in kW):\n",
+ "Q = 15000 #Heat load(in kW):\n",
+ "n = 0.80 #Efficiency of turbines:\n",
+ "m = 10 #Steam consumption rate(in kg/s):\n",
+ "#From steam tables:\n",
+ "h1 = 3137 #kJ/kg\n",
+ "s1 = 6.9563 #kJ/kg.K\n",
+ "T2 = 179.18 #C\n",
+ "h2 = 2813.41 #kJ/kg\n",
+ "hf = 640.23 #kJ/kg\n",
+ "#For case 1:\n",
+ "T2a = 213.34 #C \n",
+ "s2a = 7.125 #kJ/kg.K\n",
+ "x3 = 0.853\n",
+ "h3 = 2221.11 #kJ/kg\n",
+ "#For case 2:\n",
+ "h2a = 2878.13 #kJ/kg\n",
+ "T3aa = 210.04 #C\n",
+ "s3aa = 7.138 #kJ/kg.K\n",
+ "x4 = 0.855\n",
+ "h4 = 2225.92 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s2a\n",
+ "h3aa = h2a\n",
+ "s4 = s3aa\n",
+ "h2a = h1-(h1-h2)*n #Enthalpy at state 2'(in kJ/kg):\n",
+ "q = h2a-hf #Heat available for process heating(in kJ/kg):\n",
+ "msh = Q/q #Mass flow rate(in kg/s):\n",
+ "h3a = h2-(h2a-h3)*n #Enthalpy at state 3'(in kJ/kg):\n",
+ "mshp = (P+msh*(h2a-h3a))/((h1-h2a)+(h2a-h3a)) #Mass of steam produced:\n",
+ "#For case 2:\n",
+ "mshpn = 10 \n",
+ "mshn = 6.7\n",
+ "Pn = mshpn*(h1-h2a) #Power produced by HP turbine(in kW):\n",
+ "M3aa = mshpn-mshn\n",
+ "h4a = h3aa-(h3aa-h4)*n #Enthalpy at state 4'(in kJ/kg):\n",
+ "Pn1 = M3aa*(h3aa-h4a) #Power produced by LP turbine(in kW):\n",
+ "Pt = Pn+Pn1 #Total power produced(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Total power produced: \",round(Pt,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total power produced: 4310.55 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23, page no. 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "na = 0.975 #Alternator efficiency:\n",
+ "nt = 0.80 #Turbine efficiency:\n",
+ "L = 50 #Turbine's losses(in kW):\n",
+ "p = 8 #Electric power developed(in mW):\n",
+ "m = 8 #Condenser discharge(in kg/s):\n",
+ "#From steam tables:\n",
+ "h1 = 3137 #kJ/kg\n",
+ "s1 = 6.9563 #kJ/kg.K\n",
+ "s1a = 7 #kJ/kg.K\n",
+ "h2 = 2830 #kJ/kg\n",
+ "h4 = 2210 #kJ/kg\n",
+ "hf = 376.92 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "h1a = h1\n",
+ "s2 = s1a\n",
+ "h2a = h1a-(h1a-h2)*nt #Enthalpy at state 2'(in kJ/kg):\n",
+ "h3 = h2a\n",
+ "h4a = h3-(h3-h4)*nt #Enthalpy at state 4'(in kJ/kg):\n",
+ "P = m/na #Power available to the alternator(in MW):\n",
+ "Pt = P*10**3+L #Total power produced(in kW):\n",
+ "plp = m*(h3-h4) #Power produced by LP turbine(in kW):\n",
+ "php = Pt-plp #Power produced by LP turbine(in kW):\n",
+ "m1 = round(php/(h1a-h2a),2) #Mass flow rate through HP turbine(in kg/s):\n",
+ "ph = (m1-m)*(h2-hf) #Heat available for process heating(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat available for process heating: \",round(ph,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat available for process heating: 8389.53 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24, page no. 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "nt = 0.80 #Turbine efficiency:\n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "p = 720 #Power delivered by turbine(in kW):\n",
+ "#From steam tables:\n",
+ "h1 = 3045.8 #kJ/kg\n",
+ "s1 = 7.0317 #kJ/kg.K\n",
+ "x4 = 0.841\n",
+ "h4 = 2192.24 #kJ/kg.K\n",
+ "h2 = 2706.7 #kJ/kg\n",
+ "s2 = 7.1271 #kJ/kg.K\n",
+ "x3 = 0.854\n",
+ "h3 = 2223.51 #kJ/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "s4 = s1\n",
+ "s3 = s2\n",
+ "h4a = h1-(h1-h4)*nt #Enthalpy at state 4'(in kJ/kg):\n",
+ "h3a = h2-(h2-h3)*nt #Enthalpy at state 3'(in kJ/kg):\n",
+ "P = p/nm #Power developed in the turbine(in kW):\n",
+ "m1 = 3600/(h1-h4a) #HP steam consumption(in kg/kW.h):\n",
+ "m2 = 3600/(h2-h3a) #LP steam consumption(in kg/kW.h):\n",
+ "\n",
+ "#Results:\n",
+ "print \"HP steam consumption: \",round(m1,2),\"kg/kW.h\"\n",
+ "print \"LP steam consumption: \",round(m2,2),\"kg/kW.h\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "HP steam consumption: 5.27 kg/kW.h\n",
+ "LP steam consumption: 9.31 kg/kW.h\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25, page no. 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "mhp = 2 #Mass flow rate(in kg/s):\n",
+ "mlp = 1.5\n",
+ "n = 0.90 #Expansion efficiency:\n",
+ "P = 3000 #Power developed by the turbine(in kW):\n",
+ "#From steam tables:\n",
+ "h1 = 3034.8 #kJ/kg\n",
+ "s1 = 6.8844 #kJ/kg.K\n",
+ "x3 = 0.9566\n",
+ "h3 = 2611.04 #kJ/kg\n",
+ "h2 = 2706.7 #kJ/kg\n",
+ "xout = 0.8535\n",
+ "hout = 2222.31 #kJ/kg\n",
+ "h4 = 2676.25 #kJ/kg\n",
+ "h5 = 2290 #kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "s3 = s1\n",
+ "hin = h2\n",
+ "h3a = h1-(h1-h3)*n #Enthalpy at state 3'(in kJ/kg):\n",
+ "houta = hin-(hin-hout)*n #Enthalpy of steam going out(in kJ/kg):\n",
+ "ms = P/(hin-hout) #Mass flow rate of steam(in kg/s):\n",
+ "h5a = h4-(h4-h5)*n #Enthalpy at state 5'(in kJ/kg):\n",
+ "p = mhp*(h1-h3a)+(mhp+mlp)*(h4-h5a)#Power output from mixed pressure turbine(in kW):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Power: \",round(p,2),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power: 1979.46 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/Chapter9.ipynb b/Applied_Thermodynamics/Chapter9.ipynb
new file mode 100755
index 00000000..f6236e83
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter9.ipynb
@@ -0,0 +1,841 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f569d6ccce789a93a823a5990b85a631168b660aee672ad7f9fe51c0887b2c5a"
+ },
+ "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 1, page no. 365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import log\n",
+ "#Variable Declaration: \n",
+ "r = 6 #Compression ratio:\n",
+ "v = 0.15 #Swept volume(in m**3):\n",
+ "p1 = 98 #Pressure at the beginning of compression(in kPa):\n",
+ "T1 = 60+273.15 #Temperature at the beginning of compression(in K):\n",
+ "Q23 = 150 #Heat supplied(in kJ/kg):\n",
+ "Cp = 1 #Value of Cp(in kJ/kg):\n",
+ "Cv = 0.71 #Value of Cv(in kJ/kg):\n",
+ "\n",
+ "#Calculations:\n",
+ "n = round(Cp/Cv,1) #Adiabatic compression factor:\n",
+ "R = Cp-Cv #Gas constant(in kJ/kg.K):\n",
+ "v2 = v/(r-1) #Volume at point 2(in m**3):\n",
+ "v1 = r*v2 #Total cylinder volume(in m**3):\n",
+ "m = p1*v1/(R*T1) #Mass(in kg):\n",
+ "p2 = p1*(v1/v2)**n #Pressure at point 2(in kPa):\n",
+ "T2 = p2*v2*T1/(p1*v1) #Temperature at state 2(in K):\n",
+ "T3 = Q23/(m*Cv)+T2 #Temperature at state 3(in K):\n",
+ "v3 = v2\n",
+ "p3 = p2*v2*T3/(v3*T2) #Pressure at point 3(in kPa):\n",
+ "v4 = v1\n",
+ "p4 = p3*(v3/v4)**n #Pressure at point 4(in kPa):\n",
+ "T4 = p4*v4*T3/(p3*v3) #Temperature at point 4(in K):\n",
+ "dS = m*Cv*log(T4/T1) #Entropy change(in kJ/K):\n",
+ "Q41 = m*Cv*(T4-T1) #Heat rejected(in kJ):\n",
+ "W = Q23-Q41 #Net work done(in kJ):\n",
+ "e = W/Q23 #Efficiency:\n",
+ "mep = W/v #Mean effective pressure(in kPa):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Thermal efficiency: \",round(e*100,2),\"%\" \n",
+ "print \"Mean effective pressure: \",round(mep,2),\"kPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency: 51.16 %\n",
+ "Mean effective pressure: 511.64 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "pa = 138 #Pressure at A(in kPa):\n",
+ "pb = 1380 #Pressure at B(in kPa):\n",
+ "nt = 0.5 #Thermal efficiency:\n",
+ "nm = 0.8 #Mechanical efficiency:\n",
+ "c = 41800 #Calorific value of fuel(in kJ/kg):\n",
+ "n = 1.4 #Adiabatic compressive index:\n",
+ "\n",
+ "#Calculations:\n",
+ "r1 = (pb/pa)**(1/n) #Ratio of va to vb:\n",
+ "r = (7/8*r1-1/8)/(7/8-r1/8) #Compression ratio:\n",
+ "p = (r-1)/15+1 #Cut off ratio:\n",
+ "nd = 1-1/(r**(n-1)*n)*(p**n-1)/(p-1) #Air standard efficiency for Diesel cycle:\n",
+ "no = nd*nt*nm #Overall efficiency:\n",
+ "fc = 75*60*60/(no*c*10**2) #Fuel consumption,bhp/hr(in kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Compression ratio: \",round(r,2)\n",
+ "print \"Air standard efficiency: \",round(nd*100,2),\"%\"\n",
+ "print \"Fuel consumption,bhp/hr: \",round(fc,3),\"kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Compression ratio: 19.37\n",
+ "Air standard efficiency: 63.22 %\n",
+ "Fuel consumption,bhp/hr: 0.255 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Q = 1700 #Total heat added(in kJ/kg):\n",
+ "p3 = 5000 #Maximum pressure(in kPa):\n",
+ "T1 = 100+273.15 #Temperature at the beginning of compression(in K):\n",
+ "p1 = 103 #Pressureat beginning of compression(in kPa):\n",
+ "Cp = 1.005 #Value of Cp(in kJ/kg.K):\n",
+ "Cv = 0.71 #Value of Cv(in kJ/kg.K):\n",
+ "n = 1.4 #Adiabatic index of compression: #For Otto cycle:\n",
+ "R = Cp-Cv #Gas constant(in kJ/kg.K):\n",
+ "m = 1 #Considernig 1 kg of air, volume at 1(in m**3):\n",
+ "\n",
+ "#Calculations:\n",
+ "V1 = m*R*T1/p1\n",
+ "V2 = 0.18 #By solving, volume at 2(in m**3):\n",
+ "r = V1/V2 #Compression ratio:\n",
+ "no = 1-1/(r**(n-1)) #Otto cycle efficiency:\n",
+ "V21 = 0.122 #By calculating, volume at state 2': #For mixed cycle:\n",
+ "p21 = 2124.75 #kPa \n",
+ "T31 = 2082 #K\n",
+ "T21 = 884.8 #K\n",
+ "T41 = 2929.5 #K\n",
+ "V31 = V21\n",
+ "V41 = V31*T41/T31 #Volume at state 4(in m**3):\n",
+ "T5 = T41*(V41/V1)**(n-1) #Temperature at state 5(in K):\n",
+ "Q51 = Cv*(T5-T1) #Heat rejected in the process 5-1(in kJ):\n",
+ "nm = (Q-Q51)/Q #Efficiency of mixed cycle:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Efficiency of Otto cycle: \",round(no*100,2),\"%\"\n",
+ "print \"Efficiency of mixed cycle: \",round(nm*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency of Otto cycle: 50.96 %\n",
+ "Efficiency of mixed cycle: 56.71 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T3 = 1200 #Maximum temperature(in K):\n",
+ "T1 = 300 #Minimum temperature(in K):\n",
+ "n = 1.4 #Adiabatic compression ratio:\n",
+ "Cp = 1.005 #Value of Cp(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "rp = (T3/T1)**(n/(2*(n-1))) #Optimum pressure ratio for maximum work output:\n",
+ "T2 = T1*rp**((n-1)/n) #Temperature at state 2(in K):\n",
+ "T4 = T3*rp**((1-n)/n) #Temperature at state 4(in K):\n",
+ "Q23 = Cp*(T3-T2) #Heat supplied(in kJ/kg):\n",
+ "Wc = Cp*(T2-T1) #Compressor work(in kJ/kg):\n",
+ "Wt = Cp*(T3-T4) #Turbine work(in kJ/kg):\n",
+ "nth = (Wt-Wc)/Q23*100 #Thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Compressor work: \",round(Wc,2),\"kJ/kg\" \n",
+ "print \"Turbine work: \",round(Wt,2),\"kJ/kg\"\n",
+ "print \"Thermal efficiency: \",round(nth,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Compressor work: 301.5 kJ/kg\n",
+ "Turbine work: 603.0 kJ/kg\n",
+ "Thermal efficiency: 50.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressure at state 1(in bar):\n",
+ "p2 = 6.2 #Pressure at state 2(in bar):\n",
+ "p3 = 6.2 #Pressure at state 3(in bar):\n",
+ "p4 = 1 #Pressure at state 4(in bar):\n",
+ "T1 = 300 #Temperature at state 1(in K):\n",
+ "r = 0.017 #Fuel by air ratio:\n",
+ "nc = 0.88 #Compressor effeciency:\n",
+ "nt = 0.90 #Turbine internal efficiency:\n",
+ "H = 44186 #Heating value of fuel(in kJ/kg):\n",
+ "n = 1.4 #Adiabatic index of compression:\n",
+ "n1 = 1.33\n",
+ "Cpc = 1.147 #Value of Cp for combination(in kJ/kg.K):\n",
+ "Cpa = 1.005 #Value of Cp for air(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n",
+ "T21 = (T2-T1)/nc+T1 #Actual temperature after compression(in K):\n",
+ "T3 = (r*H+Cpa*T21)/((1+r)*Cpc) #Temperature at state 3(in K):\n",
+ "T4 = T3*(p4/p3)**((n1-1)/n1) #Temperature at state 4(in K):\n",
+ "T41 = T3-nt*(T3-T4) #Actual temperature at turbine inlet considering internal efficiency of turbine(in K):\n",
+ "Wc = Cpa*(T21-T1) #Compressor work, per kg of air compressed(in kJ/kg):\n",
+ "Wt = Cpc*(T3-T41) #Turbine work, per kg of air compressed(in K):\n",
+ "Wnet = Wt-Wc #Net work(in kJ/kg):\n",
+ "Q = r*H #Heat supplied(in kJ/kg):\n",
+ "nth = Wnet/Q*100 #Thermal effeciency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Compressor work: \",round(Wc,2),\"kJ/kg\" \n",
+ "print \"Turbine work: \",round(Wt,2),\"kJ/kg\"\n",
+ "print \"Thermal efficiency: \",round(nth,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Compressor work: 234.42 kJ/kg\n",
+ "Turbine work: 414.71 kJ/kg\n",
+ "Thermal efficiency: 24.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T5 = 1200 #Maximum temperature(in K):\n",
+ "T1 = 300 #Minimum temperature(in K):\n",
+ "T3 = 300\n",
+ "ni = 0.85 #Isentropic efficiency:\n",
+ "nt = 0.9 #Turbine efficiency:\n",
+ "n = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "rpopt = (T1/(T5*ni*nt))**(2*n/(3*(1-n)))#Overall optimum pressure ratio:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Overall optimum pressure ratio: \",round(rpopt,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall optimum pressure ratio: 13.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "rp = 1.35 #Ratio of pressure:\n",
+ "m = 50 #Flow rate through compressor(in kg/s):\n",
+ "no = 0.90 #Overall efficiency:\n",
+ "p1 = 1 #Initial pressure(in bar):\n",
+ "T1 = 313 #Initial temperature(in K):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculation:\n",
+ "p9 = p1*rp**8 #Exit pressure(in bar):\n",
+ "T9 = T1*(p9/p1)**((r-1)/r) #Temperature at exit(in K):\n",
+ "T9a = (T9-T1)/0.82+T1 #Considerinf efficiency, actual temperature at exit(in K):\n",
+ "n = log(p9/p1)/(log(p9/p1)-log(T9a/T1)) #Actual index of compression:\n",
+ "np = ((r-1)/r)*(n/(n-1)) #Polytropic efficiency:\n",
+ "T2 = T1*rp**((r-1)/r) #Temperature at state 2(in K):\n",
+ "T2a = T1*(rp)**((n-1)/n) #Actual temperature at state 2(in K):\n",
+ "ns1 = (T2-T1)/(T2a-T1) #Stage efficiency:\n",
+ "Wc = (n/(n-1))*m*R*T1*((p9/p1)**((n-1)/n)-1) #Work done by compressor(in kJ/s):\n",
+ "Wca = Wc/no #Actual compressor work(in kJ/s):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Pressure at exit of comppressor: \",round(p9,2),\"bar\"\n",
+ "print \"Temperature at the exit of compressor: \",round(T9a,2),\"K\"\n",
+ "print \"Polytropic efficiency: \",round(np*100,2),\"%\"\n",
+ "print \"Stage efficiency: \",round(ns1*100,1),\"%\"\n",
+ "print \"Power required to drive compressor: \",round(Wca,2),\"kJ/s\","
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at exit of comppressor: 11.03 bar\n",
+ "Temperature at the exit of compressor: 689.24 K\n",
+ "Polytropic efficiency: 86.9 %\n",
+ "Stage efficiency: 86.3 %\n",
+ "Power required to drive compressor: 18245.07 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ " \n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 27+273 #Temperature at which air is supplied(in K):\n",
+ "p2 = 8 #Initial pressure(in bar):\n",
+ "T3 = 1100 #Temperature of air leaving the combustion chamber(in K):\n",
+ "p4 = 1 #Pressure at state 4(in bar):\n",
+ "E = 0.8 #Effectiveness of heat exchanger:\n",
+ "npc = 0.85 #Polytropic efficiency of the compressor:\n",
+ "npt = 0.90 #Polytropic efficinency of the turbnie:\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "Cp = 1.0032 #Value of Cp(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "p3 = p2\n",
+ "p1 = p4\n",
+ "nc = r*npc/(r*npc-(r-1)) #Compression index:\n",
+ "nt = r/(r-npt*(r-1)) #Expansion index:\n",
+ "T2 = T1*(p2/p1)**((nc-1)/nc) #Temperature at state 2:\n",
+ "T4 = T3*(p4/p3)**((nt-1)/nt) #Temperature at state 4(in K):\n",
+ "T5 = (T4-T2)*E+T2 #Using heat exchanger effectiveness, temperature at state 5(in K):\n",
+ "qa = Cp*(T3-T5) #Heat added in combustion chambers(in kJ/kg):\n",
+ "Wc = Cp*(T2-T1) #Compressor work(in kJ/kg):\n",
+ "Wt = Cp*(T3-T4) #Turbine work(in kJ/kg):\n",
+ "ncycle = (Wt-Wc)/qa #Cycle efficiency:\n",
+ "Wr = (Wt-Wc)/Wt #Work ratio:\n",
+ "swo = Wt-Wc #Specific work output(in kJ/kg):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Cycle efficiency: \",round(ncycle*100,2),\"%\" \n",
+ "print \"Work ratio: \",round(Wr,3)\n",
+ "print \"Specific work output: \",round(swo,2),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cycle efficiency: 32.79 %\n",
+ "Work ratio: 0.334\n",
+ "Specific work output: 152.56 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Initial pressure(in bar):\n",
+ "T1 = 27+273 #Initial temperature(in K):\n",
+ "p2 = 5 #Pressure at state 2(in bar):\n",
+ "nc = 0.85 #Isentropic efficiency:\n",
+ "T3 = 1000 #Temperature at state 3(in K):\n",
+ "p3 = p2-0.2 #Pressure at state 3(in bar):\n",
+ "p4 = p1 #Pressure at state 4(in bar):\n",
+ "nth = 0.20 #Thermal efficiency of plant:\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "Cp = 1.0032 #Value of Cp(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T21 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2'(in K):\n",
+ "T2 = (T21-T1)/nc+T1 #Temperature at state 2(in K):\n",
+ "T41 = T3*(p4/p3)**((r-1)/r) #Temperature at state 4'(in K):\n",
+ "Wc = Cp*(T2-T1) #Compressor work per kg(in kJ/kg): \n",
+ "qa = Cp*(T3-T2) #Heat added(in kJ/kg):\n",
+ "T4 = T3-(qa*(-nth)+Wc)/Cp #Temperature at state 4(in K):\n",
+ "nt = (T3-T4)/(T3-T41) #Isentropic efficiency of turbine:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Turbine isentropic efficiency: \",round(nt*100,3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Turbine isentropic efficiency: 29.696 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressure at which air is supplied(in bar):\n",
+ "T1 = 27+273 #Temperature at which air is supplied(in K):\n",
+ "T5 = 1000 #Maximum temperature in the cycle(in K):\n",
+ "p6 = 3 #Pressure at state 6(in bar):\n",
+ "p3 = 3\n",
+ "T7 = 995 #Temperature at state 7(in K):\n",
+ "c = 42000 #Calorific value of fuel(in kJ/kg):\n",
+ "Cp = 1.0032 #Value of Cp(in kJ/kg):\n",
+ "m = 30 #Air flow in compressor(in kg/s):\n",
+ "nc = 0.85 #Isentropic efficiency of compression:\n",
+ "ne = 0.90 #Isebtropic efficiency of expansion:\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "p8 = p1\n",
+ "p7 = p6\n",
+ "p4 = 10\n",
+ "p5 = p4\n",
+ "rp = round(sqrt(10),2) #Pressure ratio for perfect intercooling:\n",
+ "T21 = round(T1*rp**((r-1)/r),2) #Temperature at state 2'(in K):\n",
+ "T3 = T1 #For perfect intercooling:\n",
+ "T2 = round((T21-T1)/nc+T1,2) #Temperature at state 2(in K):\n",
+ "T41 = round(T3*(rp)**((r-1)/r),2) #Temperature at state 4'(in K):\n",
+ "T4 = round((T41-T3)/nc+T3,2) #Temperature at state 4(in K):\n",
+ "Wc = round(2*Cp*(T2-T1),2) #Total compressor work(in kJ/kg):\n",
+ "T61 = round(T5*(p6/p5)**((r-1)/r),2) #Temperature at state 6'(in K):\n",
+ "T6 = round(T5-(T5-T61)*ne,2) #Temperature at state 6(in K):\n",
+ "T81 = round(T7*(p8/p7)**((r-1)/r),2) #Temperature at state 8'(in K):\n",
+ "T8 = round(T7-(T7-T81)*ne,2) #Temperature at state 8(in K):\n",
+ "Wt = Cp*(T5-T6+T7-T8) #Expansion work output per kg air(in kJ/kg):\n",
+ "qa = Cp*(T5-T4+T7-T6) #Heat added per kg air(in kJ/kg):\n",
+ "mf = qa/ #Fuel required per kg of air:\n",
+ "afr = 1/mf #Air-fuel ratio:\n",
+ "Wnet = (Wt-Wc)*m #Net output(in kW):\n",
+ "nth = (Wt-Wc)/qa #Thermal efficiency:\n",
+ "print T21\n",
+ "#Results:\n",
+ "print \"Thermal efficiency: \",round(nth*100,2),\"%\" \n",
+ "print \"Net output: \",round(Wnet,2),\"kW\"\n",
+ "print \"A/F ratio: \",round(afr,2)\n",
+ "print \"___There is a calculation mistake in calculating Wt, in the book hence answer varies____\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "416.76\n",
+ "Thermal efficiency: 27.88 %\n",
+ "Net output: 6876.61 kW\n",
+ "A/F ratio: 51.08\n",
+ "___There is a calculation mistake in calculating Wt, in the book hence answer varies____\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressure of air at each state(in bar):\n",
+ "p2 = 4\n",
+ "p3 = 4\n",
+ "p4 = 8\n",
+ "p6 = p4\n",
+ "p7 = 4\n",
+ "p8 = 4\n",
+ "p9 = 1\n",
+ "T1 = 300 #Temperature at each state(in K):\n",
+ "T3 = 290\n",
+ "T6 = 1300\n",
+ "T8 = 1300\n",
+ "E = 0.80 #Effectiveness:\n",
+ "c = 42000 #Heating value of fuel(in kJ/kg):\n",
+ "r = 1.4 #Adiabatic index of combustion:\n",
+ "Cp = 1.0032 #Value of Cp(in kJ/kg):\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n",
+ "T4 = T3*(p4/p3)**((r-1)/r) #Temperature at state 4(in K):\n",
+ "T7 = T6*(p7/p6)**((r-1)/r) #Temperature at state 7(in K):\n",
+ "T9 = T8*(p9/p8)**((r-1)/r) #Temperature at state 9(in K):\n",
+ "T5 = (T9-T4)*E+T4 #Temperature at state 5(in K):\n",
+ "Wc = Cp*(T2-T1+T4-T3) #Compressor work per kg of air(in kJ/kg):\n",
+ "Wt = Cp*(T6-T7+T8-T9) #Turbine work per kg of air(in kJ/kg):\n",
+ "qa = Cp*(T6-T5+T8-T7) #Heat added per kg air(in kJ/kg):\n",
+ "mf = qa/c #Total fuel per kg of air:\n",
+ "Wnet = Wt-Wc #Net work(in kJ/kg):\n",
+ "n = Wnet/qa*100 #Cycle thermal efficiency:\n",
+ "afr1 = Cp*(T6-T5)/c #Fuel per kg air in combustion chamber 1:\n",
+ "afr2 = Cp*(T8-T7)/c #Fuel per kg air in combustion chamber 2:\n",
+ "\n",
+ "#Results:\n",
+ "print \"A/F ratio in the two combustion chambers: \",round(afr1,4),round(afr2,4)\n",
+ "print \"Total turbine work\",round(Wt,2),\"kJ/kg\"\n",
+ "print \"Cycle thermal efficiency\",round(n,2),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A/F ratio in the two combustion chambers: 0.0126 0.0056\n",
+ "Total turbine work 660.84 kJ/kg\n",
+ "Cycle thermal efficiency 58.9 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T2 = 700 #Maximum temperature(in K):\n",
+ "T1 = 300 #Minimum temperature(in K):\n",
+ "r = 3 #Compression ratio:\n",
+ "qa = 30 #Total heat added(in kJ/s):\n",
+ "E = 0.90 #Regenerator efficiency:\n",
+ "p = 1 #Pressure at the beginning of compression(in bar):\n",
+ "n = 100 #Number of cycles:\n",
+ "Cv = 0.72 #Value of Cv:\n",
+ "R = 29.27 #Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "W = R*(T2-T1)*log(r) #Work done per kg of air(in kJ/kg):\n",
+ "q = R*T2*log(r)+(1-E)*Cv*(T2-T1) #Heat added per kg of air(in kJ/kg):\n",
+ "m = qa/q #Mass of air for 30 kJ/s of heat supplied(in kg/s):\n",
+ "mc = m/n #Mass of air per cycle(in kg/cycle):\n",
+ "BP = W*m #Brake output(in kW):\n",
+ "V = mc*R*T1/(p*10**2) #Stroke volume(in m**3):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Brake output: \",round(BP,2),\"kW\" \n",
+ "print \"Stroke volume: \",round(V,5),\"m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake output: 17.12 kW\n",
+ "Stroke volume: 0.00117 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 17+273 #Ambient temperature(in K):\n",
+ "T3 = 1400 #Temperature at state 3(in K):\n",
+ "T5 = 420 #Temperature at state 5(in K):\n",
+ "p1 = 1 #Ambient pressure(in bar):\n",
+ "p2 = 10 #As pressure ratio is 10, pressure at state 2(in bar):\n",
+ "p3 = 10\n",
+ "p4 = 1\n",
+ "ph = 6000 #Pressure in HSRG(in kPa):\n",
+ "pc = 15 #Condensor pressure(in kPa):\n",
+ "O = 37.3 #Combined cycle output(in MW):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "Cp = 1.0032 #Value of Cp(in kJ/kg.K):\n",
+ "#From steam tables:\n",
+ "ha = 3177.2 #kJ/kg \n",
+ "sa = 6.5408 #kJ/kg.K \n",
+ "sb = sa\n",
+ "x = 0.7976\n",
+ "hb = 2118.72 #kJ/kg\n",
+ "hc = 225.94 #kJ/kg\n",
+ "vc = 0.001014 #m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n",
+ "T4 = T3*(p4/p3)**((r-1)/r) #Temperature at state 4(in K):\n",
+ "Wc = Cp*(T2-T1) #Compressor work per kg(in kJ/kg):\n",
+ "Wt = Cp*(T3-T4) #Turbine work per kg(in kJ/kg):\n",
+ "qa = Cp*(T3-T2) #Heat added in combustion chamber(in kJ/kg):\n",
+ "WnetGT = Wt-Wc #Net gas turbine output(in kJ/kg air):\n",
+ "qHSRG = Cp*(T4-T5) #Heat recovered in HSRG for steam generation(in kJ/kg):\n",
+ "hd = vc*(ph-pc)*10**2 #Enthalpy at exit of feed pump(in kJ/kg):\n",
+ "had = ha-hd #Heat added per kg of steam(in kJ/kg):\n",
+ "m = qHSRG/had #Mass of steam generated per kg of air:\n",
+ "WnetST = ha-hb-(hd-hc) #Net steam turbine cycle output(in kJ/kg):\n",
+ "sco = WnetST*m #Steam cycle output per kg(in kJ/kg air):\n",
+ "tco = WnetGT+sco #Total combined output(in kJ/kg air):\n",
+ "ncc = tco/qa #Combined cycle efficiency:\n",
+ "ngt = WnetGT/qa #Gas turbine efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Overall efficiency\",round(ncc*100,2),\"%\" \n",
+ "print \"Steam per kg of air\",round(m,3),\"kg steam/kg air\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall efficiency 57.78 %\n",
+ "Steam per kg of air 0.119 kg steam/kg air\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 394"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 27+273 #Temperature of working fuel at the beginning of compression(in K):\n",
+ "rp = 70 #Pressure ratio:\n",
+ "rv = 15 #Compression ratio:\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = T1*(rv)**(r-1) #Temperature at state 2(in K):\n",
+ "T3 = T2*rp/(rv**r) #Temperature at state 3(in K):\n",
+ "T4 = T3+(T3-T2)/r #Temperature at state 4(in K):\n",
+ "T5 = T4*(T3/T4*rv)**(1-r) #Temperature at state 5(in K):\n",
+ "n = 1-(T5-T1)/(r*(T4-T3)+(T3-T2))#Air standard thermal efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Air standard thermal efficiency\",round(n*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air standard thermal efficiency 65.3 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Applied_Thermodynamics/README.txt b/Applied_Thermodynamics/README.txt
new file mode 100755
index 00000000..75808384
--- /dev/null
+++ b/Applied_Thermodynamics/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Irshad Raushan
+Course: btech
+College/Institute/Organization: IITB
+Department/Designation: Aerospace Engg.
+Book Title: Applied Thermodynamics
+Author: Onkar Singh
+Publisher: New Zone International Publishers
+Year of publication: 2009
+Isbn: 978-81-224-2916-9
+Edition: 3rd \ No newline at end of file
diff --git a/Applied_Thermodynamics/screenshots/lossEnergy.png b/Applied_Thermodynamics/screenshots/lossEnergy.png
new file mode 100755
index 00000000..db9bd494
--- /dev/null
+++ b/Applied_Thermodynamics/screenshots/lossEnergy.png
Binary files differ
diff --git a/Applied_Thermodynamics/screenshots/thermaleff.png b/Applied_Thermodynamics/screenshots/thermaleff.png
new file mode 100755
index 00000000..ebea0a76
--- /dev/null
+++ b/Applied_Thermodynamics/screenshots/thermaleff.png
Binary files differ
diff --git a/Applied_Thermodynamics/screenshots/work.png b/Applied_Thermodynamics/screenshots/work.png
new file mode 100755
index 00000000..49193762
--- /dev/null
+++ b/Applied_Thermodynamics/screenshots/work.png
Binary files differ
diff --git a/Chemistry/Chapter_1.ipynb b/Chemistry/Chapter_1.ipynb
new file mode 100755
index 00000000..a288466b
--- /dev/null
+++ b/Chemistry/Chapter_1.ipynb
@@ -0,0 +1,310 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chpater 1:Chemistry-The Study of Change"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.1,Page no:19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m=301;#mass of gold, g\n",
+ "v=15.6;# volume of gold, cm**3\n",
+ "\n",
+ "#Calculation\n",
+ "d=m/v;#density of gold, g/cm**3\n",
+ "\n",
+ "#Result\n",
+ "print\"The density of gold is : \",round(d,1),\" g/cm**3\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of gold is : 19.3 g/cm**3\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.2,Page no:19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "d=13.6;#density of mercury, g/ml\n",
+ "v=5.50;# volume of mercury, ml\n",
+ "\n",
+ "#Calculation\n",
+ "m=d*v;#mass of mercury, g\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of mercury is : \",round(m,1),\" g\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of mercury is : 74.8 g\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.3,Page no:20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "C1=224.0#melting point of solder, C\n",
+ "F=-452.0#boiling point of helium, F\n",
+ "C3=-38.9#meltiing point of mercury, C\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "F1=(C1*(9.0/5.0)+32.0) #melting point of solder, F\n",
+ "#(b)\n",
+ "C2=(F-32.0)*5.0/9.0 #boiling point of helium, C\n",
+ "#(c)\n",
+ "K=C3+273.15#meltiing point of mercury, K\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The melting point of solder is : \",round(F1),\" F\"\n",
+ "print\"(b) The boiling point of helium is :\",round(C2),\"C\"\n",
+ "print\"(c) The meltiing point of mercury is :\",round(K,1),\"K\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The melting point of solder is : 435.0 F\n",
+ "\n",
+ "(b) The boiling point of helium is : -269.0 C\n",
+ "\n",
+ "(c) The meltiing point of mercury is : 234.2 K\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.5,Page no:25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "A1=11254.1;#g\n",
+ "B1=0.1983;#g\n",
+ "A2=66.59;#L\n",
+ "B2=3.113;#L\n",
+ "A3=8.16;#m\n",
+ "B3=5.1355;\n",
+ "A4=0.0154;#kg\n",
+ "B4=88.3;#mL\n",
+ "A5=2.64*10**3;#cm\n",
+ "B5=3.27*10**2;#cm\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "C1=A1+B1;#g\n",
+ "#(b)\n",
+ "C2=A2-B2;#L\n",
+ "#(c)\n",
+ "C3=A3*B3;#m\n",
+ "#(d)\n",
+ "C4=A4/B4;#kg/mL\n",
+ "#(e)\n",
+ "C5=A5+B5;#cm\n",
+ "print\"(a) (\",round(A1,1),\"+\",round(B1,4),\")g=\",round(C1,1),\"g\\n\"\n",
+ "print\"(b) (\",A2,\" -\",B2,\")L=\",round(C2,2),\"L\\n\"\n",
+ "print\"(c) \",A3,\"m*\",B3,\"=\",C3,\"m =\",round(C3,1),\"m\\n\"\n",
+ "print\"(d) \",A4,\" kg /\",B4,\" mL =\",C4,\"=\",round(C4,6),\"kg/mL=%.2e\"%round(C4,6),\"kg/mL\\n\"\n",
+ "print\"(e) (\",(A5*10**-3),\"*10**3 + %.2f\"%(B5*10**-2),\"*10**2 )cm =\",(C5*10**-3),\"*10**3 cm\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) ( 11254.1 + 0.1983 )g= 11254.3 g\n",
+ "\n",
+ "(b) ( 66.59 - 3.113 )L= 63.48 L\n",
+ "\n",
+ "(c) 8.16 m* 5.1355 = 41.90568 m = 41.9 m\n",
+ "\n",
+ "(d) 0.0154 kg / 88.3 mL = 0.000174405436014 = 0.000174 kg/mL=1.74e-04 kg/mL\n",
+ "\n",
+ "(e) ( 2.64 *10**3 + 3.27 *10**2 )cm = 2.967 *10**3 cm\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.6,Page no:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "lb=0.0833;#pound mass, lb\n",
+ "\n",
+ "#Calculation\n",
+ "g=lb*453.6;#pound mass to gram mass, 1lb=453.6g\n",
+ "mg=1000*g;#gram to milligram\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of glucose is :%.2e\"%mg,\"mg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of glucose is :3.78e+04 mg\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.7,Page no:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "L=5.2;#volume in litres\n",
+ "\n",
+ "#Calculation\n",
+ "cc=1000*L;#litre to cm**3\n",
+ "mc=cc/10**6;#cm**3 to m**3\n",
+ "\n",
+ "#Result\n",
+ "print\"The volume of blood is %.1e\"%mc,\"m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of blood is 5.2e-03 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1.8,Page no:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "gpcc=0.808;#density in gram per cm**3\n",
+ "\n",
+ "#Calculation\n",
+ "kgpmc=1000*gpcc;#g/cm**3 to kg/m**3, as 1000g=1kg and 1cm=10**-2 m\n",
+ "\n",
+ "#Result\n",
+ "print\"The density of liquid nitrogen is :\",kgpmc,\"kg/m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of liquid nitrogen is : 808.0 kg/m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_11.ipynb b/Chemistry/Chapter_11.ipynb
new file mode 100755
index 00000000..6d364ba0
--- /dev/null
+++ b/Chemistry/Chapter_11.ipynb
@@ -0,0 +1,226 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11:Intermolecular Forces and Liquids and Solids"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.3,Page no:479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "atoms=8*1.0/8.0+6*1.0/2.0 #atoms in a cell\n",
+ "d=19.3 #density, g/cc\n",
+ "Au=197.0 #mol mass of Au, g\n",
+ "NA=6.022*10**23 #avogadro no.\n",
+ "\n",
+ "#Calculation\n",
+ "m=atoms*Au/NA #mass of 1 cell, g\n",
+ "V=m/d #volume, cc\n",
+ "a=V**(1/3.0) #edge length, cm\n",
+ "r=a/math.sqrt(8.0)/100.0 #radius in m\n",
+ "\n",
+ "#Result\n",
+ "print\"The atomic radius of Au is :\",round(r*10**12),\"pm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The atomic radius of Au is : 144.0 pm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.4,Page no:481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "n=1.0 \n",
+ "lamda=154 #wavelength, pm\n",
+ "theta=19.3 #angle of reflection, degree\n",
+ "\n",
+ "#Calculation\n",
+ "d=n*lamda/(2*math.sin(theta*math.pi/180.0)) #spacing between the planes\n",
+ "\n",
+ "#Result\n",
+ "print\"The spacing between planes is :\",round(d),\"pm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The spacing between planes is : 233.0 pm\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.6,Page no:483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Na=22.99 #mass of one atom of Na, amu\n",
+ "Cl=35.45 #mass of one atom of Cl, amu\n",
+ "NA=6.022*10**23 #avogadro no.\n",
+ "\n",
+ "#Calculation\n",
+ "mass=4*(Na+Cl)/NA #mass in a unit cell in grams\n",
+ "a=564*10**-10 #edge length, cm\n",
+ "V=a**3 #volume of unit cell, cc\n",
+ "d=mass/V #density in g/cc\n",
+ "\n",
+ "#Result\n",
+ "print\"The density of NaCl is :\",round(d,2),\"g/cm**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of NaCl is : 2.16 g/cm**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.7,Page no:492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "P1=401.0 #vapor pressure at 18C, mm Hg\n",
+ "T1=18.0+273.0 #temperature, K\n",
+ "T2=32.0+273.0 #temperature, K\n",
+ "deltaH=26000.0 #heat of vaporisation, J/mol\n",
+ "R=8.314 #gas constant, J/K.mol\n",
+ "\n",
+ "#Calculation\n",
+ "X=deltaH/R*(T1-T2)/(T1*T2) \n",
+ "P2=401*math.exp(-X) #vapor pressure at 32C, mmHg(from ln(P1/P1)=deltaH/R*((T1-T2)/(T1*T2)))\n",
+ "\n",
+ "#Result\n",
+ "print\"The pressure at 32 C is \",round(P2,1),\"mm Hg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure at 32 C is 656.7 mm Hg\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11.8,Page no:497"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m=346 #mass of H2O in g\n",
+ "s=4.184 #specific heat of H2O, J/g C\n",
+ "deltaH=40.79 #heat of vaporisation in kJ\n",
+ "H2O=18.02 #mol mass of H2O, g\n",
+ "s2=1.99 #specific heat of steam, J/g C\n",
+ "\n",
+ "#Calculation\n",
+ "#from 0 to 100 C\n",
+ "deltaT=100.0-0.0 #change in Temp, C\n",
+ "q1=round((m*s*deltaT)/1000.0) #heating H2O, kJ\n",
+ "#for evaporation at 100 C\n",
+ "deltaT2=182-100 #change in temp of steam, kJ\n",
+ "q2=round(m*deltaH/H2O) #heat of vaporising water, kJ\n",
+ "#for steam from 100 to 182 C\n",
+ "q3=round(m*s2*deltaT2/1000.0,1) #heating steam, kJ\n",
+ "q=round(q1)+round(q2)+round(q3,1) #overall energy required, kJ\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"The overall energy required is :\",round(q),\"kJ\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The overall energy required is : 985.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_12.ipynb b/Chemistry/Chapter_12.ipynb
new file mode 100755
index 00000000..c565711d
--- /dev/null
+++ b/Chemistry/Chapter_12.ipynb
@@ -0,0 +1,446 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12:Physical Properties of Solutions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.2,Page no:518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "msolute=0.892 #mass of solute, g\n",
+ "msolvent=54.6 #mass of solvent, g\n",
+ "\n",
+ "#Calculation\n",
+ "percent=msolute/(msolute+msolvent)*100 #concentration, percent by mass\n",
+ "\n",
+ "#Result\n",
+ "print\"The concentration of KCl solution by mass is :\",round(percent,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The concentration of KCl solution by mass is : 1.61 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.3,Page no:518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "mass=24.4 #mass of H2SO4, g\n",
+ "M=98.09 #mol maass of H2SO4, g\n",
+ "\n",
+ "#Calculation\n",
+ "n=mass/M #moles of H2SO4\n",
+ "massH2O=0.198 #mass of H2O, kg\n",
+ "m=n/massH2O #molality of H2SO4, molal\n",
+ "\n",
+ "#Result\n",
+ "print\"The molality of sulfuric acid solution is :\",round(m,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molality of sulfuric acid solution is : 1.26 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.4,Page no:520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#considering 1L solution\n",
+ "msolution=976 #mass of solution, g\n",
+ "n=2.45 #moles\n",
+ "CH3OH=32.04 #mol. mass of CH3OH, g\n",
+ "\n",
+ "#Calculation\n",
+ "msolute=n*CH3OH #mass of solute, g\n",
+ "msolvent=(msolution-msolute)/1000 #mass of solvent, kg\n",
+ "m=n/msolvent #molality, molal\n",
+ "\n",
+ "#Result\n",
+ "print\"The molality of CH3OH solution is :\",round(m,2),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molality of CH3OH solution is : 2.73 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.5,Page no:520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#considering 100g of solution\n",
+ "percent=35.4 #mass percent of H3PO4\n",
+ "H3PO4=97.99 #mol mass of H3PO4\n",
+ "\n",
+ "#Calculation\n",
+ "n=percent/H3PO4 #moles of H3PO4\n",
+ "mH2O=(100-percent)/1000 #mass of solvent\n",
+ "m=n/mH2O #molality of H3PO4, molal\n",
+ "\n",
+ "#Result\n",
+ "print\"the molality of H3PO4 solution is :\",round(m,2),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the molality of H3PO4 solution is : 5.59 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.6,Page no:525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "c=6.8*10**-4 #solubility of N2 in water, M\n",
+ "P=1 #pressure, atm\n",
+ "\n",
+ "#Calculation\n",
+ "k=c/P #henry's constant\n",
+ "#for partial pressure of N2=0.78atm\n",
+ "P=0.78 #partial pressure of N2, atm\n",
+ "c=k*P #solubility of N2, M\n",
+ "\n",
+ "#Result\n",
+ "print\"The solubility of N2 gas in water is :%.1e\"%c,\"M\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The solubility of N2 gas in water is :5.3e-04 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.7,Page no:527"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "H2O=18.02 #mol mass of H2O, g\n",
+ "V=460 #volume of water, mL\n",
+ "glucose=180.2 #mol. mass of glucose, g\n",
+ "mass=218 #mass of gllucose, g\n",
+ "\n",
+ "#Calculation\n",
+ "n1=V/H2O #moles of water\n",
+ "n2=mass/glucose #moles of glucose\n",
+ "x1=n1/(n1+n2) #mole fraction of water\n",
+ "P=31.82 #vapor pressure of pure water, mmHg\n",
+ "P1=x1*P #vapor pressure afteraddition of glucose, mmHg\n",
+ "#Result\n",
+ "print\"Vapor pressure is:\",round(P1,1),\"mm Hg\"\n",
+ "print\"The vapor pressure lowering is :\",round(P-P1,1),\"mmHg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vapor pressure is: 30.4 mm Hg\n",
+ "The vapor pressure lowering is : 1.4 mmHg\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.8,Page no:532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mH2O=2.505 #mass of H2O, kg\n",
+ "mEG=651 #mass of EG, g\n",
+ "EG=62.07 #mol mass of EG, g\n",
+ "\n",
+ "#Calculation\n",
+ "n=mEG/EG #moles of EG\n",
+ "m=n/mH2O #molality of EG\n",
+ "Kf=1.86 #molal freezing point depression constant, C/m\n",
+ "deltaTf=Kf*m #depression in freezing point, C\n",
+ "Kb=0.52 #molal boiling point elevation constant, C/m\n",
+ "deltaTb=Kb*m #elevation in boiling point, C\n",
+ "\n",
+ "#Result\n",
+ "print\"The depression in freezing point is\",round(deltaTf,2),\"C\"\n",
+ "print\"Elevation in boiling point is :\",round(deltaTb,1),\"C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The depression in freezing point is 7.79 C\n",
+ "Elevation in boiling point is : 2.2 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.9,Page no:536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "pie=30 #osmotic pressure, atm\n",
+ "R=0.0821 #gas constant, L atm/K mol\n",
+ "T=298 #temp., K\n",
+ "\n",
+ "#Calculation\n",
+ "M=pie/(R*T) #molar concentration, M\n",
+ "\n",
+ "#Result\n",
+ "print\"The molar concentration is :\",round(M,2),\"M\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molar concentration is : 1.23 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.10,Page no:537"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "deltaTf=1.05 #depression in freezing point, C\n",
+ "Kf=5.12 #molal freezing point depression constant\n",
+ "\n",
+ "#Calculation\n",
+ "m=deltaTf/Kf #molality of solution, molal\n",
+ "mbenzene=301/1000.0 #mass of benzene, kg\n",
+ "n=m*mbenzene #moles of sapmle\n",
+ "msample=7.85 #mass of sample, g\n",
+ "molarmass=msample/n #molar mass of sample, g/mol\n",
+ "\n",
+ "#Result\n",
+ "print\"The molar mass of the sample is :\",round(molarmass),\"g/mol \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molar mass of the sample is : 127.0 g/mol \n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.11,Page no:538"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=0.0821 #gas constant, L atm/K mol\n",
+ "T=298 #temp, K\n",
+ "pie=10/760.0 #osmotic pressure, atm\n",
+ "\n",
+ "#Calculation\n",
+ "M=pie/(R*T) #molarity of the solution, M\n",
+ "#taking 1L of solution\n",
+ "mass=35 #mass of Hg, g\n",
+ "n=M #moles\n",
+ "molarmass=mass/n #molar mass of hemoglobin, g/mol\n",
+ "\n",
+ "#Result\n",
+ "print\"The molar mass of the hemoglobin is :%.2e\"%molarmass,\"g/mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molar mass of the hemoglobin is :6.51e+04 g/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12.12,Page no:540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=0.0821 #gas constant, L atm/K mol\n",
+ "T=298 #temp, K\n",
+ "pie=0.465 #osmotic pressure, atm\n",
+ "M=0.01 #molarity of the solution, M\n",
+ "\n",
+ "#Calculation\n",
+ "i=pie/(M*R*T) #vant hoff factor of KI\n",
+ "\n",
+ "#Result\n",
+ "print\"The vant hoff factor of KI at 25 C is :\",round(i,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The vant hoff factor of KI at 25 C is : 1.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_13.ipynb b/Chemistry/Chapter_13.ipynb
new file mode 100755
index 00000000..72db9250
--- /dev/null
+++ b/Chemistry/Chapter_13.ipynb
@@ -0,0 +1,441 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13:Chemical Kinetics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13.2,Page no:564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "dO2=-0.024 #rate of reaction of O2, M/s\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "dN2O5=-2*dO2 #rate of formation of N2O5, M/s\n",
+ "#(b)\n",
+ "dNO2=4*dO2 #rate of reaction of NO2, M/s\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The rate of formation of N2O5 is :\",dN2O5,\"M/s\"\n",
+ "print\"(b).The rate of reaction of NO2 is :\",dNO2,\"M/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The rate of formation of N2O5 is : 0.048 M/s\n",
+ "(b).The rate of reaction of NO2 is : -0.096 M/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13.3,Page no:568"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "NO1=5*10**-3 #conc of NO from 1st experiment, M\n",
+ "H21=2*10**-3 #conc of H2 from 1st experiment, M\n",
+ "r1=1.3*10**-5 #initial rate from 1st experiment, M/s\n",
+ "NO2=10*10**-3 #conc of NO from 2nd experiment, M\n",
+ "H22=2*10**-3 #conc of H2 from 2nd experiment, M\n",
+ "r2=5*10**-5 #initial rate from 1st experiment, M/s\n",
+ "NO3=10*10**-3 #conc of NO from 3rd experiment, M\n",
+ "H23=4*10**-3 #conc of H2 from 3rd experiment, M\n",
+ "r3=10*10**-5 #initial rate from 3rd experiment, M/s\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(a)\n",
+ "#r=k*NO**x*H2**y, dividing r2/r1 and r3/r2\n",
+ "x=math.log(r2/r1)/math.log(NO2/NO1) #since H21=H22\n",
+ "y=math.log(r3/r2)/math.log(H23/H22) #since NO3=NO2\n",
+ "x=round(x) \n",
+ "y=round(y) \n",
+ "#(b)\n",
+ "k=r2/((NO2)**x*H22**y) #rate constant, /M**2 s\n",
+ "#(c)\n",
+ "NO=12*10**-3 #conc of NO, M\n",
+ "H2=6*10**-3 #conc of H2, M\n",
+ "rate=k*(NO**x)*H2**y #rate, M/s\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) the rate of reaction is : r=k[NO]**\",x,\"*[H2]**\",y\n",
+ "print\"(b) the rate constant of the reaction is :%.1e\"%k,\" /M**2 s\" \n",
+ "print\"(c) the rate of reaction at given concentration is :%.1e\"%rate,\" M/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) the rate of reaction is : r=k[NO]** 2.0 *[H2]** 1.0\n",
+ "(b) the rate constant of the reaction is :2.5e+02 /M**2 s\n",
+ "(c) the rate of reaction at given concentration is :2.2e-04 M/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13.4,Page no:571"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "t=8.8*60 #time, s\n",
+ "k=6.7*10**-4 #rate constant, s-1\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(a)\n",
+ "Ao1=0.25 #initial conc, M\n",
+ "A1=math.exp(-k*t+math.log(Ao1)) #final conc, M\n",
+ "#(b)\n",
+ "A2=0.15 #initial conc, M\n",
+ "Ao2=0.25 #final conc, M\n",
+ "t2=-math.log(A2/Ao2)/(60*k) #time, min\n",
+ "#(c)\n",
+ "percent=74.0 \n",
+ "#let initial conc be 1\n",
+ "Ao3=1.0 #initial conc, M\n",
+ "A3=1.0-percent/100.0 #final conc, M\n",
+ "t3=-math.log(A3/Ao3)/(k*60.0) #time, min\n",
+ "print\"(a) the concentration of cyclopropane at given time is :\",round(A1,2),\"M\"\n",
+ "print\"(b) the time required is :\",round(t2),\"min\"\n",
+ "print\"(c) the time required for required conversion is :%.1f\"%t3,\"min(approx)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) the concentration of cyclopropane at given time is : 0.18 M\n",
+ "(b) the time required is : 13.0 min\n",
+ "(c) the time required for required conversion is :33.5 min(approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13.5,Page no:573"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "t=[0,100,150,200,250,300] #time(data given), s\n",
+ "P=[284.0,220.0,193.0,170.0,150.0,132.0] #pressure(data given) in mmHg corresponding to time values\n",
+ "lnP=[0,0,0,0,0,0]\n",
+ "\n",
+ "#Calculation\n",
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from pylab import *\n",
+ "%pylab inline\n",
+ "lnP=numpy.log(P) #lnP values corresponding to P\n",
+ "A=plot(t,lnP)\n",
+ "plt.xlim(0,350)\n",
+ "plt.ylim(4.8,5.8)\n",
+ "plt.ylabel('$ln Pt$')\n",
+ "plt.xlabel('$t(s)$')\n",
+ "plt.title('Plot of ln Pt versus time for the decomposition of azomethane\\n')\n",
+ "slope=np.polyfit(t,lnP,1)\n",
+ "k=-slope[0]\n",
+ "\n",
+ "#Result\n",
+ "show(A)\n",
+ "print\"The rate constant for the decomposition is :%.2e\"%k,\"s**-1\"\n"
+ ],
+ "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: ['power', 'draw_if_interactive', 'random', 'fft', 'linalg', 'info']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEuCAYAAACplOSzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8DPf/B/DX5iAJSeSWCFYSGiFXpeIKkUrqqFuriq/S\nxlEUVdTRJlpV1FFV335V1dGLtl8tRfCliauII6HEXUGQSBS55fr8/phfpolsImGzs5u8no9HHrKZ\n2Z3Xzh5v856Zz6iEEAJERERPyUjpAEREVDOwoBARkVawoBARkVawoBARkVawoBARkVawoBARkVYo\nXlCCg4OxZs0anSzriy++gJOTE6ysrHDv3r1S0xITE2FkZISioiKdZKlpLC0tkZiYWO3LycnJQe/e\nvdGgQQMMHjy4WpYRGRmJ4cOHV8tjr1u3DkFBQdXy2PqkdevW2L9/f7nTe/bsiW+++UaHiSRz5syB\ng4MDXFxcdL7s6qBv7yedFBS1Wg0LCwtYWlqiYcOGGDlyJLKysgAAKpUKKpXqsY/xtF/4+fn5mDp1\nKvbu3Yv09HTY2Ng80eNoEhMTAyMjI1haWsLKygqenp5Yt26dVnLrI03/CcjIyIBara72Zf/888+4\nc+cO/v77b2zatOmpHy8mJgaNGzcu9bfKvB+pYmfOnEHnzp0BaC7QO3bsqLaiXZ7r169j6dKlOH/+\nPG7duqXTZWuDIXyX6KSgqFQqbNu2DRkZGTh58iSOHz+OefPmPdFjPel5mMnJycjNzUXLli2f6P6P\n06hRI2RkZCA9PR0LFy5EeHg4zp8/L0/XxfmjBQUF1b4MQNkv3GvXrqFFixYwMqr6W7ey64fn+tZM\n169fh52dHezs7JSO8lT0+f2p85aXi4sLunfvjrNnz5aZJoTAvHnzoFar4eTkhBEjRiA9PR0A5P/t\nNGjQAJaWljh69GiZ+z98+BCTJ09Go0aN0KhRI0yZMgV5eXm4ePGiXEgaNGiAbt26PTZncHAw3n//\nfXTq1AlWVlZ44YUXcPfu3Uo9x759+8LGxgZnz55Fly5dKsx969YtWFhYlGrBxcXFwcHBAYWFhQCA\nr7/+Gl5eXrC1tUX37t1x/fp1eV4jIyP8+9//RvPmzfHMM88AAKZMmQInJydYW1vDx8cHCQkJ8nMq\nuWVRcnNZCFHmfppeo9mzZ+PAgQOYMGECLC0t8dZbb8k5/vrrLwDAa6+9hjfffBM9e/aEpaUlgoKC\nkJycjEmTJsHGxgYtW7ZEfHx8qXUwcOBAODo6ws3NDStWrNC4XiMiIvDhhx9i06ZNsLS0xNq1ayt8\nzxT/j+7rr79G06ZNy7zuWVlZ6NGjB27duiVvXd6+fRsqlQp5eXkYMWIErKys0Lp1a5w4caLKeQHg\n7t276NOnD6ytrREYGIgrV66Umn7+/HmEhobCzs4Onp6e+Omnn+RpOTk5mDp1KtRqNRo0aICgoCDk\n5uYCALZu3YpWrVrBxsYGXbt2LfWfF7VajcWLF8PHxweWlpZ4/fXXkZKSgh49esDa2hqhoaG4f/9+\nqXW0evVqNGrUCC4uLliyZIn8WOV9pgAgLS0NL774ImxsbGBnZyd/Rosz7N27Fzt37sTHH38sv2b+\n/v4ASr8XK/MabtiwAU2bNoWDgwPmz59f7vp+8OAB/vWvf8HR0RFqtRofffQRhBDYs2cPwsLC5Nd6\n1KhRZe57//59vPjii3B0dIStrS169+6NmzdvAgAOHz4MS0tL+cfMzAzNmjV77DqKiYmBq6srPvnk\nEzg6OsLFxQW//vorduzYgRYtWsDOzg4LFiyQMwghsGDBAnh4eMDe3h6DBw+WvxtKfgdaWVnhyJEj\n8n/upk2bBltbW7i5uWHnzp3y461duxZeXl6wsrKCu7s7vvzyS3lacbalS5fCyckJLi4ucmel+Hm9\n8847aNq0KRo2bIhx48bJ779yCR1Qq9Viz549Qgghrl+/Llq1aiXef/99IYQQwcHBYs2aNUIIIdas\nWSM8PDzE1atXRWZmphgwYIAYPny4EEKIxMREoVKpRGFhYbnLee+990T79u1FamqqSE1NFR06dBDv\nvfdepe5/9erVUtO7dOkiPDw8xKVLl0ROTo4IDg4W7777rsb7RkdHC1dXVyGEEIWFhWLz5s3C1NRU\nXLx4sVK5Q0JCxOrVq+Xb77zzjhg3bpwQQohff/1VeHh4iPPnz4vCwkIxb9480aFDB3lelUolwsLC\nxL1790Rubq7YuXOnaNOmjXjw4IEQQojz58+L27dvl1nXQgixdu1a0alTJyGEqPB+j3r0cYpzXLly\nRQghxIgRI4S9vb04efKkyM3NFSEhIaJp06bim2++EUVFRWLOnDmia9eu8vp69tlnxYcffijy8/PF\nX3/9Jdzc3MSuXbs0LjsyMlJ+TwhR8Xum+DUdMWKEyM7OFrm5uWUeLyYmRn7tikVERAgzMzMRFRUl\nioqKxMyZM0W7du2eKO/gwYPF4MGDRXZ2tjhz5oxo1KiRCAoKEkIIkZmZKVxdXcW6detEYWGhiIuL\nE/b29iIhIUEIIcSbb74punbtKm7duiUKCwvF4cOHxcOHD8WFCxdEvXr1xJ49e0RBQYFYtGiR8PDw\nEPn5+UII6fPWvn17cefOHXHz5k3h6Ogo/P39RXx8vPx6zJ07t9Q6evXVV0V2drb4888/hYODg/x5\nregz9e6774qxY8eKgoICUVBQIA4ePCg/b7VaLfbu3avxNROi8p/74nyjR48Wubm54tSpU6Ju3bri\n3LlzGtf38OHDRb9+/URmZqZITEwULVq0kJej6bUu6e7du2Lz5s0iJydHZGRkiJdeekn069evzHz5\n+fmiS5cuYtasWY9dR9HR0cLExER8+OGHoqCgQKxevVrY2dmJV199VWRmZoqzZ88Kc3NzkZiYKIQQ\n4tNPPxXt27cXN2/eFHl5eWLMmDFiyJAhQgjN32Fr164Vpqam4quvvhJFRUXiiy++EC4uLvL07du3\ni7/++ksIIcS+ffuEhYWFOHnyZKlsERERoqCgQOzYsUNYWFiI+/fvCyGEmDx5sujbt6+4d++eyMjI\nEL179xYzZ84sd/0JIYROCkrTpk1F/fr1RYMGDUTTpk3F+PHj5Q93yTdWSEiI+OKLL+T7XbhwQZia\nmorCwsIyX/iauLu7i6ioKPn2rl27hFqtFkKULRiPenR6cHCw+Oijj+Tp//73v0X37t013jc6OloY\nGRmJBg0aCFtbW+Hv7y82bdpUqeUKIcRXX30lQkJChBBCFBUVicaNG4sDBw4IIYTo3r17qS/vwsJC\nYWFhIa5fvy6EkL7Io6Oj5em///67aNGihThy5EiZZVZUUPbu3Vvu/R4VHBwsvvrqq1J/K1lQXnvt\nNTF69Gh52ooVK4SXl5d8+/Tp06JBgwZCCCGOHDkimjRpUuqx5s+fL0aOHKlx2REREWLYsGHy7cq8\nZ65evVrucyn5n4GSywgNDZVvF3/oq5q3oKBAmJqaigsXLsh/mzVrlrzON27cKBeXYqNHjxZz584V\nhYWFwtzcXJw+fbrM437wwQdi8ODB8u2ioiLRqFEjsW/fPiGE9GX+/fffy9MHDhwo3nzzTfn2ihUr\n5C/K4nVUMuP06dPF66+/LoQQws3NrdzP1Pvvvy/69u0rLl++XCZjyYLy6GsmRNU/9zdv3pSnt23b\nVmzcuLHMMgsKCkSdOnVKFZtVq1aJ4OBgIYTm17oicXFxwsbGpszfx44dK3r37i3fruh7Jzo6Wpib\nm4uioiIhhBDp6elCpVKJ2NhYef42bdqILVu2CCGE8PT0lNebEELcunWrwu/AtWvXCg8PD/l2VlaW\nUKlUIiUlReNz6tevn1i+fHmpbCUfz9HRURw9elQUFRWJevXqyZ9pIYT4448/RLNmzSpaZcKk4u0X\n7VCpVNiyZQtCQkIqnO/27dto2rSpfLtJkyYoKChASkpKpZZz69atMvd/mp1vDRs2lH83NzdHZmZm\nufO6uLjgxo0bT7ScAQMGYOLEiUhOTsaFCxdgZGSETp06AZD2GUyaNAlTp04tdZ+bN2/KO5NL7lTu\n2rUrJkyYgPHjx+PatWsYMGAAFi9eDEtLywozhISEVOl+j9uP4ujoKP9uZmZW6nbJdXnt2jXcunWr\n1EEShYWFpdonFanMe+bRne6V4eTkJP9uYWGB3NxcFBUVVSlvamoqCgoKSi2/SZMm8u/Xrl3D0aNH\nSz1WQUEB/vWvf+Hu3bvIzc2Fu7u7xudc8nFUKhUaN24st2cezW9ubl7qtpmZWZn38qMZz5w5Iy+r\nvM/UtGnTEBkZibCwMADA6NGjMWPGjDJ5H6cyr2HJz6KFhYV8UE9JaWlpyM/PL/NYJddLRbKzszFl\nyhTs2rVLbjNlZmZCCCG/31etWoX9+/eXal0/7nvHzs5Ovr+5uTmAsq9Pyc9D//79S+0jNDExqfA7\n8NF1U5zb0dERUVFRmDt3Li5duoSioiJkZ2fDx8enVLaSy7KwsEBmZiZSU1ORnZ2NNm3ayNOEEI89\nIEDxw4ZLcnFxKXXo6fXr12FiYgInJ6dK7QjWdH+lDw+sTG4bGxuEhYVh06ZN+P777zFkyBB5WpMm\nTfDll1/i3r178k9WVhbatWtX7jImTpyI48ePIyEhARcvXsQnn3wCAKhXr16pD2JycnKl7vckz6my\nGjdujGbNmpV6funp6di2bVulll3Re6YyeTVNq2j+quR1cHCAiYlJqX1eJX9v0qQJunTpUuqxMjIy\nsHLlStjZ2cHMzAyXL18u87guLi64du2afFsIgRs3bqBRo0bl5haP2ZH7aMbiz01Fn6n69etj8eLF\nuHLlCrZu3YqlS5ciOjq6zGM/7v1SmdewMuzt7WFqalrmsVxdXSt1/yVLluDixYuIjY3FgwcPsG/f\nPgipiwMAOHDgAN5//31s2bIF9evXrzD/k37vNGnSBDt37iz1nsjOzoazs3OVP3cPHz7EwIEDMX36\ndNy5cwf37t1Dz549K7VT397eHubm5khISJBz3L9/X963VR69KihDhgzBsmXLkJiYiMzMTMyaNQuv\nvPIKjIyM4ODgACMjozI7NR+9/7x585CWloa0tDR88MEHT3VoYmVW/ONUJjcAvPrqq1i/fj3++9//\n4tVXX5X/PnbsWMyfP1/esf7gwYNSO24fdfz4cRw9ehT5+fmwsLCAmZkZjI2NAQB+fn7YvHkzcnJy\ncPnyZaxZs0Z+k1Z0v0c5OTlV+Hyqst7atm0LS0tLLFq0CDk5OSgsLMSZM2dw/PjxSj12Re+ZynBy\ncsLdu3dLfVAqyl+VvMbGxhgwYAAiIyORk5ODhIQErF+/Xl7nvXr1wsWLF/Htt98iPz8f+fn5OHbs\nGM6fPw8jIyOMGjUKb7/9Nm7fvo3CwkIcPnwYeXl5ePnll7F9+3b8/vvvyM/Px5IlS2BmZoYOHTpU\n6jlrMm/ePOTk5ODs2bNYt26dfI5PRZ+pbdu24fLlyxBCwMrKCsbGxhrXe8OGDZGYmFjuen2S11DT\nYxkbG+Pll1/G7NmzkZmZiWvXrmHZsmUYNmxYpdZBZmYmzM3NYW1tjb///htz586Vp924cQMvv/wy\nvvnmG3h4eJTJr63vnbFjx2LWrFlygU9NTcXWrVsBVP67pFheXh7y8vJgb28PIyMjREVFYffu3ZW6\nr5GREcLDwzF58mSkpqYCkLoij7u/XhWUUaNGYfjw4ejcuTPc3NxgYWEhH0FjYWGB2bNno2PHjrCx\nsUFsbGyZ+8+ZMwcBAQHw8fGBj48PAgICMGfOHHn64yr8o9NL3n7c+TLlTatMbgDo06cPLl++DGdn\nZ3h7e8t/79evH2bMmIFXXnkF1tbW8Pb2xq5du8pdbnp6OkaPHg1bW1uo1WrY29tj2rRpAKSjv+rU\nqQMnJyeMHDmy1Aetovs9atKkSfj5559ha2uLyZMna1wXj1t3xbeNjY2xbds2xMfHw83NDQ4ODhg9\nenS5/xN69LEqes9oWj+P8vT0xJAhQ+Dm5gZbW1v5KC9t5f3888+RmZmJhg0bYtSoUaWOLrK0tMTu\n3buxceNGNGrUCM7Ozpg5c6Z8hNDixYvh7e2N5557DnZ2dpg5cyaKiorQokULfPvtt5g4cSIcHByw\nfft2/PbbbzAxKb+D/bjXo0uXLvDw8EC3bt0wbdo0+Yi4ij5Tly9fRmhoKCwtLdGhQweMHz9ePqqx\npJdeegmA1F4JCAgoM/1JXsPyXtcVK1agXr16cHNzQ1BQEIYOHYqRI0c+9n4AMHnyZOTk5MDe3h4d\nOnRAjx495Pn37t2LO3fuYODAgfKRXsWf06p+71SUYdKkSejTpw/CwsJgZWWF9u3by98ZJb9LbG1t\ncfTo0Qrfq5aWlvjss8/w8ssvw9bWFj/88AP69u1b6SwLFy6Eh4cH2rVrJx8dePHixXLnBwCV0MZ/\nw4nIICUmJsLNzQ0FBQVPdG4PUUl8BxERkVawoBDVchxqhrSFLS8iItIKbqEQEZFWsKAQEZFWsKAQ\nEZFWsKAQEZFWsKAQEZFWsKAQEZFWsKAQEZFWsKAQEZFWsKAQEZFWsKAQEZFWsKAQEZFW6OQSwACg\nVqvli/CYmpqWuS5IWloahg0bhuTkZBQUFOCdd97Ba6+9pqt4RET0lHQ2OGSzZs1w4sQJ2Nraapwe\nGRmJhw8f4uOPP0ZaWhqeeeYZpKSkVHjRICIi0h86bXlVVLucnZ3lq96lp6fDzs6OxYSIyIDobAvF\nzc0N1tbWMDY2xpgxYxAeHl5qelFREUJCQnDx4kVkZGTgxx9/RI8ePXQRjYiItEBnmwCHDh2Cs7Mz\nUlNTERoaCk9PTwQFBcnT58+fDz8/P8TExODKlSsIDQ3FqVOnYGlpqauIRET0FHRWUJydnQEADg4O\n6N+/P2JjY0sVlD/++AOzZ88GALi7u6NZs2a4cOECAgIC5Hn8/Pxw6tQpXUUmIqoRfH19ER8fX+3L\n0ck+lOzsbGRkZAAAsrKysHv3bnh7e5eax9PTE3v27AEApKSk4MKFC3Bzcys1z6lTpyCEMNifiIgI\nxTPU1vyGnJ35lf8x9Py6+o+4TrZQUlJS0L9/fwBAQUEBhg4dirCwMKxatQoAMGbMGMyaNQsjR46E\nr68vioqKsGjRonKPCCMiIv2jk4LSrFkzjZtbY8aMkX+3t7fHb7/9pos4RERUDXimvA4FBwcrHeGp\nGHJ+Q84OML/SDD2/rujssGFtUKlUMKC4RER6QVffndxCISIirWBBISIirWBBISIirWBBISIirWBB\nISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIi\nrWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBBISIirWBB\nISIirWBBISIirWBBISIirWBBISIirTC4gvLVV0BRkdIpiIjoUQZXUL7+GmjXDjh2TOkkRERUksEV\nlIMHgfHjgT59gNGjgbQ0pRMRERFggAXFyAgYMQI4dw6wsAC8vIAvvgAKC5VORkRUu6mEEELpEJWl\nUqnwaNzTp4EJE4DMTGDlSqB9e4XCERHpKU3fndWyHEMvKAAgBPDDD8C0aUBoKLBwIeDkpEBAIiI9\npKuCYnAtL01UKuDVV6U2mIMD0Lo18NlnQEGB0smIiGoPnWyhqNVqWFlZwdjYGKampoiNjS0zT0xM\nDKZMmYL8/HzY29sjJiambNhKVtmEBGDiRCA1Ffj8c6BzZ208CyIiw1SjWl7NmjXDiRMnYGtrq3H6\n/fv30bFjR+zatQuurq5IS0uDvb192bBVWClCAD//DEydCgQFAZ98Ari4PNXTICIySDWu5VXRk/n+\n++8xcOBAuLq6AoDGYlJVKhXw0ktSG6xpU8DHB1i8GMjPf+qHJiIiDXRSUFQqFbp164aAgACsXr26\nzPRLly7h77//RteuXREQEIBvvvlGa8uuVw+YPx/44w9g717A11f6l4iItMtEFws5dOgQnJ2dkZqa\nitDQUHh6eiIoKEienp+fj5MnT2Lv3r3Izs5G+/bt0a5dOzRv3rzMY0VGRsq/BwcHIzg4uFIZWrQA\nduwAtm4F3ngDeO45YMkSoHHjp312RET6JSYmRuN+6Oqm88OG586di/r162Pq1Kny3xYuXIicnBy5\nWLzxxhvo3r07Bg0aVDqslvqAOTnSocWffy7tY3n7baBu3ad+WCIivVRj9qFkZ2cjIyMDAJCVlYXd\nu3fD29u71Dx9+/bFwYMHUVhYiOzsbBw9ehReXl7VlsncHIiMBGJjgcOHAW9vYOfOalscEVGtUO0t\nr5SUFPTv3x8AUFBQgKFDhyIsLAyrVq0CAIwZMwaenp7o3r07fHx8YGRkhPDw8GotKMXc3KQW2Pbt\n0tn2rVsDn34KqNXVvmgiohqnRpwprw25udI+lWXLgLfeks66NzevlkUREelUjWl5GQozM2D2bODE\nCWl8sFatpK0Xwym3RETK4hZKOXbvlrZU3N2B5csBDw+dLJaISOu4haKwsDBpS6VLF+mCXnPmANnZ\nSqciItJfLCgVqFMHmD4dOHUKuHIFaNkS+O9/2QYjItKELa8qiImRjgZzcZFGM/b0VCwKEVGlseWl\nh4KDgbg4oGdPacDJGTOA/z/Fhoio1mNBqSJTU2DyZODPP4Hbt6U22MaNbIMREbHl9ZQOHpTaYDY2\nwIoV0smRRET6hC0vA9GpE3D8ODBoEBASIo0L9uCB0qmIiHSPBUULTEyA8eOBs2eB9HSpDbZhA9tg\nRFS7sOVVDY4elQqMmZk0orGfn9KJiKg2Y8vLgAUGSkXlX/8CXnhB2sdy757SqYiIqhcLSjUxNgZG\njwYSEoDCQqkNtmYNUFSkdDIiourBlpeOnDwptcGKioCVK4GAAKUTEVFtwZZXDfPss8ChQ8C4cUDv\n3sCYMUBamtKpiIi0hwVFh4yMgNdeA86dk3bYe3kB//mP1BIjIjJ0bHkp6PRpaYd9VpZ0NFj79kon\nIqKaiC2vWsDHB9i3TzoZctAgYNQo4M4dpVMRET0ZFhSFqVTA0KFSG8zWVrpS5GefAQUFSicjIqoa\ntrz0TEICMHEikJoqtcE6d1Y6EREZOl19d7Kg6CEhgJ9/BqZOlQrKJ58Azs5KpyIiQ8V9KLWYSgW8\n9JK0tdK4MeDtDSxZAuTnK52MiKh83EIxABcvAm+9BVy/LrXBQkKUTkREhoQtLw1qa0EBpDbYli3S\nxb0CA4HFi6WtFyKix2HLi0pRqYB+/aQ2mKcn4O8PLFgAPHyodDIiIgkLioGxsADmzpVGM/7jD2n/\nyq5dSqciImLLy+Bt3y7tX/HxAZYtA9RqpRMRkb5hy4sqpVcv6UqRbdpIPx98AOTmKp2KiGojFpQa\nwMwMmDNHGiL/1CnpbPvfflM6FRHVNmx51UC7d0tn2zdvDixfDri7K52IiJTElhc9sbAw4M8/gaAg\n6RDj994DsrOVTkVENR0LSg1Vpw4wYwYQHw9cuiRde2XzZul8FiKi6sCWVy0RHS1de8XVVRrN+Jln\nlE5ERLrClhdpVdeu0tZK9+5Ax47Au+8CmZlKpyKimoQFpRYxNQWmTJH2r9y6BbRsCWzaxDYYEWmH\nTgqKWq2Gj48P/P390bZt23LnO3bsGExMTLB582ZdxKq1nJ2BDRuAH34A5s8Hnn9eOpeFiOhp6KSg\nqFQqxMTEIC4uDrGxsRrnKSwsxIwZM9C9e3fuJ9GRTp2AEyeAAQOA4GDpUsTp6UqnIiJDpbOW1+OK\nxIoVKzBo0CA4ODjoKBEBgImJtLP+7FngwQNp4MlvvmEbjIiqTmdbKN26dUNAQABWr15dZvrNmzex\nZcsWjBs3Tp6fdMvREVizRjq0+NNPpStFnjqldCoiMiQ6KSiHDh1CXFwcoqKisHLlShw4cKDU9MmT\nJ2PBggXyoW1seSmnXTsgNhYYNkw6QXLiRODePaVTEZEh0Pl5KHPnzkX9+vUxdepU+W9ubm5yEUlL\nS4OFhQVWr16NPn36lA6rUiEiIkK+HRwcjODgYJ3kro3u3gVmzwZ+/VXaef/aa4ARjwsk0nsxMTGI\niYmRb8+dO7dmXLExOzsbhYWFsLS0RFZWFsLCwhAREYGwsDCN848cORK9e/fGgAEDyobliY2KOHEC\nGD9eKiZffAH4+iqdiIiqosac2JiSkoKgoCD4+fkhMDAQL774IsLCwrBq1SqsWrWquhdPWtCmjXQx\nr9deA0JDpaPBMjKUTkVE+oZDr1CVpKYC06cD//sfsHQp8NJL0uWJiUh/6eq7kwWFnsiBA8CbbwIu\nLsDnn0tD5RORfqoxLS+qmYKCpAt6hYYC7dsDkZG8UiRRbceCQk/M1BR45x0gLk4aH6x1a2DnTqVT\nEZFS2PIirdmxQzpv5dlngWXLpKHyiUh5bHmRwenZEzhzRhrF2M9P2mmfn690KiLSFW6hULW4eFE6\ndyUlRTp3pWNHpRMR1V48yksDFhTDIgTw44/SeSvduwMLFwL29kqnIqp92PIig6dSAYMHA+fOAZaW\nQKtWwFdfAUVFSicjourALRTSmfh4YNw4qdBwCBci3eEWCtU4fn7AoUPAyJHS+StTpvCCXkQ1SZUK\nSnJysvx7dna21sNQzWdkBISH/3NBLy8vaT8LNzyJDF+lWl7z58+Hv78/kpKSEB4eDkC6/ntmZia6\ndu1a7SGLseVV8xw8KLXBOIQLUfXRq5bXgAEDkJiYiP/85z/o3bs3wsPDER8fj3379lV3PqrhOnWS\nhnAJC5OGcImIAHJylE5FRE/isVsoGRkZWLduHSwsLODk5IQXX3wRycnJOHbsGFxcXNCmTRtdZeUW\nSg1344a0XyU+Xtpa6d5d6URENYPenIcyduxYWFtbIykpCUlJSYiKioKFhUW1B9OEBaV2iIoCJkwA\n/P2l69tzCBeip6M3LS9vb28sXLgQ3333HTZu3IiNGzdWeyiq3Xr0kIZwadVKOjJsyRIO4UJkCB5b\nUOrWrSv/7uzsDCsrq2oNRAQA5ubA3LnSlSJ37pSuGnnokNKpiKgiJo+bYcGCBYiPj8ezzz4Lf39/\nqEpcni/63rGBAAAVwUlEQVQlJQVOTk7VGpBqtxYtgN27gZ9+ks66DwsDFi3iEC5E+uix+1A+/PBD\nPPfcczhy5AiOHTuGuLg4NGnSBB07dkRqaio2bNigq6zch1LLpadLR4F99x3w0UfA669L57UQUcX0\nZqe8JleuXMHRo0exevVqREdHV0cujVhQCPhnCBdAGsLFz0/ZPET6Tq8LSrH9+/ejc+fO2sxTIRYU\nKlZUBKxZA8yeDbz6KvDBBwB37xFppjdHeZXn8OHDaNasmTazEFVaySFcMjKkIVw2beIQLkRKqtIW\nyrx583Dp0iWYmJggNDQUKSkpmDRpUnXmK4VbKFSe4iFcnJ2lkyJbtFA6EZH+0MstlFatWmH9+vVY\nunQphBBwd3evrlxEVVI8hMsLLwAdOgDvv88hXIh0rUpbKL/88gtcXV3x3HPPVWemcnELhSojKUka\nwuXkSWlrpUcPpRMRKUsvd8pPnjwZgHSUl5mZGbp06YIJEyZUW7hHsaBQVZQcwmXZMqBxY6UTESlD\nbwrKe++9h3bt2qFt27a4cOECAKBTp07Yvn07nJycEBAQUO0hi7GgUFXl5AALFgArVwLTpgGTJwMl\nBn8gqhX0pqC88847cHd3R2xsLO7cuQMbGxsEBgaiTZs2OHjwIKZPn17tIYuxoNCTunxZKiaXLgHL\nl3MkY6pd9KagPOrBgwc4duwYTpw4AXd3dwwaNKi6spXBgkJPa9s2qbC0bi21wXjkO9UGeltQlMSC\nQtqQmwssXSqNYjxhAjBjBqDQFRmIdEIvDxsmqgnMzIBZs4C4OODcOemkyM2beVIk0dPiFgrVer//\nDkycCDRqBHz2GeDpqXQiIu3iFgqRjoSESANO9uwpnSA5bZo0nAsRVQ0LChEAU1NpZ/2ZM0BqqrSV\n8u23bIMRVQVbXkQaHD4s7bC3sABWrOAQ+WTY2PIiUlD79kBsLDB8uDQ+2PjxwN9/K52KSL/prKCo\n1Wr4+PjA398fbdu2LTP9u+++g6+vL3x8fNCxY0ecPn1aV9GINDI2BkaPBhISpNZXy5bAl18ChYVK\nJyPSTzpreTVr1gwnTpyAra2txumHDx+Gl5cXrK2tsXPnTkRGRuLIkSOlw7LlRQqKi5OOBsvNlQad\nbNdO6URElVMjW14VPaH27dvD2toaABAYGIikpCRdxSKqFH9/4MABaef9gAHAyJFASorSqYj0h84K\nikqlQrdu3RAQEIDVq1dXOO+aNWvQs2dPHSUjqjyVChg2DDh/HrCzk4Zw+fRTID9f6WREytNZy+v2\n7dtwdnZGamoqQkNDsWLFCgQFBZWZLzo6GuPHj8ehQ4dgY2NTOixbXqRnzp0D3noLuH1bOhqsa1el\nExGVpavvTpNqX8L/c3Z2BgA4ODigf//+iI2NLVNQTp8+jfDwcOzcubNMMSkWGRkp/x4cHIzg4ODq\nikz0WC1bArt3S0O3jBwJBAYCixfz2iukrJiYGMTExOh8uTrZQsnOzkZhYSEsLS2RlZWFsLAwRERE\nICwsTJ7n+vXrCAkJwbfffot25ezt5BYK6bPsbGDhQmmH/dSp0g+vvUL6oEaNNnz16lX0798fAFBQ\nUIChQ4di5syZWLVqFQBgzJgxeOONN/DLL7+gSZMmAABTU1PExsaWDsuCQgbgr7+kSxAnJEj7V3r1\nUjoR1XY1qqBoCwsKGZKoKGDSJOCZZ6TC4u6udCKqrWrkYcNEtUmPHsCff0oDTgYGAnPmAFlZSqci\nqj4sKETVqG5d6QJe8fHAlSvStVd++omDTlLNxJYXkQ7FxEhn2zs6SocZe3kpnYhqA7a8iGqg4GBp\nCJd+/YAuXYC33wYePFA6FZF2sKAQ6ZiJibSVcvasVExatgTWrweKipRORvR02PIiUtjRo1KBMTGR\nzmF59lmlE1FNw5YXUS0RGAgcOQK8/rp0GeKxY4G7d5VORVR1LChEesDISCoo585JlyNu2RL44gte\ne4UMC1teRHro1CmpDZaRIbXBOnZUOhEZMp4prwELCtUmQgAbNwLTpgEhIcCCBYCLi9KpyBBxHwpR\nLadSAUOGSG0wFxfAx0cafPLhQ6WTEWnGgkKk5ywtpa2Tw4eBgweli3pt3650KqKy2PIiMjBRUdJl\niN3dgWXLpMEniSrClhcRaVQ86OTzz0s766dNA9LTlU5FxIJCZJDq1JEu4HXmjHTOiqcnsG4dz7Yn\nZbHlRVQDxMZK17YXQhp0sm1bpRORPmHLi4gqrW1b4I8/gDfflAaeHDkSSE5WOhXVNiwoRDWEkREw\nYgRw/jzg4CAdDbZ4MZCXp3Qyqi1YUIhqGCsrYNEiaYslOhrw9paODCOqbtyHQlTDbd8OTJkCtGgh\nHWbcvLnSiUjXuA+FiLSiVy/pMOPOnYH27YF335XGCCPSNhYUolqgbl1g+nSpsCQnS4cZb9jAw4xJ\nu9jyIqqFjhz556Jen30GPPec0omoOrHlRUTVpl076UqRo0cDffpI12JJSVE6FRk6FhSiWsrISDpf\n5fx5wMZGOsx46VIeZkxPji0vIgIgFZbJk4Fr14BPPwVeeEHpRKQtvMCWBiwoRNVLCGDbNukw41at\npC0Wd3elU9HT4j4UItI5lQro3Rs4e1Y6xDgwEJg1C8jMVDoZGQIWFCIqo25d6XyV06eBGzekw4y/\n+07agiEqD1teRPRYf/whjWZct650mHGbNkonoqpgy4uI9EaHDtIQ+aNGSWfejx4NpKYqnYr0DQsK\nEVWKkZF0vsr580D9+oCXF7B8OZCfr3Qy0hdseRHREzl3TjrMOClJOsw4NFTpRFQeHjasAQsKkX4R\nAti6FXj7bcDHB1iyBHBzUzoVPYr7UIhI76lUQN++0mHGzz0nXTlyzhwgK0vpZKQEFhQiempmZtL5\nKvHxwNWr0mHGGzfyMOPaRmctL7VaDSsrKxgbG8PU1BSxsbFl5nnrrbcQFRUFCwsLrFu3Dv7+/qXD\nsuVFZBAOHpQOM65fX9px/8hHmXRMV9+dJtW+hP+nUqkQExMDW1tbjdN37NiBy5cv49KlSzh69CjG\njRuHI0eO6CoeEWlRp07AsWPA118DPXoA/foBH30E2NkpnYyqk05bXhVVyK1bt2LEiBEAgMDAQNy/\nfx8pHE+byGAZGwPh4dLRYHXqSIcZf/klUFiodDKqLjorKCqVCt26dUNAQABWr15dZvrNmzfRuHFj\n+barqyuSkpJ0FY+IqomNjXR2/e7dwDff/HMtFqp5dNbyOnToEJydnZGamorQ0FB4enoiKCio1DyP\nbsGoVKoyjxMZGSn/HhwcjODg4OqIS0Ra5usL7N8PfPst0L8/0LMn8PHHgIOD0slqnpiYGMTExOh8\nuYqchzJ37lzUr18fU6dOlf82duxYBAcH45VXXgEAeHp6Yt++fXBycvonLHfKE9UI6elAZKRUXCIi\ngLFjpRYZVY8adR5KdnY2MjIyAABZWVnYvXs3vL29S83Tp08fbNiwAQBw5MgRNGjQoFQxIaKaw8pK\nutbK778DP/0EBAQAhw4pnYqelk5aXikpKejfvz8AoKCgAEOHDkVYWBhWrVoFABgzZgx69uyJHTt2\nwMPDA/Xq1cPatWt1EY2IFNS6NRAdDWzaBAweDDz/PLBoEcD/SxomDr1CRHohIwP48ENg7VrpbPvx\n4wETne3lrdk4lpcGLChENd/588DEiUByMrByJdC5s9KJDB8LigYsKES1gxDAf/8rDToZFAR88gng\n4qJ0KsNVo3bKExFVhUoFDBoknRTZtOk/Ixnz2iv6jVsoRKT3Ll4EJk0Crl0DPv8cCAlROpFhYctL\nAxYUotpLCGDLFmDKFGmY/MWLgRKDa1AF2PIiIipBpZIGmTx7Vhoe398fWLAAePhQ6WRUjAWFiAyK\nhQUwd640Htgff0j7V3btUjoVAWx5EZGB275d2r/i4wMsWybtxKfS2PIiIqqEXr2AM2ekFlibNsC8\neUBurtKpaicWFCIyeGZmwHvvAcePAydPSkO6bN+udKrahy0vIqpxdu2Szrb39AQ+/RRwc1M6kbLY\n8iIiekIvvAD8+SfQoYN0iHFEBJCTo3Sqmo8FhYhqpLp1gXffBeLipDPuvbyk81jY5Kg+bHkRUa2w\nZ4/UBlOrpUsSN2+udCLdYcuLiEiLunUDTp2SrrnSvj0wezaQlaV0qpqFBYWIao06dYB33pEKy9Wr\nUhvs55/ZBtMWtryIqNaKiQEmTACcnYEVK6SjwmoitryIiKpZcLC0075XL6BTJ2D6dOnKkfRkWFCI\nqFYzNQUmT5bOtk9JkdpgGzeyDfYk2PIiIirh0CHpeva2tlIbrFUrpRM9Pba8iIgU0LGjNITLwIFA\n167SZYjT05VOZRhYUIiIHmFiIm2lnDkDPHgArF+vdCLDwJYXEdFjCCFd4MtQseVFRKQnDLmY6BIL\nChERaQULChERaQULChERaQULChERaQULChERaQULChERaQULChERaQULChERaQULChERaQULChER\naQULChERaYXOCkphYSH8/f3Ru3fvMtPS0tLQvXt3+Pn5oXXr1li3bp2uYhERkZborKAsX74cXl5e\nUGkYZe3zzz+Hv78/4uPjERMTg6lTp6KgoEBX0XQmJiZG6QhPxZDzG3J2gPmVZuj5dUUnBSUpKQk7\nduzAG2+8oXEIZWdnZ6T//xVs0tPTYWdnBxMTE11E0ylDf1Macn5Dzg4wv9IMPb+u6ORbe8qUKfjk\nk0/kovGo8PBwhISEwMXFBRkZGfjxxx91EYuIiLSo2rdQtm3bBkdHR/j7+5d7gZf58+fDz88Pt27d\nQnx8PMaPH4+MjIzqjkZERNokqtnMmTOFq6urUKvVomHDhsLCwkIMHz681Dw9evQQBw8elG+HhISI\nY8eOlXksd3d3AYA//OEPf/hThR93d/fq/qoXQgih00sA79u3D4sXL8Zvv/1W6u9vv/02rK2tERER\ngZSUFLRp0wanT5+Gra2trqIREdFT0vme7+KjvFatWgUAGDNmDGbNmoWRI0fC19cXRUVFWLRoEYsJ\nEZGB0ekWChER1VwGc6b8zp074enpiebNm2PhwoVKx3kstVoNHx8f+Pv7o23btgCAv//+G6GhoWjR\nogXCwsJw//59hVP+Y9SoUXBycoK3t7f8t4ryfvzxx2jevDk8PT2xe/duJSKXoil/ZGQkXF1d4e/v\nD39/f0RFRcnT9C3/jRs30LVrV7Rq1QqtW7fGZ599BsAwXoPyshvK+s/NzUVgYCD8/Pzg5eWFmTNn\nAjCMdQ+Un1+R9a+TPTVPqaCgQLi7u4urV6+KvLw84evrKxISEpSOVSG1Wi3u3r1b6m/Tpk0TCxcu\nFEIIsWDBAjFjxgwlomm0f/9+cfLkSdG6dWv5b+XlPXv2rPD19RV5eXni6tWrwt3dXRQWFiqSu5im\n/JGRkWLJkiVl5tXH/Ldv3xZxcXFCCCEyMjJEixYtREJCgkG8BuVlN6T1n5WVJYQQIj8/XwQGBooD\nBw4YxLovpim/EuvfILZQYmNj4eHhAbVaDVNTU7zyyivYsmWL0rEeSzzSTdy6dStGjBgBABgxYgR+\n/fVXJWJpFBQUBBsbm1J/Ky/vli1bMGTIEJiamkKtVsPDwwOxsbE6z1ySpvxA2dcA0M/8DRs2hJ+f\nHwCgfv36aNmyJW7evGkQr0F52QHDWf8WFhYAgLy8PBQWFsLGxsYg1n0xTfkB3a9/gygoN2/eROPG\njeXbrq6u8htWX6lUKnTr1g0BAQFYvXo1ACAlJQVOTk4AACcnJ6SkpCgZ8bHKy3vr1i24urrK8+nz\n67FixQr4+vri9ddfl1sW+p4/MTERcXFxCAwMNLjXoDh7u3btABjO+i8qKoKfnx+cnJzk9p0hrXtN\n+QHdr3+DKCiaxv/Sd4cOHUJcXByioqKwcuVKHDhwoNR0lUplUM/rcXn18bmMGzcOV69eRXx8PJyd\nnTF16tRy59WX/JmZmRg4cCCWL18OS0vLUtP0/TXIzMzEoEGDsHz5ctSvX9+g1r+RkRHi4+ORlJSE\n/fv3Izo6utR0fV/3j+aPiYlRZP0bREFp1KgRbty4Id++ceNGqQqrj5ydnQEADg4O6N+/P2JjY+Hk\n5ITk5GQAwO3bt+Ho6KhkxMcqL++jr0dSUhIaNWqkSMaKODo6yl8Eb7zxhrxZr6/58/PzMXDgQAwf\nPhz9+vUDYDivQXH2YcOGydkNbf0DgLW1NXr16oUTJ04YzLovqTj/8ePHFVn/BlFQAgICcOnSJSQm\nJiIvLw+bNm1Cnz59lI5VruzsbHnomKysLOzevRve3t7o06cP1q9fDwBYv369/MHTV+Xl7dOnDzZu\n3Ii8vDxcvXoVly5dko9k0ye3b9+Wf//ll1/kI8D0Mb8QAq+//jq8vLwwefJk+e+G8BqUl91Q1n9a\nWprcDsrJycH//vc/+Pv7G8S6ryh/cTEEdLj+tbJrXwd27NghWrRoIdzd3cX8+fOVjlOhv/76S/j6\n+gpfX1/RqlUrOe/du3fF888/L5o3by5CQ0PFvXv3FE76j1deeUU4OzsLU1NT4erqKr7++usK8370\n0UfC3d1dPPPMM2Lnzp0KJpc8mn/NmjVi+PDhwtvbW/j4+Ii+ffuK5ORkeX59y3/gwAGhUqmEr6+v\n8PPzE35+fiIqKsogXgNN2Xfs2GEw6//06dPC399f+Pr6Cm9vb7Fo0SIhRMWfV0PIr8T654mNRESk\nFQbR8iIiIv3HgkJERFrBgkJERFrBgkJERFrBgkJERFrBgkJERFrBgkJERFrBgkJERFrBgkL0lB4+\nfKjx77m5uTpOQqQsFhSip7Bt2zZ53LZHJSUlYc+ePTpORKQcFhSiKjh37hzmz58PQBr8MD09Hfb2\n9hrn9fDwQEJCAnJycnQZkUgxLChEVRAdHQ1/f38AwNq1a9G/f/8K5+/Vqxd++OEHXUQjUhwLClEl\nRUVFYc2aNUhKSkJycjLu3LkDc3NzefqZM2ewYcMGrFq1CllZWQAAd3d3/Pnnn0pFJtIpFhSiSurR\nowdcXFwQHh6Ohg0bltnp/vXXX8PT0xN169ZFZmam/PeCggJdRyVSBAsKUSUlJyejYcOG8u38/PxS\n04cNG4a3334bmzdvlq9FDkgXXCOqDVhQiCrp2LFjaNu2LY4dO4bs7GwYGxvL0/73v//h9OnTOHjw\nYJmd9EZG/JhR7cB3OlElubi44ObNm8jMzISFhQUsLCzkaY6OjqhTpw5+/PFHvPzyy/LfhRCwtLRU\nIi6RzpkoHYDIULRp0wZt2rSRb7u6uuLevXuwsbGBr68vfH19y9zn9OnTCAwM1GVMIsVwC4XoCYWH\nh+Onn36qcJ69e/fipZde0lEiImWxoBA9IWtra7Rs2RLXr1/XOP3s2bN4/vnnuQ+Fag2VEEIoHYKI\niAwf/+tERERawYJCRERawYJCRERawYJCRERawYJCRERawYJCRERawYJCRERawYJCRERa8X/X3rb6\nbACx9wAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x856d978>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate constant for the decomposition is :2.55e-03 s**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 76
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13.6,Page no:576"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "k=5.36*10**-4 #rate constant, s-1\n",
+ "\n",
+ "#Calculation\n",
+ "t_half=0.693/(60*k) #half life of the reaction, min\n",
+ "\n",
+ "#Result\n",
+ "print\"The half life for the decomposition of ethane is :\",round(t_half,1),\"min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The half life for the decomposition of ethane is : 21.5 min\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13.7,Page no:578"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "k=7*10**9 #rate constant, M s\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "t=2*60 #half life of the reaction, s\n",
+ "Ao1=0.086 \n",
+ "A1=(k*t+1/Ao1)**-1 \n",
+ "#(b)\n",
+ "Ao2=0.6 \n",
+ "t_half2=1/(Ao2*k) #half life of the reaction, s\n",
+ "Ao3=0.42 \n",
+ "t_half3=1/(Ao3*k) #half life of the reaction, s\n",
+ "\n",
+ "#Result\n",
+ "print\"(a.)The concentration of I is :%.1e\"%A1,\"M\"\n",
+ "print\"(b.)The half life for Io=0.6 is :%.1e\"%t_half2,\"s\"\n",
+ "print\" The half life for Io=0.42 is :%.1e\"%t_half3,\"s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a.)The concentration of I is :1.2e-12 M\n",
+ "(b.)The half life for Io=0.6 is :2.4e-10 s\n",
+ " The half life for Io=0.42 is :3.4e-10 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13.8,Page no:584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "T=[700.0,730.0,760.0,790.0,810.0] #temperature(data given), K\n",
+ "R=8.314 #gas constant, kJ/mol\n",
+ "k=[0.011,0.035,0.105,0.343,0.789] #rate constant(data given) in 1/M**1/2 s corresponding to temperature values\n",
+ "\n",
+ "#Calculation\n",
+ "x=numpy.reciprocal(T) #1/T values corresponding to Temp values above, K-1\n",
+ "x=numpy.round(x,5)\n",
+ "import math\n",
+ "import numpy\n",
+ "from pylab import *\n",
+ "%pylab inline\n",
+ "lnk=numpy.log(k) #lnk values corresponding to k\n",
+ "lnk[0]=numpy.round(lnk[0],2)\n",
+ "lnk[1]=numpy.round(lnk[1],2)\n",
+ "lnk[2]=numpy.round(lnk[2],3)\n",
+ "lnk[3]=numpy.round(lnk[3],3)\n",
+ "lnk[4]=numpy.round(lnk[4],3)\n",
+ "A=plot(x,lnk,marker='o', linestyle='-')\n",
+ "plt.xlim(1.2*10**-3,1.45*10**-3)\n",
+ "plt.ylim(-5.0,0.0)\n",
+ "plt.ylabel('$ln k$')\n",
+ "plt.xlabel('$1/T(K^-1)$')\n",
+ "plt.title('Plot of ln k versus 1/T\\n')\n",
+ "slope=np.polyfit(x,lnk,1)\n",
+ "Ea=-slope[0]*R #activation energy, kJ/mol\n",
+ "\n",
+ "#Result\n",
+ "show(A)\n",
+ "print\"The activation energy for the decomposition is :%.3e\"%(Ea/1000),\"kJ/mol\"\n",
+ "print\"NOTE:Slope is approximately calculated in book,that's why wrong answer\""
+ ],
+ "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: ['power', 'draw_if_interactive', 'random', 'fft', 'linalg', 'info']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEuCAYAAABLSP/KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X98z/X+//Hbe5s2YyHkx6awjWkZ2obSWetoGB9O6AdO\nOI5+nJIpvkcdKjuFSinH+kG/FEerfDScLPnVcPJjw6yoyCKGVQr5tdl4ff94fbyzH9j23vv9er/3\nvl8vl13yfv14vx/v5+XVHnv+thmGYSAiIuIAH6sDEBERz6dkIiIiDlMyERERhymZiIiIw5RMRETE\nYUomIiLiMCUTERFxmJKJOE18fDxvv/22Sz7r9ddfp0mTJlx55ZUcOXKkxLm9e/fi4+PDuXPnKv2+\nGRkZtGjRorrCFKmxlEzEIS1btiQwMJCgoCCaNm3KiBEjOHnyJAA2mw2bzXbZ93Dklz1AUVER48aN\nY9WqVfz22280aNCgSu/jbT7//HNuvfVW6tevT6tWrcq9ZsOGDbRu3ZqgoCD7j4+PD3Xr1rW//uKL\nL1wcubgjJRNxiM1m45NPPuH48eNs3bqVzZs3M3ny5Cq9V1UXY8jPz6egoIB27dpV6X53U1xc7JLP\nqVu3Lvfeey8vvPDCRa9ZunQp9957L8ePH7f/AHz55Zf21926dXNJvOLelEyk2jRv3pxevXqxY8eO\nMucMw2Dy5Mm0bNmSJk2aMHz4cH777TcA4uLiAKhfvz5BQUFs2rSpzP2FhYU88sgjBAcHExwczKOP\nPsqZM2fYtWuXPYnUr1+f22677bJxxsfH89RTT3HzzTdz5ZVX0rNnT3755ZcKfceZM2cSGRnJwYMH\ny8RXv379Et/9559/JjAwkMOHDwPwySef0LFjRxo0aEC3bt346quv7Ne2bNmSadOmERUVRVBQEGfP\nnuX5558nJCSEK6+8koiICD7//HMA/vKXv/Dkk0/a7y3dFFf6vtWrV5f7XWJjY/nzn/980VoJwKef\nfkrv3r0rVDbi3ZRMxGHnaxT79+/n008/pVOnTmWumTNnDu+99x4ZGRl8//33nDhxgocffhiAdevW\nAXDs2DGOHz9Oly5dytw/ZcoUMjMzycnJIScnh8zMTCZPnkybNm3sv8CPHTvGypUrKxRzamoq7777\nLj/99BNnzpzhxRdfvOw9Tz/9NHPnzmXt2rU0b968xDl/f38GDhxIamqq/dhHH31EfHw8jRo1Ijs7\nm5EjR/Lmm2/y66+/8sADD9CvXz+Kiors13/wwQd8+umnHD16lN27d/Pqq6+yefNmfvvtN5YvX861\n114LXLr5cOfOnWXua9myZYXKpLRDhw7x448/0rFjxyrdL95FyUQcYhgGt99+Ow0aNOAPf/gD8fHx\nTJgwocx18+fPZ9y4cbRs2ZI6derw7LPP8sEHH3Du3LkKNW+9//77PPXUUzRq1IhGjRoxadIk5s2b\nZ4+hMmw2GyNGjCAsLIyAgADuuusutm3bdsnvOHbsWFauXMnnn39Ow4YNy71uyJAhfPDBByViHjJk\nCABvvPEGDzzwALGxsdhsNoYNG4a/vz8bN260x5SUlERwcDD+/v74+vpSWFjIjh07KCoq4pprrqF1\n69YlYirP5e6rjPT0dBITE6t0r3gfJRNxiM1mY/HixRw5coS9e/fyyiuv4O/vX+a6Q4cO2f+yBrjm\nmmsoLi7mxx9/rNDnHDx4sMz9pZuaKqNp06b2f9euXZsTJ05c9NqjR4/y1ltv8fjjjxMUFHTR6+Lj\n4zl16hSZmZns3buXnJwc+vfvD8APP/zA9OnTadCggf0nLy+vxHe4sKkqLCyMGTNmkJycTJMmTRg8\neDCHDh267Peq6n3lSU9PVxOXVJiSibhE8+bN2bt3r/31vn378PPzo0mTJhUa8VXe/aWbmpylQYMG\nfPLJJ4wYMYL169df9DpfX1/uuusuUlNTSU1NpW/fvtSpUwcwk9/EiRM5cuSI/efEiRPcfffd9vtL\nl8PgwYNZt24dP/zwAzabjcceewyAOnXqcOrUKft1+fn5FbqvMoqKili7di0JCQmVvle8k5KJuMTg\nwYN5+eWX2bt3LydOnGDChAkMGjQIHx8fGjdujI+PD7m5uZe8f/LkyRw+fJjDhw/z9NNPM3To0CrH\nU9mmsbi4OObPn8+AAQPIysq66HXnm7oubOICuO+++5g1axaZmZkYhsHJkydZunTpRWtEu3btYvXq\n1RQWFuLv709AQAC+vr4AdOzYkfT0dI4cOUJ+fj4zZsyo0H3llUFBQQFFRUUYhkFhYSFnzpwB4L//\n/S9RUVHUrVu3UuUk3kvJRFzir3/9K0OHDiUuLo7WrVsTGBhISkoKAIGBgUycOJFu3brRoEEDMjMz\ny9z/xBNPEBMTQ1RUFFFRUcTExPDEE0/Yz1+udlP6/IWvLzcf5vy52267jXfeeYe+fftetI+lc+fO\n1K1bl0OHDpXob4iOjubNN9/k4Ycf5qqrriI8PJy5c+de9HMLCwv5xz/+QePGjWnWrBmHDx/m2Wef\nBWDo0KF06NCBli1b0qtXLwYNGmR/n0vdV9qaNWsIDAykT58+7N+/n9q1a9OrVy/AHBLcp0+fS5aH\nyIVs2mlRREqLjIxk4cKFREREWB2KeAjVTESkhKKiIoYPH65EIpWimomIiDhMNRMREXGYkomIiDhM\nyURERBymZCIiIg5TMhEREYcpmYiIiMOUTERExGFKJiIi4jAlExERcZiSiYiIOEzJREREHOYWyWTZ\nsmVEREQQHh7O888/b3U4IiJSSZYv9Hj27Fnatm3LypUrCQ4OJjY2ltTUVNq1a2dlWCIiUgmW10wy\nMzMJCwujZcuW1KpVi0GDBrF48WKrwxIRkUqwPJkcOHCAFi1a2F+HhIRw4MABCyMSEZHKsjyZaAtQ\nERHP52d1AMHBwezfv9/+ev/+/YSEhJS4JiwsjNzcXFeHJiLi0UJDQ9m9e7dLPsvymklMTAzfffcd\ne/fu5cyZM3z44Yf069evxDW5ubkYhqEfw2DSpEmWx+AuPyoLlYXK4tI/rvwj3PKaiZ+fH6+88go9\ne/bk7NmzjBw5UiO5REQ8jOXJBCAxMZHExESrwxARkSqyvJlLKic+Pt7qENyGyuJ3KovfqSysYfmk\nxYqw2Wx4QJgiIm7Flb87VTMRERGHuUWfiadaunQtM2cup7DQD3//YpKSetCnT5zVYYmIuJySSRUt\nXbqWMWM+Izd3iv1Ybu5EACUUEfE6auaqopkzl5dIJAC5uVNISVlhUUQiItZRMqmiwsLyK3UFBb4u\njkRExHpKJlXk719c7vGTJ8+6OBIREespmVRRUlIPQkMnljjWrNkE9uxJYMwYOH3aosBERCygeSYO\nWLp0LSkpKygo8CUg4CyjRydw441xjBoF27bBv/8N0dFWRyki3sqVvzuVTJwkNRXGjIGkJHj8cfDT\nuDkRcTElk1I8MZkA5OXBiBFw4gTMnQvh4VZHJCLeRDPga4iQEPjsMxgyBG66CWbPBg/MiSIil6Wa\niYt88w3ccw80bQpvv23+V0TEmVQzqYHatYMNG+CGG6BjR/j4Y6sjEhGpPqqZWGDDBhg2DLp1g3/9\nC+rVszoiEamJVDOp4W68EbKzISAAOnSANWusjkhExDGqmVhs6VK4/36zk37yZPD3tzoiEakpVDPx\nIn36QE4O5OZCbCx8+aXVEYmIVJ6SiRto1AgWLoRx46B7d5g2Dc5qiS8R8SBq5nIze/fC8OHmfJT3\n3oNWrayOSEQ8lZq5vFjLlrB6NfTrB507w5w5mugoIu5PNRM39tVX5kTHVq3gjTfg6qutjkhEPIlq\nJgJA+/aQmQlt25pDiP/zH6sjEhEpn2omHmLtWrMvJSEBXnoJ6ta1OiIRcXeqmUgZcXHmEOLiYnM5\nlvXrrY5IROR3qpl4oEWL4G9/g5EjYdIkuOIKqyMSEXekmolc0u23m7WUL7+Erl1hxw6rIxIRb6dk\n4qGaNIElS+DBB+GWW2DGDDh3zuqoRMRbqZmrBsjNhaFDoXZtePddaNHC6ohExB2omUsqJTTUHO3V\nvTtER8P8+ZroKCKupZpJDbN1q1lLuf56eP11uOoqqyMSEauoZiJVdsMNsHkzNG8OUVHmHvQiIs6m\nmkkNtmoVjBhhrvM1bRoEBlodkYi4kmomUi26dzeHDx89Cp06mUuziIg4g2omXuKjj2D0aHjoIZgw\nAWrVsjoiEXE2r6mZLFiwgMjISHx9fdm6dauVodR4d91lds6vXw833wy7dlkdkYjUJJYmk/bt25OW\nlkZcXJyVYXiN4GBYtgyGDYObboLXXtMQYhGpHpYmk4iICNq0aWNlCF7HZoNRo+CLL8wJjomJcPCg\n1VGJiKdTB7yXatvWTChdu5qd8wsWWB2RiHgyP2d/QEJCAvn5+WWOT506lb59+1b4fZKTk+3/jo+P\nJz4+vhqi8261akFyMvTubU50XLIEUlLgiy/WMnPmcgoL/fD3LyYpqQd9+qgpUsTdZWRkkJGRYcln\nu8VorltvvZXp06dzww03lHteo7mc7+RJGD8eFixYS61an3Hw4BT7udDQifzrXz2VUEQ8jNeM5rqQ\nkoW16tSBV1+FFi2Wl0gkALm5U0hJWWFRZCLiCSxNJmlpabRo0YKNGzfSp08fEhMTrQxHgKCg8ls+\nCwp8XRyJiHgSp/eZXEr//v3p37+/lSFIKf7+xeUeDwg46+JIRMSTuE0zl7iHpKQehIZOLHHM13cC\nTZsmaE6KiFyUW3TAX4464F1r6dK1pKSsoKDAl4CAswwalMDrr8cREmLOTQkKsjpCEakIV/7uVDKR\nCikshKQkcxOutDSIiLA6IhG5HK8czSXuzd8fZs+GcePgD38wE4qIyHmqmUilZWbCHXeYEx2ffhp8\nNdBLxC2pmasUJRP389NPMGiQOYv+/fehYUOrIxKR0tTMJW7v6qth+XJza+CYGMjOtjoiEbGSkolU\nmZ8fvPACPPcc9OgB8+ZZHZGIWEXNXFIttm+H/v2hVy+YPh2uuMLqiEREzVzica6/HrKyYO9e+OMf\n4dAhqyMSEVdSMpFqU78+LF5sNnnFxJj7pYiId1AzlzjF0qUwYgRMmgQPPWTu8CgirqWhwaUomXim\n3bthwABzJ8dZs6B2basjEvEu6jORGiEsDDZsgDNnoFs3sz9FRGomJRNxqjp1zEmNw4aZ+82v0B5b\nIjWSmrnEZdasgcGDzQUjH3tM/SgizqY+k1KUTGqOvDxzXa/mzc3l7K+80uqIRGou9ZlIjRUSYtZQ\nrr4aunSBb7+1OiIRqQ5KJuJy/v7m6K7/9/+0nL1ITaFmLrFUVhYMHAj33APPPKPl7EWqk/pMSlEy\nqdnOL2fv5wepqVrOXqS6qM9EvMr55ew7dDCXYdm61eqIRKSylEzELZxfzv7556FnT5g71+qIRKQy\n1Mwlbmf7dnMZlh494KWXtJy9SFWpmUu82vXXm/vM79sHt94KBw9aHZGIXI6Sibil+vVh0SJzs63Y\nWPjvf62OSEQuRc1c4vbS083l7J96SsvZi1SGhgaXomQiubnmtsBazl6k4tRnIlJKaKi5nH1REdx0\nE+zZY3VEInIhJRPxGHXqwPz5MHy4uZz98uVWRyQi56mZSzzS+eXsR4+Gxx9XP4pIedRnUoqSiZRH\ny9mLXJr6TEQq4MLl7Dt3hm++sToiEe+lZCIe7fxy9uPHQ1yclrMXsYqauaTGyMoym72GDIHJk7Wc\nvYhXNXP9/e9/p127dnTo0IEBAwZw7Ngxq0MSDxUbC5s3m0uxJCbCL79YHZGI97A8mfTo0YMdO3aQ\nk5NDmzZtePbZZ60OSTxY48bw2WfQsaOWsxdxJcuTSUJCAj4+ZhhdunQhLy/P4ojE0/n5wbRp5k/P\nnvDee1ZHJFLzWZ5MLvTOO+/Qu3dvq8OQGuLOOyEjA6ZMgYcfhjNnrI5IpOZySQd8QkIC+fn5ZY5P\nnTqVvn37AjBlyhS2bt3KwoULywapDnhxwLFjMGwYHD4MCxaY81JEvIErf3f6ueJDVqxYccnz7777\nLunp6axateqi1yQnJ9v/HR8fT3x8fDVFJzVdvXrmkOGpU81O+g8/hJtvtjoqkeqXkZFBRkaGJZ9t\n+dDgZcuWMW7cONasWUOjRo3KvUY1E6ku6enwl7+Yy9mPGqVlWKRm86rlVMLDwzlz5gxXXXUVADfe\neCOvvfZaiWuUTKQ65eaa2wJ36GBOeAwMtDoiEefwqmRSEUomUt1OnoT774evv4aPP4ZWrayOSKT6\nedWkRREr1KkD//632eTVtas5N0VEqk41E/F655ezf/hh+Mc/1I8iNYeauUpRMhFnO3DAXNeraVNz\nkqOWs5eaQM1cIi4WHGxOcGzaVMvZi1SFaiYipbzzDjz2GMyeDf7+a5k5czmFhX74+xeTlNSDPn3i\nrA5RpEJq3KRFEU/y179CVBT07r2WoqLPOHp0iv1cbu5EACUUkVLUzCVSjpgYiIxcXiKRAOTmTiEl\n5dIrOoh4IyUTkYswjPIr7gUF2nVLpDQlE5GL8Pcvvsjxsy6ORMT9KZmIXERSUg9CQyeWOFa79gTy\n8hLYt8+ioETclDrgRS7ifCd7SsqTFBT4EhBwllGjevH113HExprrevXvb3GQIm5CQ4NFqmDjRnPW\nfO/e8OKLULu21RGJlKVJiyJurmtXyM42N9zq0sVcMFLEmymZiFRR/frwwQcwZgzExcFbb4Eq0OKt\nKpVMoqOjOX36NADp6el88cUXTglKxFPYbDByJKxdCzNnwqBB5jbBIt6mUslk4sSJ1K5dm7S0NDZs\n2EBaWpqz4hLxKNddB5s2QaNG0KmT2aci4k0u2wEfFxfHjTfeyE033USnTp3IysoiLS2N8ePHExIS\nYt8h0alBqgNePEhaGvztb/DoozB+PPioMVks4lZL0C9ZsoTw8HA2bNhAZmYmX/9fT+P//M//cOut\ntxIbG+v8IJVMxMPs2wd//jMEBMDcudCsmdURiTdyq2RSnhMnTpCVlcW3337Lgw8+6Iy4SlAyEU9U\nXAzPPANvvAFz5kCvXlZHJN7G7ZMJwIYNGwgJCaFFixbVHVMZSibiydasgXvugbvvhqlT4YorrI5I\nvIXbJpPJkyfz3Xff4efnR0JCAj/++CNjxoxxZnyAkol4vsOHzaXtDx2C1FQIC7M6IvEGbjtpMTIy\nkvfee4+XXnoJwzAIDQ11VlwiNUqjRrB4MQwbBjfeCPPnWx2RSPWqVM0kLS2NkJAQl3S6X0g1E6lJ\ntm0z56N07QqvvAJ161odkdRUbtvM9cgjjwCQm5tLQEAAt9xyCw8//LDTgjtPyURqmhMnICkJvvjC\nnEXfqZPVEUlN5FbJ5Mknn6Rr16507tyZnTt3AnDzzTezdOlSmjRpQkxMjPODVDKRGio11UwqTzxh\n/tdmszoiqUncag/406dPs2/fPv73f/+Xn376iQYNGpCdnU10dDSrV692STIRqakGD4bOnc3/rlxp\nDiFu1MjqqEQqr9JDg48dO0ZWVhZbtmwhNDSUO+64w1mx2almIjXdmTNm7SQ1FebNg/h4qyOSmsCt\nmrncgZKJeIvPPoO//AXuuw+eegr8tH2dOEDJpBQlE/Em+fnmEOJTp+D99+Gaa6yOSDyV284zERHn\na9oUli2Dfv0gJgY+/tjqiEQuTzUTETe2aZPZOd+rF0yfru2BpXJUMxERwNwSODsbfv3VHPW1Y4fV\nEYmUT8lExM3Vq2eO8nrkEXOU15tvantgcT9q5hLxIN98Yy7F0ratubR9/fpWRyTuTM1cIlKudu3M\nfpSrrzaXYNmwweqIREyqmYh4qEWL4IEHzOavxx7T9sBSltfMM3nyySdZsmQJNpuNhg0b8u6775a7\n2ZaSiUj59u83twe+4gpz5ry2B5YLeU0yOX78OEFBQQCkpKSQk5PDW2+9VeY6JRORiysuhsmTYfZs\neOcdSEy0OiJxF17TZ3I+kYC5r3wjrXAnUml+fpCcbC5l/8ADMG6cudaXiCtZ3mcyceJE5s2bR2Bg\nIBs3bqR+OcNTVDMRqZhffjG3Bz5wwEwu2h7Yu9WoZq6EhATy8/PLHJ86dSp9+/a1v37uuefYuXMn\nc+bMKRukkolIhRkGvPoq/POf8PLLcM89VkckVqlRyaSi9u3bR+/evdm+fXuZczabjUmTJtlfx8fH\nE681ukUuKScH7r7bnEX/6qvaHtgbZGRkkJGRYX/9z3/+0zuSyXfffUd4eDhgdsBnZmYyb968Mtep\nZiJSNSdPmjs4rltnNnvdcIPVEYkreU3N5I477mDnzp34+voSGhrK66+/ztVXX13mOiUTEcekpsKY\nMTBxorYH9iZek0wqSslExHHff2+uQNy4sbk9cOPGVkckzuY1Q4NFxHVatzabuyIjzaVYPv/c6oik\nJlHNRMQLLV9ubg88ciRMmqTtgWsqNXOVomQiUv1+/NHcHvjECXN74GuvtToiqW5q5hIRp2vSBD79\nFP70J4iN1fbA4hjVTESETZtgyBDo0QNeeknbA9cUqpmIiEt16QJbt8LRo9oeWKpGyUREAHN74Pff\nh0cfNbcHfuMNbQ8sFadmLhEp49tvzaVYtD2wZ9NorlKUTERcr6AA/v53+OQTs8by669rmTlzOYWF\nfvj7F5OU1IM+feKsDlMuwZW/OzW6XETKFRAAKSlw222QmLgWX9/P+PXXKfbzubkTAZRQBFCfiYhc\nxp/+BB06LC+RSAByc6eQkrLCoqjE3SiZiMhl2WzlN2IUFPi6OBJxV0omInJZ/v7F5R4/e/asiyMR\nd6VkIiKXlZTUg9DQiSWONWw4gW3bEnjuOSgqsigwcRsazSUiFbJ06VpSUlZQUOBLQMBZRo9O4Lrr\n4njgATh8GN56S5tvuRsNDS5FyUTEfRkGzJ0L48ebKxEnJ2s5Fneh5VRExGPYbDB8OHz5JfzwA0RF\nwQXbkIuXUM1ERKrVkiUwahQkJsK0aZo9byXVTETEY/XrB9u3g68vXH89LFpkdUTiCqqZiIjTrFkD\n990HHTqYs+mbNrU6Iu+imomI1Ai33AI5ORAebvalzJmjlYhrKtVMRMQltm0z95y/6iqYPRtat7Y6\noppPNRMRqXE6djR3dOzRw9yA66WXQBPoaw7VTETE5XbvNvtSTp6Et9+G9u2tjqhmUs1ERGq0sDBY\nvdpMKH/8Izz5JBQWWh2VOELJREQsYbOZySQnx9xzvmNH+OILq6OSqlIzl4i4hYULYfRoGDAAnn0W\ngoKsjsjzqZlLRLzOwIFmDeX0aXOyY3q61RFJZahmIiJuZ9UquP9+6NoVZsyAxo2tjsgzqWYiIl6t\ne3dz4chmzcyRXvPna7Kju1PNRETcWlYW3HsvBAfDrFlwzTVWR+Q5VDMREfk/sbGweTN06wbR0fDK\nK3DunNVRSWmqmYiIx/j2W7OWYhjmzo7t2lkdkXtTzUREpBwREbB2Lfz5zxAXB888A2fOWB2VgJKJ\niHgYHx946CHYutVc6ys6GjIzrY5KlExExCO1aAH/+Q9MmGBuyDV2rLnWl1jDLZLJ9OnT8fHx4ddf\nf7U6FBHxIDYbDB5s7uz488/mMOKVK62OyjtZnkz279/PihUruPbaa60ORUQ8VKNGMG8evPqquWfK\niBGgv01dy/JkMnbsWKZNm2Z1GCJSAyQmmrWUoCBzSZYFCzTZ0VUsTSaLFy8mJCSEqKgoK8MQkRok\nKAhmzjQXjpw0Cfr3hwMHrI6q5vNz9gckJCSQn59f5viUKVN49tlnWb58uf3YpcZDJycn2/8dHx9P\nfHx8dYYpIjXMjTdCdjZMnWoubz9lijlHxcfy9hjnycjIICMjw5LPtmzS4vbt2+nevTuBgYEA5OXl\nERwcTGZmJldffXXJIDVpUUQcsH272ZdSuza8+SaEh1sdkWu48nen28yAb9WqFVu2bOGqq64qc07J\nREQcdfYspKTA5Mnw97+bQ4lr1bI6KufyyhnwNpvN6hBEpAbz9YVHHjEXjly1Crp0MSc+SvVwm5rJ\npahmIiLVyTBg7lwYP94cRjxpktkEVtN4Zc1ERMRVbDYYPtzcM2XPHujQAdassToqz6aaiYh4vSVL\nYNQo6N0bpk2DevWsjqh6qGYiIuJC/fqZI758fCAyEhYvtjoiz6OaiYjIBdasgfvuM5u+UlKgaVOr\nI6o61UxERCxyyy2QkwNhYWZCefddLclSEaqZiIhcRHa2OWu+YUOYPRtatbI6ospRzURExA106mRu\nwJWQAJ07w8svm5MfpSzVTEREKmD3brMv5eRJePttc+8Ud6eaiYiImwkLg9WrzYTyxz/Ck09CYaHV\nUbkPJRMRkQqy2cxkkpNjDiXu1AnWr7c6KvegZi4RkSowDPj4Y0hKggEDzKXug4KsjqokNXOJiLg5\nmw0GDjRrKKdOmTs7pqdbHZV1VDMREakGq1bB/fdD164wYwY0bmx1RKqZiIh4nO7dzYUjmzY1R3rN\nn+9dkx1VMxERqWZZWeZkx5AQeP11uOYaa+Lwyp0WL0XJREQ8TVGRuQLxjBnmfinXXruWV15ZTmGh\nH/7+xSQl9aBPnzinxqBkUoqSiYh4qm+/hQED1vL9959RWDjFfjw0dCL/+ldPpyYU9ZmIiNQQERHQ\nosXyEokEIDd3CikpKyyKqvopmYiIOFlhoV+5xwsKfF0cifMomYiIOJm/f3G5xwMCas6qkUomIiJO\nlpTUg9DQiSWOhYZOYPToBIsiqn7qgBcRcYGlS9eSkrKCggJfAgLOMnp0gkZzuZqSiYhI5Wk0l4iI\neBQlExERcZiSiYiIOEzJREREHKZkIiIiDlMyERERhymZiIiIw5RMRETEYUomIiLiMCUTERFxmJKJ\niIg4TMlEREQcZmkySU5OJiQkhE6dOtGpUyeWLVtmZTgiIlJFliYTm83G2LFjyc7OJjs7m169elkZ\njkfIyMiwOgS3obL4ncridyoLa1jezKWl5StH/6P8TmXxO5XF71QW1rA8maSkpNChQwdGjhzJ0aNH\nrQ5HRESqwOnJJCEhgfbt25f5WbJkCQ8++CB79uxh27ZtNGvWjHHjxjk7HBERcQK32Wlx79699O3b\nl6+++qqWCbTWAAAInUlEQVTMubCwMHJzcy2ISkTEc4WGhrJ7926XfJafSz7lIg4dOkSzZs0ASEtL\no3379uVe56rCEBGRqrG0ZjJs2DC2bduGzWajVatWzJ49myZNmlgVjoiIVJHbNHOJiIjncloH/LJl\ny4iIiCA8PJznn3++3GuSkpIIDw+nQ4cOZGdnX/beBQsWEBkZia+vL1u2bLEfX7FiBTExMURFRRET\nE8Pnn39uP7dlyxbat29PeHg4Y8aMccI3vTx3KYv4+HgiIiLsk0QPHz7shG97ac4ui61bt9qPZ2Zm\n2r9rVFQUH374of2cNzwXFS0Lb3suztu3bx9169Zl+vTp9mPe9lycV15ZVPq5MJyguLjYCA0NNfbs\n2WOcOXPG6NChg/H111+XuGbp0qVGYmKiYRiGsXHjRqNLly6Xvfebb74xdu7cacTHxxtbtmyxv1d2\ndrZx6NAhwzAMY/v27UZwcLD9XGxsrLFp0ybDMAwjMTHR+PTTT53xlS/Kncqi9LWu5uqyOHXqlHH2\n7FnDMAzj0KFDRsOGDY3i4mLDMLzvubhUWXjbc3HewIEDjbvuust48cUX7ce87bk4r7yyqOxz4ZSa\nSWZmJmFhYbRs2ZJatWoxaNAgFi9eXOKaJUuWMHz4cAC6dOnC0aNHyc/Pv+S9ERERtGnTpszndezY\nkaZNmwJw3XXXcfr0aYqKijh06BDHjx+nc+fOgNlHs2jRImd85Ytyl7I4z7CwVdPVZVG7dm18fMxH\n/PTp09SrVw9fX1+vfC4uVhbnedNzAbBo0SJat27NddddZz/mjc8FlF8W51XmuXBKMjlw4AAtWrSw\nvw4JCeHAgQMVuubgwYOXvfdSFi5cSHR0NLVq1eLAgQOEhITYzwUHB1fqvaqDu5TFecOHD6dTp05M\nnjy5Kl/HIVaURWZmJpGRkURGRvLSSy/ZP8Mbn4vyyuI8b3ouTpw4wbRp00hOTi7zGd72XFysLM6r\nzHPhlGRis9kqdF11/zW0Y8cOHn/8cWbPnl2t7+sIdyqL+fPns337dtatW8e6deuYN29etX7m5VhR\nFp07d2bHjh1s3bqVMWPGcOzYsWp7b0e4U1l423ORnJzMo48+SmBgoNst5+ROZVHZ58Ip80yCg4PZ\nv3+//fX+/ftLZPzyrsnLyyMkJISioqLL3luevLw8BgwYwLx582jVqpX9M/Ly8kpcExwcXOXvVRXu\nUhYAzZs3B6Bu3boMGTKEzMxMhg4dWuXvVllWlMV5ERER9glcISEhXvlcnHdhWURHR3vdc5GZmcnC\nhQsZP348R48excfHh9q1azNgwACvey4uVhYPPfRQ5Z+LCveuVEJRUZHRunVrY8+ePUZhYeFlO5E2\nbNhg70SqyL3x8fHG5s2b7a+PHDliREVFGWlpaWVi6dy5s7Fx40bj3LlzlnSouUtZFBcXGz///LNh\nGIZx5swZY+DAgcbs2bOr/fteiqvLYs+ePUZRUZFhGIaxd+9eo0WLFsaxY8cMw/C+5+JiZeGNz8WF\nkpOTjenTp9tfe9tzcaELy6Iqz4VTkolhGEZ6errRpk0bIzQ01Jg6daphGIYxa9YsY9asWfZrRo0a\nZYSGhhpRUVElRg2Ud69hGMbHH39shISEGAEBAUaTJk2MXr16GYZhGM8884xRp04do2PHjvaf8wWx\nefNm4/rrrzdCQ0ON0aNHO+vrXpI7lMWJEyeM6OhoIyoqyoiMjDQeeeQR49y5cy4qgd+5sizmzp1r\nREZGGh07djRiY2NL/GLwtufiYmXhjc/FhUonE297Li50YVlU5bnQpEUREXGY5UvQi4iI51MyERER\nhymZiIiIw5RMRETEYUomIiLiMCUTERFxmJKJiIg4TMlEREQcpmQiAhQXF7Nz587LXldYWOjUOAoK\nCpz6/iLOomQiXuPcuXOMHTu23HMZGRn4+Piwa9cuEhMTmT17NrfddhsjR45k9uzZREdH88knn3D8\n+HH7PS+++CLNmjWzr6aal5dHu3btmDVrFgcPHuSzzz6z/2zYsKFCMeXl5bFy5cpq/NYiruGUVYNF\n3M2RI0eYM2cOa9asKff8zp07ue222/joo49YsmQJtWrVIi0tjfHjx9O2bVvq1avHb7/9RqNGjez3\nxMTE0KtXL4YOHcq5c+dYv349mzZt4sorrwR+X6W5MjGFhYWRnp5Ot27dqF27djV8cxHXUM1EvEKD\nBg0YO3as/Rd9aed3IQwPD7dvJrZr1y7atm0LwPfff0///v1L3LNp0ya6dOlCYWEhH330EbfffvtF\n378yMfXp04fU1NQKv4+IO1AyEa+XmZlJbGwsAJ06dQLgu+++IzQ01H7NTz/9VKamkJWVRZs2bbjj\njjto06YNV1xxRbXEExoayldffVUt7yXiKkom4vW2bNlCTExMiWOZmZn2vcCh/I7xrKwsfvnlF/r1\n68f8+fOrNabi4uJqfT8RZ1MyEa937ty5MseysrLo2rWr/XVRUVGJ8/n5+TRr1ow777yTO++8k0WL\nFlXrFrCnTp2qtvcScQUlE/FqO3futPeLXCgrK8ve9AXg6+tb4vymTZvsyaZ+/frExsayYsWKaovr\nfB+OiKfQEyte4eTJk7z88st88803zJgxg5MnTwLmkOD4+Hj7dTk5Obzwwgt8+eWXpKWl8dNPPwEQ\nGBhov2b9+vW89tpr5Ofnc+DAAU6dOsWpU6eYNGkSu3btcjgmwzAICgqqhm8t4jraaVG8WkpKCqNH\nj77sdS+++CIjR46kQYMGTo8pJyeHb7/9lrvvvtvpnyVSXVQzEa918OBBgoODK3Ttfffdx4IFC5wc\nkWnVqlXceeedLvkskeqiZCJea926dfTs2bNC19arV4927dqxb98+p8a0Y8cOunfvrj4T8Thq5hIR\nEYfpzx8REXGYkomIiDhMyURERBymZCIiIg5TMhEREYcpmYiIiMOUTERExGFKJiIi4rD/D1n06Ai0\ngieeAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x8535d30>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The activation energy for the decomposition is :1.797e+02 kJ/mol\n",
+ "NOTE:Slope is approximately calculated in book,that's why wrong answer\n"
+ ]
+ }
+ ],
+ "prompt_number": 80
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13.9,Page no:586"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "k1=3.46*10**-2 #rate constant at T1\n",
+ "T1=298 #temp K\n",
+ "T2=350 #temp K\n",
+ "R=8.314 #gas constant,J/K mol\n",
+ "Ea=50.2*1000 #activation energy, J/mol\n",
+ "\n",
+ "#Calculation\n",
+ "k2=k1/math.exp(Ea/R*(T1-T2)/(T1*T2)) #from equation ln(k1/k2)=Ea*(T1-T2)/(T1*T2*R), S-1\n",
+ "\n",
+ "#Result\n",
+ "print\"The rate constant at temp 350 is :\",round(k2,3),\"s**-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rate constant at temp 350 is : 0.702 s**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_14.ipynb b/Chemistry/Chapter_14.ipynb
new file mode 100755
index 00000000..29fa23a9
--- /dev/null
+++ b/Chemistry/Chapter_14.ipynb
@@ -0,0 +1,359 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14:Chemical Equilibrium"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14.2,Page no:622"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "NO=0.0542 #equilibrium conc of NO, M\n",
+ "O2=0.127 #equilibrium conc of O2, M\n",
+ "NO2=15.5 #equilibrium conc of NO2, M\n",
+ "\n",
+ "#Calculation\n",
+ "Kc=NO2**2/(O2*NO**2) #equilibrium constant for given reaction\n",
+ "\n",
+ "#Result\n",
+ "print\"The value of the equilibrium constant of the reaction is %.2e\"%Kc\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of the equilibrium constant of the reaction is 6.44e+05\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14.3,Page no:623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "PCl3=0.463 #equilibrium pressure of PCl3, atm\n",
+ "PCl5=0.875 #equilibrium pressure of PCl5, atm\n",
+ "Kp=1.05 #equilibrium constant of the reaction\n",
+ "\n",
+ "#Calculation\n",
+ "Cl2=Kp*PCl5/PCl3 #equilibrium pressure of Cl2 in atm, formula from the definition of equilibrium constant\n",
+ "\n",
+ "#Result\n",
+ "print\"The value of the equilibrium pressure of the Cl2 gas is :\",round(Cl2,2),\"atm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of the equilibrium pressure of the Cl2 gas is : 1.98 atm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14.4,Page no:623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Kc=10.5 \n",
+ "delta_n=1-3 \n",
+ "T=273+220 \n",
+ "\n",
+ "#Calculation\n",
+ "Kp=Kc*(0.0821*T)**delta_n \n",
+ "\n",
+ "#Result\n",
+ "print\"The value of the equilibrium constant of the reaction is :%.2e\"%Kp"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of the equilibrium constant of the reaction is :6.41e-03\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14.6,Page no:626"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "CO2=0.236 #pressure of CO2 gas, atm\n",
+ "T=273+800 \n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "Kp=CO2 \n",
+ "#(b)\n",
+ "delta_n=1 \n",
+ "Kc=Kp*(0.0821*T)**-delta_n \n",
+ "\n",
+ "#Result\n",
+ "print\"(a) the value of Kp of the reaction is :\",Kp\n",
+ "print\"(b) the value of Kc of the reaction is %.2e\"%Kc"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) the value of Kp of the reaction is : 0.236\n",
+ "(b) the value of Kc of the reaction is 2.68e-03\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14.8,Page no:633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Kc=1.2 #equilibrium constant for the reaction\n",
+ "N2=.249/3.5 #conc of N2, M\n",
+ "H2=(3.21*10**-2)/3.5 #conc of H2, M\n",
+ "NH3=(6.42*10**-4)/3.5 #conc of NH3, M\n",
+ "\n",
+ "#Calculation\n",
+ "Qc=NH3**2/(N2*H2**3) #reaction quotient initial\n",
+ "print\"Qc=\",round(Qc,3),\"(approx)\"\n",
+ "\n",
+ "#Result\n",
+ "if(Qc==Kc):\n",
+ " d=\"the system is in equilibrium\" \n",
+ "elif(Qc<Kc):\n",
+ " d=\"the system is not in equilibrium and the reaction will move from left to right\" \n",
+ "else:\n",
+ " d=\"the system is not in equilibrium and the reaction will move from right to left\" \n",
+ "print d"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Qc= 0.613 (approx)\n",
+ "the system is not in equilibrium and the reaction will move from left to right\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14.9,Page no:635"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Kc=54.3 \n",
+ "H2i=0.5 #initial moles of H2\n",
+ "I2i=0.5 #initial moles of I2\n",
+ "\n",
+ "#Calculation\n",
+ "#Let us assume that x moles have reacted, so, HI=2x, H2=0.5-x, I2=0.5-x, when we substitute in Kc=(HI)**2/(H2)*(I2) we get 54.3=(2x)**2/((0.5-x)*(0.5-x)) taking root we get 7.37=2*x/0.5-x\n",
+ "x=0.393 #from the above equation\n",
+ "H2=0.5-x \n",
+ "I2=0.5-x \n",
+ "HI=2*x \n",
+ "\n",
+ "#Result\n",
+ "print\"The equilibrium concentration of H2 is :\",H2,\"M\" \n",
+ "print\"The equilibrium concentration of I2 is :\",I2,\"M\"\n",
+ "print\"The equilibrium concentration of HI is :\",HI,\"M\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equilibrium concentration of H2 is : 0.107 M\n",
+ "The equilibrium concentration of I2 is : 0.107 M\n",
+ "The equilibrium concentration of HI is : 0.786 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14.10,Page no:636"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "Kc=54.3 \n",
+ "HIo=0.0224 \n",
+ "H2o=0.00623 \n",
+ "I2o=0.00414 \n",
+ "#let us assume that x moles have reacted, so, HI=HIo+2x, H2=0.00623-x, I2=0.00414-x, when we substitute in Kc=(HI)**2/(H2)*(I2) we get 54.3=(2x+0.0224)**2/((0.00623-x)*(0.00414-x)) simplifying we get 50.3x**2-0.654x+8.98*10**-4=0\n",
+ "a=50.3 \n",
+ "b=-0.654 \n",
+ "c=8.98*10**-4 \n",
+ "\n",
+ "#Calculation\n",
+ "x1=(-b+math.sqrt(b**2-4*a*c))/(2*a) \n",
+ "x2=(-b-math.sqrt(b**2-4*a*c))/(2*a) \n",
+ "if(x1>I2o):\n",
+ " x=x2 \n",
+ "else:\n",
+ " x=x1 \n",
+ "H2=0.00623-x \n",
+ "I2=0.00414-x \n",
+ "HI=2*x+0.0224 \n",
+ "\n",
+ "#Result\n",
+ "print\"The equilibrium concentration of H2 is :\",round(H2,5),\"M\"\n",
+ "print\"The equilibrium concentration of I2 is :\",round(I2,5),\"M\"\n",
+ "print\"The equilibrium concentration of HI is :\",round(HI,4),\"M\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equilibrium concentration of H2 is : 0.00467 M\n",
+ "The equilibrium concentration of I2 is : 0.00258 M\n",
+ "The equilibrium concentration of HI is : 0.0255 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14.11,Page no:639"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Kc=2.37*10**-3 #equilibrium constant for the reaction\n",
+ "N2=0.683 #conc of N2, M\n",
+ "H2=8.8 #conc of H2, M\n",
+ "NH3=3.65 #conc of NH3, M\n",
+ "\n",
+ "#Calculation\n",
+ "Qc=NH3**2/(N2*H2**3) #reaction quotient initial\n",
+ "print\"Qc=%.2e\"%Qc\n",
+ "\n",
+ "#Result\n",
+ "if(Qc==Kc):\n",
+ " d=\"the system is in equilibrium\" \n",
+ "elif(Qc<Kc):\n",
+ " d=\"the system is not in equilibrium and the reaction will move from left to right\" \n",
+ "else:\n",
+ " d=\"the system is not in equilibrium and the reaction will move from right to left\" \n",
+ "print d\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Qc=2.86e-02\n",
+ "the system is not in equilibrium and the reaction will move from right to left\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_15.ipynb b/Chemistry/Chapter_15.ipynb
new file mode 100755
index 00000000..fe8c12e3
--- /dev/null
+++ b/Chemistry/Chapter_15.ipynb
@@ -0,0 +1,472 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15:Acids and Bases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.2,Page no:662"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "OH=0.0025 # [OH-] ion concentration, M\n",
+ "Kw=1*10**-14 # ionic product of water, M**2\n",
+ "#Calculation\n",
+ "H=Kw/OH # From the formula (ionic product)Kw=[H+]*[OH-]\n",
+ "#Result\n",
+ "print\"The [H+] ion concentration of the solution is :\",H,\"M\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The [H+] ion concentration of the solution is : 4e-12 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.3,Page no:665"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "H1=3.2*10**-4 #Concentration of [H+] ion on first occasion,\n",
+ "H2=1*10**-3 #Concentration of [H+] ion on second occasion, M\n",
+ "\n",
+ "#Calculation\n",
+ "pH1=-math.log10(H1) #from the definition of pH\n",
+ "pH2=-math.log10(H2) #from the definition of pH\n",
+ "\n",
+ "#Result\n",
+ "print\"pH of the solution on first occasion is:\",round(pH1,2)\n",
+ "print\"pH of the solution on second occasion is :\",pH2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pH of the solution on first occasion is: 3.49\n",
+ "pH of the solution on second occasion is : 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.4,Page no:665"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "pH=4.82 #Given\n",
+ "\n",
+ "#Calculation\n",
+ "H=10**(-pH) #Concentration of [H+] ion, M, formula from the definition of pH\n",
+ "\n",
+ "#Result\n",
+ "print\"The [H+] ion concentration of the solution is :%.1e\"%H,\"M\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The [H+] ion concentration of the solution is :1.5e-05 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.5,Page no:666"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "OH=2.9*10**-4 #Concentration of [OH-] ion, M\n",
+ "#Calculation\n",
+ "pOH=-math.log10(OH) #by definition of p(OH)\n",
+ "pH=14-pOH \n",
+ "#Result\n",
+ "print\"\\t the pH of the solution is :\",round(pH,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t the pH of the solution is : 10.46\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.6,Page no:669"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "ConcHCl=1*10**-3 #Concentration of HCl solution, M\n",
+ "ConcBaOH2=0.02 #Concentration of Ba(OH)2 solution, M\n",
+ "\n",
+ "#Calculation\n",
+ "#for HCL solution\n",
+ "H=ConcHCl #Concentration of [H+] ion after ionisation of HCl\n",
+ "pH=-math.log10(H) \n",
+ "#for Ba(OH)2 solution\n",
+ "OH=ConcBaOH2*2 #Concentration of [OH-] ion after ionisation of Ba(OH)2 as two ions are generated per one molecule of Ba(OH)2\n",
+ "pOH=-math.log10(OH) \n",
+ "pH2=14-pOH \n",
+ "\n",
+ "#Result\n",
+ "print\"(a). The pH of the HCl solution is :\",pH\n",
+ "print\"(b). The pH of the Ba(OH)2 solution is :\",round(pH2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). The pH of the HCl solution is : 3.0\n",
+ "(b). The pH of the Ba(OH)2 solution is : 12.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.8,Page no:675"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "InitHNO2=0.036 #Initial concentration of HNO2 solution, M\n",
+ "#Let 'x' be the equilibrium concentration of the [H+] and [NO2-] ions, M\n",
+ "Ka=4.5*10**-4 #ionisation constant of HNO2, M\n",
+ "\n",
+ "#Calculation\n",
+ "x=math.sqrt(Ka*InitHNO2) #from the definition of ionisation constant Ka=[H+]*[NO2-]/[HNO2]=x*x/(0.036-x), which reduces to x*x/0.036, as x<<InitHNO2 (approximation)\n",
+ "approx=x/InitHNO2*100 #this is the percentage of approximation taken. if it is more than 5%, we will be having higher deviation from correct value\n",
+ "if(approx>5):\n",
+ " x1=(-Ka+math.sqrt((Ka**2)-(-4*1*Ka*InitHNO2)))/(2*1) \n",
+ " x2=(-Ka-math.sqrt((Ka**2)-(-4*1*Ka*InitHNO2)))/(2*1) \n",
+ " if(x1>0):\n",
+ " x=x1 \n",
+ " else :\n",
+ " x=x2 \n",
+ "pH=-math.log10(x) #since x is the conc. of [H+] ions\n",
+ "\n",
+ "#Result\n",
+ "print\"The pH of the HNO2 solution is :\",round(pH,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pH of the HNO2 solution is : 2.42\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.9,Page no:676"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "pH=2.39 # pH of the HCOOH acid solution\n",
+ "InitHCOOH=0.1 #initial concentration of the solution\n",
+ "\n",
+ "#Calculation\n",
+ "H=10**(-pH) #[H+] ion concentration from the definition of pH, M\n",
+ "HCOO_=H #[HCOO-] ion concentration,M\n",
+ "HCOOH=InitHCOOH-H #HCOOH concentration in M\n",
+ "Ka=(H*HCOO_)/(HCOOH) #ionisation constant of the acid, M, Ka=[H+]*[HCOO-]/[HCOOH]\n",
+ "\n",
+ "#Result\n",
+ "print\"The ionisation constant of the given solution is :%.2e\"%Ka,\"M(approx)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ionisation constant of the given solution is :1.73e-04 M(approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.10,Page no:678"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "InitNH3=0.4 #Initial concentration of NH3 solution, M\n",
+ "#Let 'x' be the equilibrium concentration of the [OH-] and [NH4+] ions, M\n",
+ "Kb=1.8*10**-5 #ionisation constant of NH3, M\n",
+ "\n",
+ "#Calculation\n",
+ "x=math.sqrt(Kb*InitNH3) #from the definition of ionisation constant Kb=[OH-]*[NH4+]/[NH3]=x*x/(InitNH3-x), which reduces to x*x/InitNH3, as x<<InitNH3 (approximation)\n",
+ "approx=x/InitNH3*100 #this is the percentage of approximation taken. if it is more than 5%, we will be having higher deviation from correct value\n",
+ "if(approx>5):\n",
+ " x1=(-Kb+math.sqrt((Kb**2)-(-4*1*Kb*InitNH3)))/(2*1) \n",
+ " x2=(-Kb-math.sqrt((Kb**2)-(-4*1*Kb*InitNH3)))/(2*1) \n",
+ " if(x1>0):#as only one root is positive\n",
+ " x=x1 \n",
+ " else:\n",
+ " x=x2 \n",
+ "pOH=-math.log10(x) #since x is the conc. of [H+] ions\n",
+ "pH=14-pOH \n",
+ "\n",
+ "#Result\n",
+ "print\"The pH of the NH3 solution is :\",round(pH,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pH of the NH3 solution is : 11.43\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.11,Page no:682"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "InitC2H2O4=0.1 #Initial concentration of C2H2O4 solution, M\n",
+ "#Let 'x1' be the equilibrium concentration of the [H+] and [C2HO4-] ions, M\n",
+ "#First stage of ionisation\n",
+ "import math\n",
+ "Kw=10**-14 #ionic product of water, M**2\n",
+ "Ka1=6.5*10**-2 #ionisation constant of C2H2O4, M\n",
+ "\n",
+ "#Calculation\n",
+ "x=math.sqrt(Ka1*InitC2H2O4) #from the definition of ionisation constant Ka1=[H+]*[C2HO4-]/[C2H2O4]=x*x/(InitC2H2O4-x), which reduces to x*x/InitC2H2O4, as x<<InitC2H2O4 (approximation)\n",
+ "approx=x/InitC2H2O4*100 #this is the percentage of approximation taken. if it is more than 5%, we will be having higher deviation from correct value\n",
+ "if(approx>5):\n",
+ " x1=(-Ka1+math.sqrt((Ka1**2)-(-4*1*Ka1*InitC2H2O4)))/(2*1) \n",
+ " x2=(-Ka1-math.sqrt((Ka1**2)-(-4*1*Ka1*InitC2H2O4)))/(2*1) \n",
+ " if(x1>0):#as only one root is positive\n",
+ " x=x1 \n",
+ " else: \n",
+ " x=x2 \n",
+ "C2H2O4=InitC2H2O4-x #equilibrium value\n",
+ "\n",
+ "#Result\n",
+ "print\"The concentration of the [H2C2O4] in the solution is :\",round(C2H2O4,3),\"M\"\n",
+ "\n",
+ "\n",
+ "#Second stage of ionisation\n",
+ "\n",
+ "#Variable declaration\n",
+ "InitC2HO4=x #concentration of C2HO4 from first stage of ionisation\n",
+ "Ka2=6.1*10**-5 #ionisation constant of C2HO4-, M\n",
+ "\n",
+ "#Calculation\n",
+ "#Let 'y' be the concentration of the [C2HO4-] dissociated to form [H+] and [C2HO4-] ions, M\n",
+ "y=Ka2 #from the definition of ionisation constant Ka2=[H+]*[C2O4-2]/[C2HO4-]=(0.054+y)*y/(0.054-y), which reduces to y, as y<<InitC2HO4 (approximation)\n",
+ "approx=y/InitC2HO4*100 #this is the percentage of approximation taken. if it is more than 5%, we will be having higher deviation from correct value\n",
+ "if(approx>5):\n",
+ " x1=(-Ka2+math.sqrt((Ka2**2)-(-4*1*Ka2*InitC2HO4)))/(2*1) \n",
+ " x2=(-Ka2-math.sqrt((Ka2**2)-(-4*1*Ka2*InitC2HO4)))/(2*1) \n",
+ " if(x1>0):#as only one root is positive\n",
+ " y=x1 \n",
+ " else: \n",
+ " y=x2 \n",
+ "C2HO4=InitC2HO4-y #from first and second stages of ionisation\n",
+ "H=x+y #from first and second stages of ionisation\n",
+ "C2O4=y #from the assumption\n",
+ "OH=Kw/H # From the formula (ionic product)Kw=[H+]*[OH-]\n",
+ "\n",
+ "#Result\n",
+ "print\"The concentration of the [HC2O4-] ion in the solution is :\",round(C2HO4,3),\"M\"\n",
+ "print\"The concentration of the [H+] ion in the solution is :\",round(H,3),\"M\" \n",
+ "print\"The concentration of the [C2O4^2-] ion in the solution is :\",C2O4,\"M\"\n",
+ "print\"The concentration of the [OH-] ion in the solution is :%.1e\"%OH,\"M\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The concentration of the [H2C2O4] in the solution is : 0.046 M\n",
+ "The concentration of the [HC2O4-] ion in the solution is : 0.054 M\n",
+ "The concentration of the [H+] ion in the solution is : 0.054 M\n",
+ "The concentration of the [C2O4^2-] ion in the solution is : 6.1e-05 M\n",
+ "The concentration of the [OH-] ion in the solution is :1.8e-13 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15.13,Page no:690"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "InitCH3COONa=0.15 #Initial concentration of CH3COONa solution, M\n",
+ "InitCH3COO=InitCH3COONa #concentration of [CH3COO-] ion after dissociation of CH3COONa solution, M\n",
+ "#Let 'x' be the equilibrium concentration of the [OH-] and [CH3COOH] ions after hydrolysis of [CH3COO-], M\n",
+ "Kb=5.6*10**-10 #equilibrium constant of hydrolysis, M\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "x=math.sqrt(Kb*InitCH3COO) #from the definition of ionisation constant Kb=[OH-]*[CH3COOH]/[CH3COO-]=x*x/(0.15-x), which reduces to x*x/0.15, as x<<0.15 (approximation)\n",
+ "approx=x/InitCH3COO*100 #this is the percentage of approximation taken. if it is more than 5%, we will be having higher deviation from correct value\n",
+ "if(approx>5):\n",
+ " x1=(-Kb+math.sqrt((Kb**2)-(-4*1*Kb*InitCH3COO)))/(2*1) \n",
+ " x2=(-Kb-math.sqrt((Kb**2)-(-4*1*Kb*InitCH3COO)))/(2*1) \n",
+ " if(x1>0):#as only one root is positive\n",
+ " x=x1 \n",
+ " else: \n",
+ " x=x2 \n",
+ "pOH=-math.log10(x) #since x is the conc. of [OH-] ions\n",
+ "pH=14-pOH \n",
+ "\n",
+ "#Result\n",
+ "print\"The pH of the salt solution is :\",round(pH,2)\n",
+ "percenthydrolysis=x/InitCH3COO*100 \n",
+ "print\"The percentage of hydrolysis of the salt solution is :\",round(percenthydrolysis,4),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pH of the salt solution is : 8.96\n",
+ "The percentage of hydrolysis of the salt solution is : 0.0061 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_16.ipynb b/Chemistry/Chapter_16.ipynb
new file mode 100755
index 00000000..96bc5bbb
--- /dev/null
+++ b/Chemistry/Chapter_16.ipynb
@@ -0,0 +1,584 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16:Acid-Base Equilibria and Solubility Equilibria"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.1,Page no:715"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "InitCH3COOH1=0.2 #Initial concentration of CH3COOH solution, M\n",
+ "#Let 'x' be the equilibrium concentration of the [H+] and [CH3COO-] ions after dissociation of [CH3COOH], M\n",
+ "Ka=1.8*10**-5 #equilibrium constant of acid, M\n",
+ "InitCH3COONa=0.3 #Initial concentration of CH3COONa solution and is equal to conc of Na+ and CH3COO- as it completely dissociates, M\n",
+ "InitCH3COOH2=0.2 #Initial concentration of CH3COOH solution, M\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "import math\n",
+ "x1=math.sqrt(Ka*InitCH3COOH1) #from the definition of ionisation constant Ka=[H+]*[CH3COO-]/[CH3COOH]=x*x/(0.2-x), which reduces to x*x/0.2, as x<<0.2 (approximation)\n",
+ "pH1=-math.log10(x1) #since x is the conc. of [H+] ions\n",
+ "\n",
+ "#(b)\n",
+ "#Let 'x' be the equilibrium concentration of the [H+] and hence conc of [CH3COO-] ions is '0.3 + x', M\n",
+ "x2=Ka*InitCH3COOH2/InitCH3COONa #from the definition of ionisation constant Ka=[H+]*[CH3COO-]/[CH3COOH]=x*(0.3+x)/(0.2-x), which reduces to x*0.3/0.2(approximation)\n",
+ "pH2=-math.log10(x2) #since x is the conc. of [H+] ions\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) the pH of CH3COOH solution is \",round(pH1,2)\n",
+ "print\"(b) the pH of CH3COOH and CH3COONa solution is :\",round(pH2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) the pH of CH3COOH solution is 2.72\n",
+ "(b) the pH of CH3COOH and CH3COONa solution is : 4.92\n"
+ ]
+ }
+ ],
+ "prompt_number": 92
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.3,Page no:719"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ka=1.8*10**-5 #ionisation constant of acid\n",
+ "InitCH3COONa=1 #Initial concentration of CH3COONa solution and is equal to conc of Na+ and CH3COO- as it completely dissociates, M\n",
+ "InitCH3COOH=1 #Initial concentration of CH3COOH solution, M\n",
+ "HCl=0.1 #moles of HCl added to 1L solution\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(a)\n",
+ "x=Ka*InitCH3COOH/InitCH3COONa #from the definition of ionisation constant Ka=[H+]*[CH3COO-]/[CH3COOH]=x*(1+x)/(1-x), which reduces to x(approximation)\n",
+ "pH=-math.log10(x) #since x is the conc. of [H+] ions\n",
+ "#(b)\n",
+ "CH3COO=InitCH3COONa-HCl #conc of CH3COO- ions, M\n",
+ "CH3COOH=InitCH3COOH+HCl #conc of CH3COOH, M\n",
+ "x2=Ka*CH3COOH/CH3COO #from the definition of ionisation constant Ka=[H+]*[CH3COO-]/[CH3COOH]=x*(0.9+x)/(1.1-x), which reduces to x*0.9/1.1(approximation)\n",
+ "pH2=-math.log10(x2) #since x is the conc. of [H+] ions\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) the pH of CH3COOH and CH3COONa solution is :\",round(pH,2)\n",
+ "print\"(b) the pH of solution after adding HCl is :\",round(pH2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) the pH of CH3COOH and CH3COONa solution is : 4.74\n",
+ "(b) the pH of solution after adding HCl is : 4.66\n"
+ ]
+ }
+ ],
+ "prompt_number": 93
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.5,Page no:728"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "InitCH3COOH=0.1 #Initial concentration of CH3COOH solution, M\n",
+ "VCH3COOH=25 #volumeof CH3COOH, mL\n",
+ "nCH3COOH=InitCH3COOH*VCH3COOH/1000 \n",
+ "Ka=1.8*10**-5 #equilibrium constant of acid, M\n",
+ "Kb=5.6*10**-10 #equilibrium constant of base, M\n",
+ "N=0.1 #Initial concentration of NaOH solution, M\n",
+ "V=10 #Initial volume of NaOH solution, mL\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "n=N*V/1000 #Initial moles of NaOH solution\n",
+ "import math\n",
+ "nCH3COOH_tit=nCH3COOH-n #moles of CH3COOH after titration\n",
+ "nCH3COO=n #moles of CH3COO after titration\n",
+ "H=nCH3COOH_tit*Ka/nCH3COO #conc of H+ ions, M\n",
+ "pH=-math.log10(H) #since H is the conc. of [H+] ions\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) the pH of the solution is :\",round(pH,2)\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#(b)\n",
+ "V2=25.0 #Initial volume of NaOH solution, mL\n",
+ "n2=N*V2/1000.0 #Initial moles of NaOH solution\n",
+ "nCH3COOH_tit2=nCH3COOH-n2 #moles of CH3COOH after titration\n",
+ "nCH3COO2=n2 #moles of CH3COO- ions after titration\n",
+ "V_total=V2+VCH3COOH #total volume after titration\n",
+ "CH3COO=nCH3COO2/V_total*1000 #conc of CH3COO- ions, M\n",
+ "x=math.sqrt(Kb*CH3COO) #from the definition of ionisation constant Kb=[OH-]*[CH3COOH]/[CH3COO-]=x*x/(0.05-x), which reduces to x*x/0.05, as x<<0.05 (approximation)\n",
+ "pOH=-math.log10(x) #since x is the conc. of [OH-] ions\n",
+ "pH2=14.0-pOH \n",
+ "\n",
+ "#Result\n",
+ "print\"(b) the pH of the solution is :\",round(pH2,2)\n",
+ "\n",
+ "#Calculation\n",
+ "#(c)\n",
+ "N=0.1 #Initial concentration of NaOH solution, M\n",
+ "V=35 #Initial volume of NaOH solution, mL\n",
+ "n=N*V/1000 #Initial moles of NaOH solution\n",
+ "n_tit=n-nCH3COOH #moles of NaOH after titration\n",
+ "nCH3COO=nCH3COOH #moles of CH3COO- ions after titration\n",
+ "V_total=V+VCH3COOH #total volume\n",
+ "OH=n_tit/V_total*1000 #conc of OH- ions, M\n",
+ "pOH=-math.log10(OH) #since OH is the conc. of [OH-] ions\n",
+ "pH=14-pOH \n",
+ "\n",
+ "#Result\n",
+ "print\"(c) the pH of the solution is :\",round(pH,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) the pH of the solution is : 4.57\n",
+ "(b) the pH of the solution is : 8.72\n",
+ "(c) the pH of the solution is : 12.22\n"
+ ]
+ }
+ ],
+ "prompt_number": 94
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.6,Page no:730"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "InitNH3=0.1 #Initial concentration of NH3 solution, M\n",
+ "VNH3=25 #volume of NH3, mL\n",
+ "nNH3=InitNH3*VNH3/1000 \n",
+ "Ka=5.6*10**-10 #equilibrium constant of acid, M\n",
+ "N=0.1 #Initial concentration, M\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "V=VNH3/InitNH3*N #Initial volume, mL\n",
+ "V_total=V+VNH3 #total volume of the mixture, mL\n",
+ "n_NH4Cl=nNH3 #moles of NH4Cl\n",
+ "NH4Cl=n_NH4Cl/V_total*1000 #conc of NH4+ ions formed, M\n",
+ "x=math.sqrt(Ka*NH4Cl) #from the definition of ionisation constant Ka=[H+]*[NH3]/[NH4+]=x*x/(NH4+-x), which reduces to x*x/NH4+, as x<<NH4+ (approximation)\n",
+ "pH=-math.log10(x) #since x is the conc. of [H+] ions\n",
+ "\n",
+ "#Result\n",
+ "print\"The pH of the solution at equivalent point is :\",round(pH,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pH of the solution at equivalent point is : 5.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.8,Page no:738"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "solubility=0.67 #solubility of CaSO4, g/L\n",
+ "\n",
+ "#Calculation\n",
+ "M=136.2 #mol mass of CaSO4, g\n",
+ "s=solubility/M #concentration, M\n",
+ "Ksp=s**2 #solubility product\n",
+ "\n",
+ "#Result\n",
+ "print\"The Ksp of CaSO4 is :%.1e\"%Ksp"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Ksp of CaSO4 is :2.4e-05\n"
+ ]
+ }
+ ],
+ "prompt_number": 96
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.9,Page no:739"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ksp=2.2*10**-20 #solubility product\n",
+ "M=97.57 #mol mass of Cu(OH)2, g\n",
+ "\n",
+ "#Calculation\n",
+ "s=(Ksp/4.0)**(1.0/3.0) #concentration, M\n",
+ "solubility=s*M #solubility of Cu(OH)2, g/L\n",
+ "\n",
+ "#Result\n",
+ "print\"The solubility of Cu(OH)2 is :%.2e\"%solubility,\"g/L\"\n",
+ "\n",
+ "#ALTERNATIVE METHOD:\n",
+ "\n",
+ "#Variable declaration\n",
+ "Kspt=2.2*10**-20 #Ksp value from table 16.2\n",
+ "M=97.75 #Molar mass of Cu(OH)2\n",
+ "\n",
+ "#Calculation\n",
+ "from scipy.optimize import fsolve\n",
+ "def f(s):\n",
+ " Cu2=s\n",
+ " OH_=2*s\n",
+ " return(Kspt-(Cu2*(OH_**2)))\n",
+ "s=fsolve(f,1)\n",
+ "solubility=round(s,8)*M\n",
+ "\n",
+ "#Result\n",
+ "print \"Alternative method: Solubility of Cu(OH)2=%.1e\"%solubility,\"g/L\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The solubility of Cu(OH)2 is :1.72e-05 g/L\n",
+ "Alternative method: Solubility of Cu(OH)2=1.8e-05"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " g/L\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.10,Page no:741"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ksp=1.1*10**-10 #solubility product of BaSO4\n",
+ "#for Ba2+ ion\n",
+ "N=0.004 #normality, M\n",
+ "V=200 #vol in mL\n",
+ "n=N*V/1000 #moles\n",
+ "#for K2SO4sol\n",
+ "N1=0.008 #normality, M\n",
+ "V1=600 #vol in mL\n",
+ "\n",
+ "#Calculation\n",
+ "n1=N1*V1/1000 #moles\n",
+ "Nnew=n*1000/(V+V1) #conc of Ba2+ ions in final sol\n",
+ "N1new=n1*1000/(V+V1) #conc of SO4 2- ions in final sol\n",
+ "Q=Nnew*N1new #as Q=[Ba2+][SO4 2-]\n",
+ "\n",
+ "#Result\n",
+ "print\"Q=\",Q\n",
+ "if(Q>Ksp): #determination of precipitation\n",
+ " print\"Q>Ksp, The solution is supersaturated and hence a precipitate will form\"\n",
+ "else: \n",
+ " print\"Q<Ksp, The solution is not supersaturated and hence a precipitate will not form\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q= 6e-06\n",
+ "Q>Ksp, The solution is supersaturated and hence a precipitate will form\n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.11,Page no:743"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Br=0.02 #conc of Ag+ ions, M\n",
+ "Ksp1=7.7*10**-13 #solubility product of AgBr\n",
+ "Ksp2=1.6*10**-10 #solubility product of AgCl\n",
+ "Cl=0.02 #conc of Cl- ions, M\n",
+ "\n",
+ "#Calculation\n",
+ "#for Br\n",
+ "Ag1=Ksp1/Br #conc of Ag+ ions at saturated state, M\n",
+ "#for Cl\n",
+ "Ag2=Ksp2/Cl #conc of Ag+ ions at saturated state, M\n",
+ "\n",
+ "#Result\n",
+ "print \"[Ag+]=\",Ag2,\"M\"\n",
+ "print\"To precipitate Br- without precipitating Cl- the concentration of Ag must be greater than %.1e\"%Ag1,\"M but less than\",Ag2,\"M\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[Ag+]= 8e-09 M\n",
+ "To precipitate Br- without precipitating Cl- the concentration of Ag must be greater than 3.9e-11 M but less than 8e-09 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 100
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.12,Page no: 745"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "N_AgNO3=6.5*10**-3 #normality of AgNO3, M\n",
+ "AgCl=143.4 #mol mass of AgCl, g\n",
+ "Ksp=1.6*10**-10 #solubility product of AgCl\n",
+ "\n",
+ "#Calculation\n",
+ "Ag=N_AgNO3 #conc of Ag+ ions as 's' is negligible, M\n",
+ "s=Ksp/Ag #as Ksp=[Ag+][Cl-], molar solubility of AgCl, M\n",
+ "solubility=s*AgCl #solubility of AgCl in AgBr solution, g/L\n",
+ "\n",
+ "#Result\n",
+ "print\"The solubility of AgCl in AgBr solution is :%.2e\"%solubility,\"g/L\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The solubility of AgCl in AgBr solution is :3.53e-06 g/L\n"
+ ]
+ }
+ ],
+ "prompt_number": 101
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.14,Page no:748"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "FeCl2=0.003 #normality of FeCl2, M\n",
+ "Fe=FeCl2 #as Fe2+ is strong electrolyte, conc of Fe2+=conc of FeCl2, M\n",
+ "Ksp=1.6*10**-14 #solubility product of FeCl2\n",
+ "Kb=1.8*10**-5 #ionisation constant of base\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "OH=math.sqrt(Ksp/Fe) #as Ksp=[Fe2+][OH-]**2, conc of OH- ions, M\n",
+ "x=(OH**2)/Kb+OH #as Kb=[NH4+][OH-]/[NH3]\n",
+ "\n",
+ "#Result\n",
+ "print\"To initiate precipitation the conc of NH3 must be slightly greater than :%.1e\"%x,\"M\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "To initiate precipitation the conc of NH3 must be slightly greater than :2.6e-06 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 102
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.15,Page no:750"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "CuSO4=0.2 #normality of CuSO4, M\n",
+ "NH3=1.2 #initial conc of NH3, M\n",
+ "VNH3=1 #volume of NH3, L\n",
+ "Kf=5*10**13 #formation constant\n",
+ "\n",
+ "#Calculation\n",
+ "CuNH34=CuSO4 #conc of Cu(NH3)4 2+, M\n",
+ "NH3=NH3-4*CuNH34 #conc of NH3 after formation of complex, as 4 moles of NH3 react to form 1 mole complex, M\n",
+ "x=CuNH34/(NH3**4*Kf) #as Kf=[Cu(SO4)3 2+]/[Cu2+][NH3]**4\n",
+ "\n",
+ "#Result\n",
+ "print\"The conc of Cu2+ ions in equilibrium is :%.1e\"%x,\"M\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The conc of Cu2+ ions in equilibrium is :1.6e-13 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 103
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16.16,Page no:751"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "InitNH3=1 #initial conc of NH3, M\n",
+ "Ksp=1.6*10**-10 #solubility product of AgCl\n",
+ "Kf=1.5*10**7 #formation constant of complex\n",
+ "\n",
+ "#Calculation\n",
+ "K=Ksp*Kf #overall equilibrium constant\n",
+ "import math\n",
+ "s=math.sqrt(K)/(1+2*InitNH3*math.sqrt(K)) #molar solubility of AgCl, M\n",
+ "\n",
+ "#Result\n",
+ "print\"Amount of AgCl which can be dissolved in 1 L of 1 M NH3 sol in equilibrium is :\",round(s,3),\"M\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amount of AgCl which can be dissolved in 1 L of 1 M NH3 sol in equilibrium is : 0.045 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_17.ipynb b/Chemistry/Chapter_17.ipynb
new file mode 100755
index 00000000..8debeae7
--- /dev/null
+++ b/Chemistry/Chapter_17.ipynb
@@ -0,0 +1,92 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17:Chemistry in the Atmosphere"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:17.1,Page no:774"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "E=498.7*10**3/(6.022*10**23) #energy in J/molecule\n",
+ "h=6.63*10**-34 #plancks constant, J s\n",
+ "\n",
+ "#Calculation\n",
+ "v=E/h #frequency of the photon, s**-1\n",
+ "lamda=3*10**8/v #wavelength in m, since v*lambda=speed of light in vacuum\n",
+ "\n",
+ "#Variable declaration\n",
+ "print\"The maximum wavelength of the photon which can dissociate an O2 molecule is :\",round(lamda*10**9),\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum wavelength of the photon which can dissociate an O2 molecule is : 240.0 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:17.3,Page no:792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rninitial=1 #initial mass of Rn, g\n",
+ "\n",
+ "#Calculation\n",
+ "Rnfinal=Rninitial*0.5**10 #final mass of Rn, g\n",
+ "\n",
+ "#Result\n",
+ "print\"The amount of Rn left after 10 half lives is :%.1e\"%Rnfinal,\"g\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amount of Rn left after 10 half lives is :9.8e-04 g\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_18.ipynb b/Chemistry/Chapter_18.ipynb
new file mode 100755
index 00000000..aabe2f15
--- /dev/null
+++ b/Chemistry/Chapter_18.ipynb
@@ -0,0 +1,284 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18:Entropy, Free Energy,and Equilibrium"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:18.2,Page no:809"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#(a)\n",
+ "SCaO=39.8 #standard entropy of CaO, J/K mol\n",
+ "SCO2=213.6 #standard entropy of CO2, J/K mol\n",
+ "SCaCO3=92.9 #standard entropy of CaCO3, J/K mol\n",
+ "#(b)\n",
+ "SNH3=193 #standard entropy of NH3, J/K mol\n",
+ "SN2=192 #standard entropy of N2, J/K mol\n",
+ "SH2=131 #standard entropy of H2, J/K mol\n",
+ "#(c)\n",
+ "SHCl=187 #standard entropy of HCl, J/K mol\n",
+ "SH2=131 #standard entropy of H2, J/K mol\n",
+ "SCl2=223 #standard entropy of Cl2, J/K mol\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "deltaSrxn1=SCaO+SCO2-SCaCO3 #standard entropy change of the reaction, J/K mol\n",
+ "#(b)\n",
+ "deltaSrxn2=2*SNH3-(SN2+3*SH2) #standard entropy change of the reaction, J/K mol\n",
+ "#(c)\n",
+ "deltaSrxn3=2*SHCl-SH2-SCl2 #standard entropy change of the reaction, J/K mol\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) the standard entropy of reaction is :\",deltaSrxn1,\"J/K mol\"\n",
+ "print\"(b) the standard entropy of reaction is :\",deltaSrxn2,\"J/K mol\"\n",
+ "print\"(c) the standard entropy of reaction is :\",deltaSrxn3,\"J/K mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) the standard entropy of reaction is : 160.5 J/K mol\n",
+ "(b) the standard entropy of reaction is : -199 J/K mol\n",
+ "(c) the standard entropy of reaction is : 20 J/K mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:18.4,Page no:817"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#(a)\n",
+ "GCO2=-394.4 #free energy of formation of CO2, kJ/mol\n",
+ "GH2O=-237.2 #free energy of formation of H2O, kJ/mol\n",
+ "GCH4=-50.8 #free energy of formation of CH4, kJ/mol\n",
+ "GO2=0 #free energy of formation of O2, kJ/mol\n",
+ "#(b)\n",
+ "GMg=0 #free energy of formation of Mg, kJ/mol\n",
+ "GMgO=-569.6 #free energy of formation of MgO, kJ/mol\n",
+ "GO2=0 #free energy of formation of O2, kJ/mol\n",
+ "\n",
+ "#Calculation\n",
+ "deltaGrxn1=(GCO2+GH2O*2)-(GCH4+2*GO2) #standard free energy change of the reaction, kJ/mol\n",
+ "deltaGrxn=(GO2+GMg*2)-(2*GMgO) #standard free energy change of the reaction, kJ/mol\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) The standard free energy change of reaction is :\",deltaGrxn1,\"kJ/mol\"\n",
+ "print\"(b) The standard free energy change of reaction is :\",round(deltaGrxn),\"kJ/mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The standard free energy change of reaction is : -818.0 kJ/mol\n",
+ "(b) The standard free energy change of reaction is : 1139.0 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:18.5,Page no:820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#for fusion\n",
+ "T1=5.5+273 #temperature of fusion, K\n",
+ "deltaH1=10.9*1000 #change in enthalpy, J/mol\n",
+ "#for vaporisation\n",
+ "T2=80.1+273 #temperature of vaporisation, K\n",
+ "deltaH2=31*1000 #change in enthalpy, J/mol\n",
+ "\n",
+ "#Calculation\n",
+ "deltaSf=deltaH1/T1 #since in fusion deltaG=0, J/ K mol\n",
+ "deltaSv=deltaH2/T2 #since in vaporisation deltaG=0, J/ K mol\n",
+ "\n",
+ "#Result\n",
+ "print\"The entropy change for fusion is\",round(deltaSf,1),\"J/K.mol\" \n",
+ "print\"The entropy change for condensation is : \",round(deltaSv,1),\"J/K mol\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The entropy change for fusion is 39.1 J/K.mol\n",
+ "The entropy change for condensation is : 87.8 J/K mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:18.6,Page no:823"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "T=298 #temperature, K\n",
+ "R=8.314 #gas constant, J/K mol\n",
+ "GH2=0 #free energy of formation of H2, kJ/mol\n",
+ "GH2O=-237.2 #free energy of formation of H2O, kJ/mol\n",
+ "GO2=0 #free energy of formation of O2, kJ/mol\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "deltaG=1000*(2*GH2+GO2-2*GH2O) #free energy of rxn, J/mol\n",
+ "Kp=math.exp(-deltaG/(R*T)) #equilibrium constant for rxn\n",
+ "\n",
+ "#Result\n",
+ "print\"deltaG_rxn=\",deltaG/1000,\"kJ/mol\"\n",
+ "print\"The equilibrium constant for the given reaction is :%.e\"%Kp"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "deltaG_rxn= 474.4 kJ/mol\n",
+ "The equilibrium constant for the given reaction is :7e-84\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:18.7,Page no:824"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "T=298 #temperature, K\n",
+ "R=8.314 #gas constant, J/K mol\n",
+ "Ksp=1.6*10**-10 #solubility constant\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "deltaG=-R*T*math.log(Ksp) #here solubility product is equal to equilibrium constant\n",
+ "\n",
+ "#Result\n",
+ "print\"The free energy for the given reaction is :\",round(deltaG*10**-3),\"kJ/mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The free energy for the given reaction is : 56.0 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:18.8,Page no:825"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "T=298 #temperature, K\n",
+ "R=8.314 #gas constant, J/K mol\n",
+ "deltaG0=5.4*10**3 #standard free energy, kJ/mol\n",
+ "pNO2=0.122 #pressure of NO2, atm\n",
+ "pN2O4=0.453 #pressure of N2O4, atm\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "deltaG=deltaG0+R*T*math.log(pNO2**2/pN2O4) #here solubility product is equal to equilibrium constant\n",
+ "\n",
+ "#Result\n",
+ "if(deltaG<0):#equilibrium determination\n",
+ " d=\"net reaction proceeds from left to right to reach equilibrium\" \n",
+ "else:\n",
+ " d=\"net reaction proceeds from right to left to reach equilibrium\" \n",
+ "print\"The free energy for the given reaction is :\",round(deltaG*10**-3,2),\"kJ/mol and\",d\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The free energy for the given reaction is : -3.06 kJ/mol and net reaction proceeds from left to right to reach equilibrium\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_19.ipynb b/Chemistry/Chapter_19.ipynb
new file mode 100755
index 00000000..c904a842
--- /dev/null
+++ b/Chemistry/Chapter_19.ipynb
@@ -0,0 +1,267 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 19:Electrochemistry"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:19.3,Page no:848"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "E0cathode=0.8 #standard electrode potential of cathode(Ag+/Ag), V\n",
+ "E0anode=-2.37 #standard electrode potential of anode(Mg2+/Mg), V\n",
+ "\n",
+ "#Calculation\n",
+ "E0cell=E0cathode-E0anode #standard emf of the cell, V\n",
+ "\n",
+ "#Result\n",
+ "print\"The standard emf of the cell is :\",E0cell,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The standard emf of the cell is : 3.17 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:19.4,Page no:850"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=2.0 \n",
+ "E0cathode=0.15 #standard electrode potential of cathode(Cu2+/Cu+), V\n",
+ "E0anode=-0.14 #standard electrode potential of anode(Sn2+/Sn), V\n",
+ "\n",
+ "#Calculation\n",
+ "E0cell=E0cathode-E0anode #standard emf of the cell, V\n",
+ "import math\n",
+ "K=math.exp(round(n*E0cell/0.0257,1)) #equilibrium constant, from the formula E0cell=0.0257*lnK/n\n",
+ "\n",
+ "#Result\n",
+ "print\"The equilibrium constant for the given reaction is :%.e\"%K "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.29\n",
+ "The equilibrium constant for the given reaction is :7e+09\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:19.5,Page no:851"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=6 \n",
+ "F=96500 #faraday constant, J/V mol\n",
+ "E0cathode=-2.87 #standard electrode potential of cathode(Ca2+/Ca), V\n",
+ "E0anode=1.5 #standard electrode potential of anode(Au3+/Au), V\n",
+ "\n",
+ "#Calculation\n",
+ "E0cell=E0cathode-E0anode #standard emf of the cell, V\n",
+ "deltaG0=-n*F*E0cell #standard free energy change for the reaction, kJ/mol\n",
+ "\n",
+ "#Result\n",
+ "print\"The standard free energy change for the reaction is :%.2e\"%(deltaG0/1000),\"kJ/mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The standard free energy change for the reaction is :2.53e+03 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:19.6,Page no:853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=2 \n",
+ "F=96500 #faraday constant, J/V mol\n",
+ "Co2=0.15 #conc of Co2+ ions, M\n",
+ "Fe2=0.68 #conc of Fe2+ ions, M\n",
+ "E0cathode=-0.44 #standard electrode potential of cathode(Fe2+/Fe), V\n",
+ "E0anode=-0.28 #standard electrode potential of anode(Co2+/Co), V\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "E0cell=E0cathode-E0anode #standard emf of the cell, V\n",
+ "Ecell=E0cell-0.0257/2*math.log(Co2/Fe2) #calculation of cell potential at non standard conditions, V\n",
+ "\n",
+ "#Result\n",
+ "print \"E=\",round(Ecell,2),\"V\"\n",
+ "if(Ecell>0):\n",
+ " print\"The reaction would proceed spontaneously in the direction written\"\n",
+ "else:\n",
+ " print\"The reaction is not spontaneously in the direction written\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "E= -0.14 V\n",
+ "The reaction is not spontaneously in the direction written\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:19.7,Page no:855"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=2 \n",
+ "Zn=1 #conc of Zn2+ ions, M\n",
+ "pH2=1 #pressure of H2 gas, atm\n",
+ "Ecell=0.54 #emf of the cell, V\n",
+ "E0cell=0.76 #standard emf of the cell, V\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "Q=math.exp(-(Ecell-E0cell)*2/0.0257) #since Ecell=E0cell-0.0257/2*log(Q) where Q=(Zn2+)*pH2/(H+)**2\n",
+ "H=math.sqrt(Zn*pH2/Q) #the conc of H+ ions, M\n",
+ "\n",
+ "#Result\n",
+ "print\"The molar concentration of H+ ion is :%.e\"%H,\"M\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molar concentration of H+ ion is :2e-04 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:19.9,Page no:870"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "t=7.44*3600 #time, sec\n",
+ "A=1.26 #current in ampere\n",
+ "F=96500.0 #faraday constant, J/V mol\n",
+ "R=0.0821 #gas constant, L atm/K\n",
+ "T=273.0 #temperature in Kelvin\n",
+ "P=1.0 #pressure in atm\n",
+ "\n",
+ "#Calculation\n",
+ "q=A*t #charge passed, coulomb\n",
+ "ne=q/F #moles of electrons\n",
+ "nO2=ne/4.0 #moles of oxygen\n",
+ "nH2=ne/2.0 #moles of H2\n",
+ "VO2=nO2*R*T/P #volume of oxygen gas generated\n",
+ "VH2=nH2*R*T/P #volume of H2 gas generated\n",
+ "\n",
+ "#Result\n",
+ "print\"The volume of O2 gas is:\",round(VO2,2),\"L\"\n",
+ "print\"Volume of H2 gas generated is:\",round(VH2,2),\"L\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of O2 gas is: 1.96 L\n",
+ "Volume of H2 gas generated is: 3.92 L\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_23.ipynb b/Chemistry/Chapter_23.ipynb
new file mode 100755
index 00000000..c36a0d3c
--- /dev/null
+++ b/Chemistry/Chapter_23.ipynb
@@ -0,0 +1,66 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 23:Nuclear Chemistry"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:23.2,Page no:994"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "NA=6.022*10**23 #avogadro number\n",
+ "c=3*10**8 #speed of light, m/s\n",
+ "p=1.007825 #mass of proton, amu\n",
+ "n=1.008665 #mass of neutron, amu\n",
+ "mI=126.9004 #atomic mass of I, amu\n",
+ "\n",
+ "#Calculation\n",
+ "pI=53*p+74*n #estimated mass of I, amu\n",
+ "deltam=mI-pI #mass defect, amu\n",
+ "deltaE=-deltam*c**2 #energy released, amu m**2/s**2\n",
+ "deltaE=deltaE/(NA*1000) #energy released in J\n",
+ "print\"Nuclear binding energy is %.2e\"%deltaE,\"J\"\n",
+ "deltaE=deltaE/127 #binding energy per nucleon, J\n",
+ "\n",
+ "#Result\n",
+ "print\"The nuclear binding energy per nucleon is :%.2e\"%deltaE,\"J/nucleon\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Nuclear binding energy is 1.73e-10 J\n",
+ "The nuclear binding energy per nucleon is :1.36e-12 J/nucleon\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_3.ipynb b/Chemistry/Chapter_3.ipynb
new file mode 100755
index 00000000..96753167
--- /dev/null
+++ b/Chemistry/Chapter_3.ipynb
@@ -0,0 +1,676 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3:Mass Relationships in Chemical Reactions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.1,Page no:81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Cu63=69.09 #percent of Cu 62.93 amu\n",
+ "Cu65=30.91 #percent of Cu 64.9278 amu\n",
+ "\n",
+ "#Calculation\n",
+ "AverageAMU=62.93*Cu63/100+64.9278*Cu65/100 # average amu\n",
+ "\n",
+ "#Result\n",
+ "print\"The average atomic mass of Copper is :\",round(AverageAMU,2),\"amu\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average atomic mass of Copper is : 63.55 amu\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.2,Page no:84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mass=6.46 #mass of He, g\n",
+ "\n",
+ "#Calculation\n",
+ "moles=mass/4.003 #no. of moles of He, as mol. mass of He is 4.003 amu\n",
+ "\n",
+ "#Result\n",
+ "print\"The no. of moles of He is :\",round(moles,2),\"mol He\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The no. of moles of He is : 1.61 mol He\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.3,Page no:84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "moles=0.356 #moles of Zn\n",
+ "\n",
+ "#Calculation\n",
+ "mass=moles*65.39 #mass of Zn, g, 1 mole=65.39 g\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of Zn is :\",round(mass,1),\"g Zn\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of Zn is : 23.3 g Zn\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.4,Page no:84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Na=6.022*10**23 # Avogadro number, atoms/mol\n",
+ "mass=16.3 #mass of sulfur, g\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "moles=mass/32.07 #moles of S\n",
+ "atoms=moles*Na #number of atoms of S\n",
+ "\n",
+ "#Result\n",
+ "print\"The no. of atoms of S is :%.2e\"%atoms,\"S atoms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The no. of atoms of S is :3.06e+23 S atoms\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.5,Page no:86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "MassO=16.0 #mass of O, amu\n",
+ "MassS=32.07 #mass of S, amu\n",
+ "MassN=14.01 #mass of N, amu\n",
+ "MassH=1.008 #mass of H, amu\n",
+ "MassC=12.01 #mass of C, amu\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "MassSO2=MassS+MassO*2 #mass of SO2, amu\n",
+ "#(b)\n",
+ "MassC8H10N4O2=8*MassC+10*MassH+4*MassN+2*MassO \n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The molecular mass of SO2 is :\",MassSO2,\"amu\\n\"\n",
+ "print\"(b).The molecular mass of C8H10N4O2 is :\",MassC8H10N4O2,\"amu\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The molecular mass of SO2 is : 64.07 amu\n",
+ "\n",
+ "(b).The molecular mass of C8H10N4O2 is : 194.2 amu\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.6,Page no:86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Mass=6.07 #mass of CH4, g\n",
+ "MassC=12.01 #mol. mass of C, amu\n",
+ "MassH=1.008 #mol. mass of H, amu\n",
+ "\n",
+ "#Calculation\n",
+ "MassCH4=MassC+4*MassH #mol. mass of CH4, amu\n",
+ "Moles=Mass/MassCH4 #no. of moles of CH4\n",
+ "\n",
+ "#Result\n",
+ "print\"The no. of moles of CH4 is :\",round(Moles,3),\"mol CH4\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The no. of moles of CH4 is : 0.378 mol CH4\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.7,Page no:87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Na=6.07*10**23 # Avogadro number, atoms/mol\n",
+ "Mass=25.6 #mass of Urea, g\n",
+ "MolMass=60.06 #mol. mass of Urea, g\n",
+ "\n",
+ "#Calculation\n",
+ "moles=Mass/MolMass #moles of Urea, mol\n",
+ "Atoms=moles*Na*4 #No. of atoms of Hydrogen\n",
+ "\n",
+ "#Result\n",
+ "print\"The no. of atoms of hydrogen are :%.2e\"%Atoms,\"H atoms\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The no. of atoms of hydrogen are :1.03e+24 H atoms\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.8,Page no:89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "H=1.008 #molar mass of H, g\n",
+ "P=30.97 #molar mass of P, g\n",
+ "O=16 #molar mass of O, g\n",
+ "MolMass=97.99 #mol. mass of H3PO4, g\n",
+ "\n",
+ "#Calculation\n",
+ "percentH=3*H/MolMass*100 #percent of H\n",
+ "percentP=P/MolMass*100 #percent of P\n",
+ "percentO=4*O/MolMass*100 #percent of O\n",
+ "\n",
+ "#Result\n",
+ "print\"The percent by mass of Hydrogen is :\",round(percentH,3),\"%\\n\"\n",
+ "print\"The percent by mass of Phosphorus is :\",round(percentP,2),\"%\\n\"\n",
+ "print\"The percent by mass of Oxygen is :\",round(percentO,2),\"%\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percent by mass of Hydrogen is : 3.086 %\n",
+ "\n",
+ "The percent by mass of Phosphorus is : 31.61 %\n",
+ "\n",
+ "The percent by mass of Oxygen is : 65.31 %\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.9,Page no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "H=1.008 #molar mass of H, g\n",
+ "C=12.01 #molar mass of C, g\n",
+ "O=16.0 #molar mass of O, g\n",
+ "percentC=40.92 #percent of C\n",
+ "\n",
+ "#Calculation\n",
+ "nC=percentC/C \n",
+ "percentH=4.58 #percent of H\n",
+ "nH=percentH/H \n",
+ "percentO=54.5 #percent of O\n",
+ "nO=percentO/O \n",
+ "if(nC>nH):# determining the smallest subscript\n",
+ " small=nH\n",
+ "else:\n",
+ " small=nC \n",
+ " if(small>nO):\n",
+ " small=nO \n",
+ "\n",
+ "nC=nC/small #dividing by the smallest subscript\n",
+ "nH=nH/small \n",
+ "nO=nO/small \n",
+ "#the approximate values of these variables are to be multiplied by appropriate number to make it an integer by trial and error method\n",
+ "#in this case we need to multiply with 3 to get integer values\n",
+ "nC=nC*3 \n",
+ "nH=nH*3 \n",
+ "nO=nO*3 \n",
+ "\n",
+ "#Result\n",
+ "print\"The empirical formula of ascorbic acid is : C%.f\"%nC,\"H%.f\"%nH,\"O%.f\"%nO"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The empirical formula of ascorbic acid is : C3 H4 O3\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.10,Page no:91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "massCuFeS2=3.71*10**3 #given mass of CuFeS2, kg\n",
+ "CuFeS2=183.5 #mol. mass of CuFeS2, g\n",
+ "Cu=63.55 #mol. mass of Cu, g\n",
+ "\n",
+ "#Calculation\n",
+ "percentCu=Cu/CuFeS2*100 #percent Cu in CuFeS2\n",
+ "massCu=percentCu*massCuFeS2/100#mass of Cu in given CuFeS2, kg\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of Cu in CuFeS2 is :%.2e\"%massCu,\"kg\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of Cu in CuFeS2 is :1.28e+03 kg\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.11,Page no:93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "M_N=1.52 #Mass of nitrogen in g\n",
+ "M_O=3.47 #Mass of oxygen in g\n",
+ "N=14.01 #Atomic mass of N\n",
+ "Molar1=95 #Molar mass in g \n",
+ "O=16 #Atomic mass of O\n",
+ "\n",
+ "#Calculation\n",
+ "n_N=M_N/N #No of moles of N\n",
+ "n_O=M_O/O #No of moles of O\n",
+ "emp=N+2*(O) #Empirical molar massof NO2\n",
+ "ratio=Molar1/emp\n",
+ "ratio=round(ratio)\n",
+ "actual=ratio*emp\n",
+ "\n",
+ "#Result\n",
+ "print\"Molecular formula is N%.3g\"%n_N,\"O%.3g\"%n_O\n",
+ "print \"Actual molar mass is\",actual,\"g,which is between 90 g and 95 g\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Molecular formula is N0.108 O0.217\n",
+ "Actual molar mass is 92.02 g,which is between 90 g and 95 g\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.13,Page no:101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "CO2=44.01 #mol. mass of CO2, g\n",
+ "Glucose=180.2 #mol. mass of Glucose, g\n",
+ "massGlucose=856 #given mass of Glucose, g\n",
+ "\n",
+ "#Calculation\n",
+ "moleGlucose=massGlucose/Glucose # moles of glucose\n",
+ "moleCO2=moleGlucose*6 #1 mole glucose gives 6 moles of CO2\n",
+ "massCO2=moleCO2*CO2 # mass of CO2, g\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of CO2 is :%.2e\"%massCO2,\"g CO2\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of CO2 is :1.25e+03 g CO2\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.14,Page no:102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "H2=2.016 #mol. mass of H2, g\n",
+ "Li=6.941 #mol. mass of Li, g\n",
+ "mH2=9.89 #mass of H2, g\n",
+ "\n",
+ "#Calculation\n",
+ "nH2=mH2/H2 #moles of H2\n",
+ "nLi=2*nH2 #moles of Li, 1mol H2 given by 2mol Li\n",
+ "mLi=Li*nLi ##mass of Li, g\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of Li is :\",round(mLi,1),\"g Li\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of Li is : 68.1 g Li\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.15,Page no:104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Urea=60.06 #mol. mass of Urea, g\n",
+ "NH3=17.03 #mol. mass of NH3, g\n",
+ "CO2=44.01 #mol. mass of CO2, g\n",
+ "\n",
+ "#(a)\n",
+ "#for NH3\n",
+ "mNH3=637.2 #mass of NH3, g\n",
+ "\n",
+ "#Calculation\n",
+ "nNH3=mNH3/NH3 #moles of NH3\n",
+ "nUrea1=nNH3/2#moles of Urea\n",
+ "#for CO2\n",
+ "mCO2=1142#mol. mass of CO2, g\n",
+ "nCO2=mCO2/CO2 #moles of CO2\n",
+ "nUrea2=nCO2 #moles of Urea\n",
+ "if(nUrea1>nUrea2): #finding limiting reagent\n",
+ " nUrea=nUrea2 \n",
+ " limiting=\"CO2\" \n",
+ "else:\n",
+ " limiting=\"NH3\" \n",
+ " nUrea=nUrea1 \n",
+ " \n",
+ "#Result\n",
+ "print\"(a).The limiting reagent is :\",limiting\n",
+ "#(b)\n",
+ "mUrea=nUrea*Urea #mass of urea produced\n",
+ "print\"(b).The mass of the Urea produced is :\",round(mUrea),\"g (NH2)2CO\"\n",
+ "\n",
+ "#(c)\n",
+ "if(limiting==\"NH3\") :#finding excess reagent\n",
+ " nCO2excess=nCO2-nNH3/2 \n",
+ " mCO2excess=nCO2excess*CO2 \n",
+ " print\"(c).The mass of excess CO2 is :\",round(mCO2excess),\"g \\n\"\n",
+ "else: \n",
+ " nNH3excess=nNH3-2*nCO2 \n",
+ " mNH3excess=nNH3excess*NH3 \n",
+ " print\"The mass of excess NH3 is :\",mNH3excess,\"g\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The limiting reagent is : NH3\n",
+ "(b).The mass of the Urea produced is : 1124.0 g (NH2)2CO\n",
+ "(c).The mass of excess CO2 is : 319.0 g \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3.16,Page no:106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#(a)\n",
+ "#for TiCl4\n",
+ "\n",
+ "#Variable declaration\n",
+ "mTiCl4=3.54*10**7 #mass of TiCl4, g\n",
+ "nTiCl4=mTiCl4/189.7 #moles of TiCl4\n",
+ "nTi1=nTiCl4*1.0 #moles of Ti\n",
+ "\n",
+ "#for Mg\n",
+ "mMg=1.13*10**7 #mass of Mg, g\n",
+ "nMg=mMg/24.31 #moles of Mg\n",
+ "nTi2=nMg/2.0 #moles of Ti\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "if(nTi1>nTi2): #finding imiting reagent\n",
+ " nTi=nTi2 \n",
+ "else:\n",
+ " nTi=nTi1 \n",
+ " mTi=nTi*47.88 \n",
+ " print\"(a).The theoretical yield is :%.2e\"%mTi,\"g\\n\"\n",
+ " print\"\\nNOTE:Variation from answer due to approx value of mTi taken in book\\n\"\n",
+ "\n",
+ "#(b)\n",
+ "\n",
+ "mTiactual=7.91*10**6 #given, actual Ti produced\n",
+ "p_yield=mTiactual/mTi*100.0 \n",
+ "print\"(b).The percent yield is :\",round(p_yield,1),\"%\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The theoretical yield is :8.93e+06 g\n",
+ "\n",
+ "\n",
+ "NOTE:Variation from answer due to approx value of mTi taken in book\n",
+ "\n",
+ "(b).The percent yield is : 88.5 %\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_4.ipynb b/Chemistry/Chapter_4.ipynb
new file mode 100755
index 00000000..13f747e8
--- /dev/null
+++ b/Chemistry/Chapter_4.ipynb
@@ -0,0 +1,290 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4:Reactions in Aqueous Solutions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.6,Page no:148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "K2Cr2O7=294.2 #mol mass of K2Cr2O7, g\n",
+ "M=2.16 #Concentration of K2Cr2O7, M\n",
+ "V=0.250 #volume of K2Cr2O7, L\n",
+ "\n",
+ "#Calculation\n",
+ "moles=M*V #moles of K2Cr2O7\n",
+ "mass=moles*K2Cr2O7 \n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of the K2Cr2O7 needed is :\",round(mass),\"g K2Cr2O7\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of the K2Cr2O7 needed is : 159.0 g K2Cr2O7\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.7,Page no:149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mGlucose=3.81 #mass of Glucose, g\n",
+ "Glucose=180.2 #mol mass of Glucose, g\n",
+ "M=2.53 #Concentration of Glucose, M\n",
+ "\n",
+ "#Calculation\n",
+ "moles=mGlucose/Glucose #moles of Glucose\n",
+ "V=moles/M #volume of Glucose, L\n",
+ "\n",
+ "#Result\n",
+ "print\"The volume of the Glucose needed is :\",round(V*1000,2),\"mL soln\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of the Glucose needed is : 8.36 mL soln\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.8,Page no:150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "M2=1.75 #final Concentration of H2SO4, M\n",
+ "V2=500 #final volume of H2SO4, mL\n",
+ "M1=8.61 #initial Concentration of H2SO4, M\n",
+ "\n",
+ "#Calculation\n",
+ "V1=M2*V2/M1 #initail volume of H2SO4, mL\n",
+ "\n",
+ "#Result\n",
+ "print\"The volume of the H2SO4 needed to dilute the solution is :\",round(V1),\"mL\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of the H2SO4 needed to dilute the solution is : 102.0 mL\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.9,Page no:152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mSample=0.5662 #mass of sample, g\n",
+ "Cl=35.5 #mol mass of Cl, g\n",
+ "AgCl=143.4 #mol mass of AgCl, g\n",
+ "mAgCl=1.0882 #mass of AgCl formed, g\n",
+ "\n",
+ "#Calculation\n",
+ "p_Cl_AgCl=Cl/AgCl*100.0 #percent Cl in AgCl\n",
+ "mCl=p_Cl_AgCl*mAgCl/100.0 #mass of Cl in AgCl, g\n",
+ "mCl=round(mCl,3)\n",
+ "#the same amount of Cl is present in initial sample\n",
+ "p_Cl=mCl/mSample*100.0 #percent Cl in initial sample\n",
+ "\n",
+ "#Result\n",
+ "print\"The percentage of Cl in sample is :\",round(p_Cl,2),\"%\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The percentage of Cl in sample is : 47.51 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.10,Page no:154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mKHP=0.5468 #mass of KHP, g\n",
+ "KHP=204.2 #mol mass of KHP, g\n",
+ "\n",
+ "#Calculation\n",
+ "nKHP=mKHP/KHP #moles of KHP\n",
+ "VNaOH=23.48 #volume of NaOH, mL\n",
+ "MNaOH=nKHP/VNaOH*1000 #molarity of NaOH sol, M\n",
+ "\n",
+ "#Result\n",
+ "print\"The molarity of NaOH solution is :\",round(MNaOH,4),\"M\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molarity of NaOH solution is : 0.114 M\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.11,Page no:155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "MNaOH=0.610 #molarity of NaOH, M\n",
+ "VH2SO4=20 #volume of H2SO4, mL\n",
+ "MH2SO4=0.245 #molarity of H2SO4, M\n",
+ "\n",
+ "#Calculation\n",
+ "nH2SO4=MH2SO4*VH2SO4/1000 #moles of H2SO4\n",
+ "VNaOH=2*nH2SO4/MNaOH #Volume of NaOH, L\n",
+ "\n",
+ "#Result\n",
+ "print\"The volume of NaOH solution is :\",round(VNaOH*1000,1),\"mL\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of NaOH solution is : 16.1 mL\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4.12,Page no:157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "MKMnO4=0.1327 #molarity of KMnO4, M\n",
+ "VKMnO4=16.42 #volume of KMnO4, mL\n",
+ "\n",
+ "#Calculation\n",
+ "nKMnO4=MKMnO4*VKMnO4/1000 \n",
+ "nFeSO4=5*nKMnO4 \n",
+ "VFeSO4=25 #volume of FeSO4, mL\n",
+ "MFeSO4=nFeSO4/VFeSO4*1000 \n",
+ "\n",
+ "#Result\n",
+ "print\"The molarity of FeSO4 solution is :\",round(MFeSO4,3),\"M\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molarity of FeSO4 solution is : 0.436 M\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_5.ipynb b/Chemistry/Chapter_5.ipynb
new file mode 100755
index 00000000..9649fe13
--- /dev/null
+++ b/Chemistry/Chapter_5.ipynb
@@ -0,0 +1,768 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:Gases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.1,Page no:177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Pbaro=688 #pressure in mm Hg\n",
+ "\n",
+ "#Calculation\n",
+ "Patm=Pbaro/760.0 #pressure in atm\n",
+ "\n",
+ "#Result\n",
+ "print\"The presuure in atmospheres is :\",round(Patm,3),\"atm\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The presuure in atmospheres is : 0.905 atm\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.2,Page no:178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Pbaro=732 #pressure in mm Hg\n",
+ "\n",
+ "#Calculation\n",
+ "Patm=Pbaro/760.0 #pressure in atm\n",
+ "P=Patm*1.01325*10**2 #pressure in kilo Pascal\n",
+ "\n",
+ "#Result\n",
+ "print\"The presuure in kilo pascals is :\",round(P,1),\"kPa\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The presuure in kilo pascals is : 97.6 kPa\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.3,Page no:186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V=5.43 #volume, L\n",
+ "t=69.5 #temperature, C\n",
+ "\n",
+ "#Calculation\n",
+ "T=t+273 #temperature, K\n",
+ "n=1.82 #moles\n",
+ "R=0.0821 #universal gas constant, L.atm/(K.mol)\n",
+ "P=n*R*T/V #pressure, atm\n",
+ "\n",
+ "#Result\n",
+ "print\"The presuure in atmospheres is :\",round(P,2),\"atm\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The presuure in atmospheres is : 9.42 atm\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.4,Page no:187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m=7.4 #mass of NH3, g\n",
+ "#at STP for NH3 for 1mole of NH3\n",
+ "V1=22.41 # volume, L\n",
+ "NH3=17.03 #molar mass of NH3, g\n",
+ "\n",
+ "#Calculation\n",
+ "n=m/NH3 #moles of NH3\n",
+ "V=n*V1 #volume, L\n",
+ "\n",
+ "#Result\n",
+ "print\"The volume of NH3 under given conditions is :\",round(V,2),\"L\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of NH3 under given conditions is : 9.74 L\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.5,Page no:188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V1=0.55 #volume, L\n",
+ "P1=1 #pressure at sea level, atm\n",
+ "P2=0.4 #pressurea at 6.5km height, atm\n",
+ "\n",
+ "#n1=n2 and T1=T2 given hence P1V1=P2V2\n",
+ "#Calculation\n",
+ "V2=P1*V1/P2 \n",
+ "\n",
+ "#Result\n",
+ "print\"The volume of He balloon at height 6.5km above sea level is :\",round(V2,1),\"L\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of He balloon at height 6.5km above sea level is : 1.4 L\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.6,Page no:189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "P1=1.2 # pressure initial, atm\n",
+ "T1=18+273 #temperature initial, K\n",
+ "T2=85+273 #temperature final, K\n",
+ "#volume is constant\n",
+ "\n",
+ "#Calculation\n",
+ "P2=P1*T2/T1 # pressure final,atm\n",
+ "\n",
+ "#Result\n",
+ "print\"The final pressure is :\",round(P2,2),\"atm\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final pressure is : 1.48 atm\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.7,Page no:189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "P1=6.4 # pressure initial, atm\n",
+ "P2=1.0 # pressure final, atm\n",
+ "T1=8+273 #temperature initial, K\n",
+ "T2=25+273 #temperature final, K\n",
+ "V1=2.1 #volume initial, mL\n",
+ "\n",
+ "#Calculation\n",
+ "V2=P1*V1*T2/(T1*P2) # volume final, mL\n",
+ "\n",
+ "#Result\n",
+ "print\"The final volume is :\",round(V2),\"mL\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final volume is : 14.0 mL\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.8,Page no:191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "\n",
+ "#taking 1 mole of CO2\n",
+ "n=1 \n",
+ "R=0.0821 #universal gas constant, L. atm/K.mol\n",
+ "t=55 #temperature, C\n",
+ "T=t+273 #temperature, K\n",
+ "P=0.99 #.pressure, atm\n",
+ "M=44.01 #molar mass of CO2, g\n",
+ "\n",
+ "#Calculation\n",
+ "d1=P*M/(R*T) #density of CO2, g/L\n",
+ "#altenate method\n",
+ "#taking 1 mole of CO2\n",
+ "mass=M #mass of CO2 in g =mol mass since we are considering 1 mole of CO2\n",
+ "V=n*R*T/P #volume, L\n",
+ "d2=mass/V #density=mass/volume, g/L\n",
+ "\n",
+ "#Result\n",
+ "print\"The density of CO2 is :\",round(d1,2),\"g/L\\n\"\n",
+ "print\"(Alternate Method)the density of CO2 is :\",round(d2,2),\"g/L\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of CO2 is : 1.62 g/L\n",
+ "\n",
+ "(Alternate Method)the density of CO2 is : 1.62 g/L\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.9,Page no:192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "d=7.71 # density, g/mL(given)\n",
+ "R=0.0821 #universal gas constant, L. atm/K.mol\n",
+ "T=36+273 # temp, K\n",
+ "P=2.88 #pressure, atm\n",
+ "\n",
+ "#Calculation\n",
+ "M1=d*R*T/P # mol. mass, g/mol\n",
+ "#alternate method\n",
+ "#considering 1 L of compound\n",
+ "V=1 #volume, L\n",
+ "n=P*V/(R*T) #no of moles\n",
+ "m=7.71 #mass per 1 L, g\n",
+ "M2=m/n # mol. mass, g/mol\n",
+ "\n",
+ "#Result\n",
+ "print\"The molecular mass of given compound is :\",round(M1,1),\"g/mol\\n\"\n",
+ "print\"{alternate method} the molecular mass of given compound is :\",round(M2,1),\" g/mol\\n\" \n",
+ "print\"The molecular formula can be only found by trial and error method as given in the book \\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molecular mass of given compound is : 67.9 g/mol\n",
+ "\n",
+ "{alternate method} the molecular mass of given compound is : 67.9 g/mol\n",
+ "\n",
+ "The molecular formula can be only found by trial and error method as given in the book \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.10,Page no:193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "percentSi=33 #percent of Si in compound\n",
+ "percentF=67 #percent of F in compound\n",
+ "P=1.7 #pressure, atm\n",
+ "T=35+273 #temp. in K\n",
+ "m=2.38 #mass, g\n",
+ "V=0.21 #volume, L\n",
+ "R=0.0821 #universal Gas constant, L.atm/K.mol\n",
+ "m_sif3=85.09\n",
+ "\n",
+ "#Calculation\n",
+ "nSi=percentSi/28.01 #moles of Si in 100g compound\n",
+ "nF=percentF/19 #moles of F in 100g compound\n",
+ "n=P*V/(R*T) #moles\n",
+ "M=m/n #mol. mass=mass/moles, g/mol\n",
+ "e=M/m_sif3\n",
+ "\n",
+ "#Result\n",
+ "print\"The molecular mass of given compound is :\",round(M),\"g/mol\\n\"\n",
+ "print\"Therefore,molecular formula is (SiF3)%.f\"%round(e),\"OR Si2F6\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molecular mass of given compound is : 169.0 g/mol\n",
+ "\n",
+ "Therefore,molecular formula is (SiF3)2 OR Si2F6\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.11,Page no:194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "VC2H2=7.64 #volume of acetylene, L\n",
+ "\n",
+ "#Calculation\n",
+ "VO2=VC2H2*5/2.0 #volume of O2 required for complete combustion as 5mol O2 react with 2mol acetylene for complete combustion\n",
+ "\n",
+ "#Result\n",
+ "print\"The volume of O2 required for complete combustion of acetylene is :\",VO2,\"L\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of O2 required for complete combustion of acetylene is : 19.1 L\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.12,Page no:195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=0.0821 #universal Gas constant, L.atm/K.mol\n",
+ "T=80+273 #temp in K\n",
+ "P=823/760.0 #pressure in atm\n",
+ "m=60.0 #mass of NaN3, g\n",
+ "NaN3=65.02 #mol. mass of NaN3, g\n",
+ "\n",
+ "#Calculation\n",
+ "nN2=m*3.0/(2.0*NaN3) #moles of N2\n",
+ "nN2=round(nN2,2)\n",
+ "VN2=nN2*R*T/P #from ideal gas law\n",
+ "#Result\n",
+ "print\"\\t the volume of N2 generated is :\",round(VN2,1),\"L\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t the volume of N2 generated is : 36.9 L\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.13,Page no:196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=0.0821 #universal Gas constant, L.atm/K.mol\n",
+ "T=312 #temp in K\n",
+ "V=2.4*10**5 #volume, L\n",
+ "P1=7.9*10**-3 #pressure initial in atm\n",
+ "P2=1.2*10**-4 #pressure final in atm\n",
+ "\n",
+ "#Calculation\n",
+ "Pdrop=P1-P2 #pressure drop, atm\n",
+ "n=Pdrop*V/(R*T) #moles of Co2 reacted\n",
+ "Li2CO3=73.89 #mol. mass of Li2CO3, g\n",
+ "mLi2CO3=n*Li2CO3 #mass of Li2CO3, g\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of Li2CO3 formed is :%.1e\"%mLi2CO3,\"g Li2CO3\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of Li2CO3 formed is :5.4e+03 g Li2CO3\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.14,Page no:199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "nNe=4.46 #moles of Ne\n",
+ "nXe=2.15 #moles of Xe\n",
+ "nAr=0.74 #moles of Ar\n",
+ "PT=2 #total pressure in atm\n",
+ "\n",
+ "#Calculation\n",
+ "XNe=nNe/(nNe+nAr+nXe) #mole fraction of Ne\n",
+ "XAr=nAr/(nNe+nAr+nXe) #mole fraction of Ar\n",
+ "XXe=nXe/(nNe+nAr+nXe) #mole fraction of Xe\n",
+ "PNe=XNe*PT #partial pressure of Ne\n",
+ "PAr=XAr*PT #partial pressure of Ar\n",
+ "PXe=XXe*PT #partial pressure of Xe\n",
+ "\n",
+ "#Result\n",
+ "print\"The partial pressures of Ne, Ar and Xe are:\"\n",
+ "print\"PNe=\",round(PNe,2),\"atm\\n\",\"PAr=\",round(PAr,2),\"atm\\nPXe=\",round(PXe,3),\"atm \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The partial pressures of Ne, Ar and Xe are:\n",
+ "PNe= 1.21 atm\n",
+ "PAr= 0.2 atm\n",
+ "PXe= 0.585 atm \n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.15,Page no:200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "PT=762 #pressure total, mmHg\n",
+ "PH2O=22.4 #pressure of water vapor, mmHg\n",
+ "PO2=PT-PH2O #pressure of O2, frm Dalton's law, mmHg\n",
+ "M=32 #mol mass of O2, g\n",
+ "R=0.0821 #universal Gas constant, L.atm/K.mol\n",
+ "T=24+273 #temp in K\n",
+ "V=0.128 #volume in L\n",
+ "\n",
+ "#Calculation\n",
+ "m=(PO2/760)*V*M/(R*T) #mass of mass of O2 collected, g\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass of O2 collected is :\",round(m,3),\"g\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of O2 collected is : 0.163 g\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.16,Page no:207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=8.314 #universal Gas constant, J/K mol\n",
+ "T=25+273 #temp in K\n",
+ "import math\n",
+ "#Calculation\n",
+ "#for O2\n",
+ "M=4.003*10**-3 #mol mass in kg\n",
+ "Urms=math.sqrt(3*R*T/M) #rms velocity, m/s\n",
+ "print\"\\t the rms velocity of O2 collected is :%.2e\"%Urms,\"m/s\\n\"\n",
+ "#for N2\n",
+ "M=28.02*10**-3 #mol mass in kg\n",
+ "Urms=math.sqrt(3*R*T/M) #rms velocity, m/s\n",
+ "\n",
+ "#Result\n",
+ "print\"\\t the rms velocity of N2 collected is :\",round(Urms),\" m/s\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t the rms velocity of O2 collected is :1.36e+03 m/s\n",
+ "\n",
+ "\t the rms velocity of N2 collected is : 515.0 m/s\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.17,Page no:209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "t2=1.5 #diffusion time of compound, min\n",
+ "t1=4.73 #diffusion time of Br, min\n",
+ "M2=159.8 #mol mass of Br gas, g\n",
+ "\n",
+ "#Calculation\n",
+ "M=(t2/t1)**2*M2 #molar gas of unknown gas, g(from Graham's Law of Diffusion)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\t the molar mass of unknown gas is :\",round(M,1),\"g/mol\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t the molar mass of unknown gas is : 16.1 g/mol\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 76
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5.18,Page no:213"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#(a)\n",
+ "V=5.2 #volume, L\n",
+ "T=47+273 \n",
+ "n=3.5 \n",
+ "R=0.0821 #universal Gas constant, L.atm/K.mol\n",
+ "\n",
+ "#Calculation\n",
+ "P=n*R*T/V \n",
+ "print\"The pressure of NH3 gas from ideal gas equation is :\",round(P,1),\"atm\\n\"\n",
+ "#(b)\n",
+ "a=4.17 #constant, atm.L2/mol2\n",
+ "b=0.0371 #constant, L/mol\n",
+ "Pc=a*n**2/V**2 #pressure correction term, atm\n",
+ "Vc=n*b #volume correction term, L\n",
+ "P=n*R*T/(V-Vc)-Pc #from van der waals equation, pressure, atm\n",
+ "\n",
+ "#Result\n",
+ "print\"The pressure of NH3 gas from van der waals equation is :\",round(P,1),\"atm\\n\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure of NH3 gas from ideal gas equation is : 17.7 atm\n",
+ "\n",
+ "The pressure of NH3 gas from van der waals equation is : 16.2 atm\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 80
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_6.ipynb b/Chemistry/Chapter_6.ipynb
new file mode 100755
index 00000000..c09bdeb7
--- /dev/null
+++ b/Chemistry/Chapter_6.ipynb
@@ -0,0 +1,422 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6:Thermochemistry"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.1,Page no:237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "P1=0 #external pressure, atm\n",
+ "Vf1=6 #final volume, L\n",
+ "Vi1=2 #initial volume, L\n",
+ "P2=1.2 #external pressure, atm\n",
+ "Vf2=6 #final volume, L\n",
+ "Vi2=2 #initial volume, L\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "W1=-P1*(Vf1-Vi1) #work in atm.L\n",
+ "#(b)\n",
+ "W2=-P2*(Vf2-Vi2) #work in atm.L\n",
+ "W2=W2*101.3 #work in J\n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The work done in expansion against vacuum is :\",W1,\"J\\n\"\n",
+ "print\"(b).The work done in expansion against 1.2 atm pressure is :%.1e\"%W2,\"J\\n\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The work done in expansion against vacuum is : 0 J\n",
+ "\n",
+ "(b).The work done in expansion against 1.2 atm pressure is :-4.9e+02 J\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.2,Page no:238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "q=-128 #heat transfer from the gas, J\n",
+ "w=462 #work done in compressing the gas, J\n",
+ "\n",
+ "#Calculation\n",
+ "deltaE=q+w #change in energy of the gas, J\n",
+ "\n",
+ "#Result\n",
+ "print\"The change in energy for the process is :\",deltaE,\"J\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in energy for the process is : 334 J\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.3,Page no:243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mSO2=87.9 #mass in g\n",
+ "SO2=64.07 #molar mass in g\n",
+ "\n",
+ "#Calculation\n",
+ "nSO2=mSO2/SO2 #moles of SO2\n",
+ "deltaH=-198.2 #heat produced for 2 mol, in kJ/mol\n",
+ "deltaH=deltaH/2 #for one mole SO2,in kJ/mol\n",
+ "Hprod=deltaH*nSO2 #heat produced in this case, in kJ/mol\n",
+ "\n",
+ "#Result\n",
+ "print\"The heat produced in a reaction is :\",round(Hprod),\"kJ\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat produced in a reaction is : -136.0 kJ\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.4,Page no:245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=8.314 #gas constant, J/K. mol\n",
+ "T=298 #temp in K\n",
+ "deltaH=-566 #enthalpy change, kJ/mol\n",
+ "deltan=2-3 #change in gas moles\n",
+ "\n",
+ "#Calculation\n",
+ "deltaE=deltaH-R*T*deltan/1000.0 #change in internal energy, kJ/mol\n",
+ "\n",
+ "#Result\n",
+ "print\"The change in internal energy in the reaction is :\",round(deltaE,1),\"kJ/mol\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in internal energy in the reaction is : -563.5 kJ/mol\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.5,Page no:246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m=466 #mass in g\n",
+ "s=4.184 #specific heat in J/g C\n",
+ "\n",
+ "#Calculation\n",
+ "deltaT=74.6-8.5 #change in temp, C/K\n",
+ "q=m*s*deltaT/1000 #amount of heat absorbed, kJ\n",
+ "\n",
+ "#Result\n",
+ "print\"\\t the amount of heat absorbed is :\",round(q),\"kJ\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\t the amount of heat absorbed is : 129.0 kJ\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.6,Page no:248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ccal=10.17 #heat capacity, kJ/C\n",
+ "deltaT=25.95-20.28 #change in temp, C\n",
+ "m=1.435 #mass of naphthalene, g\n",
+ "molm=128.2 #mol mass of naphthalene, g\n",
+ "\n",
+ "#Calculation\n",
+ "qcal=Ccal*deltaT \n",
+ "q=-qcal*molm/m #molar heat of combustion of naphthalene, kJ\n",
+ "\n",
+ "#Result\n",
+ "print\"The molar heat of combustion of naphthalene is :%.3g\"%q,\"kJ/mol\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molar heat of combustion of naphthalene is :-5.15e+03 kJ/mol\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.7,Page no:249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#for water\n",
+ "m=100 #mass, g\n",
+ "s=4.184 #specific heat, J/g C\n",
+ "deltaT=23.17-22.5 #change in temp., C\n",
+ "qH2O=m*s*deltaT #heat gained by water, J\n",
+ "\n",
+ "#for lead\n",
+ "qPb=-qH2O #heat lost by lead, J\n",
+ "m=26.47 #mass, g\n",
+ "\n",
+ "#Calculation\n",
+ "deltaT=23.17-89.98 #change in temp., C\n",
+ "s=qPb/(m*deltaT) #specific heat, J/g C\n",
+ "\n",
+ "#Result\n",
+ "print\"The specific heat of lead is :\",round(s,3),\"J/g C\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The specific heat of lead is : 0.159 J/g C\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.8,Page no:249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#for water\n",
+ "m=100+100 #mass, g\n",
+ "s=4.184 #specific heat, J/g C\n",
+ "deltaT=25.86-22.5 #change in temp., C\n",
+ "\n",
+ "#Calculation\n",
+ "qsoln=m*s*deltaT/1000 #heat gained by water, kJ\n",
+ "qrxn=-qsoln \n",
+ "Hneut=qrxn/(0.5*0.1) \n",
+ "\n",
+ "#Result\n",
+ "print\"The heat of neutralization is :\",round(Hneut,1),\"kJ/mol\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat of neutralization is : -56.2 kJ/mol\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.9,Page no:256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "deltaH1=-393.5 #kJ/mol\n",
+ "deltaH2=-285.8 #kJ/mol\n",
+ "deltaH3=-2598.8 #kJ/mol\n",
+ "\n",
+ "#Calculation\n",
+ "deltaH4=2*(deltaH1)\n",
+ "deltaH5=(-1.0/2.0)*deltaH3\n",
+ "std_H=deltaH4+deltaH2+deltaH5\n",
+ "#Result\n",
+ "print\"Standard enthalpy of formation of acetylene is:\",std_H,\"kJ/mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1299.4\n",
+ "Standard enthalpy of formation of acetylene is: 226.6 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6.10,Page no:258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "deltaH_Fel=12.4 #Heat of frmtn of Fe(l) in kJ/mol\n",
+ "deltaH_Al2O3=-1669.8 #Heat of formation of Al2O3 in kJ/mol\n",
+ "deltaH_Al=0 #Heat of formation of Al\n",
+ "deltaH_Fe2O3=-822.2 #Heat of formtion of Fe2O3 kJ/mol\n",
+ "M_Al=26.98 #Molar mass of Al\n",
+ "\n",
+ "#Calculation\n",
+ "deltaH_rxn=(deltaH_Al2O3+2*deltaH_Fel)-(2*deltaH_Al+deltaH_Fe2O3)\n",
+ "ratio=deltaH_rxn/2.0\n",
+ "heat_released=ratio/M_Al\n",
+ "\n",
+ "#Result\n",
+ "print\"Heat released per gram of Al is\",round(heat_released,2),\"kJ/g\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat released per gram of Al is -15.25 kJ/g\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_7.ipynb b/Chemistry/Chapter_7.ipynb
new file mode 100755
index 00000000..ebd9568b
--- /dev/null
+++ b/Chemistry/Chapter_7.ipynb
@@ -0,0 +1,312 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7:Quantum theorem and electronic structure of Atoms"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7.1,Page no:27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "lamda=522*10**-9 #wavelength, m\n",
+ "c=3*10**8 #speed of light in vacuum, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "v=c/lamda #frequency, Hz\n",
+ "\n",
+ "#Result\n",
+ "print\"The frequency of the wave is :%.2e\"%v,\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency of the wave is :5.75e+14 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7.2,Page no:280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "c=3*10**8 #speed of light in vacuum, m/s\n",
+ "h=6.63*10**-34 #planck's constant, J s\n",
+ "lamda1=5*10**-5 #wavelength, m\n",
+ "lamda2=5*10**-11 #wavelength, m\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)\n",
+ "E1=h*c/lamda1 #energy, J\n",
+ "#(b)\n",
+ "E2=h*c/lamda2 #energy, J\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) the energy of the photon is :%.2e\"%E1,\"J\"\n",
+ "print\"(b) the energy of the photon is :%.2e\"%E2,\"J\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) the energy of the photon is :3.98e-21 J\n",
+ "(b) the energy of the photon is :3.98e-15 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7.3,Page no:281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "W=3.42*10**-19 #Work function of cesium in J\n",
+ "h=6.63*10**-34 #planck's constant in J.s\n",
+ "v2=10**15 #Freq for irridation in s-1\n",
+ "\n",
+ "#Calculation\n",
+ "#part a\n",
+ "KE=0\n",
+ "#hv=KE+w\n",
+ "v=W/h\n",
+ "#part b\n",
+ "KE=h*v2-W\n",
+ "\n",
+ "#Result\n",
+ "print\"(a)Minimum frequency of light is %.2e\"%v,\"s**-1\"\n",
+ "print\"(b).Kinetic energy of ejected electron is\",KE,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Minimum frequency of light is 5.16e+14 s**-1\n",
+ "(b).Kinetic energy of ejected electron is 3.21e-19 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7.4,Page no:287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "c=3*10**8 #speed of light in vacuum, m/s\n",
+ "h=6.63*10**-34 #planck's constant, J s\n",
+ "Rh=2.18*10**-18 #rydberg's constant, J\n",
+ "ni=5.0 #initial orbit\n",
+ "nf=2.0 #final orbit\n",
+ "\n",
+ "#Calculation\n",
+ "deltaE=Rh*(1/ni**2-1/nf**2) \n",
+ "lamda=c*h/-deltaE \n",
+ "\n",
+ "#Result\n",
+ "print\"The wavelength of the photon is :\",round(lamda*10**9),\"nm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wavelength of the photon is : 434.0 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7.5,Page no:291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=6.63*10**-34 #planck's constant, J s\n",
+ "m1=0.06 #mass, kg\n",
+ "u1=68.0 #speed, m/s\n",
+ "m2=9.1094*10**-31 #mass, kg\n",
+ "u2=68 #speed, m/s\n",
+ "\n",
+ "#Calculation\n",
+ "# (a)\n",
+ "lamda1=h/(m1*u1) #wavelength, m\n",
+ "#(b)\n",
+ "lamda2=h/(m2*u2) #wavelength, m\n",
+ "\n",
+ "#Result\n",
+ "print\"The wavelength of the tennis ball is :\",lamda1,\"m\"\n",
+ "print\"The wavelength of the electron is :%.1e\"%lamda2,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wavelength of the tennis ball is : 1.625e-34 m\n",
+ "The wavelength of the electron is :1.1e-05 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:,7.7,Page no:299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=3 #Principal quantum no\n",
+ "\n",
+ "#Calculation\n",
+ "#The possible values of l are 0,1,2\n",
+ "s=1 #One 3s orbital,n=3,l=0,ml=0\n",
+ "p=3 #Three p obitals\n",
+ "d=5 #five 'd' orbital\n",
+ "total=s+p+d\n",
+ "\n",
+ "#Result\n",
+ "print\"The total no of orbitals is:\",total"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total no of orbitals is: 9\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7.9,Page no:306"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=3 #Principal quantum number\n",
+ "l=[0,1,2]\n",
+ "n=[0,0,0]\n",
+ "\n",
+ "#Calculation\n",
+ "print\"Value of l \\t\\t No of orbitals(2l+1)\"\n",
+ "print\"--------------------------------------------\"\n",
+ "total=0\n",
+ "for i in range(0,3):\n",
+ " n[i]=2*l[i]+1\n",
+ " print l[i],\"\\t\\t\\t\\t\",n[i]\n",
+ " total=n[i]+total\n",
+ "max=2*total\n",
+ "\n",
+ "#Result\n",
+ "print\"The maximum number of electrons that can reside is\",max\n",
+ " \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of l \t\t No of orbitals(2l+1)\n",
+ "--------------------------------------------\n",
+ "0 \t\t\t\t1\n",
+ "1 \t\t\t\t3\n",
+ "2 \t\t\t\t5\n",
+ "The maximum number of electrons that can reside is 18\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/Chapter_9.ipynb b/Chemistry/Chapter_9.ipynb
new file mode 100755
index 00000000..a6cb1698
--- /dev/null
+++ b/Chemistry/Chapter_9.ipynb
@@ -0,0 +1,130 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9:Chemical Bonding I\n",
+ "Basic Concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9.13,Page no:397"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#Type of bond broken:\n",
+ "hh_no=1 #No.of bonds broken\n",
+ "hh_be=436.4 #Bond enthalpy in kJ/mol\n",
+ "hh_ec=436.4 #Energy Change in kJ/mol\n",
+ "cl_no=1 #No.of bonds broken\n",
+ "cl_be=242.7 #Bond enthalpy in kJ/mol\n",
+ "cl_ec=242.7 #Energy Change in kJ/mol\n",
+ "#Type of bonds formed\n",
+ "hcl_no=2 #No.of bonds formed\n",
+ "hcl_be=431.9 #Bond enthalpy in kJ/mol\n",
+ "hcl_ec=863.8 #Energy Change in kJ/mol\n",
+ "#data:\n",
+ "Hf_hcl=-92.3 #Heat of formation of Hcl in kJ/mol\n",
+ "Hf_H2=0 #Heat of formation of H2 in kJ/mol\n",
+ "Hf_Cl2=0 #Heat of formation of Cl2 in kJ/mol \n",
+ "\n",
+ "#Calculation\n",
+ "energy_in=hh_ec+cl_ec #Total energy input in kJ/mol\n",
+ "energy_rlsd=hcl_ec #Total energy released\n",
+ "delta_H=energy_in-energy_rlsd #enthalpy change in kJ/mol\n",
+ "delta_Ho=2*(-92.3)-(Hf_H2+Hf_Cl2) #Ethalpy change from eq 6.18\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Using equation 9.3,delta_H=\",delta_H,\"kJ/mol\"\n",
+ "print\"Alternatively:\"\n",
+ "print\"Enthalpy change is:\",delta_Ho,\"kJ/mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Using equation 9.3,delta_H= -184.7 kJ/mol\n",
+ "Alternatively:\n",
+ "Enthalpy change is: -184.6 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9.14,Page no:398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "#Type of bond broken:\n",
+ "hh_no=2 #No.of bonds broken\n",
+ "hh_be=436.4 #Bond enthalpy in kJ/mol\n",
+ "hh_Ec=872.8 #Energy Change in kJ/mol\n",
+ "oo_no=1 #No.of bonds broken\n",
+ "oo_be=498.7 #Bond enthalpy in kJ/mol\n",
+ "oo_Ec=498.7 #Energy Change in kJ/mol\n",
+ "#Types of bond formed\n",
+ "nn_oh=4 #No.of bonds formed\n",
+ "nn_be=460 #Bond enthalpy in kJ/mol\n",
+ "bb_Ec=1840 #Energy Change in kJ/mol\n",
+ "#data:\n",
+ "Hf_h2o=-241.8 #Heat of formation of H2O in kJ/mol\n",
+ "Hf_h2=0 #Heat of formation of H2 in kJ/mol\n",
+ "Hf_O2=0 #Heat of formation of O2 in kJ/mol\n",
+ "\n",
+ "#Calculation\n",
+ "energy_in=hh_Ec+oo_Ec #Total energy input in kJ/mol\n",
+ "energy_rlsd=bb_Ec #Total energy released\n",
+ "delta_h=energy_in-energy_rlsd #enthalpy change in kJ/mol\n",
+ "delta_Ho=2*(Hf_h2o)-(2*Hf_h2+Hf_O2) #Ethalpy change from eq 6.18\n",
+ "\n",
+ "#Result\n",
+ "print\"Enthalpy change is\",delta_Ho,\"kJ/mol\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy change is -483.6 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Chemistry/README.txt b/Chemistry/README.txt
new file mode 100755
index 00000000..28f143a5
--- /dev/null
+++ b/Chemistry/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Kiran Bala
+Course: btech
+College/Institute/Organization: Ideal Institute of Technology,Ghaziabad
+Department/Designation: Electrical & Electronics Engg
+Book Title: Chemistry
+Author: Raymond Chang
+Publisher: McGraw Hill
+Year of publication: 2010
+Isbn: 9780073511092
+Edition: 10 \ No newline at end of file
diff --git a/Chemistry/screenshots/screen1.png b/Chemistry/screenshots/screen1.png
new file mode 100755
index 00000000..7bd5aa06
--- /dev/null
+++ b/Chemistry/screenshots/screen1.png
Binary files differ
diff --git a/Chemistry/screenshots/screen2.png b/Chemistry/screenshots/screen2.png
new file mode 100755
index 00000000..414d13ea
--- /dev/null
+++ b/Chemistry/screenshots/screen2.png
Binary files differ
diff --git a/Chemistry/screenshots/screen3.png b/Chemistry/screenshots/screen3.png
new file mode 100755
index 00000000..43e67e0d
--- /dev/null
+++ b/Chemistry/screenshots/screen3.png
Binary files differ
diff --git a/Electronic_Communication_Systems/Chapter1.ipynb b/Electronic_Communication_Systems/Chapter1.ipynb
new file mode 100755
index 00000000..0fff555e
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter1.ipynb
@@ -0,0 +1,115 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f852f2388a309880e4ed281d6cd6695038f25edc5aca1cbeddbb1a41de15396c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Introduction to Communication Systems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1, page no. 10 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "T = 1.00*pow(10,-3) # Time (s)\n",
+ "Tau = 500.00*pow(10,-6) # Pulse Width (s)\n",
+ "A = 10.00 # Amplitude (V)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Coeff1 = A*(Tau/T) # Coefficient 1\n",
+ "Coeff2 = 2*A*(Tau/T)*math.sin((Tau/T)*math.pi)/((Tau/T)*math.pi) # Coefficient 2\n",
+ "Coeff3 = 2*A*(Tau/T)*math.sin(2*(Tau/T)*math.pi)/(2*(Tau/T)*math.pi) # Coefficient 3\n",
+ "Coeff4 = 2*A*(Tau/T)*math.sin(3*(Tau/T)*math.pi)/(3*(Tau/T)*math.pi) # Coefficient 4\n",
+ "\n",
+ "# Result\n",
+ "print \"The Coefficients of First Four Terms in the Fourier Series are:\"\n",
+ "print \"Coeff1 =\",round(Coeff1)\n",
+ "print \"Coeff2 =\",round(Coeff2,3)\n",
+ "print \"Coeff3 =\",round(Coeff3)\n",
+ "print \"Coeff4 =\",round(Coeff4,3)\n",
+ "print \"f(t) = [\",round(Coeff1),\"] + [\",round(Coeff2,3),\"cos(2pi*10^3*t) ] + [\",round(Coeff3),\"] + [\",round(Coeff4,3),\"cos(6pi*10^3*t)\",\"]\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Coefficients of First Four Terms in the Fourier Series are:\n",
+ "Coeff1 = 5.0\n",
+ "Coeff2 = 6.366\n",
+ "Coeff3 = 0.0\n",
+ "Coeff4 = -2.122\n",
+ "f(t) = [ 5.0 ] + [ 6.366 cos(2pi*10^3*t) ] + [ 0.0 ] + [ -2.122 cos(6pi*10^3*t) ]\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, page no. 12 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "f = 0.50*pow(10,3) # First Zero Crossing (Hz)\n",
+ "Fw_max = 8.00*pow(10,-3) # Amplitude (V)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Tau = 1/f # Pulse Duration (s)\n",
+ "A = Fw_max/Tau # Maximum Voltage (V) \n",
+ "\n",
+ "# Result\n",
+ "print \"The single pulse has a maximum voltage of\",round(A),\"V and a duration of\",round(Tau*pow(10,3)),\"ms.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The single pulse has a maximum voltage of 4.0 V and a duration of 2.0 ms.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter11.ipynb b/Electronic_Communication_Systems/Chapter11.ipynb
new file mode 100755
index 00000000..735768b6
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter11.ipynb
@@ -0,0 +1,412 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:036aa35bf5e5de2a2351f2b120a2084a8b3fc2b376331b57004e9eccc3893299"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: Antennas"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1, page no. 292"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "f1 = 1.00*pow(10,6) # Operating Frequency (Hz)\n",
+ "f2 = 10.00*pow(10,3) # Operating Frequency (Hz)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "\n",
+ "# Calculation\n",
+ "Lambda1 = c/f1 # Mechanical Length (m)\n",
+ "Lambda2 = c/f2 # Mechanical Length (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) Mechanical Length at 1 MHz, Lambda1 =\",round(Lambda1),\"m\"\n",
+ "print \"(b) Mechanical Length at 10 kHz, Lambda2 =\",round(Lambda2),\"m\"\n",
+ "print \" Increase in Length =\",round(Lambda2/Lambda1),\"times\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Mechanical Length at 1 MHz, Lambda1 = 300.0 m\n",
+ "(b) Mechanical Length at 10 kHz, Lambda2 = 30000.0 m\n",
+ " Increase in Length = 100.0 times\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2, page no. 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration \n",
+ "f = 1.00*pow(10,6) # Operating Frequency (Hz)\n",
+ "Le = 30 # Hertzian Dipole Length (m)\n",
+ "I = 5 # Current value (A)\n",
+ "r = 1.00*pow(10,3) # Distance (m)\n",
+ "Theeta = 90 # Angle (degrees)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "\n",
+ "# Calculation\n",
+ "import math\n",
+ "Lambda = c/f # Wavelength (m)\n",
+ "E = ((60*math.pi*Le*I)/Lambda*r)*math.sin(Theeta*math.pi/180) # Calculation of Field Strength (s/m)\n",
+ "\n",
+ "# Result\n",
+ "print \"Field Strength at a distance of 1 km and at an angle of 90 degrees, E =\",round(E/(math.pi*pow(10,3))),\"*pi*10^(-3) us/m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Field Strength at a distance of 1 km and at an angle of 90 degrees, E = 30.0 *pi*10^(-3) us/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3, page no. 296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration \n",
+ "f = 500*pow(10,3) # Operating Frequency (Hz)\n",
+ "vel = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "Vf = 0.95 # Velocity Factor\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Le = vel/f*Vf # Length of the antenna (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"The Length of the Antenna, Le =\",round(Le),\"m or\",round(Le*3.936),\"ft\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Length of the Antenna, Le = 570.0 m or 2244.0 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4, page no. 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration \n",
+ "P1 = 1*pow(10,3) # Power of Half Wave Dipole antenna (w)\n",
+ "A = 2.15 # Gain (dB)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "P2 = pow(10,A/10)*P1 # Power delivered (w)\n",
+ "\n",
+ "# Result\n",
+ "print \"The power delivered to the isotropic antenna to match the field strength of directional antenna, P2 =\",round(P2,1),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power delivered to the isotropic antenna to match the field strength of directional antenna, P2 = 1640.6 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5, page no. 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# Variable Declaration \n",
+ "P = 1.00*pow(10,3) # Input Power (W)\n",
+ "field_gain = 2 # Field Gain\n",
+ "E = 0.5 # (*100) Efficiency (%)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Po = P*E # Power fed (W)\n",
+ "erp = Po*pow(field_gain,2) # Effective Radiated Power (w)\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "print \" The Effective Radiated Power, erp =\",round(erp),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The Effective Radiated Power, erp = 2000.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6, page no. 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration \n",
+ "P_in = 800 # Input Power (W)\n",
+ "E_lost = 0.25 # (*100) Loss Percentage (%)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Pd = E_lost*P_in # Power Lost (W)\n",
+ "P_rad = P_in-Pd # Radiated Power (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"Radiated Power, P_rad =\",round(P_rad),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radiated Power, P_rad = 600.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7, page no. 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# Variable Declaration \n",
+ "R_rad = 100 # Radiation Resistance (Ohms)\n",
+ "E = 0.75 # (*100) Efficiency (%)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Rd = R_rad/E-R_rad # Antenna Resistance (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"Antenna Resistance, Rd =\",round(Rd,2),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Antenna Resistance, Rd = 33.33 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.8, page no. 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration \n",
+ "Zs = 5 # Impedance of the transmission line (Ohms)\n",
+ "Zr = 70 # Impedance of the antenna (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Z = Zs*Zr # Characteristic Impedance (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"The characteristic impedance of the matching section, Z =\",round(Z),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The characteristic impedance of the matching section, Z = 350.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.9, page no. 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration \n",
+ "D = 2 # Mouth diameter of reflector (m)\n",
+ "f = 6.00*pow(10,9) # Operating Frequency (Hz)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = c/f # Wavelength (m)\n",
+ "phi_o = 2*70*Lambda/D # Beam width between nulls of a paraboloid reflector (degrees)\n",
+ "\n",
+ "# Result\n",
+ "print \"The beam width between nulls of a paraboloid reflector, phi_o =\",round(phi_o,1),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The beam width between nulls of a paraboloid reflector, phi_o = 3.5 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.10, page no. 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration \n",
+ "D = 200 # Mouth diameter of reflector (m)\n",
+ "Lambda = 5 # Wavelength (m)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Ap = 6*pow(D/Lambda,2) # Gain of the antenna\n",
+ "\n",
+ "# Result\n",
+ "print \" The gain of the antenna, Ap =\",round(Ap)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The gain of the antenna, Ap = 9600.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter12.ipynb b/Electronic_Communication_Systems/Chapter12.ipynb
new file mode 100755
index 00000000..37c1ea7e
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter12.ipynb
@@ -0,0 +1,736 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:af7d5720b43a3ab91c063ac5e917869558a9550a08df4d11a5c5ce289f6c278a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: Waveguides, Resonators And Components"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1, page no. 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Theeta = 60 # Angle of incidence (degrees)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "vg = math.sin(Theeta*math.pi/180) # (X vc) Velocity of EM wave in parallel direction (m/S)\n",
+ "vn = math.cos(Theeta*math.pi/180) # (X vc) Velocity of EM wave in normal direction (m/s)\n",
+ "\n",
+ "# Result\n",
+ "print \"Velocity of EM wave in parallel direction, vg =\",round(vg,2),\"* vc\"\n",
+ "print \"Velocity of EM wave in normal direction, vn =\",round(vn,2),\"* vc\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of EM wave in parallel direction, vg = 0.87 * vc\n",
+ "Velocity of EM wave in normal direction, vn = 0.5 * vc\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2, page no. 345"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Theeta = 60 # Angle of incidence (degrees)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda_g = 1/math.sin(Theeta*math.pi/180) # (* Lambda) Wavelength of EM wave in parallel direction (m)\n",
+ "Lambda_n = 1/math.cos(Theeta*math.pi/180) # (* Lambda) Wavelength of EM wave in normal direction (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"Wavelength of EM wave in parallel direction, Lambda_g =\",round(Lambda_g,2),\"* Lambda\"\n",
+ "print \"Wavelength of EM wave in normal direction, Lambda_n =\",round(Lambda_n,2),\"* Lambda\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of EM wave in parallel direction, Lambda_g = 1.15 * Lambda\n",
+ "Wavelength of EM wave in normal direction, Lambda_n = 2.0 * Lambda\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3, page no. 346"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variable Declaration \n",
+ "Theeta = 60 # Angle of incidence (degrees)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "vp = 1/math.sin(Theeta*math.pi/180) # (* vc) Phase velocity of EM wave (m/s)\n",
+ "\n",
+ "# Result\n",
+ "print \"The phase velocity of EM wave, vp =\",round(vp,2),\"* vc\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The phase velocity of EM wave, vp = 1.15 * vc\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4, page no. 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "a = 5.1 # Dimension 1 of rectangular waveguide (cm)\n",
+ "b = 2.4 # Dimension 2 of rectangular waveguide (cm)\n",
+ "m = 2 # Number of half wavelengths\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = 2*a/m # Cutoff wavelength of rectangular waveguide (cm)\n",
+ "\n",
+ "# Result\n",
+ "print \"The cutoff wavelength of rectangular waveguide, Lambda =\",round(Lambda,1),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cutoff wavelength of rectangular waveguide, Lambda = 5.1 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.5, page no. 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "a = 5.1 # Dimension 1 of rectangular waveguide (cm)\n",
+ "b = 2.4 # Dimension 2 of rectangular waveguide (cm)\n",
+ "m = 1 # Constant m for TE10 mode\n",
+ "n = 0 # Constant n for TE10 mode\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "fc = 1.5*pow(10,8)*math.sqrt(pow(m/a,2)+pow(n/b,2)) # Cutoff frequency of dominant mode (TE10) of rectangular waveguide (Hz)\n",
+ " \n",
+ "# Result\n",
+ "print \"The cutoff frequency of dominant mode (TE10) of rectangular waveguide, fc =\",round(fc/pow(10,7),2),\"GHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cutoff frequency of dominant mode (TE10) of rectangular waveguide, fc = 2.94 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.6, page no. 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "a = 5.1 # Dimension 1 of rectangular waveguide (cm)\n",
+ "b = 2.4 # Dimension 2 of rectangular waveguide (cm)\n",
+ "m1 = 0 # Constant m for TE01 mode\n",
+ "n1 = 1 # Constant n for TE01 mode\n",
+ "m2 = 2 # Constant m for TE20 mode\n",
+ "n2 = 0 # Constant n for TE20 mode\n",
+ "m3 = 0 # Constant m for TE02 mode\n",
+ "n3 = 2 # Constant n for TE02 mode\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "f1 = 1.5*pow(10,8)*math.sqrt(pow(m1/a,2)+pow(n1/b,2)) # Cutoff frequency of TE01 of rectangular waveguide (Hz)\n",
+ "f2 = 1.5*pow(10,8)*math.sqrt(pow(m2/a,2)+pow(n2/b,2)) # Cutoff frequency of TE20 of rectangular waveguide (Hz)\n",
+ "f3 = 1.5*pow(10,8)*math.sqrt(pow(m3/a,2)+pow(n3/b,2)) # Cutoff frequency of TE02 of rectangular waveguide (Hz)\n",
+ "\n",
+ "# Result\n",
+ "print \"The frequency of TE01 mode of rectangular waveguide, f1 =\",round(f1/pow(10,7),2),\"GHz\"\n",
+ "print \"The frequency of TE20 mode of rectangular waveguide, f2 =\",round(f2/pow(10,7),2),\"GHz\"\n",
+ "print \"The frequency of TE02 mode of rectangular waveguide, f3 =\",round(f3/pow(10,7),2),\"GHz\"\n",
+ "print \"Hence the lowest frequency except dominant mode is, f =\",round(min(f1,f2,f3)/pow(10,7),2),\"GHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency of TE01 mode of rectangular waveguide, f1 = 6.25 GHz\n",
+ "The frequency of TE20 mode of rectangular waveguide, f2 = 5.88 GHz\n",
+ "The frequency of TE02 mode of rectangular waveguide, f3 = 12.5 GHz\n",
+ "Hence the lowest frequency except dominant mode is, f = 5.88 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.7, page no. 351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "a = 3.00 # Plane Separation of rectangular waveguide (cm)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "f = 6.00*pow(10,9) # Operating frequency (Hz)\n",
+ "m = 1.00 # Constant m for dominant mode\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = c/f * 100 # Operating Wavelength (cm)\n",
+ "Lambda_o = 2*a/m # Cutoff Wavelength (cm)\n",
+ "Lambda_p = Lambda/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Guide Wavelength (cm)\n",
+ "vg = c*math.sqrt(1-pow(Lambda/Lambda_o,2)) # Group velocity (m/s)\n",
+ "vp = c/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Phase velocity (m/s)\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) Cutoff Wavelength, Lambda_o =\",round(Lambda_o),\"cm\"\n",
+ "print \"(b) Guide Wavelength, Lambda_p =\",round(Lambda_p,2),\"cm\"\n",
+ "print \"(c) Group Velocity, vg =\",round(vg/pow(10,8),2),\"*10^(8) m/s\"\n",
+ "print \" Phase Velocity, vp =\",round(vp/pow(10,8),2),\"*10^(8) m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Cutoff Wavelength, Lambda_o = 6.0 cm\n",
+ "(b) Guide Wavelength, Lambda_p = 9.05 cm\n",
+ "(c) Group Velocity, vg = 1.66 *10^(8) m/s\n",
+ " Phase Velocity, vp = 5.43 *10^(8) m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.8, page no. 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "a = 6.00 # Plane Separation of rectangular waveguide (cm)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "f = 10.00*pow(10,9) # Operating frequency (Hz)\n",
+ "m1 = 1# Dimensional Constant\n",
+ "m2 = 2# Dimensional Constant\n",
+ "m3 = 3# Dimensional Constant\n",
+ "m4 = 4# Dimensional Constant\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = c/f * 100 # Operating Wavelength (cm)\n",
+ "Lambda_o1 = 2*a/m1 # Wavelength (cm)\n",
+ "Lambda_o2 = 2*a/m2 # Wavelength (cm)\n",
+ "Lambda_o3 = 2*a/m3 # Wavelength (cm)\n",
+ "Lambda_o4 = 2*a/m4 # Wavelength (cm)\n",
+ "Lambda_p = Lambda/math.sqrt(1-pow(Lambda/Lambda_o3,2)) # Guide Wavelength (cm)\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) For m = 1, Lambda_o =\",round(Lambda_o1),\"cm\"\n",
+ "print \" For m = 2, Lambda_o =\",round(Lambda_o2),\"cm\"\n",
+ "print \" For m = 3, Lambda_o =\",round(Lambda_o3),\"cm\"\n",
+ "print \" For m = 4, Lambda_o =\",round(Lambda_o4),\"cm\"\n",
+ "print \" Hence The largest value of m = 3\"\n",
+ "print \"(b) Guide Wavelength, Lambda_p =\",round(Lambda_p,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) For m = 1, Lambda_o = 12.0 cm\n",
+ " For m = 2, Lambda_o = 6.0 cm\n",
+ " For m = 3, Lambda_o = 4.0 cm\n",
+ " For m = 4, Lambda_o = 3.0 cm\n",
+ " Hence The largest value of m = 3\n",
+ "(b) Guide Wavelength, Lambda_p = 4.54 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.9, page no. 354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Lambda = 2.00 # Wavelength of travelling wave (cm)\n",
+ "Lambda_o = 4.00 # Cutoff wavelength (cm)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Zo = 377/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Characteristic impedance of the given waveguide (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"The characteristic impedance of the given waveguide, Zo =\",round(Zo),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The characteristic impedance of the given waveguide, Zo = 435.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.10, page no. 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "m = 1 # Constant m for TM11 mode\n",
+ "n = 1 # Constant n for TM11 mode\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda_o = 2/math.sqrt(pow(m,2)+pow(2*n,2)) # (* a) Cutoff wavelength with b=a/2 (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"Cutoff wavelength of standard rectangular waveguides, Lambda_o =\",round(Lambda_o,3),\"* a \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cutoff wavelength of standard rectangular waveguides, Lambda_o = 0.894 * a \n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.11, page no. 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "rho1 = 0.553 # Constant from Example 12.7\n",
+ "rho2 = 0.661 # Constant from Example 12.8\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Zo1 = 120*math.pi/rho1 # Characteristic Wave Impedance (Ohms)\n",
+ "Zo2 = 120*math.pi/rho2 # Characteristic Wave Impedance (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"Ex.12.7 : Characteristic Wave Impedance, Zo1 =\",round(Zo1),\"Ohms\"\n",
+ "print \"Ex.12.8 : Characteristic Wave Impedance, Zo2 =\",round(Zo2),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ex.12.7 : Characteristic Wave Impedance, Zo1 = 682.0 Ohms\n",
+ "Ex.12.8 : Characteristic Wave Impedance, Zo2 = 570.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12, page no. 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "a = 4.5 # Dimension 1 of rectangular waveguide (cm)\n",
+ "b = 3.0 # Dimension 2 of rectangular waveguide (cm)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "f = 9.00*pow(10,9) # Operating frequency (Hz)\n",
+ "m1 = 1 # Constant m for TE10 mode\n",
+ "n1 = 0 # Constant n for TE10 mode\n",
+ "m2 = 1 # Constant m for TM11 mode\n",
+ "n2 = 1 # Constant n for TM11 mode\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = c/f * 100 # Operating Wavelength (cm)\n",
+ "Lambda_o1 = 2*a/m1 # Cutoff Wavelength (cm)\n",
+ "Lambda_p1 = Lambda/math.sqrt(1-pow(Lambda/Lambda_o1,2)) # Guide Wavelength (cm)\n",
+ "vg1 = c*math.sqrt(1-pow(Lambda/Lambda_o1,2)) # Group velocity (m/s)\n",
+ "vp1 = c/math.sqrt(1-pow(Lambda/Lambda_o1,2)) # Phase velocity (m/s)\n",
+ "Zo1 = 120*math.pi/math.sqrt(1-pow(Lambda/Lambda_o1,2)) # Characteristic Wave Impedance (Ohms)\n",
+ "Lambda_o2 = 2/math.sqrt(pow(m2/a,2)+pow(n2/b,2))\t # Cutoff Wavelength (cm)\n",
+ "Lambda_p2 = Lambda/math.sqrt(1-pow(Lambda/Lambda_o2,2))\t # Guide Wavelength (cm)\n",
+ "vg2 = c*math.sqrt(1-pow(Lambda/Lambda_o2,2))\t # Group velocity (m/s)\n",
+ "vp2 = c/math.sqrt(1-pow(Lambda/Lambda_o2,2))\t # Phase velocity (m/s)\n",
+ "Zo2 = 120*math.pi*math.sqrt(1-pow(Lambda/Lambda_o2,2)) # Characteristic Wave Impedance (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) For TE10 mode :\"\n",
+ "print \"Cutoff Wavelength, Lambda_o =\",round(Lambda_o1),\"cm\"\n",
+ "print \"Guide Wavelength, Lambda_p =\",round(Lambda_p1,2),\"cm\"\n",
+ "print \"Group Velocity, vg =\",round(vg1/pow(10,8),2),\"*10^(8) m/s\"\n",
+ "print \"Phase Velocity, vp =\",round(vp1/pow(10,8),2),\"*10^(8) m/s\"\n",
+ "print \"Characteristic Wave Impedance, Zo =\",round(Zo1,1),\"Ohms\"\n",
+ "print \"(b) For TM11 mode :\"\n",
+ "print \"Cutoff Wavelength, Lambda_o =\",round(Lambda_o2),\"cm\"\n",
+ "print \"Guide Wavelength, Lambda_p =\",round(Lambda_p2,1),\"cm\"\n",
+ "print \"Group Velocity, vg =\",round(vg2/pow(10,8),2),\"*10^(8) m/s\"\n",
+ "print \"Phase Velocity, vp =\",round(vp2/pow(10,8),2),\"*10^(8) m/s\"\n",
+ "print \"Characteristic Wave Impedance, Zo =\",round(Zo2),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) For TE10 mode :\n",
+ "Cutoff Wavelength, Lambda_o = 9.0 cm\n",
+ "Guide Wavelength, Lambda_p = 3.59 cm\n",
+ "Group Velocity, vg = 2.79 *10^(8) m/s\n",
+ "Phase Velocity, vp = 3.23 *10^(8) m/s\n",
+ "Characteristic Wave Impedance, Zo = 405.9 Ohms\n",
+ "(b) For TM11 mode :\n",
+ "Cutoff Wavelength, Lambda_o = 5.0 cm\n",
+ "Guide Wavelength, Lambda_p = 4.5 cm\n",
+ "Group Velocity, vg = 2.23 *10^(8) m/s\n",
+ "Phase Velocity, vp = 4.03 *10^(8) m/s\n",
+ "Characteristic Wave Impedance, Zo = 281.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.13, page no. 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "a = 3 # Width of rectangular waveguide (cm)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "m = 1 # Constant m for dominant mode\n",
+ "Zo = 500 # Characteristic wave impedance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda_o = 2*a/m # Cutoff Wavelength (cm)\n",
+ "Lambda = pow(1-pow(120*math.pi/Zo,2),0.5)*Lambda_o # Operating wavelength (cm)\n",
+ "f = c/Lambda # Operating Frequency (Hz)\n",
+ " \n",
+ "# Result\n",
+ "print \"Operating Frequency, f =\",round(f/pow(10,7),2),\"GHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating Frequency, f = 7.61 GHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.14, page no. 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Example 12.14\n",
+ "# Calculate the cutoff wavelength,\n",
+ "\n",
+ "# Variable Declaration\n",
+ "r = 2.00 # Diameter of circular waveguide (cm)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "f = 10.00*pow(10,9) # Operating frequency (Hz)\n",
+ "kr = 1.84 # Constant from Table 12.2\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = c/f * 100 # Operating Wavelength (cm)\n",
+ "Lambda_o = 2*math.pi*r/kr # Cutoff Wavelength (cm)\n",
+ "Lambda_p = Lambda/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Guide Wavelength (cm)\n",
+ "Zo = 120*math.pi/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Characteristic Wave Impedance (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"Cutoff Wavelength, Lambda_o =\",round(Lambda_o,2),\"cm\"\n",
+ "print \"Guide Wavelength, Lambda_p =\",round(Lambda_p,2),\"cm\"\n",
+ "print \"Characteristic Wave Impedance, Zo =\",round(Zo),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cutoff Wavelength, Lambda_o = 6.83 cm\n",
+ "Guide Wavelength, Lambda_p = 3.34 cm\n",
+ "Characteristic Wave Impedance, Zo = 420.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.15, page no. 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variable Declaration\n",
+ "r = 1 # Diameter(assumption) of circular waveguide (cm)\n",
+ "m = 1 # Constant m for dominant mode\n",
+ "kr = 1.84 # Constant from Table 12.2\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda_o1 = 2*math.pi*r/kr # Cutoff Wavelength for circular waveguide (cm)\n",
+ "Lambda_o2 = Lambda_o1 # Cutoff Wavelength for rectangular waveguide (cm)\n",
+ "a = Lambda_o2*m/2 # Dimensional Variable\n",
+ "Ac = math.pi*pow(r,2) # Cross Sectional Area of Circular Waveguide (m^2)\n",
+ "Ar = pow(a,2)/2 # Cross Sectional Area of Rectangular Waveguide (m^2)\n",
+ "R \t = Ac/Ar # Ratio\n",
+ " \n",
+ "# Result\n",
+ "print \"Ratio, Ac/Ar =\",round(R,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio, Ac/Ar = 2.16\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.16, page no. 378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variable Declaration\n",
+ "a = 1.00 # Dimension 1 of rectangular waveguide (cm)\n",
+ "b = 0.50 # Dimension 2 of rectangular waveguide (cm)\n",
+ "m = 1 # Constant m for dominant mode\n",
+ "del1 = 25.00 # Length of waveguide (cm)\n",
+ "c = 3.00*pow(10,8)# Speed of light in vacuum (m/s) \n",
+ "f = 1.00*pow(10,9)# Operating frequency (Hz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda_o = 2 * a/m # Cutoff Wavelength (cm)\n",
+ "Lambda = c/f * 100 # Operating Wavelength (cm)\n",
+ "A_dB = 54.5 * del1/Lambda_o # Voltage attenuation of waveguide in dominant mode (dB)\n",
+ "\n",
+ "# Result\n",
+ "if Lambda_o<Lambda : print \"The waveguide is operating below cutoff\"\n",
+ "print \"Voltage attenuation of waveguide in dominant mode, A_dB =\",round(A_dB),\"dB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The waveguide is operating below cutoff\n",
+ "Voltage attenuation of waveguide in dominant mode, A_dB = 681.0 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter15.ipynb b/Electronic_Communication_Systems/Chapter15.ipynb
new file mode 100755
index 00000000..7a578c06
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter15.ipynb
@@ -0,0 +1,400 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f82338b15d5e32b80b8782ce45f00e7b56a16efde942696b5a56c79c32e5fe3b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15: Radar Systems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.1, page no. 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "PW = 3.00*pow(10,-6) # Pulse Width (s)\n",
+ "PRT = 6.00*pow(10,-3) # Pulse Repetition Time (s)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "DS = PW/PRT # Duty Cycle\n",
+ "\n",
+ "# Result\n",
+ "print \"Duty Cycle =\",round(DS,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Duty Cycle = 0.0005\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.2, page no. 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "PW = 3.00*pow(10,-6) # Pulse Width (s)\n",
+ "PP = 100.00*pow(10,3) # Peak Power (W)\n",
+ "RT = 1997.00 # Rest Time (s)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "DS = 1/RT # Duty Cycle\n",
+ "AP = PP*DS # Average Power (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"Average Power =\",round(AP),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average Power = 50.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.3, page no. 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "NF = 9.00 # Noise Figure (dB)\n",
+ "k = 1.38*pow(10,-23) # Boltzmann's Constant (J/K)\n",
+ "del_f = 1.50*pow(10,6) # Receiver Band Width (Hz)\n",
+ "To = 290 # Standard Ambient temperature (K)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "F = pow(10,NF/10) # Noise Figure\n",
+ "P_min = k*To*del_f*(F-1) # Minimum receivable signal in a Radar Receiver (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"Minimum receivable signal in the Radar Receiver, P_min =\",round(P_min/pow(10,-14),2),\"* 10^(-14) W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum receivable signal in the Radar Receiver, P_min = 4.17 * 10^(-14) W\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.4, page no. 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Pt = 5.00*pow(10,5) # Peak Pulse Power (W)\n",
+ "Lambda = 3.00*pow(10,-2) # Wavelength (m)\n",
+ "P_min = 1.00*pow(10,-13) # Minimum receivable Power (W)\n",
+ "Ao = 5# Capture Area of Antenna (m^2)\n",
+ "S = 20 # Radar Cross-sectional Area (m^2)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "r_max = pow(Pt*pow(Ao,2)*S/(4*math.pi*pow(Lambda,2)*P_min),0.25)\n",
+ " # Maximum range of the Radar System (m)\n",
+ "# Result\n",
+ "print \"Maximum range of the Radar System, r_max =\",round(r_max/1000),\"km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum range of the Radar System, r_max = 686.0 km\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.5, page no. 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "F_dB = 4.77 # Noise Figure (dB)\n",
+ "f = 8.00*pow(10,9) # Operating Frequency (Hz)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "del_f = 5.00*pow(10,5) # IF Bandwidth (Hz)\n",
+ "rmax = 12.00 # Maximum distance (km)\n",
+ "D = 1.00 # Antenna Diameter (m)\n",
+ "S = 5.00 # Cross sectional area (m^2)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = c/f # Wavelength (m)\n",
+ "F = pow(10,F_dB/10) # Noise Figure\n",
+ "Pt = del_f*pow(Lambda,2)*(F-1)/(pow(48/rmax,4)*pow(D,4)*S) # Peak transmitted pulse power (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"The peak transmitted pulse power, Pt =\",round(Pt,1),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The peak transmitted pulse power, Pt = 1.1 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.6, page no. 500"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "f = 2.50*pow(10,9) # Radar Operating Frequency (Hz)\n",
+ "c = 3.00*pow(10,8) # Velocity of light in vacuum (m/s)\n",
+ "Pt = 25.00*pow(10,6) # Peak Pulse Power (W)\n",
+ "D = 64.00 # Antenna Diameter (m)\n",
+ "F = 1.1 # Receiver Noise Figure\n",
+ "S = 1.00 # Radar Cross-sectional Area (m^2)\n",
+ "del_f = 5.00*pow(10,3) # Receiver Bandwidth (Hz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math# Math Library\n",
+ "Lambda = c/f# Wavelength (m)\n",
+ "r_max = 48*pow(Pt*pow(D,4)*S/(del_f*pow(Lambda,2)*(F-1)),0.25)\n",
+ "# Maximum range of the Radar System (km)\n",
+ "# Result\n",
+ "print \"Maximum range of the Radar System, r_max =\",round(r_max),\"km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum range of the Radar System, r_max = 132609.0 km\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.7, page no. 504"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "v_c = 3.00*pow(10,8) # Velocity of light in vacuum (m/s)\n",
+ "f = 5.00*pow(10,9) # MTI radar Transmit Frequency (Hz)\n",
+ "PRF = 800 # Pulse Repetition Frequency (pps)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = v_c/f # Wavelength(m)\n",
+ "vb1 = PRF*Lambda*60*60*pow(10,-3) # Blind Speed in for n=1 (km/h)\n",
+ "vb2 = 2*PRF*Lambda*60*60*pow(10,-3) # Blind Speed in for n=2 (km/h)\n",
+ "vb3 = 3*PRF*Lambda*60*60*pow(10,-3) # Blind Speed in for n=3 (km/h)\n",
+ "\n",
+ "# Result\n",
+ "print \"Lowest three blind speeds will be\",round(vb1,1),\",\",round(vb2,1),\"and\",round(vb3,1),\"km/h\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lowest three blind speeds will be 172.8 , 345.6 and 518.4 km/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.8, page no. 506"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variable Declaration\n",
+ "F_dB = 13 # Noise Figure of beacon (dB)\n",
+ "Ft = 1.1 # Noise Figure of system\n",
+ "f = 2.50*pow(10,9) # Operating Frequency (Hz)\n",
+ "D = 64 # Antenna Diameter (m)\n",
+ "Db = 1 # Antenna Diameter of beacon (m)\n",
+ "del_f = 5.00*pow(10,3) # Bandwidth (Hz)\n",
+ "Ptt = 0.50*pow(10,6) # Peak Pulse power (W)\n",
+ "Ptb = 50 # Peak Pulse power of beacon (W)\n",
+ "k = 1.38*pow(10,-23) # Boltzman's Constant (J/K)\n",
+ "c = 3.00*pow(10,8) # Speed of light in vaccum (m/s)\n",
+ "To = 290 # Temperature (K)\n",
+ "\n",
+ "# Calculation\n",
+ "import math# Math Library\n",
+ "Aot = 0.65*math.pi*pow(D,2)/4# Capture Area (m^2)\n",
+ "Aob = 0.65*math.pi*pow(Db,2)/4# Capture Area (m^2)\n",
+ "Lambda = c/f# Wavelength (m)\n",
+ "Fb = pow(10,F_dB/10)# Noise Figure\n",
+ "rmax_I = pow(Aot*Ptt*Aob/(pow(Lambda,2)*k*To*del_f*(Fb-1)),0.5)\n",
+ "# Maximum range for the interrogation link (m)\n",
+ "rmax_R = pow(Aob*Ptb*Aot/(pow(Lambda,2)*k*To*del_f*(Ft-1)),0.5)\n",
+ "# Maximum range for the reply link (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"The Maximum Tracking Range, Rmax =\",round(min(rmax_I/pow(10,10),rmax_R/pow(10,10))),\"million km\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Maximum Tracking Range, Rmax = 136.0 million km\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.9, page no. 507"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "c = 3.00*pow(10,8) # Velocity of light in vacuum (m/s)\n",
+ "f = 5.00*pow(10,9) # CW Transmit Frequency (Hz)\n",
+ "v = 100.00 # Target Speed (km/h)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Lambda = c/f # Wavelength (m)\n",
+ "vr = v*1000/(60*60) # Target Speed (m/s)\n",
+ "f_d = 2*vr/Lambda # Doppler frequency (Hz)\n",
+ "\n",
+ "# Result\n",
+ "print \"Doppler frequency, f_d =\",round(f_d),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Doppler frequency, f_d = 926.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter17.ipynb b/Electronic_Communication_Systems/Chapter17.ipynb
new file mode 100755
index 00000000..d337b75e
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter17.ipynb
@@ -0,0 +1,140 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:a213742fda8c74130f9501f7775b062f79302454ea874815627cdc7db481bf9e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17: Introduction To Fiber Optic Technology"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.1, page no. 557"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "n1 = 1.50 # Refractive Index of Substance 1\n",
+ "n2 = 1.46 # Refractive Index of Substance 2\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "THEETA_c = math.asin(n2/n1) # Critical angle of incidence (degrees)\n",
+ "\n",
+ "# Result\n",
+ "print \"The critical angle of incidence between two given substances is THEETA_c =\",round(THEETA_c*180/math.pi,1),\"degrees.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The critical angle of incidence between two given substances is THEETA_c = 76.7 degrees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.2, page no. 566"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "tr = 2.00*pow(10,-9) # Rise Time (s)\n",
+ "Cd = 3.00*pow(10,-12) # Capacitance (F)\n",
+ "Cdh = 2.00*pow(10,-12) # Assumed Capacitance (F)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "BW = 0.35/tr # Bandwidth (Hz)\n",
+ "Rl = 1/(2*math.pi*BW*Cdh) # Resistance (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"BW =\",round(BW/pow(10,6)),\"MHz\"\n",
+ "print \"Rl =\",round(Rl),\"Ohms\"\n",
+ "print \"In practice, a value approximately 25 percent of this calculated value will be used.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "BW = 175.0 MHz\n",
+ "Rl = 455.0 Ohms\n",
+ "In practice, a value approximately 25 percent of this calculated value will be used.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 17.3, page no. 569"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Mu_A = 40.00 # Diode Current (uW)\n",
+ "Mu_W = 80.00 # Incident Light (uW)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "R = Mu_A/Mu_W # Responsivity (A/W)\n",
+ "\n",
+ "# Result\n",
+ "print \"The Responsivity of the light detector is R =\",round(R,1),\"A/W.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Responsivity of the light detector is R = 0.5 A/W.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter18.ipynb b/Electronic_Communication_Systems/Chapter18.ipynb
new file mode 100755
index 00000000..b9594307
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter18.ipynb
@@ -0,0 +1,107 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b47d42851a95b239c1a54b9b998eec602c81d678d0f92705fab117d580600a10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18: Information Theory, Coding And Data Communication"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.1, page no. 591"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "SNR_dB = 32.00 # Signal to Noise ratio (dB)\n",
+ "f1 = 300.00 # Lower Limit of Voice Frequency (Hz)\n",
+ "f2 = 3400.0 # Upper Limit of Voice Frequency (Hz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "SNR = pow(10,SNR_dB/10) # Signal to Noise Ratio\n",
+ "C = (f2-f1)*math.log(1+SNR,2) # Capacity of Telephone Channel (bps)\n",
+ "\n",
+ "# Result\n",
+ "print \"The capacity of a standard 4 kHz telephone channel with 32 dB SNR is C =\",round(C,1),\"bits per second.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The capacity of a standard 4 kHz telephone channel with 32 dB SNR is C = 32956.3 bits per second.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.2, page no. 591"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "SNR_dB = 28.00 \t # Signal to Noise ratio (dB)\n",
+ "BW1 = 4.00*pow(10,3) # System Bandwidth 1 (Hz)\n",
+ "BW2 = 8.00*pow(10,3) # System Bandwidth 2 (Hz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "SNR1 = pow(10,SNR_dB/10) # Signal to Noise Ratio 1\n",
+ "C1 = BW1*math.log(1+SNR1,2) # Information Carrying Capacity (bps)\n",
+ "SNR2 = pow(10,SNR_dB/10)/2 # Signal to Noise Ratio 2\n",
+ "C2 = BW2*math.log(1+SNR2,2) # Information Carrying Capacity (bps)\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) The information carrying capacity of a standard 4 kHz telephone channel with 28 dB SNR is C1 =\",round(C1),\"bits per second.\"\n",
+ "print \"(b) The information carrying capacity of a standard 8 kHz telephone channel with same signal power as in (a) is C2 =\",round(C2),\"bits per second.\"\n",
+ "print \" Also the ratio of the two quantities, C2/C1 =\",round(C2/C1,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The information carrying capacity of a standard 4 kHz telephone channel with 28 dB SNR is C1 = 37215.0 bits per second.\n",
+ "(b) The information carrying capacity of a standard 8 kHz telephone channel with same signal power as in (a) is C2 = 66448.0 bits per second.\n",
+ " Also the ratio of the two quantities, C2/C1 = 1.786\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter2.ipynb b/Electronic_Communication_Systems/Chapter2.ipynb
new file mode 100755
index 00000000..03040c32
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter2.ipynb
@@ -0,0 +1,266 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7e1c74a28912b449959296d5be17e181689de7baeff58aa5e2dcd8837dc4f405"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Noise"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1, page no. 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "del_f = 2.00*pow(10,6) # Bandwidth of interest (Hz)\n",
+ "T = 300 # Operating Temperature (K)\n",
+ "k = 1.38*pow(10,-23) # Boltzmann's Constant (J/K)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Pn = k*T*del_f # Power Output (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"Maximum noise power output of the resistor, Pn =\",round(Pn/pow(10,-13),4),\"* 10^(-13) Watts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum noise power output of the resistor, Pn = 0.0828 * 10^(-13) Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, page no. 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "del_f = 2.00*pow(10,6) # Bandwidth of interest (Hz)\n",
+ "T = 300 # Operating Temperature (K)\n",
+ "k = 1.38*pow(10,-23) # Boltzmann's Constant (J/K)\n",
+ "R = 10.00*pow(10,3) # Input Resistance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Vn = pow(4*k*T*del_f*R,0.5) # RMS Noise Voltage (V)\n",
+ "\n",
+ "# Result\n",
+ "print \"The rms noise voltage at the input of the amplifier, Vn =\",round(Vn/pow(10,-6),1),\"microvolts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The rms noise voltage at the input of the amplifier, Vn = 18.2 microvolts\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3, page no. 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "del_f = 6.00*pow(10,6) # Bandwidth of interest (Hz)\n",
+ "T = 290 # Operating Temperature (K)\n",
+ "k = 1.38*pow(10,-23) # Boltzmann's Constant (J/K)\n",
+ "R1 = 300 # Input Resistance (Ohms)\n",
+ "R2 = 200 # Device Resistance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Vn = pow(4*k*T*del_f*(R1+R2),0.5) # Noise voltage (V)\n",
+ "\n",
+ "# Result\n",
+ "print \"The noise voltage at the input of the Television RF amplifier, Vn =\",round(Vn/pow(10,-6),2),\"uV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The noise voltage at the input of the Television RF amplifier, Vn = 6.93 uV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4, page no. 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "A1 = 10 # First Stage Voltage Gain\n",
+ "A2 = 25 # Second Stage Voltage Gain\n",
+ "R11 = 600 # First Stage Resistance (Ohms)\n",
+ "R12 = 1600 # First Stage Resistance (Ohms)\n",
+ "R21 = 27000 # Second Stage Resistance (Ohms)\n",
+ "R22 = 81000 # Second Stage Resistance (Ohms)\n",
+ "R23 = 10000 # Second Stage Resistance (Ohms)\n",
+ "R3 = 1.00*pow(10,6) # Third Stage Resistance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "R1 = R11+R12 # Resistance 1 (Ohms)\n",
+ "R2 = R21*R22/(R21+R22)+R23 # Resistance 2 (Ohms)\n",
+ "Req = R1+(R2/pow(A1,2))+R3/((A1*A1)*(A2*A2)) # Input Noise Resistance (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"Input Noise Resistance, Req =\",round(Req),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input Noise Resistance, Req = 2518.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5, page no. 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Req = 2518.00 # Resistance From Example 2.4 (Ohms)\n",
+ "Rt = 600.00 # Resistance From Example 2.4 (Ohms)\n",
+ "Ra = 50.00 # Output Impedance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Req1 = Req-Rt # Equivalent Resistance (Ohms)\n",
+ "NF = 1+Req1/Ra # Noise Figure\n",
+ "\n",
+ "# Result\n",
+ "print \"Noise Figure, F =\",round(NF,1),\"or\",round(10*math.log10(NF),2),\"dB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Noise Figure, F = 39.4 or 15.95 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6, page no. 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "To = 290 # Operating Temperature (K)\n",
+ "Ra = 50.00 # Antenna Resistance (Ohms)\n",
+ "Req = 30.00 # Equivalent Noise Resistance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "NF = 1+Req/Ra # Noise Figure\n",
+ "F = 10*math.log10(NF) # Noise Figure (dB)\n",
+ "Teq = To*(NF-1) # Noise Temperature (K)\n",
+ " \n",
+ "# Result\n",
+ "print \"Noise Figure, F =\",round(F,2),\"dB\"\n",
+ "print \"Noise Temperature, Teq =\",round(Teq),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Noise Figure, F = 2.04 dB\n",
+ "Noise Temperature, Teq = 174.0 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter3.ipynb b/Electronic_Communication_Systems/Chapter3.ipynb
new file mode 100755
index 00000000..3e0faa39
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter3.ipynb
@@ -0,0 +1,581 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e528d450b010e6a0fc0701d08e663db71f95558ee29c88e64def041726f96bfa"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Amplitude Modulation Techniques"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1, page no. 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "L = 50.0*pow(10,-6) # Transmitter Inductance (H)\n",
+ "C = 1.0*pow(10,-9) # Transmitter Capacitance (F)\n",
+ "AF_range = 10*pow(10,3) # Audio Frequency Range (Hz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "fc= 1/(2*math.pi*math.sqrt(L*C))# Center Frequency (Hz)\n",
+ "fl= fc-AF_range# Frequency of LSB (Hz)\n",
+ "fu= fc+AF_range# Frequency of USB (Hz)\n",
+ "\n",
+ "# Result\n",
+ "print \"Center Frequency, fc= \",math.ceil(fc/pow(10,3)),\"kHz\"\n",
+ "print \"Frequency Range occupied by the Sidebands is\",math.ceil(fl/pow(10,3)),\"to\",math.ceil(fu/pow(10,3)),\"kHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Center Frequency, fc= 712.0 kHz\n",
+ "Frequency Range occupied by the Sidebands is 702.0 to 722.0 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, page no. 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_c = 400 # Carrier Power (W)\n",
+ "m = 0.75 # Modulation Index\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "P_AM = P_c*(1+pow(m,2)/2) # Total Power in the modulated Wave (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"Total Power in the Modulated Wave is\",P_AM,\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Power in the Modulated Wave is 512.5 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, page no. 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_t = 10000 # Radio Transmitter Power (W)\n",
+ "m = 0.60 # Modulation Index\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "P_c = P_t/(1+pow(m,2)/2) # Carrier Power (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"Carrier Power is\",round(P_c/pow(10,3),2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Carrier Power is 8.47 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4, page no. 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "I_t = 8.93 # Total Antenna current (A) \n",
+ "I_c = 8 # Carrier Antenna Current (A)\n",
+ "m = 0.80 # Modulation Index\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "m1 = math.sqrt(2*(pow(I_t/I_c,2)-1)) # Percentage Modulation (%)\n",
+ "I_t1 = I_c*math.sqrt(1+pow(m,2)/2) # Antenna Current (A)\n",
+ "\n",
+ "# Result\n",
+ "print \"Modulation Index calculated for first part is\",round(m1*100,1),\"%\"\n",
+ "print \"Antenna Current calculated for second part is\",round(I_t1,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Modulation Index calculated for first part is 70.1 %\n",
+ "Antenna Current calculated for second part is 9.19 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5, page no. 41\u00b6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_t = 10.125*pow(10,3) # Total Power(W)\n",
+ "P_c = 9.00*pow(10,3) # Carrier Power(W)\n",
+ "m2 = 0.40 # Modulation Index\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "m1 = math.sqrt(2*(P_t/P_c-1)) # Modulation Index\n",
+ "mt = math.sqrt(pow(m1,2)+pow(m2,2)) # Total Modulation index\n",
+ "P_AM = P_c*(1+pow(mt,2)/2) # Total Radiated Power(W)\n",
+ "\n",
+ "# Result\n",
+ "print \"Modulation Index of first part is, m =\",m1\n",
+ "print \"Total Modulation Index is, m_t =\",round(mt,2)\n",
+ "print \"Total Radiated Power, P_AM =\",P_AM/pow(10,3),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Modulation Index of first part is, m = 0.5\n",
+ "Total Modulation Index is, m_t = 0.64\n",
+ "Total Radiated Power, P_AM = 10.845 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6, page no. 41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "I_t = 11 # Total Antenna current (A) \n",
+ "I_T = 12 # Total Antenna current for second part (A) \n",
+ "m1 = 0.40 # Modulation Index\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "I_c = I_t/math.sqrt(1+pow(m1,2)/2) # Current (A)\n",
+ "mt = math.sqrt(2*(pow(I_T/I_c,2)-1)) # Modulation Index\n",
+ "m2 = math.sqrt(pow(mt,2)-pow(m1,2)) # Modulation Index\n",
+ "\n",
+ "# Result\n",
+ "print \"Modulation Index calculated is\",round(m2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Modulation Index calculated is 0.64\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7, page no. 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_c = 400 # Carrier Power (W)\n",
+ "m1 = 1.0 # Modulation Index (for first part)\n",
+ "m2 = 0.75 # Modulation Index (for second part)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "# (i) Power saving of DSBSC compared to AM for 100% Modulation Depth\n",
+ "P_AM1=P_c*(1+pow(m1,2)/2) # Power of AM Wave (W)\n",
+ "P_DSBSC1=P_c*pow(m1,2)/2 # Power of DSBSC Wave (W)\n",
+ "Saving1=P_AM1-P_DSBSC1 # Power Saving (W)\n",
+ "# (ii) Power Required for DSBSC Wave Transmission for 75% Modulation Depth\n",
+ "P_DSBSC2=P_c*pow(m2,2)/2 # Power of DSBSC Wave (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"(i) Power of AM Wave for\",m1*100,\"% Modulation Depth is\",P_AM1,\"W\"\n",
+ "print \" Power of DSBSC Wave for\",m1*100,\"% Modulation Depth is\",P_DSBSC1,\"W\"\n",
+ "print \" Power saving of DSBSC compared to AM for\",m1*100,\"% Modulation Depth is\",Saving1,\"W\"\n",
+ "print \"(ii) Power Required for DSBSC Wave Transmission for\",m2*100,\"% Modulation Depth is\",P_DSBSC2,\"W\"\n",
+ "print \" Power of DSBSC is maximum for m = 1, and less for m < 1.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Power of AM Wave for 100.0 % Modulation Depth is 600.0 W\n",
+ " Power of DSBSC Wave for 100.0 % Modulation Depth is 200.0 W\n",
+ " Power saving of DSBSC compared to AM for 100.0 % Modulation Depth is 400.0 W\n",
+ "(ii) Power Required for DSBSC Wave Transmission for 75.0 % Modulation Depth is 112.5 W\n",
+ " Power of DSBSC is maximum for m = 1, and less for m < 1.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8, page no. 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_DSBSC = 1000 # Total Power (W)\n",
+ "m = 0.60 # Modulation Index\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "P_c = P_DSBSC*(2/pow(m,2)) # Carrier Power (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"We require\",round(P_c/pow(10,3),2),\"kW to transmit the carrier component along with the existing\",P_DSBSC/pow(10,3),\" kW for the sidebands.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We require 5.56 kW to transmit the carrier component along with the existing 1 kW for the sidebands.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9, page no.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_c = 400 # Carrier Power (W)\n",
+ "m1 = 1.0 # Modulation Index (for first part)\n",
+ "m2 = 0.75 # Modulation Index (for second part)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "# (i) Power saving of SSB compared to AM AND DSBSC for 100% Modulation Depth\n",
+ "P_AM1 = P_c*(1+pow(m1,2)/2) # Power of AM Wave (w)\n",
+ "P_DSBSC1 = P_c*pow(m1,2)/2 # Power of DSBSC Wave (w)\n",
+ "P_SSB1 = P_c*pow(m1,2)/4 # Power of SSB Wave (w)\n",
+ "Saving1 = P_AM1-P_SSB1 # Power Saving (w)\n",
+ "Saving2 = P_DSBSC1-P_SSB1 # Power Saving (w)\n",
+ "# (ii) Power Required for SSB Wave Transmission for 75% Modulation Depth\n",
+ "P_SSB2 = P_c*pow(m2,2)/4 # Power of SSB Wave (w)\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print \"(i) Power of SSB Wave for\",m1*100,\"% Modulation Depth is\",P_SSB1,\"W\"\n",
+ "print \" Power saving of SSB compared to AM for\",m1*100,\"% Modulation Depth is\",Saving1,\"W and compared to DSBSC for\",m1*100,\"% Modulation Depth is\",Saving2,\"W\"\n",
+ "print \"(ii) Power Required for SSB Wave Transmission for\",m2*100,\"% Modulation Depth is\",P_SSB2,\"W\"\n",
+ "print \" Power of SSB is maximum for m = 1, and less for m < 1.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Power of SSB Wave for 100.0 % Modulation Depth is 100.0 W\n",
+ " Power saving of SSB compared to AM for 100.0 % Modulation Depth is 500.0 W and compared to DSBSC for 100.0 % Modulation Depth is 100.0 W\n",
+ "(ii) Power Required for SSB Wave Transmission for 75.0 % Modulation Depth is 56.25 W\n",
+ " Power of SSB is maximum for m = 1, and less for m < 1.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10, page no. 49\u00b6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_SSB = 0.5*pow(10,3) # Total Power (W)\n",
+ "m = 0.60 # Modulation Index\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "P_c = P_SSB*(4/pow(m,2)) # Carrier Power (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"We require\",round(P_c/pow(10,3),2),\"kW to transmit the carrier component along with the existing\",P_SSB/pow(10,3),\"kW for the one sideband and\",1-P_SSB/pow(10,3),\"kW more for another sideband.\"\n",
+ "print \"In Total\",round(P_c/pow(10,3)+1,2),\"kW is required by the AM Transmitter\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We require 5.56 kW to transmit the carrier component along with the existing 0.5 kW for the one sideband and 0.5 kW more for another sideband.\n",
+ "In Total 6.56 kW is required by the AM Transmitter\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11, page no. 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "m1 = 1.0 # Modulation Index for (a)\n",
+ "m2 = 0.5 # Modulation Index for (b)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "# (a) Percentage Power Saving for Depth of Modulation 100 %\n",
+ "PAM_by_Pc1 = 1+pow(m1,2)/2 # Ratio of AM Wave to Carrier Power (W)\n",
+ "PSSB_By_Pc1 = pow(m1,2)/4 # Ratio of SSB Wave to Carrier Power (W)\n",
+ "Saving1 = (PAM_by_Pc1-PSSB_By_Pc1)/PAM_by_Pc1 # Power Saving (W)\n",
+ "# (b) Percentage Power Saving for Depth of Modulation 50 %\n",
+ "PAM_by_Pc2 = 1+pow(m2,2)/2 # Ratio of AM Wave to Carrier Power (W)\n",
+ "PSSB_By_Pc2 = pow(m2,2)/4 # Ratio of SSB Wave to Carrier Power (W)\n",
+ "Saving2 = (PAM_by_Pc2-PSSB_By_Pc2)/PAM_by_Pc2 # Power Saving (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"(a)Percentage Power Saving for Depth of Modulation of\",m1,\"is\",round(Saving1*100,1),\"%\"\n",
+ "print \"(b)Percentage Power Saving for Depth of Modulation of\",m2,\"is\",round(Saving2*100,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Percentage Power Saving for Depth of Modulation of 1.0 is 83.3 %\n",
+ "(b)Percentage Power Saving for Depth of Modulation of 0.5 is 94.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12, page no. 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_c = 400 # Carrier Power (W)\n",
+ "m1 = 1.0 # Modulation Index (for first part)\n",
+ "m2 = 0.75 # Modulation Index (for second part)\n",
+ "x = 0.2 # (*100)Percentage Wanted Sideband in VSB (%)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "# (i) Power saving of VSB compared to AM, DSBSC and SSB for 100% Modulation Depth\n",
+ "P_AM1 = P_c*(1+pow(m1,2)/2) # Power of AM Wave (W)\n",
+ "P_DSBSC1 = P_c*pow(m1,2)/2 # Power of DSBSC Wave (W) \n",
+ "P_SSB1 = P_c*pow(m1,2)/4 # Power of SSB Wave (W)\n",
+ "P_VSB1 = P_c*pow(m1,2)/4+x*P_c*pow(m1,2)/4 # Power of VSB Wave (W)\n",
+ "Saving1 = P_AM1-P_VSB1 # Power Saving (W)\n",
+ "Saving2 = P_DSBSC1-P_VSB1 # Power Saving (W)\n",
+ "Saving3 = P_VSB1-P_SSB1 # Power Saving (W)\n",
+ "# (ii) Power Required for VSB Wave Transmission for 75% Modulation Depth\n",
+ "P_VSB2 = P_c*pow(m2,2)/4+x*P_c*pow(m2,2)/4 # Power of VSB Wave (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"(i) Power Required for VSB Wave Transmission for\",m1*100,\"% Modulation Depth is\",P_VSB1,\"W\"\n",
+ "print \" Power saving of VSB compared to AM for\",m1*100,\"% Modulation Depth is\",Saving1,\"W and compared to DSBSC for\",m1*100,\"% Modulation Depth is\",Saving2,\"W and compared to SSB for\",m1*100,\"% Modulation Depth is\",Saving3,\"W\"\n",
+ "print \"(ii) Power Required for VSB Wave Transmission for\",m2*100,\"% Modulation Depth is\",P_VSB2,\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Power Required for VSB Wave Transmission for 100.0 % Modulation Depth is 120.0 W\n",
+ " Power saving of VSB compared to AM for 100.0 % Modulation Depth is 480.0 W and compared to DSBSC for 100.0 % Modulation Depth is 80.0 W and compared to SSB for 100.0 % Modulation Depth is 20.0 W\n",
+ "(ii) Power Required for VSB Wave Transmission for 75.0 % Modulation Depth is 67.5 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13, page no. 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "P_VSB = 0.625*pow(10,3) # Total Power (W)\n",
+ "m = 0.60 # Modulation Index\n",
+ "x = 0.25 # (*100) Percentage Power Transmitted of other Sideband (%)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "P_c = P_VSB*(4/((1+x)*pow(m,2))) # Carrier Power (W)\n",
+ "\n",
+ "# Result\n",
+ "print \"We require\",round(P_c/pow(10,3),2),\"kW to transmit the carrier component along with the existing\",P_VSB/pow(10,3),\"kW for the one sideband and\",1-P_VSB/pow(10,3),\"kW more for rest of the other sidebands.\"\n",
+ "print \"In Total\",round(P_c/pow(10,3)+1,2),\"kW is required by AM Transmitter\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We require 5.56 kW to transmit the carrier component along with the existing 0.625 kW for the one sideband and 0.375 kW more for rest of the other sidebands.\n",
+ "In Total 6.56 kW is required by AM Transmitter\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter4.ipynb b/Electronic_Communication_Systems/Chapter4.ipynb
new file mode 100755
index 00000000..be889b2d
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter4.ipynb
@@ -0,0 +1,460 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:82b1a87e5b1e62f448481647ab7f0e2ca7607ff780f8775431ec8c2b250882dc"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: Angle Modulation Techniques"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1, page no. 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Variable Declaration\n",
+ "fm1 = 500 # Audio Frequency (Hz)\n",
+ "Vm1 = 2.4 # AF Voltage (V)\n",
+ "del_f1 = 4.8*pow(10,3) # Deviation (Hz)\n",
+ "fm2 = 500 # Audio Frequency (Hz)\n",
+ "Vm2 = 7.2 # AF Voltage (V)\n",
+ "fm3 = 200 # Audio Frequency (Hz)\n",
+ "Vm3 = 10 # AF Voltage (V)\n",
+ "\n",
+ "# Calculation\n",
+ "import math\t # Math Library\n",
+ "kf = del_f1/Vm1 # Proportionality Constant\n",
+ "mf1 = del_f1/fm1 # Modulation Index\n",
+ "del_f2 = kf*Vm2 # Deviation (Hz)\n",
+ "mf2 = del_f2/fm2 # Modulation Index\n",
+ "del_f3 = kf*Vm3 # Deviation (Hz)\n",
+ "mf3 = del_f3/fm3 # Modulation Index\n",
+ " \n",
+ "# Result\n",
+ "\n",
+ "print \"CASE 1 : Modulation Index, mf1 =\",round(mf1,1)\n",
+ "print \" Deviation, del_f1 =\",round(del_f1/pow(10,3),1),\"kHz\"\n",
+ "print \"CASE 2 : Modulation Index, mf2 =\",round(mf2,1)\n",
+ "print \" Deviation, del_f2 =\",round(del_f2/pow(10,3),1),\"kHz\"\n",
+ "print \"CASE 3 : Modulation Index, mf3 =\",round(mf3)\n",
+ "print \" Deviation, del_f3 =\",round(del_f3/pow(10,3),1),\"kHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "CASE 1 : Modulation Index, mf1 = 9.6\n",
+ " Deviation, del_f1 = 4.8 kHz\n",
+ "CASE 2 : Modulation Index, mf2 = 28.8\n",
+ " Deviation, del_f2 = 14.4 kHz\n",
+ "CASE 3 : Modulation Index, mf3 = 100.0\n",
+ " Deviation, del_f3 = 20.0 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2, page no. 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "# GIVEN EXPRESSION : v = 12 sin(6 X 10^(8)t + 5 cos(1250t))\n",
+ "omega1 = 6.00*pow(10,8) # Angular Velocity (rad/s)\n",
+ "omega2 = 1250 # Angular Velocity (rad/s)\n",
+ "mf = 5 # Modulation Index\n",
+ "A = 12 # Amplitude (V)\n",
+ "R = 10 # Resistance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math\t # Math Library\n",
+ "fc = omega1/(2*math.pi) # Carrier frequency (Hz)\n",
+ "fm = omega2/(2*math.pi) # Modulating frequency (Hz)\n",
+ "del_f = mf*fm # Maximum deviation (Hz)\n",
+ "P = pow(A/math.sqrt(2),2)/R # Power dissipation (w)\n",
+ "\n",
+ "# Result\n",
+ "print \"Carrier frequency, fc =\",round(fc/pow(10,6),1),\" MHz\"\n",
+ "print \"Modulating frequency, fm =\",round(fm),\" Hz\"\n",
+ "print \"Modulation Index, mf =\",round(mf)\n",
+ "print \"Maximum deviation, del_f =\",round(del_f),\"Hz\"\n",
+ "print \"Power dissipation, P =\",round(P,1),\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Carrier frequency, fc = 95.5 MHz\n",
+ "Modulating frequency, fm = 199.0 Hz\n",
+ "Modulation Index, mf = 5.0\n",
+ "Maximum deviation, del_f = 995.0 Hz\n",
+ "Power dissipation, P = 7.2 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3, page no. 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "fm1 = 500 # Audio Frequency (Hz)\n",
+ "Vm1 = 2.4 # AF Voltage (V)\n",
+ "del_p1 = 4.8 # Deviation (kHz)\n",
+ "fm2 = 500 # Audio Frequency (Hz)\n",
+ "Vm2 = 7.2 # AF Voltage (V)\n",
+ "fm3 = 200 # Audio Frequency (Hz)\n",
+ "Vm3 = 10 # AF Voltage (V)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "kp = del_p1/Vm1 # Proportionality Constant\n",
+ "mp1 = del_p1 # Modulation Index\n",
+ "del_p2 = kp*Vm2 # Deviation (kHz)\n",
+ "mp2 = del_p2 # Modulation Index\n",
+ "del_p3 = kp*Vm3 # Deviation (kHz)\n",
+ "mp3 = del_p3 # Modulation Index\n",
+ " \n",
+ "# Result\n",
+ "print \"CASE 1 : Modulation Index, mp1 =\",round(mp1,1)\n",
+ "print \" Deviation, del_p1 =\",round(del_p1,1),\"kHz\"\n",
+ "print \"CASE 2 : Modulation Index, mp2 =\",round(mp2,1)\n",
+ "print \" Deviation, del_p2 =\",round(del_p2,1),\"kHz\"\n",
+ "print \"CASE 3 : Modulation Index, mp3 =\",round(mp3)\n",
+ "print \" Deviation, del_p3 =\",round(del_p3,1),\"kHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "CASE 1 : Modulation Index, mp1 = 4.8\n",
+ " Deviation, del_p1 = 4.8 kHz\n",
+ "CASE 2 : Modulation Index, mp2 = 14.4\n",
+ " Deviation, del_p2 = 14.4 kHz\n",
+ "CASE 3 : Modulation Index, mp3 = 20.0\n",
+ " Deviation, del_p3 = 20.0 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4, page no. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "# GIVEN EXPRESSION : v = 12 sin(6 X 10^(8)t + 5 cos(1250t))\n",
+ "omega1 = 6*pow(10,8) # Angular Velocity (rad/s)\n",
+ "omega2 = 1250 # Angular Velocity (rad/s)\n",
+ "mp = 5 # Modulation Index\n",
+ "A = 12 # Amplitude (V)\n",
+ "\n",
+ "# Calculation\n",
+ "import math\t # Math Library\n",
+ "fc = omega1/(2*math.pi) # Carrier frequency (Hz)\n",
+ "fm = omega2/(2*math.pi) # Modulating frequency (Hz)\n",
+ "del_p = mp # Maximum Deviation (kHz)\n",
+ "\n",
+ "# Result\n",
+ "print \"Carrier frequency, fc =\",round(fc/pow(10,6),1),\" MHz\"\n",
+ "print \"Modulating frequency, fm =\",round(fm),\" Hz\"\n",
+ "print \"Modulation Index, mp =\",round(mp),\"radians\"\n",
+ "print \"Maximum deviation, del_p =\",round(del_p),\"kHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Carrier frequency, fc = 95.5 MHz\n",
+ "Modulating frequency, fm = 199.0 Hz\n",
+ "Modulation Index, mp = 5.0 radians\n",
+ "Maximum deviation, del_p = 5.0 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5, page no. 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "# GIVEN EXPRESSION FM: v=A sin(omega_c*t + mf cos(omega_m*t))\n",
+ "# GIVEN EXPRESSION PM: v=A sin(omega_c*t + mp cos(omega_m*t))\n",
+ "A = 4 # Carrier Voltage (V)\n",
+ "del_f = 10.00*pow(10,3) # Maximum Frequency Deviation (Hz)\n",
+ "del_p = 25 # Maximum Phase Deviation (Hz)\n",
+ "f_c = 25.00*pow(10,6) # Carrier Frequency (Hz)\n",
+ "f_m1 = 400 # Modulating Frequency 1 (Hz)\n",
+ "f_m2 = 2000 # Modulating Frequency 2 (Hz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "omega_c = 2*math.pi*f_c # Angular Velocity of carrier (rad/s)\n",
+ "omega_m = 2*math.pi*f_m1 # Angular Velocity of Modulating Wave (rad/s)\n",
+ "mf1 = del_f/f_m1 # Modulation Index for FM\n",
+ "mf2 = del_f/f_m2 # Modulation Index for FM\n",
+ "mp = del_p # Modulation Index for PM\n",
+ "\n",
+ "# Result\n",
+ "print \"(a)For FM Case 1, v =\",round(A),\"sin(\",round(omega_c/pow(10,8),2),\"* 10^(8) * t +\",round(mf1),\"cos\",round(omega_m),\"* t )\"\n",
+ "print \"(b)For PM Case 1, v =\",round(A),\"sin(\",round(omega_c/pow(10,8),2),\"* 10^(8) * t +\",round(mp),\"cos\",round(omega_m),\"* t )\"\n",
+ "print \"(c)For FM Case 2, v =\",round(A),\"sin(\",round(omega_c/pow(10,8),2),\"* 10^(8) * t +\",round(mf2),\"cos\",round(omega_m),\"* t )\"\n",
+ "print \"(d)For PM Case 2, v =\",round(A),\"sin(\",round(omega_c/pow(10,8),2),\"* 10^(8) * t +\",round(mp),\"cos\",round(omega_m),\"* t )\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)For FM Case 1, v = 4.0 sin( 1.57 * 10^(8) * t + 25.0 cos 2513.0 * t )\n",
+ "(b)For PM Case 1, v = 4.0 sin( 1.57 * 10^(8) * t + 25.0 cos 2513.0 * t )\n",
+ "(c)For FM Case 2, v = 4.0 sin( 1.57 * 10^(8) * t + 5.0 cos 2513.0 * t )\n",
+ "(d)For PM Case 2, v = 4.0 sin( 1.57 * 10^(8) * t + 25.0 cos 2513.0 * t )\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6, page no. 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "del1 = 10.00*pow(10,3) # Maximum Deviation (Hz)\n",
+ "fm = 2.00*pow(10,3) # Modulating frequency (Hz)\n",
+ "H = 8 # Highest Needed Sideband from Table 4.1\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "mf = del1/fm # Modulation Index\n",
+ "delta = fm*H*2 # Bandwidth required for the FM signal (Hz)\n",
+ "\n",
+ "# Result\n",
+ "print \"Bandwidth required for the FM signal, delta =\",round(delta/pow(10,3)),\"kHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bandwidth required for the FM signal, delta = 32.0 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7, page no. 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "gm = 12.00* pow(10,-3) # Transconductance (Siemens) \n",
+ "f = 5.00*pow(10,6) # Frequency (Hz)\n",
+ "n = 9 # Constant, from X_GS = (1/9)X_GD\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "XCeq = n/gm # Capacitive Reactance of the FET (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"Capacitive reactance of the FET, XCeq =\",round(XCeq),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitive reactance of the FET, XCeq = 750.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8, page no. 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "gm = 9.00*pow(10,-3) # Transconductance (Siemens) \n",
+ "f = 50.00*pow(10,6) # Frequency (Hz)\n",
+ "n = 8 # Constant, from R_GS = (1/8)XC_GD\n",
+ "C = 50.00*pow(10,-12) # Capacitance (F)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Cn = 0 # Minimum Equivalent Capacitance of FET (F)\n",
+ "Cx = gm/(2*math.pi*f*n) # Maximum Equivalent Capacitance of FET (F)\n",
+ "fx_by_fn = math.sqrt(1+Cx/C) # Maximum to Minimum Frequency Ratio\n",
+ "delta = (fx_by_fn-1)*f/(fx_by_fn+1) # Total frequency variation of FET (Hz)\n",
+ "\n",
+ "# Result\n",
+ "print \"Total frequency variation of FET =\",round(2*delta/pow(10,6),2),\"MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total frequency variation of FET = 1.73 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9, page no. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "gm_max = 830.00*pow(10,-6) # Max. Transconductance (Siemens)\n",
+ "gm_min = 320.00*pow(10,-6) # Min. Transconductance (Siemens) \n",
+ "f = 88.00*pow(10,6) # Frequency (Hz)\n",
+ "n = 10 # Constant, from R_GS = (1/10)XC_GD\n",
+ "delta = 75*pow(10,3) # Maximum Deviation (Hz)\n",
+ "Vgs1 = -2 # Gate Source Voltage (V)\n",
+ "Vgs2 = -0.5 # Gate Source Voltage (V)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Vm_rms = -(Vgs1-Vgs2)/(2*math.sqrt(2)) # RMS value of required voltage modulating voltage (V)\n",
+ "Cn = gm_min/(2*math.pi*f*n) # Minimum Equivalent Capacitance of FET (F)\n",
+ "Cx = Cn*gm_max/gm_min # Maximum Equivalent Capacitance of FET (F)\n",
+ "C = (Cx-Cn)*f/(4*delta)-Cn # Capacitance (F)\n",
+ "L = 1/(4*pow(math.pi*f,2)*C) # Inductance (H)\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) RMS value of required modulating voltage, Vm_rms =\",round(Vm_rms,2),\"V\"\n",
+ "print \"(b) Capacitance, C =\",round(C/pow(10,-12)),\"pF\"\n",
+ "print \" Inductance, L =\",round(L/pow(10,-6),3),\"uH\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) RMS value of required modulating voltage, Vm_rms = 0.53 V\n",
+ "(b) Capacitance, C = 27.0 pF\n",
+ " Inductance, L = 0.121 uH\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter5.ipynb b/Electronic_Communication_Systems/Chapter5.ipynb
new file mode 100755
index 00000000..c71801d8
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter5.ipynb
@@ -0,0 +1,98 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:41db786e06a01c332ebd11f188e721e6640c124416532b39896420ba483ab6cd"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: Pulse Modulation Techniques "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1, page no. 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "F_m = 4.00*pow(10,3) # Maximum Frequency Component in Message Signal (Hz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "F_s = 2*F_m\t # Minimum Sampling Frequency using Sampling Theorem (Hz)\n",
+ "\n",
+ "# Result\n",
+ "print \"F_s >=(greater than or equal to)\",F_s/pow(10,3),\"kHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F_s >=(greater than or equal to) 8.0 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2, page no. 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "F1 = 500 # Single Tone Sine Wave Frequency in Message Signal (Hz)\n",
+ "F2 = 750 # Lowest Value Sound Frequency in Message Signal (Hz)\n",
+ "F3 = 1800 # Highest Value Sound Frequency in Message Signal (Hz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math\t # Math Library\n",
+ "F_m = max(F1,F2,F3) # Maximum Frequency Component (Hz)\n",
+ "F_s = 2*F_m\t # Minimum Sampling Frequency using Sampling Theorem (Hz)\n",
+ "\n",
+ "# Result\n",
+ "print \"F_s >=(greater than or equal to)\",F_s,\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F_s >=(greater than or equal to) 3600 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter7.ipynb b/Electronic_Communication_Systems/Chapter7.ipynb
new file mode 100755
index 00000000..1d5a897b
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter7.ipynb
@@ -0,0 +1,164 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cd13dfdb6dd7420874a1c992512f922297a6fa769a755d9c2c04bb32f02bdf3a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Radio Transmitters and Receivers "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1, page no. 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "fs1 = 1.00*pow(10,6) # Sampling Frequency (Hz)\n",
+ "fs2 = 25.00*pow(10,6) # Sampling Frequency (Hz)\n",
+ "fi = 455.00*pow(10,3) # Intermediate Frequency (Hz)\n",
+ "Q = 100.00 # Loaded Q of the antenna coupling circuit \n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "fsi1 = fs1+2*fi # Image Frequency (Hz)\n",
+ "rho1 = fsi1/fs1-fs1/fsi1 # Constant 1\n",
+ "alpha1 = math.sqrt(1+pow(Q*rho1,2)) # Rejection Ratio 1\n",
+ "fsi2 = fs2+2*fi # Image Frequency (Hz) \n",
+ "rho2 = fsi2/fs2-fs2/fsi2 # Constant 2\n",
+ "alpha2 = math.sqrt(1+pow(Q*rho2,2)) # Rejection Ratio 2\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) Image Frequency, fsi =\",fsi1/pow(10,3),\"kHz\"\n",
+ "print \" rho =\",round(rho1,3)\n",
+ "print \" Image Rejection, Alpha =\",round(alpha1,1)\n",
+ "print \"(b) Image Frequency, fsi =\",fsi2/pow(10,6),\"MHz\"\n",
+ "print \" rho =\",round(rho2,4)\n",
+ "print \" Image Rejection, Alpha =\",round(alpha2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Image Frequency, fsi = 1910.0 kHz\n",
+ " rho = 1.386\n",
+ " Image Rejection, Alpha = 138.6\n",
+ "(b) Image Frequency, fsi = 25.91 MHz\n",
+ " rho = 0.0715\n",
+ " Image Rejection, Alpha = 7.22\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2, page no. 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "alpha1 = 138.6 # Image Rejection From Example 7.1\n",
+ "alpha2 = 7.22 # Image Rejection From Example 7.1\n",
+ "rho = 0.0715 # Constant From Example 7.1\n",
+ "Q = 100.00 # Loaded Q From Example 7.1\n",
+ "fsi_dash = 1.91*pow(10,6) # Image Frequency (Hz)\n",
+ "fs_dash = 1.00*pow(10,6) # Sampling Frequency 1 (Hz)\n",
+ "fs = 25.00*pow(10,6) # Sampling Frequency 2 (Hz)\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Q_dash = math.sqrt(pow(alpha1/alpha2,2)-1)/rho # Loaded Q of the RF amplifier\n",
+ "fi_dash = (fsi_dash/fs_dash*fs-fs)/2 # Intermediate Frequency (Hz) \n",
+ "\n",
+ "# Result\n",
+ "print \"(a) The Q of the circuit is\",round(math.sqrt(Q*Q_dash)),\", which is the geometric mean of\",round(Q),\"and\",round(Q_dash)\n",
+ "print \"(b) Intermediate Frequency, fi_dash =\",round(fi_dash/pow(10,6),1),\"MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The Q of the circuit is 164.0 , which is the geometric mean of 100.0 and 268.0\n",
+ "(b) Intermediate Frequency, fi_dash = 11.4 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3, page no. 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "R1 = 110.00*pow(10,3) # RESISTANCE 1 (Ohms)\n",
+ "R2 = 220.00*pow(10,3) # RESISTANCE 2 (Ohms)\n",
+ "R3 = 470.00*pow(10,3) # RESISTANCE 3 (Ohms)\n",
+ "R4 = 1.00*pow(10,6) # RESISTANCE 4 (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Rc = R1+R2 # Resistance (Ohm)\n",
+ "Zm = R2*R3*R4/(R2*R3+R3*R4+R2*R4)+R1 # Impedance (Ohm)\n",
+ "m_max = Zm/Rc # Maximum Modulation Index\n",
+ "\n",
+ "# Result\n",
+ "print \"Maximum Modulation Index, m_max =\",round(m_max*pow(10,2)),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum Modulation Index, m_max = 73.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/Chapter9.ipynb b/Electronic_Communication_Systems/Chapter9.ipynb
new file mode 100755
index 00000000..41eca70b
--- /dev/null
+++ b/Electronic_Communication_Systems/Chapter9.ipynb
@@ -0,0 +1,443 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c4970c321276b9f7170413d941bf292098cec215a7f4a0308f53e52cf40aad5c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9: Transmission Lines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1, page no. 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Zo = 75 # Characteristic Impedance (Ohms) \n",
+ "C = 69.00*pow(10,-12) # Nominal Capacitance (F/m)\n",
+ "Di = 0.584*pow(10,-3) # Inner core diameter (m)\n",
+ "k = 2.23 # Dielectric Constant\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "L = pow(Zo,2)*C # Inductance per meter (H/m)\n",
+ "Do = Di*pow(10,Zo*math.sqrt(k)/138) # Outer core diameter (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"Inductance per meter, L =\",round(L/pow(10,-6),3),\"uH/m\"\n",
+ "print \"Outer Diameter, D =\",round(Do/pow(10,-3),2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inductance per meter, L = 0.388 uH/m\n",
+ "Outer Diameter, D = 3.78 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2, page no. 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "s = 1 # Assumed s (m)\n",
+ "d = s # Condition for minimum Zo (m)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Zo_min = 276*math.log10(2*s/d) # Minimum value of characteristic impedance (Ohms)\n",
+ " \n",
+ "# Result\n",
+ "print \"The minimum value of characteristic impedance, Zo_min =\",round(Zo_min),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum value of characteristic impedance, Zo_min = 83.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3, page no. 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Zo = 2000 # Characteristic Impedance (Ohms) \n",
+ "Di = 0.025*pow(10,-3) # Inner cable diameter (m)\n",
+ "k = 2.56 # Dielectric Constant \n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Do = Di*pow(10,Zo*math.sqrt(k)/138) # Outer conductor diameter (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"Outer Diameter, D =\",round(Do/pow(10,18),2),\"* 10^(15) km or\",round(Do/(9.44*pow(10,15))),\"light years\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Outer Diameter, D = 3.86 * 10^(15) km or 409.0 light years\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4, page no. 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Zo = 200 # Characteristic Impedance of main line (Ohms) \n",
+ "Zl = 300 # Load Impedance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Zo1 = math.sqrt(Zo*Zl) # Characteristic impedance of the quarter wave transformer (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"Characteristic impedance of the quarter wave transformer, Zo1 =\",round(Zo1),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Characteristic impedance of the quarter wave transformer, Zo1 = 245.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5, page no. 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Zl = complex(200,75) # Load Impedance (Ohms)\n",
+ "Zo = 300 # Characteristic Impedance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "Yl = 1/Zl # Admittance (Mho)\n",
+ "Bstub = 1/Yl.imag # Reactance of the Stub (Ohms)\n",
+ "Gl = Yl.real # Real Part of Admittance (Mho)\n",
+ "Rl = 1/Gl # Resistance (Ohms)\n",
+ "Zo1 = math.sqrt(Zo*Rl) # Characteristic impedance of the quarter wave transformer (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"Reactance of the stub, Bstub =\",round(Bstub,1),\"Ohms\"\n",
+ "print \"Characteristic impedance of the quarter wave transformer, Zo1 =\",round(Zo1),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reactance of the stub, Bstub = -608.3 Ohms\n",
+ "Characteristic impedance of the quarter wave transformer, Zo1 = 262.0 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6, page no. 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Y = complex(0.004,0.002) # Load Susceptance (Ohms)\n",
+ "Yo = 0.0033 # Ohms - Characteristic Admittance (Ohms)\n",
+ "f = 150*pow(10,6) # Operating Frequency (Hz)\n",
+ "vc = 3*pow(10,8) # Speed of light in vacuum (m/s)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "y = Y/Yo # Normalized susceptance required to cancel loads normalized susceptance\n",
+ "Lambda = vc/f # Wavelength (m)\n",
+ "Length = 0.337*Lambda # Length from Smith Chart (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"Normalized susceptance required to cancel loads normalized susceptance = +j *\",round(y.imag,2)\n",
+ "print \"Length =\",round(Length*100,1),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized susceptance required to cancel loads normalized susceptance = +j * 0.61\n",
+ "Length = 67.4 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.7, page no. 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Z = complex(100,50) # Load Impedance (Ohms)\n",
+ "Zo = 75 # Characteristic Impedance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "z = Z/Zo # Normalized Load Impedance (Ohms)\n",
+ "Zg = 39.8 # Resistance at Distance = 0.184* Lambda, from Smith Chart (Ohms)\n",
+ "Zo_dash = math.sqrt(Zg*Zo) # Impedance of the transformer (Ohms)\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) From Smith Chart the Distance = 0.184 * Lambda\"\n",
+ "print \"(b) Zo_dash for the transformer, Zo' =\",round(Zo_dash,1),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) From Smith Chart the Distance = 0.184 * Lambda\n",
+ "(b) Zo_dash for the transformer, Zo' = 54.6 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.8, page no. 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Z = complex(450,-600) # Load Impedance (Ohms)\n",
+ "Zo = 300 # Characteristic Impedance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "z = Z/Zo # Normalized Load Impedance (Ohms)\n",
+ "s = 4.6 # Standing Wave Ratio\n",
+ "L = 1/(2*math.pi)*math.atan(math.sqrt(s)/(s-1)) # (* Lambda) Stub Length (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"Normalized load Impedance = \",z\n",
+ "print \"From Smith Chart the Distance to the stub = 0.130 * Lambda\"\n",
+ "print \"Stub Length =\",round(L,3),\"* Lambda\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized load Impedance = (1.5-2j)\n",
+ "From Smith Chart the Distance to the stub = 0.130 * Lambda\n",
+ "Stub Length = 0.086 * Lambda\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9, page no. 254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Z = complex(450,-600) # Load Impedance (Ohms)\n",
+ "Zo = 300 # Characteristic Impedance (Ohms)\n",
+ "f1 = 10 # Old frequency (MHz)\n",
+ "f2 = 12 # New frequency (MHz)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "z = Z/Zo # Normalized Load Impedance (Ohms)\n",
+ "z1 = z.imag * f1/f2 # Intermediate Impedance (Ohms)\n",
+ "z = complex(z.real,z1) # Normalized Load Impedance (Ohms)\n",
+ "s = 4.6 # Standing Wave Ratio\n",
+ "L = 1/(2*math.pi)*math.atan(math.sqrt(s)/(s-1))*f2/f1 # (* Lambda')Stub Length (m)\n",
+ "\n",
+ "# Result\n",
+ "print \"Normalized load Impedance = \",z\n",
+ "print \"From Smith Chart the Distance to the stub = 0.156 * Lambda'\"\n",
+ "print \"Stub Length =\",round(L,3),\"* Lambda'\"\n",
+ "print \"From Smith chart SWR = 2.2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized load Impedance = (1.5-1.66666666667j)\n",
+ "From Smith Chart the Distance to the stub = 0.156 * Lambda'\n",
+ "Stub Length = 0.103 * Lambda'\n",
+ "From Smith chart SWR = 2.2\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.10, page no. 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "Z = 200.00 # Load Impedance (Ohms)\n",
+ "Zo = 300.00 # Characteristic Impedance (Ohms)\n",
+ "\n",
+ "# Calculation\n",
+ "import math # Math Library\n",
+ "z = Z/Zo # Normalized Load Impedance (Ohms)\n",
+ "L1_by_Lambda = 0.311 # Ratio from Smith Chart\n",
+ "L2_by_Lambda1 = L1_by_Lambda*1.1 # Ratio\n",
+ "\n",
+ "# Result\n",
+ "print \"(a) Normalized load Impedance = \",round(z,2)\n",
+ "print \" From Smith Chart the Distance to the stub = 0.11 * Lambda\"\n",
+ "print \" From Smith Chart the Length of stub = 0.311 * Lambda\"\n",
+ "print \"(b) New Length of stub =\",round(L2_by_Lambda1,3),\"* Lambda'\"\n",
+ "print \" From Smith chart SWR = 1.3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Normalized load Impedance = 0.67\n",
+ " From Smith Chart the Distance to the stub = 0.11 * Lambda\n",
+ " From Smith Chart the Length of stub = 0.311 * Lambda\n",
+ "(b) New Length of stub = 0.342 * Lambda'\n",
+ " From Smith chart SWR = 1.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_Communication_Systems/README.txt b/Electronic_Communication_Systems/README.txt
new file mode 100755
index 00000000..b681cbb1
--- /dev/null
+++ b/Electronic_Communication_Systems/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Mohammad Faisal Siddiqi
+Course: btech
+College/Institute/Organization: Jamia Milia Islamia, Delhi
+Department/Designation: Electronics & CommunicationsEngg
+Book Title: Electronic Communication Systems
+Author: George Kennedy, Bernard Davis & A. R. M. Prasanna
+Publisher: Tata Mcgraw Hill Education Private Limited
+Year of publication: 2012
+Isbn: 978007107782-8
+Edition: 5th \ No newline at end of file
diff --git a/Electronic_Communication_Systems/screenshots/capacityTele.png b/Electronic_Communication_Systems/screenshots/capacityTele.png
new file mode 100755
index 00000000..ecc089b5
--- /dev/null
+++ b/Electronic_Communication_Systems/screenshots/capacityTele.png
Binary files differ
diff --git a/Electronic_Communication_Systems/screenshots/cuttoff.png b/Electronic_Communication_Systems/screenshots/cuttoff.png
new file mode 100755
index 00000000..29247db2
--- /dev/null
+++ b/Electronic_Communication_Systems/screenshots/cuttoff.png
Binary files differ
diff --git a/Electronic_Communication_Systems/screenshots/maxModulation.png b/Electronic_Communication_Systems/screenshots/maxModulation.png
new file mode 100755
index 00000000..9e113893
--- /dev/null
+++ b/Electronic_Communication_Systems/screenshots/maxModulation.png
Binary files differ
diff --git a/Introduction_To_Modern_Physics_Volume_1/README.txt b/Introduction_To_Modern_Physics_Volume_1/README.txt
new file mode 100755
index 00000000..53b29955
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Nisha Raj
+Course: btech
+College/Institute/Organization: IAF
+Department/Designation: Flying Officer
+Book Title: Introduction To Modern Physics Volume 1
+Author: R. B. Singh
+Publisher: New Age International, New Delhi
+Year of publication: 2009
+Isbn: 9788122429220
+Edition: 2 \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/UNIT_1,Chapter_1.ipynb b/Introduction_To_Modern_Physics_Volume_1/UNIT_1,Chapter_1.ipynb
new file mode 100755
index 00000000..cc6e8d64
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/UNIT_1,Chapter_1.ipynb
@@ -0,0 +1,889 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:The special theory of relativity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "x=50.0\n",
+ "y=20.0\n",
+ "z=10.0 #x,y,z cordinates in meters(frame s)\n",
+ "t=5.0*10**(-8) #time in seconds(frame s)\n",
+ "velocity=0.6*3*10**8 #velocity of observer in s' frame relative to s in meter/second\n",
+ "c=3.0*10.0**8 #speed of light in meter/second\n",
+ "Beta=0.6 \n",
+ "Gamma=1.0/((1.0-Beta**2)**(1.0/2.0)) \n",
+ "\n",
+ "#Calculation \n",
+ "xdash=Gamma*(x-(velocity*t)) #value of x cordinate in frame s' in meters\n",
+ "ydash=y #value of y cordinate in frame s' in meters\n",
+ "zdash=z #value of z cordinate in frame s' in meters\n",
+ "tdash=Gamma*(t-((velocity*x)/(c**2))) #value of t in frame s' in seconds\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nValue of space time cordinates in frame s`:\\n\\t x`=\",xdash,\" m\\n\\t y`=\",ydash,\"m\\n\\t z`=\",zdash,\"m\\n\\t t`=\",tdash,\"s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Value of space time cordinates in frame s`:\n",
+ "\t x`= 51.25 m\n",
+ "\t y`= 20.0 m\n",
+ "\t z`= 10.0 m\n",
+ "\t t`= -6.25e-08 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "x1=20.0 #position of event 1 in meters(frame s)\n",
+ "t1=2.0*10**(-8) #time of event 1 in seconds(frame s)\n",
+ "x2=60.0 #position of event 2 in meters(frame s)\n",
+ "t2=3.0*10**(-8) #time of event 2 in seconds(frame s)\n",
+ "c=3.0*10**8 #speed of light in meter/second\n",
+ "v=0.6*c #speed of frame s' relative to frame s (meter/second)\n",
+ "Beta=0.6\n",
+ "Gamma=1.0/((1.0-Beta**2.0)**(1.0/2.0)) \n",
+ "\n",
+ "#Calculation\n",
+ "#part(i)\n",
+ "separation=Gamma*((x2-x1)-v*(t2-t1)) #spatial separation of the events in frame s' (meter)\n",
+ "#part(ii)\n",
+ "interval=Gamma*((t2-t1)-(v*(x2-x1))/(c**2)) #time interval between the two events in frame s' (second)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nIn frame s`:\\n\\t (i)spatial separation=\",separation,\"m\\n\\t (ii)time interval=\",interval,\"s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In frame s`:\n",
+ "\t (i)spatial separation= 47.75 m\n",
+ "\t (ii)time interval= -8.75e-08 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "x1=24.0 #position of event 1 in meters(frame s)\n",
+ "t1=8.0*10**(-8) #time of event 1 in seconds(frame s)\n",
+ "x2=48.0 #position of event 2 in meters(frame s)\n",
+ "t2=4.0*10**(-8) #time of event 2 in seconds(frame s)\n",
+ "c=3.0*10**8 #speed of light in meter/second\n",
+ "\n",
+ "#calculation \n",
+ "v=((c**2)*(t2-t1))/(x2-x1) #velocity of the frame s' (meter/second)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nvelocity of the frame s` =\",v/(3*10**8),\"c\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "velocity of the frame s` = -0.5 c\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6,Page no:33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy\n",
+ "#variable declaration\n",
+ "interval_s=1.0 #time difference between two events in frame s (second)\n",
+ "interval_sdash=4.0 #time difference between two events in frame s' (second)\n",
+ "separation_s=0.0 #spatial separation of two events in frame s (meter)\n",
+ "c=3.0*10**8 #speed of light (meter/second)\n",
+ "v=numpy.random.rand() #assign a random value to unknown velocity(meter/second)\n",
+ "import math\n",
+ "#calculation \n",
+ "Gamma=interval_sdash/(interval_s-(v*(separation_s))/(c**2)) #calculating gamma\n",
+ "separation=-2.0*(((Gamma**2.0)-1)**(1.0/2.0))*c #spatial separation in s' (meter)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nspatial separation of the events in frame s` =\",separation/(3*10**8*math.sqrt(15)),\"c sqrt(15)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "spatial separation of the events in frame s` = -2.0 c sqrt(15)\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7,Page no:33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy\n",
+ "#variable declaration\n",
+ "interval_s=0.0 #time difference between two events in frame s (second)\n",
+ "separation_s=1.0 #spatial separation of two events in frame s (meter)\n",
+ "separation_sdash=2.0 #spatial separation of two events in frame s' (meter)\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "v=numpy.random.rand() #assign a random value to unknown velocity of frame s' with respect to frame s (meter/second)\n",
+ "\n",
+ "#calculation \n",
+ "Gamma=separation_sdash/(separation_s-(v*interval_s)) #calculating value of Gamma\n",
+ "Beta=(1-1/(Gamma**2))**(1/2) #calculating value of Beta\n",
+ "v=Beta*c #velocity of s' with respect to s (meter/second)\n",
+ "interval_sdash=Gamma*(interval_s-((v*separation_s)/(c**2))) #time interval between the events in frame s' (second)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe time interval between the events in frame s` =\",interval_sdash/(3*10**8),\"X0\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The time interval between the events in frame s` = -2.22222222222e-17 X0\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:8,Page no:34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "IbyI_not=.99 #ratio of moving length and rest length\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "\n",
+ "#calculation\n",
+ "Beta=(1-IbyI_not**2)**(1/2.0) #calculating value of Beta\n",
+ "v=Beta*c #velocity of rocket ship (meter/second)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe velocity of the rocket ship = %.2e\"%(v/(3*10**8)),\"c\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The velocity of the rocket ship = 1.41e-01 c\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9,Page no:34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "l_dash=1.0 #length of the rod in frame s' (meter)\n",
+ "Theta_dash_degree=45.0 #angle of the rod with x-axis in frame s' (degree)\n",
+ "Beta=1/2.0 #value of Beta\n",
+ "import math\n",
+ "\n",
+ "#calculation \n",
+ "Theta_dash_radian=Theta_dash_degree*(math.pi/180.0) #conversion of angle Theta in radian from degree (radian)\n",
+ "l=((l_dash**2)*((math.sin(Theta_dash_radian))**2+((1-(Beta**2))*((math.cos(Theta_dash_radian))**2))))**(1.0/2.0) #length of the rod in frame s (meter)\n",
+ "tan_theta=math.tan(Theta_dash_radian)/((1.0-Beta**2)**(1.0/2.0)) #tan of angle of rod with x-axis in frame s\n",
+ "theta=math.atan(tan_theta) #angle of rod with x-axis in frame s (degree)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe length of the rod =\",round(l,2),\"m\\nInclination of rod with x-axis =\",round(math.degrees(theta)),\" degree\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The length of the rod = 0.94 m\n",
+ "Inclination of rod with x-axis = 49.0 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:10,Page no:34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "\n",
+ "#calculation \n",
+ "Beta=(1-((1/1.25)**2))**(1.0/2.0) #calculating Beta (1.25 comes from the fact that in frame s' density of bloc is 25% greater than frame s)\n",
+ "v=Beta*c #velocity of the reference frame s'\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nBeta =\",Beta\n",
+ "print\"NOTE solved in book:\\nThe velocity of the frame s` = %.1e\"%v,\" m/s\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Beta = 0.6\n",
+ "NOTE solved in book:\n",
+ "The velocity of the frame s` = 1.8e+08 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 93
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11,Page no:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "del_tao=1436.0 #min\n",
+ "del_t=1440.0 #min\n",
+ "\n",
+ "#Calculation\n",
+ "def f(b):\n",
+ " return(del_t-del_tao/(math.sqrt(1-b**2)))\n",
+ "\n",
+ "from scipy.optimize import fsolve\n",
+ "be=fsolve(f,0.5)\n",
+ "\n",
+ "#Result\n",
+ "print\"Beta=\",be[0],\"=1/(sqrt(180))\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Beta= 0.0744838204322 =1/(sqrt(180))\n"
+ ]
+ }
+ ],
+ "prompt_number": 107
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12,Page no:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "deltaTow=1*10**(-6) #mean proper lifetime of particle (second)\n",
+ "Beta=0.9 #value of Beta\n",
+ "v=2.7*10**8 #velocity of particle (meter/second)\n",
+ "\n",
+ "#Calculation\n",
+ "#part(i)\n",
+ "deltaT=deltaTow/((1-Beta**2)**(1.0/2.0)) #lifetime of the particle in the laboratory frame (second)\n",
+ "#part(ii)\n",
+ "d=v*deltaT #distance traversed by the particle in the laboratory before disintegration (meter)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nIn laboratory frame:\\n\\t(i)Lifetime of the particle = %.2e\"%deltaT,\"s\\n\"\n",
+ "print\"\\t(ii)Distance traversed by the particle = %.2g\"%d,\" m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "In laboratory frame:\n",
+ "\t(i)Lifetime of the particle = 2.29e-06 s\n",
+ "\n",
+ "\t(ii)Distance traversed by the particle = 6.2e+02 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13,Page no:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "d=3.0 #km\n",
+ "d=d*1000.0 #[m]\n",
+ "c=3.0*10**8 #m/s speed of light\n",
+ "\n",
+ "#Calculation\n",
+ "v=0.99*c #muon velocity\n",
+ "b=(v**2)/(c**2)\n",
+ "\n",
+ "del_t=d/v\n",
+ "del_tao=del_t*math.sqrt(1-0.99**2)\n",
+ "#In moun's frame,\n",
+ "d_dash=d*math.sqrt(1-0.99**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"(i)Proper lifetime of the muon= %.1e\"%del_tao,\"s\"\n",
+ "print\"(ii)In muon's frame,distance travelled by it is %.3e\"%d_dash,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Proper lifetime of the muon= 1.4e-06 s\n",
+ "(ii)In muon's frame,distance travelled by it is 4.232e+02 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 130
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14,Page no:36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "import sympy\n",
+ "c=sympy.Symbol(\"c\")\n",
+ "u1=0.6*c #speed of Beta particle 1 in lab frame (meter/second)\n",
+ "u2=-0.8*c #speed of Beta particle 2 in lab frame (meter/second)\n",
+ "v=u1 #velocity of frame s' where frame s' is attached to the first Beta particle (meter/second)\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "u2_dash=(u2-v)/(1-((u2*v)/c**2)) #velocity of 2nd Beta particle relative to the 1st Beta particle (meter/second)\n",
+ "\n",
+ "#Result\n",
+ "print\"The velocity of 2nd Beta particle relative to the 1st Beta particle =\",round(u2_dash/c,3)*c\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of 2nd Beta particle relative to the 1st Beta particle = -0.946*c\n"
+ ]
+ }
+ ],
+ "prompt_number": 140
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15,Page no:36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable declaration\n",
+ "m0=1.0 #let rest mass of particle to be 1 (kg)\n",
+ "m=3.0*m0 #moving mass of particle (kg)\n",
+ "import sympy #speed of light (meter/second)\n",
+ "c=sympy.Symbol(\"c\")\n",
+ "\n",
+ "#calculation \n",
+ "Beta=(1-(m0/m)**2)**(1.0/2.0) #Calculation fo Beta\n",
+ "v=Beta*c #speed of particle (meter/second)\n",
+ "\n",
+ "#Result\n",
+ "print\"The speed of The particle =\",round(v/c,3)*c,\"=((2*sqrt 2)/3)c\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of The particle = 0.943*c =((2*sqrt 2)/3)c\n"
+ ]
+ }
+ ],
+ "prompt_number": 142
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:23,Page no:38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "RestEnergy=0.51 #energy of electron if the electron is at rest (Mev)\n",
+ "T=2 #kinetic energy of electron (Bev)\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#E=T=pc\n",
+ "\n",
+ "from sympy import Symbol\n",
+ "c=Symbol(\"c\") #speed of light (meter/second)\n",
+ "p=(T/c) #momentum of electron neglecting rest energy relative to kinetic energy (Bev*second/meter)\n",
+ "\n",
+ "#Result\n",
+ "print\"The momentum of the electron =\",p,\"BeV/c\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The momentum of the electron = 2/c BeV/c\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:24,Page no:38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=0.01 #fractional increase in momentum\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "\n",
+ "#Calculation\n",
+ "Beta=(n*(2-n))**(1.0/2.0) #calculation of Beta\n",
+ "v=Beta*c #velocity of particle (meter/second)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nBeta =\",round(Beta,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Beta = 0.14\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:26,Page no:39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "RestEnergy=0.51 #rest energy of electron (Mev)\n",
+ "T=1.0 #potential difference i.e. kinetic energy (Mev)\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "\n",
+ "#Calculation\n",
+ "Beta=(1-(RestEnergy/(T+RestEnergy))**2)**(1.0/2.0) #calculation of Beta\n",
+ "v=Beta*c #speed of electron (meter/second)\n",
+ "\n",
+ "#Result\n",
+ "print\"The speed of the electron,Beta =\",round(Beta,4)\n",
+ "print\"Note: In the book answer of Beta is wrong\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the electron,Beta = 0.9412\n",
+ "Note: In the book answer of Beta is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:27,Page no:39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "RestEnergy=0.51 #rest energy of electron (Mev)\n",
+ "T=2000.0 #potential difference i.e. kinetic energy (Mev)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#part(i)effective mass of electron in terms of its rest mass\n",
+ "EffectiveMass=1+(T/RestEnergy) #ratio of effective mass of electron and rest mass\n",
+ "#part(ii)speed of electron in terms of the speed of light\n",
+ "Beta=(1-(1/EffectiveMass)**2)**(1.0/2.0) #Calculatio of Beta\n",
+ "import sympy\n",
+ "eff_mass=sympy.Symbol(\"3923\")\n",
+ "beta=((1-(1/eff_mass)**2))**(1.0/2.0) #Calculatio of Beta\n",
+ "\n",
+ "#Result\n",
+ "print\"The effective mass of electron in terms of its rest mass is\",round(EffectiveMass)\n",
+ "print\"The speed of electron =\",beta,\"c is speed of light\" \n",
+ "print\"OR after solving:\"\n",
+ "print\"Speed of electron=%.2f\"%Beta,\"c\"\n",
+ "print\"\\nNote: Wrong answer in book\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effective mass of electron in terms of its rest mass is 3923.0\n",
+ "The speed of electron = (1 - 1/3923**2)**0.5 c is speed of light\n",
+ "OR after solving:\n",
+ "Speed of electron=1.00 c\n",
+ "\n",
+ "Note: Wrong answer in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:28,Page no:39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "c=3*10**8 #speed of light(meter/second)\n",
+ "v1=0.6*c #initial velocity of particle (meter/second)\n",
+ "v2=0.8*c #final velocity of particle (meter/second)\n",
+ "\n",
+ "#Calculation\n",
+ "#Classically\n",
+ "W_Classic=0.5*((v2/c)**2-(v1/c)**2) #ratio of work and m0*c**2 (mo is the rest mass of particle and c is the speed of light)\n",
+ "#Relativistically\n",
+ "W_Relative=(1/(1-(v2/c)**2)**(1.0/2.0))-(1/(1-(v1/c)**2)**(1.0/2.0)) #ratio of work and m0*c**2 (mo is the rest mass of particle and c is the speed of light)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nWork required:\\n\\t Classically: Work =\",W_Classic,\"*m0*c**2\\n\\t Relativistically: Work =\",round(W_Relative,3),\"*m0*c**2\\nWhere m0:rest mass of particle & c:speed of light\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Work required:\n",
+ "\t Classically: Work = 0.14 *m0*c**2\n",
+ "\t Relativistically: Work = 0.417 *m0*c**2\n",
+ "Where m0:rest mass of particle & c:speed of light\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:29,Page no:40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=6.63*10**-34 #planck's constant (joule*second)\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "lambda1=5000*10**-10 #wavelength (meter)\n",
+ "lambda2=0.1*10**-10 #wavelength (meter)\n",
+ "\n",
+ "#Calculation\n",
+ "#part(i): wavelength=5000 \u00c5\n",
+ "m1=h/(lambda1*c) #effective mass of photon of wavelength 5000 \u00c5\n",
+ "#part(ii): wavelength=0.1 \u00c5\n",
+ "m2=h/(lambda2*c) #effective mass of photon of wavelength 0.1 \u00c5\n",
+ "\n",
+ "#Result\n",
+ "print\"Effective mass of photon:\\n\\t(i) mass =\",m1,\"kg\\n\\t(ii) mass =\",m2,\"kg\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Effective mass of photon:\n",
+ "\t(i) mass = 4.42e-36 kg\n",
+ "\t(ii) mass = 2.21e-31 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:30,Page no:40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "RestEnergy=0.51 #rest energy of electron (Mev)\n",
+ "\n",
+ "#Calculation\n",
+ "E=2*RestEnergy #minimum energy of gamma ray photon (Mev)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nMinimum energy required =\",E,\"Mev\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Minimum energy required = 1.02 Mev\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:33,Page no:41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "c=3*10**8 #Speed of sound (meter/second)\n",
+ "M=1.97*10**30 #Mass of sun (kg)\n",
+ "R=1.5*10**11 #Mean radius of the earth orbit (meter)\n",
+ "sigma=1.4*10**3 #Solar energy received by the earth (joule/meter**2*second)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "loss=(4*math.pi*R**2*sigma)/(M*c**2) #Fractional loss of mass of the sun per second\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe fractional loss of mass of the sun= %.e\"%loss,\"s**-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The fractional loss of mass of the sun= 2e-21 s**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_1.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_1.ipynb
new file mode 100755
index 00000000..57a00802
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_1.ipynb
@@ -0,0 +1,734 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:Origin of Quantum Concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "c1=0.01\n",
+ "c2=0.1\n",
+ "c3=1\n",
+ "c4=10\n",
+ "b=2.898*10**-3 #Wien's constant (meter-kelvin)\n",
+ "h=(6.625*10**-34)/(2*math.pi) #Planck's constant (joule-second)\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "k=1.38*10**-23 #Boltzmann constant (joule/kelvin)\n",
+ "T=3000 #Temperature of black body (kelvin)\n",
+ "Delta_lembda=1*10**-9 #wavelength interval (meter)\n",
+ "\n",
+ "#Calculation\n",
+ "from sympy import *\n",
+ "kT=Symbol('kT')\n",
+ "#(a)Average energy of Planck's oscillator:\n",
+ "E1=round(c1/(math.exp(c1)-1))*kT #Average energy of Planck's oscillator\n",
+ "E2=round(c2/(math.exp(c2)-1),2)*kT #Average energy of Planck's oscillator\n",
+ "E3=round(c3/(math.exp(c3)-1),2)*kT #Average energy of Planck's oscillator\n",
+ "E4=round(c4/(math.exp(c4)-1),5)*kT #Average energy of Planck's oscillator\n",
+ "#(b)Power radiated by a unit area of a black body\n",
+ "P=(4*(math.pi**2)*h*(c**2)*(T**5)*Delta_lembda)/((b**5)*((math.exp((2*math.pi*h*c)/(b*k)))-1.0)) #The power radiated per unit area (watt/meter**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"(a)The average energy of Planck`s oscillator:\"\n",
+ "print\"(i) Energy =\",E1\n",
+ "print\"Energy =\",E2\n",
+ "print\"Energy = \",E3\n",
+ "print\"Energy =\",E4\n",
+ "print\"(b) The power radiated per unit area =%.f\"%P,\"W/m**2\"\n",
+ "print\"NOTE:Approximate values are used in book,that's why different answer\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)The average energy of Planck`s oscillator:\n",
+ "(i) Energy = 1.0*kT\n",
+ "Energy = 0.95*kT\n",
+ "Energy = 0.58*kT\n",
+ "Energy = 0.00045*kT\n",
+ "(b) The power radiated per unit area =3115 W/m**2\n",
+ "NOTE:Approximate values are used in book,that's why different answer\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2,Page no:59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "v=2*10**-2 #side of the cube (meter)\n",
+ "lembda=5000*10**-10 #wavelength (meter)\n",
+ "delta_lembda=10*10**-10 #range of wavelength (meter)\n",
+ "k=1.38*10**-23 #Boltzmann constant (joule/kelvin)\n",
+ "T=1500 #Temperature of the cavity (kelvin)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(i)Number of modes:\n",
+ "N=(8*math.pi*v**3*delta_lembda)/lembda**4 #number of modes\n",
+ "#(ii)Total radiant energy in the cavity:\n",
+ "U=N*k*T #energy density (joule)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(a) Number of modes =%.3e\"%N,\"joule\\n(b) Energy density =%.2e\"%U ,\"J\"\n",
+ "print\"Note: In book the answers of both the parts are WRONG by one order of magnitude in powers\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) Number of modes =3.217e+12 joule\n",
+ "(b) Energy density =6.66e-08 J\n",
+ "Note: In book the answers of both the parts are WRONG by one order of magnitude in powers\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=0.1 #mass of a spring-mass system (kg)\n",
+ "k=10 #spring constant of a spring-mass system (newton/meter)\n",
+ "A=0.1 #Amplitude of system oscillation (meter)\n",
+ "h=(6.625*10**-34)/(2*math.pi) #Planck's constant (joule-second)\n",
+ "delta_n=1 #change in quantum number\n",
+ "\n",
+ "#Calculation\n",
+ "#(a) Quantum number n associated with the energy of the oscillator\n",
+ "f=(k/m)**(1.0/2.0) #frequency of oscillator (radian/second)\n",
+ "E=0.5*f*A**2 #Energy of oscillator (joule)\n",
+ "n=E/(h*f) #Quantum number of the oscillator\n",
+ "#(b) Fractional change in energy\n",
+ "change_E=delta_n/n #fractional change in energy\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(a) Quantum number of the oscillator =%.e\"%n\n",
+ "print\"(b) Fractional change in energy =%.g\"%change_E\n",
+ "print\"(c) This example illustrates that the energy levels of macroscopic oscillators are so close together that even most delicate instruments cannot reveal the quantized nature of energy levels. All this is due to smallness of Planck\u2019s constant h. In the limit h->0, the energy levels become continuous.\"\n",
+ "print\"WRONG ANSWER NOTE:The answer given in the book for quantum number is just the order of it as it is a very large number. But the answer generated by the code is the exact value of it.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) Quantum number of the oscillator =5e+31\n",
+ "(b) Fractional change in energy =2e-32\n",
+ "(c) This example illustrates that the energy levels of macroscopic oscillators are so close together that even most delicate instruments cannot reveal the quantized nature of energy levels. All this is due to smallness of Planck\u2019s constant h. In the limit h->0, the energy levels become continuous.\n",
+ "WRONG ANSWER NOTE:The answer given in the book for quantum number is just the order of it as it is a very large number. But the answer generated by the code is the exact value of it.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19 #Charge of electron (coulombs)\n",
+ "h=(6.625*10**-34)/(2*math.pi) #Planck's constant (joule-second)\n",
+ "c=3*10**8 #Speed of light (meter/second)\n",
+ "\n",
+ "#Calculation\n",
+ "ch=(2*math.pi*h*c*10**9)/e #Value of ch (eV nm)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nch =\",round(ch),\"eV nm\"\n",
+ "print\"WRONG ANSWER:Approximate answer is given in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "ch = 1242.0 eV nm\n",
+ "WRONG ANSWER:Approximate answer is given in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "h=(6.625*10**-34)/(2*math.pi) #Planck's constant (joule-second)\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "lembda=2000 #Wavelength of the light (\u00c5)\n",
+ "phi=4.2 #work function of aluminium surface (eV)\n",
+ "ch=12400 #constant (eV \u00c5)\n",
+ "\n",
+ "#Calculation\n",
+ "#(a) maximum kinetic energy of photoelectrons\n",
+ "Tmax=(ch/lembda)-phi #maximum kinetic energy of photoelectrons (eV)\n",
+ "\n",
+ "#(b) minimum kinetic energy of photoelectrons\n",
+ "Tmin=0\n",
+ "\n",
+ "#(c) cut-off wavelength\n",
+ "lembda_cut=ch/phi # cut-off wavelength (\u00c5)\n",
+ "\n",
+ "#(d) stopping potential\n",
+ "v=2 #stopping potential (volt)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(a) Maximum kinetic energy of photoelectrons =\",round(Tmax),\"eV\"\n",
+ "print\"(b) Minimum kinetic energy of photoelectrons =\",Tmin\n",
+ "print\"(c) Cut-off(Threshold) wavelength =\",round(lembda_cut),\"\u00c5\\n\"\n",
+ "print\"(d) Stopping potential =\",v,\"volt\" \n",
+ "print\"Note: In book answer of cut_off wavelength is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) Maximum kinetic energy of photoelectrons = 2.0 eV\n",
+ "(b) Minimum kinetic energy of photoelectrons = 0\n",
+ "(c) Cut-off(Threshold) wavelength = 2952.0 \u00c5\n",
+ "\n",
+ "(d) Stopping potential = 2 volt\n",
+ "Note: In book answer of cut_off wavelength is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6,Page no:64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "lembda1=4000.0 #wavelength of light (\u00c5)\n",
+ "V1=2.0 #stopping potential (volt)\n",
+ "lembda2=6000.0 #wavelength of light (\u00c5)\n",
+ "V2=1.0 #stopping potential (volt)\n",
+ "e=1.6*10**-19 #Charge of electron (coulombs)\n",
+ "c=3.0*10**8 #speed of light (meter/second)\n",
+ "ch=12400.0 #constant (eV \u00c5)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i) Planck's constant\n",
+ "h=(e*(V1-V2)*lembda1*10**-10*lembda2*10**-10)/(c*((lembda2*10**-10)-(lembda1*10**-10))) #Planck's constant (joule-second)\n",
+ "#(ii) Work function\n",
+ "phi=(ch/lembda1)-V1 #work function of the material (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\" Planck`s constant = h =\",h,\"J-s\\n\"\n",
+ "print\" Work function of the material =\",phi,\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Planck`s constant = h = 6.4e-34 J-s\n",
+ "\n",
+ " Work function of the material = 1.1 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7,Page no:64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ch=12400 #constant (eV \u00c5)\n",
+ "phi_Tantalum=4.2 #work function of Tantalum (eV)\n",
+ "phi_Tungsten=4.5 #work function of Tungsten (eV)\n",
+ "phi_Aluminium=4.2 #work function of Aluminium (eV)\n",
+ "phi_Barium=2.5 #work function of Barium (eV)\n",
+ "phi_Lithium=2.3 #work function of Lithium (eV)\n",
+ "\n",
+ "#Calculation\n",
+ "lembda_Tantalum=ch/phi_Tantalum #Threshold wavelength of Tantalum (\u00c5)\n",
+ "lembda_Tungsten=ch/phi_Tungsten #Threshold wavelength of Tungsten (\u00c5)\n",
+ "lembda_Aluminium=ch/phi_Aluminium #Threshold wavelength of Aluminium (\u00c5)\n",
+ "lembda_Barium=ch/phi_Barium #Threshold wavelength of Barium (\u00c5)\n",
+ "lembda_Lithium=ch/phi_Lithium #Threshold wavelength of Lithium (\u00c5)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"Tantalum %d\"%lembda_Tantalum,\"\u00c5\"\n",
+ "print\"Tungsten %d\"%lembda_Tungsten,\"\u00c5\"\n",
+ "print\"Aluminium %d\"%lembda_Aluminium,\"\u00c5\"\n",
+ "print\"Barium %d\"%lembda_Barium,\"\u00c5\"\n",
+ "print\"Lithium %d\"%lembda_Lithium,\"\u00c5\"\n",
+ "if(lembda_Tantalum<8000 and lembda_Tantalum>4000): \n",
+ " print\"Tantalum can be used for designing photocell\"\n",
+ "\n",
+ "\n",
+ "if(lembda_Tungsten<8000 and lembda_Tungsten>4000): #Checking whether Threshold wavelength of Tungsten lies in visible range or not\n",
+ " print\"Tungsten can be used for designing photocell\"\n",
+ "\n",
+ "\n",
+ "if(lembda_Aluminium<8000 and lembda_Aluminium>4000): #Checking whether Threshold wavelength of Aluminium lies in visible range or not\n",
+ " print\"Aluminium can be used for designing photocell\"\n",
+ "\n",
+ "\n",
+ "if(lembda_Barium<8000 and lembda_Barium>4000): #Checking whether Threshold wavelength of Barium lies in visible range or not\n",
+ " print\"Barium can be used for designing photocell\"\n",
+ "\n",
+ "\n",
+ "if(lembda_Lithium<8000 and lembda_Lithium>4000): #Checking whether Threshold wavelength of Lithium lies in visible range or not\n",
+ " print\"Lithium can be used for designing photocell\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tantalum 2952 \u00c5\n",
+ "Tungsten 2755 \u00c5\n",
+ "Aluminium 2952 \u00c5\n",
+ "Barium 4960 \u00c5\n",
+ "Lithium 5391 \u00c5\n",
+ "Barium can be used for designing photocell\n",
+ "Lithium can be used for designing photocell\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:8,Page no:68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "lembda_c=0.024 #Compton wavelength of electron (\u00c5)\n",
+ "lembda=1 #Wavelength of X-rays (\u00c5)\n",
+ "Theta1=(60*math.pi)/180 #angle (radian)\n",
+ "Theta2=(90*math.pi)/180 #angle (radian)\n",
+ "Theta3=(180*math.pi)/180 #angle (radian)\n",
+ "ch=12400 #constant (eV \u00c5)\n",
+ "\n",
+ "#Calculation\n",
+ "#(a) Compton shift\n",
+ "shift1=lembda_c*(1-math.cos(Theta1)) #Compton shift (\u00c5)\n",
+ "shift2=lembda_c*(1-math.cos(Theta2)) #Compton shift (\u00c5)\n",
+ "shift3=lembda_c*(1-math.cos(Theta3)) #Compton shift (\u00c5)\n",
+ "#(b) Kinetic energy imparted to the recoil electron\n",
+ "T1=(ch*shift1)/(lembda*(lembda+shift1)) #Kinetic energy imparted to the electron (eV)\n",
+ "T2=(ch*shift2)/(lembda*(lembda+shift2)) #Kinetic energy imparted to the electron (eV)\n",
+ "T3=(ch*shift3)/(lembda*(lembda+shift3)) #Kinetic energy imparted to the electron (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(a) Compton shift:\\n\\t (i)\",shift1,\" \u00c5\\n\\t (ii)\",shift2,\" \u00c5\\n\\t (iii)\",shift3,\" \u00c5\\n\"\n",
+ "print\"(b) Kinetic energy imparted to the recoil electron:\\n\\t (i)\",round(T1),\" eV\\n\\t (ii) %d\"%T2,\" eV\\n\\t (iii)\",round(T3),\" eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) Compton shift:\n",
+ "\t (i) 0.012 \u00c5\n",
+ "\t (ii) 0.024 \u00c5\n",
+ "\t (iii) 0.048 \u00c5\n",
+ "\n",
+ "(b) Kinetic energy imparted to the recoil electron:\n",
+ "\t (i) 147.0 eV\n",
+ "\t (ii) 290 eV\n",
+ "\t (iii) 568.0 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9,Page no:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "lembda_c=0.024 #Compton wavelength of electron (\u00c5)\n",
+ "Theta=(45*math.pi)/180 #Scattering angle (radian)\n",
+ "\n",
+ "#Calculation \n",
+ "lembda=lembda_c*(1-math.cos(Theta)) #Wavelength of incident photon (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(a) Wavelength of incident photon = \",round(lembda,4),\" \u00c5 (gamma ray)\"\n",
+ "print\"(b) Photon lies in the gamma ray spectrum\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) Wavelength of incident photon = 0.007 \u00c5 (gamma ray)\n",
+ "(b) Photon lies in the gamma ray spectrum\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:10,Page no:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "E=1 #Energy of photon (MeV)\n",
+ "eta=0.25 #Relative change in photon's wavelength\n",
+ "\n",
+ "#Calculation\n",
+ "T=(E*eta)/(1+eta) #Kinetic energy of recoil electron (MeV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe kinetic energy of recoil electron =\",T,\"MeV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The kinetic energy of recoil electron = 0.2 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11,Page no:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "E=0.25 #Energy of photon (MeV)\n",
+ "Theta=(120*math.pi)/180 #Scattering angle of photon (radian)\n",
+ "a=0.51 #Value of m0*c**2 (Mev)\n",
+ "\n",
+ "#Calculation \n",
+ "E_das=E/(1+(E/a)*(1-math.cos(Theta))) #Energy of the scattered photon (MeV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nEnergy of the scattered photon =\",round(E_das,3),\"Mev\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Energy of the scattered photon = 0.144 Mev\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12,Page no:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "p=1.02 #momentum of the photon (MeV/c)\n",
+ "p_dash=0.255 #momentum of the photon after scattering (MeV/c)\n",
+ "a=0.51 #Value of m0*c**2 (Mev)\n",
+ "\n",
+ "#Calculation\n",
+ "Theta=2*math.degrees(math.asin(((0.5*a*(p-p_dash))/(p*p_dash))**(1.0/2.0))); \n",
+ "\n",
+ "#Result\n",
+ "print\"\\nAngle of the photon after scattering =\",Theta,\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Angle of the photon after scattering = 120.0 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13,Page no:70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Theta=120 #Scattering angle of photon (degree)\n",
+ "T=0.45 #Kinetic energy of electron (MeV)\n",
+ "a=0.51 #Value of m0*c**2 (Mev)\n",
+ "import math\n",
+ "\n",
+ "#Calculation \n",
+ "\n",
+ "E=(T/2.0)*(1.0+math.sqrt(1.0+(2.0*a)/(T*((math.sin(math.radians(Theta/2.0)))**2)))) #Energy of the incident photon (MeV) \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nEnergy of the incident photon =%.3g\"%E,\"Mev\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Energy of the incident photon =0.676 Mev\n"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14,Page no:74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "lembda0=2536*10**-10 #wavelength of exciting line (meter)\n",
+ "lembda=2612*10**-10 #wavelength of Raman line (meter)\n",
+ "\n",
+ "#Calculation \n",
+ "v0=1.0/lembda0 #wave number of exciting line (1/meter)\n",
+ "v=1.0/lembda #wave number of Raman line (1/meter)\n",
+ "shift=v0-v #the Raman shift (1/meter)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe Raman shift =\",shift,\"m-1\"\n",
+ "print\"Note: v0 and v values in the book are VERY LESS PRECISE,Therefore an approximate answer\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The Raman shift = 114733.745248 m-1\n",
+ "Note: v0 and v values in the book are VERY LESS PRECISE,Therefore an approximate answer\n"
+ ]
+ }
+ ],
+ "prompt_number": 80
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15,Page no:75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "lembda0=5000*10**-10 #Wavelength of radiation (meter)\n",
+ "lembda=5050.5*10**-10 #Wavelength of Raman line (meter)\n",
+ "\n",
+ "#Calculation\n",
+ "#(a) Raman frequency\n",
+ "v0=1.0/lembda0 #Wave number of radiation (1/meter)\n",
+ "v=1.0/lembda #Wave number of Raman line (1/meter)\n",
+ "shift=v0-v #Raman shift (1/meter)\n",
+ "va=v0+shift #Frequency of antistoke's line (1/meter)\n",
+ "#(b) Position of the antistokes' line\n",
+ "lembdaa=(10.0**10.0)/va #Wavelength of antistoke's line (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) Raman frequency =%.2e\"%va,\"m**-1\"\n",
+ "print\"(b) Wavelength of antistoke`s line =%.1f\"%lembdaa,\"\u00c5 (APPROX)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Raman frequency =2.02e+06 m**-1\n",
+ "(b) Wavelength of antistoke`s line =4950.5 \u00c5 (APPROX)\n"
+ ]
+ }
+ ],
+ "prompt_number": 86
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_2.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_2.ipynb
new file mode 100755
index 00000000..8ce6bc74
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_2.ipynb
@@ -0,0 +1,665 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:Wave Nature of Material Particles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m=9.1*10**-31 #mass of electron (kg)\n",
+ "h=6.6*10**-34 #planck's constant (joule-second)\n",
+ "e=1.6*10**-19 #charge of electron (coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "from sympy import *\n",
+ "V=Symbol('V')\n",
+ "a=(h*10**10)/(2.0*m*e*V)**(1/2.0) #wavelength of electron = h/(2*m*e*v)**(1/2) (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n Wavelength of electron accelerated through a potential difference V =\",a,\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Wavelength of electron accelerated through a potential difference V = 12.2306137249082*V**(-0.5) \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m_e=9.1*10**-31 #mass of electron (kg)\n",
+ "m=100*10**-3 #mass of object (kg)\n",
+ "v=1000 #velocity of electron and object (meter/second)\n",
+ "h=6.63*10**-34 #planck's constant (joule-second)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i) de Broglie wavelength of electron\n",
+ "lembda_e=h/(m_e*v) #de Broglie wavelength of electron\n",
+ "#(ii) de Broglie wavelength of object\n",
+ "lembda=h/(m*v) #de Broglie wavelength of object\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) de Broglie wavelength of electron =\",round(lembda_e*10**10),\"A\"\n",
+ "print\"(ii) de Broglie wavelength of object =%.2e\"%lembda,\"m\"\n",
+ "print\"Note: In the book the answer of part(ii) is wrong\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) de Broglie wavelength of electron = 7286.0 A\n",
+ "(ii) de Broglie wavelength of object =6.63e-36 m\n",
+ "Note: In the book the answer of part(ii) is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "e=1.6*10**-19 #charge of electron (coulomb)\n",
+ "T=100*e #kinetic energy (joule)\n",
+ "m_e=9.1*10**-31 #mass of electron (kg)\n",
+ "m_p=1.67*10**-27 #mass of proton (kg)\n",
+ "m_alpha=4*m_p #mass of alpha particle (kg)\n",
+ "h=6.63*10**-34 #planck's constant (joule-second)\n",
+ "\n",
+ "#Calculation\n",
+ "lembda_e=(h*10**10)/(2*m_e*T)**(1.0/2.0) #de Broglie wavelength of electron (\u00c5)\n",
+ "lembda_p=(h*10**10)/(2*m_p*T)**(1.0/2.0) #de Broglie wavelength of proton (\u00c5)\n",
+ "lembda_alpha=(h*10**10)/(2*m_alpha*T)**(1.0/2.0) #de Broglie wavelength of alpha particle (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"De Broglie wavelength of electron =\",round(lembda_e,2),\"\u00c5\"\n",
+ "print\"De Broglie wavelength of proton =\",round(lembda_p,3),\"\u00c5\"\n",
+ "print\"De Broglie wavelength of alpha particle =\",round(lembda_alpha,3),\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "De Broglie wavelength of electron = 1.23 \u00c5\n",
+ "De Broglie wavelength of proton = 0.029 \u00c5\n",
+ "De Broglie wavelength of alpha particle = 0.014 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 106
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=6.63*10**-34 #planck's constant (joule-second)\n",
+ "m=9.1*10**-31 #mass of electron (kg)\n",
+ "lembda=5896*10**-10 #wavelength of yellow spectral line of sodium (meter)\n",
+ "e=1.6*10**-19 #charge of electron (coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "T_j=h**2/(2*m*lembda**2) #kinetic energy of the electron (joule)\n",
+ "T_eV=T_j/e #kinetic energy of the electron (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"Kinetic energy of electron =%.2e\"%T_j,\"J =%.1e\"%T_eV,\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic energy of electron =6.95e-25 J =4.3e-06 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 107
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6,Page no:91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=6.63*10**-34 #planck's constant (joule-second)\n",
+ "m_n=1.67*10**-27 #mass of neutron (kg)\n",
+ "T=300 #Temperature (kelvin)\n",
+ "k=1.38*10**-23 #Boltzmann constant (joule/kelvin)\n",
+ "\n",
+ "#Calculation\n",
+ "E=(3*k*T)/2.0 #Kinetic energy of thermal neutron (joule)\n",
+ "lembda=(h*10**10)/(2*m_n*E)**(1/2.0) #Wavelength of thermal neutron (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"The wavelength of thermal neutron =%.3g\"%lembda,\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wavelength of thermal neutron =1.46 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 108
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7,Page no:91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=6.63*10**-34 #planck's constant (joule-second)\n",
+ "m_H2=2*1.67*10**-27 #mass of hydrogen molecule (kg)\n",
+ "T=27+273 #room temperature (kelvin)\n",
+ "k=1.38*10**-23 #Boltzmann constant (joule/kelvin)\n",
+ "\n",
+ "#Calculation\n",
+ "lembda=(h*10**10)/(2*m_H2*k*T)**(1/2.0) #de Broglie wavelength of hydrogen molecule (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"The de Broglie wavelength of hydrogen molecules at their most probable speed =%.2f\"%lembda,\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The de Broglie wavelength of hydrogen molecules at their most probable speed =1.26 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 109
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:8,Page no:91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "a=0.51 #Value of m0*c**2 (Mev)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "T=a*(math.sqrt(2.0)-1) #Kinetic energy (MeV)\n",
+ "\n",
+ "print\"Kinetic energy of electron =\",round(T,2),\"MeV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic energy of electron = 0.21 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 110
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9,Page no:92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "a=0.51 #Value of m0*c**2 (MeV)\n",
+ "b=0.0124 #Value of h*c (MeV \u00c5)\n",
+ "lembda_X=0.1 #Short wavelength limit of continuous X-ray spectrum (\u00c5)\n",
+ "\n",
+ "#Calculation\n",
+ "lembda=lembda_X/(1+(2*a*lembda_X)/b)**(1/2.0) #de Broglie wavelength of relativistic electrons\n",
+ "\n",
+ "print\"De Broglie wavelength of relativistic electrons =\",round(lembda,3),\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "De Broglie wavelength of relativistic electrons = 0.033 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 111
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:10,Page no:92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "r=0.53 #Radius of the first Bohr orbit in hydrogen atom (\u00c5)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "lembda=2*math.pi*r #de Broglie wavelength of electron in first Bohr orbit in hydrogen atom\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nde Broglie wavelength of electron in first Bohr orbit in hydrogen atom =%.1f\"%lembda,\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "de Broglie wavelength of electron in first Bohr orbit in hydrogen atom =3.3 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12,Page no:93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "v=10000 #speed of object (meter/second)\n",
+ "accu_v=0.0001 #accuracy of speed of object\n",
+ "m_b=0.05 #mass of the bullet (kg)\n",
+ "h=1.054*10**-34 #planck's constant (joule-second)\n",
+ "m_e=9.1*10**-31 #mass of electron (kg)\n",
+ "\n",
+ "#Calculation\n",
+ "#(a) fundamental accuracy of position for bullet\n",
+ "p_b=m_b*v #momentum of bullet (kg m/s)\n",
+ "p_uncer_b=p_b*accu_v #uncertainty in momentum of bullet (kg m/s)\n",
+ "x_uncer_b=h/p_uncer_b #minimum uncertainty in position of bullet (meter)\n",
+ "#(b) fundamental accuracy of position for electron\n",
+ "p_e=m_e*v #momentum of electron (kg m/s)\n",
+ "p_uncer_e=p_e*accu_v #uncertainty in momentum of electron (kg m/s)\n",
+ "x_uncer_e=h/p_uncer_e #uncertainty in position of electron (meter)\n",
+ "\n",
+ "print\"\\n(a) Minimum uncertainty in position of bullet =%.1e\"%x_uncer_b,\"meter\"\n",
+ "print\"(b) uncertainty in position of electron =%.3g\"%x_uncer_e,\"meter\"\n",
+ "\n",
+ "print\"Note:The answers given in the book are wrong. \\nAlso in the solution they have used speed=1000 while in the question it is given to be equal to 10000.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) Minimum uncertainty in position of bullet =2.1e-33 meter\n",
+ "(b) uncertainty in position of electron =0.000116 meter\n",
+ "Note:The answers given in the book are wrong. \n",
+ "Also in the solution they have used speed=1000 while in the question it is given to be equal to 10000.\n"
+ ]
+ }
+ ],
+ "prompt_number": 113
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13,Page no:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=1.054*10**-34 #planck's constant (joule-second)\n",
+ "m=9.1*10**-31 #mass of electron (kg)\n",
+ "x_uncer=1*10**-10 #uncertainty in the position of elctrons (meter)\n",
+ "e=1.6*10**-19 #charge of electron (coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i) uncertainty in the momentum of electron\n",
+ "p_uncer=h/x_uncer #The uncertainty in the momentum of electron (kg m/s)\n",
+ "#(ii) kinetic energy of electron\n",
+ "T=p_uncer**2/(2*m*e) #kinetic energy of electron (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) The uncertainty in the momentum of electron =\",p_uncer,\"kg m/s\"\n",
+ "print\"(ii) Kinetic energy of electron =%.1f\"%T,\"eV\" \n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) The uncertainty in the momentum of electron = 1.054e-24 kg m/s\n",
+ "(ii) Kinetic energy of electron =3.8 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 114
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14,Page no:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=1.054*10**-34 #planck's constant (joule-second)\n",
+ "x=10**-14 #dimension of the nucleus (meter)\n",
+ "c=3*10**8 #speed of light (meter/second)\n",
+ "e=1.6*10**-19 #charge of electron (coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i) Uncertainty in the momentum of electron\n",
+ "p_uncer=h/x #The uncertainty in the momentum of electron (kg m/s)\n",
+ "#(ii) kinetic energy of electron\n",
+ "T=(p_uncer*c)/(e*10**6) #kinetic energy of electron (MeV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) The uncertainty in the momentum of electron =\",p_uncer,\"kg m/s\"\n",
+ "print\"(ii) Kinetic energy of electron =\",round(T),\" MeV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) The uncertainty in the momentum of electron = 1.054e-20 kg m/s\n",
+ "(ii) Kinetic energy of electron = 20.0 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 115
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15,Page no:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=1.054*10**-34 #planck's constant (joule-second)\n",
+ "x=10**-14 #dimension of the nucleus (meter)\n",
+ "e=1.6*10**-19 #charge of electron (coulomb)\n",
+ "m=1.67*10**-27 #mass of proton (kg)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i) Uncertainty in the momentum of electron\n",
+ "p_uncer=h/x #The uncertainty in the momentum of electron (kg m/s)\n",
+ "#(ii) kinetic energy of proton\n",
+ "T=(p_uncer**2)/(2*m*e*10**6) #kinetic energy of proton (MeV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) The uncertainty in the momentum of electron =\",p_uncer,\"kg m/s\"\n",
+ "print\"(ii) Kinetic energy of proton =\",round(T,2),\"MeV (approx)\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) The uncertainty in the momentum of electron = 1.054e-20 kg m/s\n",
+ "(ii) Kinetic energy of proton = 0.21 MeV (approx)\n"
+ ]
+ }
+ ],
+ "prompt_number": 116
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:17,Page no:95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=1.054*10**-34 #planck's constant (joule-second)\n",
+ "delta_t=10**-12 #time for which nucleus remains in excited state (second)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_E=h/delta_t #uncertainty in the energy of the gamma ray photon (joule)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe uncertainty in the energy of the gamma ray photon =\",delta_E,\"J\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The uncertainty in the energy of the gamma ray photon = 1.054e-22 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 117
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:18,Page no:95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "delta_t=10**-8 #life-time of the average excited atom (second)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_f=1/delta_t #minimum uncertainty in the frequency of photon (radian/second)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nminimum uncertainty in the frequency of photon =%.g\"%delta_f,\"rad/s\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "minimum uncertainty in the frequency of photon =1e+08 rad/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 118
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:19,Page no:95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=1.054*10**-34 #planck's constant (joule-second)\n",
+ "e=1.6*10**-19 #charge of electron (coulomb)\n",
+ "m=9.1*10**-31 #mass of electron (kg)\n",
+ "E0=8.8542*10**-12 #permittivity of free space (C**2/N*m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i) radius of ground state of hydrogen atom\n",
+ "r=(4*math.pi*E0*h**2)/(m*e**2) #radius of ground state of hydrogen atom (meter)\n",
+ "#(ii) Binding energy of electron in hydrogen atom in the ground state\n",
+ "E=(-0.5*m*e**4)/(4*math.pi*E0*h)**2 #binding energy of electron in hydrogen atom in the ground state (joule)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) Radius of ground state of hydrogen atom =%.1e\"%r,\"m (in scientific notation) OR 0.53*10**-10\"\n",
+ "print\"(ii) Binding energy of electron in ground state of hydrogen atom =%.2e\"%E,\"J\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) Radius of ground state of hydrogen atom =5.3e-11 m (in scientific notation) OR 0.53*10**-10\n",
+ "(ii) Binding energy of electron in ground state of hydrogen atom =-2.17e-18 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 119
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_6.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_6.ipynb
new file mode 100755
index 00000000..b3905bdc
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_6.ipynb
@@ -0,0 +1,110 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6:Particle in a box"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "L=1.0\n",
+ "x0=L/3.0 \n",
+ "x1=2*L/3.0 \n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "from scipy import integrate\n",
+ "def f(x):\n",
+ " w=math.sqrt(2/L)*math.sin(math.pi*x/L)\n",
+ " return(w**2)\n",
+ "P=integrate.quad(f,x0,x1)\n",
+ "\n",
+ "#Result\n",
+ "print\"The required probability =\",round(P[0],2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required probability = 0.61\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2,Page no:202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "L=1.0 \n",
+ "x0=0.0 \n",
+ "x1=L/3.0 \n",
+ "y0=0.0 \n",
+ "y1=L/3.0 \n",
+ "\n",
+ "#Calculation\n",
+ "from scipy.integrate import dblquad\n",
+ "import numpy as np\n",
+ "def f(x,y):\n",
+ "#w=(2.0/L)*(np.sin(np.pi*x/L))*(np.sin(np.pi*y/L))\n",
+ " return((1-np.cos(2*np.pi*x/L))*(1-np.cos(2*np.pi*y/L))) \n",
+ "\n",
+ "p=dblquad(f,x0,x1,lambda y:0,lambda y:L/3.0)\n",
+ "\n",
+ "#Result\n",
+ "print\"The required probability = \",round(p[0],3)\n",
+ "print\"NOTE:Wrong answer in book\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required probability = 0.038\n",
+ "NOTE:Wrong answer in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_9.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_9.ipynb
new file mode 100755
index 00000000..8a33a661
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_2,Chapter_9.ipynb
@@ -0,0 +1,64 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9:Particle in a Central Force Field"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exampleno:3,Page no:244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "a0=1\n",
+ "r0=0 \n",
+ "\n",
+ "#Calculation\n",
+ "from scipy.integrate import quad\n",
+ "import math\n",
+ "#calculation\n",
+ "def f(r):\n",
+ " w_100=math.sqrt(1.0/(math.pi*a0**3))*math.exp(-r/a0)\n",
+ " return((w_100**2)*4*math.pi*(r**2))\n",
+ "P=4*quad(f,r0,a0) \n",
+ "\n",
+ "#Result\n",
+ "print\"\\n Probability =\",round(P[0] ,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Probability = 0.32\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_3,Chapter_1.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_3,Chapter_1.ipynb
new file mode 100755
index 00000000..a80391a8
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_3,Chapter_1.ipynb
@@ -0,0 +1,469 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:Preliminary Concepts "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "N=2 #no. of particles\n",
+ "n1=2 #occupation no. of particles\n",
+ "g1=3 #degeneracy of particles\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(i) particles are distinguishable\n",
+ "state1=(math.factorial(N)*g1**n1)/math.factorial(n1) #possible microstates of distinguishable particles\n",
+ "#(ii) particles are indistinguishable bosons \n",
+ "state2=math.factorial(n1+g1-1)/(math.factorial(n1)*math.factorial(g1-1)) #possible microstates of indistinguishable bosons\n",
+ "#(iii) particles are indistinguishable fermions\n",
+ "state3=math.factorial(g1)/(math.factorial(n1)*math.factorial(g1-n1)) #possible microstates of indistinguishable fermions\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) \u03a9(distinguishable) =\",state1,\"\\n(ii) \u03a9(indistinguishable bosons) = \",state2,\"\\n(iii) \u03a9(indistinguishable fermions) =\",state3 \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) \u03a9(distinguishable) = 9 \n",
+ "(ii) \u03a9(indistinguishable bosons) = 6 \n",
+ "(iii) \u03a9(indistinguishable fermions) = 3\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2,Page no:259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "N=4 #no. of particles\n",
+ "A1=[2,0,0,2] #possible macrostate\n",
+ "A2=[1,1,1,1] #possible macrostate\n",
+ "A3=[0,3,0,1] #possible macrostate\n",
+ "A4=[1,0,3,0] #possible macrostate\n",
+ "A5=[0,2,2,0] #possible macrostate\n",
+ "g1=1 #degeneracy of particles\n",
+ "g2=2 #degeneracy of particles\n",
+ "g3=2 #degeneracy of particles\n",
+ "g4=1 #degeneracy of particles\n",
+ "\n",
+ "import math\n",
+ "#(i) particles are distinguishable\n",
+ "print\"\\n(i)Possible macrostates are\\n \"\n",
+ "print A1,A2,A3,A4,A5\n",
+ "micro1=((math.factorial(N)*g1**A1[0]*g2**A1[1]*g3**A1[2]*g4**A1[3])/(math.factorial(A1[0])*math.factorial(A1[1])*math.factorial(A1[2])*math.factorial(A1[3]))) #The number of microstates\n",
+ "micro2=((math.factorial(N)*g1**A2[0]*g2**A2[1]*g3**A2[2]*g4**A2[3])/(math.factorial(A2[0])*math.factorial(A2[1])*math.factorial(A2[2])*math.factorial(A2[3]))) #The number of microstates\n",
+ "micro3=((math.factorial(N)*g1**A3[0]*g2**A3[1]*g3**A3[2]*g4**A3[3])/(math.factorial(A3[0])*math.factorial(A3[1])*math.factorial(A3[2])*math.factorial(A3[3]))) #The number of microstates\n",
+ "micro4=((math.factorial(N)*g1**A4[0]*g2**A4[1]*g3**A4[2]*g4**A4[3])/(math.factorial(A4[0])*math.factorial(A4[1])*math.factorial(A4[2])*math.factorial(A4[3]))) #The number of microstates\n",
+ "micro5=((math.factorial(N)*g1**A5[0]*g2**A5[1]*g3**A5[2]*g4**A5[3])/(math.factorial(A5[0])*math.factorial(A5[1])*math.factorial(A5[2])*math.factorial(A5[3]))) #The number of microstates\n",
+ "\n",
+ "print\"No. of macrostates is given by:\"\n",
+ "print A1,\"=\",micro1,\"\\n\",A2,\"=\",micro2,\"\\n\",A3,\"=\",micro3,\"\\n\",A4,\"=\",micro4,\"\\n\",A5,\"=\",micro5,\"\\n\",\n",
+ "\n",
+ "print\"\\nMost probable macrostates are\\n \" \n",
+ "if(micro1>=micro2 and micro1>=micro3 and micro1>=micro4 and micro1>=micro5) :\n",
+ " print A1 \n",
+ " \n",
+ "if(micro2>=micro1 and micro2>=micro3 and micro2>=micro4 and micro2>=micro5) :\n",
+ " print A2 \n",
+ " \n",
+ "if(micro3>=micro1 and micro3>=micro2 and micro3>=micro4 and micro3>=micro5) :\n",
+ " print A3 \n",
+ " \n",
+ "if(micro4>=micro1 and micro4>=micro2 and micro4>=micro3 and micro4>=micro5) :\n",
+ " print A4 \n",
+ " \n",
+ "if(micro5>=micro1 and micro5>=micro2 and micro5>=micro3 and micro5>=micro4) :\n",
+ " print A5 \n",
+ " \n",
+ "\n",
+ "#(ii) particles are indistinguishable bosons\n",
+ "print\"\\n(ii)Possible macrostates are\\n \" \n",
+ "print A1,A3,A3,A4,A5\n",
+ "micro1=(math.factorial(A1[0]+g1-1)*math.factorial(A1[1]+g2-1)*math.factorial(A1[2]+g3-1)*math.factorial(A1[3]+g4-1))/(math.factorial(A1[0])*math.factorial(A1[1])*math.factorial(A1[2])*math.factorial(A1[3])*math.factorial(g1-1)*math.factorial(g2-1)*math.factorial(g3-1)*math.factorial(g4-1)) \n",
+ "micro2=(math.factorial(A2[0]+g1-1)*math.factorial(A2[1]+g2-1)*math.factorial(A2[2]+g3-1)*math.factorial(A2[3]+g4-1))/(math.factorial(A2[0])*math.factorial(A2[1])*math.factorial(A2[2])*math.factorial(A2[3])*math.factorial(g1-1)*math.factorial(g2-1)*math.factorial(g3-1)*math.factorial(g4-1)) \n",
+ "micro3=(math.factorial(A3[0]+g1-1)*math.factorial(A3[1]+g2-1)*math.factorial(A3[2]+g3-1)*math.factorial(A3[3]+g4-1))/(math.factorial(A3[0])*math.factorial(A3[1])*math.factorial(A3[2])*math.factorial(A3[3])*math.factorial(g1-1)*math.factorial(g2-1)*math.factorial(g3-1)*math.factorial(g4-1)) \n",
+ "micro4=(math.factorial(A4[0]+g1-1)*math.factorial(A4[1]+g2-1)*math.factorial(A4[2]+g3-1)*math.factorial(A4[3]+g4-1))/(math.factorial(A4[0])*math.factorial(A4[1])*math.factorial(A4[2])*math.factorial(A4[3])*math.factorial(g1-1)*math.factorial(g2-1)*math.factorial(g3-1)*math.factorial(g4-1)) \n",
+ "micro5=(math.factorial(A5[0]+g1-1)*math.factorial(A5[1]+g2-1)*math.factorial(A5[2]+g3-1)*math.factorial(A5[3]+g4-1))/(math.factorial(A5[0])*math.factorial(A5[1])*math.factorial(A5[2])*math.factorial(A5[3])*math.factorial(g1-1)*math.factorial(g2-1)*math.factorial(g3-1)*math.factorial(g4-1)) \n",
+ "\n",
+ "print\"No. of macrostates is given by:\"\n",
+ "print A1,\"=\",micro1,\"\\n\",A2,\"=\",micro2,\"\\n\",A3,\"=\",micro3,\"\\n\",A4,\"=\",micro4,\"\\n\",A5,\"=\",micro5,\"\\n\"\n",
+ "\n",
+ "print\"\\nMost probable macrostate is\\n \"\n",
+ "if(micro1>=micro2 and micro1>=micro3 and micro1>=micro4 and micro1>=micro5) :\n",
+ " print A1\n",
+ " \n",
+ "if(micro2>=micro1 and micro2>=micro3 and micro2>=micro4 and micro2>=micro5) :\n",
+ " print A2 \n",
+ " \n",
+ "if(micro3>=micro1 and micro3>=micro2 and micro3>=micro4 and micro3>=micro5) :\n",
+ " print A3 \n",
+ " \n",
+ "if(micro4>=micro1 and micro4>=micro2 and micro4>=micro3 and micro4>=micro5) :\n",
+ " print A4 \n",
+ " \n",
+ "if(micro5>=micro1 and micro5>=micro2 and micro5>=micro3 and micro5>=micro4) :\n",
+ " print A5 \n",
+ " \n",
+ "\n",
+ "#(iii) Particles are indistinguishable fermions\n",
+ "print\"\\n(iii)Possible macrostates are\\n \"\n",
+ "print A2,A5\n",
+ "micro2=4/(math.factorial(A2[0])*math.factorial(A2[1])*math.factorial(A2[2])*math.factorial(A2[3])*math.factorial(g1-A2[0])*math.factorial(g2-A2[1])*math.factorial(g3-A2[2])*math.factorial(g4-A2[3])) \n",
+ "micro5=4/(math.factorial(A5[0])*math.factorial(A5[1])*math.factorial(A5[2])*math.factorial(A5[3])*math.factorial(g1-A5[0])*math.factorial(g2-A5[1])*math.factorial(g3-A5[2])*math.factorial(g4-A5[3])) \n",
+ "\n",
+ "print\"No. of macrostates is given by:\"\n",
+ "print A2,\"=\",micro2,\"\\n\",A5,\"=\",micro5,\"\\n\"\n",
+ "\n",
+ "print\"\\nMost probable macrostate is\\n \"\n",
+ "if(micro2>=micro5) :\n",
+ " print A2\n",
+ " \n",
+ "if(micro5>=micro2) :\n",
+ " print A5 \n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i)Possible macrostates are\n",
+ " \n",
+ "[2, 0, 0, 2] [1, 1, 1, 1] [0, 3, 0, 1] [1, 0, 3, 0] [0, 2, 2, 0]\n",
+ "No. of macrostates is given by:\n",
+ "[2, 0, 0, 2] = 6 \n",
+ "[1, 1, 1, 1] = 96 \n",
+ "[0, 3, 0, 1] = 32 \n",
+ "[1, 0, 3, 0] = 32 \n",
+ "[0, 2, 2, 0] = 96 \n",
+ "\n",
+ "Most probable macrostates are\n",
+ " \n",
+ "[1, 1, 1, 1]\n",
+ "[0, 2, 2, 0]\n",
+ "\n",
+ "(ii)Possible macrostates are\n",
+ " \n",
+ "[2, 0, 0, 2] [0, 3, 0, 1] [0, 3, 0, 1] [1, 0, 3, 0] [0, 2, 2, 0]\n",
+ "No. of macrostates is given by:\n",
+ "[2, 0, 0, 2] = 1 \n",
+ "[1, 1, 1, 1] = 4 \n",
+ "[0, 3, 0, 1] = 4 \n",
+ "[1, 0, 3, 0] = 4 \n",
+ "[0, 2, 2, 0] = 9 \n",
+ "\n",
+ "\n",
+ "Most probable macrostate is\n",
+ " \n",
+ "[0, 2, 2, 0]\n",
+ "\n",
+ "(iii)Possible macrostates are\n",
+ " \n",
+ "[1, 1, 1, 1] [0, 2, 2, 0]\n",
+ "No. of macrostates is given by:\n",
+ "[1, 1, 1, 1] = 4 \n",
+ "[0, 2, 2, 0] = 1 \n",
+ "\n",
+ "\n",
+ "Most probable macrostate is\n",
+ " \n",
+ "[1, 1, 1, 1]\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#vairable initialization\n",
+ "N=4 #no. of particles\n",
+ "A1=(4,0) #possible macrostate\n",
+ "A2=(3,1) #possible macrostate\n",
+ "A3=(2,2) #possible macrostate\n",
+ "A4=(1,3) #possible macrostate\n",
+ "A5=(0,4) #possible macrostate\n",
+ "import math\n",
+ "#calculation\n",
+ "print\"\\nPossible macrostates are\\n \"\n",
+ "print A1,A2,A3,A4,A5\n",
+ "micro1=math.factorial(N)/(math.factorial(A1[0])*math.factorial(A1[1])) #no. of microstate corresponding to macrostate1\n",
+ "micro2=math.factorial(N)/(math.factorial(A2[0])*math.factorial(A2[1])) #no. of microstate corresponding to macrostate2\n",
+ "micro3=math.factorial(N)/(math.factorial(A3[0])*math.factorial(A3[1])) #no. of microstate corresponding to macrostate3\n",
+ "micro4=math.factorial(N)/(math.factorial(A4[0])*math.factorial(A4[1])) #no. of microstate corresponding to macrostate4\n",
+ "micro5=math.factorial(N)/(math.factorial(A5[0])*math.factorial(A5[1])) #no. of microstate corresponding to macrostate5\n",
+ "print\"No.of macrostates is:\"\n",
+ "print A1,\"=\",micro1,\"\\n\",A2,\"=\",micro2,\"\\n\",A3,\"=\",micro3,\"\\n\",A4,\"=\",micro4,\"\\n\",A5,\"=\",micro5,\"\\n\"\n",
+ "\n",
+ "\n",
+ "print\"\\nTotal no. of microstates are \",micro1+micro2+micro3+micro4+micro5\n",
+ "print\"\\nMost probable macrostate is\\n \" \n",
+ "if(micro1>=micro2 and micro1>=micro3 and micro1>=micro4 and micro1>=micro5) :\n",
+ " print A1\n",
+ "if(micro2>=micro1 and micro2>=micro3 and micro2>=micro4 and micro2>=micro5) :\n",
+ " print A2\n",
+ "if(micro3>=micro1 and micro3>=micro2 and micro3>=micro4 and micro3>=micro5):\n",
+ " print A3\n",
+ "if(micro4>=micro1 and micro4>=micro2 and micro4>=micro3 and micro4>=micro5):\n",
+ " print A4\n",
+ "if(micro5>=micro1 and micro5>=micro2 and micro5>=micro3 and micro5>=micro4):\n",
+ " print A5\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Possible macrostates are\n",
+ " \n",
+ "(4, 0) (3, 1) (2, 2) (1, 3) (0, 4)\n",
+ "No.of macrostates is:\n",
+ "(4, 0) = 1 \n",
+ "(3, 1) = 4 \n",
+ "(2, 2) = 6 \n",
+ "(1, 3) = 4 \n",
+ "(0, 4) = 1 \n",
+ "\n",
+ "\n",
+ "Total no. of microstates are 16\n",
+ "\n",
+ "Most probable macrostate is\n",
+ " \n",
+ "(2, 2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "N=4 #no. of particles\n",
+ "A1=(1,0,1,2) #possible macrostate\n",
+ "A2=(0,2,0,2) #possible macrostate\n",
+ "A3=(0,1,2,1) #possible macrostate\n",
+ "A4=(0,0,4,0) #possible macrostate\n",
+ "\n",
+ "#calculation\n",
+ "print\"\\nPossible macrostates are\\n \"\n",
+ "print A1,A2,A3,A4\n",
+ "micro1=math.factorial(N)/(math.factorial(A1[0])*math.factorial(A1[1])*math.factorial(A1[2])*math.factorial(A1[3])) #no. of microstate corresponding to macrostate1\n",
+ "micro2=math.factorial(N)/(math.factorial(A2[0])*math.factorial(A2[1])*math.factorial(A2[2])*math.factorial(A2[3])) #no. of microstate corresponding to macrostate2\n",
+ "micro3=math.factorial(N)/(math.factorial(A3[0])*math.factorial(A3[1])*math.factorial(A3[2])*math.factorial(A3[3])) #no. of microstate corresponding to macrostate3\n",
+ "micro4=math.factorial(N)/(math.factorial(A4[0])*math.factorial(A4[1])*math.factorial(A4[2])*math.factorial(A4[3])) #no. of microstate corresponding to macrostate4\n",
+ "print\"\\nThe number of microstates belonging to the above macrostates is:\"\n",
+ "print A1,\"=\",micro1,\"\\n\",A2,\"=\",micro2,\"\\n\",A3,\"=\",micro3,\"\\n\",A4,\"=\",micro4,\"\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Possible macrostates are\n",
+ " \n",
+ "(1, 0, 1, 2) (0, 2, 0, 2) (0, 1, 2, 1) (0, 0, 4, 0)\n",
+ "\n",
+ "The number of microstates belonging to the above macrostates is:\n",
+ "(1, 0, 1, 2) = 12 \n",
+ "(0, 2, 0, 2) = 6 \n",
+ "(0, 1, 2, 1) = 12 \n",
+ "(0, 0, 4, 0) = 1 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "def p(A): #function to calculate probability\n",
+ " probability=1 \n",
+ " i=0\n",
+ " for i in range(0,7):\n",
+ " probability=probability*(math.factorial(A[i]+2))/(2*math.factorial(A[i])) \n",
+ " return(probability)\n",
+ "#Variable declaration\n",
+ "A1=(5,0,0,0,0,0,1) #possible macrostate\n",
+ "A2=(4,1,0,0,0,1,0) #possible macrostate\n",
+ "A3=(4,0,1,0,1,0,0) #possible macrostate\n",
+ "A4=(3,2,0,0,1,0,0) #possible macrostate\n",
+ "A5=(4,0,0,2,0,0,0) #possible macrostate\n",
+ "A6=(3,1,1,1,0,0,0) #possible macrostate\n",
+ "A7=(2,3,0,1,0,0,0) #possible macrostate\n",
+ "A8=(3,0,3,0,0,0,0) #possible macrostate\n",
+ "A9=(2,2,2,0,0,0,0) #possible macrostate\n",
+ "A10=(1,4,1,0,0,0,0) #possible macrostate\n",
+ "A11=(0,6,0,0,0,0,0) #possible macrostate\n",
+ "\n",
+ "#calculation\n",
+ "p1=p(A1) #Thermodynamic probability of macrostate 1\n",
+ "p2=p(A2) #Thermodynamic probability of macrostate 2\n",
+ "p3=p(A3) #Thermodynamic probability of macrostate 3\n",
+ "p4=p(A4) #Thermodynamic probability of macrostate 4\n",
+ "p5=p(A5) #Thermodynamic probability of macrostate 5\n",
+ "p6=p(A6) #Thermodynamic probability of macrostate 6\n",
+ "p7=p(A7) #Thermodynamic probability of macrostate 7\n",
+ "p8=p(A8) #Thermodynamic probability of macrostate 8\n",
+ "p9=p(A9) #Thermodynamic probability of macrostate 9\n",
+ "p10=p(A10) #Thermodynamic probability of macrostate 10\n",
+ "p11=p(A11) #Thermodynamic probability of macrostate 11\n",
+ "\n",
+ "print\"\\nP1 =\",p1,\"P2 =\",p2,\"P3 =\",p3,\"P4 =\",p4,\"P5 =\",p5,\"P6 =\",p6,\"P7 =\",p7,\"P8 =\",p8,\"P9 =\",p9,\"P10 =\",p10,\"P11 =\",p11\n",
+ "print\"\\nThermodyanmic probability of the system = \",p1+p2+p3+p4+p5+p6+p7+p8+p9+p10+p11\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "P1 = 63 P2 = 135 P3 = 135 P4 = 180 P5 = 90 P6 = 270 P7 = 180 P8 = 100 P9 = 216 P10 = 135 P11 = 28\n",
+ "\n",
+ "Thermodyanmic probability of the system = 1532\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6,Page no:265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "def p(A): #function to calculate no. of microstates\n",
+ " micro=1 \n",
+ " i=1\n",
+ " for i in range(0,5):\n",
+ " micro=micro*(6/(math.factorial(A[i])*math.factorial(3-A[i]))) \n",
+ " return(micro)\n",
+ "#Variable declaration\n",
+ "A1=(3,2,0,0,1) #possible macrostate\n",
+ "A2=(3,1,1,1,0) #possible macrostate\n",
+ "A3=(2,3,0,1,0) #possible macrostate\n",
+ "A4=(3,0,3,0,0) #possible macrostate\n",
+ "A5=(2,2,2,0,0) #possible macrostate\n",
+ "\n",
+ "#calculation\n",
+ "p1=p(A1) #no. of microstates\n",
+ "p2=p(A2) #no. of microstates\n",
+ "p3=p(A3) #no. of microstates\n",
+ "p4=p(A4) #no. of microstates\n",
+ "p5=p(A5) #no. of microstates\n",
+ "\n",
+ "print\"No.of microstates associated with macrostates are :\"\n",
+ "print A1,\"=\",p1,\"\\n\",A2,\"=\",p2,\"\\n\",A3,\"=\",p3,\"\\n\",A4,\"=\",p4,\"\\n\",A5,\"=\",p5,\"\\n\"\n",
+ "print\"\\nThe thermodynamic probability of the system = \",(p1+p2+p3+p4+p5)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No.of microstates associated with macrostates are :\n",
+ "(3, 2, 0, 0, 1) = 9 \n",
+ "(3, 1, 1, 1, 0) = 27 \n",
+ "(2, 3, 0, 1, 0) = 9 \n",
+ "(3, 0, 3, 0, 0) = 1 \n",
+ "(2, 2, 2, 0, 0) = 27 \n",
+ "\n",
+ "\n",
+ "The thermodynamic probability of the system = 73\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_1.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_1.ipynb
new file mode 100755
index 00000000..516314f0
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_1.ipynb
@@ -0,0 +1,361 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:Atomic Spectra-I"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "z=2 #atomic no. of He\n",
+ "a0=0.529 #radius of first Bohr orbit of H atom (\u00c5)\n",
+ "n=1 #no. of Bohr orbit\n",
+ "A=2.19*10**6 #velocity of e in first Bohr orbit of H atom (m/s)\n",
+ "B=4.14*10**15 #orbital frequency in the first Bohr orbit of H atom (rad/s)\n",
+ "E0=13.6 #energy of electron in ground state of H atom (eV)\n",
+ "n1=1 \n",
+ "n2=2 \n",
+ "R=1.097*10**7 #Rydberg constant (m-1)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i) radius of first Bohr orbit\n",
+ "r=a0/2.0 #radius of first Bohr orbit (\u00c5)\n",
+ "#(ii) velocity of electron in the first orbit\n",
+ "v=A*(z/n) #velocity of electron in the first orbit (m/s)\n",
+ "#(iii) orbital frequency in the first orbit\n",
+ "omega=B*(z**2/n**3) #orbital frequency in the first orbit (rad/s)\n",
+ "#(iv) kinetic and binding energy\n",
+ "KE=E0*(z**2/n**2) #kinetic energy of electron in the ground state (eV)\n",
+ "BE=KE #binding energy of electron in the ground state (eV)\n",
+ "#(v) ionization potential and first excitation potential\n",
+ "IP=KE #ionization potential (eV)\n",
+ "EE=E0*z**2*((1.0/n1**2)-(1.0/n2**2)) #first excitation potential (eV)\n",
+ "#(vi) wavelength of the resonance line emitted in the transition n=2 to n=1\n",
+ "lembda=(1.0/(R*z**2*((1.0/n1**2)-(1.0/n2**2))))*10**10 #wavelength of the resonance line emitted in the transition n=2 to n=1 (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) radius =\",round(r,3),\"\u00c5\"\n",
+ "print\"(ii) velocity =%.2e\"%v,\"m/s\"\n",
+ "print\"(iii) orbital frequency =\",omega,\"rad/s\"\n",
+ "print\"(iv) Kinetic energy =\",KE,\"eV Binding energy =\",BE,\"eV\"\n",
+ "print\"(v) Ionization potential =\",IP,\"eV EE =\",EE,\"eV\"\n",
+ "print\"(vi) wavelength =\",lembda,\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) radius = 0.265 \u00c5\n",
+ "(ii) velocity =4.38e+06 m/s\n",
+ "(iii) orbital frequency = 1.656e+16 rad/s\n",
+ "(iv) Kinetic energy = 54.4 eV Binding energy = 54.4 eV\n",
+ "(v) Ionization potential = 54.4 eV EE = 40.8 eV\n",
+ "(vi) wavelength = 303.85900942 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2,Page no:406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "z=1 #atomic no. of H atom\n",
+ "m=1.68*10**-27 #mass of H atom (kg)\n",
+ "h=1.054*10**-34 #Planck's constant (joule second)\n",
+ "R=10967800 #Rydberg constant (m-1)\n",
+ "e=1.6*10**-19 #Charge of electron (coulombs)\n",
+ "c=3*10**8 #speed of light (m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(i) recoil velocity\n",
+ "v=(3*math.pi*h*R*z**2)/(2*m) #recoil velocity of H atom (m/s)\n",
+ "#(ii) recoil kinetic energy\n",
+ "Er=(9/8.0)*((math.pi*h*R*z**2)**2/(m*e)) #recoil kinetic energy of H atom (eV)\n",
+ "#(iii) energy of emitted photon\n",
+ "E=(1.5*math.pi*h*c*R*z**2)/e #energy of emitted photon (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"(i) recoil velocity =\",round(v,2),\"m/s\"\n",
+ "print\"(ii) recoil kinetic energy =%.1e\"%Er,\"eV\"\n",
+ "print\"(iii) energy of emitted photon =\",round(E,2),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) recoil velocity = 3.24 m/s\n",
+ "(ii) recoil kinetic energy =5.5e-08 eV\n",
+ "(iii) energy of emitted photon = 10.21 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "z=2 #atomic no. of He atom\n",
+ "h=1.054*10**-34 #Planck's constant (joule second)\n",
+ "R=10967800 #Rydberg constant (m-1)\n",
+ "e=1.6*10**-19 #Charge of electron (coulombs)\n",
+ "c=3*10**8 #speed of light (m/s)\n",
+ "\n",
+ "#calculation\n",
+ "E=1.5*math.pi*h*c*R*z**2 #The energy of the emitted photon (J)\n",
+ "IE=2*math.pi*h*c*R #Ionization energy of H atom (J)\n",
+ "KE=(E-IE)/e #Kinetic energy of the photoelectron (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nKinetic energy of photoelectron =\",round(KE,1),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Kinetic energy of photoelectron = 27.2 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ratio=4 #ratio of wavelengths\n",
+ "z1=1 #atomic no. of hydrogen atom\n",
+ "\n",
+ "#calculation\n",
+ "z2=math.sqrt(ratio*z1**2) #atomic no. of unknown element\n",
+ "\n",
+ "#Result\n",
+ "print\"Atomic no. =\",z2,\"(helium)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Atomic no. = 2.0 (helium)\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "lembda1=108.5*10**-9 #wavelength (m)\n",
+ "lembda2=30.4*10**-9 #wavelength (m)\n",
+ "R=1.097*10**7 #Rydberg constant (m-1)\n",
+ "z=2 #atomic no. of He\n",
+ "n0=1 #ground state\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "n=math.sqrt(1.0/((1.0/n0**2)-(((1.0/lembda1)+(1.0/lembda2))/(R*z**2)))) #quantum no. corresponding to the excited state of He+\n",
+ "\n",
+ "#Result\n",
+ "print\"n =\",round(n )\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n = 5.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6,Page no:408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "z=2 #atomic no. of He+ ion\n",
+ "lembda=133.7*10**-9 #difference b/w the first lines of the Balmer and Lyman series (m)\n",
+ "n1=1\n",
+ "n2=2\n",
+ "n3=3\n",
+ "\n",
+ "#calculation\n",
+ "R=(1.0/(lembda*z**2))*((1.0/((1.0/n2**2)-(1.0/n3**2)))-(1.0/((1.0/n1**2)-(1.0/n2**2)))) #Rudberg constant (m-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"R =%.3e\"%R,\"m**-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R =1.097e+07 m**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7,Page no:409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=1.097*10**7 #Rydberg constant (m-1)\n",
+ "lembda=59.3*10**-9 #wavelength difference b/w first lines of Balmer and Lyman series (m)\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "z=math.sqrt(88.0/(15.0*R*lembda)) #atomic no.\n",
+ "\n",
+ "#Result\n",
+ "print\"Z =\",round(z)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Z = 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:8,Page no:409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=1.097*10**7 #Rydberg constant (m-1)\n",
+ "ratio=1836 #ratio of maas of tritium and hydrogen\n",
+ "\n",
+ "#calculation\n",
+ "lembda=(36*2*10**10)/(5*R*3*ratio) #separation of the first line of the Balmer series (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"\u0394\u03bb =\",round(lembda,1),\"\u00c5\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\u0394\u03bb = 2.4 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_2.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_2.ipynb
new file mode 100755
index 00000000..bc22fbca
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_2.ipynb
@@ -0,0 +1,363 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:Atomic Spectra-II"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "rP = 4 \n",
+ "rD = 5 \n",
+ "LP = 1 \n",
+ "LP = 2 \n",
+ "jP = (5/2.0, 3/2.0, 1/2.0) \n",
+ "jD = (4, 3, 2, 1)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "SP = (rP-1)/2.0 \n",
+ "SD = (rD-1)/2.0 \n",
+ "i=0 \n",
+ "JP=[0,0,0]\n",
+ "JD=[0,0,0,0,0]\n",
+ "for i in range(0,3):\n",
+ " JP[i] =round(math.sqrt(jP[i]*(jP[i])+1) ,2)\n",
+ "i=0 \n",
+ "for i in range(0,4):\n",
+ " JD[i] = round(math.sqrt(jD[i]*(jD[i]+1)) ,2)\n",
+ " \n",
+ "#Result\n",
+ "print\"\\nAngular moments allowed for 4P :\",JP\n",
+ "print\"\\nAngular moments allowed for 5D : \",JD\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Angular moments allowed for 4P : [2.69, 1.8, 1.12]\n",
+ "\n",
+ "Angular moments allowed for 5D : [4.47, 3.46, 2.45, 1.41, 0]\n"
+ ]
+ }
+ ],
+ "prompt_number": 80
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9,Page no:462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "l=1\n",
+ "s=1/2.0\n",
+ "j=3/2.0\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "angle=((j*(j+1))-(l*(l+1))-(s*(s+1)))/(2*math.sqrt(l*s*(l+1)*(s+1))) #value of cos \u03b8\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n cos \u03b8 = \",round(angle,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " cos \u03b8 = 0.408\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:10,Page no:462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "e=1.6*10**-19 #charge of electron (C)\n",
+ "m=9.1*10**-31 #mass of electron (kg)\n",
+ "B=0.1 #external magnetic field (Wb/m**2)\n",
+ "g=4/3.0\n",
+ "mu=9.27*10**-24 #(J/T)\n",
+ "\n",
+ "#calculation\n",
+ "from sympy import *\n",
+ "mu_b=Symbol(\"\u00b5b\")\n",
+ "import math\n",
+ "E=round(g*B,3)*mu_b #The spacing of adjacent sub-levels (J)\n",
+ "v=(e*B)/(4*math.pi*m) #Larmor frequency (Hz)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n The spacing of adjacent sub-levels =\",E,\"J\\n Larmor frequency =%.1e\"%v,\"Hz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The spacing of adjacent sub-levels = 0.133*\u00b5b J\n",
+ " Larmor frequency =1.4e+09 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 82
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11,Page no:462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mu=9.27*10**-24 #(J/T)\n",
+ "g=2 \n",
+ "ms=1/2.0 \n",
+ "dB=2*10**2 #gradient of magnetic field (T/m)\n",
+ "m=1.67*10**-27 #maas of hydrogen atom (kg)\n",
+ "l=0.2 #distance travelled by hydrogen atom (m)\n",
+ "v=2*10**5 #speed of hydrogen atom (m/s)\n",
+ "\n",
+ "#calculation\n",
+ "muz=g*mu*ms #Resolved part of magnetic moment in the direction of magnetic field (J/T)\n",
+ "Fz=muz*dB #Force on the atom (N)\n",
+ "z=0.5*(Fz/m)*(l/v)**2 #Displacement of beam (m)\n",
+ "sep=2*z #Total separation (m)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n Total separation =%.2e\"%sep,\"m\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Total separation =1.11e-06 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 83
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12,Page no:463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "l=1.0\n",
+ "s=1.0/2.0\n",
+ "j1=1.0/2.0\n",
+ "j2=3.0/2.0\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "L=math.sqrt(l*(l+1.0)) #orbital angular momenta\n",
+ "S=math.sqrt(s*(s+1.0)) #spin angular momenta\n",
+ "J1=math.sqrt(j1*(j1+1.0)) #total angular momenta\n",
+ "J2=math.sqrt(j2*(j2+1.0)) #total angular momenta\n",
+ "theta1=(180.0/math.pi)*math.acos(((j2*(j2+1))-(l*(l+1))-(s*(s+1)))/(2.0*math.sqrt(l*(l+1.0))*math.sqrt(s*(s+1)))) #angle b/w l and s (degree)\n",
+ "theta2=(180.0/math.pi)*math.acos(((j1*(j1+1))-(l*(l+1))-(s*(s+1)))/(2.0*math.sqrt(l*(l+1.0))*math.sqrt(s*(s+1)))) #angle b/w l and s (degree)\n",
+ "#Result\n",
+ "print\"\\n |l| =\",round(L,2),\"*h=\u221a2h\\n |s| =\",round(S,2),\"*h=\u221a3/4 h\\n |j| =\",round(J1,2),\"*h=\u221a3/4 h,\",round(J2,2),\"*h=\u221a15/4 h\\n \u03b81 =%d\"%theta1,\"\u02da\\n \u03b82 =%d\"%round(theta2),\"\u02da\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " |l| = 1.41 *h=\u221a2h\n",
+ " |s| = 0.87 *h=\u221a3/4 h\n",
+ " |j| = 0.87 *h=\u221a3/4 h, 1.94 *h=\u221a15/4 h\n",
+ " \u03b81 =65 \u02da\n",
+ " \u03b82 =145 \u02da\n"
+ ]
+ }
+ ],
+ "prompt_number": 84
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13,Page no:463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "B=0.5 #magnetic field (T)\n",
+ "s=1/2.0 \n",
+ "g=2 \n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "from sympy import *\n",
+ "mu_B=Symbol(\"\u03bc\u03b2\")\n",
+ "S=math.sqrt(s*(s+1)) #Magnitude of spin vector\n",
+ "theta1=(180.0/math.pi)*math.acos(0.5/S) #Orientation of spin vector (degree)\n",
+ "theta2=(180.0/math.pi)*math.acos(-0.5/S) #Orientation of spin vector (degree)\n",
+ "E=2*g*mu_B*B #Separation of the energy levels (in terms of \u03bc\u03b2)\n",
+ "\n",
+ "#Result\n",
+ "print\"\u03b8 =\",round(theta1,1),\"\u02da and \u03b8=\",round(theta2,1),\"\u02da\\n \u0394E =\",E\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " \u03b8 = 54.7 \u02da and \u03b8= 125.3 \u02da\n",
+ " \u0394E = 2.0*\u03bc\u03b2\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15,Page no:464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "zH=1.0 #atomic no. of H\n",
+ "zHe=2.0 #atomic no. of He\n",
+ "deltaHe=5.84 #doublet splitting of the first excited state of He (cm-1)\n",
+ "\n",
+ "#calculation\n",
+ "deltaH=deltaHe*(zH/zHe)**4 #doublet splitting for hydrogen atom (cm-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"Doublet splitting for H atom =\",deltaH,\"cm**-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Doublet splitting for H atom = 0.365 cm**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 78
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16,Page no:464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "z=1 #atomic no. of hydrogen atom\n",
+ "n=2\n",
+ "l=1\n",
+ "\n",
+ "#calculation\n",
+ "delta=(5.84*z**4)/(n**3*l*(l+1)) #spin-orbit interaction splitting (cm-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"Spin-orbit interaction splitting =\",delta,\"cm**-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Spin-orbit interaction splitting = 0.365 cm**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_3.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_3.ipynb
new file mode 100755
index 00000000..4cb938e1
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_3.ipynb
@@ -0,0 +1,426 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3:Atomic Spectra-III"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=109729.0 #(cm-1)\n",
+ "T1=43487.0 #(cm-1)\n",
+ "T2=28583.0 #(cm-1)\n",
+ "n=2.0\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "delta=n-math.sqrt(R/T2) #quantum defect\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nquantum defect =\",round(delta,4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "quantum defect = 0.0407\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=109737 #(cm-1)\n",
+ "n=1.805 #effective quantum number for the ground state of rubidium\n",
+ "\n",
+ "#calculation\n",
+ "T=R/(8065*n**2) #ionization potential of rubidium (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"The ionization potential of rubidium =\",round(T,3),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ionization potential of rubidium = 4.176 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6,Page no:485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ratio=2.5 #ratio of ionization potential of hydrogen and sodium\n",
+ "n=3.0\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "z=math.sqrt(n**2/ratio) #effective atomic number of sodium\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nEffective atomic number of sodium =\",round(z,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Effective atomic number of sodium = 1.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7,Page no:485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "hc=12400.0 #value of product of plank's constant and speed of light (eV \u00c5)\n",
+ "E1=3.18 #separation of 4s and 3s level (eV)\n",
+ "lembda=5890.0 #wavelength of the first member of principal series of sodium (\u00c5)\n",
+ "\n",
+ "#calculation\n",
+ "E2=round(hc/lembda,1) #separation of 3s and 3p levels (eV)\n",
+ "deltaE=E1-E2 #separation of 4s and 3p level (eV)\n",
+ "lembda1=hc/deltaE #wavelength of the first member of sharp series (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"\u03bb =%d\"%lembda1,\"\u00c5\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\u03bb =11481 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:8,Page no:486"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "lembda1=5890*10**-10 #wavelength of doublet (\u00c5)\n",
+ "lembda2=5896*10**-10 #wavelength of doublet (\u00c5)\n",
+ "h=6.63*10**-34 #Plank's constant (Js)\n",
+ "c=3*10**8 #speed of light (m/s)\n",
+ "e=1.6*10**-19 #Charge of electron (coulombs)\n",
+ "\n",
+ "#calculation\n",
+ "deltaV=(lembda2-lembda1)/(lembda1*lembda2) #wave no. (m-1)\n",
+ "deltaE=(h*c*deltaV)/e #separation of energy levels (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\u0394E =%.2e\"%deltaE,\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\u0394E =2.15e-03 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9,Page no:486"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "deltaT=2.1*10**-3 #(eV)\n",
+ "lembda=5893*10**-8 #(\u00c5)\n",
+ "\n",
+ "#calculation\n",
+ "deltaV=deltaT*8065 #(cm-1)\n",
+ "deltalembda=deltaV*lembda**2 #(cm)\n",
+ "\n",
+ "#Result\n",
+ "print\"\u0394\u03bb =%.2e\"%deltalembda,\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\u0394\u03bb =5.88e-08 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:10,Page no:486"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "E1=16960.0 #mean position of the level (cm-1)\n",
+ "E2=24490 #convergence limit of sharp series (cm-1)\n",
+ "\n",
+ "#calculation\n",
+ "I=(E1+E2)/8065.0 #ionization energy of sodium atom (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"I =\",round(I,4),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I = 5.1395 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11,Page no:486"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "E1=41450.0 #principal series for sodium atom (cm-1)\n",
+ "E2=24477.0 #sharp series for sodium atom (cm-1)\n",
+ "\n",
+ "#calculation\n",
+ "I=(E1)/8065.0 #ionization energy of sodium atom (eV)\n",
+ "\n",
+ "print\"\\nI =\",round(I,3),\"eV\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "I = 5.139 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12,Page no:487"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "E1=14904 #mean position of the level (cm-1)\n",
+ "E2=28583 #convergence limit of sharp series (cm-1)\n",
+ "\n",
+ "#calculation\n",
+ "I=(E1+E2)/8065.0 #ionization energy of Li atom (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"I =\",round(I,2),\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I = 5.39 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13,Page no:487"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=109734 #(cm-1)\n",
+ "T=24477.0 #(cm-1)\n",
+ "Zeff=1\n",
+ "n=3\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "delta=n-(Zeff*math.sqrt(R/T)) #quantum defect for 3p configuration of sodium\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n\u0394 =\",round(delta ,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\u0394 = 0.883\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14,Page no:487"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "z1=1.0 #atomic no.\n",
+ "z2=2.0 #atomic no.\n",
+ "deltaT2=5.84 #doublet splitting of the first excited state for z=2 (cm-1)\n",
+ "\n",
+ "#calculation\n",
+ "deltaT1=deltaT2*(z1/z2)**4 #separation in hydrogen atom (cm-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"Separation in hydrogen atom =\",deltaT1,\"cm**-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Separation in hydrogen atom = 0.365 cm**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_4.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_4.ipynb
new file mode 100755
index 00000000..4e137e39
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_4.ipynb
@@ -0,0 +1,349 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4:Magneto-optic and Electro-optic Phenomena"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "e=1.6*10**-19 #charge of electron (Coulomb)\n",
+ "B=0.5 #magnetic field (Tesla)\n",
+ "lembda=6438*10**-10 #wavelength of the line (m)\n",
+ "m=9.1*10**-31 #mass of electron (kg)\n",
+ "c=3*10**8 #speed of light (m/s)\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "dlembda=(e*B*lembda**2*10**10)/(4*math.pi*m*c) #normal Zeeman splitting (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"Zeeman shift =\",round(dlembda,3),\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Zeeman shift = 0.097 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2,Page no:515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "e=1.6*10**-19 #charge of electron (Coulomb)\n",
+ "B=1 #magnetic field (Tesla)\n",
+ "lembda=612*10**-9 #wavelength of the line (m)\n",
+ "m=9.1*10**-31 #mass of electron (kg)\n",
+ "c=3*10**8 #speed of light (m/s)\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "dlembda1=(e*B*lembda**2*10**10)/(4*math.pi*m*c) #normal Zeeman splitting (\u00c5)\n",
+ "dlembda2=2*dlembda1 #Separation of outer lines (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"Separation of outer lines =\",round(dlembda2,2),\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Separation of outer lines = 0.35 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mu=9.27*10**-24 #(J/T)\n",
+ "B=1*10**-1 #external magnetic field (T)\n",
+ "h=1.054*10**-34 #Plank's constant (Js)\n",
+ "J=3/2.0 \n",
+ "L=1.0 \n",
+ "S=1/2.0 \n",
+ "\n",
+ "#calculation\n",
+ "g=1+(((J*(J+1))+(S*(S+1))-(L*(L+1)))/(2*J*(J+1))) #Lande g-factor\n",
+ "omega=(g*mu*B)/h #angular velocity of precession (rad/s)\n",
+ "\n",
+ "#Result\n",
+ "print\"\u03c9 =%.1e\"%omega,\"rad/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\u03c9 =1.2e+10 rad/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "J=5/2.0 \n",
+ "#Calculation\n",
+ "sub=2*J+1 \n",
+ "#Result\n",
+ "print\"\\n(i) Energy level does not split\"\n",
+ "print\"\\n(ii) number of sub-shells =\",sub\n",
+ "print\"\\n(iii) Energy level does not split\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) Energy level does not split\n",
+ "\n",
+ "(ii) number of sub-shells = 6.0\n",
+ "\n",
+ "(iii) Energy level does not split\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "S1=0.0\n",
+ "L1=2.0\n",
+ "J1=2.0\n",
+ "g1=1.0\n",
+ "S2=1.0\n",
+ "L2=3.0\n",
+ "J2=4.0\n",
+ "g2=5/4.0\n",
+ "B=0.25 #magnetic field (T)\n",
+ "mu=5.79*10**-5 #mass (eV/T)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i)\n",
+ "E1=4*g1*mu*B #total splitting (eV)\n",
+ "#(ii)\n",
+ "E2=8*g2*mu*B #total splitting (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) total splitting =\",E1,\"eV\\n(ii) total splitting =%.4e\"%E2,\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) total splitting = 5.79e-05 eV\n",
+ "(ii) total splitting =1.4475e-04 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7,Page no:516"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mu=9.27*10**-24 #(J/T)\n",
+ "B=0.45 #magnetic field (\u03bcb/m**2)\n",
+ "h=1.054*10**-34 #Plank's constant (Js)\n",
+ "k=[5/3.0,1.0,1/3.0,-1/3.0,-1.0,-5/3.0] #value of g'Mj'-gMj\n",
+ "\n",
+ "#calculation\n",
+ "c=(mu*B)/h #constant (rad/s)\n",
+ "deltaomega1=c*k[0] #displacement of Zeeman component (rad/s)\n",
+ "deltaomega2=c*k[1] #displacement of Zeeman component (rad/s)\n",
+ "deltaomega3=c*k[2] #displacement of Zeeman component (rad/s)\n",
+ "\n",
+ "#Result\n",
+ "print\"Displcement of Zeeman component =\",\"+-%.3e\"%deltaomega1,\",+-%.2e\"%deltaomega2,\",+-%.2e\"%deltaomega3,\"rad/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Displcement of Zeeman component = +-6.596e+10 ,+-3.96e+10 ,+-1.32e+10 rad/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:8,Page no:517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m=9.1*10**-31 #mass of electron (Kg)\n",
+ "h=1.054*10**-34 #Plank's constant (Js)\n",
+ "B=1.2 #magnetic field (mu*b/m**2)\n",
+ "gs=2 #for a pure spin system\n",
+ "J=0.5 #for a pure spin system\n",
+ "\n",
+ "#calculation\n",
+ "mub=h/(2*m) #(eV/T)\n",
+ "deltaE=2*gs*mub*B*J #energy difference b/w electrons(eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n \u0394E =%.2e\"%deltaE,\"eV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " \u0394E =1.39e-04 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9,Page no:517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m=9.1*10**-31 #mass of electron (Kg)\n",
+ "h=1.054*10**-34 #Plank's constant (Js)\n",
+ "B=5 #magnetic field (T)\n",
+ "lembda=1210 #wavelength of spectral line (\u00c5)\n",
+ "M=[1,0,-1,1,0,-1] #value of Ml+2*Ms\n",
+ "ch=12400 #product of speed of light and Plank's constant (eV*\u00c5)\n",
+ "\n",
+ "#calculation\n",
+ "import numpy as np\n",
+ "M=np.array(M)\n",
+ "dE=(h/(2*m))*B*M #value of dE(upper)-dE(lower) (eV)\n",
+ "dlembda=(lembda**2/ch)*dE #wavelengths of the spectral lines in the pattern (\u00c5)\n",
+ "#Result\n",
+ "print\"Wavelengths of the line =\",round(lembda+dlembda[1],3),\",\",round(lembda+dlembda[0],3),\",\",round(lembda+dlembda[2],3),\"\u00c5\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelengths of the line = 1210.0 , 1210.034 , 1209.966 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_5.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_5.ipynb
new file mode 100755
index 00000000..715472a8
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_4,Chapter_5.ipynb
@@ -0,0 +1,420 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:X-Rays and X-Ray Spectra "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ch=12400.0 #product of speed of light and Plank's constant (eV*\u00c5)\n",
+ "lembda1=0.024 #Compton wavelength of X-ray (\u00c5)\n",
+ "lembda2=1.0 #wavelength of X-ray (\u00c5)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i)\n",
+ "x1=ch/lembda1 #minimum voltage across X-ray tube (V)\n",
+ "#(ii)\n",
+ "x2=ch/(lembda2*10**3) #minimum voltage across X-ray tube (kV)\n",
+ "#(iii)\n",
+ "x3=1.02 #minimum energy of X-ray photon (M*eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) voltage =%.2e\"%x1,\"V\\n(ii) voltage =\",x2,\"KV\\n(iii) energy =\",x3,\"MeV\"\n",
+ "print\"NOTE:Wrong answer of (i) in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) voltage =5.17e+05 V\n",
+ "(ii) voltage = 12.4 KV\n",
+ "(iii) energy = 1.02 MeV\n",
+ "NOTE:Wrong answer of (i) in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2,Page no:535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "n=3/2.0 \n",
+ "dlembda=26*10**-2 #shifting in short wave limit of X-ray spectrum (\u00c5)\n",
+ "ch=12400 #product of speed of light and Plank's constant (eV*\u00c5)\n",
+ "e=1.6*10**-19 #charge of electron (Coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "V=((n-1)/n)*(ch/(dlembda*10**3)) #initial voltage applied to the tube (KV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nInitial voltage =\",round(V,1),\"KV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Initial voltage = 15.9 KV\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "R=10972900.0 #(m-1)\n",
+ "lembda=1.54*10**-10 #wavelength of K line (m)\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "z=1+math.sqrt(4.0/(3.0*lembda*R)) #atomic number of the target element\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nZ =\",round(z)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Z = 29.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "z1=29.0 #atomic no. of Copper\n",
+ "z2=26.0 #atomic no. of Iron\n",
+ "lembda1=193.0 #wavelength of K line in Iron (pm)\n",
+ "\n",
+ "#calculation\n",
+ "lembda=((z2-1)/(z1-1))**2*lembda1 #wavelength of K line in Copper (pm)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n\u03bb =\",round(lembda),\"pm\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\u03bb = 154.0 pm\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "z1=13 #atomic no. of Al\n",
+ "z2=27 #atomic no. of Co\n",
+ "R=1.097*10**7 #(m-1)\n",
+ "\n",
+ "#calculation\n",
+ "lembda1=(4*10**12)/(3*R*(z1-1)**2) #wavelength of K line in Al (pm)\n",
+ "lembda2=(4*10**12)/(3*R*(z2-1)**2) #wavelength of k line in Co (pm)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n wavelength of Al =\",round(lembda1),\"pm\\n wavelength of Co =\",round(lembda2),\"pm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " wavelength of Al = 844.0 pm\n",
+ " wavelength of Co = 180.0 pm\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6,Page no:536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "lembda1=250.0*10**-12 #wavelength of K-alpha line (m)\n",
+ "lembda2=179.0*10**-12 #wavelength of K-alpha line (m)\n",
+ "R=10972900.0 #(m-1)\n",
+ "\n",
+ "#calculation\n",
+ "import math\n",
+ "z1=int(1+math.sqrt(4/(3*lembda1*R))) #atomic number\n",
+ "z2=int(1+math.sqrt(4/(3*lembda2*R))) \n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe required elements are: Z =\"\n",
+ "for i in range(z1+1,z2):\n",
+ " print i \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The required elements are: Z =\n",
+ "24\n",
+ "25\n",
+ "26\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7,Page no:536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ch=12400.0 #product of speed of light and Plank's constant (eV*\u00c5)\n",
+ "Rch=13.6 #product of speed of light, Plank's constant and R (eV)\n",
+ "z=23.0 #atomic no. of vanadium\n",
+ "lembda=24.0 #wavelength of L absorption edge (\u00c5)\n",
+ "\n",
+ "#calculation\n",
+ "El=ch/(lembda*1000) #binding energy of L electron (KeV)\n",
+ "Ek=((3/(4.0*10**3))*Rch*(z-1)**2)+El #binding energy of K electron (KeV)\n",
+ "#Result\n",
+ "print\"\\nBinding energy of K-electron =\",round(Ek,2),\"KeV\"\n",
+ "\n",
+ "print\"NOTE:Approxmiate answer given in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Binding energy of K-electron = 5.45 KeV\n",
+ "NOTE:Approxmiate answer given in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:8,Page no:537"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ch=12.4 #product of speed of light and Plank's constant (KeV*\u00c5)\n",
+ "lembda1=0.178 #wavelength of K-alpha line (\u00c5)\n",
+ "lembda2=0.210 #wavelength of K line (\u00c5)\n",
+ "\n",
+ "#calculation\n",
+ "Ek=ch/lembda1 #binding energy of K electron (KeV)\n",
+ "El=Ek-(ch/lembda2) #binding energy of K-alpha electron (KeV)\n",
+ "lembda=ch/El #wavelength of L absorption edge (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nWavelength of L absorption edge =\",round(lembda,2),\"\u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Wavelength of L absorption edge = 1.17 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9,Page no:537"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ch=12.4 #product of speed of light and Plank's constant (KeV*\u00c5)\n",
+ "lembdak=0.18 #wavelength of K absorption edge (\u00c5)\n",
+ "lembda=0.1 #wavelength of incident photon (\u00c5)\n",
+ "\n",
+ "#calculation\n",
+ "Ek=ch/lembdak #binding energy of K electron (KeV)\n",
+ "E=ch/lembda #energy of incident photon (KeV)\n",
+ "K=E-Ek #maximum kinetic energy of ejected electron (KeV)\n",
+ "\n",
+ "#Result\n",
+ "print\"KE =\",round(K,2),\"KeV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "KE = 55.11 KeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:10,Page no:538"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ch=12.4 #product of speed of light and Plank's constant (KeV*\u00c5)\n",
+ "Rch=13.6/10**3 #product of speed of light, Plank's constant and R (KeV)\n",
+ "lembdak=1.74 #K band absorption edge wavelength of iron (\u00c5)\n",
+ "z=30 #atomic no. of zinc\n",
+ "\n",
+ "#calculation\n",
+ "Ek=ch/lembdak #binding energy of K electron in iron (KeV)\n",
+ "E=(3.0/4.0)*Rch*(z-1)**2 #energy of photon of K-alpha radiation (KeV)\n",
+ "K=E-Ek #kinetic energy of the photoelectrons liberated from iron (KeV)\n",
+ "\n",
+ "#Result\n",
+ "print\"KE =\",round(K,3),\"KeV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "KE = 1.452 KeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/Unit_5,Chapter_5.ipynb b/Introduction_To_Modern_Physics_Volume_1/Unit_5,Chapter_5.ipynb
new file mode 100755
index 00000000..acf91fe6
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/Unit_5,Chapter_5.ipynb
@@ -0,0 +1,992 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:Raman Spectra"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:592"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Variable declaration\n",
+ "r=1.21*10**-10 #internuclear distance (meter)\n",
+ "m=2.7*10**-26 #mass of oxygen atom (kg)\n",
+ "h=6.626*10**-34 #Plank's constant (joule second)\n",
+ "c=3.0*10**8 #speed of light (meter/second)\n",
+ "\n",
+ "#Calculation\n",
+ "def F(j):\n",
+ " wave=B*j*(j+1) \n",
+ " return(wave)\n",
+ "import math\n",
+ "#(a) moment of inertia\n",
+ "mu=m/2.0 #reduced mass (kg)\n",
+ "I=mu*r**2 #moment of inertia (kg m**2)\n",
+ "#(b) rotational constant\n",
+ "B=h/(8*math.pi**2*I*c) #rotational constant (m-1)\n",
+ "\n",
+ "#(c) wave number\n",
+ "waveno=F(1)-F(0) #wave no. of the line corresponding to the transition J=0 to J=1 (m-1)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(a) I = %.3e\"%I,\"kg m**2\\n(b) B =\",round(B,1),\"m-1\\n(c) wave number =\",round(waveno),\"m**-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) I = 1.977e-46 kg m**2\n",
+ "(b) B = 141.5 m-1\n",
+ "(c) wave number = 283.0 m**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 107
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2,Page no:592"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m=1.6738*10**-27 #mass of hydrogen atom (kg)\n",
+ "r=0.74*10**-10 #intermolecular distance of hydrogen molecule (meter)\n",
+ "h=1.054*10**-34 #Planck's constant (joule second)\n",
+ "e=1.6*10**-19 #Charge of electron (coulombs)\n",
+ "\n",
+ "#Calculation\n",
+ "def F(j):\n",
+ " energy=a*j*(j+1) \n",
+ " return(energy)\n",
+ "mu=m/2.0 #reduced mass of hydrogen atom (kg)\n",
+ "I=mu*r**2 #moment of inertia of molecule (kg meter**2)\n",
+ "a=(h**2)/(2.0*I*e) #constant (eV)\n",
+ "E0=F(0) #energy of level 0 (eV)\n",
+ "E1=F(1) #energy of level 1 (eV)\n",
+ "E2=F(2) #energy of level 2 (eV)\n",
+ "E3=F(3) #energy of level 3 (eV)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nE0 =\",E0,\"\\nE1 =%.2e\"%E1,\"eV\\nE2 =%.2e\"%E2,\"eV\\nE3 =%.2e\"%E3,\"eV\"\n",
+ "print\"NOTE:Wrong answer for E3 in book\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "E0 = 0.0 \n",
+ "E1 =1.52e-02 eV\n",
+ "E2 =4.55e-02 eV\n",
+ "E3 =9.09e-02 eV\n",
+ "NOTE:Wrong answer for E3 in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 108
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:593"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "u=1.68*10**-27 #mass of hydrogen atom (kg)\n",
+ "m1=16.0 #mass of oxygen atom in terms u\n",
+ "m2=1.0 #mass of hydrogen atom in terms of u\n",
+ "I=1.48*10**-47 #moment of inertia of OH-radical (kg m**2)\n",
+ "h_bar=1.054*10**-34 #Planck's constant (joule second)\n",
+ "j=5.0 #energy level of OH-radical\n",
+ "c=3.0*10**8 #speed of light (meter/second)\n",
+ "h=6.626*10**-34 #Plank's constant (joule second)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(a) internuclear distance\n",
+ "mu=((m1*m2)/(m1+m2))*u #reduced mass of the molecule (kg)\n",
+ "r=(math.sqrt(I/mu))*10.0**10 #internuclear distance of molecule (\u00c5)\n",
+ "#(b) angular momentum\n",
+ "P=h_bar*math.sqrt(j*(j+1)) #angular momentum of molecule (joule second)\n",
+ "#(c) angular velocity\n",
+ "omega=P/I #angular velocity of molecule (radian/second)\n",
+ "#(d) wave number\n",
+ "B=h/(8*math.pi**2*I*c) #rotational constant (m-1)\n",
+ "no=2*B*(j+1) #wave no. of line corresponding to transition j=5 to j=6 (m-1)\n",
+ "#(e) energy absorbed\n",
+ "E=c*h*no #energy absorbed in the transition j=6 to j=5 (joule)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(a) r =\",round(r,2),\"\u00c5\\n(b) J =%.2e\"%P,\" joule second\\n\"\n",
+ "print\"(c) \u03c9 =%.2e\"%omega,\"rad/s\\n(d) wave number =%.2e\"%no,\"m**-1\\n(e) E =%.1e\"%E,\"J\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) r = 0.97 \u00c5\n",
+ "(b) J =5.77e-34 joule second\n",
+ "\n",
+ "(c) \u03c9 =3.90e+13 rad/s\n",
+ "(d) wave number =2.27e+04 m**-1\n",
+ "(e) E =4.5e-21 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 109
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:593"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=6.63*10**-34 #Plank's constant (joule second)\n",
+ "v=1.153*10**11 #Frequency of absorption line (Hz)\n",
+ "mu=11.38*10**-27 #Recuced mass of the molecule (kg)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "I=h/(4.0*math.pi**2*v) #moment of inertia of CO molecule (kg m**2)\n",
+ "r=math.sqrt(I/mu)*10**10 #Internuclear distance (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n Internuclear distance =\",round(r,2),\" \u00c5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Internuclear distance = 1.13 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 110
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:5,Page no:594"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mu=1.62*10**-27 #Reduced mass of HCL (kg)\n",
+ "c=3*10**8 #Velocity of light (m/s)\n",
+ "h=6.62*10**-34 #Plank's constant (joule second)\n",
+ "v1_P=2906.3 #Wave no. of P branch (cm-1)\n",
+ "v2_P=2927.5 #Wave no. of P branch (cm-1)\n",
+ "v3_P=2948.7 #Wave no. of P branch (cm-1)\n",
+ "v4_P=2969.9 #Wave no. of P branch (cm-1)\n",
+ "v1_R=3012.2 #Wave no. of R branch (cm-1)\n",
+ "v2_R=3033.4 #Wave no. of R branch (cm-1)\n",
+ "v3_R=3054.6 #Wave no. of R branch (cm-1)\n",
+ "v4_R=3078.8 #Wave no. of R branch (cm-1)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(i) Equilibrium internuclear distance\n",
+ "delta_v=v2_P-v1_P #Separation of successive line of P and R branch (cm-1)\n",
+ "B=delta_v/2.0 #rotational constant (cm-1)\n",
+ "I=h/(8.0*math.pi**2*B*10**2*c) #Moment of inertia (kg m**2)\n",
+ "r=math.sqrt(I/mu)*10**10 #Equilibrium internuclear distance (\u00c5)\n",
+ "#(ii) Force constant\n",
+ "v0=(v4_P+v1_R)/2.0 #Equlibrium frequency (cm-1)\n",
+ "k=4*math.pi**2*mu*c**2*v0**2*10**4 #Force constant of HCl (N/m)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n(i) Equilibrium internuclear distance =\",round(r,2),\"\u00c5\\n(ii) Force constant =\",round(k),\"N/m\"\n",
+ "\n",
+ "print\"Note: the answer of (ii) part is wrong in the book\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(i) Equilibrium internuclear distance = 1.28 \u00c5\n",
+ "(ii) Force constant = 515.0 N/m\n",
+ "Note: the answer of (ii) part is wrong in the book\n"
+ ]
+ }
+ ],
+ "prompt_number": 111
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:6,Page no:594"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mu=8.37*10**-28 #Reducec mass of hydrogen molecule (kg)\n",
+ "h=6.58*10**-16 #Plank's constant (eV s)\n",
+ "E0=0.273 #Ground state vibrational energy of hydrogen molecule (eV)\n",
+ "\n",
+ "#Calculation\n",
+ "k=mu*((2*E0)/h)**2 #force constant of hydrogen molecule (N/m)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n Force constant =\",round(k),\"N/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Force constant = 576.0 N/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:7,Page no:595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m1=1.0 #molar mass of H atom (amu)\n",
+ "m2=35.0 #molar mass of Cl atom (amu)\n",
+ "u=1.68*10**-27 #atomic mass unit (kg)\n",
+ "v=2885.9*100 #wave no. of line (m-1)\n",
+ "c=3.0*10**8 #Velocity of light (m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "mu=((m1*m2)/(m1+m2))*u #reduced mass of HCl molecule (kg)\n",
+ "mu=round(mu,29)\n",
+ "k=4*(math.pi*c*v)**2*mu #force constant of HCl molecule (N/m)\n",
+ "\n",
+ "#Result\n",
+ "print\"Force constant =\",round(k),\"N/m\"\n",
+ "print\"NOTE:Approximate value of pi is used in book,that's why different answer\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force constant = 482.0 N/m\n",
+ "NOTE:Approximate value of pi is used in book,that's why different answer\n"
+ ]
+ }
+ ],
+ "prompt_number": 113
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:8,Page no:595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "m1=12.0 #molar mass of C atom (amu)\n",
+ "m2=16.0 #molar mass of O atom (amu)\n",
+ "u=1.68*10**-27 #atomic mass unit (kg)\n",
+ "k=1870.0 #force constant of CO molecule (N/m)\n",
+ "h=6.6*10**-34 #Plank's constant (joule second)\n",
+ "e=1.602*10**-19 #charge of electron (Coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "def F(V):\n",
+ " energy=((V+.5)*h*v)/e \n",
+ " return(energy)\n",
+ "\n",
+ "#def G(V):\n",
+ "# energy=((V+.5)*h*v*8065)/e \n",
+ "# return(energy)\n",
+ "import math\n",
+ "mu=((m1*m2)/(m1+m2))*u #reduced mass of CO molecule (kg)\n",
+ "v=(1.0/(2.0*math.pi))*math.sqrt(k/mu) #frequency of vibration of CO molecule (Hz)\n",
+ "e1=F(0) #energy of 1st level of CO molecule (eV)\n",
+ "#E1=G(0) #energy of 1st level of CO molecule (cm-1)\n",
+ "E1=round(e1,3)*8065\n",
+ "e2=F(1) #energy of 2nd level of CO molecule (eV)\n",
+ "E2=round(e2,3)*8065 #energy of 2nd level of CO molecule (cm-1)\n",
+ "e3=F(2) #energy of 3rd level of CO molecule (eV)\n",
+ "E3=round(e3,3)*8065 #energy of 3rd level of CO molecule (cm-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nE = \",round(e1,3),\"eV,\",round(e2,3),\"eV,\",round(e3,3),\"eV.........\\n =\",E1,\"cm**-1,\",E2,\"cm**-1,\",E3,\"cm**-1.........\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "E = 0.132 eV, 0.396 eV, 0.66 eV.........\n",
+ " = 1064.58 cm**-1, 3193.74 cm**-1, 5322.9 cm**-1.........\n"
+ ]
+ }
+ ],
+ "prompt_number": 114
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:9,Page no:595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mu=1.61*10**-27 #reduced mass of HCl molecule (kg)\n",
+ "c=3*10**8 #speed of light (m/s)\n",
+ "lembda=3.465*10**-6 #wavelength of infrared radiation (m)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "v=c/lembda #frequency of radiation (s-1)\n",
+ "k=4*(math.pi*v)**2*mu #force constant of HCl molecule (N/m)\n",
+ "\n",
+ "#Result\n",
+ "print\"Force constant =\",round(k),\"N/m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force constant = 476.0 N/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 115
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:10,Page no:596"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=6.6*10**-34 #Plank's constant (joule second)\n",
+ "mu=1.62*10**-27 #reduced mass of HCl molecule (kg)\n",
+ "c=3*10**8 #speed of light (m/s)\n",
+ "v=2.886*10**5 #wave no. of absorption line in infrared spectrum (m-1)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "k=4*(math.pi*c*v)**2*mu #force constant of HCl molecule (N/m)\n",
+ "amp=math.sqrt((h*c*v)/k)*10**10 #amplitude of vibration in the ground state (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"Amplitude of vibration =\",round(amp,2),\"\u00c5\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amplitude of vibration = 0.11 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 116
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:11,Page no:596"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "v1=214330.0 #fundamental band for CO molecule (m-1)\n",
+ "v2=425970.0 #first overtone for CO molecule (m-1)\n",
+ "\n",
+ "#calculation\n",
+ "import numpy as np\n",
+ "a=np.array([[1,-2],[2,-6]])\n",
+ "b=np.array([v1,v2])\n",
+ "x=np.linalg.solve(a,b)\n",
+ "we=x[0]\n",
+ "wexe=x[1]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"We find we=\",we,\"m**-\",\"xe.we=\",wexe,\"m**-1\"\n",
+ "print\"NOTE:Wrong answer for xe.we in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We find we= 217020.0 m**- xe.we= 1345.0 m**-1\n",
+ "NOTE:Wrong answer for xe.we in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 117
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:12,Page no:596"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "v1=2886.0 #intense absorption (m-1)\n",
+ "v2=5668.0 #intense absorption (m-1)\n",
+ "v3=8347.0 #intense absorption (m-1)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "from numpy.linalg import inv\n",
+ "A=np.array([[1,-2],[2,-6]]) #coefficient matrix\n",
+ "b=np.array([[v1],[v2]]) #right hand side matrix\n",
+ "mu=1.61*10**-27 #reduced mass (kg)\n",
+ "c=3*10**8 #speed of light (m/s)\n",
+ "x=np.dot(inv(A),b) #values of omega and x*omega (m-1)\n",
+ "k=4*(math.pi*c*x[0]*100)**2*mu #force constant (N/m)\n",
+ "\n",
+ "#Result\n",
+ "print\"we =\",round(x[0]),\"cm**-1\\nxe*we =\",round(x[1]),\"cm**-1\\nforce constant =\",round(k),\"N/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "we = 2990.0 cm**-1\n",
+ "xe*we = 52.0 cm**-1\n",
+ "force constant = 511.0 N/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 147
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:13,Page no:597"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "v1=8.657*10**13 #frequency of rotation absorption spectrum (Hz)\n",
+ "v2=8.483*10**13 #frequency of rotation absorption spectrum (Hz)\n",
+ "h=6.6*10**-34 #Plank's constant (joule second)\n",
+ "mu=1.544*10**-27 #Recuced mass of CH molecule (kg)\n",
+ "\n",
+ "#Calculation\n",
+ "#(i) equilibrium separation\n",
+ "import math\n",
+ "I=h/(2*math.pi**2*(v1-v2)) #Moment of inertia (kg m**2)\n",
+ "r=math.sqrt(I/mu) #equilibrium internuclear distance (m)\n",
+ "#(ii) force constant of molecule\n",
+ "v0=(v1+v2)/2.0 #Central frequency (Hz)\n",
+ "k=4*mu*(math.pi*v0)**2 #Force constant of CH molecule (N/m)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n (i) equilibrium separation =%.2e\"%r,\"m\\n (ii) force constant =\",round(k),\"N/m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " (i) equilibrium separation =1.12e-10 m\n",
+ " (ii) force constant = 448.0 N/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 118
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:14,Page no:597"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "k=448.0 #force constant of CH molecule (N/m)\n",
+ "mu=4.002*10**-27 #reduced mass of CH molecule (kg)\n",
+ "r=0.112*10**-9 #internuclear distance (m)\n",
+ "h=6.6*10**-34 #Plank's constant (joule second)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "v0=(1/(2*math.pi))*math.sqrt(k/mu) #central frequency (s-1)\n",
+ "I=mu*r**2 #moment of inertia of molecule (kg m**2)\n",
+ "x=h/(4.0*math.pi**2*I) #additional frequency (s-1)\n",
+ "v1=v0+x #peak frequency (Hz)\n",
+ "v2=v0-x #peak frequency (Hz)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n Peak frequencies =%.3e\"%v1,\"Hz,%.3e\"%v2,\"Hz\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " Peak frequencies =5.358e+13 Hz,5.292e+13 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 119
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:15,Page no:598"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "v1=2174.07 #peak wave number (cm-1)\n",
+ "v2=2166.35 #peak wave number (cm-1)\n",
+ "h=6.6*10**-34 #Plank's constant (joule second)\n",
+ "c=3*10**8 #Speed of light (m/s)\n",
+ "mu=1.145*10**-26 #Reduced mass of CO molecule (kg)\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(a) central frequency\n",
+ "B=(v1-v2)/4 #Rotational constant (cm-1)\n",
+ "v0=(v1+v2)/2 #Central frequency (cm-1)\n",
+ "#(b) internuclear distance\n",
+ "I=h/(8*math.pi**2*B*100*c) #moment of inertia of molecule (kg m**2)\n",
+ "r=math.sqrt(I/mu)*10**10 #equilibrium internuclear distance (\u00c5)\n",
+ "#(c) force constant\n",
+ "k=4*mu*(math.pi*c*v0*100)**2 #force constant (N/m)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\n(a) central frequency =\",v0,\"cm**-1\\n(b) internuclear distance =\",round(r,2),\"\u00c5\\n(c) force constant =%d\"%k,\"N/m\"\n",
+ "print\"NOTE:Wrong answer for 'k' in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(a) central frequency = 2170.21 cm**-1\n",
+ "(b) internuclear distance = 1.12 \u00c5\n",
+ "(c) force constant =1916 N/m\n",
+ "NOTE:Wrong answer for 'k' in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 120
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:16,Page no:598"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mu=3.142*10**-27 #reduced mass of the molecule (kg)\n",
+ "r=1.288*10**-10 #internuclear distance (m)\n",
+ "h=6.6*10**-34 #Plank's constant (joule second)\n",
+ "c=3*10**8 #Speed of light (m/s)\n",
+ "v0=201100.0 #central frequency (m-1)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "I=mu*r**2 #moment of inertia of molecule (kg m**2)\n",
+ "B=h/(8.0*math.pi**2*I*c) #Rotational constant (m-1)\n",
+ "vR0=v0+(2*B) #wave no. of 1st line of R-branch (m-1)\n",
+ "vR1=v0+(4*B) #wave no. of 2nd line of R-branch (m-1)\n",
+ "vP1=v0-(2*B) #wave no. of 1st line of P-branch (m-1)\n",
+ "vP2=v0-(4*B) #wave no. of 2nd line of P-branch (m-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n V_R(0) =\",round(vR0),\"m**-1\\n V_R(1) =\",round(vR1),\"m**-1\\n V_P(1) =\",round(vP1),\"m**-1\\n V_P(2) =\",round(vP2),\"m**-1\"\n",
+ "\n",
+ "print\"NOTE:Very approximate value of 'B' is calculated in book,that's why difference in answers\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " V_R(0) = 202169.0 m**-1\n",
+ " V_R(1) = 203238.0 m**-1\n",
+ " V_P(1) = 200031.0 m**-1\n",
+ " V_P(2) = 198962.0 m**-1\n",
+ "NOTE:Very approximate value of 'B' is calculated in book,that's why difference in answers\n"
+ ]
+ }
+ ],
+ "prompt_number": 121
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:17,Page no:599"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "mu=1.62*10**-27 #reduced mass of HCl molecule (kg)\n",
+ "r=1.293*10**-10 #internuclear distance (m)\n",
+ "h=6.6*10**-34 #Plank's constant (joule second)\n",
+ "c=3*10**8 #Speed of light (m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "I=mu*r**2 #moment of inertia of molecule (kg m**2)\n",
+ "I=round(I,48)\n",
+ "\n",
+ "B=h/(8*math.pi**2*I*c) #Rotational constant (m-1)\n",
+ "B=round(B)\n",
+ "sep=4*B #separation b/w lines R(0) and P(1) (m-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n\u0394\u03bd =\",sep,\"m**-1\"\n",
+ "print\"NOTE:Note:Again I is wrongly approximated due to which 'B' and thus fina answer does not match\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\u0394\u03bd = 4128.0 m**-1\n",
+ "NOTE:Note:Again I is wrongly approximated due to which 'B' and thus fina answer does not match\n"
+ ]
+ }
+ ],
+ "prompt_number": 122
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:18,Page no:599"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "import math\n",
+ "a=214.6*100 #(m-1)\n",
+ "b=0.6*100 #(m-1)\n",
+ "h=6.62*10**-34 #Plank's constant (joule second)\n",
+ "c=3.0*10**8 #Speed of light (m/s)\n",
+ "no=1.0/(math.e) #number of molecules in state with respect to ground state\n",
+ "k=1.38*10**-23 #Boltzmann constant (J K-1)\n",
+ "\n",
+ "#Calculation\n",
+ "deltaE=h*c*(a-2*b) #difference in the energies of state 0 and state 1 (J)\n",
+ "deltaE=round(deltaE,24)\n",
+ "T1=deltaE/k #temperature at which number of molecules in state 1 is 1/e times of state 0 (K)\n",
+ "T2=deltaE/(k*math.log(10.0)) #temperature at which number of molecules in state 1 is 10% of state 0 (K)\n",
+ "\n",
+ "#Result\n",
+ "print\"n(i) T =\",round(T1),\"K\\n(ii) T =\",round(T2),\"K\" \n",
+ "print\"NOTE:Calculation mistake in book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n(i) T = 307.0 K\n",
+ "(ii) T = 133.0 K\n",
+ "NOTE:Calculation mistake in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 123
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:19,Page no:599"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "vexc=4358.0*10**-10 #wavelength of exciting line (m)\n",
+ "vsto=4458.0*10**-10 #wavelength of Stokes line (m)\n",
+ "\n",
+ "#Calculation\n",
+ "vbar_exc=1/vexc #wave number of exciting line (m-1)\n",
+ "vbar_sto=1/vsto #wave number of Stokes line (m-1)\n",
+ "delta_vbar=vbar_exc-vbar_sto #Raman shift (m-1)\n",
+ "vbar_antistoke=vbar_exc+delta_vbar #Wave number of Anti-Stokes line (m-1)\n",
+ "lembda_antistoke=(1/vbar_antistoke)*10**10 #Wavelength of Anti-Stokes line (\u00c5)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nwavelength of Anti-stokes line =\",round(lembda_antistoke,1),\"\u00c5\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "wavelength of Anti-stokes line = 4262.4 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 124
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:20,Page no:600"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "h=6.62*10**-34 #Plank's constant (joule second)\n",
+ "c=3.0*10**8 #Speed of light (m/s)\n",
+ "x=62.4*100 #(m-1)\n",
+ "y=41.6*100 #(m-1)\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "B=y/4.0 #Rotational constant of HCl (m-1)\n",
+ "I=h/(8*math.pi**2*B*c) #Moment of inertia (kg m**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n I =%.1e\"%I,\"kg m**2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " I =2.7e-47 kg m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 125
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:21,Page no:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "def F(v):\n",
+ " energy=(((v+.5)*a)-(((v+.5)**2)*b))*h*c \n",
+ " return(energy)\n",
+ "#Variable declaration\n",
+ "h=6.62*10**-34 #Plank's constant (joule second)\n",
+ "c=3.0*10**8 #Speed of light (m/s)\n",
+ "a=1580.36*100 #value of \u03c9e (m-1)\n",
+ "b=12.07*100 #value of \u03c9exe (m-1)\n",
+ "\n",
+ "#Calculation\n",
+ "E0=F(0) #Zero point energy of the molecule (J)\n",
+ "shift=(F(1)-F(0))/(h*c) #Expected vibrational Raman shift (m-1)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nZero point energy =%.3e\"%E0,\"J\\nExpected vibrational Raman shift =\",shift/100,\"cm**-1\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Zero point energy =1.563e-20 J\n",
+ "Expected vibrational Raman shift = 1556.22 cm**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 126
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Introduction_To_Modern_Physics_Volume_1/screenshots/Requred_probablty.png b/Introduction_To_Modern_Physics_Volume_1/screenshots/Requred_probablty.png
new file mode 100755
index 00000000..f74f3b00
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/screenshots/Requred_probablty.png
Binary files differ
diff --git a/Introduction_To_Modern_Physics_Volume_1/screenshots/atomc_no_he.png b/Introduction_To_Modern_Physics_Volume_1/screenshots/atomc_no_he.png
new file mode 100755
index 00000000..45c5e72a
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/screenshots/atomc_no_he.png
Binary files differ
diff --git a/Introduction_To_Modern_Physics_Volume_1/screenshots/zeeman_shft.png b/Introduction_To_Modern_Physics_Volume_1/screenshots/zeeman_shft.png
new file mode 100755
index 00000000..0039f43f
--- /dev/null
+++ b/Introduction_To_Modern_Physics_Volume_1/screenshots/zeeman_shft.png
Binary files differ