summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb
diff options
context:
space:
mode:
authorhardythe12015-04-07 15:58:05 +0530
committerhardythe12015-04-07 15:58:05 +0530
commit92cca121f959c6616e3da431c1e2d23c4fa5e886 (patch)
tree205e68d0ce598ac5caca7de839a2934d746cce86 /Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb
parentb14c13fcc6bb6d01c468805d612acb353ec168ac (diff)
downloadPython-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.gz
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.bz2
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.zip
added books
Diffstat (limited to 'Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb')
-rwxr-xr-xFundamentals_Of_Thermodynamics/Chapter15_6.ipynb921
1 files changed, 921 insertions, 0 deletions
diff --git a/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb
new file mode 100755
index 00000000..1c9182a7
--- /dev/null
+++ b/Fundamentals_Of_Thermodynamics/Chapter15_6.ipynb
@@ -0,0 +1,921 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4afaac3b11e3c61840a392c8cec12435d16ae2f3d2cdfe278957aaca509d72f5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter15:CHEMICAL REACTIONS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.1:Pg-621"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#ques1\n",
+ "#theoratical air-fuel ratio for combustion of octane\n",
+ "#combustion equation is\n",
+ "#C8H18 + 12.5O2 + 12.5(3.76) N2 \u2192 8 CO2 + 9H2O + 47.0N2\n",
+ "rm=(12.5+47.0)/1;#air fuel ratio on mole basis\n",
+ "rma=rm*28.97/114.2;#air fuel ratio on mass basis;\n",
+ "print \"Theoratical air fuel ratio on mass basis is\",round(rma),\"kg air/kg fuel\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Theoratical air fuel ratio on mass basis is 15.0 kg air/kg fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.2:Pg-622"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 2\n",
+ "# molal analysis of the products of combustion\n",
+ "# combustion equation is \n",
+ "# C8H18 + 12.5(2) O2 + 12.5(2)(3.76) N2 \u2192 8 CO2 + 9H2O + 12.5O2 + 94.0N2\n",
+ "nCO2=8 # number of moles of CO2 \n",
+ "nH2O=9 # number of moles of H2O\n",
+ "nO2=12.5 # number of moles of O2\n",
+ "nN2=94.0 # number of moles of N2\n",
+ "moles=nCO2+nH2O+nO2+nN2 # total moles\n",
+ "# molal analysis of products\n",
+ "xCO2=nCO2*100/moles \n",
+ "xH2O=nH2O*100/moles\n",
+ "xO2=nO2*100/moles\n",
+ "xN2=nN2*100/moles\n",
+ "print \" CO2 =\",round(xCO2,2)\n",
+ "print \"\\n H2O=\",round(xH2O,2)\n",
+ "print \"\\n O2=\",round(xO2,2)\n",
+ "print \"\\n N2=\",round(xN2,2)\n",
+ "print \"\\n The dew point temp. corresponding to partial pressure of water i.e \",round(xH2O,2),\"KPa is 39.7 degree C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " CO2 = 6.48\n",
+ "\n",
+ " H2O= 7.29\n",
+ "\n",
+ " O2= 10.12\n",
+ "\n",
+ " N2= 76.11\n",
+ "\n",
+ " The dew point temp. corresponding to partial pressure of water i.e 7.29 KPa is 39.7 degree C\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.2E:Pg-622"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 2\n",
+ "# molal analysis of the products of combustion\n",
+ "# combustion equation is \n",
+ "# C8H18 + 12.5(2) O2 + 12.5(2)(3.76) N2 \u2192 8 CO2 + 9H2O + 12.5O2 + 94.0N2\n",
+ "pressure=14.7 # in lbf/in^2\n",
+ "nCO2=8 # number of moles of CO2 \n",
+ "nH2O=9 # number of moles of H2O\n",
+ "nO2=12.5 # number of moles of O2\n",
+ "nN2=94.0 # number of moles of N2\n",
+ "moles=nCO2+nH2O+nO2+nN2 # total moles\n",
+ "# molal analysis of products\n",
+ "xCO2=nCO2*100/moles \n",
+ "xH2O=nH2O*100/moles\n",
+ "xO2=nO2*100/moles\n",
+ "xN2=nN2*100/moles\n",
+ "print \" CO2 =\",round(xCO2,2)\n",
+ "print \"\\n H2O=\",round(xH2O,2)\n",
+ "print \"\\n O2=\",round(xO2,2)\n",
+ "print \"\\n N2=\",round(xN2,2)\n",
+ "PressureO2=pressure*xH2O/100 # partial pressure of O2\n",
+ "print \"\\n The dew point temp. corresponding to partial pressure of water i.e \",round(PressureO2,3),\"lbf/in^2 is 104 F degree C\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " CO2 = 6.48\n",
+ "\n",
+ " H2O= 7.29\n",
+ "\n",
+ " O2= 10.12\n",
+ "\n",
+ " N2= 76.11\n",
+ "\n",
+ " The dew point temp. corresponding to partial pressure of water i.e 1.071 lbf/in^2 is 104 F degree C\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.3:Pg-623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 3\n",
+ "# to determine the air\u2013fuel ratio on a volumetric basis\n",
+ "# the combustion equation is\n",
+ "# 0.14H2+0.27CO+0.03CH4+0.006O2+0.509N2+0.045CO2+0.259O2+0.259(3.76)N2\u21920.20H2O+0.345CO2+1.482 N2\n",
+ "mH2=2 # molar mass of H2\n",
+ "mCO=28 # molar mass of CO\n",
+ "mCH4=16 # molar mass of CH4\n",
+ "mO2=32 # molar mass of O2\n",
+ "mN2=28 # molar mass of N2\n",
+ "mCO2=44 # molar mass of CO2\n",
+ "\n",
+ "\n",
+ "kmolair=0.259 # moles of air in mixture using combustion equation\n",
+ "kmolfuel=0.21 # moles of fuel in mixture using combustion equation\n",
+ "ratioth=kmolair/kmolfuel # theoratical ratio\n",
+ "\n",
+ "# For 20% excess air\n",
+ "vratio=ratioth*(1+0.2) # new ratio for excess air on volume basis\n",
+ "\n",
+ "print \" The A/F ratio on volumetric basis is \",round(vratio,2)\n",
+ "mratio=vratio*28.97 /(0.14*mH2+0.27*mCO+0.03*mCH4+0.006*mO2+0.509*mN2+0.045*mCO2)\n",
+ "print \"\\n The A/F ratio on mass basis is \",round(mratio,2),\"kg air/kg fuel\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The A/F ratio on volumetric basis is 1.48\n",
+ "\n",
+ " The A/F ratio on mass basis is 1.73 kg air/kg fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.4:Pg-624"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 4\n",
+ "# determining the air\u2013fuel ratio and the percent theoretical air\n",
+ "CO2=10.00 # percentage\n",
+ "O2=2.37 # percentage\n",
+ "CO=0.53 # percentage\n",
+ "N2=87.10 # percentage\n",
+ "mCH4=16 # molecular mass of CH4\n",
+ "# using this data the combustion equation is\n",
+ "# a CH4 + b O2 + c N2 \u2192 10.0 CO2 + 0.53 CO + 2.37 O2 + d H2O + 87.1N2\n",
+ "# on balancing we get\n",
+ "# 10.53 CH4 + 23.16 O2 + 87.1N2 \u219210.0 CO2 + 0.53 CO + 2.37 O2 + 21.06 H2O + 87.1N2\n",
+ "# balanced combustion equation for per Kmole of fuel is:\n",
+ "# CH4 + 2.2O2 + 8.27 N2 \u2192 0.95 CO2 + 0.05 CO + 2H2O + 0.225 O2 + 8.27 N2\n",
+ "molesAir=2.2+8.27 # moles of air\n",
+ "AF= 28.97*molesAir/mCH4 # air fuel ratio on mass basis\n",
+ "print \"\\n The A/F ratio on mass basis is \",round(AF,2),\"kg air/kg fuel\"\n",
+ "# Theoritical combustion equation:\n",
+ "# CH4 + 2O2 + 2(3.76)N2 \u2192 CO2 + 2H2O + 7.52 N2\n",
+ "molesAirth=2+2*3.76 # moles of air(theoritical)\n",
+ "AFth= 28.97*molesAirth/mCH4 # air fuel ratio on mass basis (theoritical)\n",
+ "print \"\\n The A/F ratio (theoritical) on mass basis is \",round(AFth,2),\"kg air/kg fuel\"\n",
+ "print \"\\n The percent theoretical air is\",round(AF*100/AFth,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The A/F ratio on mass basis is 18.96 kg air/kg fuel\n",
+ "\n",
+ " The A/F ratio (theoritical) on mass basis is 17.24 kg air/kg fuel\n",
+ "\n",
+ " The percent theoretical air is 110.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.5:Pg-625"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 5\n",
+ "\n",
+ "Sulfur=0.6 # percent by mass\n",
+ "Hydrogen=5.7 # percent by mass\n",
+ "Carbon=79.2 # percent by mass\n",
+ "Oxygen=10.0 # percent by mass\n",
+ "Nitrogen=1.5 # percent by mass\n",
+ "Ash=3.0 # percent by mass\n",
+ "mS=32.0 # molecular mass \n",
+ "mH2=2.0 # molecular mass\n",
+ "mC=12.0 # molecular mass\n",
+ "mO2=32.0 # molecular mass\n",
+ "mN2=28.0 # molecular mass\n",
+ "# molal composition per 100 Kg of fuel:\n",
+ "S=Sulfur/mS # molal composition \n",
+ "H=Hydrogen/mH2 # molal composition\n",
+ "C=Carbon/mC # molal composition\n",
+ "O2=Oxygen/mO2 # molal composition\n",
+ "N2=Nitrogen/mN2 # molal composition\n",
+ "\n",
+ "#The combustion equation becomes \n",
+ "# 0.02 S + 0.02 O2 \u21920.02 SO2\n",
+ "# 2.85 H2 + 1.42 O2 \u21922.85 H2O\n",
+ "# 6.60 C + 6.60 O2 \u21926.60 CO2\n",
+ "\n",
+ "O2req=0.02+1.42+6.60 # kmol O2 required/100 kg fuel\n",
+ "O2present=O2req-O2 # kmol O2 from air/100 kg fuel\n",
+ "AFtheo= (O2present+O2present*3.76)*28.97/100 # AF ration theoritical kg air/kg fuel\n",
+ "print \"\\n The A/F ratio (theoritical) on mass basis is \",round(AFtheo,2),\"kg air/kg fuel\"\n",
+ "print \"\\n The A/F ratio for 30% excess air on mass basis is \",round(AFtheo*1.3,2),\"kg air/kg fuel\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The A/F ratio (theoritical) on mass basis is 10.66 kg air/kg fuel\n",
+ "\n",
+ " The A/F ratio for 30% excess air on mass basis is 13.85 kg air/kg fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.6:Pg-629"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#ques6\n",
+ "# determining heat transfer per kilomole of fuel entering combustion chamber\n",
+ "\n",
+ "#1-CH4\n",
+ "#2-CO2\n",
+ "#3-H2O\n",
+ "#hf-standard enthalpy of given substance\n",
+ "hf1=-74.873;#kJ\n",
+ "hf2=-393.522;#kJ\n",
+ "hf3=-285.830;#kJ\n",
+ "Qcv=hf2+2*hf3-hf1;#kJ\n",
+ "print \"Heat transfer per kilomole of fuel entering combustion chamber is\",round(Qcv,3),\"kJ\"\n",
+ "#the answers in the book is different as they have not printed the decimals in values"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer per kilomole of fuel entering combustion chamber is -890.309 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.7:Pg-631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#ques7\n",
+ "#calculating enthalpy of water at given pressure and temperature\n",
+ "\n",
+ "#1.Assuming steam to be an ideal gas with value of Cp\n",
+ "T1=298.15;#Initial temperature in K\n",
+ "T2=573.15;#final temperature in K\n",
+ "T=(T1+T2)/2;#average temperature in K\n",
+ "Cp=1.79+0.107*T/1000+0.586*(T/1000)**2-.20*(T/1000)**3;#specific heat at constant pressure in kj/kg.K\n",
+ "M=18.015;#mass in kg\n",
+ "dh=M*Cp*(T2-T1);#enthalpy change in kJ/kmol\n",
+ "ho=-241.826;#enthalpy at standard temperature and pressure in kJ/mol\n",
+ "htp1=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n",
+ "print \" 1. Enthalpy of water at given pressure and temperature using value of Cp =\",round(htp1,3),\"kJ/kmol\"\n",
+ "\n",
+ "#2..Assuming steam to be an ideal gas with value for dh\n",
+ "dh=9359;#enthalpy change from table A.9 in kJ/mol\n",
+ "htp2=ho+dh/1000;#enthalpy at given temp and pressure in kJ/kmol\n",
+ "print \" 2. Enthalpy of water at given pressure and temperature assuming value od dh =\",round(htp2,3),\"kJ/kmol \"\n",
+ "\n",
+ "#3. Using steam table\n",
+ "dh=M*(2977.5-2547.2);#enthalpy change for gases in kJ/mol\n",
+ "htp3g=dh/1000+ho;\n",
+ "dh=M*(2977.5-104.9);#enthalpy change for liquid in kJ/mol\n",
+ "hl=-285.830;#standard enthalpy for liquid in kJ/kmol\n",
+ "htp31=hl+dh/1000.0;#enthalpy at given temp and pressure in kJ/kmol\n",
+ "print \" 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp31,3),\"kJ/kmol \"\n",
+ "print \" 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid =\",round(htp3g,3),\"kJ/kmol \"\n",
+ "#4.using generalised charts\n",
+ "#htp=ho-(h2*-h2)+(h2*-h1*)+(h1*-h1);\n",
+ "#h2*-h2=Z*R*Tc,\n",
+ "#h2*-h1*=9539 kJ/mol, from part 2\n",
+ "#h1*-h1=0 ,as ideal gas \n",
+ "Z=0.21;#from chart\n",
+ "R=8.3145;#gas constant in SI units\n",
+ "Tc=647.3;#critical temperature in K\n",
+ "htp4=ho+9539/1000-Z*R*Tc/1000;#enthalpy at given temp and pressure in kJ/kmol\n",
+ "print \" 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = \",round(htp4,3),\"kJ/kmol\"\n",
+ "#the answers in book are different as they have not printed the decimals in values"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 1. Enthalpy of water at given pressure and temperature using value of Cp = -232.258 kJ/kmol\n",
+ " 2. Enthalpy of water at given pressure and temperature assuming value od dh = -232.826 kJ/kmol \n",
+ " 3.(i) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.08 kJ/kmol \n",
+ " 3.(ii) enthalpy at given temp and pressure in kJ/kmol in terms of liquid = -234.074 kJ/kmol \n",
+ " 4. enthalpy at given temp and pressure in kJ/kmol using compressibility chart = -233.956 kJ/kmol\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.8:Pg-632"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 8\n",
+ "# Determine the heat transfer\n",
+ "airth=400 # % excess theoritical air\n",
+ "Ti=25 # Entry temp in degree celsius\n",
+ "To=900 # Exit temp in Kelvin\n",
+ "mf=0.25 # specific fuel consumption in kg/s of fuel per megawatt output\n",
+ "# The combustion equation is:\n",
+ "# C8H18(l) + 4(12.5)O2 + 4(12.5)(3.76)N2 \u2192 8CO2 + 9H2O + 37.5O2 + 188.0N2\n",
+ "hfC8H18=-250105 # is the enthalpy of fuel in kJ/kmol \n",
+ "nCO2=8 # moles\n",
+ "hfCO2=-393522 # enthalpy in kJ/kmol\n",
+ "DelhCO2=28030 # enthalpy in kJ/kmol\n",
+ "mC8H18=114.23 # molecular mass\n",
+ "nH2O=9 # moles\n",
+ "hfH2O=-241826 # enthalpy in kJ/kmol\n",
+ "DelhH2O=21937 # enthalpy in kJ/kmol\n",
+ "DelhO2=19241 # enthalpy in kJ/kmol\n",
+ "nO2=37.5 # moles\n",
+ "DelhN2=18225 # enthalpy in kJ/kmol\n",
+ "nN2=188.0 # moles\n",
+ "Eproduct=nCO2*(hfCO2+DelhCO2)+nH2O*(hfH2O+DelhH2O)+nO2*DelhO2+nN2*DelhN2\n",
+ "\n",
+ "Wcv=1000*mC8H18/mf # work in kJ/kmol fuel\n",
+ "print \" The work is \",Wcv,\"kJ/kmol fuel\"\n",
+ "\n",
+ "Qcv=Eproduct+Wcv-hfC8H18 # using first law\n",
+ "print \" The Heat transfer is \",Qcv,\"kJ/kmol fuel\"\n",
+ "\n",
+ "# the answer is slightly different in textbook due to approximation while here the answers are precise\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The work is 456920.0 kJ/kmol fuel\n",
+ " The Heat transfer is -48074.5 kJ/kmol fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.8E:Pg-633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 8\n",
+ "# Determine the heat transfer\n",
+ "airth=400 # % excess theoritical air\n",
+ "Ti=77 # Entry temp in F\n",
+ "To=1100 # Exit temp in F\n",
+ "mf=1 # specific fuel consumption in lb of fuel per horsepower-hour\n",
+ "# The combustion equation is:\n",
+ "# C8H18(l) + 4(12.5)O2 + 4(12.5)(3.76)N2 \u2192 8CO2 + 9H2O + 37.5O2 + 188.0N2\n",
+ "hfC8H18=-107526 # is the enthalpy of fuel in Btu/lb.mol\n",
+ "nCO2=8 # moles\n",
+ "hfCO2=-169184 # enthalpy in Btu/lb.mol\n",
+ "DelhCO2=11391 # enthalpy in Btu/lb.mol\n",
+ "mC8H18=114.23 # molecular mass\n",
+ "nH2O=9 # moles\n",
+ "hfH2O=-103966 # enthalpy in Btu/lb.mol\n",
+ "DelhH2O=8867 # enthalpy in Btu/lb.mol\n",
+ "DelhO2=7784 # enthalpy in Btu/lb.mol\n",
+ "nO2=37.5 # moles\n",
+ "DelhN2=7374 # enthalpy in Btu/lb.mol\n",
+ "nN2=188.0 # moles\n",
+ "Eproduct=nCO2*(hfCO2+DelhCO2)+nH2O*(hfH2O+DelhH2O)+nO2*DelhO2+nN2*DelhN2\n",
+ "\n",
+ "Wcv=2544*mC8H18 # work in kJ/kmol fuel\n",
+ "print \" The work is \",Wcv,\"Btu/lb.mol fuel\"\n",
+ "\n",
+ "Qcv=Eproduct+Wcv-hfC8H18 # using first law\n",
+ "print \" The Heat transfer is \",Qcv,\"Btu/lb.mol fuel\"\n",
+ "\n",
+ "# the answer is slightly different in textbook due to approximation while here the answers are precise\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The work is 290601.12 Btu/lb.mol fuel\n",
+ " The Heat transfer is -41895.88 Btu/lb.mol fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.9:Pg-634"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#ques 9\n",
+ "\n",
+ "# The combustion equation is\n",
+ "# C2H4 + 3O2 \u2192 2 CO2 + 2H2O(g)\n",
+ "hfC2H4=52467 # enthalpy in KJ/mol\n",
+ "R=8.314 # gas constant\n",
+ "T=298.2 # temperature in Kelvin\n",
+ "hfCO2=-393522 # enthalpy in kJ/kmol\n",
+ "DelhCO2=12906 # enthalpy in kJ/kmol\n",
+ "hfH2O=-241826 # enthalpy in kJ/kmol\n",
+ "DelhH2O=10499 # enthalpy in kJ/kmol\n",
+ "Ureactant=hfC2H4-4*R*T # energy of reactant in KJ\n",
+ "Uproduct=2*(hfCO2+DelhCO2)+2*(hfH2O+DelhH2O) # energy of product in KJ\n",
+ "Q=Uproduct-Ureactant # using first law\n",
+ "print \"The Heat transfer is \",Q,\"kJ\"\n",
+ "\n",
+ "# the answer is slightly different in textbook due to approximation while here the answers are precise"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Heat transfer is -1266436.0608 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.10:Pg-638"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#ques 10\n",
+ "\n",
+ "# The combustion equation is\n",
+ "# C3H8 + 5O2 \u2192 3 CO2 + 4H2O\n",
+ "hfC3H8g=-103900 # enthalpy of C3H8 in KJ/mol from Table A.10\n",
+ "hfC3H8l=hfC3H8g-44.097*370 # enthalpy of C3H8 liquid as enthalpy of evaporation is given in question\n",
+ "hfH2Ol=285830 # enthalpy of water in KJ/mol\n",
+ "hfH2Og=241826 # enthalpy in KJ/mol\n",
+ "hfCO2=393522 # enthalpy in KJ/mol\n",
+ "nO2=5 # moles\n",
+ "nCO2=3 # moles\n",
+ "nH2O=4 # moles\n",
+ "nC3H8=1 # moles\n",
+ "# part(1) : liquid propane-liquid water\n",
+ "hrP=(nCO2*hfCO2 + nH2O*hfH2Ol -nC3H8*hfC3H8l)/44.097 # higher heating value of liquid propane \n",
+ "print \"The higher heating value of liquid propane is\",round(hrP,2),\"KJ/kg\"\n",
+ "\n",
+ "# part(2) : Liquid propane\u2013gaseous water\n",
+ "\n",
+ "hrP=(nCO2*hfCO2 + nH2O*hfH2Og -nC3H8*hfC3H8l)/44.097 # lower heating value of liquid propane \n",
+ "print \"The lower heating value of liquid propane is\",round(hrP,2),\"KJ/kg\"\n",
+ "\n",
+ "# part(3) :Gaseous propane\u2013liquid water\n",
+ "hrP=(nCO2*hfCO2 + nH2O*hfH2Ol -nC3H8*hfC3H8g)/44.097 # higher heating value of gaseous propane \n",
+ "print \"The higher heating value of gaseous propane is\",round(hrP,2),\"KJ/kg\"\n",
+ "\n",
+ "# part(4) :Gaseous propane\u2013Gaseous water\n",
+ "hrP=(nCO2*hfCO2 + nH2O*hfH2Og -nC3H8*hfC3H8g)/44.097 # lower heating value of gaseous propane \n",
+ "print \"The lower heating value of gaseous propane is\",round(hrP,2),\"KJ/kg\"\n",
+ "\n",
+ "\n",
+ "# the answer is slightly different in textbook due to approximation while here the answers are precise\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The higher heating value of liquid propane is -120215.89 KJ/kg\n",
+ "The lower heating value of liquid propane is 51434.02 KJ/kg\n",
+ "The higher heating value of gaseous propane is 55055.58 KJ/kg\n",
+ "The lower heating value of gaseous propane is 51064.02 KJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.11:Pg-638"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#ques 10\n",
+ "# The combustion equation is\n",
+ "# C3H8(g) + 5O2 \u2192 3 CO2 + 4H2O(g)\n",
+ "hfC3H8=-103900 # enthalpy of C3H8 in KJ/mol from Table A.10\n",
+ "Cp=2.1 # in KJ/Kg.K\n",
+ "T1=500 # temp in Kelvin\n",
+ "T2=298.2 # temp in Kelvin\n",
+ "DelhO2=6086 # enthalpy of O2 in KJ/mol\n",
+ "hfCO2=-393522 # enthalpy in KJ/mol\n",
+ "DelhCO2=8305 # enthalpy of CO2 in KJ/mol\n",
+ "hfH2O=-241826 # enthalpy of H2O in KJ/mol\n",
+ "DelhH2O=6922 # enthalpy in KJ/mol\n",
+ "nO2=5 # moles\n",
+ "nCO2=3 # moles\n",
+ "nH2O=4 # moles\n",
+ "nC3H8=1 # moles\n",
+ "\n",
+ "hR500= hfC3H8+Cp*44.097*(T1-T2)+nO2*DelhO2 # in KJ/mol\n",
+ "hP500= nCO2*(hfCO2+DelhCO2)+ nH2O*(DelhH2O+hfH2O) # in KJ/mol\n",
+ "hRP500=hP500-hR500 # in KJ/mol\n",
+ "Hrp500=hRP500/44.097 # KJ/Kg\n",
+ "\n",
+ "print \" The enthalpy of combustion of gaseous propane at 500 K \",round(Hrp500)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The enthalpy of combustion of gaseous propane at 500 K -46273.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.12:Pg-639"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 12\n",
+ "# The question is solved by Trial and Error and using the table , no need for Calculation Thus not solved in Python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.13:Pg-645"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 13\n",
+ "# The equation for this chemical reaction is\n",
+ "# C2H4(g) + 3(4) O2 + 3(4)(3.76) N2 \u2192 2 CO2+2H2O(g) + 9O2 + 45.1 N2\n",
+ "T=25+273.15 # temp in degree kelvin\n",
+ "P=0.1 # pressure in Mpa\n",
+ "hfCO2=-393522 # enthalpy in KJ/mol\n",
+ "hfH2O=-241826 # enthalpy of H2O in KJ/mol\n",
+ "HfC2H4=52467 # enthalpy of C2H4 in KJ/mol\n",
+ "hfO2=0 # enthalpy of formation in KJ/mol\n",
+ "SCO2=213.795 # kJ/kmol fuel\n",
+ "SH2O=188.243 # kJ/kmol fuel\n",
+ "SC2H4=219.330 # kJ/kmol fuel\n",
+ "SO2=205.148 # kJ/kmol fuel\n",
+ "DelH=2*hfCO2+2*hfH2O-HfC2H4-3*hfO2 # in KJ/mol\n",
+ "DelS=2*SCO2+2*SH2O-SC2H4-3*SO2 # kJ/kmol fuel\n",
+ "DelG=DelH-T*(DelS) # Gibbs Energy\n",
+ "Wrev=-DelG/28.054 # reversible work in kJ/kg\n",
+ "print \"The reversible work is \",round(Wrev,2),\"kJ/kg \"\n",
+ "\n",
+ "# the answer is slightly different in textbook due to approximation while here the answers are precise"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reversible work is 46838.61 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.14:Pg-647"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques \n",
+ "# The question is solved by Trial and Error and using the table , no need for Calculation Thus not solved in Python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.15:Pg-649"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#ques15\n",
+ "#calculatng reversible elecromotive force \n",
+ "\n",
+ "#1-H2O\n",
+ "#2-H2\n",
+ "#3-O2\n",
+ "#hf-standard enthalpy \n",
+ "#sf-standard entropy\n",
+ "hf1=-285.830;#kJ\n",
+ "hf2=0;#kJ\n",
+ "hf3=0;#kJ\n",
+ "sf1=69.950;#kJ/K\n",
+ "sf2=130.678;#kJ/K\n",
+ "sf3=205.148;#kJ/K\n",
+ "dH=2*hf1-2*hf2-hf3;#change in enthalpy in kJ\n",
+ "dS=2*sf1-2*sf2-sf3;#change in entropy in kJ/K\n",
+ "T=298.15;#temperature in K\n",
+ "dG=dH-T*dS/1000;#change in gibbs free energy in kJ\n",
+ "E=-dG*1000/(96485*4);#emf in V\n",
+ "print\" Reversible electromotive Force =\",round(E,3),\" V\"\n",
+ "\n",
+ "# the answer is slightly different in textbook due to approximation while here the answers are precise"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Reversible electromotive Force = 1.229 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.16:Pg-654"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ques 16\n",
+ "# to Calculate the combustion efficiency\n",
+ "Tair = 400 # temp in K\n",
+ "Vair = 100 # velocity in m/s\n",
+ "Tfuel = 50 # temp of fuel in \u25e6C\n",
+ "Tproducts = 1100 # temp of product in K\n",
+ "Vproducts = 150 # velocity of product in m/s\n",
+ "FAactual = 0.0211 # air fuel ratio kg fuel/kg air\n",
+ "\n",
+ "# HR + KER= \u2212243737 + 14892nO2 \n",
+ "# HP + KEP= \u22125 068 599 + 120 853nO2 \n",
+ "# using these two equations :\n",
+ "no2=(-5068599.0 + 243737.0)/(14892.0-120853) # in kmol O2/kmol fuel\n",
+ "FAideal=114.23/(4.76*no2*28.91) # in kg fuel/kg air\n",
+ "\n",
+ "efficomb=FAideal*100/FAactual # Efficiency\n",
+ "\n",
+ "print \" The combustion efficiency is \",round(efficomb,2),\"%\"\n",
+ "\n",
+ "# the answer is slightly different in textbook due to approximation while here the answers are precise\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The combustion efficiency is 86.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15.17:Pg-654"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#ques17\n",
+ "#efficiency of generator and plant\n",
+ "\n",
+ "q=325000*(3398.3-856.0);#heat transferred to H2O/kg fuel in kJ/kg\n",
+ "qv=26700.0*33250;#higher heating value in kJ/kg\n",
+ "nst=q/qv*100;#efficiency of steam generator\n",
+ "w=81000.0*3600;#net work done in kJ/kg\n",
+ "nth=w/qv*100.0;#thermal efficiency\n",
+ "print\" Efficiency of generator =\",round(nst,1),\"percent\\n\"\n",
+ "print\" Thermal Efficiency =\",round(nth,1),\" percent\"\n",
+ "\n",
+ "# the answer is slightly different in textbook due to approximation while here the answers are precise"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Efficiency of generator = 93.1 percent\n",
+ "\n",
+ " Thermal Efficiency = 32.8 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file