From 92cca121f959c6616e3da431c1e2d23c4fa5e886 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 7 Apr 2015 15:58:05 +0530 Subject: added books --- Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb | 635 ++++++++++++++++++++++++ 1 file changed, 635 insertions(+) create mode 100755 Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb (limited to 'Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb') diff --git a/Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb new file mode 100755 index 00000000..5a9734bc --- /dev/null +++ b/Fundamentals_Of_Thermodynamics/Chapter5_6.ipynb @@ -0,0 +1,635 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bc9fbdf4ecee4bce9770355a576adf487ef4df6d34bad14ada42e8383ea01d91" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter5:THE FIRST LAW OF THERMODYNAMICS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1:pg-131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1\n", + "#calculating height\n", + "\n", + "m=1100 #mass of car in kg\n", + "ke=400 #kinetic energy of car in kJ\n", + "V=(2*ke*1000/m)**0.5 #velocity of car in m/s\n", + "g=9.807 #acc. due to gravity in m/s^2\n", + "H=ke*1000/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n", + "print\"hence,the car should be raised to a height is\",round(H,1),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,the car should be raised to a height is 37.1 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1E:pg-132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 1E\n", + "#calculating height\n", + "\n", + "m=2400 #mass of car in lbm\n", + "ke=400 #kinetic energy of car in Btu\n", + "V=(2*ke*778.17*32.174/m)**0.5 #velocity of car in ft/s\n", + "g=32.174 #acc. due to gravity in ft/s^2\n", + "H=ke*778.17*32.174/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n", + "print\"hence,the car should be raised to a height is\",round(H,1),\"ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,the car should be raised to a height is 129.7 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.2:pg-134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2\n", + "#change in internal energy\n", + "\n", + "W=-5090 #work input to paddle wheel in kJ\n", + "Q=-1500 #heat transfer from tank in kJ\n", + "dU=Q-W #change in internal energy in kJ\n", + "print\"hence,change in internal energy is\",round(dU),\"kj\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hence,change in internal energy is 3590.0 kj\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3:pg-134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 3\n", + "#analysis of energy transfer\n", + "\n", + "g=9.806 #acceleration due to gravity in m/s^2\n", + "m=10 #mass of stone in kg\n", + "H1=10.2 #initial height of stone above water in metres\n", + "H2=0 #final height in metres\n", + "dKE1=-m*g*(H2-H1) #change in kinetic energy when stone enters state 2 in J\n", + "dPE1=-1 #change in potential energy when stone enters state 2 in J\n", + "print\"\\n hence,when stone is \",round(dKE1),\"J\"\n", + "print\"\\n and change in potential energy is \",round(dPE1),\"J\"\n", + "dPE2=0 #change in potential energy when stone enters state 3 in JQ2=0 //no heat transfer when stone enters state 3 in J\n", + "W2=0 #no work done when stone enters state 3 in J\n", + "dKE2=-1 #change in kinetic energy when stone enters state 3\n", + "dU2=-dKE2 #change in internal energy when stone enters state 3 in J\n", + "print\"\\n hence,when stone has just come to rest in the bucket is \",round(dKE2),\"J\" \n", + "print\"\\n and dU is\",round(dU2),\"J\" \n", + "dKE3=0 #change in kinetic energy when stone enters state 4\n", + "dPE=0 #change in potential energy when stone enters state 4 in J\n", + "W3=0 #no work done when stone enters state 4 in J\n", + "dU3=-1 #change in internal energy when stone enters state 4 in J\n", + "Q3=dU3 #heat transfer when stone enters state 4 in J\n", + "print\"\\n hence,when stone has entered state 4 is\",round(dU3),\"J\" \n", + "print\"\\n and Q3 is \",round(Q3),\"J\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " hence,when stone is 1000.0 J\n", + "\n", + " and change in potential energy is -1.0 J\n", + "\n", + " hence,when stone has just come to rest in the bucket is -1.0 J\n", + "\n", + " and dU is 1.0 J\n", + "\n", + " hence,when stone has entered state 4 is -1.0 J\n", + "\n", + " and Q3 is -1.0 J\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4:pg-136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4\n", + "#Determinig the missing properties \n", + "\n", + "T1=300 #given temp. in Celsius\n", + "u1=2780 #given specific internal enrgy in kJ/kg\n", + "print\"From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\" #hiven pressure in kPa\n", + "u2=2000 #given specific intrernal energy in kJ/kg\n", + "print\"at P=2000 kPa\"\n", + "uf=906.4 #in kJ/kg\n", + "ug=2600.3 #in kJ/kg \n", + "x2=(u2-906.4)/(ug-uf) \n", + "print\"Also, under the given conditions\"\n", + "vf=0.001177 #in m^3/kg \n", + "vg=0.099627 #in m^3/kg\n", + "v2=vf+x2*(vg-vf)#Specific volume for water in m^3/kg\n", + "print\"\\n hence,specific volume for water is \",round(v2,5),\"m^3/kg\" \n", + "print\"\\n Therefore ,this state is \",round(x2,4),\"N\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\n", + "at P=2000 kPa\n", + "Also, under the given conditions\n", + "\n", + " hence,specific volume for water is 0.06474 m^3/kg\n", + "\n", + " Therefore ,this state is 0.6456 N\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5:pg-138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5\n", + "#calculating heat transfer for the given process\n", + "\n", + "Vliq=0.05 #volume of saturated liquid in m^3\n", + "vf=0.001043 #in m^3/kg\n", + "Vvap=4.95 #volume of saturated water vapour in m^3\n", + "vg=1.6940 #in m^3/kg\n", + "m1liq=Vliq/vf #mass of liquid in kg\n", + "m1liq=round(m1liq,2)\n", + "m1vap=Vvap/vg #mass of vapors in kg\n", + "m1vap=round(m1vap,2)\n", + "u1liq=417.36 #specific internal energy of liquid in kJ/kg\n", + "u1vap=2506.1 #specific internal energy of vapors in kJ/kg\n", + "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in kJ\n", + "m=m1liq+m1vap #total mass in kg\n", + "V=5.0 #total volume in m^3\n", + "v2=V/m #final specific volume in m^3/kg\n", + "print\"by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\"\n", + "u2=2600.5 #specific internal energy at final state in kJ/kg\n", + "U2=m*u2 #internal energy at final state in kJ\n", + "Q=U2-U1 #heat transfer for the process in kJ\n", + "print\"\\n hence,heat transfer for the process is\",round(Q),\"kJ\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\n", + "\n", + " hence,heat transfer for the process is 104935.0 kJ\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5E:pg-140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5E\n", + "#calculating heat transfer for the given process\n", + "\n", + "Vliq=1 #volume of saturated liquid in ft^3\n", + "vf=0.01672 #in ft^3/lbm\n", + "Vvap=99 #volume of saturated water vapour in m^3\n", + "vg=26.80 #in ft^3/lbm\n", + "m1liq=Vliq/vf #mass of liquid in lbm\n", + "m1liq=round(m1liq,2)\n", + "m1vap=Vvap/vg #mass of vapors in lbm\n", + "m1vap=round(m1vap,2)\n", + "u1liq=180.1 #specific internal energy of liquid in Btu/lbm\n", + "u1vap=1077.6 #specific internal energy of vapors in Btu/lbm\n", + "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in Btu\n", + "U1=round(U1)\n", + "m=m1liq+m1vap #total mass in lbm\n", + "V=100.0 #total volume in ft^3\n", + "v2=V/m #final specific volume in ft^3/lbm\n", + "print\"by interplotation we find that for steam, if vg=1.575 ft^3/lbm then pressure is 294 lbf/in^2\"\n", + "u2=1117.0 #specific internal energy at final state in Btu/lbm\n", + "U2=m*u2 #internal energy at final state in Btu\n", + "U2=round(U2)\n", + "Q=U2-U1 #heat transfer for the process in Btu\n", + "print\"\\n hence,heat transfer for the process is\",round(Q),\"Btu\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "by interplotation we find that for steam, if vg=1.575 ft^3/lbm then pressure is 294 lbf/in^2\n", + "\n", + " hence,heat transfer for the process is 56182.0 Btu\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.6:pg-143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 6\n", + "#calculating work and heat transfer for the process\n", + "\n", + "V1=0.1 #volume of cylinder in m^3\n", + "m=0.5 #mass of steam in kg\n", + "v1=V1/m #specific volume of steam in m^3/kg\n", + "vf=0.001084 #m^3/kg\n", + "vfg=0.4614 #m^3/kg\n", + "x1=(v1-vf)/vfg #quality\n", + "hf=604.74 #kJ/kg\n", + "hfg=2133.8#kJ/kg\n", + "h2=3066.8 #final specific heat enthalpy in kJ/kg\n", + "h1=hf+x1*hfg #initial specific enthalpy in kJ/kg\n", + "Q=m*(h2-h1) #heat transfer for this process in kJ\n", + "P=400 #pressure inside cylinder in kPa\n", + "v2=0.6548 #specific enthalpy in m^3/kg\n", + "W=m*P*(v2-v1) #work done for the process in kJ\n", + "print\"\\n hence, work done for the process is\",round(W),\"kJ\" \n", + "print\"\\n and heat transfer is \",round(Q,1),\"kJ\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence, work done for the process is 91.0 kJ\n", + "\n", + " and heat transfer is 771.1 kJ\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.7:pg-144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# example 7\n", + "#calculating work and heat transfer for the process\n", + "V1=0.010 #volume of cylinder in m^3\n", + "V2=0.040 # m^3\n", + "P1=573 #kPa\n", + "v1=0.03606 #specific volume of steam in m^3/kg\n", + "u1=389.2 #kJ/kg\n", + "m=V1/v1#mass of steam in kg\n", + "v2=v1*(V2/V1)\n", + "P2=163 #kPa\n", + "u2=395.8 # kJ/kg\n", + "W=8 # kJ\n", + "Q2=m*(u2-u1)+W\n", + "u3=383.4#kJ/kg\n", + "W2=m*(u1-u3)#kJ\n", + "print\"\\n and heat transfer is \",round(Q2,2),\"kJ\" \n", + "print\"\\n hence, work done for the process is\",round(W2,1),\"kJ\" \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " and heat transfer is 9.83 kJ\n", + "\n", + " hence, work done for the process is 1.6 kJ\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.8:pg-151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 8\n", + "#calculating change in enthalpy\n", + "import math\n", + "\n", + "h1=273.2 #specific heat enthalpy for oxygen at 300 K\n", + "h2=1540.2 #specific heat enthalpy for oxygen at 1500 K\n", + "T1=300 #initial temperature in K\n", + "T2=1500 #final temparature in K\n", + "\n", + "dh1=h2-h1 #this change in specific heat enthalpy is calculated using ideal gas tables \n", + "dh3=0.922*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 300K\n", + "dh4=1.0767*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 900K i.e mean of initial and final temperature\n", + "print\"\\n Hence,change in specific heat enthalpy if ideal gas tables are used is \",round(dh1,1),\"kJ/kg\"\n", + "print\"\\n if specific heat is assumed to be constant and using its value at T1 is\",round(dh3,1),\"kJ/kg\"\n", + "print\"\\n if specific heat is assumed to be constant at its value at (T1+T2)/2 is\",round(dh4,1),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Hence,change in specific heat enthalpy if ideal gas tables are used is 1267.0 kJ/kg\n", + "\n", + " if specific heat is assumed to be constant and using its value at T1 is 1106.4 kJ/kg\n", + "\n", + " if specific heat is assumed to be constant at its value at (T1+T2)/2 is 1292.0 kJ/kg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.9:pg-152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9\n", + "#determining amount of heat transfer\n", + "\n", + "P=150 #pressure of nitrogen in cylinder in kPa\n", + "V=0.1 #initial volume of cylinder in m^3\n", + "T1=25 #initial temperature of nitrogen in celsius\n", + "T2=150 #final tempareture of nitrogen in celsius\n", + "R=0.2968 #in kJ/kg-K\n", + "m=P*V/(R*(T1+273)) #mass of nitrogen in kg\n", + "Cv=0.745 #constant volume specific heat for nitrogen in kJ/kg-K\n", + "W=-20 #work done on nitrogen gas in kJ\n", + "Q=m*Cv*(T2-T1)+W #heat transfer during the process in kJ\n", + "print\"\\n hence,the heat transfer for the above process is\",round(Q,1),\"kJ\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the heat transfer for the above process is -4.2 kJ\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.9E:pg-153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 9E\n", + "#determining amount of heat transfer\n", + "\n", + "P=20 #pressure of nitrogen in cylinder in lbf/in^2\n", + "V=2 #initial volume of cylinder in ft^3\n", + "T1=80 #initial temperature of nitrogen in F\n", + "T2=300 #final tempareture of nitrogen in F\n", + "R=55.15 #in ft*lbf/lbm-R\n", + "m=P*V*144/(R*(540)) #mass of nitrogen in lbm\n", + "Cv=0.177 #constant volume specific heat for nitrogen in Btu/lbm-R\n", + "W=-9.15 #work done on nitrogen gas in Btu\n", + "Q=m*Cv*(T2-T1)+W #heat transfer during the process in Btu\n", + "print\"\\n hence,the heat transfer for the above process is\",round(Q,2),\"Btu\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the heat transfer for the above process is -1.62 Btu\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.10:pg-155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 10\n", + "#calculating rate of increase of internal energy\n", + "\n", + "W=-12.8*20 #power consumed in J/s\n", + "Q=-10 #heat transfer rate from battery in J/s\n", + "r=Q-W #rate of increase of internal energy\n", + "print\"\\n hence,the rate of increase of internal energy is\",round(r),\"J/s\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " hence,the rate of increase of internal energy is 246.0 J/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.11:pg-155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 11\n", + "#rate of change of temperature\n", + "\n", + "Q=1500.0 #power produced by burning wood in J/s\n", + "mair=1 #mass of air in kg\n", + "mwood=5 #mass of soft pine wood in kg \n", + "miron=25 #mass of cast iron in kg\n", + "Cvair=0.717 #constant volume specific heat for air in kJ/kg\n", + "Cwood=1.38 #constant volume specific heat for wood in kJ/kg\n", + "Ciron=0.42 #constant volume specific heat for iron in kJ/kg\n", + "dT=75-20 #increase in temperature in Celsius\n", + "T=(Q/1000)/(mair*Cvair+mwood*Cwood+miron*Ciron) #rate of change of temperature in K/s\n", + "dt=(dT/T)/60 #in minutes\n", + "print\" hence,the rate of change of temperature is\",round(T,4),\"k/s\" \n", + "print\" and time taken to reach a temperature of T is\",round(dt),\"min\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " hence,the rate of change of temperature is 0.0828 k/s\n", + " and time taken to reach a temperature of T is 11.0 min\n" + ] + } + ], + "prompt_number": 49 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- cgit