summaryrefslogtreecommitdiff
path: root/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb
diff options
context:
space:
mode:
authorTrupti Kini2016-03-09 23:30:21 +0600
committerTrupti Kini2016-03-09 23:30:21 +0600
commit1ab1ae28c5ba41d5159b2f2922447419e2d64eb9 (patch)
tree80c774566b5405892b20e84da74c1143459af1a3 /Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb
parent50a467f02f972299984d596c5e12122606fd092a (diff)
downloadPython-Textbook-Companions-1ab1ae28c5ba41d5159b2f2922447419e2d64eb9.tar.gz
Python-Textbook-Companions-1ab1ae28c5ba41d5159b2f2922447419e2d64eb9.tar.bz2
Python-Textbook-Companions-1ab1ae28c5ba41d5159b2f2922447419e2d64eb9.zip
Added(A)/Deleted(D) following books
A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter10_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter12_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter13_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter14_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter15_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter16_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter1_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter2_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter6_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter7_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter8_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter9_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17:01:00_1.png A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17:01:25_1.png A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17:02:44_1.png A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/chapter1.ipynb A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/chapter3.ipynb A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/screenshots/1.png A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/screenshots/2.png A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/screenshots/3.png A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter10_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter11_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter12_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter13_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter14_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter15_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter1_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter2_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter3_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter4_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter5_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter6_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter7_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:50:16.png A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:52:27.png A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:53:23.png A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch1.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch10.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch11.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch12.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch2.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch3.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch5.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch6.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch8.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch9.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/screenshots/Ch9MolFracNMolVol.png A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/screenshots/Ch9_molarFracNMolVol.png A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/screenshots/ch10_consistency.png A Machine_Design_by_T._H._Wentzell,_P._E/README.txt A Microwaves_and_Radar_Principles_and_Applications_by_A._K._Maini/README.txt A Network_Analysis_and_Synthesis_by_B_R_Gupta/README.txt
Diffstat (limited to 'Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb')
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb557
1 files changed, 557 insertions, 0 deletions
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb
new file mode 100644
index 00000000..c3a0a66f
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb
@@ -0,0 +1,557 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4 - Heat effects"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.1 Page: 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.1 - Page: 118\n",
+ "\n",
+ "\n",
+ "Value of Qv is -326.40 kcal\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "print \"Example: 4.1 - Page: 118\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "Qp = -327## [kcal]\n",
+ "T = 27 + 273## [K]\n",
+ "R = 2*10**(-3)## [kcal/K mol]\n",
+ "#*************#\n",
+ "\n",
+ "# The reaction involved is:\n",
+ "# C2H5OH(l) + 3O2(g) = 2CO2(g) + 3H2O(l)\n",
+ "deltan = 2 - 3#\n",
+ "Qv = Qp - deltan*R*T## [kcal]\n",
+ "print \"Value of Qv is %.2f kcal\\n\"%(Qv)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.2 Page: 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.2 - Page: 119\n",
+ "\n",
+ "\n",
+ "Heat produced in the reaction is -1019.9 kcal\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.2 - Page: 119\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "# Mg + (1/2)O2 = MgO ...............(1)\n",
+ "deltaH1 = -610.01## [kcal]\n",
+ "# 2Fe + (3/2)O2 = Fe2O3 ............(2)\n",
+ "deltaH2 = -810.14## [kcal]\n",
+ "#*************#\n",
+ "\n",
+ "# 3Mg + Fe2O3 = 3MgO + 2Fe .........(3)\n",
+ "# Multiplying (1) by 3 and substracting from (2), we get (3):\n",
+ "deltaH = 3*deltaH1 - deltaH2## [kcal]\n",
+ "print \"Heat produced in the reaction is %.1f kcal\\n\"%(deltaH)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.3 Page: 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.3 - Page: 121\n",
+ "\n",
+ "\n",
+ "The standard heat of formation of methane is -74.75 kJ/gmol\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.3 - Page: 121\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "# 2H2(g) + O2(g) ---------------> 2H2O .....................(1)\n",
+ "deltaH1 = -241.8*2## [kJ/gmol H2]\n",
+ "# C(graphite) + O2(g) =---------> CO2(g) ...................(2)\n",
+ "deltaH2 = -393.51## [kJ/gmol C]\n",
+ "# CH4(g) + 2O2(g) ---------------> CO2(g) + 2H2O(l) ........(3)\n",
+ "deltaH3 = -802.36## [kJ/mol CH4]\n",
+ "#*************#\n",
+ "\n",
+ "# For standard heat of formation of methane, (a) + (b) - (c)\n",
+ "# C + 2H2 ------------------------> CH4\n",
+ "deltaHf = deltaH1 + deltaH2 - deltaH3## [kJ/gmol]\n",
+ "print \"The standard heat of formation of methane is %.2f kJ/gmol\\n\"%(deltaHf)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.4 Page: 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.4 - Page: 122\n",
+ "\n",
+ "\n",
+ "Energy supplied by reaction A is -69.2 kJ\n",
+ "\n",
+ "Energy supplied by reaction B is -2802.8 kJ\n",
+ "\n",
+ "Reaction B supplies more energy to the organism\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.4 - Page: 122\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "deltaH_C6H12O6 = -1273## [kcal]\n",
+ "deltaH_C2H5OH = -277.6## [kcal]\n",
+ "deltaH_CO2 = -393.5## [kcal]\n",
+ "deltaH_H2O = -285.8## [kcal]\n",
+ "#**************#\n",
+ "\n",
+ "# C6H12O6(s) = 2C2H5OH(l) + 2CO2(g) ..........................(A)\n",
+ "deltaH_A = 2*deltaH_C2H5OH + 2*deltaH_CO2 - deltaH_C6H12O6## [kJ]\n",
+ "# C6H12O6(s) + 6O2(g) = 6CO2(g) + 6H2O(l) ...................(B)\n",
+ "deltaH_B = 6*deltaH_CO2 + 6*deltaH_H2O - deltaH_C6H12O6## [kJ]\n",
+ "print \"Energy supplied by reaction A is %.1f kJ\\n\"%(deltaH_A)#\n",
+ "print \"Energy supplied by reaction B is %.1f kJ\\n\"%(deltaH_B)#\n",
+ "if deltaH_A < deltaH_B:\n",
+ " print \"Reaction A supplies more energy to the organism\\n\"\n",
+ "else:\n",
+ " print \"Reaction B supplies more energy to the organism\\n\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.5 Page: 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.5 - Page: 122\n",
+ "\n",
+ "\n",
+ "Heat of formation of ZnSO4 is -233.48 kcal/kmol\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.5 - Page: 122\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "# Zn + S = ZnS ....................................................(A)\n",
+ "deltaH_A = -44## [kcal/kmol]\n",
+ "# ZnS + 3O2 = 2ZnO + 2SO2 .........................................(B)\n",
+ "deltaH_B = -221.88## [kcal/kmol]\n",
+ "# 2SO2 + O2 = 2SO3 ................................................(C)\n",
+ "deltaH_C = -46.88## [kcal/kmol]\n",
+ "# ZnO + SO3 = ZnSO4 ...............................................(D)\n",
+ "deltaH_D = -55.10## [kcal/kmol]\n",
+ "#***************#\n",
+ "\n",
+ "# Multiplying (A) by 2 & (D) by (2) and adding (A), (B), (C) & (D)\n",
+ "# Zn + S + 2O2 = ZnSO4\n",
+ "deltaH = 2*deltaH_A + deltaH_B + deltaH_C + 2*deltaH_D## [kcal/kmol for 2 kmol of ZnSO4]\n",
+ "print \"Heat of formation of ZnSO4 is %.2f kcal/kmol\\n\"%(deltaH/2)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.6 Page: 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.6 - Page: 124\n",
+ "\n",
+ "\n",
+ "Standard Heat of formation of NH3 is -11.8 kcal\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.6 - Page: 124\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "# HC : Heat of Combustion\n",
+ "HC_NH3 = -90.6## [kcal]\n",
+ "HC_H2 = -68.3## [kcal]\n",
+ "#*************#\n",
+ "\n",
+ "# Heat of combustion of NH3:\n",
+ "# 2NH3 + 3O = N2 + 3H2O ............................ (A)\n",
+ "# Heat of combustion of H2:\n",
+ "# H2 + O = H2O ..................................... (B)\n",
+ "# Multiplying (B) by 3 & substracting from (A), we get:\n",
+ "# 2NH3 = N2 + 3H2 .................................. (C)\n",
+ "# Hf : Heat of Formation\n",
+ "Hf_NH3 = -(2*HC_NH3 - 3*HC_H2)/2## [kcal]\n",
+ "print \"Standard Heat of formation of NH3 is %.1f kcal\"%(Hf_NH3)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.7 Page: 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.7 - Page: 125\n",
+ "\n",
+ "\n",
+ "The maximum attainable temperature is 2566.2 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.7 - Page: 125\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "# HC : Heat of Combustion\n",
+ "HC_C2H2 = -310600# # [cal]\n",
+ "#**************#\n",
+ "\n",
+ "# C2H2 + (5/2)O2 = 2CO2 + H2O\n",
+ "Q = -HC_C2H2## [cal]\n",
+ "# The gases present in the flame zone after combustion are carbon dioxide, water vapor and the unreacted nitrogen of the air.\n",
+ "# Since (5/2) mole of oxygen were required for combustion, nitrogen required would be 10 mol.\n",
+ "# Hence the composition of the resultant gas would be 2 mol CO2, 1 ol H2 & 10 mol N2.\n",
+ "# Q = integrate('Cp(T)','T',T,298)#\n",
+ "# On integrating we get:\n",
+ "# Q = 84.52*(T - 298) + 18.3*10**(-3)*(T**2 - 298**2)\n",
+ "#deff('[y] = f(T)','y = Q - 84.52*(T - 298) - 18.3*10**(-3)*(T**2 - 298**2)')#\n",
+ "def f(T):\n",
+ " y = Q - 84.52*(T - 298) - 18.3*10**(-3)*(T**2 - 298**2)\n",
+ " return y\n",
+ "from scipy.optimize import fsolve\n",
+ "T = fsolve(f,7)## [K]\n",
+ "print \"The maximum attainable temperature is %.1f K\"%(T)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.8 Page: 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.8 - Page: 126\n",
+ "\n",
+ "\n",
+ "The theoretical temperature of combustion is 1906 degree Celsius\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.8 - Page: 126\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "Cp_CO2 = 54.56## [kJ/mol K]\n",
+ "Cp_O2 = 35.20## [kJ/mol K]\n",
+ "Cp_steam = 43.38## [kJ/mol K]\n",
+ "Cp_N2 = 33.32## [kJ/mol K]\n",
+ "# 2C2H6(g) + 7O2(g) = 4CO2(g) + 6H2O(g)\n",
+ "deltaH_273 = -1560000## [kJ/kmol]\n",
+ "#************#\n",
+ "\n",
+ "# Since the air is 25% in excess of the amount required,the combustion may be written as:\n",
+ "# C2H6(g) + (7/2)O2(g) = 2CO2(g) + 3H2O(g)\n",
+ "# 25% excess air is supplied.\n",
+ "# Since the air contains N2 = 79% and O2 = 21%\n",
+ "# C2H6(g) + 3.5O2(g) + 0.25*3.5O2(g) + (4.375*(79/21))N2 = 2CO2 + 3H2O + 0.875O2 + 16.46N2 .................. (A)\n",
+ "# Considering the reaction (A),\n",
+ "# Amount of O2:\n",
+ "O2 = 3.5 + 3.5*0.25## [mol]\n",
+ "# Amount of N2 required:\n",
+ "N2 = 4.375*(79/21)## [mol]\n",
+ "# Let the initial temperature of ethane and air be 0 OC and the temperature of products of combustion be T OC\n",
+ "# Since heat librated by combustion = heat accumulated by combustion products\n",
+ "Q = -deltaH_273## [kJ/mol K]\n",
+ "T = Q/(2*Cp_CO2 + 3*Cp_steam + 0.875*Cp_O2 + N2*Cp_N2)## [OC]\n",
+ "print \"The theoretical temperature of combustion is %d degree Celsius\"%(T)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.9 Page: 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.9 - Page: 129\n",
+ "\n",
+ "\n",
+ "Laten heat of ice at -20 OC is 1266 cal/mol\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.9 - Page: 129\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "T1 = 273## [K]\n",
+ "T2 = 253## [K]\n",
+ "deltaH_273 = 1440## [cal/mol]\n",
+ "Cp = 8.7## [cal/mol]\n",
+ "#**************#\n",
+ "\n",
+ "deltaH_253 = deltaH_273 + Cp*(T2 - T1)## [cal/mol]\n",
+ "print \"Laten heat of ice at -20 OC is %d cal/mol\\n\"%(deltaH_253)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.10 Page: 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.10 - Page: 129\n",
+ "\n",
+ "\n",
+ "Heat of formation at 1273 K is -11172 cal\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.10 - Page: 129\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "T2 = 1273## [K]\n",
+ "T1 = 300## [K]\n",
+ "deltaH_300 = -11030## [cal/mol]\n",
+ "#*************#\n",
+ "\n",
+ "# The chemical reaction involved is:\n",
+ "# N2 + 3H2 = 2NH3\n",
+ "# (1/2)N2 + (3/2)H2 = NH3\n",
+ "# deltaH_1273 = deltaH_300 + integrate('Cp_NH3(T) - (1/2)*Cp_N2(T) - (1/2)*Cp_H2(T)','T',1273,300)#\n",
+ "from sympy.mpmath import quad\n",
+ "deltaH_1273 = deltaH_300 + quad(lambda T:(6.2 + 7.8*10**(-3)*T - 7.2*10**(-6)*T**2) - (1/2)*(6.45 + 1.4*10**(-3)*T) - (1/2)*(6.94 - 0.2*10**(-3)*T),[1273,300])## [cal]\n",
+ "print \"Heat of formation at 1273 K is %d cal\"%(deltaH_1273)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 4.11 Page: 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 4.11 - Page: 130\n",
+ "\n",
+ "\n",
+ "Percent of excess air supplied is 39.9 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 4.11 - Page: 130\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data*****#\n",
+ "CO2 = 13.4## [percent by volume]\n",
+ "N2 = 80.5## [percent by volume]\n",
+ "O2 = 6.1## [percent by volume]\n",
+ "#*************#\n",
+ "\n",
+ "# Basis : 100 cubic m of flue gas.\n",
+ "Vol_N2_flue = N2## [Volume of Nitrogen in flue gas, cubic m]\n",
+ "Vol_O2_flue = O2## [Volume of O2 in flue gas, cubic m]\n",
+ "Vol_Air = N2/0.79## [Volume of air supplied, cubic m]\n",
+ "Vol_O2 = Vol_Air*0.21## [Volume of O2 in air supply, cubic m]\n",
+ "Vol_O2_cumbustion = Vol_O2 - Vol_O2_flue## [Volume of O2 used up in cumbustion of the fuel, cubic m]\n",
+ "Excess_Air = Vol_O2_flue/Vol_O2_cumbustion * 100## [percent of excess air supplied]\n",
+ "print \"Percent of excess air supplied is %.1f %%\"%(Excess_Air)#"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}