diff options
Diffstat (limited to 'A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb')
-rw-r--r-- | A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb | 710 |
1 files changed, 710 insertions, 0 deletions
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb new file mode 100644 index 00000000..d5f58800 --- /dev/null +++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb @@ -0,0 +1,710 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : First Law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.1, Page no:26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find change in internal energy\n", + "\n", + "# Variables\n", + "#Given\n", + "W = -2.25*745.7; \t\t\t#work done on system in J/s\n", + "Q = -3400.*(10.**3)/3600; \t\t\t#heat transferred to the surrounding in J/s\n", + "\n", + "# Calculations\n", + "#To find the change in internal energy\n", + "#Using equation 2.4 (Page no. 26)\n", + "U = Q-W; \t\t\t#change in internal energy in J/s\n", + "\n", + "# Results\n", + "print 'Internal energy of system increases by %f J/s'%U\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal energy of system increases by 733.380556 J/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.2, Page no:26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find heat liberated work done and change in internal energy\n", + "\n", + "#Given\n", + "T = 298.; \t\t\t#temperature in K\n", + "P = 101.; \t \t\t#pressure in kPa\n", + "n_iron = 2.; \t\t\t#moles of iron reacted\n", + "Q = -831.08; \t\t\t#heat liberated in kJ\n", + "R = 8.314; \t\t \t#ideal gas constant\n", + "\n", + "# Calculations and Results\n", + "#To find heat liberated work done and change in internal energy\n", + "print 'Heat liberated during the reaction is %f kJ'%Q\n", + "n_oxygen = 1.5; \t\t\t#moles of oxygen reacted\n", + "\n", + "#Using ideal gas equation P(Vf-Vi)=nRT and W=P(Vf-Vi)\n", + "W = -1.5*R*T; \t\t \t#work done by system in J\n", + "\n", + "#Using equation 2.4 (Page no. 26)\n", + "U = (Q*10**3)-W; \t\t\t#change in internal energy in J\n", + "print 'Work done by gas is %f J'%W\n", + "print 'Change in internal energy is %6.3e J'%U\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat liberated during the reaction is -831.080000 kJ\n", + "Work done by gas is -3716.358000 J\n", + "Change in internal energy is -8.274e+05 J\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.3, Page no:27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find the heat energy dissipated by brakes\n", + "\n", + "# Variables\n", + "#Given\n", + "u = 20.; \t\t\t#speed of car in m/s\n", + "z = 30.; \t\t\t#height vertically above the bottom of hill in m\n", + "m = 1400.; \t\t\t#mass of car in kg\n", + "g = 9.81; #acceleration due to gravity \n", + "\n", + "# Calculations\n", + "#To find the heat energy dissipated by brakes\n", + "#Using equation 2.3 (Page no. 26)\n", + "KE = -0.5*m*(u**2); \t\t\t#change in kinetic energy in J\n", + "PE = -m*g*z; \t \t\t#change in potential energy in J\n", + "Q = -(KE+PE); \t\t\t#heat dissipated by brakes in J\n", + "\n", + "# Results\n", + "print 'Heat dissipated by brakes is %3.2e J'%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat dissipated by brakes is 6.92e+05 J\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.4, Page no:27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find internal energy change during each step and work done during adiabatic process\n", + "\n", + "# Variables\n", + "#Given:\n", + "#For step 1\n", + "W1 = -50.; \t\t\t#work received in J\n", + "Q1 = -25.; \t\t\t#heat gven out in J\n", + "\n", + "# Calculations and Results\n", + "U1 = Q1-W1; \t\t\t#internal energy change in J\n", + "print 'Change in internal energy for constant pressure process is %i J'%U1\n", + "\n", + "#For step 2\n", + "W2 = 0.; \t\t\t#work done for constant volume process is zero\n", + "Q2 = 75.; \t\t\t#heat received in J\n", + "U2 = Q2; \t\t\t#internal energy change in J\n", + "print 'Change in internal energy for constant volume process is %i J'%U2\n", + "\n", + "#For step 3\n", + "Q3 = 0.; \t\t\t#no heat exchange in adiabatic process\n", + "#Since the process is cyclic\n", + "#U3+U2+U1 = 0;\n", + "U3 = -(U1+U2);\n", + "W3 = -U3; \t\t\t#work done in J\n", + "print 'Work done during adiabatic process is %i J'%W3\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in internal energy for constant pressure process is 25 J\n", + "Change in internal energy for constant volume process is 75 J\n", + "Work done during adiabatic process is 100 J\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.5, Page no:29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find change in internal energy and enthalpy\n", + "\n", + "# Variables\n", + "#Given:\n", + "n_water = 10.**3; \t\t\t#moles of water\n", + "T = 373.; \t\t\t #tempearture(K)\n", + "P = 101.3; \t\t\t #pressure(kPa)\n", + "sv_liquid = 0.00104; \t\t#specific volume of liquid(m**3/kmol)\n", + "sv_vapour = 1.675; \t\t\t#specific volume of vapour(m**3/kmol)\n", + "Q = 1.03*10**3; \t\t\t#heat added in kJ\n", + " \n", + "#To find change in internal energy and enthalpy\n", + "W = P*n_water*(sv_vapour-sv_liquid)*10**-3; \t\t\t#expansion work done in kJ\n", + "U = Q-W; \t\t\t #change in internal energy in kJ\n", + "#For constant pressure process\n", + "H = Q; \t\t\t #enthalpy change in kJ\n", + "\n", + "# Results\n", + "print 'Change in internal energy is %f kJ'%U\n", + "print 'Change in enthalpy is %3.2e J'%H\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in internal energy is 860.427852 kJ\n", + "Change in enthalpy is 1.03e+03 J\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.6, Page no:29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find internal energy of saturated liquid and internal energy and enthalpy of saturated vapour\n", + "\n", + "# Variables\n", + "#Given:\n", + "T = 233.; \t\t\t #temperature in K\n", + "VP = 1.005*10**3; \t\t\t #vapour pressure of CO2 in kPa\n", + "sv_liquid = 0.9*10**-3; \t\t\t#specific volume of liquid CO2 in m**3/kg\n", + "sv_vapour = 38.2*10**-3; \t\t\t#specicific volume of CO2 vapour in m**3/kg\n", + "L = 320.5; \t\t\t #latent heat of vaporisation of CO2 in kJ/kg\n", + "#Assuming at these conditions CO2 is saturated liquid so\n", + "H1 = 0; \t\t\t #enthalpy in liquid state\n", + "\n", + "# Calculations\n", + "#To find internal energy of saturated liquid and internal energy and enthalpy of saturated vapour\n", + "#For saturated liquid\n", + "U1 = H1-(VP*sv_liquid); \t\t\t# internal energy in liquid state in kJ/kg\n", + "#For saturated vapour\n", + "Hv = H1+L; \t\t\t #enthalpy of saturated vapour in kJ/kg\n", + "Uv = Hv-(VP*sv_vapour); \t\t\t#internal energy in vapour state in kJ/kg\n", + "\n", + "# Results\n", + "print 'Internal Energy of saturated liquid is %f kJ/kg'%U1\n", + "print 'Enthalpy of vapour state is %f kJ/kg'%Hv\n", + "print 'Internal Energy of vapour state is %f kJ/kg'%Uv\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal Energy of saturated liquid is -0.904500 kJ/kg\n", + "Enthalpy of vapour state is 320.500000 kJ/kg\n", + "Internal Energy of vapour state is 282.109000 kJ/kg\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.7, Page no:30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To calculate molar internal energy change and molar enthalpy change\n", + "\n", + "# Variables\n", + "#Given:\n", + "I = 0.5; \t\t\t#current in Amperes\n", + "V = 12.; \t\t\t#voltage in volts\n", + "t = 5*60.; \t\t\t#time in sec\n", + "m = 0.798; \t\t\t#mass of water vaporised in g\n", + "M = 18.; \t\t\t#molecular mass of water in g\n", + "R = 8.314*10**-3 #ideal gas constant\n", + "T = 373 #temperature\n", + "\n", + "# Calculations\n", + "#To calculate molar internal energy change and molar enthalpy change\n", + "Q = (I*V*t/1000.); \t\t\t#electric energy supplied in kJ\n", + "#Referring equation 2.10 (Page no. 29)\n", + "H = (Q*M)/m; \t\t\t#molar enthalpy change in kJ/mole\n", + "\n", + "#BY ideal gas equation PV=RT\n", + "#Referring equation 2.9 for constant pressure process (Page no. 29)\n", + "U = H-(R*T); \t\t\t#molar internal energy change in kJ/mole\n", + "\n", + "# Results\n", + "print 'Molar Enthalpy change during the process is %i kJ/mole'%H\n", + "print 'Molar Interanl Energy change during the process is %f kJ/mole'%U\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Molar Enthalpy change during the process is 40 kJ/mole\n", + "Molar Interanl Energy change during the process is 37.500382 kJ/mole\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.8, Page no:32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To determine the theoretical horsepower developed\n", + "\n", + "# Variables\n", + "#Given:\n", + "m = 1650.; \t\t\t#mass of steam used in kg/hr\n", + "H1 = 3200.; \t\t\t#enthalpy at 1368 kPa and 645 K in kJ/kg\n", + "H2 = 2690.; \t\t\t#enthalpy at 137 kPa and 645 K in kJ/kg\n", + "\n", + "#To determine the theoretical horsepower developed\n", + "#Using equation 2.13 (Page no.32)\n", + "Q = 0; \t\t\t#since the process is adiabatic\n", + "z = 0; \t\t\t#assuming that inlet and discharge of turbine are at same level\n", + "u = 0; \t\t\t#feed and discharge velocities being equal\n", + "\n", + "# Calculations\n", + "Ws = -(H2-H1);\n", + "Wj = Ws*10**3*m/3600.; \t\t\t#work done by turbine in J\n", + "W = Wj/745.7; \t\t\t#work done by turbine in hp\n", + "\n", + "# Results\n", + "print 'Work done by turbine is %f hp'%W\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done by turbine is 313.463859 hp\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.9, Page no:32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find temperature of water delivered to second storage tank\n", + "\n", + "# Variables\n", + "#Given:\n", + "m = 25.*10**3; \t\t#mass flow rate of water in kg/h\n", + "P = 2.; \t\t\t#power supplied by motor in hp\n", + "q = 42000.; \t\t#heat given in kJ/min\n", + "z = 20.; \t\t\t#elevation in m\n", + "T = 368.; \t\t\t#temperature in K\n", + "To = 273.; \t\t\t#standard temperature in K\n", + "Cp = 4.2; \t\t\t#specific heat of water in kJ/kg K\n", + "g = 9.81 #acceleration due to gravity(m/s^2)\n", + "\n", + "# Calculations\n", + "#To find temperature of water delivered to second storage tank\n", + "W = (P*745.7*10**-3*3600)/m; \t\t\t#work done per kg of water pumped in kJ/kg\n", + "Q = q*60./m; \t\t\t #heat given out per kg of fluid\n", + "PE = g*z*10**-3; \t\t\t #change in potential energy in kJ/kg\n", + "\n", + "#Using equation 2.13 (Page no. 32)\n", + "H = -Q+W-PE;\n", + "#H = H2-H1\n", + "H1 = Cp*(T-To);\n", + "H2 = H1+H;\n", + "#Let T1 be the temperature at second storage tank\n", + "T1 = To+(H2/Cp);\n", + "\n", + "# Results\n", + "print 'Temperature of water at second storage tank is %i K'%T1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of water at second storage tank is 344 K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.10, Page no:33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find change in enthalpy and maximum enthalpy change\n", + "\n", + "# Variables\n", + "#Given:\n", + "D1 = 25.; \t\t\t#internal diameter of pipe in mm\n", + "u1 = 10.; \t\t\t#upstream velocity in m/s\n", + "D2 = 50.; \t\t\t#downstream diameter of pipe in mm\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#Let A1 nad A2 be upstream and downstream crosssectional areas of pipe\n", + "u2 = ((D1/D2)**2)*u1; \t\t\t#downstream velocity in m/s\n", + "H = 0.5*(u1**2-u2**2); \t\t\t#change in enthalpy in J/kg\n", + "print 'Change in enthalpy is %f J/kg'%H\n", + "\n", + "#(b)\n", + "#For maximum enthalpy change \n", + "u2 = 0;\n", + "Hmax = 0.5*u1**2; \t\t\t#(J/kg)\n", + "print 'Maximum enthalpy chnage for a sudden enlargement in pipe is %f J/kg'%Hmax\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in enthalpy is 46.875000 J/kg\n", + "Maximum enthalpy chnage for a sudden enlargement in pipe is 50.000000 J/kg\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.11, Page no:35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To determine heat transfer rates\n", + "\n", + "# Variables\n", + "#At inlet:\n", + "T1 = 293.; \t\t\t#Temperature(K)\n", + "P1 = 300+136.8; \t\t\t#Pressure(kPa)\n", + "#At exit:\n", + "T2 = 453.; \t\t\t#Temperature(K)\n", + "P2 = 136.8; \t\t\t#Pressure(kPa)\n", + "Cp = 29.4; \t \t\t#specific heat capacity at constant pressure in kJ/kmol\n", + "m = 1000.; \t\t \t#mass of hydrogen in kg\n", + "M = 2.02; \t\t\t #molecular mass of hydrogen\n", + "\n", + "# Calculations\n", + "#To determine heat transfer rates\n", + "#Neglecting the kinetic nd potential energy changes\n", + "#Assuming the process to be occuring through a number of steps\n", + "#Step 1 be isothermal and step 2 be isobaric\n", + "H1 = 0; \t\t\t#change in enthalpy for step 1\n", + "H2 = (m/M)*Cp*(T2-T1)/1000; \t\t\t#change in enthalpy for step 2 in kJ\n", + "H = H2+H1;\n", + "Q = H; \t\t\t#heat transferred in coils in kJ\n", + "\n", + "# Results\n", + "print 'Heat transferred in coils is %f kJ'%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transferred in coils is 2328.712871 kJ\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.12, Page no:35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To find change in internal energy enthalpy heat supplied and work done\n", + "\n", + "#Given:\n", + "m = 10.; \t\t\t#mass of air in kg\n", + "P1 = 100.; \t\t\t#initial pressure(kPa)\n", + "T1 = 300.; \t\t\t#initial temperature(K)\n", + "T2 = 600.; \t\t\t#final temperature(K)\n", + "R = 8.314; \t\t\t#ideal gas constant(kJ/kmol K)\n", + "Cp = 29.099;\t\t#specific heat capacity at constant pressure (kJ/kmol K)\n", + "Cv = 20.785;\t\t#specific heat capacity at constsant volume (kJ/kmol K)\n", + "M = 29.; \t\t\t#molecular weight of air\n", + "\n", + "# Calculations and Results\n", + "#To determine change in internal energy enthalpy heat supplied and work done\n", + "n = m/M; \t \t\t#number of moles of gas(kmol)\n", + "V1 = (n*R*T1)/P1; \t\t\t#initial volume of air (m**3)\n", + "\n", + "#(a)\n", + "#Constant volume process\n", + "V2 = V1 \t\t\t#final volume\n", + "#Change in internal energy U = n*intg(CvdT)...so\n", + "U = n*Cv*(T2-T1); \t\t\t#change in internal energy(kJ)\n", + "Q = U; \t\t\t #heat supplied(kJ)\n", + "W = 0; \t\t\t #work done\n", + "H = U+(n*R*(T2-T1)); \t\t#change in enthalpy(kJ)\n", + "print 'For constant volume process'\n", + "print 'Change in internal energy is %i kJ'%U\n", + "print 'Heat supplied is %i kJ'%Q\n", + "print 'Work done is %i kJ'%W\n", + "print 'Change in enthalpy is %i kJ'%H\n", + "\n", + "# (b)\n", + "# Constant pressure process\n", + "# Change in enthalpy H = n*intg(CpdT)...so \n", + "H = n*Cp*(T2-T1); \t\t\t#change in enthalpy(kJ)\n", + "Q = H;\t\t\t#heat supplied(kJ)\n", + "U = H-(n*R*(T2-T1));\t\t\t#change in internal energy(kJ)\n", + "W = Q-U; \t\t\t#work done(kJ)\n", + "print 'For constant pressure process'\n", + "print 'Change in internal energy is %i kJ'%U\n", + "print 'Heat supplied is %i kJ'%Q\n", + "print 'Work done is %i kJ'%W\n", + "print 'Change in enthalpy is %i kJ'%H\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For constant volume process\n", + "Change in internal energy is 2150 kJ\n", + "Heat supplied is 2150 kJ\n", + "Work done is 0 kJ\n", + "Change in enthalpy is 3010 kJ\n", + "For constant pressure process\n", + "Change in internal energy is 2150 kJ\n", + "Heat supplied is 3010 kJ\n", + "Work done is 860 kJ\n", + "Change in enthalpy is 3010 kJ\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.13, Page no:36\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# To determine change in internal energy and change in enthalpy\n", + "\n", + "# Variables\n", + "#Given:\n", + "R = 8.314; \t\t\t#ideal gas constant(kJ/kmol K)\n", + "Cv = 20.8; \t\t\t#specific heat capacity at constant volume(kJ/kmol K)\n", + "Cp = 29.1; \t\t\t#specific heat capacity at constant pressure(kJ/kmol K)\n", + "P1 = 10.; \t\t\t#initial pressure(bar)\n", + "T1 = 280.; \t\t\t#initial temperature in K\n", + "P2 = 1.; \t\t\t#final pressure(bar)\n", + "T2 = 340.; \t\t\t#final temperature(K)\n", + "\n", + "# Calculations\n", + "#To determine the change in internal energy and change in enthalpy\n", + "#Solution\n", + "n = 1 \t\t\t#basis: 1 kmol of ideal gas\n", + "V1 = (n*R*T1)/(P1*100); \t\t\t#initial volume in m**3\n", + "V2 = (n*R*T2)/(P2*100); \t\t\t#final volume in m**3\n", + "\n", + "Po = P2; \n", + "Vo = V1;\n", + "To = (Po*100*Vo)/(n*R);\n", + "U1 = Cv*(To-T1);\n", + "H1 = U1+(V1*100*(P2-P1));\n", + "W1 = 0;\n", + "Q1 = U1;\n", + "\n", + "H2 = Cp*(T2-To);\n", + "U2 = H2-100*(V2-V1);\n", + "Q2 = H2;\n", + "W2 = Q2-U2;\n", + "#For actual process\n", + "U = U1+U2; \t\t\t#change in internal energy(kJ)\n", + "H = H1+H2; \t\t\t#change in enthalpy(kJ)\n", + "\n", + "# Results\n", + "print 'Change in internal energy is %f kJ'%U\n", + "print 'Change in enthalpy is %f kJ'%H\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in internal energy is 1243.632000 kJ\n", + "Change in enthalpy is 1742.472000 kJ\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |